Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-05-03 16:09:09 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-05-05 16:54:43 +0300
commitb365cc017adf3a8fb36006d6cb194d28be02e6d4 (patch)
tree9707a02b1ce75c285d731f41a9d49d2ec52dcad8 /release
parent2094b454474de25e42cd6ec1f63ebc84f50f666a (diff)
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.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/properties_collection.py85
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py52
2 files changed, 28 insertions, 109 deletions
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.
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 3a35990fd60..d73fdb2e750 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3555,7 +3555,7 @@ class VIEW3D_PT_shading(Panel):
col.separator()
col.row().prop(shading, "light", expand=True)
if shading.light == 'STUDIO':
- col.row().template_icon_view(shading, "studiolight")
+ col.row().template_icon_view(shading, "studio_light")
col.separator()
col.prop(shading, "show_shadows")
@@ -3592,23 +3592,13 @@ class VIEW3D_PT_overlay(Panel):
col.active = display_all
col.prop(overlay, "show_cursor")
- if context.mode in {'PAINT_WEIGHT', 'PAINT_VERTEX'}:
- engine_type = {
- 'PAINT_WEIGHT': 'WeightPaintMode',
- 'PAINT_VERTEX': 'VertexPaintMode',
- }.get(context.mode)
- engine_props = scene.collection_properties[engine_type]
- col.prop(engine_props, "use_wire")
-
- if context.mode in {'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE'}:
- col.prop(view, "show_mode_shade_override")
-
col = layout.column()
col.active = display_all
col.prop(overlay, "show_outline_selected")
col.prop(overlay, "show_all_objects_origin")
col.prop(overlay, "show_relationship_lines")
col.prop(overlay, "show_face_orientation")
+ col.prop(overlay, "show_backface_culling")
col = layout.column()
col.active = display_all
@@ -3630,6 +3620,32 @@ class VIEW3D_PT_overlay(Panel):
subsub.active = scene.unit_settings.system == 'NONE'
subsub.prop(overlay, "grid_subdivisions", text="Subdivisions")
+ if context.mode == 'EDIT_MESH':
+ col.separator()
+ col.label(text="Edit Mode:")
+
+ col.prop(overlay, "show_occlude_wire")
+
+ col.label(text="Normals:")
+ row = col.row(align=True)
+
+ row.prop(overlay, "show_vertex_normals", text="", icon='VERTEXSEL')
+ row.prop(overlay, "show_split_normals", text="", icon='LOOPSEL')
+ row.prop(overlay, "show_face_normals", text="", icon='FACESEL')
+
+ sub = row.row(align=True)
+ sub.active = overlay.show_vertex_normals or overlay.show_face_normals or overlay.show_split_normals
+ sub.prop(overlay, "normals_length", text="Size")
+
+ elif context.mode in {'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE'}:
+ col.separator()
+ col.label(text="Paint Mode:")
+
+ if context.mode in {'PAINT_WEIGHT', 'PAINT_VERTEX'}:
+ col.prop(overlay, "show_paint_wire")
+
+ col.prop(view, "show_mode_shade_override")
+
class VIEW3D_PT_quad_view(Panel):
bl_space_type = 'VIEW_3D'
@@ -3771,18 +3787,6 @@ class VIEW3D_PT_view3d_meshdisplay(Panel):
col = layout.column()
col.separator()
- col.label(text="Normals:")
- row = col.row(align=True)
-
- row.prop(mesh, "show_normal_vertex", text="", icon='VERTEXSEL')
- row.prop(mesh, "show_normal_loop", text="", icon='LOOPSEL')
- row.prop(mesh, "show_normal_face", text="", icon='FACESEL')
-
- sub = row.row(align=True)
- sub.active = mesh.show_normal_vertex or mesh.show_normal_face or mesh.show_normal_loop
- sub.prop(scene.tool_settings, "normal_size", text="Size")
-
- col.separator()
split = layout.split()
col = split.column()
col.label(text="Edge Info:")