diff options
Diffstat (limited to 'release/scripts/startup')
6 files changed, 39 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 570b4663f1d..83039a5c333 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -1276,6 +1276,11 @@ class WM_OT_properties_edit(Operator): # First remove item = eval("context.%s" % data_path) + + if (item.id_data and item.id_data.override_library and item.id_data.override_library.reference): + self.report({'ERROR'}, "Cannot edit properties from override data") + return {'CANCELLED'} + prop_type_old = type(item[prop_old]) rna_idprop_ui_prop_clear(item, prop_old) @@ -1375,6 +1380,10 @@ class WM_OT_properties_edit(Operator): item = eval("context.%s" % data_path) + if (item.id_data and item.id_data.override_library and item.id_data.override_library.reference): + self.report({'ERROR'}, "Cannot edit properties from override data") + return {'CANCELLED'} + # retrieve overridable static exec_str = "item.is_property_overridable_library('[\"%s\"]')" % (self.property) self.is_overridable_library = bool(eval(exec_str)) @@ -1498,6 +1507,10 @@ class WM_OT_properties_add(Operator): data_path = self.data_path item = eval("context.%s" % data_path) + if (item.id_data and item.id_data.override_library and item.id_data.override_library.reference): + self.report({'ERROR'}, "Cannot add properties to override data") + return {'CANCELLED'} + def unique_name(names): prop = "prop" prop_new = prop @@ -1550,6 +1563,11 @@ class WM_OT_properties_remove(Operator): ) data_path = self.data_path item = eval("context.%s" % data_path) + + if (item.id_data and item.id_data.override_library and item.id_data.override_library.reference): + self.report({'ERROR'}, "Cannot remove properties from override data") + return {'CANCELLED'} + prop = self.property rna_idprop_ui_prop_update(item, prop) del item[prop] diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index 7ff2688f2a7..64bc694d5ca 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -468,7 +468,7 @@ class DATA_PT_sculpt_vertex_colors(MeshButtonsPanel, Panel): @classmethod def poll(cls, context): - return context.preferences.experimental.use_sculpt_vertex_colors + return super().poll(context) and context.preferences.experimental.use_sculpt_vertex_colors def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 6dde1e715bb..c7df2bbb7eb 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -313,6 +313,7 @@ class TextureMaskPanel(BrushPanel): class StrokePanel(BrushPanel): bl_label = "Stroke" bl_options = {'DEFAULT_CLOSED'} + bl_ui_units_x = 13 def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 75c1bb5e3f9..3aedc04af88 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -1137,6 +1137,7 @@ class IMAGE_PT_paint_settings_advanced(Panel, ImagePaintPanel): bl_parent_id = "IMAGE_PT_paint_settings" bl_category = "Tool" bl_label = "Advanced" + bl_ui_units_x = 12 def draw(self, context): layout = self.layout @@ -1193,6 +1194,7 @@ class IMAGE_PT_tools_brush_display(Panel, BrushButtonsPanel, DisplayPanel): bl_category = "Tool" bl_label = "Brush Tip" bl_options = {'DEFAULT_CLOSED'} + bl_ui_units_x = 15 class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel): @@ -1219,6 +1221,7 @@ class IMAGE_PT_tools_mask_texture(Panel, BrushButtonsPanel, TextureMaskPanel): bl_parent_id = "IMAGE_PT_paint_settings" bl_category = "Tool" bl_label = "Texture Mask" + bl_ui_units_x = 12 class IMAGE_PT_paint_stroke(BrushButtonsPanel, Panel, StrokePanel): diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 03f85578b6e..9548de20752 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -2118,6 +2118,10 @@ class ExperimentalPanel: url_prefix = "https://developer.blender.org/" + @classmethod + def poll(cls, context): + return bpy.app.version_cycle == 'alpha' + def _draw_items(self, context, items): prefs = context.preferences experimental = prefs.experimental @@ -2178,6 +2182,12 @@ class USERPREF_PT_experimental_prototypes(ExperimentalPanel, Panel): class USERPREF_PT_experimental_debugging(ExperimentalPanel, Panel): bl_label = "Debugging" + @classmethod + def poll(cls, context): + # Unlike the other experimental panels, the debugging one is always visible + # even in beta or release. + return True + def draw(self, context): self._draw_items( context, ( diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 6e31808d27d..e6d27d531be 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -392,6 +392,7 @@ class VIEW3D_PT_tools_brush_settings_advanced(Panel, View3DPaintBrushPanel): bl_parent_id = "VIEW3D_PT_tools_brush_settings" bl_label = "Advanced" bl_options = {'DEFAULT_CLOSED'} + bl_ui_units_x = 14 def draw(self, context): layout = self.layout @@ -598,6 +599,7 @@ class VIEW3D_PT_tools_brush_display(Panel, View3DPaintBrushPanel, DisplayPanel): bl_parent_id = "VIEW3D_PT_tools_brush_settings" bl_label = "Cursor" bl_options = {'DEFAULT_CLOSED'} + bl_ui_units_x = 12 # TODO, move to space_view3d.py @@ -828,6 +830,7 @@ class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel): bl_context = ".sculpt_mode" # dot on purpose (access from topbar) bl_label = "Options" bl_options = {'DEFAULT_CLOSED'} + bl_ui_units_x = 12 @classmethod def poll(cls, context): @@ -1375,6 +1378,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_advanced(View3DPanel, Panel): bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_brush_settings' bl_category = "Tool" bl_options = {'DEFAULT_CLOSED'} + bl_ui_units_x = 11 @classmethod def poll(cls, context): @@ -1434,6 +1438,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_stroke(Panel, View3DPanel): bl_label = "Stroke" bl_category = "Tool" bl_options = {'DEFAULT_CLOSED'} + bl_ui_units_x = 12 @classmethod def poll(cls, context): @@ -2110,6 +2115,7 @@ class VIEW3D_PT_tools_grease_pencil_paint_appearance(GreasePencilDisplayPanel, P bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_brush_settings' bl_label = "Cursor" bl_category = "Tool" + bl_ui_units_x = 15 class VIEW3D_PT_tools_grease_pencil_sculpt_appearance(GreasePencilDisplayPanel, Panel, View3DPanel): |