Cleanup: RNA boolean names (use prefix conventions)
authorCampbell Barton <ideasman42@gmail.com>
Mon, 11 Feb 2019 06:49:35 +0000 (17:49 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 11 Feb 2019 06:49:35 +0000 (17:49 +1100)
16 files changed:
release/scripts/startup/bl_ui/properties_data_shaderfx.py
release/scripts/startup/bl_ui/properties_particle.py
release/scripts/startup/bl_ui/properties_physics_smoke.py
release/scripts/startup/bl_ui/space_sequencer.py
release/scripts/startup/bl_ui/space_userpref.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
source/blender/makesrna/intern/rna_curve.c
source/blender/makesrna/intern/rna_gpencil_modifier.c
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_sequencer.c
source/blender/makesrna/intern/rna_shader_fx.c
source/blender/makesrna/intern/rna_smoke.c
source/blender/makesrna/intern/rna_speaker.c
source/blender/makesrna/intern/rna_userdef.c

index 8b4bd03..a0cb7e0 100644 (file)
@@ -144,7 +144,7 @@ class DATA_PT_shader_fx(ShaderFxButtonsPanel, Panel):
         layout.prop(fx, "radius")
         layout.prop(fx, "angle")
 
-        layout.prop(fx, "transparent")
+        layout.prop(fx, "use_transparent")
 
     def FX_FLIP(self, layout, fx):
         layout.prop(fx, "flip_horizontal")
index 55b891c..b1d26b4 100644 (file)
@@ -225,7 +225,7 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
                 else:
                     row = split.row()
                     row.enabled = particle_panel_enabled(context, psys)
-                    row.prop(part, "regrow_hair")
+                    row.prop(part, "use_regrow_hair")
                     row.prop(part, "use_advanced_hair")
 
                 if psys is not None and psys.is_edited:
@@ -709,15 +709,15 @@ class PARTICLE_PT_physics_fluid_advanced(ParticleButtonsPanel, Panel):
 
         if fluid.solver == 'DDR':
             sub = col.column()
-            sub.prop(fluid, "repulsion", slider=fluid.factor_repulsion)
-            sub.prop(fluid, "factor_repulsion")
+            sub.prop(fluid, "repulsion", slider=fluid.use_factor_repulsion)
+            sub.prop(fluid, "use_factor_repulsion")
 
-            sub.prop(fluid, "stiff_viscosity", slider=fluid.factor_stiff_viscosity)
-            sub.prop(fluid, "factor_stiff_viscosity")
+            sub.prop(fluid, "stiff_viscosity", slider=fluid.use_factor_stiff_viscosity)
+            sub.prop(fluid, "use_factor_stiff_viscosity")
 
         sub = col.column()
-        sub.prop(fluid, "fluid_radius", slider=fluid.factor_radius)
-        sub.prop(fluid, "factor_radius")
+        sub.prop(fluid, "fluid_radius", slider=fluid.use_factor_radius)
+        sub.prop(fluid, "use_factor_radius")
 
         sub.prop(fluid, "rest_density", slider=fluid.use_factor_density)
         sub.prop(fluid, "use_factor_density")
@@ -821,8 +821,8 @@ class PARTICLE_PT_physics_fluid_springs_advanced(ParticleButtonsPanel, Panel):
         fluid = part.fluid
 
         sub = layout.column()
-        sub.prop(fluid, "rest_length", slider=fluid.factor_rest_length)
-        sub.prop(fluid, "factor_rest_length")
+        sub.prop(fluid, "rest_length", slider=fluid.use_factor_rest_length)
+        sub.prop(fluid, "use_factor_rest_length")
 
 
 class PARTICLE_PT_physics_boids_movement(ParticleButtonsPanel, Panel):
index 1f52f76..9d170d0 100644 (file)
@@ -649,7 +649,7 @@ class PHYSICS_PT_smoke_viewport_display_debug(PhysicButtonsPanel, Panel):
     def draw_header(self, context):
         md = context.smoke.domain_settings
 
-        self.layout.prop(md, "display_velocity", text="")
+        self.layout.prop(md, "show_velocity", text="")
 
     def draw(self, context):
         layout = self.layout
@@ -659,7 +659,7 @@ class PHYSICS_PT_smoke_viewport_display_debug(PhysicButtonsPanel, Panel):
         domain = context.smoke.domain_settings
 
         col = flow.column()
-        col.enabled = domain.display_velocity
+        col.enabled = domain.show_velocity
         col.prop(domain, "vector_display_type", text="Display As")
         col.prop(domain, "vector_scale")
 
index a757bb4..9f748a9 100644 (file)
@@ -742,7 +742,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
                     layout.prop(strip, "speed_factor")
                 else:
                     layout.prop(strip, "speed_factor", text="Frame Number")
-                    layout.prop(strip, "scale_to_length")
+                    layout.prop(strip, "use_scale_to_length")
 
         elif strip.type == 'TRANSFORM':
             layout = self.layout
index c36a0f7..58582ca 100644 (file)
@@ -1983,14 +1983,14 @@ class USERPREF_PT_studiolight_light_editor(Panel):
         system = prefs.system
 
         row = layout.row()
-        row.prop(system, "edit_studio_light", toggle=True)
+        row.prop(system, "use_studio_light_edit", toggle=True)
         row.operator("wm.studiolight_new", text="Save as Studio light", icon='FILE_TICK')
 
         layout.separator()
 
         layout.use_property_split = True
         column = layout.split()
-        column.active = system.edit_studio_light
+        column.active = system.use_studio_light_edit
 
         light = system.solid_lights[0]
         colsplit = column.split(factor=0.85)
index 0111e49..a644be0 100644 (file)
@@ -4446,11 +4446,11 @@ class VIEW3D_PT_shading_lighting(Panel):
                 prefs = context.preferences
                 system = prefs.system
 
-                if not system.edit_studio_light:
+                if not system.use_studio_light_edit:
                     sub.scale_y = 0.6  # smaller studiolight preview
                     sub.template_icon_view(shading, "studio_light", scale_popup=3.0)
                 else:
-                    sub.prop(system, "edit_studio_light", text="Disable Studio Light Edit", icon='NONE', toggle=True)
+                    sub.prop(system, "use_studio_light_edit", text="Disable Studio Light Edit", icon='NONE', toggle=True)
 
                 col = split.column()
                 col.operator("wm.studiolight_userpref_show", emboss=False, text="", icon='PREFERENCES')
index 3bfd224..2ba84ac 100644 (file)
@@ -112,7 +112,7 @@ class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel):
         row.active = ob.data.use_mirror_x
         row.prop(mesh, "use_mirror_topology")
 
