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>2018-06-04 10:39:04 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-04 10:39:04 +0300
commit95011f6d484b369db92ae13c674a6522d664ea8f (patch)
tree91ba2719c9f3096fad0f1f768aa7b1c4d79aa32a /source/blender/editors/object/object_group.c
parent0911acb5cf49c5ba05b1df045b41697704aa288a (diff)
parent44505b38df557a5711703613685a1dec9fc2c3d9 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/object/object_group.c')
-rw-r--r--source/blender/editors/object/object_group.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c
index 0a6a81d99da..debbe4bd379 100644
--- a/source/blender/editors/object/object_group.c
+++ b/source/blender/editors/object/object_group.c
@@ -182,7 +182,7 @@ void COLLECTION_OT_objects_add_active(wmOperatorType *ot)
ot->name = "Add Selected To Active Collection";
ot->description = "Add the object to an object collection that contains the active object";
ot->idname = "COLLECTION_OT_objects_add_active";
-
+
/* api callbacks */
ot->exec = objects_add_active_exec;
ot->invoke = WM_menu_invoke;
@@ -207,10 +207,10 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op)
Collection *single_collection = collection_object_active_find_index(bmain, ob, single_collection_index);
Collection *collection;
bool ok = false;
-
+
if (ob == NULL)
return OPERATOR_CANCELLED;
-
+
/* linking to same collection requires its own loop so we can avoid
* looking up the active objects collections each time */
@@ -228,13 +228,13 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op)
CTX_DATA_END;
}
}
-
+
if (!ok)
BKE_report(op->reports, RPT_ERROR, "Active object contains no collections");
-
+
DEG_relations_tag_update(bmain);
WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL);
-
+
return OPERATOR_FINISHED;
}
@@ -246,12 +246,12 @@ void COLLECTION_OT_objects_remove_active(wmOperatorType *ot)
ot->name = "Remove Selected From Active Collection";
ot->description = "Remove the object from an object collection that contains the active object";
ot->idname = "COLLECTION_OT_objects_remove_active";
-
+
/* api callbacks */
ot->exec = objects_remove_active_exec;
ot->invoke = WM_menu_invoke;
ot->poll = ED_operator_objectmode;
-
+
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -274,7 +274,7 @@ static int collection_objects_remove_all_exec(bContext *C, wmOperator *UNUSED(op
DEG_relations_tag_update(bmain);
WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL);
-
+
return OPERATOR_FINISHED;
}
@@ -284,11 +284,11 @@ void COLLECTION_OT_objects_remove_all(wmOperatorType *ot)
ot->name = "Remove From All Unlinked Collections";
ot->description = "Remove selected objects from all collections not used in a scene";
ot->idname = "COLLECTION_OT_objects_remove_all";
-
+
/* api callbacks */
ot->exec = collection_objects_remove_all_exec;
ot->poll = ED_operator_objectmode;
-
+
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
@@ -357,11 +357,11 @@ static int collection_create_exec(bContext *C, wmOperator *op)
{
Main *bmain = CTX_data_main(C);
char name[MAX_ID_NAME - 2]; /* id name */
-
+
RNA_string_get(op->ptr, "name", name);
-
+
Collection *collection = BKE_collection_add(bmain, NULL, name);
-
+
CTX_DATA_BEGIN (C, Base *, base, selected_bases)
{
BKE_collection_object_add(bmain, collection, base->object);
@@ -370,7 +370,7 @@ static int collection_create_exec(bContext *C, wmOperator *op)
DEG_relations_tag_update(bmain);
WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL);
-
+
return OPERATOR_FINISHED;
}
@@ -380,14 +380,14 @@ void COLLECTION_OT_create(wmOperatorType *ot)
ot->name = "Create New Collection";
ot->description = "Create an object collection from selected objects";
ot->idname = "COLLECTION_OT_create";
-
+
/* api callbacks */
ot->exec = collection_create_exec;
ot->poll = ED_operator_objectmode;
-
+
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-
+
RNA_def_string(ot->srna, "name", "Collection", MAX_ID_NAME - 2, "Name", "Name of the new collection");
}
@@ -415,7 +415,7 @@ void OBJECT_OT_collection_add(wmOperatorType *ot)
ot->name = "Add to Collection";
ot->idname = "OBJECT_OT_collection_add";
ot->description = "Add an object to a new collection";
-
+
/* api callbacks */
ot->exec = collection_add_exec;
ot->poll = ED_operator_objectmode;
@@ -466,7 +466,7 @@ void OBJECT_OT_collection_link(wmOperatorType *ot)
ot->name = "Link to Collection";
ot->idname = "OBJECT_OT_collection_link";
ot->description = "Add an object to an existing collection";
-
+
/* api callbacks */
ot->exec = collection_link_exec;
ot->invoke = WM_enum_search_invoke;
@@ -494,7 +494,7 @@ static int collection_remove_exec(bContext *C, wmOperator *UNUSED(op))
BKE_collection_object_remove(bmain, collection, ob, false);
WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
-
+
return OPERATOR_FINISHED;
}
@@ -504,7 +504,7 @@ void OBJECT_OT_collection_remove(wmOperatorType *ot)
ot->name = "Remove Collection";
ot->idname = "OBJECT_OT_collection_remove";
ot->description = "Remove the active object from this collection";
-
+
/* api callbacks */
ot->exec = collection_remove_exec;
ot->poll = ED_operator_objectmode;