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:
authorSebastian Parborg <zeddb>2018-09-20 20:53:16 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-09-20 20:54:33 +0300
commitd0eed5e50a80ef4df9ecb14772c87d4ede11e621 (patch)
tree2c59f9f4262f9309ca5e0130d6534ee71b543ad1 /source/blender/editors/sculpt_paint/paint_image_proj.c
parent09ea940e7ba8c4905e692134dfc14d0a6fbf909b (diff)
Texture Paint: unify missing data and slots panels, better auto position nodes.
Differential Revision: https://developer.blender.org/D3694
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image_proj.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 805f51f008a..3ad373f4829 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -5696,10 +5696,10 @@ static bool proj_paint_add_slot(bContext *C, wmOperator *op)
/* Connect to first available principled bsdf node. */
bNode *in_node;
+ bNode *out_node = imanode;
in_node = ntreeFindType(ntree, SH_NODE_BSDF_PRINCIPLED);
if (in_node != NULL) {
- bNode *out_node = imanode;
bNodeSocket *out_sock = nodeFindSocket(out_node, SOCK_OUT, "Color");
bNodeSocket *in_sock = NULL;
@@ -5752,10 +5752,14 @@ static bool proj_paint_add_slot(bContext *C, wmOperator *op)
bNodeLink *link = in_sock ? in_sock->link : NULL;
if (in_sock != NULL && link == NULL) {
nodeAddLink(ntree, out_node, out_sock, in_node, in_sock);
+
+ nodePositionRelative(out_node, in_node, out_sock, in_sock);
}
}
ntreeUpdateTree(CTX_data_main(C), ntree);
+ /* In case we added more than one node, position them too. */
+ nodePositionPropagate(out_node);
if (ima) {
BKE_texpaint_slot_refresh_cache(scene, ma);