Commit: f01afd7e2e190b54f7550014252129124d143c25
Author: Kévin Dietrich
Date: Sat May 23 05:18:25 2015 +0200
Branches: openvdb
https://developer.blender.org/rBf01afd7e2e190b54f7550014252129124d143c25
Fix for cache not being set as current when deleting the first in the
list.
===================================================================
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 cd349d7..afe3a9f 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -2556,7 +2556,7 @@ static int openvdb_cache_remove_exec(bContext *C,
wmOperator *op)
Object *ob = ED_object_active_context(C);
SmokeModifierData *smd = (SmokeModifierData *)modifiers_findByType(ob,
eModifierType_Smoke);
SmokeDomainSettings *sds = smd->domain;
- OpenVDBCache *cache, *cache_prev = NULL;
+ OpenVDBCache *cache, *cache_prev = NULL, *cache_next = NULL;
if (!smd) {
return OPERATOR_CANCELLED;
@@ -2566,11 +2566,15 @@ static int openvdb_cache_remove_exec(bContext *C,
wmOperator *op)
if (cache) {
cache_prev = cache->prev;
+ cache_next = cache->next;
BLI_remlink(&sds->vdb_caches, cache);
MEM_freeN(cache);
}
- if (cache_prev) {
+ if (cache_next) {
+ cache_next->flag |= VDB_CACHE_CURRENT;
+ }
+ else if (cache_prev) {
cache_prev->flag |= VDB_CACHE_CURRENT;
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs