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.
This commit is contained in:
parent
e5a1bf0b10
commit
1b0c1c551a
Notes:
blender-bot
2023-02-14 05:01:20 +01:00
Referenced by commit 43f46bb664
, Tool System: add back layer selector
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue