[Bf-blender-cvs] [bc95c7a3ea6] blender2.8: Cleanup: remove num argument prefix

Campbell Barton noreply at git.blender.org
Sun Jul 1 09:24:43 CEST 2018


Commit: bc95c7a3ea6fbcfbee43bd61c0a709de0d0daf26
Author: Campbell Barton
Date:   Sun Jul 1 09:23:51 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBbc95c7a3ea6fbcfbee43bd61c0a709de0d0daf26

Cleanup: remove num argument prefix

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

M	intern/cycles/blender/addon/ui.py
M	release/scripts/startup/bl_ui/properties_data_camera.py
M	release/scripts/startup/bl_ui/properties_object.py
M	release/scripts/startup/bl_ui/properties_physics_field.py
M	release/scripts/startup/bl_ui/space_dopesheet.py
M	source/blender/editors/interface/interface_layout.c
M	source/blender/makesrna/intern/rna_ui_api.c

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

diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 7a5605e1542..f8bc9ca8512 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -847,7 +847,7 @@ class CYCLES_CAMERA_PT_dof_aperture(CyclesButtonsPanel, Panel):
     def draw(self, context):
         layout = self.layout
         layout.use_property_split = True
-        flow = layout.grid_flow(row_major=True, num_columns=0, even_columns=True, even_rows=False, align=False)
+        flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
 
         cam = context.camera
         ccam = cam.cycles
@@ -878,7 +878,7 @@ class CYCLES_CAMERA_PT_dof_viewport(CyclesButtonsPanel, Panel):
     def draw(self, context):
         layout = self.layout
         layout.use_property_split = True
-        flow = layout.grid_flow(row_major=True, num_columns=0, even_columns=True, even_rows=False, align=False)
+        flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
 
         cam = context.camera
         dof_options = cam.gpu_dof
@@ -1539,7 +1539,7 @@ class CYCLES_RENDER_PT_bake(CyclesButtonsPanel, Panel):
     def draw(self, context):
         layout = self.layout
         layout.use_property_split = True
-        layout.use_property_decorate = False  # No animation.
+        layout.use_property_decorate = False  # No animation.
 
         scene = context.scene
         cscene = scene.cycles
@@ -1568,7 +1568,7 @@ class CYCLES_RENDER_PT_bake(CyclesButtonsPanel, Panel):
             if cscene.bake_type == 'NORMAL':
                 col.prop(cbk, "normal_space", text="Space")
 
-                sub = col.column(align=True)
+                sub = col.column(align=True)
                 sub.prop(cbk, "normal_r", text="Swizzle R")
                 sub.prop(cbk, "normal_g", text="G")
                 sub.prop(cbk, "normal_b", text="B")
@@ -1590,7 +1590,7 @@ class CYCLES_RENDER_PT_bake(CyclesButtonsPanel, Panel):
 
             elif cscene.bake_type in {'DIFFUSE', 'GLOSSY', 'TRANSMISSION', 'SUBSURFACE'}:
                 row = col.row(align=True)
-                row.use_property_split = False
+                row.use_property_split = False
                 row.prop(cbk, "use_pass_direct", toggle=True)
                 row.prop(cbk, "use_pass_indirect", toggle=True)
                 row.prop(cbk, "use_pass_color", toggle=True)
@@ -1609,12 +1609,12 @@ class CYCLES_RENDER_PT_bake(CyclesButtonsPanel, Panel):
             sub.prop(cbk, "use_cage", text="Cage")
             if cbk.use_cage:
                 sub.prop(cbk, "cage_extrusion", text="Extrusion")
-                sub.prop_search(cbk, "cage_object", scene, "objects", text="Cage Object")
+                sub.prop_search(cbk, "cage_object", scene, "objects", text="Cage Object")
             else:
                 sub.prop(cbk, "cage_extrusion", text="Ray Distance")
 
-            layout.separator()
-
+            layout.separator()
+
             layout.operator("object.bake", icon='RENDER_STILL').type = cscene.bake_type
 
 
diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py
index 10709676b85..3b5f21d616e 100644
--- a/release/scripts/startup/bl_ui/properties_data_camera.py
+++ b/release/scripts/startup/bl_ui/properties_data_camera.py
@@ -242,7 +242,7 @@ class DATA_PT_camera_dof_aperture(CameraButtonsPanel, Panel):
         cam = context.camera
         dof_options = cam.gpu_dof
 
-        flow = layout.grid_flow(row_major=True, num_columns=0, even_columns=True, even_rows=False, align=False)
+        flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
 
         if context.engine == 'BLENDER_EEVEE':
             col = flow.column()
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index 17034689528..63b708ae059 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -50,7 +50,7 @@ class OBJECT_PT_transform(ObjectButtonsPanel, Panel):
         layout = self.layout
         layout.use_property_split = True
 
-        flow = layout.grid_flow(row_major=True, num_columns=0, even_columns=True, even_rows=False, align=False)
+        flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
 
         ob = context.object
 
