[Bf-blender-cvs] [433fac8f1e8] temp-fracture-modifier-2.8: keep ob->flag and ob->base_flag in sync, else there were problems

Martin Felke noreply at git.blender.org
Fri Aug 31 23:09:22 CEST 2018


Commit: 433fac8f1e85286d008f634f5b18f5d4dc123937
Author: Martin Felke
Date:   Tue Aug 28 12:44:27 2018 +0200
Branches: temp-fracture-modifier-2.8
https://developer.blender.org/rB433fac8f1e85286d008f634f5b18f5d4dc123937

keep ob->flag and ob->base_flag in sync, else there were problems

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

M	source/blender/blenkernel/intern/rigidbody.c
M	source/blender/modifiers/intern/MOD_fracture.c

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

diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index 1ced24517ce..0d1ac4c90d2 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -2259,6 +2259,7 @@ void BKE_rigidbody_rebuild_sim(Depsgraph *depsgraph,
 	//Scene *scene = DEG_get_original_id(&sc->id);
 
 	DEG_debug_print_eval_time(depsgraph, __func__, scene->id.name, scene, ctime);
+
 	/* rebuild sim data (i.e. after resetting to start of timeline) */
 	if (BKE_scene_check_rigidbody_active(scene)) {
 		BKE_rigidbody_rebuild_world(depsgraph, scene, ctime);
@@ -2284,9 +2285,11 @@ void BKE_rigidbody_object_sync_transforms(Depsgraph *depsgraph,
 										  Scene *scene,
 										  Object *ob)
 {
-	//Scene *scene = DEG_get_original_id(&sc->id);
-	//RigidBodyWorld *rbw = scene->rigidbody_world;
 	float ctime = DEG_get_ctime(depsgraph);
+
+	//base flag update hack...seems it lacks some important synchronization here
+	ob->flag = ob->base_flag;
+
 	DEG_debug_print_eval_time(depsgraph, __func__, ob->id.name, ob, ctime);
 	/* read values pushed into RBO from sim/cache... */
 	BKE_rigidbody_sync_transforms(scene, ob, ctime);
diff --git a/source/blender/modifiers/intern/MOD_fracture.c b/source/blender/modifiers/intern/MOD_fracture.c
index 40965636e76..8bed99bd21c 100644
--- a/source/blender/modifiers/intern/MOD_fracture.c
+++ b/source/blender/modifiers/intern/MOD_fracture.c
@@ -283,21 +283,6 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte
 		}
 		FOREACH_COLLECTION_OBJECT_RECURSIVE_END;
 	}
-
-	if (ctx->scene->rigidbody_world && ctx->scene->rigidbody_world->group) {
-		FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(ctx->scene->rigidbody_world->group, obj)
-		{
-			if (ctx->object != obj) {
-				DEG_add_object_relation(ctx->node, obj, DEG_OB_COMP_TRANSFORM, "Fracture Modifier RBW");
-				DEG_add_object_relation(ctx->node, obj, DEG_OB_COMP_GEOMETRY, "Fracture Modifier RBW");
-			}
-		}
-		FOREACH_COLLECTION_OBJECT_RECURSIVE_END;
-	}
-
-	/* We need own transformation as well. */
-	//DEG_add_object_relation(ctx->node, ctx->object, DEG_OB_COMP_TRANSFORM, "Fracture Modifier");
-	//DEG_add_object_relation(ctx->node, ctx->object, DEG_OB_COMP_GEOMETRY, "Fracture Modifier");
 }
 
 static void foreachObjectLink(



More information about the Bf-blender-cvs mailing list