svn merge -r39145:39286 https://svn.blender.org/svnroot/bf-blender/trunk/blender
authorCampbell Barton <ideasman42@gmail.com>
Thu, 11 Aug 2011 05:04:01 +0000 (05:04 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 11 Aug 2011 05:04:01 +0000 (05:04 +0000)
13 files changed:
1  2 
build_files/scons/config/darwin-config.py
release/scripts/startup/bl_ui/space_info.py
release/scripts/startup/bl_ui/space_userpref.py
source/blender/blenkernel/intern/writeffmpeg.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/object/object_relations.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_ops.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/rna_curve.c
source/blender/makesrna/intern/rna_userdef.c

@@@ -276,8 -275,31 +277,22 @@@ static void template_id_cb(bContext *C
                        }
                        break;
                case UI_ID_ALONE:
-                       if(id) 
-                               id_single_user(C, id, &template->ptr, template->prop);
+                       if(id) {
+                               const int do_scene_obj= (GS(id->name) == ID_OB) &&
+                                                       (template->ptr.type == &RNA_SceneObjects);
+                               /* make copy */
+                               if(do_scene_obj) {
+                                       Scene *scene= CTX_data_scene(C);
+                                       ED_object_single_user(scene, (struct Object *)id);
+                                       WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
+                               }
+                               else {
 -                                      if(id_copy(id, &newid, 0) && newid) {
 -                                              /* copy animation actions too */
 -                                              BKE_copy_animdata_id_action(id);
 -                                              /* us is 1 by convention, but RNA_property_pointer_set
 -                                                 will also incremement it, so set it to zero */
 -                                              newid->us= 0;
 -
 -                                              /* assign copy */
 -                                              RNA_id_pointer_create(newid, &idptr);
 -                                              RNA_property_pointer_set(&template->ptr, template->prop, idptr);
 -                                              RNA_property_update(C, &template->ptr, template->prop);
++                                      if(id) {
++                                              id_single_user(C, id, &template->ptr, template->prop);
+                                       }
+                               }
+                       }
                        break;
  #if 0
                case UI_ID_AUTO_NAME:
Simple merge