diff --git a/source/blender/blenkernel/intern/customdata.cc b/source/blender/blenkernel/intern/customdata.cc index 5e8330f4262..55898872224 100644 --- a/source/blender/blenkernel/intern/customdata.cc +++ b/source/blender/blenkernel/intern/customdata.cc @@ -44,6 +44,7 @@ #include "BLT_translation.hh" #include "BKE_anonymous_attribute_id.hh" +#include "BKE_attribute_math.hh" #include "BKE_customdata.hh" #include "BKE_customdata_file.h" #include "BKE_deform.hh" @@ -1528,6 +1529,26 @@ static void layerDefault_propquaternion(void *data, const int count) MutableSpan(static_cast(data), count).fill(math::Quaternion::identity()); } +static void layerInterp_propquaternion(const void **sources, + const float *weights, + const float * /*sub_weights*/, + int count, + void *dest) +{ + using blender::math::Quaternion; + Quaternion result; + blender::bke::attribute_math::DefaultMixer mixer({&result, 1}, + Quaternion::identity()); + + for (int i = 0; i < count; i++) { + const float interp_weight = weights[i]; + const Quaternion *src = static_cast(sources[i]); + mixer.mix_in(0, *src, interp_weight); + } + mixer.finalize(); + *static_cast(dest) = result; +} + /* -------------------------------------------------------------------- */ /** \name Callbacks for (#math::Quaternion, #CD_PROP_FLOAT4X4) * \{ */ @@ -2129,7 +2150,7 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = { N_("Quaternion"), nullptr, nullptr, - nullptr, + layerInterp_propquaternion, nullptr, layerDefault_propquaternion}, }; diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index 0e62d501d7c..4a9da32df46 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -2014,7 +2014,9 @@ void DepsgraphNodeBuilder::build_nodetree(bNodeTree *ntree) build_nodetree(group_ntree); } else { - BLI_assert_msg(0, "Unknown ID type used for node"); + /* Ignore this case. It can happen when the node type is not known currently. Either because + * it belongs to an add-on or because it comes from a different Blender version that does + * support the ID type here already. */ } } diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index b5f02b8acff..1fcb8b95830 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -3076,7 +3076,9 @@ void DepsgraphRelationBuilder::build_nodetree(bNodeTree *ntree) } } else { - BLI_assert_msg(0, "Unknown ID type used for node"); + /* Ignore this case. It can happen when the node type is not known currently. Either because + * it belongs to an add-on or because it comes from a different Blender version that does + * support the ID type here already. */ } } diff --git a/source/blender/nodes/function/nodes/node_fn_transform_point.cc b/source/blender/nodes/function/nodes/node_fn_transform_point.cc index 620de6cec6a..2a2953c1d43 100644 --- a/source/blender/nodes/function/nodes/node_fn_transform_point.cc +++ b/source/blender/nodes/function/nodes/node_fn_transform_point.cc @@ -11,7 +11,7 @@ namespace blender::nodes::node_fn_transform_point_cc { static void node_declare(NodeDeclarationBuilder &b) { b.is_function_node(); - b.add_input("Vector").subtype(PROP_XYZ); + b.add_input("Vector").subtype(PROP_XYZ).is_default_link_socket(); b.add_input("Transform"); b.add_output("Vector").subtype(PROP_XYZ); }