Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r--source/blender/blenkernel/intern/object.c31
1 files changed, 9 insertions, 22 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 2b6db72bd07..6e09aefeea2 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -758,9 +756,7 @@ void make_local_camera(Camera *cam)
if(cam->id.lib==NULL) return;
if(cam->id.us==1) {
- cam->id.lib= NULL;
- cam->id.flag= LIB_LOCAL;
- new_id(&bmain->camera, (ID *)cam, NULL);
+ id_clear_lib_data(&bmain->camera, (ID *)cam);
return;
}
@@ -772,9 +768,7 @@ void make_local_camera(Camera *cam)
}
if(local && lib==0) {
- cam->id.lib= NULL;
- cam->id.flag= LIB_LOCAL;
- new_id(&bmain->camera, (ID *)cam, NULL);
+ id_clear_lib_data(&bmain->camera, (ID *)cam);
}
else if(local && lib) {
Camera *camn= copy_camera(cam);
@@ -923,9 +917,7 @@ void make_local_lamp(Lamp *la)
if(la->id.lib==NULL) return;
if(la->id.us==1) {
- la->id.lib= NULL;
- la->id.flag= LIB_LOCAL;
- new_id(&bmain->lamp, (ID *)la, NULL);
+ id_clear_lib_data(&bmain->lamp, (ID *)la);
return;
}
@@ -939,9 +931,7 @@ void make_local_lamp(Lamp *la)
}
if(local && lib==0) {
- la->id.lib= NULL;
- la->id.flag= LIB_LOCAL;
- new_id(&bmain->lamp, (ID *)la, NULL);
+ id_clear_lib_data(&bmain->lamp, (ID *)la);
}
else if(local && lib) {
lan= copy_lamp(la);
@@ -1093,6 +1083,7 @@ Object *add_only_object(int type, const char *name)
/* ob->pad3 == Contact Processing Threshold */
ob->m_contactProcessingThreshold = 1.;
ob->obstacleRad = 1.;
+ ob->col_group = ob->col_mask = 1;
/* NT fluid sim defaults */
ob->fluidsimFlag = 0;
@@ -1470,9 +1461,8 @@ void make_local_object(Object *ob)
ob->proxy= ob->proxy_from= NULL;
if(ob->id.us==1) {
- ob->id.lib= NULL;
- ob->id.flag= LIB_LOCAL;
- new_id(&bmain->object, (ID *)ob, NULL);
+ id_clear_lib_data(&bmain->object, (ID *)ob);
+ extern_local_object(ob);
}
else {
for(sce= bmain->scene.first; sce && ELEM(0, lib, local); sce= sce->id.next) {
@@ -1483,9 +1473,8 @@ void make_local_object(Object *ob)
}
if(local && lib==0) {
- ob->id.lib= NULL;
- ob->id.flag= LIB_LOCAL;
- new_id(&bmain->object, (ID *)ob, NULL);
+ id_clear_lib_data(&bmain->object, (ID *)ob);
+ extern_local_object(ob);
}
else if(local && lib) {
Object *obn= copy_object(ob);
@@ -1508,8 +1497,6 @@ void make_local_object(Object *ob)
}
}
}
-
- extern_local_object(ob);
}
/*