Fix: Proportional editing menu disappears after deleting object
Differential Revision: D4460
This commit is contained in:
parent
872412284c
commit
8f7e24710e
|
@ -197,34 +197,26 @@ class VIEW3D_HT_header(Header):
|
|||
)
|
||||
|
||||
# Proportional editing
|
||||
if obj:
|
||||
gpd = context.gpencil_data
|
||||
if object_mode in {'EDIT', 'PARTICLE_EDIT'}:
|
||||
gpd = context.gpencil_data
|
||||
if object_mode in {'EDIT', 'PARTICLE_EDIT'}:
|
||||
row = layout.row(align=True)
|
||||
row.prop(tool_settings, "proportional_edit", icon_only=True)
|
||||
sub = row.row(align=True)
|
||||
sub.active = tool_settings.proportional_edit != 'DISABLED'
|
||||
sub.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
|
||||
|
||||
elif object_mode == 'OBJECT':
|
||||
row = layout.row(align=True)
|
||||
row.prop(tool_settings, "use_proportional_edit_objects", icon_only=True)
|
||||
sub = row.row(align=True)
|
||||
sub.active = tool_settings.use_proportional_edit_objects
|
||||
sub.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
|
||||
|
||||
elif gpd is not None and obj.type == 'GPENCIL':
|
||||
if gpd.use_stroke_edit_mode or gpd.is_stroke_sculpt_mode:
|
||||
row = layout.row(align=True)
|
||||
row.prop(tool_settings, "proportional_edit", icon_only=True)
|
||||
sub = row.row(align=True)
|
||||
sub.active = tool_settings.proportional_edit != 'DISABLED'
|
||||
sub.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
|
||||
|
||||
elif object_mode == 'OBJECT':
|
||||
row = layout.row(align=True)
|
||||
row.prop(tool_settings, "use_proportional_edit_objects", icon_only=True)
|
||||
sub = row.row(align=True)
|
||||
sub.active = tool_settings.use_proportional_edit_objects
|
||||
sub.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
|
||||
|
||||
elif gpd is not None and obj.type == 'GPENCIL':
|
||||
if gpd.use_stroke_edit_mode or gpd.is_stroke_sculpt_mode:
|
||||
row = layout.row(align=True)
|
||||
row.prop(tool_settings, "proportional_edit", icon_only=True)
|
||||
|
||||
sub = row.row(align=True)
|
||||
sub.active = tool_settings.proportional_edit != 'DISABLED'
|
||||
sub.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
|
||||
else:
|
||||
if context.gpencil_data and context.gpencil_data.use_stroke_edit_mode:
|
||||
row = layout.row(align=True)
|
||||
row.prop(tool_settings, "proportional_edit", icon_only=True)
|
||||
sub = row.row(align=True)
|
||||
sub.active = tool_settings.proportional_edit != 'DISABLED'
|
||||
sub.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
|
||||
|
|
Loading…
Reference in New Issue