diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-25 00:46:00 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-25 00:46:00 +0400 |
commit | 8651e6fba7706beba750ab5d2c3ee2817283e4f6 (patch) | |
tree | 7f05ca11cd647daa82973ef4b25940c931103439 /source/blender/makesrna/intern/rna_object_force.c | |
parent | ed6aaace52564ab686f4bfdd682bf85c4eb78c66 (diff) |
Fix part of #29310: secondary point caches for cloth did not get steps
set to correct default, was 10 when supposed to be 1.
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_force.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object_force.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index 592c3baec46..2997acd2267 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -214,21 +214,16 @@ static void rna_Cache_idname_change(Main *UNUSED(bmain), Scene *UNUSED(scene), P static void rna_Cache_list_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) { - Object *ob = ptr->id.data; PointCache *cache= ptr->data; - PTCacheID *pid; - ListBase pidlist; + ListBase lb; - BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0); + while(cache->prev) + cache= cache->prev; - for(pid=pidlist.first; pid; pid=pid->next) { - if(pid->cache == cache) { - rna_iterator_listbase_begin(iter, pid->ptcaches, NULL); - break; - } - } + lb.first= cache; + lb.last= NULL; /* not used by listbase_begin */ - BLI_freelistN(&pidlist); + rna_iterator_listbase_begin(iter, &lb, NULL); } static void rna_Cache_active_point_cache_index_range(PointerRNA *ptr, int *min, int *max) { @@ -308,8 +303,7 @@ static void rna_PointCache_frame_step_range(PointerRNA *ptr, int *min, int *max) for(pid=pidlist.first; pid; pid=pid->next) { if(pid->cache == cache) { - if(ELEM3(pid->type, PTCACHE_TYPE_CLOTH, PTCACHE_TYPE_SMOKE_DOMAIN, PTCACHE_TYPE_SMOKE_HIGHRES)) - *max= 1; + *max= pid->max_step; break; } } |