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:
authorJulian Eisel <julian@blender.org>2020-04-03 14:25:03 +0300
committerJulian Eisel <julian@blender.org>2020-04-03 14:34:50 +0300
commit905c0269f302e8e0e7a27dda8d5256fdcd06ce60 (patch)
tree1c720d4f0069879d5b4c0c9ea8db867106920d4f /source/blender/editors/space_node/node_relationships.c
parent1a69384e76e2b1ab11c87a582eb2cdf26386ac59 (diff)
Cleanup: Rename ScrArea variables from sa to area
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432. Now the area and region naming conventions should be less confusing. Mostly a careful batch rename but had to do few smaller fixes. Also ran clang-format on affected files.
Diffstat (limited to 'source/blender/editors/space_node/node_relationships.c')
-rw-r--r--source/blender/editors/space_node/node_relationships.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c
index 5dc98a3905a..8dfa99ca126 100644
--- a/source/blender/editors/space_node/node_relationships.c
+++ b/source/blender/editors/space_node/node_relationships.c
@@ -1446,9 +1446,12 @@ void NODE_OT_detach(wmOperatorType *ot)
/* ********************* automatic node insert on dragging ******************* */
/* prevent duplicate testing code below */
-static bool ed_node_link_conditions(ScrArea *sa, bool test, SpaceNode **r_snode, bNode **r_select)
+static bool ed_node_link_conditions(ScrArea *area,
+ bool test,
+ SpaceNode **r_snode,
+ bNode **r_select)
{
- SpaceNode *snode = sa ? sa->spacedata.first : NULL;
+ SpaceNode *snode = area ? area->spacedata.first : NULL;
bNode *node, *select = NULL;
bNodeLink *link;
@@ -1456,7 +1459,7 @@ static bool ed_node_link_conditions(ScrArea *sa, bool test, SpaceNode **r_snode,
*r_select = NULL;
/* no unlucky accidents */
- if (sa == NULL || sa->spacetype != SPACE_NODE) {
+ if (area == NULL || area->spacetype != SPACE_NODE) {
return false;
}
@@ -1501,14 +1504,14 @@ static bool ed_node_link_conditions(ScrArea *sa, bool test, SpaceNode **r_snode,
}
/* test == 0, clear all intersect flags */
-void ED_node_link_intersect_test(ScrArea *sa, int test)
+void ED_node_link_intersect_test(ScrArea *area, int test)
{
bNode *select;
SpaceNode *snode;
bNodeLink *link, *selink = NULL;
float dist_best = FLT_MAX;
- if (!ed_node_link_conditions(sa, test, &snode, &select)) {
+ if (!ed_node_link_conditions(area, test, &snode, &select)) {
return;
}
@@ -1919,14 +1922,14 @@ void NODE_OT_insert_offset(wmOperatorType *ot)
}
/* assumes link with NODE_LINKFLAG_HILITE set */
-void ED_node_link_insert(Main *bmain, ScrArea *sa)
+void ED_node_link_insert(Main *bmain, ScrArea *area)
{
bNode *node, *select;
SpaceNode *snode;
bNodeLink *link;
bNodeSocket *sockto;
- if (!ed_node_link_conditions(sa, true, &snode, &select)) {
+ if (!ed_node_link_conditions(area, true, &snode, &select)) {
return;
}