Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_collection.py
| Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
| class COLLECTION_PT_clay_settings(CollectionButtonsPanel, Panel): | class COLLECTION_PT_clay_settings(CollectionButtonsPanel, Panel): | ||||
| bl_label = "Render Settings" | bl_label = "Render Settings" | ||||
| COMPAT_ENGINES = {'BLENDER_CLAY'} | COMPAT_ENGINES = {'BLENDER_CLAY'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| return scene and (scene.render.engine in cls.COMPAT_ENGINES) | return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| scene_props = context.scene.collection_properties['BLENDER_CLAY'] | scene_props = context.scene.collection_properties['BLENDER_CLAY'] | ||||
| collection = context.layer_collection | collection = context.layer_collection | ||||
| collection_props = collection.engine_overrides['BLENDER_CLAY'] | collection_props = collection.engine_overrides['BLENDER_CLAY'] | ||||
| col = layout.column() | col = layout.column() | ||||
| Show All 9 Lines | def draw(self, context): | ||||
| col.template_override_property(collection_props, scene_props, "hair_brightness_randomness") | col.template_override_property(collection_props, scene_props, "hair_brightness_randomness") | ||||
| class COLLECTION_PT_object_mode_settings(CollectionButtonsPanel, Panel): | class COLLECTION_PT_object_mode_settings(CollectionButtonsPanel, Panel): | ||||
| bl_label = "Object Mode Settings" | bl_label = "Object Mode Settings" | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| ob = context.object | workspace = context.workspace | ||||
| return ob and (ob.mode == 'OBJECT') | return workspace and hasattr(workspace, 'object_mode') and (workspace.object_mode == 'OBJECT') | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| scene_props = context.scene.collection_properties['ObjectMode'] | scene_props = context.scene.collection_properties['ObjectMode'] | ||||
| collection = context.layer_collection | collection = context.layer_collection | ||||
| collection_props = collection.engine_overrides['ObjectMode'] | collection_props = collection.engine_overrides['ObjectMode'] | ||||
| col = layout.column() | col = layout.column() | ||||
| col.template_override_property(collection_props, scene_props, "show_wire") | col.template_override_property(collection_props, scene_props, "show_wire") | ||||
| col.template_override_property(collection_props, scene_props, "show_backface_culling") | col.template_override_property(collection_props, scene_props, "show_backface_culling") | ||||
| class COLLECTION_PT_edit_mode_settings(CollectionButtonsPanel, Panel): | class COLLECTION_PT_edit_mode_settings(CollectionButtonsPanel, Panel): | ||||
| bl_label = "Edit Mode Settings" | bl_label = "Edit Mode Settings" | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| ob = context.object | workspace = context.workspace | ||||
| return ob and (ob.mode == 'EDIT') | return workspace and hasattr(workspace, 'object_mode') and (workspace.object_mode == 'EDIT') | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| scene_props = context.scene.collection_properties['EditMode'] | scene_props = context.scene.collection_properties['EditMode'] | ||||
| collection = context.layer_collection | collection = context.layer_collection | ||||
| collection_props = collection.engine_overrides['EditMode'] | collection_props = collection.engine_overrides['EditMode'] | ||||
| col = layout.column() | col = layout.column() | ||||
| col.template_override_property(collection_props, scene_props, "show_occlude_wire") | col.template_override_property(collection_props, scene_props, "show_occlude_wire") | ||||
| col.template_override_property(collection_props, scene_props, "backwire_opacity") | col.template_override_property(collection_props, scene_props, "backwire_opacity") | ||||
| col.template_override_property(collection_props, scene_props, "face_normals_show") | col.template_override_property(collection_props, scene_props, "face_normals_show") | ||||
| col.template_override_property(collection_props, scene_props, "vert_normals_show") | col.template_override_property(collection_props, scene_props, "vert_normals_show") | ||||
| col.template_override_property(collection_props, scene_props, "loop_normals_show") | col.template_override_property(collection_props, scene_props, "loop_normals_show") | ||||
| col.template_override_property(collection_props, scene_props, "normals_length") | col.template_override_property(collection_props, scene_props, "normals_length") | ||||
| col.template_override_property(collection_props, scene_props, "show_weight") | col.template_override_property(collection_props, scene_props, "show_weight") | ||||
| class COLLECTION_PT_paint_weight_mode_settings(CollectionButtonsPanel, Panel): | class COLLECTION_PT_paint_weight_mode_settings(CollectionButtonsPanel, Panel): | ||||
| bl_label = "Weight Paint Mode Settings" | bl_label = "Weight Paint Mode Settings" | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| ob = context.object | workspace = context.workspace | ||||
| return ob and (ob.mode == 'WEIGHT_PAINT') | return workspace and hasattr(workspace, 'object_mode') and (workspace.object_mode == 'WEIGHT_PAINT') | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| scene_props = context.scene.collection_properties['WeightPaintMode'] | scene_props = context.scene.collection_properties['WeightPaintMode'] | ||||
| collection = context.layer_collection | collection = context.layer_collection | ||||
| collection_props = collection.engine_overrides['WeightPaintMode'] | collection_props = collection.engine_overrides['WeightPaintMode'] | ||||
| col = layout.column() | col = layout.column() | ||||
| col.template_override_property(collection_props, scene_props, "use_shading") | col.template_override_property(collection_props, scene_props, "use_shading") | ||||
| col.template_override_property(collection_props, scene_props, "use_wire") | col.template_override_property(collection_props, scene_props, "use_wire") | ||||
| class COLLECTION_PT_paint_vertex_mode_settings(CollectionButtonsPanel, Panel): | class COLLECTION_PT_paint_vertex_mode_settings(CollectionButtonsPanel, Panel): | ||||
| bl_label = "Vertex Paint Mode Settings" | bl_label = "Vertex Paint Mode Settings" | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| ob = context.object | workspace = context.workspace | ||||
| return ob and (ob.mode == 'VERTEX_PAINT') | return workspace and hasattr(workspace, 'object_mode') and (workspace.object_mode == 'VERTEX_PAINT') | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| scene_props = context.scene.collection_properties['VertexPaintMode'] | scene_props = context.scene.collection_properties['VertexPaintMode'] | ||||
| collection = context.layer_collection | collection = context.layer_collection | ||||
| collection_props = collection.engine_overrides['VertexPaintMode'] | collection_props = collection.engine_overrides['VertexPaintMode'] | ||||
| col = layout.column() | col = layout.column() | ||||
| Show All 17 Lines | |||||