[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31460] trunk/blender: rna naming mainly forBoids

Campbell Barton ideasman42 at gmail.com
Thu Aug 19 17:49:30 CEST 2010


Revision: 31460
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31460
Author:   campbellbarton
Date:     2010-08-19 17:49:30 +0200 (Thu, 19 Aug 2010)

Log Message:
-----------
rna naming mainly forBoids

Modified Paths:
--------------
    trunk/blender/release/scripts/io/netrender/repath.py
    trunk/blender/release/scripts/ui/properties_particle.py
    trunk/blender/release/scripts/ui/properties_physics_fluid.py
    trunk/blender/source/blender/makesrna/intern/rna_boid.c
    trunk/blender/source/blender/makesrna/intern/rna_fluidsim.c
    trunk/blender/source/blender/makesrna/intern/rna_object_force.c
    trunk/blender/source/blender/makesrna/rna_cleanup/rna_cleaner.py
    trunk/blender/source/blender/makesrna/rna_cleanup/rna_properties.txt

Modified: trunk/blender/release/scripts/io/netrender/repath.py
===================================================================
--- trunk/blender/release/scripts/io/netrender/repath.py	2010-08-19 14:43:52 UTC (rev 31459)
+++ trunk/blender/release/scripts/io/netrender/repath.py	2010-08-19 15:49:30 UTC (rev 31460)
@@ -69,7 +69,7 @@
         point_cache.use_external = False
 
     def processFluid(fluid):
-        new_path = path_map.get(fluid.path, None)
+        new_path = path_map.get(fluid.filepath, None)
         if new_path:
             fluid.path = new_path
     

Modified: trunk/blender/release/scripts/ui/properties_particle.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_particle.py	2010-08-19 14:43:52 UTC (rev 31459)
+++ trunk/blender/release/scripts/ui/properties_particle.py	2010-08-19 15:49:30 UTC (rev 31460)
@@ -472,31 +472,31 @@
 
 
             row = layout.row()
-            row.prop(boids, "allow_flight")
-            row.prop(boids, "allow_land")
-            row.prop(boids, "allow_climb")
+            row.prop(boids, "use_flight")
+            row.prop(boids, "use_land")
+            row.prop(boids, "use_climb")
 
             split = layout.split()
 
             sub = split.column()
             col = sub.column(align=True)
-            col.active = boids.allow_flight
-            col.prop(boids, "air_max_speed")
-            col.prop(boids, "air_min_speed", slider=True)
-            col.prop(boids, "air_max_acc", slider=True)
-            col.prop(boids, "air_max_ave", slider=True)
+            col.active = boids.use_flight
+            col.prop(boids, "air_speed_max")
+            col.prop(boids, "air_speed_min", slider=True)
+            col.prop(boids, "air_acc_max", slider=True)
+            col.prop(boids, "air_ave_max", slider=True)
             col.prop(boids, "air_personal_space")
             row = col.row()
-            row.active = (boids.allow_land or boids.allow_climb) and boids.allow_flight
-            row.prop(boids, "landing_smoothness")
+            row.active = (boids.use_land or boids.allow_climb) and boids.allow_flight
+            row.prop(boids, "land_smooth")
 
             sub = split.column()
             col = sub.column(align=True)
-            col.active = boids.allow_land or boids.allow_climb
-            col.prop(boids, "land_max_speed")
+            col.active = boids.use_land or boids.allow_climb
+            col.prop(boids, "land_speed_max")
             col.prop(boids, "land_jump_speed")
-            col.prop(boids, "land_max_acc", slider=True)
-            col.prop(boids, "land_max_ave", slider=True)
+            col.prop(boids, "land_acc_max", slider=True)
+            col.prop(boids, "land_ave_max", slider=True)
             col.prop(boids, "land_personal_space")
             col.prop(boids, "land_stick_force")
 
@@ -512,7 +512,7 @@
 
             col = row.column()
             col.label(text="Misc:")
-            col.prop(boids, "banking", slider=True)
+            col.prop(boids, "bank", slider=True)
             col.prop(boids, "height", slider=True)
 
         if part.physics_type == 'KEYED' or part.physics_type == 'BOIDS' or part.physics_type == 'FLUID':
