[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54124] trunk/blender: Bunch of fixes for UI messages.

Bastien Montagne montagne29 at wanadoo.fr
Sun Jan 27 19:14:24 CET 2013


Revision: 54124
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54124
Author:   mont29
Date:     2013-01-27 18:14:24 +0000 (Sun, 27 Jan 2013)
Log Message:
-----------
Bunch of fixes for UI messages.

Also generate rigid body constraint types in py bullet code from RNA enum values (simpler than having to sync the code when something is changed here!).

Side note: RNA API about icons still needs to expose icons for enum values, and conversion funcs between icon_name and icon_value!

Modified Paths:
--------------
    trunk/blender/release/scripts/modules/bl_i18n_utils/spell_check_utils.py
    trunk/blender/release/scripts/startup/bl_operators/rigidbody.py
    trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py
    trunk/blender/source/blender/editors/physics/rigidbody_object.c
    trunk/blender/source/blender/makesrna/intern/rna_rigidbody.c

Modified: trunk/blender/release/scripts/modules/bl_i18n_utils/spell_check_utils.py
===================================================================
--- trunk/blender/release/scripts/modules/bl_i18n_utils/spell_check_utils.py	2013-01-27 17:20:08 UTC (rev 54123)
+++ trunk/blender/release/scripts/modules/bl_i18n_utils/spell_check_utils.py	2013-01-27 18:14:24 UTC (rev 54124)
@@ -246,6 +246,7 @@
     "tri", "tris",
     "uv", "uvs", "uvw", "uw", "uvmap",
     "vec",
+    "vel",  # velocity!
     "vert", "verts",
     "vis",
     "xyz", "xzy", "yxz", "yzx", "zxy", "zyx",
@@ -311,6 +312,7 @@
     "inpaint",
     "lightmap",
     "lossless", "lossy",
+    "matcap",
     "midtones",
     "mipmap", "mipmaps", "mip",
     "ngon", "ngons",

Modified: trunk/blender/release/scripts/startup/bl_operators/rigidbody.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/rigidbody.py	2013-01-27 17:20:08 UTC (rev 54123)
+++ trunk/blender/release/scripts/startup/bl_operators/rigidbody.py	2013-01-27 18:14:24 UTC (rev 54124)
@@ -27,7 +27,7 @@
 class CopyRigidbodySettings(Operator):
     '''Copy Rigid Body settings from active object to selected'''
     bl_idname = "rigidbody.object_settings_copy"
-    bl_label = "Copy Rigidbody Settings"
+    bl_label = "Copy Rigid Body Settings"
     bl_options = {'REGISTER', 'UNDO'}
 
     @classmethod
@@ -190,23 +190,17 @@
 
 
 class ConnectRigidBodies(Operator):
-
-
     '''Connect selected rigid bodies to active'''
     bl_idname = "rigidbody.connect"
-    bl_label = "ConnectRigidBodies"
+    bl_label = "Connect Rigid Bodies"
     bl_options = {'REGISTER', 'UNDO'}
 
     con_type = EnumProperty(
         name="Type",
-        description="Type of generated contraint",
-        items=(('FIXED', "Fixed", "Glues ridig bodies together"),
-               ('POINT', "Point", "Constrains rigid bodies to move aound common pivot point"),
-               ('HINGE', "Hinge", "Restricts rigid body rotation to one axis"),
-               ('SLIDER', "Slider", "Restricts rigid boddy translation to one axis"),
-               ('PISTON', "Piston", "Restricts rigid boddy translation and rotation to one axis"),
-               ('GENERIC', "Generic", "Restricts translation and rotation to specified axes"),
-               ('GENERIC_SPRING', "Generic Spring", "Restricts translation and rotation to specified axes with springs")),
+        description="Type of generated constraint",
+        # XXX Would be nice to get icons too, but currently not possible ;)
+        items=tuple((e.identifier, e.name, e.description, e. value)
+                    for e in bpy.types.RigidBodyConstraint.bl_rna.properties["type"].enum_items),
         default='FIXED',)
 
     pivot_type = EnumProperty(
@@ -214,7 +208,7 @@
         description="Constraint pivot location",
         items=(('CENTER', "Center", "Pivot location is between the constrained rigid bodies"),
                ('ACTIVE', "Active", "Pivot location is at the active object position"),
-               ('SELECTED', "Selected", "Pivot location is at the slected object position")),
+               ('SELECTED', "Selected", "Pivot location is at the selected object position")),
         default='CENTER',)
 
     @classmethod

