Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Fri, 19 Jan 2018 06:21:15 +0000 (17:21 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 19 Jan 2018 06:21:15 +0000 (17:21 +1100)
12 files changed:
1  2 
source/blender/blenkernel/BKE_world.h
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/armature/pose_select.c
source/blender/editors/render/render_preview.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_outliner/outliner_select.c
source/blender/makesdna/DNA_scene_types.h
source/blender/makesrna/intern/rna_access.c

Simple merge
index 1cd82a8cd4918f6ef457ee1f9b9720cb377db247,775eafb8fe26db1142ec9baf292eeb5cbc3ce869..87f8b568023a6bc258473eec507ea627334ce90f
@@@ -10304,26 -9976,26 +10304,26 @@@ static void give_base_to_objects
                        }
  
                        if (do_it) {
 -                              base = MEM_callocN(sizeof(Base), __func__);
 -                              BLI_addtail(&scene->base, base);
 +                              CLAMP_MIN(ob->id.us, 0);
  
 -                              if (active_lay) {
 -                                      ob->lay = active_lay;
 +                              if (scene_collection == NULL) {
 +                                      scene_collection = get_scene_collection_active_or_create(scene, view_layer, FILE_ACTIVE_COLLECTION);
                                }
 +
 +                              BKE_collection_object_add(&scene->id, scene_collection, ob);
 +                              base = BKE_view_layer_base_find(view_layer, ob);
 +                              BKE_scene_object_base_flag_sync_from_base(base);
 +
                                if (flag & FILE_AUTOSELECT) {
                                        /* Note that link_object_postprocess() already checks for FILE_AUTOSELECT flag,
-                                        * but it will miss objects from non-instanciated groups... */
+                                        * but it will miss objects from non-instantiated groups... */
 -                                      ob->flag |= SELECT;
 -                                      /* do NOT make base active here! screws up GUI stuff, if you want it do it on src/ level */
 +                                      if (base->flag & BASE_SELECTABLED) {
 +                                              base->flag |= BASE_SELECTED;
 +                                              BKE_scene_object_base_flag_sync_from_base(base);
 +                                      }
 +                                      /* Do NOT make base active here! screws up GUI stuff, if you want it do it on src/ level. */
                                }
  
 -                              base->object = ob;
 -                              base->lay = ob->lay;
 -                              base->flag = ob->flag;
 -
 -                              CLAMP_MIN(ob->id.us, 0);
 -                              id_us_plus_no_lib((ID *)ob);
 -
                                ob->id.tag &= ~LIB_TAG_INDIRECT;
                                ob->id.tag |= LIB_TAG_EXTERN;
                        }
index fcbb0986e09eaead9d3c3ca14fe3e5fc4d0c0aaa,12b9d273a47e77453554d48f74476b034a1f9627..e13177a862aadf30ceb9bf81602ef7c50bc04578
@@@ -97,10 -143,10 +97,10 @@@ static eOLDrawState tree_element_active
  
  /**
   * Select object tree:
-  * CTRL+LMB: Select/Deselect object and all cildren
-  * CTRL+SHIFT+LMB: Add/Remove object and all children
+  * CTRL+LMB: Select/Deselect object and all children.
+  * CTRL+SHIFT+LMB: Add/Remove object and all children.
   */
 -static void do_outliner_object_select_recursive(Scene *scene, Object *ob_parent, bool select)
 +static void do_outliner_object_select_recursive(ViewLayer *view_layer, Object *ob_parent, bool select)
  {
        Base *base;