@@ -106,7 +106,7 @@ class OBJECT_PT_delta_transform(ObjectButtonsPanel, Panel):
     def draw(self, context):
         layout = self.layout
         layout.use_property_split = True
-        flow = layout.grid_flow(row_major=True, num_columns=0, even_columns=True, even_rows=True, align=False)
+        flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=True, align=False)
 
         ob = context.object
 
@@ -136,7 +136,7 @@ class OBJECT_PT_relations(ObjectButtonsPanel, Panel):
     def draw(self, context):
         layout = self.layout
         layout.use_property_split = True
-        flow = layout.grid_flow(row_major=True, num_columns=0, even_columns=True, even_rows=False, align=False)
+        flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
 
         ob = context.object
 
@@ -222,7 +222,7 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel):
     def draw(self, context):
         layout = self.layout
         layout.use_property_split = True
-        flow = layout.grid_flow(row_major=True, num_columns=0, even_columns=True, even_rows=False, align=False)
+        flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
 
         obj = context.object
         obj_type = obj.type
@@ -285,7 +285,7 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):
         row.prop(ob, "dupli_type", expand=True)
 
         layout.use_property_split = True
-        flow = layout.grid_flow(row_major=True, num_columns=0, even_columns=True, even_rows=False, align=False)
+        flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
 
         if ob.dupli_type == 'FRAMES':
 
diff --git a/release/scripts/startup/bl_ui/properties_physics_field.py b/release/scripts/startup/bl_ui/properties_physics_field.py
index 7683c953340..3b01015047f 100644
--- a/release/scripts/startup/bl_ui/properties_physics_field.py
+++ b/release/scripts/startup/bl_ui/properties_physics_field.py
@@ -212,7 +212,7 @@ class PHYSICS_PT_collision_particle(PhysicButtonsPanel, Panel):
         md = context.collision
 
         layout.use_property_split = True
-        flow = layout.grid_flow(row_major=True, num_columns=0, even_columns=True, even_rows=False, align=False)
+        flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
 
         coll = md.settings
 
@@ -252,7 +252,7 @@ class PHYSICS_PT_collision_softbody(PhysicButtonsPanel, Panel):
         layout = self.layout
 
         layout.use_property_split = True
-        flow = layout.grid_flow(row_major=True, num_columns=0, even_columns=True, even_rows=False, align=False)
+        flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
 
         md = context.collision
         coll = md.settings
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index 0260864cfb3..22c1f17217e 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -120,7 +120,7 @@ class DopesheetFilterPopoverBase:
 
         # datablock filters
         layout.label("Include From Types:")
-        flow = layout.grid_flow(row_major=True, num_columns=2, even_rows=False, align=False)
+        flow = layout.grid_flow(row_major=True, columns=2, even_rows=False, align=False)
 
         flow.prop(dopesheet, "show_scenes", text="Scenes")
         flow.prop(dopesheet, "show_worlds", text="Worlds")
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 63f51b991ae..a89f91a6b59 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -186,7 +186,7 @@ typedef struct uiLayoutItemGridFlow {
 	/* If positive, absolute fixed number of columns.
 	 * If 0, fully automatic (based on available width).
 	 * If negative, automatic but only generates number of columns/rows multiple of given (absolute) value. */
-	int num_columns;
+	int columns_len;
 
 	/* Pure internal runtime storage. */
 	int tot_items, tot_columns, tot_rows;
@@ -3200,8 +3200,8 @@ static void ui_litem_estimate_grid_flow(uiLayout *litem)
 		/* Even in varying column width case, we fix our columns number from weighted average width of items,
 		 * a proper solving of required width would be too costly, and this should give reasonably good results
 		 * in all resonable cases... */
-		if (gflow->num_columns > 0) {
-			gflow->tot_columns = gflow->num_columns;
+		if (gflow->columns_len > 0) {
+			gflow->tot_columns = gflow->columns_len;
 		}
 		else {
 			if (avg_w == 0.0f) {
@@ -3218,7 +3218,7 @@ static void ui_litem_estimate_grid_flow(uiLayout *litem)
 		 * Note that modulo does not prevent ending with fewer columns/rows than modulo, if mandatory
 		 * to avoid empty column/row. */
 		{
-			const int modulo = (gflow->num_columns < -1) ? -gflow->num_columns : 0;
+			const int modulo = (gflow->columns_len < -1) ? -gflow->columns_len : 0;
 			const int step = modulo ? modulo : 1;
 
 			if (gflow->row_major) {
@@ -3580,7 +3580,7 @@ uiLayout *uiLayoutColumnFlow(uiLayout *layout, int number, int align)
 }
 
 uiLayout *uiLayoutGridFlow(
-        uiLayout *layout, int row_major, int num_columns, int even_columns, int even_rows, int align)
+        uiLayout *layout, int row_major, int columns_len, int even_columns, int even_rows, int align)
 {
 	uiLayoutItemGridFlow *flow;
 
@@ -3590,7 +3590,7 @@ uiLayout *uiLayoutGridFlow(
 
 	flow->litem.space = (flow->litem.align) ? 0 : lay

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list