[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41822] trunk/blender: make ocean rna more consistent with existing rna names

Campbell Barton ideasman42 at gmail.com
Mon Nov 14 08:18:33 CET 2011


Revision: 41822
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41822
Author:   campbellbarton
Date:     2011-11-14 07:18:32 +0000 (Mon, 14 Nov 2011)
Log Message:
-----------
make ocean rna more consistent with existing rna names

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/properties_data_modifier.py
    trunk/blender/source/blender/makesrna/intern/rna_modifier.c

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_data_modifier.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_data_modifier.py	2011-11-14 07:07:59 UTC (rev 41821)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_data_modifier.py	2011-11-14 07:18:32 UTC (rev 41822)
@@ -415,7 +415,7 @@
             row.label()
 
     def OCEAN(self, layout, ob, md):
-        if not md.build_enabled:
+        if not md.is_build_enabled:
             layout.label("Built without OceanSim modifier")
             return
 
@@ -441,7 +441,7 @@
         col = split.column()
         col.prop(md, "choppiness")
         col.prop(md, "wave_scale", text="Scale")
-        col.prop(md, "smallest_wave")
+        col.prop(md, "wave_scale_min")
         col.prop(md, "wind_velocity")
 
         col = split.column()
@@ -449,16 +449,16 @@
         sub = col.column()
         sub.active = md.wave_alignment > 0
         sub.prop(md, "wave_direction", text="Direction")
-        sub.prop(md, "damp")
+        sub.prop(md, "damping")
 
         layout.separator()
 
-        layout.prop(md, "generate_normals")
+        layout.prop(md, "use_normals")
 
         row = layout.row()
-        row.prop(md, "generate_foam")
+        row.prop(md, "use_foam")
         sub = row.row()
-        sub.active = md.generate_foam
+        sub.active = md.use_foam
         sub.prop(md, "foam_coverage", text="Coverage")
 
         layout.separator()
@@ -472,8 +472,8 @@
         split.enabled = not md.is_cached
 
         col = split.column(align=True)
-        col.prop(md, "bake_start", text="Start")
-        col.prop(md, "bake_end", text="End")
+        col.prop(md, "frame_start", text="Start")
+        col.prop(md, "frame_end", text="End")
 
         col = split.column(align=True)
         col.label(text="Cache path:")

Modified: trunk/blender/source/blender/makesrna/intern/rna_modifier.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_modifier.c	2011-11-14 07:07:59 UTC (rev 41821)
+++ trunk/blender/source/blender/makesrna/intern/rna_modifier.c	2011-11-14 07:18:32 UTC (rev 41822)
@@ -652,13 +652,13 @@
 		md->projectors[a]= NULL;
 }
 
-static int rna_OceanModifier_build_enabled_get(PointerRNA *UNUSED(ptr))
+static int rna_OceanModifier_is_build_enabled_get(PointerRNA *UNUSED(ptr))
 {
-	#ifdef WITH_OCEANSIM
+#ifdef WITH_OCEANSIM
 	return 1;
-	#else // WITH_OCEANSIM
+#else // WITH_OCEANSIM
 	return 0;
-	#endif // WITH_OCEANSIM
+#endif // WITH_OCEANSIM
 }
 
 static void rna_OceanModifier_init_update(Main *bmain, Scene *scene, PointerRNA *ptr)
@@ -2879,9 +2879,9 @@
 	RNA_def_struct_sdna(srna, "OceanModifierData");
 	RNA_def_struct_ui_icon(srna, ICON_MOD_FLUIDSIM);
 	
-	/* General check if OceanSim modifier code is enabled */
-	prop= RNA_def_property(srna, "build_enabled", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_funcs(prop, "rna_OceanModifier_build_enabled_get", NULL);
+	/* General check if blender was built with OceanSim modifier support */
+	prop= RNA_def_property(srna, "is_build_enabled", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_funcs(prop, "rna_OceanModifier_is_build_enabled_get", NULL);
 	RNA_def_property_clear_flag(prop, PROP_EDITABLE);
 	RNA_def_property_ui_text(prop, "Build Enabled", "True if the OceanSim modifier is enabled in this build");
 	
@@ -2913,13 +2913,13 @@
 	RNA_def_property_ui_text(prop, "Repeat Y", "Repetitions of the generated surface in Y");
 	RNA_def_property_update(prop, 0, "rna_OceanModifier_topology_update");
 
-	prop= RNA_def_property(srna, "generate_normals", PROP_BOOLEAN, PROP_NONE);
+	prop= RNA_def_property(srna, "use_normals", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_OCEAN_GENERATE_NORMALS);
 	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
 	RNA_def_property_ui_text(prop, "Generate Normals", "Outputs normals for bump mapping - disabling can speed up performance if its not needed");
 	RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
 	
-	prop= RNA_def_property(srna, "generate_foam", PROP_BOOLEAN, PROP_NONE);
+	prop= RNA_def_property(srna, "use_foam", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_OCEAN_GENERATE_FOAM);
 	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
 	RNA_def_property_ui_text(prop, "Generate Foam", "Generates foam mask as a vertex color channel");
@@ -2945,13 +2945,13 @@
 	RNA_def_property_ui_text(prop, "Wind Velocity", "Wind speed (m/s)");
 	RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
 	
-	prop= RNA_def_property(srna, "damp", PROP_FLOAT, PROP_FACTOR);
+	prop= RNA_def_property(srna, "damping", PROP_FLOAT, PROP_FACTOR);
 	RNA_def_property_float_sdna(prop, NULL, "damp");
 	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
 	RNA_def_property_ui_text(prop, "Damping", "Damp reflected waves going in opposite direction to the wind");
 	RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
 	
-	prop= RNA_def_property(srna, "smallest_wave", PROP_FLOAT, PROP_DISTANCE);
+	prop= RNA_def_property(srna, "wave_scale_min", PROP_FLOAT, PROP_DISTANCE);
 	RNA_def_property_float_sdna(prop, NULL, "smallest_wave");
 	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
 	RNA_def_property_range(prop, 0.0, FLT_MAX);
@@ -3012,13 +3012,13 @@
 	RNA_def_property_ui_text(prop, "Random Seed", "");
 	RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
 	
-	prop= RNA_def_property(srna, "bake_start", PROP_INT, PROP_UNSIGNED);
+	prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_UNSIGNED);
 	RNA_def_property_int_sdna(prop, NULL, "bakestart");
 	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
 	RNA_def_property_ui_text(prop, "Bake Start", "");
 	RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
 	
-	prop= RNA_def_property(srna, "bake_end", PROP_INT, PROP_UNSIGNED);
+	prop= RNA_def_property(srna, "frame_end", PROP_INT, PROP_UNSIGNED);
 	RNA_def_property_int_sdna(prop, NULL, "bakeend");
 	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
 	RNA_def_property_ui_text(prop, "Bake End", "");




More information about the Bf-blender-cvs mailing list