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:
authorCampbell Barton <ideasman42@gmail.com>2012-07-05 15:37:04 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-05 15:37:04 +0400
commit2442bcf80707234afdd9013348793768f4ae03f2 (patch)
treedbae2d87259836f04db07e56197f956cfd8474a9 /source/blender/editors/object/object_relations.c
parente62ec9261ca3a63926852265e3cc154540bb3d0f (diff)
add the ability to make objects and obdata local but not materials.
Diffstat (limited to 'source/blender/editors/object/object_relations.c')
-rw-r--r--source/blender/editors/object/object_relations.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index fc0aa39e733..651f84f0f34 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1742,7 +1742,7 @@ static int make_local_exec(bContext *C, wmOperator *op)
ID *id;
int a, b, mode = RNA_enum_get(op->ptr, "type");
- if (mode == 3) {
+ if (mode == 4) {
BKE_library_make_local(bmain, NULL, 0); /* NULL is all libs */
WM_event_add_notifier(C, NC_WINDOW, NULL);
return OPERATOR_FINISHED;
@@ -1770,7 +1770,7 @@ static int make_local_exec(bContext *C, wmOperator *op)
{
id = ob->data;
- if (id && mode > 1) {
+ if (id && (mode == 2 || mode == 3)) {
id_make_local(id, 0);
adt = BKE_animdata_from_id(id);
if (adt) BKE_animdata_make_local(adt);
@@ -1794,7 +1794,7 @@ static int make_local_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
- if (mode > 1) {
+ if (mode == 3) {
CTX_DATA_BEGIN (C, Object *, ob, selected_objects)
{
if (ob->type == OB_LAMP) {
@@ -1834,7 +1834,8 @@ void OBJECT_OT_make_local(wmOperatorType *ot)
static EnumPropertyItem type_items[] = {
{1, "SELECTED_OBJECTS", 0, "Selected Objects", ""},
{2, "SELECTED_OBJECTS_DATA", 0, "Selected Objects and Data", ""},
- {3, "ALL", 0, "All", ""},
+ {3, "SELECTED_OBJECTS_DATA_MAT", 0, "Selected Objects, Data and Materials", ""},
+ {4, "ALL", 0, "All", ""},
{0, NULL, 0, NULL, NULL}};
/* identifiers */