[Bf-blender-cvs] [b5ab717] fracture_modifier: Merge remote-tracking branch 'refs/remotes/origin/master' into fracture_modifier

Martin Felke noreply at git.blender.org
Thu Oct 9 22:31:07 CEST 2014


Commit: b5ab717f889fac441fbc449f4f69f26bcadb2beb
Author: Martin Felke
Date:   Thu Oct 9 22:28:51 2014 +0200
Branches: fracture_modifier
https://developer.blender.org/rBb5ab717f889fac441fbc449f4f69f26bcadb2beb

Merge remote-tracking branch 'refs/remotes/origin/master' into fracture_modifier

Conflicts:
	source/blender/editors/physics/CMakeLists.txt (reverse-merged from commit c9769a68082d334b002c449ad204de5acb93967b)

===================================================================

M	extern/bullet2/src/LinearMath/btVector3.h
M	intern/rigidbody/RBI_api.h
M	intern/rigidbody/rb_bullet_api.cpp
M	release/scripts/startup/bl_ui/properties_data_modifier.py
M	source/blender/blenkernel/intern/depsgraph.c
M	source/blender/blenkernel/intern/object.c
M	source/blender/blenkernel/intern/rigidbody.c
M	source/blender/blenkernel/intern/softbody.c
M	source/blender/blenlib/BLI_ghash.h
M	source/blender/blenloader/intern/readfile.c
M	source/blender/blenloader/intern/writefile.c
M	source/blender/bmesh/CMakeLists.txt
M	source/blender/bmesh/intern/bmesh_opdefines.c
M	source/blender/bmesh/intern/bmesh_operators.c
M	source/blender/bmesh/operators/bmo_bisect_plane.c
M	source/blender/editors/mesh/editmesh_utils.c
M	source/blender/editors/object/object_edit.c
M	source/blender/makesdna/DNA_modifier_types.h
M	source/blender/makesdna/DNA_object_force.h
M	source/blender/makesrna/intern/rna_modifier.c
M	source/blender/makesrna/intern/rna_rigidbody.c

===================================================================

diff --git a/extern/bullet2/src/LinearMath/btVector3.h b/extern/bullet2/src/LinearMath/btVector3.h
index d467748..112b70d 100644
--- a/extern/bullet2/src/LinearMath/btVector3.h
+++ b/extern/bullet2/src/LinearMath/btVector3.h
@@ -296,6 +296,7 @@ public:
    * x^2 + y^2 + z^2 = 1 */
 	SIMD_FORCE_INLINE btVector3& normalize() 
 	{
+		
 		btAssert(!fuzzyZero());
 
 #if defined(BT_USE_SSE_IN_API) && defined (BT_USE_SSE)		
diff --git a/intern/rigidbody/RBI_api.h b/intern/rigidbody/RBI_api.h
index a4c5dda..49e2d80 100644
--- a/intern/rigidbody/RBI_api.h
+++ b/intern/rigidbody/RBI_api.h
@@ -73,7 +73,7 @@ typedef struct rbConstraint rbConstraint;
 
 /* Create a new dynamics world instance */
 // TODO: add args to set the type of constraint solvers, etc.
-extern rbDynamicsWorld *RB_dworld_new(const float gravity[3]);
+rbDynamicsWorld *RB_dworld_new(const float gravity[3]);
 
 /* Delete the given dynamics world, and free any extra data it may require */
 void RB_dworld_delete(rbDynamicsWorld *world);
@@ -105,7 +105,7 @@ void RB_dworld_export(rbDynamicsWorld *world, const char *filename);
 /* Setup ---------------------------- */
 
 /* Add RigidBody to dynamics world */
-extern void RB_dworld_add_body(rbDynamicsWorld *world, rbRigidBody *body, int col_groups);
+void RB_dworld_add_body(rbDynamicsWorld *world, rbRigidBody *body, int col_groups);
 
 /* Remove RigidBody from dynamics world */
 void RB_dworld_remove_body(rbDynamicsWorld *world, rbRigidBody *body);
@@ -279,8 +279,8 @@ void RB_constraint_delete(rbConstraint *con);
 /* Settings --------------------------- */
 
 /* Enable or disable constraint */
-extern void RB_constraint_set_enabled(rbConstraint *con, int enabled);
-extern int RB_constraint_is_enabled(rbConstraint *con);
+void RB_constraint_set_enabled(rbConstraint *con, int enabled);
+int RB_constraint_is_enabled(rbConstraint *con);
 
 /* Limits */
 #define RB_LIMIT_LIN_X 0
diff --git a/intern/rigidbody/rb_bullet_api.cpp b/intern/rigidbody/rb_bullet_api.cpp
index 310e9d5..a85254a 100644
--- a/intern/rigidbody/rb_bullet_api.cpp
+++ b/intern/rigidbody/rb_bullet_api.cpp
@@ -117,7 +117,7 @@ struct rbFilterCallback : public btOverlapFilterCallback
 		collides = (proxy0->m_collisionFilterGroup & proxy1->m_collisionFilterMask) != 0;
 		collides = collides && (proxy1->m_collisionFilterGroup & proxy0->m_collisionFilterMask);
 		collides = collides && (rb0->col_groups & rb1->col_groups);
-
+		
 		return collides;
 	}
 };
