also fix for scene.objects.link() not setting library data as being directly used.
This commit is contained in:
@@ -437,9 +437,12 @@ static void modifier_object_set(Object *self, Object **ob_p, int type, PointerRN
|
||||
{
|
||||
Object *ob= value.data;
|
||||
|
||||
if(!self || ob != self)
|
||||
if(!ob || type == OB_EMPTY || ob->type == type)
|
||||
if(!self || ob != self) {
|
||||
if(!ob || type == OB_EMPTY || ob->type == type) {
|
||||
id_lib_extern((ID *)ob);
|
||||
*ob_p= ob;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void rna_LatticeModifier_object_set(PointerRNA *ptr, PointerRNA value)
|
||||
|
||||
@@ -222,7 +222,7 @@ static Base *rna_Scene_object_link(Scene *scene, bContext *C, ReportList *report
|
||||
}
|
||||
|
||||
base= scene_add_base(scene, ob);
|
||||
ob->id.us++;
|
||||
id_us_plus(&ob->id);
|
||||
|
||||
/* this is similar to what object_add_type and add_object do */
|
||||
base->lay= scene->lay;
|
||||
|
||||
Reference in New Issue
Block a user