[Bf-blender-cvs] [f33286c] gooseberry: Merge branch 'alembic' into gooseberry

Campbell Barton noreply at git.blender.org
Thu May 7 16:22:49 CEST 2015


Commit: f33286c48fe3e5aa59b03bcb6028f81c36958c64
Author: Campbell Barton
Date:   Fri May 8 00:15:43 2015 +1000
Branches: gooseberry
https://developer.blender.org/rBf33286c48fe3e5aa59b03bcb6028f81c36958c64

Merge branch 'alembic' into gooseberry

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



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

diff --cc source/blender/makesrna/intern/rna_key.c
index 9d193fa,b513ea0..43ae695
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@@ -376,31 -377,21 +378,39 @@@ static void rna_Key_update_data(Main *b
  {
  	Key *key = ptr->id.data;
  	Object *ob;
+ 	CacheLibrary *cachelib;
  
 -	for (ob = bmain->object.first; ob; ob = ob->id.next) {
 -		if (BKE_key_from_object(ob) == key) {
 -			DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
 -			WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob);
 +	switch (key->from_extra.type) {
 +	case KEY_OWNER_MESH:
 +	case KEY_OWNER_CURVE:
 +	case KEY_OWNER_LATTICE:
 +		for (ob = bmain->object.first; ob; ob = ob->id.next) {
 +			if (BKE_key_from_object(ob) == key) {
 +				DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
 +				WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob);
 +			}
 +		}
 +		break;
 +	case KEY_OWNER_PARTICLES:
 +		for (ob = bmain->object.first; ob; ob = ob->id.next) {
 +			ParticleSystem *psys;
 +			for (psys = ob->particlesystem.first; psys; psys = psys->next) {
 +				if (psys->key == key) {
 +					psys->recalc |= PSYS_RECALC_REDO;
 +					DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
 +					WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, ob);
 +				}
 +			}
  		}
 +		break;
  	}
+ 	
+ 	for (cachelib = bmain->cache_library.first; cachelib; cachelib = cachelib->id.next) {
+ 		if (BKE_cache_library_uses_key(cachelib, key)) {
+ 			DAG_id_tag_update(&cachelib->id, OB_RECALC_DATA);
+ 			WM_main_add_notifier(NC_WINDOW, NULL);
+ 		}
+ 	}
  }
  
  static KeyBlock *rna_ShapeKeyData_find_keyblock(Key *key, float *point)




More information about the Bf-blender-cvs mailing list