[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32074] trunk/blender/source/blender/ editors/animation/anim_filter.c: Fix for [#22598] Animated texture properties do not appear in IPO if no material properties are also animated
Janne Karhu
jhkarh at gmail.com
Thu Sep 23 13:29:58 CEST 2010
Revision: 32074
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32074
Author: jhk
Date: 2010-09-23 13:29:58 +0200 (Thu, 23 Sep 2010)
Log Message:
-----------
Fix for [#22598] Animated texture properties do not appear in IPO if no material properties are also animated
Modified Paths:
--------------
trunk/blender/source/blender/editors/animation/anim_filter.c
Modified: trunk/blender/source/blender/editors/animation/anim_filter.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_filter.c 2010-09-23 09:31:13 UTC (rev 32073)
+++ trunk/blender/source/blender/editors/animation/anim_filter.c 2010-09-23 11:29:58 UTC (rev 32074)
@@ -1389,9 +1389,24 @@
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,
{ /* AnimData blocks - do nothing... */ },
@@ -1407,7 +1422,6 @@
}
/* 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 @@
/* 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;
}
}
More information about the Bf-blender-cvs
mailing list