Bugfix T42774: BSurface addon doesn't work on new builds
[blender.git] / release / scripts / startup / bl_ui / properties_grease_pencil_common.py
index 5975931b83f7aac131d4161800a8af0c25e5f3ea..fc94b40f45c3fd135246dc6a4d3876f8ad1b38fd 100644 (file)
@@ -68,6 +68,17 @@ class GreasePencilDrawingToolsPanel():
         row = col.row(align=True)
         row.prop(context.tool_settings, "use_grease_pencil_sessions", text="Continuous Drawing")
 
+               
+        if context.space_data.type in ('VIEW_3D', 'CLIP_EDITOR'):
+            col.separator()
+            col.label("Data Source:")
+            row = col.row(align=True)
+            if context.space_data.type == 'VIEW_3D':
+                row.prop(context.tool_settings, "grease_pencil_source", expand=True)
+            elif context.space_data.type == 'CLIP_EDITOR':
+                row.prop(context.space_data, "grease_pencil_source", expand=True)
+
+
         gpd = context.gpencil_data
         if gpd:
             col.separator()
@@ -328,8 +339,9 @@ class GreasePencilDataPanel():
         gpd = context.gpencil_data
 
         # Owner Selector
-        # XXX: add this for 3D view too
-        if context.space_data.type == 'CLIP_EDITOR':
+        if context.space_data.type == 'VIEW_3D':
+            layout.prop(context.tool_settings, "grease_pencil_source", expand=True)
+        elif context.space_data.type == 'CLIP_EDITOR':
             layout.prop(context.space_data, "grease_pencil_source", expand=True)
 
         # Grease Pencil data selector