diff options
Diffstat (limited to 'release/scripts/startup/bl_ui')
8 files changed, 63 insertions, 65 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_bone.py b/release/scripts/startup/bl_ui/properties_data_bone.py index f3e116ca321..6452ad8465b 100644 --- a/release/scripts/startup/bl_ui/properties_data_bone.py +++ b/release/scripts/startup/bl_ui/properties_data_bone.py @@ -292,10 +292,15 @@ class BONE_PT_display_custom_shape(BoneButtonsPanel, Panel): sub = col.column() sub.active = bool(pchan and pchan.custom_shape) sub.separator() - sub.prop(pchan, "custom_shape_scale", text="Scale") + + sub.prop(pchan, "custom_shape_scale_xyz", text="Scale") + sub.prop(pchan, "custom_shape_translation", text="Translation") + sub.prop(pchan, "custom_shape_rotation_euler", text="Rotation") + sub.prop_search(pchan, "custom_shape_transform", ob.pose, "bones", text="Override Transform") sub.prop(pchan, "use_custom_shape_bone_size") + sub.separator() sub.prop(bone, "show_wire", text="Wireframe") diff --git a/release/scripts/startup/bl_ui/properties_data_gpencil.py b/release/scripts/startup/bl_ui/properties_data_gpencil.py index 69720a6c54b..e71ea2f31a4 100644 --- a/release/scripts/startup/bl_ui/properties_data_gpencil.py +++ b/release/scripts/startup/bl_ui/properties_data_gpencil.py @@ -113,7 +113,8 @@ class GPENCIL_MT_layer_context_menu(Menu): layout.operator("gpencil.layer_merge", icon='SORT_ASC', text="Merge Down") layout.separator() - layout.menu("VIEW3D_MT_gpencil_copy_layer") + layout.operator("gpencil.layer_duplicate_object", text="Copy Layer to Selected").only_active=True + layout.operator("gpencil.layer_duplicate_object", text="Copy All Layers to Selected").only_active=False class DATA_PT_gpencil_layers(DataButtonsPanel, Panel): 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 3064b33c7f7..55a49878b71 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -887,37 +887,43 @@ class GreasePencilFlipTintColors(Operator): bl_idname = "gpencil.tint_flip" bl_description = "Switch tint colors" - def execute(self, context): - try: - ts = context.tool_settings - settings = None - if context.mode == 'PAINT_GPENCIL': - settings = ts.gpencil_paint - if context.mode == 'SCULPT_GPENCIL': - settings = ts.gpencil_sculpt_paint - elif context.mode == 'WEIGHT_GPENCIL': - settings = ts.gpencil_weight_paint - elif context.mode == 'VERTEX_GPENCIL': - settings = ts.gpencil_vertex_paint - - brush = settings.brush - if brush is not None: - color = brush.color - secondary_color = brush.secondary_color + @classmethod + def poll(cls, context): + ts = context.tool_settings + settings = None + if context.mode == 'PAINT_GPENCIL': + settings = ts.gpencil_paint + if context.mode == 'SCULPT_GPENCIL': + settings = ts.gpencil_sculpt_paint + elif context.mode == 'WEIGHT_GPENCIL': + settings = ts.gpencil_weight_paint + elif context.mode == 'VERTEX_GPENCIL': + settings = ts.gpencil_vertex_paint - orig_prim = color.hsv - orig_sec = secondary_color.hsv + return settings and settings.brush - color.hsv = orig_sec - secondary_color.hsv = orig_prim + def execute(self, context): + ts = context.tool_settings + settings = None + if context.mode == 'PAINT_GPENCIL': + settings = ts.gpencil_paint + if context.mode == 'SCULPT_GPENCIL': + settings = ts.gpencil_sculpt_paint + elif context.mode == 'WEIGHT_GPENCIL': + settings = ts.gpencil_weight_paint + elif context.mode == 'VERTEX_GPENCIL': + settings = ts.gpencil_vertex_paint - return {'FINISHED'} + brush = settings.brush + color = brush.color + secondary_color = brush.secondary_color - except Exception as e: - utils_core.error_handlers(self, "gpencil.tint_flip", e, - "Flip Colors could not be completed") + orig_prim = color.hsv + orig_sec = secondary_color.hsv - return {'CANCELLED'} + color.hsv = orig_sec + secondary_color.hsv = orig_prim + return {'FINISHED'} classes = ( diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py index 6a5c000116f..9d099ff2231 100644 --- a/release/scripts/startup/bl_ui/properties_material_gpencil.py +++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py @@ -46,13 +46,19 @@ class GPENCIL_MT_material_context_menu(Menu): layout.separator() - layout.operator("object.material_slot_remove_unused") - layout.operator("gpencil.stroke_merge_material", text="Merge Similar") - - layout.separator() layout.operator("gpencil.material_to_vertex_color", text="Convert Materials to Vertex Color") layout.operator("gpencil.extract_palette_vertex", text="Extract Palette from Vertex Color") + layout.separator() + + layout.operator("gpencil.materials_copy_to_object", text="Copy Material to Selected").only_active = True + layout.operator("gpencil.materials_copy_to_object", text="Copy All Materials to Selected").only_active = False + + layout.separator() + + layout.operator("gpencil.stroke_merge_material", text="Merge Similar") + layout.operator("object.material_slot_remove_unused") + class GPENCIL_UL_matslots(UIList): def draw_item(self, _context, layout, _data, item, icon, _active_data, _active_propname, _index): diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 4e3e4c2d58d..f3462dfb35d 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -1225,7 +1225,7 @@ def brush_basic_gpencil_paint_settings(layout, context, brush, *, compact=False) row = layout.row(align=True) row.prop(gp_settings, "fill_factor") row = layout.row(align=True) - row.prop(gp_settings, "dilate_pixels") + row.prop(gp_settings, "dilate") row = layout.row(align=True) row.prop(brush, "size", text="Thickness") layout.use_property_split = use_property_split_prev diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py index 1e799379543..6eafa570f4c 100644 --- a/release/scripts/startup/bl_ui/space_outliner.py +++ b/release/scripts/startup/bl_ui/space_outliner.py @@ -162,13 +162,13 @@ class OUTLINER_MT_collection_view_layer(Menu): layout.operator("outliner.collection_exclude_set") layout.operator("outliner.collection_exclude_clear") + layout.operator("outliner.collection_holdout_set") + layout.operator("outliner.collection_holdout_clear") + if context.engine == 'CYCLES': layout.operator("outliner.collection_indirect_only_set") layout.operator("outliner.collection_indirect_only_clear") - layout.operator("outliner.collection_holdout_set") - layout.operator("outliner.collection_holdout_clear") - class OUTLINER_MT_collection_visibility(Menu): bl_label = "Visibility" diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py index 774e2938deb..30967e9746d 100644 --- a/release/scripts/startup/bl_ui/space_time.py +++ b/release/scripts/startup/bl_ui/space_time.py @@ -300,6 +300,8 @@ class TIME_PT_keyframing_settings(TimelinePanelButtons, Panel): col.label(text="New Keyframe Type") col.prop(tool_settings, "keyframe_type", text="") + layout.prop(tool_settings, "use_keyframe_cycle_aware") + class TIME_PT_auto_keyframing(TimelinePanelButtons, Panel): bl_label = "Auto Keyframing" @@ -327,8 +329,6 @@ class TIME_PT_auto_keyframing(TimelinePanelButtons, Panel): if not prefs.edit.use_keyframe_insert_available: col.prop(tool_settings, "use_record_with_nla", text="Layered Recording") - col.prop(tool_settings, "use_keyframe_cycle_aware") - ################################### diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index d86e65d9f0d..18c6564b7d4 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -4956,28 +4956,6 @@ class VIEW3D_MT_assign_material(Menu): icon='LAYER_ACTIVE' if mat == mat_active else 'BLANK1').material = mat.name -class VIEW3D_MT_gpencil_copy_layer(Menu): - bl_label = "Copy Layer to Object" - - def draw(self, context): - layout = self.layout - view_layer = context.view_layer - obact = context.active_object - gpl = context.active_gpencil_layer - - done = False - if gpl is not None: - for ob in view_layer.objects: - if ob.type == 'GPENCIL' and ob != obact: - layout.operator("gpencil.layer_duplicate_object", text=ob.name).object = ob.name - done = True - - if done is False: - layout.label(text="No destination object", icon='ERROR') - else: - layout.label(text="No layer to copy", icon='ERROR') - - class VIEW3D_MT_edit_gpencil(Menu): bl_label = "Grease Pencil" @@ -6191,10 +6169,13 @@ class VIEW3D_PT_overlay_geometry(Panel): sub.prop(overlay, "wireframe_opacity", text="Opacity") row = col.row(align=True) - if context.mode not in { - 'EDIT_ARMATURE', 'POSE', 'OBJECT', - 'PAINT_GPENCIL', 'VERTEX_GPENCIL', 'WEIGHT_GPENCIL', 'SCULPT_GPENCIL', 'EDIT_GPENCIL', - }: + + # These properties should be always available in the UI for all modes + # other than Object. + # Even when the Fade Inactive Geometry overlay is not affecting the + # current active object depending on its mode, it will always affect + # the rest of the scene. + if context.mode != 'OBJECT': row.prop(overlay, "show_fade_inactive", text="") sub = row.row() sub.active = overlay.show_fade_inactive @@ -7645,7 +7626,6 @@ classes = ( VIEW3D_MT_weight_gpencil, VIEW3D_MT_gpencil_animation, VIEW3D_MT_gpencil_simplify, - VIEW3D_MT_gpencil_copy_layer, VIEW3D_MT_gpencil_autoweights, VIEW3D_MT_gpencil_edit_context_menu, VIEW3D_MT_edit_curve, |