Modified: trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py	2013-01-27 17:20:08 UTC (rev 54123)
+++ trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py	2013-01-27 18:14:24 UTC (rev 54124)
@@ -113,7 +113,7 @@
 
 class VIEW3D_PT_tools_rigidbody(View3DPanel, Panel):
     bl_context = "objectmode"
-    bl_label = "Rigidbody Tools"
+    bl_label = "Rigid Body Tools"
     bl_options = {'DEFAULT_CLOSED'}
 
     def draw(self, context):

Modified: trunk/blender/source/blender/editors/physics/rigidbody_object.c
===================================================================
--- trunk/blender/source/blender/editors/physics/rigidbody_object.c	2013-01-27 17:20:08 UTC (rev 54123)
+++ trunk/blender/source/blender/editors/physics/rigidbody_object.c	2013-01-27 18:14:24 UTC (rev 54124)
@@ -615,8 +615,7 @@
 	ot->prop = prop = RNA_def_enum(ot->srna, "material",
 	                               DummyRNA_DEFAULT_items, 0,
 	                               "Material Preset",
-	                               "Type of material that objects are made of. "
-	                               "Determines material density");
+	                               "Type of material that objects are made of (determines material density)");
 	RNA_def_enum_funcs(prop, rigidbody_materials_itemf);
 
 	RNA_def_float(ot->srna, "density", 1.0, FLT_MIN, FLT_MAX,

Modified: trunk/blender/source/blender/makesrna/intern/rna_rigidbody.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_rigidbody.c	2013-01-27 17:20:08 UTC (rev 54123)
+++ trunk/blender/source/blender/makesrna/intern/rna_rigidbody.c	2013-01-27 18:14:24 UTC (rev 54124)
@@ -55,19 +55,23 @@
 	{RB_SHAPE_CAPSULE, "CAPSULE", ICON_OUTLINER_OB_META, "Capsule", ""},
 	{RB_SHAPE_CYLINDER, "CYLINDER", ICON_MESH_CYLINDER, "Cylinder", ""},
 	{RB_SHAPE_CONE, "CONE", ICON_MESH_CONE, "Cone", ""},
-	{RB_SHAPE_CONVEXH, "CONVEX_HULL", ICON_MESH_ICOSPHERE, "Convex Hull", "A mesh-like surface encompassing (i.e. shrinkwrap over) all verts. Best results with fewer vertices"},
-	{RB_SHAPE_TRIMESH, "MESH", ICON_MESH_MONKEY, "Mesh", "Mesh consisting of triangles only, allowing for more detailed interactions than convex hulls"},
+	{RB_SHAPE_CONVEXH, "CONVEX_HULL", ICON_MESH_ICOSPHERE, "Convex Hull",
+	                   "A mesh-like surface encompassing (i.e. shrinkwrap over) all vertices (best results with "
+	                   "fewer vertices)"},
+	{RB_SHAPE_TRIMESH, "MESH", ICON_MESH_MONKEY, "Mesh",
+	                   "Mesh consisting of triangles only, allowing for more detailed interactions than convex hulls"},
 	{0, NULL, 0, NULL, NULL}};
 
 /* collision shapes of constraints in rigid body sim */
 EnumPropertyItem rigidbody_con_type_items[] = {
-	{RBC_TYPE_FIXED, "FIXED", ICON_FORCE_FORCE, "Fixed", "Glues rigid bodies together"},
-	{RBC_TYPE_POINT, "POINT", ICON_FORCE_FORCE, "Point", "Constrains rigid bodies to move aound common pivot point"},
-	{RBC_TYPE_HINGE, "HINGE", ICON_FORCE_FORCE, "Hinge", "Restricts rigid body rotation to one axis"},
-	{RBC_TYPE_SLIDER, "SLIDER", ICON_FORCE_FORCE, "Slider", "Restricts rigid boddy translation to one axis"},
-	{RBC_TYPE_PISTON, "PISTON", ICON_FORCE_FORCE, "Piston", "Restricts rigid boddy translation and rotation to one axis"},
-	{RBC_TYPE_6DOF, "GENERIC", ICON_FORCE_FORCE, "Generic", "Restricts translation and rotation to specified axes"},
-	{RBC_TYPE_6DOF_SPRING, "GENERIC_SPRING", ICON_FORCE_FORCE, "Generic Spring", "Restricts translation and rotation to specified axes with springs"},
+	{RBC_TYPE_FIXED, "FIXED", ICON_FORCE_FORCE, "Fixed", "Glue rigid bodies together"},
+	{RBC_TYPE_POINT, "POINT", ICON_FORCE_FORCE, "Point", "Constrain rigid bodies to move around common pivot point"},
+	{RBC_TYPE_HINGE, "HINGE", ICON_FORCE_FORCE, "Hinge", "Restrict rigid body rotation to one axis"},
+	{RBC_TYPE_SLIDER, "SLIDER", ICON_FORCE_FORCE, "Slider", "Restrict rigid body translation to one axis"},
+	{RBC_TYPE_PISTON, "PISTON", ICON_FORCE_FORCE, "Piston", "Restrict rigid body translation and rotation to one axis"},
+	{RBC_TYPE_6DOF, "GENERIC", ICON_FORCE_FORCE, "Generic", "Restrict translation and rotation to specified axes"},
+	{RBC_TYPE_6DOF_SPRING, "GENERIC_SPRING", ICON_FORCE_FORCE, "Generic Spring",
+	                       "Restrict translation and rotation to specified axes with springs"},
 	{0, NULL, 0, NULL, NULL}};
 
 
