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/editors/object/object_relations.c')
-rw-r--r--source/blender/editors/object/object_relations.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index aaff55be8cf..c36fa7d512f 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1098,7 +1098,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
Scene *scene= CTX_data_scene(C);
View3D *v3d= CTX_wm_view3d(C);
unsigned int lay, local;
- int islamp= 0;
+ /* int islamp= 0; */ /* UNUSED */
lay= move_to_layer_init(C, op);
lay &= 0xFFFFFF;
@@ -1114,7 +1114,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
base->object->lay= lay;
base->object->flag &= ~SELECT;
base->flag &= ~SELECT;
- if(base->object->type==OB_LAMP) islamp= 1;
+ /* if(base->object->type==OB_LAMP) islamp= 1; */
}
CTX_DATA_END;
}
@@ -1126,7 +1126,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
local= base->lay & 0xFF000000;
base->lay= lay + local;
base->object->lay= lay;
- if(base->object->type==OB_LAMP) islamp= 1;
+ /* if(base->object->type==OB_LAMP) islamp= 1; */
}
CTX_DATA_END;
}
@@ -1404,6 +1404,20 @@ static void single_object_users(Scene *scene, View3D *v3d, int flag)
set_sca_new_poins();
}
+/* not an especially efficient function, only added so the single user
+ * button can be functional.*/
+void ED_object_single_user(Scene *scene, Object *ob)
+{
+ Base *base;
+
+ for(base= FIRSTBASE; base; base= base->next) {
+ if(base->object == ob) base->flag |= OB_DONE;
+ else base->flag &= ~OB_DONE;
+ }
+
+ single_object_users(scene, NULL, OB_DONE);
+}
+
static void new_id_matar(Material **matar, int totcol)
{
ID *id;