Bugfix [#29806] World nodetrees not included in Animation Editor filtering
authorJoshua Leung <aligorith@gmail.com>
Fri, 6 Jan 2012 04:03:31 +0000 (04:03 +0000)
committerJoshua Leung <aligorith@gmail.com>
Fri, 6 Jan 2012 04:03:31 +0000 (04:03 +0000)
This was mostly only a problem when using Cycles, where NodeTrees are used to
control the world settings.

Also needed to knock out a few remnants of some bygone attempted optimisation
attempts which were preventing this from working (i.e. if a world block didn't
have any animdata, it's child nodetree would never get seen/tested). These
worked ok in the past, but are not that flexible for extension.

source/blender/editors/animation/anim_filter.c

index 45b715c406a96596e92b87400f6e3799ce07a398..b84ec5427c50a7ee6373b7e41a9ab7626c1f885f 100644 (file)
@@ -1852,6 +1852,10 @@ static size_t animdata_filter_ds_world (bAnimContext *ac, ListBase *anim_data, b
                /* textures for world */
                if (!(ads->filterflag & ADS_FILTER_NOTEX))
                        items += animdata_filter_ds_textures(ac, &tmp_data, ads, (ID *)wo, filter_mode);
+                       
+               /* nodes */
+               if ((wo->nodetree) && !(ads->filterflag & ADS_FILTER_NONTREE)) 
+                       tmp_items += animdata_filter_ds_nodetree(ac, &tmp_data, ads, (ID *)wo, wo->nodetree, filter_mode);
        }
        END_ANIMFILTER_SUBCHANNELS;
        
@@ -1947,12 +1951,12 @@ static size_t animdata_filter_dopesheet_scene (bAnimContext *ac, ListBase *anim_
                }
                
                /* world */
-               if ((wo && wo->adt) && !(ads->filterflag & ADS_FILTER_NOWOR)) {
+               if ((wo) && !(ads->filterflag & ADS_FILTER_NOWOR)) {
                        tmp_items += animdata_filter_ds_world(ac, &tmp_data, ads, sce, wo, filter_mode);
                }
                
                /* nodetree */
-               if ((ntree && ntree->adt) && !(ads->filterflag & ADS_FILTER_NONTREE)) {
+               if ((ntree) && !(ads->filterflag & ADS_FILTER_NONTREE)) {
                        tmp_items += animdata_filter_ds_nodetree(ac, &tmp_data, ads, (ID *)sce, ntree, filter_mode);
                }