diff options
author | Janne Karhu <jhkarh@gmail.com> | 2010-09-23 15:29:58 +0400 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2010-09-23 15:29:58 +0400 |
commit | 6fdd00f7096aff680641177a3820473de050a3b6 (patch) | |
tree | 47c4ed2e52ab02c2b61e8e6b1d3ad651216a8705 /source/blender/editors/animation | |
parent | 7cbed194f425761fbc85b4dd584bad9249c1fd93 (diff) |
Fix for [#22598] Animated texture properties do not appear in IPO if no material properties are also animated
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 0ff75c1cded..3468d81067d 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -1389,8 +1389,23 @@ static int animdata_filter_dopesheet_mats (bAnimContext *ac, ListBase *anim_data short ok = 0; /* for now, if no material returned, skip (this shouldn't confuse the user I hope) */ - if (ELEM(NULL, ma, ma->adt)) - continue; + if (ma == NULL) continue; + if (ma->adt == NULL) { + /* need to check textures */ + if(ma->mtex) { + MTex **mtex = ma->mtex; + int a; + for (a=0; a < MAX_MTEX; a++) { + if (ELEM3(NULL, mtex[a], mtex[a]->tex, mtex[a]->tex->adt)) + continue; + else + ok=1; + } + } + else + continue; + } + /* check if ok */ ANIMDATA_FILTER_CASES(ma, @@ -1407,7 +1422,6 @@ static int animdata_filter_dopesheet_mats (bAnimContext *ac, ListBase *anim_data } /* if there were no channels found, no need to carry on */ - // XXX: textures with no animated owner material won't work because of this... if (mats.first == NULL) return 0; @@ -2399,11 +2413,24 @@ static int animdata_filter_dopesheet (bAnimContext *ac, ListBase *anim_data, bDo /* firstly check that we actuallly have some materials */ for (a=0; a < ob->totcol; a++) { Material *ma= give_current_material(ob, a); + int mtInd; if ((ma) && ANIMDATA_HAS_KEYS(ma)) { matOk= 1; break; } + + for (mtInd= 0; mtInd < MAX_MTEX; mtInd++) { + MTex *mtex= ma->mtex[mtInd]; + + if (mtex && mtex->tex && ANIMDATA_HAS_KEYS(mtex->tex)) { + matOk= 1; + break; + } + } + + if(matOk) + break; } } |