@@ -633,26 +633,26 @@
             if rule.type == 'GOAL':
                 row.prop(rule, "object")
                 row = layout.row()
-                row.prop(rule, "predict")
+                row.prop(rule, "use_predict")
             elif rule.type == 'AVOID':
                 row.prop(rule, "object")
                 row = layout.row()
-                row.prop(rule, "predict")
+                row.prop(rule, "use_predict")
                 row.prop(rule, "fear_factor")
             elif rule.type == 'FOLLOW_PATH':
                 row.label(text="Not yet functional.")
             elif rule.type == 'AVOID_COLLISION':
-                row.prop(rule, "boids")
-                row.prop(rule, "deflectors")
+                row.prop(rule, "use_avoid")
+                row.prop(rule, "use_avoid_collision")
                 row.prop(rule, "look_ahead")
             elif rule.type == 'FOLLOW_LEADER':
                 row.prop(rule, "object", text="")
                 row.prop(rule, "distance")
                 row = layout.row()
-                row.prop(rule, "line")
+                row.prop(rule, "use_line")
                 sub = row.row()
                 sub.active = rule.line
-                sub.prop(rule, "queue_size")
+                sub.prop(rule, "queue_count")
             elif rule.type == 'AVERAGE_SPEED':
                 row.prop(rule, "speed", slider=True)
                 row.prop(rule, "wander", slider=True)

Modified: trunk/blender/release/scripts/ui/properties_physics_fluid.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_physics_fluid.py	2010-08-19 14:43:52 UTC (rev 31459)
+++ trunk/blender/release/scripts/ui/properties_physics_fluid.py	2010-08-19 15:49:30 UTC (rev 31460)
@@ -100,7 +100,7 @@
                 col.prop(fluid, "generate_speed_vectors")
                 col.prop(fluid, "reverse_frames")
 
-                layout.prop(fluid, "path", text="")
+                layout.prop(fluid, "filepath", text="")
 
             elif fluid.type == 'FLUID':
                 split = layout.split()
@@ -168,7 +168,7 @@
                 col.prop(fluid, "floats")
                 col.prop(fluid, "show_tracer")
 
-                layout.prop(fluid, "path", text="")
+                layout.prop(fluid, "filepath", text="")
 
             elif fluid.type == 'CONTROL':
                 split = layout.split()

Modified: trunk/blender/source/blender/makesrna/intern/rna_boid.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_boid.c	2010-08-19 14:43:52 UTC (rev 31459)
+++ trunk/blender/source/blender/makesrna/intern/rna_boid.c	2010-08-19 15:49:30 UTC (rev 31460)
@@ -238,7 +238,7 @@
 	RNA_def_property_ui_text(prop, "Object", "Goal object");
 	RNA_def_property_update(prop, 0, "rna_Boids_reset_deps");
 
-	prop= RNA_def_property(srna, "predict", PROP_BOOLEAN, PROP_NONE);
+	prop= RNA_def_property(srna, "use_predict", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_GOAL_AVOID_PREDICT);
 	RNA_def_property_ui_text(prop, "Predict", "Predict target movement");
 	RNA_def_property_update(prop, 0, "rna_Boids_reset");
@@ -259,7 +259,7 @@
 	RNA_def_property_ui_text(prop, "Object", "Object to avoid");
 	RNA_def_property_update(prop, 0, "rna_Boids_reset_deps");
 
-	prop= RNA_def_property(srna, "predict", PROP_BOOLEAN, PROP_NONE);
+	prop= RNA_def_property(srna, "use_predict", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_GOAL_AVOID_PREDICT);
 	RNA_def_property_ui_text(prop, "Predict", "Predict target movement");
 	RNA_def_property_update(prop, 0, "rna_Boids_reset");
@@ -278,12 +278,12 @@
 	srna= RNA_def_struct(brna, "BoidRuleAvoidCollision", "BoidRule");
 	RNA_def_struct_ui_text(srna, "Avoid Collision", "");
 
