[Bf-blender-cvs] [ed5de2b] alembic: Consider an empty keyblocks list to be a new key, so a Basis shape is added automatically.

Lukas Tönne noreply at git.blender.org
Mon May 4 13:05:58 CEST 2015


Commit: ed5de2ba08ab65cd17f09cdb816c0e6672f28025
Author: Lukas Tönne
Date:   Mon May 4 13:05:06 2015 +0200
Branches: alembic
https://developer.blender.org/rBed5de2ba08ab65cd17f09cdb816c0e6672f28025

Consider an empty keyblocks list to be a new key, so a Basis shape is
added automatically.

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

M	source/blender/blenkernel/intern/cache_library.c

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

diff --git a/source/blender/blenkernel/intern/cache_library.c b/source/blender/blenkernel/intern/cache_library.c
index 5fa0ead..f187282 100644
--- a/source/blender/blenkernel/intern/cache_library.c
+++ b/source/blender/blenkernel/intern/cache_library.c
@@ -1287,13 +1287,16 @@ KeyBlock *BKE_cache_modifier_strands_key_insert_key(StrandsKeyCacheModifier *skm
 {
 	Key *key = skmd->key;
 	KeyBlock *kb;
-	bool newkey = 0;
+	bool newkey = false;
 	
 	if (key == NULL) {
 		key = skmd->key = BKE_key_add_ex(NULL, KEY_FROMTYPE_STRANDS);
 		key->type = KEY_RELATIVE;
 		newkey = true;
 	}
+	else if (BLI_listbase_is_empty(&key->block)) {
+		newkey = true;
+	}
 	
 	if (newkey || from_mix == false) {
 		/* create from mesh */




More information about the Bf-blender-cvs mailing list