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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-02-16 18:49:22 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-02-16 18:49:22 +0300
commit2061f91741861f5646974b4960b5ff03d509f5eb (patch)
treea2c121512a2b6a9097b7426385a9d379e627fc02 /source/blender/editors/space_image/image_ops.c
parentbd638da9a0bbd057b72164eed6583888380490ed (diff)
Render Slots: change the implementation by moving it from the render to the
image code, this should be clearer and makes reusing the Render struct later on easier.
Diffstat (limited to 'source/blender/editors/space_image/image_ops.c')
-rw-r--r--source/blender/editors/space_image/image_ops.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index b69b6a552a6..eb87b5656bf 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -1805,21 +1805,21 @@ static int cycle_render_slot_poll(bContext *C)
static int cycle_render_slot_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- int a, slot, cur= RE_GetViewSlot();
+ Image *ima= CTX_data_edit_image(C);
+ int a, slot, cur= ima->render_slot;
- for(a=1; a<RE_SLOT_MAX; a++) {
- slot= (cur+a)%RE_SLOT_MAX;
+ for(a=1; a<IMA_MAX_RENDER_SLOT; a++) {
+ slot= (cur+a)%IMA_MAX_RENDER_SLOT;
- if(RE_GetRender(scene->id.name, slot)) {
- RE_SetViewSlot(slot);
+ if(ima->renders[slot] || slot == ima->last_render_slot) {
+ ima->render_slot= slot;
break;
}
}
- if(a == RE_SLOT_MAX)
- RE_SetViewSlot((cur == 1)? 0: 1);
-
+ if(a == IMA_MAX_RENDER_SLOT)
+ ima->render_slot= ((cur == 1)? 0: 1);
+
WM_event_add_notifier(C, NC_IMAGE|ND_DRAW, NULL);
return OPERATOR_FINISHED;