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:
authorDalai Felinto <dfelinto@gmail.com>2015-04-17 15:48:31 +0300
committerDalai Felinto <dfelinto@gmail.com>2015-04-17 15:48:31 +0300
commit479b6696932d133078690063508d8447d6dc0a28 (patch)
treebb4880a909f46e303d05a5305eea401bd38fbe94 /source/blender/blenkernel/intern
parent02fba106fad37647ab015c228248ac0ec13a964b (diff)
Fix T44336: Unable to select cycles-specific passes in UV/image editor
This approach gets rid of iuser->pass for good. Also, I'm commenting out the pass increase/decrease. This was broken since multiview. I will fix it later (before 2.75), but I didn't want to get this patch mangled with that fix. Thanks Sergey Sharybin for the review and feedbacks. Reviewers: sergey Differential Revision: https://developer.blender.org/D1232
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/image.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 80828533a31..bb9fdba94fa 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -2475,7 +2475,7 @@ static void image_init_imageuser(Image *ima, ImageUser *iuser)
RenderResult *rr = ima->rr;
iuser->multi_index = 0;
- iuser->layer = iuser->pass = iuser->view = 0;
+ iuser->layer = iuser->view = 0;
iuser->passtype = SCE_PASS_COMBINED;
if (rr) {
@@ -2649,15 +2649,14 @@ RenderPass *BKE_image_multilayer_index(RenderResult *rr, ImageUser *iuser)
return NULL;
if (iuser) {
- short index = 0, rv_index, rl_index = 0, rp_index;
+ short index = 0, rv_index, rl_index = 0;
bool is_stereo = (iuser->flag & IMA_SHOW_STEREO) && RE_RenderResult_is_stereo(rr);
rv_index = is_stereo ? iuser->multiview_eye : iuser->view;
+ if (RE_HasFakeLayer(rr)) rl_index += 1;
for (rl = rr->layers.first; rl; rl = rl->next, rl_index++) {
- rp_index = 0;
-
- for (rpass = rl->passes.first; rpass; rpass = rpass->next, index++, rp_index++) {
+ for (rpass = rl->passes.first; rpass; rpass = rpass->next, index++) {
if (iuser->layer == rl_index &&
iuser->passtype == rpass->passtype &&
rv_index == rpass->view_id)
@@ -2668,20 +2667,16 @@ RenderPass *BKE_image_multilayer_index(RenderResult *rr, ImageUser *iuser)
if (rpass)
break;
}
-
- if (rpass) {
- iuser->multi_index = index;
- iuser->pass = rp_index;
- }
- else {
- iuser->multi_index = 0;
- iuser->pass = 0;
- }
+ iuser->multi_index = (rpass ? index : 0);
}
+
if (rpass == NULL) {
rl = rr->layers.first;
if (rl)
rpass = rl->passes.first;
+
+ if (rpass && iuser)
+ iuser->passtype = rpass->passtype;
}
return rpass;