From 0936f2f52c584ba623ba6ec722d1581dea97f1f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Mon, 3 Feb 2020 18:37:12 +0100 Subject: [PATCH 1/6] Fix T73045 Crash entering edit mode for "Object Font" instance mesh Font duplicator was not outputing dupli-objects using evaluated object pointers, leading to crash because original object are not supposed to be drawable. --- source/blender/blenkernel/intern/object_dupli.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/blender/blenkernel/intern/object_dupli.c b/source/blender/blenkernel/intern/object_dupli.c index eceeb231285..c10ab3cddab 100644 --- a/source/blender/blenkernel/intern/object_dupli.c +++ b/source/blender/blenkernel/intern/object_dupli.c @@ -521,6 +521,9 @@ static void make_duplis_font(const DupliContext *ctx) family_len = strlen(cu->family); family_gh = BLI_ghash_int_new_ex(__func__, 256); + /* Safety check even if it might fail badly when called for original object. */ + const bool is_eval_curve = DEG_is_evaluated_id(&cu->id); + /* advance matching BLI_strncpy_wchar_from_utf8 */ for (a = 0; a < text_len; a++, ct++) { @@ -528,6 +531,12 @@ static void make_duplis_font(const DupliContext *ctx) * Definitively don't think it would be safe to put back Main *bmain pointer * in DupliContext as done in 2.7x? */ ob = find_family_object(G.main, cu->family, family_len, (unsigned int)text[a], family_gh); + + if (is_eval_curve) { + /* Workaround for the above hack. */ + ob = DEG_get_evaluated_object(ctx->depsgraph, ob); + } + if (ob) { vec[0] = fsize * (ct->xof - xof); vec[1] = fsize * (ct->yof - yof); From 95ad34c5d70f3def18a8286f2cdde85371031988 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 3 Feb 2020 18:44:52 +0100 Subject: [PATCH 2/6] Fix CMake error with versions older than 3.9 --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bbb528607c8..2bac16c339a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,7 +98,9 @@ cmake_policy(SET CMP0010 NEW) cmake_policy(SET CMP0014 NEW) # Silence draco warning on macOS, new policy works fine. -cmake_policy(SET CMP0068 NEW) +if(POLICY CMP0068) + cmake_policy(SET CMP0068 NEW) +endif() #----------------------------------------------------------------------------- # Load some macros. From 06a8f55104d05d876ecaf0c0c4fa2b2a8b2d5137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Mon, 3 Feb 2020 18:53:20 +0100 Subject: [PATCH 3/6] Overlay: Armature: Fix Display armature as bound box in object mode --- source/blender/draw/engines/overlay/overlay_armature.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/blender/draw/engines/overlay/overlay_armature.c b/source/blender/draw/engines/overlay/overlay_armature.c index 849807e24b5..be1ff1753ab 100644 --- a/source/blender/draw/engines/overlay/overlay_armature.c +++ b/source/blender/draw/engines/overlay/overlay_armature.c @@ -2287,6 +2287,11 @@ void OVERLAY_armature_cache_populate(OVERLAY_Data *vedata, Object *ob) OVERLAY_PrivateData *pd = vedata->stl->pd; ArmatureDrawContext arm_ctx; float *color; + + if (ob->dt == OB_BOUNDBOX) { + return; + } + DRW_object_wire_theme_get(ob, draw_ctx->view_layer, &color); armature_context_setup(&arm_ctx, pd, ob, false, false, false, color); draw_armature_pose(&arm_ctx); From 0cd0058e27025b97b1d187cf2299694c6696cb19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Mon, 3 Feb 2020 19:54:47 +0100 Subject: [PATCH 4/6] Fix T72261 Overlay: Edit Mesh: Edges not visible when using "In front" This was caused by additional depth pass not rendering in the correct view. --- source/blender/draw/engines/overlay/overlay_edit_mesh.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/blender/draw/engines/overlay/overlay_edit_mesh.c b/source/blender/draw/engines/overlay/overlay_edit_mesh.c index 6a65be0b84c..e016ccc6c0e 100644 --- a/source/blender/draw/engines/overlay/overlay_edit_mesh.c +++ b/source/blender/draw/engines/overlay/overlay_edit_mesh.c @@ -407,7 +407,11 @@ void OVERLAY_edit_mesh_draw(OVERLAY_Data *vedata) GPU_framebuffer_clear_depth(fbl->overlay_default_fb, 1.0f); } - DRW_draw_pass(psl->edit_mesh_depth_ps[IN_FRONT]); + if (!DRW_pass_is_empty(psl->edit_mesh_depth_ps[IN_FRONT])) { + DRW_view_set_active(NULL); + DRW_draw_pass(psl->edit_mesh_depth_ps[IN_FRONT]); + } + overlay_edit_mesh_draw_components(psl, pd, true); } } From e268fe6e64dd872534944e825c0fe7483e18010a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Mon, 3 Feb 2020 22:02:17 +0100 Subject: [PATCH 5/6] Fix T73537: Particle system Crash Added sanity check in the flow / obstacle object loops that check if the modifier data is valid. Ideally this should not be needed. However, in remove_particle_systems_from_object() the fluid modifier can get freed. It is not yet clear whether the modifier free call is really needed or not. --- source/blender/blenkernel/intern/fluid.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c index f19137bf796..91adbf2301d 100644 --- a/source/blender/blenkernel/intern/fluid.c +++ b/source/blender/blenkernel/intern/fluid.c @@ -872,6 +872,11 @@ static void update_obstacleflags(FluidDomainSettings *mds, FluidModifierData *mmd2 = (FluidModifierData *)modifiers_findByType(coll_ob, eModifierType_Fluid); + /* Sanity check. */ + if (!mmd2) { + continue; + } + if ((mmd2->type & MOD_FLUID_TYPE_EFFEC) && mmd2->effector) { FluidEffectorSettings *mes = mmd2->effector; if (!mes) { @@ -959,6 +964,11 @@ static void update_obstacles(Depsgraph *depsgraph, FluidModifierData *mmd2 = (FluidModifierData *)modifiers_findByType(coll_ob, eModifierType_Fluid); + /* Sanity check. */ + if (!mmd2) { + continue; + } + /* TODO (sebbas): check if modifier is active? */ if ((mmd2->type & MOD_FLUID_TYPE_EFFEC) && mmd2->effector) { FluidEffectorSettings *mes = mmd2->effector; @@ -2298,7 +2308,7 @@ static void update_flowsflags(FluidDomainSettings *mds, Object **flowobjs, int n FluidModifierData *mmd2 = (FluidModifierData *)modifiers_findByType(coll_ob, eModifierType_Fluid); - // Sanity check + /* Sanity check. */ if (!mmd2) { continue; } @@ -2411,6 +2421,11 @@ static void update_flowsfluids(struct Depsgraph *depsgraph, FluidModifierData *mmd2 = (FluidModifierData *)modifiers_findByType(flowobj, eModifierType_Fluid); + /* Sanity check. */ + if (!mmd2) { + continue; + } + /* Check for initialized smoke object. */ if ((mmd2->type & MOD_FLUID_TYPE_FLOW) && mmd2->flow) { FluidFlowSettings *mfs = mmd2->flow; @@ -2607,6 +2622,11 @@ static void update_flowsfluids(struct Depsgraph *depsgraph, FluidModifierData *mmd2 = (FluidModifierData *)modifiers_findByType(flowobj, eModifierType_Fluid); + /* Sanity check. */ + if (!mmd2) { + continue; + } + /* Check for initialized flow object. */ if ((mmd2->type & MOD_FLUID_TYPE_FLOW) && mmd2->flow) { FluidFlowSettings *mfs = mmd2->flow; @@ -3313,7 +3333,7 @@ static void BKE_fluid_modifier_processDomain(FluidModifierData *mmd, guide_parent = mds->guide_parent; if (guide_parent) { mmd_parent = (FluidModifierData *)modifiers_findByType(guide_parent, eModifierType_Fluid); - if (mmd_parent->domain) { + if (mmd_parent && mmd_parent->domain) { copy_v3_v3_int(mds->guide_res, mmd_parent->domain->res); } } From fdb68e184714f480c87c13c3c34480e9adfe4620 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Mon, 3 Feb 2020 22:35:39 -0500 Subject: [PATCH 6/6] Fix: UI: Spelling and Capitalization --- release/scripts/startup/bl_ui/properties_physics_cloth.py | 2 +- source/blender/makesrna/intern/rna_cloth.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py index d9713cb8608..0bf667482c4 100644 --- a/release/scripts/startup/bl_ui/properties_physics_cloth.py +++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py @@ -230,7 +230,7 @@ class PHYSICS_PT_cloth_pressure(PhysicButtonsPanel, Panel): col.prop(cloth, "uniform_pressure_force") col = flow.column() - col.prop(cloth, "use_pressure_volume", text="Custom volume") + col.prop(cloth, "use_pressure_volume", text="Custom Volume") col = flow.column() col.active = cloth.use_pressure_volume diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c index c000e1059e6..59040df56c3 100644 --- a/source/blender/makesrna/intern/rna_cloth.c +++ b/source/blender/makesrna/intern/rna_cloth.c @@ -986,7 +986,7 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Pressure", - "The uniform pressure that is constanty applied to the mesh. Can be negative"); + "The uniform pressure that is constantly applied to the mesh. Can be negative"); RNA_def_property_update(prop, 0, "rna_cloth_update"); prop = RNA_def_property(srna, "target_volume", PROP_FLOAT, PROP_NONE);