Fix compilation error -- backported change relied on the regular development changes
This commit is contained in:
parent
6161627747
commit
73f5a41589
Notes:
blender-bot
2023-10-13 01:54:23 +02:00
Referenced by issue #44839, BGE bug Textures Referenced by issue #43090, Cycles + Freestyle + border render = black render Referenced by issue #42866, Crash during rendering particle system with "render emitter" enabled Referenced by issue #42474, The fields positions does not turn green Referenced by issue #42453, FluidSim ignores RigidBody-Simulation Referenced by issue #42398, Blender crashes when adding multiresolution modifier on sphere and then switching to Painting mode when using Pie Menus. Referenced by issue #42348, Bugs in ParticleSystem Referenced by issue #42351, Freestyle will not render edges selected by Edge Type: Material Boundary, if the materials are different, but look identical. Referenced by issue #42340, Blender video editor : The Green line which shows the current frame has accuracy problem Referenced by issue #42325, Crash on .vob video import Referenced by issue #42331, Saving a model with multiple actions sometimes omits actions. Referenced by issue #42314, 3 Button Mouse Emulation & Tablet Crash Referenced by issue #42315, no motion blur with autosmooth - cycles Referenced by issue #42317, Rotate Handles do not rotate correctly. Referenced by issue #42300, Drop to Ground add-on can not be added in Blender 2.72a Referenced by issue #42280, Python tooltips ellipsis problem
|
@ -284,10 +284,10 @@ static void image_panel_preview(ScrArea *sa, short cntrl) // IMAGE_HANDLER_PRE
|
|||
|
||||
/* ********************* callbacks for standard image buttons *************** */
|
||||
|
||||
static void ui_imageuser_slot_menu(bContext *UNUSED(C), uiLayout *layout, void *render_slot_p)
|
||||
static void ui_imageuser_slot_menu(bContext *UNUSED(C), uiLayout *layout, void *image_p)
|
||||
{
|
||||
uiBlock *block = uiLayoutGetBlock(layout);
|
||||
short *render_slot = render_slot_p;
|
||||
Image *image = image_p;
|
||||
int slot;
|
||||
|
||||
uiDefBut(block, LABEL, 0, IFACE_("Slot"),
|
||||
|
@ -296,10 +296,10 @@ static void ui_imageuser_slot_menu(bContext *UNUSED(C), uiLayout *layout, void *
|
|||
|
||||
slot = IMA_MAX_RENDER_SLOT;
|
||||
while (slot--) {
|
||||
char str[32];
|
||||
char str[64];
|
||||
BLI_snprintf(str, sizeof(str), IFACE_("Slot %d"), slot + 1);
|
||||
uiDefButS(block, BUTM, B_NOP, str, 0, 0,
|
||||
UI_UNIT_X * 5, UI_UNIT_X, render_slot, (float) slot, 0.0, 0, -1, "");
|
||||
UI_UNIT_X * 5, UI_UNIT_X, &image->render_slot, (float) slot, 0.0, 0, -1, "");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -515,7 +515,7 @@ static void image_user_change(bContext *C, void *iuser_v, void *unused)
|
|||
}
|
||||
#endif
|
||||
|
||||
static void uiblock_layer_pass_buttons(uiLayout *layout, RenderResult *rr, ImageUser *iuser, int w, short *render_slot)
|
||||
static void uiblock_layer_pass_buttons(uiLayout *layout, Image *image, RenderResult *rr, ImageUser *iuser, int w, short *render_slot)
|
||||
{
|
||||
static void *rnd_pt[3]; /* XXX, workaround */
|
||||
uiBlock *block = uiLayoutGetBlock(layout);
|
||||
|
@ -540,7 +540,7 @@ static void uiblock_layer_pass_buttons(uiLayout *layout, RenderResult *rr, Image
|
|||
if (render_slot) {
|
||||
char str[64];
|
||||
BLI_snprintf(str, sizeof(str), IFACE_("Slot %d"), *render_slot + 1);
|
||||
but = uiDefMenuBut(block, ui_imageuser_slot_menu, render_slot, str, 0, 0, wmenu1, UI_UNIT_Y, TIP_("Select Slot"));
|
||||
but = uiDefMenuBut(block, ui_imageuser_slot_menu, image, str, 0, 0, wmenu1, UI_UNIT_Y, TIP_("Select Slot"));
|
||||
uiButSetFunc(but, image_multi_cb, rr, iuser);
|
||||
uiButSetMenuFromPulldown(but);
|
||||
}
|
||||
|
@ -572,7 +572,7 @@ static void uiblock_layer_pass_buttons(uiLayout *layout, RenderResult *rr, Image
|
|||
}
|
||||
}
|
||||
|
||||
static void uiblock_layer_pass_arrow_buttons(uiLayout *layout, RenderResult *rr, ImageUser *iuser, short *render_slot)
|
||||
static void uiblock_layer_pass_arrow_buttons(uiLayout *layout, Image *image, RenderResult *rr, ImageUser *iuser, short *render_slot)
|
||||
{
|
||||
uiBlock *block = uiLayoutGetBlock(layout);
|
||||
uiLayout *row;
|
||||
|
@ -594,7 +594,7 @@ static void uiblock_layer_pass_arrow_buttons(uiLayout *layout, RenderResult *rr,
|
|||
but = uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0, 0, 0.90f * UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Next Layer"));
|
||||
uiButSetFunc(but, image_multi_inclay_cb, rr, iuser);
|
||||
|
||||
uiblock_layer_pass_buttons(row, rr, iuser, 230 * dpi_fac, render_slot);
|
||||
uiblock_layer_pass_buttons(row, image, rr, iuser, 230 * dpi_fac, render_slot);
|
||||
|
||||
/* decrease, increase arrows */
|
||||
but = uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0, 0, 0.85f * UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Previous Pass"));
|
||||
|
@ -716,7 +716,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
|
|||
|
||||
/* use BKE_image_acquire_renderresult so we get the correct slot in the menu */
|
||||
rr = BKE_image_acquire_renderresult(scene, ima);
|
||||
uiblock_layer_pass_arrow_buttons(layout, rr, iuser, &ima->render_slot);
|
||||
uiblock_layer_pass_arrow_buttons(layout, ima, rr, iuser, &ima->render_slot);
|
||||
BKE_image_release_renderresult(scene, ima);
|
||||
}
|
||||
}
|
||||
|
@ -749,7 +749,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
|
|||
|
||||
/* multilayer? */
|
||||
if (ima->type == IMA_TYPE_MULTILAYER && ima->rr) {
|
||||
uiblock_layer_pass_arrow_buttons(layout, ima->rr, iuser, NULL);
|
||||
uiblock_layer_pass_arrow_buttons(layout, ima, ima->rr, iuser, NULL);
|
||||
}
|
||||
else if (ima->source != IMA_SRC_GENERATED) {
|
||||
if (compact == 0) {
|
||||
|
@ -958,7 +958,7 @@ void uiTemplateImageLayers(uiLayout *layout, bContext *C, Image *ima, ImageUser
|
|||
|
||||
/* use BKE_image_acquire_renderresult so we get the correct slot in the menu */
|
||||
rr = BKE_image_acquire_renderresult(scene, ima);
|
||||
uiblock_layer_pass_buttons(layout, rr, iuser, 160 * dpi_fac, (ima->type == IMA_TYPE_R_RESULT) ? &ima->render_slot : NULL);
|
||||
uiblock_layer_pass_buttons(layout, ima, rr, iuser, 160 * dpi_fac, (ima->type == IMA_TYPE_R_RESULT) ? &ima->render_slot : NULL);
|
||||
BKE_image_release_renderresult(scene, ima);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue