[Bf-blender-cvs] [e0a4dc6a794] blender2.8: UI / Python: rename X-Ray to In Front, Draw to Display.

Brecht Van Lommel noreply at git.blender.org
Thu Sep 6 13:32:33 CEST 2018


Commit: e0a4dc6a794670429dc12cd78ae9d19e50ac2a8e
Author: Brecht Van Lommel
Date:   Mon Sep 3 18:58:41 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBe0a4dc6a794670429dc12cd78ae9d19e50ac2a8e

UI / Python: rename X-Ray to In Front, Draw to Display.

See T56648.

===================================================================

M	doc/python_api/examples/bpy.types.Menu.3.py
M	intern/cycles/blender/blender_curves.cpp
M	release/scripts/startup/bl_operators/object_quick_effects.py
M	release/scripts/startup/bl_operators/rigidbody.py
M	release/scripts/startup/bl_ui/properties_data_armature.py
M	release/scripts/startup/bl_ui/properties_data_camera.py
M	release/scripts/startup/bl_ui/properties_data_empty.py
M	release/scripts/startup/bl_ui/properties_data_gpencil.py
M	release/scripts/startup/bl_ui/properties_data_lightprobe.py
M	release/scripts/startup/bl_ui/properties_mask_common.py
M	release/scripts/startup/bl_ui/properties_object.py
M	release/scripts/startup/bl_ui/properties_particle.py
M	release/scripts/startup/bl_ui/properties_physics_smoke.py
M	release/scripts/startup/bl_ui/properties_render.py
M	release/scripts/startup/bl_ui/space_image.py
M	release/scripts/startup/bl_ui/space_sequencer.py
M	release/scripts/startup/bl_ui/space_view3d.py
M	release/scripts/startup/bl_ui/space_view3d_toolbar.py
M	release/scripts/templates_py/builtin_keyingset.py
M	source/blender/editors/space_view3d/view3d_gizmo_camera.c
M	source/blender/makesrna/intern/rna_armature.c
M	source/blender/makesrna/intern/rna_camera.c
M	source/blender/makesrna/intern/rna_gpencil.c
M	source/blender/makesrna/intern/rna_object.c
M	source/blender/makesrna/intern/rna_particle.c
M	source/blender/makesrna/intern/rna_scene.c
M	source/blender/makesrna/intern/rna_sculpt_paint.c
M	source/blender/makesrna/intern/rna_smoke.c
M	source/blender/makesrna/intern/rna_space.c
M	tests/python/bl_mesh_modifiers.py

===================================================================

diff --git a/doc/python_api/examples/bpy.types.Menu.3.py b/doc/python_api/examples/bpy.types.Menu.3.py
index 9fe39535bbf..285052f2e20 100644
--- a/doc/python_api/examples/bpy.types.Menu.3.py
+++ b/doc/python_api/examples/bpy.types.Menu.3.py
@@ -7,7 +7,7 @@ to perform the common task of managing presets.
 
 This example shows how you can add a preset menu.
 
