Merge branch 'master' into blender2.8
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 16 Mar 2017 14:42:49 +0000 (15:42 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 16 Mar 2017 14:42:49 +0000 (15:42 +0100)
1  2 
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_nodes_scene.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/depsgraph/intern/builder/deg_builder_relations_scene.cc
source/blender/editors/render/render_preview.c
source/blender/windowmanager/WM_types.h
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_init_exit.c

index 4c84ac417ef6d977dcf99d97c50c9517640b2cab,7bcaee61fe0e9e20e2ffcd388fa7ec203d71f4d9..b6071b10757dd1003021c2187006815532f2dae7
@@@ -495,10 -494,21 +495,21 @@@ void DepsgraphNodeBuilder::build_object
                build_particles(scene, ob);
        }
  
-       /* grease pencil */
-       if (ob->gpd) {
+       /* Grease pencil. */
+       if (ob->gpd != NULL) {
                build_gpencil(ob->gpd);
        }
 -              build_object(scene, base, ob->proxy);
+       /* Object that this is a proxy for. */
+       if (ob->proxy) {
+               ob->proxy->proxy_from = ob;
 -              build_group(scene, base, ob->dup_group);
++              build_object(scene, ob->proxy);
+       }
+       /* Object dupligroup. */
+       if (ob->dup_group != NULL) {
++              build_group(scene, ob->dup_group);
+       }
  }
  
  void DepsgraphNodeBuilder::build_object_transform(Scene *scene, Object *ob)
index f4a191067ca2889b9901ba7912ca2499909ddc28,7dd694cb570762ddd2bfcc98acc5d62124c1a814..2141f7f6499a052eb44b3159ff220b11c73031c3
@@@ -80,24 -79,10 +80,12 @@@ void DepsgraphNodeBuilder::build_scene(
        }
  
        /* scene objects */
 -      LINKLIST_FOREACH (Base *, base, &scene->base) {
 -              Object *ob = base->object;
 -              build_object(scene, base, ob);
 +      FOREACH_SCENE_OBJECT(scene, ob)
 +      {
 +              /* object itself */
 +              build_object(scene, ob);
-               /* object that this is a proxy for */
-               // XXX: the way that proxies work needs to be completely reviewed!
-               if (ob->proxy) {
-                       ob->proxy->proxy_from = ob;
-                       build_object(scene, ob->proxy);
-               }
-               /* Object dupligroup. */
-               if (ob->dup_group) {
-                       build_group(scene, ob->dup_group);
-               }
        }
 +      FOREACH_SCENE_OBJECT_END
  
        /* rigidbody */
        if (scene->rigidbody_world) {
index f0d70e3871b3945d5a77a3b0d1d4227be2e3089d,3bf435c37e050f4c3b214102e6291c139d3d1ded..2e2182609d5b60b0544a6e33eebc00079b098a5a
@@@ -75,29 -74,10 +75,11 @@@ void DepsgraphRelationBuilder::build_sc
        }
  
        /* scene objects */
 -      LINKLIST_FOREACH (Base *, base, &scene->base) {
 -              Object *ob = base->object;
 +      FOREACH_SCENE_OBJECT(scene, ob)
 +      {
-               /* object itself */
                build_object(bmain, scene, ob);
-               /* object that this is a proxy for */
-               if (ob->proxy) {
-                       ob->proxy->proxy_from = ob;
-                       build_object(bmain, scene, ob->proxy);
-                       /* TODO(sergey): This is an inverted relation, matches old depsgraph
-                        * behavior and need to be investigated if it still need to be inverted.
-                        */
-                       ComponentKey ob_pose_key(&ob->id, DEPSNODE_TYPE_EVAL_POSE);
-                       ComponentKey proxy_pose_key(&ob->proxy->id, DEPSNODE_TYPE_EVAL_POSE);
-                       add_relation(ob_pose_key, proxy_pose_key, DEPSREL_TYPE_TRANSFORM, "Proxy");
-               }
-               /* Object dupligroup. */
-               if (ob->dup_group) {
-                       build_group(bmain, scene, ob, ob->dup_group);
-               }
        }
 +      FOREACH_SCENE_OBJECT_END
  
        /* rigidbody */
        if (scene->rigidbody_world) {