@@ -560,7 +564,7 @@
 	RNA_def_property_range(prop, 0.0f, 100.0f);
 	RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
 	RNA_def_property_float_default(prop, 1.0f);
-	RNA_def_property_ui_text(prop, "Time Scale", "Changes the speed of the simulation");
+	RNA_def_property_ui_text(prop, "Time Scale", "Change the speed of the simulation");
 	RNA_def_property_update(prop, NC_SCENE, "rna_RigidBodyWorld_reset");
 	
 	/* timestep */
@@ -569,7 +573,9 @@
 	RNA_def_property_range(prop, 1, SHRT_MAX);
 	RNA_def_property_ui_range(prop, 60, 1000, 1, 0);
 	RNA_def_property_int_default(prop, 60);
-	RNA_def_property_ui_text(prop, "Steps Per Second", "Number of simulation steps taken per second (higher values are more accurate but slower)");
+	RNA_def_property_ui_text(prop, "Steps Per Second",
+	                         "Number of simulation steps taken per second (higher values are more accurate "
+	                         "but slower)");
 	RNA_def_property_update(prop, NC_SCENE, "rna_RigidBodyWorld_reset");
 	
 	/* constraint solver iterations */
@@ -579,14 +585,18 @@
 	RNA_def_property_ui_range(prop, 10, 100, 1, 0);
 	RNA_def_property_int_default(prop, 10);
 	RNA_def_property_int_funcs(prop, NULL, "rna_RigidBodyWorld_num_solver_iterations_set", NULL);
-	RNA_def_property_ui_text(prop, "Solver Iterations", "Number of constraint solver iterations made per simulation step (higher values are more accurate but slower)");
+	RNA_def_property_ui_text(prop, "Solver Iterations",
+	                         "Number of constraint solver iterations made per simulation step (higher values are more "
+	                         "accurate but slower)");
 	RNA_def_property_update(prop, NC_SCENE, "rna_RigidBodyWorld_reset");
 	
 	/* split impulse */
 	prop = RNA_def_property(srna, "use_split_impulse", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", RBW_FLAG_USE_SPLIT_IMPULSE);
 	RNA_def_property_boolean_funcs(prop, NULL, "rna_RigidBodyWorld_split_impulse_set");
-	RNA_def_property_ui_text(prop, "Split Impulse", "Reduces extra velocity that can build up when objects collide (lowers simulation stabilty a litte so use only when necessary)");
+	RNA_def_property_ui_text(prop, "Split Impulse",
+	                         "Reduce extra velocity that can build up when objects collide (lowers simulation "
+	                         "stability a little so use only when necessary)");
 	RNA_def_property_update(prop, NC_SCENE, "rna_RigidBodyWorld_reset");
 
 	/* cache */
@@ -626,7 +636,7 @@

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list