forked from bartvdbraak/blender
Fixes:
* Crash with image drag'n'drop * Drag'n drop color to paint 2d canvas not working * Change "Layers" to "Slots" to appease purists.
This commit is contained in:
parent
b7b1c09766
commit
36b6b69173
@ -1049,7 +1049,7 @@ class TEXTURE_UL_texpaintslots(UIList):
|
|||||||
class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel):
|
class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel):
|
||||||
bl_context = "imagepaint"
|
bl_context = "imagepaint"
|
||||||
bl_label = "Slots"
|
bl_label = "Slots"
|
||||||
bl_category = "Layers"
|
bl_category = "Slots"
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1092,7 +1092,7 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel):
|
|||||||
class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel):
|
class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel):
|
||||||
bl_context = "imagepaint"
|
bl_context = "imagepaint"
|
||||||
bl_label = "Stencil"
|
bl_label = "Stencil"
|
||||||
bl_category = "Layers"
|
bl_category = "Slots"
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
@ -6435,10 +6435,13 @@ bool UI_but_active_drop_name(bContext *C)
|
|||||||
bool UI_but_active_drop_color(bContext *C)
|
bool UI_but_active_drop_color(bContext *C)
|
||||||
{
|
{
|
||||||
ARegion *ar = CTX_wm_region(C);
|
ARegion *ar = CTX_wm_region(C);
|
||||||
uiBut *but = ui_but_find_activated(ar);
|
|
||||||
|
|
||||||
if (but && but->type == COLOR)
|
if (ar) {
|
||||||
return true;
|
uiBut *but = ui_but_find_activated(ar);
|
||||||
|
|
||||||
|
if (but && but->type == COLOR)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1392,7 +1392,7 @@ void paint_2d_bucket_fill(
|
|||||||
ED_imapaint_dirty_region(ima, ibuf, 0, 0, ibuf->x, ibuf->y);
|
ED_imapaint_dirty_region(ima, ibuf, 0, 0, ibuf->x, ibuf->y);
|
||||||
|
|
||||||
if (do_float) {
|
if (do_float) {
|
||||||
for (; x_px < ibuf->x; x_px++) {
|
for (x_px = 0; x_px < ibuf->x; x_px++) {
|
||||||
for (y_px = 0; y_px < ibuf->y; y_px++) {
|
for (y_px = 0; y_px < ibuf->y; y_px++) {
|
||||||
blend_color_mix_float(ibuf->rect_float + 4 * (y_px * ibuf->x + x_px),
|
blend_color_mix_float(ibuf->rect_float + 4 * (y_px * ibuf->x + x_px),
|
||||||
ibuf->rect_float + 4 * (y_px * ibuf->x + x_px), color_f);
|
ibuf->rect_float + 4 * (y_px * ibuf->x + x_px), color_f);
|
||||||
@ -1400,7 +1400,7 @@ void paint_2d_bucket_fill(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for (; x_px < ibuf->x; x_px++) {
|
for (x_px = 0; x_px < ibuf->x; x_px++) {
|
||||||
for (y_px = 0; y_px < ibuf->y; y_px++) {
|
for (y_px = 0; y_px < ibuf->y; y_px++) {
|
||||||
blend_color_mix_byte((unsigned char *)(ibuf->rect + y_px * ibuf->x + x_px),
|
blend_color_mix_byte((unsigned char *)(ibuf->rect + y_px * ibuf->x + x_px),
|
||||||
(unsigned char *)(ibuf->rect + y_px * ibuf->x + x_px), (unsigned char *)&color_b);
|
(unsigned char *)(ibuf->rect + y_px * ibuf->x + x_px), (unsigned char *)&color_b);
|
||||||
|
Loading…
Reference in New Issue
Block a user