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 8b4bd03bc6d0730f64fd770cc12f72030adb3e66..a0cb7e0fabd476632028d22a4b356e0cf955abd5 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 55b891c55f596aaa3ae714855d9eff62d66e0c3b..b1d26b4dbd44a12409a963a7765a0ace71758b92 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 1f52f768676a2b50beb052ba25bc2a722f7ee72a..9d170d07c69153ae547399376aad8b3e320de0fe 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 a757bb4c21dcf501a0a2aeb3363607f5760fb749..9f748a923a59af0ce718c968e9680ccd806149c7 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 c36a0f7a354a1e39a5737f615e070c648abba74e..58582cacc249773b79fab17bb0741f83ac1d6fc7 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 0111e49dbf65ac48743f455eb331bf1113a8562b..a644be0abf003374f1d1a119de7dcaa5e3efde3b 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 3bfd2242a7c4e3e60202220337a46d1c253d815a..2ba84ac166e18600b1bb05b47fa2b0583e8d4d27 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 ad438f5d25f98b09d1cee42ba9a960cbbd8c5cd6..0d17251454a00a701f924390fe25eaf72dea1bba 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 083ba47f59076c76d61f6d66a92be488d4b5b46b..2bf9487641c19e4f71d751c8d2866b224b951a2b 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 e9a6d03f07ec06824898ebfd56d2002fddf7ab08..7abfe80bd74502b5614cf705c193725b6b66af3f 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 8c1f86591335efe0e31033bc44d50b7a35d52723..bc48192aa4d5c99311aba2e9c3d4e98fd448b89c 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 2f1d7a526061ba77b02ba5da7629e6da0b54d8c1..d1d182856e804dbbabd09749dfb9de0787cca59e 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 07f56d70e643b5daf0cc88ee17124a6700b7ee66..664e17af3754a2997a5034ecba8251a3ca62dc5f 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 d4996d7a46a3b33cac5ff3daa62771a854b6ad68..6598a55d40dbcbdb3329a3aa571848e40537b5da 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 66cc9919f957e2dc9f8a9b85cd0a7514e831d882..c01ac95dc14d3d7b45618b2a2e53fc2eadf16aec 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 38ce8a808a6c2b0926c0ff7e68c26a887d3ed52b..603a633dc29f9a2be64a214f873e9001aed38d52 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");