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/space_node
parentb53d358261a26652d510d62565f1b43035a55e67 (diff)
Cleanup: get rid of last G.main usages in BKE library code.
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r--source/blender/editors/space_node/node_add.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/node_add.c b/source/blender/editors/space_node/node_add.c
index ec35727d176..2dcc69122dd 100644
--- a/source/blender/editors/space_node/node_add.c
+++ b/source/blender/editors/space_node/node_add.c
@@ -410,6 +410,7 @@ static int node_add_mask_poll(bContext *C)
static int node_add_mask_exec(bContext *C, wmOperator *op)
{
+ Main *bmain = CTX_data_main(C);
SpaceNode *snode = CTX_wm_space_node(C);
bNode *node;
ID *mask = NULL;
@@ -417,7 +418,7 @@ static int node_add_mask_exec(bContext *C, wmOperator *op)
/* check input variables */
char name[MAX_ID_NAME - 2];
RNA_string_get(op->ptr, "name", name);
- mask = BKE_libblock_find_name(ID_MSK, name);
+ mask = BKE_libblock_find_name(bmain, ID_MSK, name);
if (!mask) {
BKE_reportf(op->reports, RPT_ERROR, "Mask '%s' not found", name);
return OPERATOR_CANCELLED;