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/space_node/space_node.c')
-rw-r--r--source/blender/editors/space_node/space_node.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index 6d570001347..d2502e6408c 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -227,7 +227,7 @@ void ED_node_set_active_viewer_key(SpaceNode *snode)
}
}
-void snode_group_offset(SpaceNode *snode, float *x, float *y)
+void space_node_group_offset(SpaceNode *snode, float *x, float *y)
{
bNodeTreePath *path = snode->treepath.last;
@@ -627,7 +627,7 @@ static void node_main_region_init(wmWindowManager *wm, ARegion *region)
static void node_main_region_draw(const bContext *C, ARegion *region)
{
- drawnodespace(C, region);
+ node_draw_space(C, region);
}
/* ************* dropboxes ************* */
@@ -776,14 +776,15 @@ static void node_region_listener(wmWindow *UNUSED(win),
const char *node_context_dir[] = {
"selected_nodes", "active_node", "light", "material", "world", NULL};
-
-static int node_context(const bContext *C, const char *member, bContextDataResult *result)
+static int /*eContextResult*/ node_context(const bContext *C,
+ const char *member,
+ bContextDataResult *result)
{
SpaceNode *snode = CTX_wm_space_node(C);
if (CTX_data_dir(member)) {
CTX_data_dir_set(result, node_context_dir);
- return 1;
+ return CTX_RESULT_OK;
}
if (CTX_data_equals(member, "selected_nodes")) {
bNode *node;
@@ -796,7 +797,7 @@ static int node_context(const bContext *C, const char *member, bContextDataResul
}
}
CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION);
- return 1;
+ return CTX_RESULT_OK;
}
if (CTX_data_equals(member, "active_node")) {
if (snode->edittree) {
@@ -805,7 +806,7 @@ static int node_context(const bContext *C, const char *member, bContextDataResul
}
CTX_data_type_set(result, CTX_DATA_TYPE_POINTER);
- return 1;
+ return CTX_RESULT_OK;
}
if (CTX_data_equals(member, "node_previews")) {
if (snode->nodetree) {
@@ -814,28 +815,28 @@ static int node_context(const bContext *C, const char *member, bContextDataResul
}
CTX_data_type_set(result, CTX_DATA_TYPE_POINTER);
- return 1;
+ return CTX_RESULT_OK;
}
if (CTX_data_equals(member, "material")) {
if (snode->id && GS(snode->id->name) == ID_MA) {
CTX_data_id_pointer_set(result, snode->id);
}
- return 1;
+ return CTX_RESULT_OK;
}
if (CTX_data_equals(member, "light")) {
if (snode->id && GS(snode->id->name) == ID_LA) {
CTX_data_id_pointer_set(result, snode->id);
}
- return 1;
+ return CTX_RESULT_OK;
}
if (CTX_data_equals(member, "world")) {
if (snode->id && GS(snode->id->name) == ID_WO) {
CTX_data_id_pointer_set(result, snode->id);
}
- return 1;
+ return CTX_RESULT_OK;
}
- return 0;
+ return CTX_RESULT_MEMBER_NOT_FOUND;
}
static void node_widgets(void)
@@ -934,7 +935,7 @@ static void node_space_subtype_item_extend(bContext *C, EnumPropertyItem **item,
bool free;
const EnumPropertyItem *item_src = RNA_enum_node_tree_types_itemf_impl(C, &free);
for (const EnumPropertyItem *item_iter = item_src; item_iter->identifier; item_iter++) {
- if (!U.experimental.use_new_particle_system &&
+ if (!U.experimental.use_new_geometry_nodes &&
STREQ(item_iter->identifier, "SimulationNodeTree")) {
continue;
}