-        layout.prop(tool_settings, "edge_path_live_unwrap")
+        layout.prop(tool_settings, "use_edge_path_live_unwrap")
         layout.prop(tool_settings, "use_mesh_automerge")
 
         layout.prop(tool_settings, "double_threshold")
index ad438f5..0d17251 100644 (file)
@@ -1205,7 +1205,7 @@ static void rna_def_charinfo(BlenderRNA *brna)
 
        /* probably there is no reason to expose this */
 #if 0
-       prop = RNA_def_property(srna, "wrap", PROP_BOOLEAN, PROP_NONE);
+       prop = RNA_def_property(srna, "use_wrap", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_CHINFO_WRAP);
        RNA_def_property_ui_text(prop, "Wrap", "");
        RNA_def_property_update(prop, 0, "rna_Curve_update_data"); */
index 083ba47..2bf9487 100644 (file)
@@ -1391,7 +1391,7 @@ static void rna_def_modifier_gpencilmirror(BlenderRNA *brna)
        RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK);
        RNA_def_property_update(prop, 0, "rna_GpencilModifier_dependency_update");
 
-       prop = RNA_def_property(srna, "clip", PROP_BOOLEAN, PROP_NONE);
+       prop = RNA_def_property(srna, "use_clip", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_MIRROR_CLIPPING);
        RNA_def_property_ui_text(prop, "Clip", "Clip points");
        RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
index e9a6d03..7abfe80 100644 (file)
@@ -1701,7 +1701,7 @@ static void rna_def_fluid_settings(BlenderRNA *brna)
 
        /* Factor flags */
 
-       prop = RNA_def_property(srna, "factor_repulsion", PROP_BOOLEAN, PROP_NONE);
+       prop = RNA_def_property(srna, "use_factor_repulsion", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", SPH_FAC_REPULSION);
        RNA_def_property_ui_text(prop, "Factor Repulsion", "Repulsion is a factor of stiffness");
        RNA_def_property_update(prop, 0, "rna_Particle_reset");
@@ -1712,17 +1712,17 @@ static void rna_def_fluid_settings(BlenderRNA *brna)
                                 "Density is calculated as a factor of default density (depends on particle size)");
        RNA_def_property_update(prop, 0, "rna_Particle_reset");
 