-This example uses the object draw options,
+This example uses the object display options,
 however you can use properties defined by your own scripts too.
 """
 
@@ -16,18 +16,18 @@ from bpy.types import Operator, Menu
 from bl_operators.presets import AddPresetBase
 
 
-class OBJECT_MT_draw_presets(Menu):
-    bl_label = "Object Draw Presets"
-    preset_subdir = "object/draw"
+class OBJECT_MT_display_presets(Menu):
+    bl_label = "Object Display Presets"
+    preset_subdir = "object/display"
     preset_operator = "script.execute_preset"
-    draw = Menu.draw_preset
+    display = Menu.display_preset
 
 
-class AddPresetObjectDraw(AddPresetBase, Operator):
-    '''Add a Object Draw Preset'''
-    bl_idname = "camera.object_draw_preset_add"
-    bl_label = "Add Object Draw Preset"
-    preset_menu = "OBJECT_MT_draw_presets"
+class AddPresetObjectDisplay(AddPresetBase, Operator):
+    '''Add a Object Display Preset'''
+    bl_idname = "camera.object_display_preset_add"
+    bl_label = "Add Object Display Preset"
+    preset_menu = "OBJECT_MT_display_presets"
 
     # variable used for all preset values
     preset_defines = [
@@ -36,31 +36,31 @@ class AddPresetObjectDraw(AddPresetBase, Operator):
 
     # properties to store in the preset
     preset_values = [
-        "obj.draw_type",
+        "obj.display_type",
         "obj.show_bounds",
-        "obj.draw_bounds_type",
+        "obj.display_bounds_type",
         "obj.show_name",
         "obj.show_axis",
         "obj.show_wire",
     ]
 
     # where to store the preset
-    preset_subdir = "object/draw"
+    preset_subdir = "object/display"
 
 
-# Draw into an existing panel
+# Display into an existing panel
 def panel_func(self, context):
     layout = self.layout
 
     row = layout.row(align=True)
-    row.menu(OBJECT_MT_draw_presets.__name__, text=OBJECT_MT_draw_presets.bl_label)
-    row.operator(AddPresetObjectDraw.bl_idname, text="", icon='ZOOMIN')
-    row.operator(AddPresetObjectDraw.bl_idname, text="", icon='ZOOMOUT').remove_active = True
+    row.menu(OBJECT_MT_display_presets.__name__, text=OBJECT_MT_display_presets.bl_label)
+    row.operator(AddPresetObjectDisplay.bl_idname, text="", icon='ZOOMIN')
+    row.operator(AddPresetObjectDisplay.bl_idname, text="", icon='ZOOMOUT').remove_active = True
 
 
 classes = (
-    OBJECT_MT_draw_presets,
-    AddPresetObjectDraw,
+    OBJECT_MT_display_presets,
+    AddPresetObjectDisplay,
 )
 
 
diff --git a/intern/cycles/blender/blender_curves.cpp b/intern/cycles/blender/blender_curves.cpp
index a1fd153b4fd..0bf90297263 100644
--- a/intern/cycles/blender/blender_curves.cpp
+++ b/intern/cycles/blender/blender_curves.cpp
@@ -134,9 +134,9 @@ static bool ObtainCacheParticleData(Mesh *mesh,
 
 			if((b_part.render_type() == BL::ParticleSettings::render_type_PATH) && (b_part.type() == BL::ParticleSettings::type_HAIR)) {
 				int shader = clamp(b_part.material()-1, 0, mesh->used_shaders.size()-1);
-				int draw_step = background ? b_part.render_step() : b_part.draw_step();
+				int display_step = background ? b_part.render_step() : b_part.display_step();
 				int totparts = b_psys.particles.length();
-				int totchild = background ? b_psys.child_particles.length() : (int)((float)b_psys.child_particles.length() * (float)b_part.draw_percentage() / 100.0f);
+				int totchild = background ? b_psys.child_particles.length() : (int)((float)b_psys.child_particles.length() * (float)b_part.display_percentage() / 100.0f);
 				int totcurves = totchild;
 
 				if(b_part.child_type() == 0 || totchild == 0)
@@ -145,7 +145,7 @@ static bool ObtainCacheParticleData(Mesh *mesh,
 				if(totcurves == 0)
 					continue;
 
-				int ren_step = (1 << draw_step) + 1;
+				int ren_step = (1 << display_step) + 1;
 				if(b_part.kink() == BL::ParticleSettings::kink_SPIRAL)
 					ren_step += b_part.kink_extra_steps();
 
@@ -227,7 +227,7 @@ static bool ObtainCacheParticleUV(Mesh *mesh,
 
 			if((b_part.render_type() == BL::ParticleSettings::render_type_PATH) && (b_part.type() == BL::ParticleSettings::type_HAIR)) {
 				int totparts = b_psys.particles.length();
-				int totchild = background ? b_psys.child_particles.length() : (int)((float)b_psys.child_particles.length() * (float)b_part.draw_percentage() / 100.0f);
+				int totchild = background ? b_psys.child_particles.length() : (int)((float)b_psys.child_particles.length() * (float)b_part.display_percentage() / 100.0f);
 				int totcurves = totchild;
 
 				if(b_part.child_type() == 0 || totchild == 0)
@@ -286,7 +286,7 @@ static bool ObtainCacheParticleVcol(Mesh *mesh,
 
 			if((b_part.render_type() == BL::ParticleSettings::render_type_PATH) && (b_part.type() == BL::ParticleSettings::type_HAIR)) {
 				int totparts = b_psys.particles.length();
-				int totchild = background ? b_psys.child_particles.length() : (int)((float)b_psys.child_particles.length() * (float)b_part.draw_percentage() / 100.0f);
+				int totchild = background ? b_psys.child_particles.length() : (int)((float)b_psys.child_particles.length() * (float)b_part.display_percentage() / 100.0f);
 				int totcurves = totchild;
 
 				if(b_part.child_type() == 0 || totchild == 0)
diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py b/release/scripts/startup/bl_operators/object_quick_effects.py
index 36dc1b46590..d0b0fccf65e 100644
--- a/release/scripts/startup/bl_operators/object_quick_effects.py
+++ b/release/scripts/startup/bl_operators/object_quick_effects.py
@@ -347,7 +347,7 @@ class QuickSmoke(Operator):
             obj.modifiers[-1].flow_settings.smoke_flow_type = self.style
 
             if not self.show_flows:
-                obj.draw_type = 'WIRE'
+                obj.display_type = 'WIRE'
 
             # store bounding box min/max for the domain object
             obj_bb_minmax(obj, min_co, max_co)
@@ -472,7 +472,7 @@ class QuickFluid(Operator):
 
             obj.hide_render = not self.show_flows
             if not self.show_flows:
-                obj.draw_type = 'WIRE'
+                obj.display_type = 'WIRE'
 
             # store bounding box min/max for the domain object
             obj_bb_minmax(obj, min_co, max_co)
diff --git a/release/scripts/startup/bl_operators/rigidbody.py b/release/scripts/startup/bl_operators/rigidbody.py
index 46f3d0a1436..b98538dd20b 100644
--- a/release/scripts/startup/bl_operators/rigidbody.py
+++ b/release/scripts/startup/bl_operators/rigidbody.py
@@ -270,7 +270,7 @@ class ConnectRigidBodies(Operator):
 
         bpy.ops.rigidbody.constraint_add()
         con_obj = context.active_object
-        con_obj.empty_draw_type = 'ARROWS'
+        con_obj.empty_display_type = 'ARROWS'
         con = con_obj.rigid_body_constraint
         con.type = self.con_type
 
diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py
index d29b2d88d98..4f0f18889fc 100644
--- a/release/scripts/startup/bl_ui/properties_data_armature.py
+++ b/release/scripts/startup/bl_ui/properties_data_armature.py
@@ -75,7 +75,7 @@ class DATA_PT_display(ArmatureButtonsPanel, Panel):
         ob = context.object
         arm = context.armature
 
-        layout.row().prop(arm, "draw_type", expand=True)
+        layout.row().prop(arm, "display_type", expand=True)
 
         layout.use_property_split = True
 
@@ -85,7 +85,7 @@ class DATA_PT_display(ArmatureButtonsPanel, Panel):
         col.prop(arm, "show_bone_custom_shapes", text="Shapes")
         col.prop(arm, "show_group_colors", text="Group Colors")
         if ob:
-            col.prop(ob, "show_x_ray", text="In Front")
+            col.prop(ob, "show_in_front", text="In Front")
         col.prop(arm, "use_deform_delay", text="Delay Refresh")
 
 
diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py
index 0ecce3b2f78..e097cd269f3 100644
--- a/release/scripts/startup/bl_ui/properties_data_camera.py
+++ b/release/scripts/startup/bl_ui/properties_data_camera.py
@@ -345,7 +345,7 @@ class DATA_PT_camera_background_image(CameraButtonsPanel, Panel):
                 if has_bg:
                     col = box.column()
                     col.prop(bg, "alpha", slider=True)
-                    col.row().prop(bg, "draw_depth", expand=True)
+                    col.row().prop(bg, "display_depth", expand=True)
 
                     col.row().prop(bg, "frame_method", expand=True)
 
@@ -380,7 +380,7 @@ class DATA_PT_camera_display(CameraButtonsPanel, Panel):
         col = layout.column(align=True)
 
         col.separator()
-        col.prop(cam, "draw_size", text="Size")
+        col.prop(cam, "display_size", text="Size")
         col.separator()
         col.prop(cam, "show_passepartout", text="Passepartout")
         sub = col.column()
diff --git a/release/scripts/startup/bl_ui/properties_data_empty.py b/release/scripts/startup/bl_ui/properties_data_empty.py
index ab12d0f5c5f..013921584f1 100644
--- a/release/scripts/startup/bl_ui/properties_data_empty.py
+++ b/release/scripts/startup/bl_ui/properties_data_empty.py
@@ -40,9 +40,9 @@ class DATA_PT_empty(DataButtonsPanel, Panel):
 
         ob = context.object
 
-        layout.prop(ob, "empty_draw_type", text="Display As")
+        layout.prop(ob, "empty_display_type", text="Display As")
 
-        if ob.empty_draw_type == 'IMAGE':
+        if ob.empty_display_type == 'IMAGE':
             layout.template_ID(ob, "data", open="image.open", unlink="object.unlink_data")
             layout.template_image(ob, "data", ob.image_user, compact=True)
 
@@ -56,7 +56,7 @@ class DATA_PT_empty(DataButtonsPanel, Panel):
 
         layout.separator()
 
-        layout.prop(ob, "empty_draw_size", text="Size")
+        layout.prop(ob, "empty_display_size", text="Size")
 
 
 classes = (
diff --git a/release/scripts/startup/bl_ui/properties_data_gpencil

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list