From b365cc017adf3a8fb36006d6cb194d28be02e6d4 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 3 May 2018 15:09:09 +0200 Subject: 3D Viewport: move overlay settings from collections to 3D viewport. For some we may add per object overrides, but for most we plan to keep them strictly per viewport settings. Display settings from the mesh still need to be moved here, only collections were done to remove that code. --- .../scripts/startup/bl_ui/properties_collection.py | 85 ---------------------- 1 file changed, 85 deletions(-) (limited to 'release/scripts/startup/bl_ui/properties_collection.py') diff --git a/release/scripts/startup/bl_ui/properties_collection.py b/release/scripts/startup/bl_ui/properties_collection.py index 2d032e7f95d..80598632714 100644 --- a/release/scripts/startup/bl_ui/properties_collection.py +++ b/release/scripts/startup/bl_ui/properties_collection.py @@ -86,94 +86,9 @@ class COLLECTION_PT_clay_settings(CollectionButtonsPanel, Panel): col.template_override_property(collection_props, scene_props, "hair_brightness_randomness") -class COLLECTION_PT_object_mode_settings(CollectionButtonsPanel, Panel): - bl_label = "Object Mode Settings" - - @classmethod - def poll(cls, context): - ob = context.object - return ob and ob.mode == 'OBJECT' - - def draw(self, context): - layout = self.layout - scene_props = context.scene.collection_properties['ObjectMode'] - collection = get_collection_from_context(context) - collection_props = collection.engine_overrides['ObjectMode'] - - col = layout.column() - col.template_override_property(collection_props, scene_props, "show_wire") - col.template_override_property(collection_props, scene_props, "show_backface_culling") - - -class COLLECTION_PT_edit_mode_settings(CollectionButtonsPanel, Panel): - bl_label = "Edit Mode Settings" - - @classmethod - def poll(cls, context): - ob = context.object - return ob and ob.mode == 'EDIT' - - def draw(self, context): - layout = self.layout - scene_props = context.scene.collection_properties['EditMode'] - collection = get_collection_from_context(context) - collection_props = collection.engine_overrides['EditMode'] - - col = layout.column() - 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, "face_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, "normals_length") - col.template_override_property(collection_props, scene_props, "show_weight") - - -class COLLECTION_PT_paint_weight_mode_settings(CollectionButtonsPanel, Panel): - bl_label = "Weight Paint Mode Settings" - - @classmethod - def poll(cls, context): - ob = context.object - return ob and ob.mode == 'WEIGHT_PAINT' - - def draw(self, context): - layout = self.layout - scene_props = context.scene.collection_properties['WeightPaintMode'] - collection = get_collection_from_context(context) - collection_props = collection.engine_overrides['WeightPaintMode'] - - col = layout.column() - col.template_override_property(collection_props, scene_props, "use_shading") - col.template_override_property(collection_props, scene_props, "use_wire") - - -class COLLECTION_PT_paint_vertex_mode_settings(CollectionButtonsPanel, Panel): - bl_label = "Vertex Paint Mode Settings" - - @classmethod - def poll(cls, context): - ob = context.object - return ob and ob.mode == 'VERTEX_PAINT' - - def draw(self, context): - layout = self.layout - scene_props = context.scene.collection_properties['VertexPaintMode'] - collection = get_collection_from_context(context) - collection_props = collection.engine_overrides['VertexPaintMode'] - - col = layout.column() - col.template_override_property(collection_props, scene_props, "use_shading") - col.template_override_property(collection_props, scene_props, "use_wire") - - classes = ( COLLECTION_PT_context_collection, COLLECTION_PT_clay_settings, - COLLECTION_PT_object_mode_settings, - COLLECTION_PT_edit_mode_settings, - COLLECTION_PT_paint_weight_mode_settings, - COLLECTION_PT_paint_vertex_mode_settings, ) if __name__ == "__main__": # only for live edit. -- cgit v1.2.3