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-05 11:45:15 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-05-05 16:54:36 +0300
commit2094b454474de25e42cd6ec1f63ebc84f50f666a (patch)
tree91331e81b3cef843fa29dfd3883ca60f36b06b30 /release
parent1983eea98ef73e6fe4c9bd187944d122dc1c7b07 (diff)
3D Viewport: make shading and overlay DNA match UI names.
We should use consistent naming between the internal code and UI whenever possible, only reason not to is file compatibility.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/bpy_extras/object_utils.py2
-rw-r--r--release/scripts/presets/keyconfig/3dsmax.py2
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py31
3 files changed, 17 insertions, 18 deletions
diff --git a/release/scripts/modules/bpy_extras/object_utils.py b/release/scripts/modules/bpy_extras/object_utils.py
index 04b3858bb0d..fd1f253df03 100644
--- a/release/scripts/modules/bpy_extras/object_utils.py
+++ b/release/scripts/modules/bpy_extras/object_utils.py
@@ -222,7 +222,7 @@ def object_add_grid_scale(context):
space_data = context.space_data
if space_data and space_data.type == 'VIEW_3D':
- return space_data.grid_scale_unit
+ return space_data.overlay.grid_scale_unit
return 1.0
diff --git a/release/scripts/presets/keyconfig/3dsmax.py b/release/scripts/presets/keyconfig/3dsmax.py
index 1530554812b..ed51bf95a84 100644
--- a/release/scripts/presets/keyconfig/3dsmax.py
+++ b/release/scripts/presets/keyconfig/3dsmax.py
@@ -722,7 +722,7 @@ kmi.properties.value_1 = 'VERTEX'
kmi.properties.value_2 = 'INCREMENT'
kmi = km.keymap_items.new('view3d.select_border', 'EVT_TWEAK_L', 'ANY', ctrl=True)
kmi = km.keymap_items.new('wm.context_toggle', 'G', 'PRESS')
-kmi.properties.data_path = 'space_data.show_floor'
+kmi.properties.data_path = 'space_data.overlay.show_floor'
# Map Animation Channels
km = kc.keymaps.new('Animation Channels', space_type='EMPTY', region_type='WINDOW', modal=False)
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 7328f28bfad..3a35990fd60 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3546,9 +3546,9 @@ class VIEW3D_PT_shading(Panel):
if shading.type == 'SOLID':
col.separator()
- col.row().prop(shading, "single_color_mode", expand=True)
+ col.row().prop(shading, "color_type", expand=True)
- if shading.single_color_mode == 'SINGLE':
+ if shading.color_type == 'SINGLE':
col.separator()
col.row().prop(shading, "single_color", text="")
@@ -3580,7 +3580,6 @@ class VIEW3D_PT_overlay(Panel):
view = context.space_data
overlay = view.overlay
- shading = view.shading
scene = context.scene
display_all = overlay.show_overlays
@@ -3606,30 +3605,30 @@ class VIEW3D_PT_overlay(Panel):
col = layout.column()
col.active = display_all
- col.prop(view, "show_outline_selected")
- col.prop(view, "show_all_objects_origin")
- col.prop(view, "show_relationship_lines")
- col.prop(view, "show_face_orientation_overlay")
+ 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 = layout.column()
col.active = display_all
split = col.split(percentage=0.55)
- split.prop(view, "show_floor", text="Grid Floor")
+ split.prop(overlay, "show_floor", text="Grid Floor")
row = split.row(align=True)
- row.prop(view, "show_axis_x", text="X", toggle=True)
- row.prop(view, "show_axis_y", text="Y", toggle=True)
- row.prop(view, "show_axis_z", text="Z", toggle=True)
+ row.prop(overlay, "show_axis_x", text="X", toggle=True)
+ row.prop(overlay, "show_axis_y", text="Y", toggle=True)
+ row.prop(overlay, "show_axis_z", text="Z", toggle=True)
sub = col.column(align=True)
- sub.active = bool(view.show_floor or view.region_quadviews or not view.region_3d.is_perspective)
+ sub.active = bool(overlay.show_floor or view.region_quadviews or not view.region_3d.is_perspective)
subsub = sub.column(align=True)
- subsub.active = view.show_floor
- subsub.prop(view, "grid_lines", text="Lines")
- sub.prop(view, "grid_scale", text="Scale")
+ subsub.active = overlay.show_floor
+ subsub.prop(overlay, "grid_lines", text="Lines")
+ sub.prop(overlay, "grid_scale", text="Scale")
subsub = sub.column(align=True)
subsub.active = scene.unit_settings.system == 'NONE'
- subsub.prop(view, "grid_subdivisions", text="Subdivisions")
+ subsub.prop(overlay, "grid_subdivisions", text="Subdivisions")
class VIEW3D_PT_quad_view(Panel):