Merged changes in the trunk up to revision 34010.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sun, 2 Jan 2011 18:34:32 +0000 (18:34 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sun, 2 Jan 2011 18:34:32 +0000 (18:34 +0000)
16 files changed:
1  2 
release/scripts/ui/properties_render.py
release/scripts/ui/space_dopesheet.py
release/scripts/ui/space_userpref.py
source/blender/blenkernel/BKE_main.h
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/animation/keyframes_draw.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/space_outliner/outliner.c
source/blender/makesrna/RNA_types.h
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_internal.h
source/blender/makesrna/intern/rna_scene.c
source/blender/python/intern/CMakeLists.txt
source/blender/render/intern/source/pipeline.c

Simple merge
Simple merge
Simple merge
index 0e5763e30344ef0e938346531f23941b87ce5479,1ddf6a73abd7e03399b6638ed78180d1f6965dc5..49d3ca833dd7f340fb6d97de65d3c9cb106faad5
@@@ -475,37 -645,64 +646,67 @@@ void BKE_animdata_main_cb (Main *mainpt
                AnimData *adt= BKE_animdata_from_id(id); \
                if (adt) func(id, adt, user_data); \
        }
 -      
 +
-       ANIMDATA_IDS_CB(main->nodetree.first);  /* nodes */
-       ANIMDATA_IDS_CB(main->tex.first);               /* textures */
-       ANIMDATA_IDS_CB(main->lamp.first);              /* lamps */
-       ANIMDATA_IDS_CB(main->mat.first);               /* materials */
-       ANIMDATA_IDS_CB(main->camera.first);    /* cameras */
-       ANIMDATA_IDS_CB(main->key.first);               /* shapekeys */
-       ANIMDATA_IDS_CB(main->mball.first);             /* metaballs */
-       ANIMDATA_IDS_CB(main->curve.first);             /* curves */
-       ANIMDATA_IDS_CB(main->armature.first);  /* armatures */
-       ANIMDATA_IDS_CB(main->mesh.first);              /* meshes */
-       ANIMDATA_IDS_CB(main->particle.first);  /* particles */
-       ANIMDATA_IDS_CB(main->object.first);    /* objects */
-       ANIMDATA_IDS_CB(main->world.first);             /* worlds */
-       ANIMDATA_IDS_CB(main->linestyle.first); /* linestyles */
+       /* "embedded" nodetree cases (i.e. scene/material/texture->nodetree) */
+ #define ANIMDATA_NODETREE_IDS_CB(first, NtId_Type) \
+       for (id= first; id; id= id->next) { \
+               AnimData *adt= BKE_animdata_from_id(id); \
+               NtId_Type *ntp= (NtId_Type *)id; \
+               if (ntp->nodetree) { \
+                       AnimData *adt2= BKE_animdata_from_id((ID *)ntp); \
+                       if (adt2) func(id, adt2, user_data); \
+               } \
+               if (adt) func(id, adt, user_data); \
+       }
 -      
 +
-       /* scenes */
-       for (id= main->scene.first; id; id= id->next) {
-               AnimData *adt= BKE_animdata_from_id(id);
-               Scene *scene= (Scene *)id;
+       /* nodes */
+       ANIMDATA_IDS_CB(mainptr->nodetree.first);
 -      
 +              
-               /* do compositing nodes first (since these aren't included in main tree) */
-               if (scene->nodetree) {
-                       AnimData *adt2= BKE_animdata_from_id((ID *)scene->nodetree);
-                       if (adt2) func(id, adt2, user_data);
-               }
+       /* textures */
+       ANIMDATA_NODETREE_IDS_CB(mainptr->tex.first, Tex);
 -      
 +              
-               /* now fix scene animation data as per normal */
-               if (adt) func((ID *)id, adt, user_data);
+       /* lamps */
+       ANIMDATA_IDS_CB(mainptr->lamp.first);
+       
+       /* materials */
+       ANIMDATA_NODETREE_IDS_CB(mainptr->mat.first, Material);
+       
+       /* cameras */
+       ANIMDATA_IDS_CB(mainptr->camera.first);
+       
+       /* shapekeys */
+       ANIMDATA_IDS_CB(mainptr->key.first);
+       
+       /* metaballs */
+       ANIMDATA_IDS_CB(mainptr->mball.first);
+       
+       /* curves */
+       ANIMDATA_IDS_CB(mainptr->curve.first);
+       
+       /* armatures */
+       ANIMDATA_IDS_CB(mainptr->armature.first);
+       
+       /* lattices */
+       ANIMDATA_IDS_CB(mainptr->latt.first);
+       
+       /* meshes */
+       ANIMDATA_IDS_CB(mainptr->mesh.first);
+       
+       /* particles */
+       ANIMDATA_IDS_CB(mainptr->particle.first);
+       
+       /* objects */
+       ANIMDATA_IDS_CB(mainptr->object.first);
+       
+       /* worlds */
+       ANIMDATA_IDS_CB(mainptr->world.first);
+       
+       /* scenes */
+       ANIMDATA_NODETREE_IDS_CB(mainptr->scene.first, Scene);
 -}
++      
++      /* line styles */
++      ANIMDATA_IDS_CB(mainptr->linestyle.first);
 +      }
- }
  
  /* Fix all RNA-Paths throughout the database (directly access the Global.main version)
   * NOTE: it is assumed that the structure we're replacing is <prefix><["><name><"]>
@@@ -566,25 -778,10 +782,13 @@@ void BKE_all_animdata_fix_paths_rename 
        /* worlds */
        RENAMEFIX_ANIM_IDS(mainptr->world.first);
        
 +      /* linestyles */
 +      RENAMEFIX_ANIM_IDS(mainptr->linestyle.first);
 +      
        /* scenes */
-       for (id= mainptr->scene.first; id; id= id->next) {
-               AnimData *adt= BKE_animdata_from_id(id);
-               Scene *scene= (Scene *)id;
-               
-               /* do compositing nodes first (since these aren't included in main tree) */
-               if (scene->nodetree) {
-                       AnimData *adt2= BKE_animdata_from_id((ID *)scene->nodetree);
-                       BKE_animdata_fix_paths_rename((ID *)scene->nodetree, adt2, prefix, oldName, newName, 0, 0, 1);
+       RENAMEFIX_ANIM_NODETREE_IDS(mainptr->scene.first, Scene);
 -}
 -
 +              }
 +              
-               /* now fix scene animation data as per normal */
-               BKE_animdata_fix_paths_rename((ID *)id, adt, prefix, oldName, newName, 0, 0, 1);
-       }
- }
  /* *********************************** */ 
  /* KeyingSet API */
  
Simple merge