[Bf-blender-cvs] [76b5f3d] openvdb: Avoid recalculating the object's data when a new cache is added.

Kévin Dietrich noreply at git.blender.org
Fri Jun 5 14:07:48 CEST 2015


Commit: 76b5f3d1f743a8c94d09ae4c02a4c360355f5d46
Author: Kévin Dietrich
Date:   Sat May 23 05:19:45 2015 +0200
Branches: openvdb
https://developer.blender.org/rB76b5f3d1f743a8c94d09ae4c02a4c360355f5d46

Avoid recalculating the object's data when a new cache is added.

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

M	source/blender/editors/object/object_modifier.c

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

diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index afe3a9f..d36f87b 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -2528,8 +2528,7 @@ static int openvdb_cache_add_exec(bContext *C, wmOperator *op)
 
 	BLI_addtail(&sds->vdb_caches, cache_new);
 
-	DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
-	WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
+	WM_event_add_notifier(C, NC_OBJECT | ND_POINTCACHE, ob);
 
 	return OPERATOR_FINISHED;
 
@@ -2578,7 +2577,7 @@ static int openvdb_cache_remove_exec(bContext *C, wmOperator *op)
 		cache_prev->flag |= VDB_CACHE_CURRENT;
 	}
 
-	DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
+	WM_event_add_notifier(C, NC_OBJECT | ND_POINTCACHE, ob);
 
 	return OPERATOR_FINISHED;
 
@@ -2632,7 +2631,7 @@ static int openvdb_cache_move_exec(bContext *C, wmOperator *op)
 		}
 	}
 
-	DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
+	WM_event_add_notifier(C, NC_OBJECT | ND_POINTCACHE, ob);
 
 	return OPERATOR_FINISHED;
 }




More information about the Bf-blender-cvs mailing list