Minor adjustments to game physics. Moved some of the name changes into RNA and moved...
authorWilliam Reynish <william@reynish.com>
Sun, 16 Aug 2009 09:47:33 +0000 (09:47 +0000)
committerWilliam Reynish <william@reynish.com>
Sun, 16 Aug 2009 09:47:33 +0000 (09:47 +0000)
release/ui/buttons_game.py
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_force.c

index fbf1ff825348676f62430dbf7795b3302c9d6ca8..b662254f1bbd95f8ef02109b2c53c877035f31b2 100644 (file)
@@ -35,8 +35,8 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel):
                        col.itemR(ob, "restrict_render", text="Invisible") # out of place but useful
                        
                        col = split.column()
-                       col.itemR(game, "do_fh", text="Use Material Physics")
-                       col.itemR(game, "rotation_fh", text="Rotate From Normal")
+                       col.itemR(game, "material_physics")
+                       col.itemR(game, "rotate_from_normal")
                        col.itemR(game, "no_sleeping")
                        
                        layout.itemS()
@@ -50,12 +50,15 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel):
                        sub.itemR(game, "radius")
                        sub.itemR(game, "form_factor")
                        
-                       col.itemS()
+                       col = split.column()
+                       sub = col.column()
+                       sub.active = (game.physics_type == 'RIGID_BODY')
+                       sub.itemR(game, "anisotropic_friction")
+                       subsub = sub.column()
+                       subsub.active = game.anisotropic_friction
+                       subsub.itemR(game, "friction_coefficients", text="", slider=True)
                        
-                       col.itemL(text="Damping:")
-                       sub = col.column(align=True)
-                       sub.itemR(game, "damping", text="Translation", slider=True)
-                       sub.itemR(game, "rotation_damping", text="Rotation", slider=True)
+                       split = layout.split()
                        
                        col = split.column()
                        col.itemL(text="Velocity:")
@@ -63,14 +66,11 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel):
                        sub.itemR(game, "minimum_velocity", text="Minimum")
                        sub.itemR(game, "maximum_velocity", text="Maximum")
                        
-                       col.itemS()
-                       
-                       sub = col.column()
-                       sub.active = (game.physics_type == 'RIGID_BODY')
-                       sub.itemR(game, "anisotropic_friction")
-                       subsub = sub.column()
-                       subsub.active = game.anisotropic_friction
-                       subsub.itemR(game, "friction_coefficients", text="", slider=True)
+                       col = split.column()
+                       col.itemL(text="Damping:")
+                       sub = col.column(align=True)
+                       sub.itemR(game, "damping", text="Translation", slider=True)
+                       sub.itemR(game, "rotation_damping", text="Rotation", slider=True)
                        
                        layout.itemS()
                        
@@ -119,10 +119,10 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel):
                        col.itemS()
                        
                        col.itemL(text="Cluster Collision:")
-                       col.itemR(soft, "enable_rs_collision", text="Rigid to Soft Body")
-                       col.itemR(soft, "enable_ss_collision", text="Soft to Soft Body")
+                       col.itemR(soft, "cluster_rigid_to_softbody")
+                       col.itemR(soft, "cluster_soft_to_softbody")
                        sub  = col.column()
-                       sub.active = (soft.enable_rs_collision or soft.enable_ss_collision)
+                       sub.active = (soft.cluster_rigid_to_softbody or soft.cluster_soft_to_softbody)
                        sub.itemR(soft, "cluster_iterations", text="Iterations")
                
                elif game.physics_type == 'STATIC':
index 2e40765935d9bc912107277f2f522be361049373..bad36025edacb7fd72cb749a73174f5474197ef7 100644 (file)
@@ -839,7 +839,7 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
        prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
        RNA_def_property_float_sdna(prop, NULL, "inertia");
        RNA_def_property_range(prop, 0.01, 10.0);
-       RNA_def_property_ui_text(prop, "Radius", "Radius for Bounding sphere and Fh/Fh Rot.");
+       RNA_def_property_ui_text(prop, "Radius", "Radius of bounding sphere and material physics");
        RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
 
        prop= RNA_def_property(srna, "no_sleeping", PROP_BOOLEAN, PROP_NONE);
@@ -899,13 +899,13 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Lock Z Rotation Axis", "Disable simulation of angular  motion along the Z axis.");      
        
 
-       prop= RNA_def_property(srna, "do_fh", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "material_physics", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_DO_FH);
-       RNA_def_property_ui_text(prop, "Do Fh", "Use Fh settings in materials.");
+       RNA_def_property_ui_text(prop, "Use Material Physics", "Use physics settings in materials.");
 
-       prop= RNA_def_property(srna, "rotation_fh", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "rotate_from_normal", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_ROT_FH);
-       RNA_def_property_ui_text(prop, "Rotation Fh", "Use face normal to rotate Object");
+       RNA_def_property_ui_text(prop, "Rotate From Normal", "Use face normal to rotate object, so that it points away from the surface");
 
        prop= RNA_def_property(srna, "form_factor", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "formfactor");
index 93274a01cc50b9aeca4e33847b39cedba502f7ae..932bef9969d1c528564379a63151fd2c23fc2142 100644 (file)
@@ -864,13 +864,13 @@ static void rna_def_game_softbody(BlenderRNA *brna)
        RNA_def_property_boolean_sdna(prop, NULL, "flag", OB_BSB_BENDING_CONSTRAINTS);
        RNA_def_property_ui_text(prop, "Bending Const", "Enable bending constraints");
        
-       prop= RNA_def_property(srna, "enable_rs_collision", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "cluster_rigid_to_softbody", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "collisionflags", OB_BSB_COL_CL_RS);
-       RNA_def_property_ui_text(prop, "Cluster Collision RS", "Enable cluster collision between soft and rigid body");
+       RNA_def_property_ui_text(prop, "Rigid to Soft Body", "Enable cluster collision between soft and rigid body");
        
-       prop= RNA_def_property(srna, "enable_ss_collision", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "cluster_soft_to_softbody", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "collisionflags", OB_BSB_COL_CL_SS);
-       RNA_def_property_ui_text(prop, "Cluster Collision SS", "Enable cluster collision between soft and soft body");
+       RNA_def_property_ui_text(prop, "Soft to Soft Body", "Enable cluster collision between soft and soft body");
 }
 
 static void rna_def_softbody(BlenderRNA *brna)