-	prop= RNA_def_property(srna, "boids", PROP_BOOLEAN, PROP_NONE);
+	prop= RNA_def_property(srna, "use_avoid", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_ACOLL_WITH_BOIDS);
 	RNA_def_property_ui_text(prop, "Boids", "Avoid collision with other boids");
 	RNA_def_property_update(prop, 0, "rna_Boids_reset");
 
-	prop= RNA_def_property(srna, "deflectors", PROP_BOOLEAN, PROP_NONE);
+	prop= RNA_def_property(srna, "use_avoid_collision", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_ACOLL_WITH_DEFLECTORS);
 	RNA_def_property_ui_text(prop, "Deflectors", "Avoid collision with deflector objects");
 	RNA_def_property_update(prop, 0, "rna_Boids_reset");
@@ -313,12 +313,13 @@
 	RNA_def_property_ui_text(prop, "Distance", "Distance behind leader to follow");
 	RNA_def_property_update(prop, 0, "rna_Boids_reset");
 
-	prop= RNA_def_property(srna, "queue_size", PROP_INT, PROP_NONE);
+	prop= RNA_def_property(srna, "queue_count", PROP_INT, PROP_NONE);
+	RNA_def_property_int_sdna(prop, NULL, "queue_size");
 	RNA_def_property_range(prop, 0.0f, 100.0f);
 	RNA_def_property_ui_text(prop, "Queue Size", "How many boids in a line");
 	RNA_def_property_update(prop, 0, "rna_Boids_reset");
 
-	prop= RNA_def_property(srna, "line", PROP_BOOLEAN, PROP_NONE);
+	prop= RNA_def_property(srna, "use_line", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_LEADER_IN_LINE);
 	RNA_def_property_ui_text(prop, "Line", "Follow leader in a line");
 	RNA_def_property_update(prop, 0, "rna_Boids_reset");
@@ -467,12 +468,14 @@
 	srna = RNA_def_struct(brna, "BoidSettings", NULL);
 	RNA_def_struct_ui_text(srna, "Boid Settings", "Settings for boid physics");
 
-	prop= RNA_def_property(srna, "landing_smoothness", PROP_FLOAT, PROP_NONE);
+	prop= RNA_def_property(srna, "land_smooth", PROP_FLOAT, PROP_NONE);
+	RNA_def_property_float_sdna(prop, NULL, "landing_smoothness");
 	RNA_def_property_range(prop, 0.0, 10.0);
 	RNA_def_property_ui_text(prop, "Landing Smoothness", "How smoothly the boids land");
 	RNA_def_property_update(prop, 0, "rna_Boids_reset");
 
-	prop= RNA_def_property(srna, "banking", PROP_FLOAT, PROP_NONE);
+	prop= RNA_def_property(srna, "bank", PROP_FLOAT, PROP_NONE);
+	RNA_def_property_float_sdna(prop, NULL, "banking");
 	RNA_def_property_range(prop, 0.0, 2.0);
 	RNA_def_property_ui_text(prop, "Banking", "Amount of rotation around velocity vector on turns");
 	RNA_def_property_update(prop, 0, "rna_Boids_reset");
@@ -523,22 +526,26 @@
 	RNA_def_property_update(prop, 0, "rna_Boids_reset");
 
 	/* physical properties */
-	prop= RNA_def_property(srna, "air_min_speed", PROP_FLOAT, PROP_NONE);
+	prop= RNA_def_property(srna, "air_speed_min", PROP_FLOAT, PROP_NONE);
+	RNA_def_property_float_sdna(prop, NULL, "air_min_speed");
 	RNA_def_property_range(prop, 0.0, 1.0);
 	RNA_def_property_ui_text(prop, "Min Air Speed", "Minimum speed in air (relative to maximum speed)");
 	RNA_def_property_update(prop, 0, "rna_Boids_reset");
 
-	prop= RNA_def_property(srna, "air_max_speed", PROP_FLOAT, PROP_NONE);
+	prop= RNA_def_property(srna, "air_speed_max", PROP_FLOAT, PROP_NONE);
+	RNA_def_property_float_sdna(prop, NULL, "air_max_speed");
 	RNA_def_property_range(prop, 0.0, 100.0);

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list