-       prop = RNA_def_property(srna, "factor_radius", PROP_BOOLEAN, PROP_NONE);
+       prop = RNA_def_property(srna, "use_factor_radius", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", SPH_FAC_RADIUS);
        RNA_def_property_ui_text(prop, "Factor Radius", "Interaction radius is a factor of 4 * particle size");
        RNA_def_property_update(prop, 0, "rna_Particle_reset");
 
-       prop = RNA_def_property(srna, "factor_stiff_viscosity", PROP_BOOLEAN, PROP_NONE);
+       prop = RNA_def_property(srna, "use_factor_stiff_viscosity", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", SPH_FAC_VISCOSITY);
        RNA_def_property_ui_text(prop, "Factor Stiff Viscosity", "Stiff viscosity is a factor of normal viscosity");
        RNA_def_property_update(prop, 0, "rna_Particle_reset");
 
-       prop = RNA_def_property(srna, "factor_rest_length", PROP_BOOLEAN, PROP_NONE);
+       prop = RNA_def_property(srna, "use_factor_rest_length", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", SPH_FAC_REST_LENGTH);
        RNA_def_property_ui_text(prop, "Factor Rest Length", "Spring rest length is a factor of 2 * particle size");
        RNA_def_property_update(prop, 0, "rna_Particle_reset");
@@ -2125,7 +2125,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Multi React", "React multiple times");
        RNA_def_property_update(prop, 0, "rna_Particle_reset");
 
-       prop = RNA_def_property(srna, "regrow_hair", PROP_BOOLEAN, PROP_NONE);
+       prop = RNA_def_property(srna, "use_regrow_hair", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_HAIR_REGROW);
        RNA_def_property_ui_text(prop, "Regrow", "Regrow hair for each frame");
        RNA_def_property_update(prop, 0, "rna_Particle_redo");
index 8c1f865..bc48192 100644 (file)
@@ -2816,7 +2816,7 @@ static void rna_def_tool_settings(BlenderRNA  *brna)
        RNA_def_property_enum_items(prop, edge_tag_items);
        RNA_def_property_ui_text(prop, "Edge Tag Mode", "The edge flag to tag when selecting the shortest path");
 
-       prop = RNA_def_property(srna, "edge_path_live_unwrap", PROP_BOOLEAN, PROP_NONE);
+       prop = RNA_def_property(srna, "use_edge_path_live_unwrap", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "edge_mode_live_unwrap", 1);
        RNA_def_property_ui_text(prop, "Live Unwrap", "Changing edges seam re-calculates UV unwrap");
 
index 2f1d7a5..d1d1828 100644 (file)
@@ -2372,7 +2372,7 @@ static void rna_def_speed_control(StructRNA *srna)
        RNA_def_property_ui_text(prop, "Use as speed", "Interpret the value as speed instead of a frame number");
        RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
 
-       prop = RNA_def_property(srna, "scale_to_length", PROP_BOOLEAN, PROP_NONE);
+       prop = RNA_def_property(srna, "use_scale_to_length", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flags", SEQ_SPEED_COMPRESS_IPO_Y);
        RNA_def_property_ui_text(prop, "Scale to length", "Scale values from 0.0 to 1.0 to target sequence length");
        RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
index 07f56d7..664e17a 100644 (file)
@@ -568,7 +568,7 @@ static void rna_def_shader_fx_swirl(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Angle", "Angle of rotation");
        RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_ShaderFx_update");
 
-       prop = RNA_def_property(srna, "transparent", PROP_BOOLEAN, PROP_NONE);
+       prop = RNA_def_property(srna, "use_transparent", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", FX_SWIRL_MAKE_TRANSPARENT);
        RNA_def_property_ui_text(prop, "Transparent", "Make image transparent outside of radius");
        RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_ShaderFx_update");
index d4996d7..6598a55 100644 (file)
@@ -861,7 +861,7 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Interpolation", "Interpolation method to use for smoke/fire volumes in solid mode");
        RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
 
-       prop = RNA_def_property(srna, "display_velocity", PROP_BOOLEAN, PROP_NONE);
+       prop = RNA_def_property(srna, "show_velocity", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "draw_velocity", 0);
        RNA_def_property_ui_text(prop, "Display Velocity", "Toggle visualization of the velocity field as needles");
        RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
index 66cc991..c01ac95 100644 (file)
@@ -57,7 +57,7 @@ static void rna_def_speaker(BlenderRNA *brna)
        RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_SOUND);
        /* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */
 
-       prop = RNA_def_property(srna, "relative", PROP_BOOLEAN, PROP_NONE);
+       prop = RNA_def_property(srna, "use_relative", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", SPK_RELATIVE);
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
        RNA_def_property_ui_text(prop, "Relative", "Whether the source is relative to the camera or not");
index 38ce8a8..603a633 100644 (file)
@@ -4432,7 +4432,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Ambient Color", "Color of the ambient light that uniformly lit the scene");
        RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
 
-       prop = RNA_def_property(srna, "edit_studio_light", PROP_BOOLEAN, PROP_NONE);
+       prop = RNA_def_property(srna, "use_studio_light_edit", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "edit_studio_light", 1);
        RNA_def_property_ui_text(prop, "Edit Studio Light",
                                       "View the result of the studio light editor in the viewport");