[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [24416] branches/physics25: Physics branch :

Arystanbek Dyussenov arystan.d at gmail.com
Mon Nov 9 04:22:18 CET 2009


Revision: 24416
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24416
Author:   kazanbas
Date:     2009-11-09 04:22:16 +0100 (Mon, 09 Nov 2009)

Log Message:
-----------
Physics branch:
* extended the Group struct with the "flag" field with GR_PHYSICS value indicating a group containing physics objects
* added a corresp. button

Modified Paths:
--------------
    branches/physics25/release/scripts/ui/properties_object.py
    branches/physics25/source/blender/blenkernel/intern/group.c
    branches/physics25/source/blender/makesdna/DNA_group_types.h
    branches/physics25/source/blender/makesrna/intern/rna_group.c

Modified: branches/physics25/release/scripts/ui/properties_object.py
===================================================================
--- branches/physics25/release/scripts/ui/properties_object.py	2009-11-08 23:03:01 UTC (rev 24415)
+++ branches/physics25/release/scripts/ui/properties_object.py	2009-11-09 03:22:16 UTC (rev 24416)
@@ -147,7 +147,10 @@
                 split.column().itemR(group, "layer", text="Dupli")
                 split.column().itemR(group, "dupli_offset", text="")
 
+                row = col.box().row()
+                row.itemR(group, "physics_group")
 
+
 class OBJECT_PT_display(ObjectButtonsPanel):
     bl_label = "Display"
 

Modified: branches/physics25/source/blender/blenkernel/intern/group.c
===================================================================
--- branches/physics25/source/blender/blenkernel/intern/group.c	2009-11-08 23:03:01 UTC (rev 24415)
+++ branches/physics25/source/blender/blenkernel/intern/group.c	2009-11-09 03:22:16 UTC (rev 24416)
@@ -139,6 +139,7 @@
 	
 	group = alloc_libblock(&G.main->group, ID_GR, name);
 	group->layer= (1<<20)-1;
+	group->flag= 0;
 	return group;
 }
 

Modified: branches/physics25/source/blender/makesdna/DNA_group_types.h
===================================================================
--- branches/physics25/source/blender/makesdna/DNA_group_types.h	2009-11-08 23:03:01 UTC (rev 24415)
+++ branches/physics25/source/blender/makesdna/DNA_group_types.h	2009-11-09 03:22:16 UTC (rev 24416)
@@ -55,8 +55,13 @@
 	 * on the last used scene */
 	unsigned int layer;
 	float dupli_ofs[3];
+
+	int flag;
+	int pad;
 } Group;
 
+/* Group flags */
+#define GR_PHYSICS	1 /* group rigid bodies */
 
 #endif
 

Modified: branches/physics25/source/blender/makesrna/intern/rna_group.c
===================================================================
--- branches/physics25/source/blender/makesrna/intern/rna_group.c	2009-11-08 23:03:01 UTC (rev 24415)
+++ branches/physics25/source/blender/makesrna/intern/rna_group.c	2009-11-09 03:22:16 UTC (rev 24416)
@@ -66,7 +66,11 @@
 	prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_LAYER);
 	RNA_def_property_boolean_sdna(prop, NULL, "layer", 1);
 	RNA_def_property_array(prop, 20);
-	RNA_def_property_ui_text(prop, "Dupli Layers", "Layers visible when this groups is instanced as a dupli.");	
+	RNA_def_property_ui_text(prop, "Dupli Layers", "Layers visible when this groups is instanced as a dupli.");
+
+	prop= RNA_def_property(srna, "physics_group", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_sdna(prop, NULL, "flag", GR_PHYSICS);
+	RNA_def_property_ui_text(prop, "Physics Group", "Group contains objects paricipating in rigid body physics simulation.");	
 }
 
 #endif





More information about the Bf-blender-cvs mailing list