@@ -254,7 +254,7 @@ void RB_dworld_add_body(rbDynamicsWorld *world, rbRigidBody *object, int col_gro
 {
 	btRigidBody *body = object->body;
 	object->col_groups = col_groups;
-
+	
 	world->dynamicsWorld->addRigidBody(body);
 }
 
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 1a40498..560314c 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -32,13 +32,6 @@ class ModifierButtonsPanel():
 class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
     bl_label = "Modifiers"
 
-    def icon(self, bool):
-        if bool:
-            return 'TRIA_DOWN'
-        else:
-            return 'TRIA_RIGHT'
-
-
     def draw(self, context):
         layout = self.layout
 
@@ -279,7 +272,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
             split.prop(md, "use_collapse_triangulate")
         elif decimate_type == 'UNSUBDIV':
             layout.prop(md, "iterations")
-        else: # decimate_type == 'DISSOLVE':
+        else:  # decimate_type == 'DISSOLVE':
             layout.prop(md, "angle_limit")
             layout.prop(md, "use_dissolve_boundaries")
             layout.label("Delimit:")
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 7a04b1d..44a0b93 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -1359,21 +1359,15 @@ static void scene_sort_groups(Main *bmain, Scene *sce)
 	
 	for (group = bmain->group.first; group; group = group->id.next) {
 		for (go = group->gobject.first; go; go = go->next) {
-			if (go->ob != NULL) {
-				/* additional fracture modifier related sanity NULL check, caused crashes else */
-				if ((go->ob->id.flag & LIB_DOIT) == 0)
-					break;
-			}
+			if ((go->ob->id.flag & LIB_DOIT) == 0)
+				break;
 		}
 		/* this group is entirely in this scene */
 		if (go == NULL) {
 			ListBase listb = {NULL, NULL};
 			
 			for (go = group->gobject.first; go; go = go->next)
-				if (go->ob != NULL) {
-					/* additional fracture modifier related sanity NULL check, caused crashes else */
-					go->ob->id.newid = (ID *)go;
-				}
+				go->ob->id.newid = (ID *)go;
 			
 			/* in order of sorted bases we reinsert group objects */
 			for (base = sce->base.first; base; base = base->next) {
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index ebb3fc8..755ce91 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -3483,8 +3483,7 @@ int BKE_object_is_deform_modified(Scene *scene, Object *ob)
 	{
 		ModifierTypeInfo *mti = modifierType_getInfo(md->type);
 
-		/* XXX special case for fracture modifier, for motion blur... still necessary ? TODO */
-		if (mti->type == eModifierTypeType_OnlyDeform || md->type == eModifierType_Fracture) {
+		if (mti->type == eModifierTypeType_OnlyDeform) {
 			if (!(flag & eModifierMode_Render) && modifier_isEnabled(scene, md, eModifierMode_Render))
 				flag |= eModifierMode_Render;
 
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index 3d84036..02d39ad 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -47,7 +47,6 @@
 #  include "RBI_api.h"
 #endif
 
-#include "DNA_anim_types.h"
 #include "DNA_group_types.h"
 #include "DNA_mesh_types.h"
 #include "DNA_meshdata_types.h"
@@ -56,7 +55,6 @@
 #include "DNA_rigidbody_types.h"
 #include "DNA_scene_types.h"
 
-#include "BKE_animsys.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_effect.h"
 #include "BKE_global.h"
@@ -66,15 +64,10 @@
 #include "BKE_object.h"
 #include "BKE_pointcache.h"
 #include "BKE_rigidbody.h"
-#include "BKE_utildefines.h"
-#include "BKE_library.h"
-#include "BKE_main.h"
 #include "BKE_modifier.h"
-#include "BKE_scene.h"
 #include "BKE_depsgraph.h"
 
 #include "RNA_access.h"
-#include "bmesh.h"
 
 #ifdef WITH_BULLET
 
@@ -678,7 +671,7 @@ static rbCollisionShape *rigidbody_get_shape_trimesh_from_mesh_shard(DerivedMesh
 {
 	rbCollisionShape *shape = NULL;
 
-	if (ob->type == OB_MESH) {
+	if (dmm) {
 		DerivedMesh *dm = NULL;
 		MVert *mvert;
 		MFace *mface;
@@ -754,7 +747,7 @@ static rbCollisionShape *rigidbody_get_shape_trimesh_from_mesh_shard(DerivedMesh
 		/* cleanup temp data */
 		if (dm /*&& ob->rigidbody_object->mesh_source == RBO_MESH_BASE*/) {
 			dm->needsFree = 1;
-			dm->release(dm);
+		dm->release(dm);
 			dm = NULL;
 		}
 	}
@@ -930,7 +923,7 @@ static void rigidbody_validate_sim_shape(Object *ob, bool rebuild)
 		case RB_SHAPE_CONVEXH:
 			/* try to emged collision margin */
 			has_volume = (MIN3(size[0], size[1], size[2]) > 0.0f);
-	
+
 			if (!(rbo->flag & RBO_FLAG_USE_MARGIN) && has_volume)
 				hull_margin = 0.04f;
 			if (ob->type == OB_MESH && ob->data) {
@@ -961,6 +954,7 @@ static void rigidbody_validate_sim_shape(Object *ob, bool rebuild)
 	}
 }
 
+/* --------------------- */
 
 /* Create new physics sim collision shape for object and store it,
  * or remove the existing one first and replace...
@@ -990,6 +984,7 @@ void BKE_rigidbody_validate_sim_shard_shape(MeshIsland *mi, Object *ob, short re
 	 *	- assume that all quadrics are standing upright on local z-axis
 	 *	- assume even distribution of mass around the Object's pivot
 	 *	  (i.e. Object pivot is centralized in boundbox)
+	 *	- boundbox gives full width
 	 */
 	// XXX: all dimensions are auto-determined now... later can add stored settings for this
 	/* get object dimensions without scaling */
@@ -1032,6 +1027,7 @@ void BKE_rigidbody_validate_sim_shard_shape(MeshIsland *mi, Object *ob, short re
 		case RB_SHAPE_CYLINDER:
 			new_shape = RB_shape_new_cylinder(radius, height);
 			break;
+
 		case RB_SHAPE_CONE:
 			new_shape = RB_shape_new_cone(radius, height * 2.0f);
 			break;
@@ -1063,6 +1059,11 @@ void BKE_rigidbody_validate_sim_shard_shape(MeshIsland *mi, Object *ob, short re
 	}
 }
 
+#if 0 // XXX: not defined yet
+		case RB_SHAPE_COMPOUND:
+			volume = 0.0f;
+			break;
+#endif
 
 /* --------------------- */
 
@@ -1133,10 +1134,17 @@ void BKE_rigidbody_validate_sim_shard(RigidBodyWorld *rbw, MeshIsland *mi, Objec
 
 
 
+#if 0 // XXX: not defined yet
+		case RB_SHAPE_COMPOUND:
+			volume = 0.0f;
+			break;
+#endif
 
 /* --------------------- */
 
+/**
 /* Create physics sim representation of object given RigidBody settings
+ *
  * < rebuild: even if an instance already exists, replace it
  */
 static void rigidbody_validate_sim_object(RigidBodyWorld *rbw, Object *ob, bool rebuild)
@@ -1199,7 +1207,9 @@ static void rigidbody_validate_sim_object(RigidBodyWorld *rbw, Object *ob, bool
 
 /* --------------------- */
 
-/* Create physics sim representation of constraint given rigid body constraint settings
+/**
+ * Create physics sim representation of constraint given rigid body constraint settings
+ *
  * < rebuild: even if an instance already exists, replace it
  */
 static void rigidbody_validate_sim_constraint(RigidBodyWorld *rbw, Object *ob, bool rebuild)
@@ -2916,68 +2926,29 @@ void BKE_rigidbody_do_simulation(Scene *scene, float ctime)
 #  pragma GCC diagnostic ignored "-Wunused-parameter"
 #endif
 
-void BKE_rigidbody_free_world(RigidBodyWorld *rbw) {
-}
-void BKE_rigidbody_free_object(Object *ob) {
-}
-void BKE_rigidbody_free_constraint(Object *ob) {
-}
-struct RigidBodyOb *BKE_rigidbody_copy_object(Object *ob) {
-	return NULL;
-}
-struct RigidBodyCon *BKE_rigidbody_copy_constraint(Object *ob) {
-	return NULL;
-}
-void BKE_rigidbody_relink_constraint(RigidBodyCon *rbc) {
-}
-void BKE_rigidbody_validate_sim_world(Scene *scene, R

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list