From a6218502240499423d29157d3ca3dcb916909b64 Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Wed, 13 Dec 2017 06:59:44 -0700 Subject: Fix T53550: E hotkey not working after the color-band picker commit Related to D2886, the color-band picker was lacking a poll function. --- .../blender/editors/interface/interface_eyedropper_colorband.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/blender') diff --git a/source/blender/editors/interface/interface_eyedropper_colorband.c b/source/blender/editors/interface/interface_eyedropper_colorband.c index 85339ff0322..b13d552dbeb 100644 --- a/source/blender/editors/interface/interface_eyedropper_colorband.c +++ b/source/blender/editors/interface/interface_eyedropper_colorband.c @@ -289,6 +289,13 @@ static int eyedropper_colorband_exec(bContext *C, wmOperator *op) } } +static int eyedropper_colorband_poll(bContext *C) +{ + uiBut *but = UI_context_active_but_get(C); + return (but && but->type == UI_BTYPE_COLORBAND); +} + + void UI_OT_eyedropper_colorband(wmOperatorType *ot) { /* identifiers */ @@ -301,6 +308,7 @@ void UI_OT_eyedropper_colorband(wmOperatorType *ot) ot->modal = eyedropper_colorband_modal; ot->cancel = eyedropper_colorband_cancel; ot->exec = eyedropper_colorband_exec; + ot->poll = eyedropper_colorband_poll; /* flags */ ot->flag = OPTYPE_BLOCKING | OPTYPE_INTERNAL; @@ -320,6 +328,7 @@ void UI_OT_eyedropper_colorband_point(wmOperatorType *ot) ot->modal = eyedropper_colorband_point_modal; ot->cancel = eyedropper_colorband_cancel; ot->exec = eyedropper_colorband_exec; + ot->poll = eyedropper_colorband_poll; /* flags */ ot->flag = OPTYPE_BLOCKING | OPTYPE_INTERNAL; -- cgit v1.2.3 From 1f953478828a9bfd1faf78df68e5abb1680858c5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 14 Dec 2017 10:41:39 +1100 Subject: Fix T53322: Collada export crash w/ shape keys D2958 by @cmbasnett --- source/blender/collada/GeometryExporter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender') diff --git a/source/blender/collada/GeometryExporter.cpp b/source/blender/collada/GeometryExporter.cpp index 8a9ccbbed51..73b00fd07ec 100644 --- a/source/blender/collada/GeometryExporter.cpp +++ b/source/blender/collada/GeometryExporter.cpp @@ -548,7 +548,7 @@ void GeometryExporter::createPolylist(std::string imageid, MTexPoly *tp = &mtpolys[i]; MPoly *p = &mpolys[i]; - std::string tpageid = (tp->tpage) ? id_name(tp->tpage):""; + std::string tpageid = (mtpolys && tp->tpage) ? id_name(tp->tpage) : ""; if (tpageid == imageid) { faces_in_polylist++; vcount_list.push_back(p->totloop); @@ -637,7 +637,7 @@ void GeometryExporter::createPolylist(std::string imageid, MTexPoly *tp = &mtpolys[i]; MPoly *p = &mpolys[i]; int loop_count = p->totloop; - std::string tpageid = (tp->tpage) ? id_name(tp->tpage) : ""; + std::string tpageid = (mtpolys && tp->tpage) ? id_name(tp->tpage) : ""; if (tpageid == imageid) { MLoop *l = &mloops[p->loopstart]; BCPolygonNormalsIndices normal_indices = norind[i]; -- cgit v1.2.3 From 99b7dc60bef5ff8680889ae8bcca1a8b14023402 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 14 Dec 2017 12:06:36 +1100 Subject: Fix missing update for particles w/ fluids D2955 by @GonVas --- source/blender/blenkernel/intern/particle.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 8c94cdfe784..cbbb44c55cb 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -663,8 +663,9 @@ void psys_render_set(Object *ob, ParticleSystem *psys, float viewmat[4][4], floa psys->renderdata = data; /* Hair can and has to be recalculated if everything isn't displayed. */ - if (psys->part->disp != 100 && psys->part->type == PART_HAIR) + if (psys->part->disp != 100 && ELEM(psys->part->type, PART_HAIR, PART_FLUID)) { psys->recalc |= PSYS_RECALC_RESET; + } } void psys_render_restore(Object *ob, ParticleSystem *psys) @@ -737,7 +738,7 @@ void psys_render_restore(Object *ob, ParticleSystem *psys) if (disp != render_disp) { /* Hair can and has to be recalculated if everything isn't displayed. */ - if (psys->part->type == PART_HAIR) { + if (ELEM(psys->part->type, PART_HAIR, PART_FLUID)) { psys->recalc |= PSYS_RECALC_RESET; } else { -- cgit v1.2.3