[Bf-blender-cvs] [1b0c1c551a6] blender2.8: UI: remove grease pencil settings from topbar
Campbell Barton
noreply at git.blender.org
Tue Jul 31 15:04:02 CEST 2018
Commit: 1b0c1c551a6f25991dfa708ac33af6b1392e70e2
Author: Campbell Barton
Date: Tue Jul 31 23:00:17 2018 +1000
Branches: blender2.8
https://developer.blender.org/rB1b0c1c551a6f25991dfa708ac33af6b1392e70e2
UI: remove grease pencil settings from topbar
Top bar is only for settings that apply to the next action
not a way to change existing data.
If each stroke could have a different color this would work as expected,
however it was adjusting the current layer color.
===================================================================
M release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 42c75ec29ac..62e4c3db503 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -774,6 +774,12 @@ class GreasePencilDataPanel:
row.prop(gpl, "lock_frame", text=lock_label, icon='UNLOCKED')
row.operator("gpencil.active_frame_delete", text="", icon='X')
+ tool_settings = context.tool_settings
+ if gpd and gpl:
+ layout.prop(gpl, "thickness")
+ else:
+ layout.prop(tool_settings, "annotation_thickness", text="Thickness")
+
class GreasePencilOnionPanel:
@staticmethod
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index 7eaf4762216..90b04104444 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -186,26 +186,8 @@ class _defs_view3d_generic:
class _defs_annotate:
@classmethod
def draw_settings_common(cls, context, layout, tool):
- user_prefs = context.user_preferences
ts = context.tool_settings
- # XXX: These context checks are needed for layer-dependent settings,
- # but this breaks for using topbar for 2D editor active tools, etc.
- if type(context.gpencil_data_owner) is bpy.types.Object:
- gpd = context.scene.grease_pencil
- else:
- gpd = context.gpencil_data
-
- gpl = gpd.layers.active if gpd else None
-
- if gpd and gpl:
- layout.prop(gpd.layers, "active_note", text="")
- layout.prop(gpl, "color", text="")
- layout.prop(gpl, "thickness")
- else:
- layout.prop(user_prefs.edit, "grease_pencil_default_color", text="")
- layout.prop(ts, "annotation_thickness", text="Thickness")
-
# For 3D view, show the stroke placement settings
# XXX: How to tell what editor the active tool comes from?
is_3d_view = True
More information about the Bf-blender-cvs
mailing list