diff options
author | Jacques Lucke <jacques@blender.org> | 2022-02-01 19:53:19 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-02-01 19:53:19 +0300 |
commit | 2110e271f52f641d98fc4f92afc0988b29806479 (patch) | |
tree | 545a6bb349c693d10dd672bc76b0d0df7410451a /source | |
parent | 32b33e91ebfa0629277ba28490ba9a842b0265ab (diff) | |
parent | 2bd71b49e79325863bfe3c561fa03653231c9914 (diff) |
Merge branch 'blender-v3.1-release'
Diffstat (limited to 'source')
5 files changed, 33 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/object.cc b/source/blender/blenkernel/intern/object.cc index 403b9d353ec..41221c0e444 100644 --- a/source/blender/blenkernel/intern/object.cc +++ b/source/blender/blenkernel/intern/object.cc @@ -4186,7 +4186,11 @@ bool BKE_object_minmax_dupli(Depsgraph *depsgraph, /* pass */ } else { - BoundBox *bb = BKE_object_boundbox_get(dob->ob); + Object temp_ob = *dob->ob; + /* Do not modify the original boundbox. */ + temp_ob.runtime.bb = nullptr; + BKE_object_replace_data_on_shallow_copy(&temp_ob, dob->ob_data); + BoundBox *bb = BKE_object_boundbox_get(&temp_ob); if (bb) { int i; @@ -4198,6 +4202,8 @@ bool BKE_object_minmax_dupli(Depsgraph *depsgraph, ok = true; } + + MEM_SAFE_FREE(temp_ob.runtime.bb); } } free_object_duplilist(lb); /* does restore */ diff --git a/source/blender/draw/intern/draw_manager_shader.c b/source/blender/draw/intern/draw_manager_shader.c index 4715bd62779..3cfbb3fe416 100644 --- a/source/blender/draw/intern/draw_manager_shader.c +++ b/source/blender/draw/intern/draw_manager_shader.c @@ -50,8 +50,6 @@ static CLG_LogRef LOG = {"draw.manager.shader"}; -extern char datatoc_gpu_shader_2D_vert_glsl[]; -extern char datatoc_gpu_shader_3D_vert_glsl[]; extern char datatoc_gpu_shader_depth_only_frag_glsl[]; extern char datatoc_common_fullscreen_vert_glsl[]; @@ -620,8 +618,9 @@ static uint32_t drw_shader_dependencies_get(const DRWShaderLibrary *lib, const c } dbg_name[i + 1] = '\0'; - CLOG_WARN(&LOG, - "Error: Dependency not found: %s\n" + CLOG_INFO(&LOG, + 0, + "Dependency '%s' not found\n" "This might be due to bad lib ordering or overriding a builtin shader.\n", dbg_name); } diff --git a/source/blender/editors/space_node/node_group.cc b/source/blender/editors/space_node/node_group.cc index 73e419d667a..3d3f8378916 100644 --- a/source/blender/editors/space_node/node_group.cc +++ b/source/blender/editors/space_node/node_group.cc @@ -776,6 +776,18 @@ static void node_group_make_insert_selected(const bContext &C, bNodeTree &ntree, ListBase anim_basepaths = {nullptr, nullptr}; + /* Detach unselected nodes inside frames when the frame is put into the group. Otherwise the + * `parent` pointer becomes dangling. */ + LISTBASE_FOREACH (bNode *, node, &ntree.nodes) { + if (node->parent == nullptr) { + continue; + } + if (node_group_make_use_node(*node->parent, gnode) && + !node_group_make_use_node(*node, gnode)) { + nodeDetachNode(node); + } + } + /* move nodes over */ LISTBASE_FOREACH_MUTABLE (bNode *, node, &ntree.nodes) { if (node_group_make_use_node(*node, gnode)) { diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc index b9b03732a40..83302f94c85 100644 --- a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc +++ b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc @@ -474,6 +474,11 @@ static void find_fields_to_evaluate(const SpaceSpreadsheet *sspreadsheet, r_fields.add("Viewer", std::move(field)); } } + if (const geo_log::GenericValueLog *generic_value_log = + dynamic_cast<const geo_log::GenericValueLog *>(value_log)) { + fn::GPointer value = generic_value_log->value(); + r_fields.add("Viewer", fn::make_constant_field(*value.type(), value.get())); + } } } diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index 0320a2a9a1a..e86392e47ab 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -47,6 +47,8 @@ #include "DEG_depsgraph.h" +#include "DNA_gpencil_types.h" + #include "ED_armature.h" #include "ED_asset.h" #include "ED_image.h" @@ -117,6 +119,10 @@ void ED_editors_init(bContext *C) /* For multi-edit mode we may already have mode data (grease pencil does not need it). * However we may have a non-active object stuck in a grease-pencil edit mode. */ if (ob != obact) { + bGPdata *gpd = (bGPdata *)ob->data; + gpd->flag &= ~(GP_DATA_STROKE_PAINTMODE | GP_DATA_STROKE_EDITMODE | + GP_DATA_STROKE_SCULPTMODE | GP_DATA_STROKE_WEIGHTMODE | + GP_DATA_STROKE_VERTEXMODE); ob->mode = OB_MODE_OBJECT; DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE); } |