CGCookie / addon_common

GNU General Public License v3.0
41 stars 7 forks source link

Render UI in one viewport #19

Open skarndev opened 4 years ago

skarndev commented 4 years ago

Is it possible to restrict the rendering of the UI to a certain view3D space viewport? For example, if launch a CookieCutter based operator in one of the default workspaces called Animation, which has 2 viewports, the UI is rendered randomly there.

patmo141 commented 4 years ago

Great question! I have an addon I had made previously that rendered in two different viewports (two local 3D views). Would love to see that in cookie cutter. I have several use cases for

A) drawing in 3D view and drawing in image editor at same time B) drawing in two 3D views simultaneously C) Drawing only in one 3D View

Perhaps a draw callback could be linked to an area?

skarndev commented 4 years ago

Do you mean to say linking a draw callback to an instance of SpaceView3D instead of bpy.types.SpaceView3D? I've never checked if this is actually supported. Also if possible it'd be great to exclude unwanted areas from the operator behavior. E.g. you run a CookieCutter operator in Region 3D and it does not affect Image Editor and so on.