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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-05-31 17:04:04 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-05-31 17:04:04 +0300
commit16100f8261770e367b0892bb38c778699ed609fe (patch)
tree97232730f4680cd689cfa086c5434761c7dd33c7 /source/blender/editors/object/object_select.c
parentb53d358261a26652d510d62565f1b43035a55e67 (diff)
Cleanup: get rid of last G.main usages in BKE library code.
Diffstat (limited to 'source/blender/editors/object/object_select.c')
-rw-r--r--source/blender/editors/object/object_select.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index 8d5c2387fe9..440c9d01487 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -1076,6 +1076,7 @@ void OBJECT_OT_select_all(wmOperatorType *ot)
static int object_select_same_group_exec(bContext *C, wmOperator *op)
{
+ Main *bmain = CTX_data_main(C);
Group *group;
char group_name[MAX_ID_NAME];
@@ -1084,7 +1085,7 @@ static int object_select_same_group_exec(bContext *C, wmOperator *op)
RNA_string_get(op->ptr, "group", group_name);
- group = (Group *)BKE_libblock_find_name(ID_GR, group_name);
+ group = (Group *)BKE_libblock_find_name(bmain, ID_GR, group_name);
if (!group) {
return OPERATOR_PASS_THROUGH;
@@ -1123,6 +1124,7 @@ void OBJECT_OT_select_same_group(wmOperatorType *ot)
/**************************** Select Mirror ****************************/
static int object_select_mirror_exec(bContext *C, wmOperator *op)
{
+ Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
bool extend;
@@ -1135,7 +1137,7 @@ static int object_select_mirror_exec(bContext *C, wmOperator *op)
BLI_string_flip_side_name(name_flip, primbase->object->id.name + 2, true, sizeof(name_flip));
if (!STREQ(name_flip, primbase->object->id.name + 2)) {
- Object *ob = (Object *)BKE_libblock_find_name(ID_OB, name_flip);
+ Object *ob = (Object *)BKE_libblock_find_name(bmain, ID_OB, name_flip);
if (ob) {
Base *secbase = BKE_scene_base_find(scene, ob);