[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22505] branches/blender2.5/blender: Minor adjustments to game physics.

William Reynish william at reynish.com
Sun Aug 16 11:47:33 CEST 2009


Revision: 22505
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22505
Author:   billrey
Date:     2009-08-16 11:47:33 +0200 (Sun, 16 Aug 2009)

Log Message:
-----------
Minor adjustments to game physics. Moved some of the name changes into RNA and moved some options around for nicer alignment.

Modified Paths:
--------------
    branches/blender2.5/blender/release/ui/buttons_game.py
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_object.c
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_object_force.c

Modified: branches/blender2.5/blender/release/ui/buttons_game.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_game.py	2009-08-16 08:36:08 UTC (rev 22504)
+++ branches/blender2.5/blender/release/ui/buttons_game.py	2009-08-16 09:47:33 UTC (rev 22505)
@@ -35,8 +35,8 @@
 			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 @@
 			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,15 +66,12 @@
 			sub.itemR(game, "minimum_velocity", text="Minimum")
 			sub.itemR(game, "maximum_velocity", text="Maximum")
 			
-			col.itemS()
+			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)
 			
-			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)
-			
 			layout.itemS()
 			
 			split = layout.split()
@@ -119,10 +119,10 @@
 			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':

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_object.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_object.c	2009-08-16 08:36:08 UTC (rev 22504)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_object.c	2009-08-16 09:47:33 UTC (rev 22505)
@@ -839,7 +839,7 @@
 	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 @@
 	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");

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_object_force.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_object_force.c	2009-08-16 08:36:08 UTC (rev 22504)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_object_force.c	2009-08-16 09:47:33 UTC (rev 22505)
@@ -864,13 +864,13 @@
 	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)





More information about the Bf-blender-cvs mailing list