Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-07-31 16:00:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-31 16:02:18 +0300
commit1b0c1c551a6f25991dfa708ac33af6b1392e70e2 (patch)
treeb3bc7fd4312da2938ef6af7d30dba95de761f414 /release/scripts/startup
parente5a1bf0b10389939d654e35ef76bb4ad27029617 (diff)
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.
Diffstat (limited to 'release/scripts/startup')
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py6
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py18
2 files changed, 6 insertions, 18 deletions
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