Merge branch 'blender-v4.2-release'
This commit is contained in:
@@ -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<math::Quaternion *>(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<Quaternion> mixer({&result, 1},
|
||||
Quaternion::identity());
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
const float interp_weight = weights[i];
|
||||
const Quaternion *src = static_cast<const Quaternion *>(sources[i]);
|
||||
mixer.mix_in(0, *src, interp_weight);
|
||||
}
|
||||
mixer.finalize();
|
||||
*static_cast<Quaternion *>(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},
|
||||
};
|
||||
|
||||
@@ -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. */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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. */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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<decl::Vector>("Vector").subtype(PROP_XYZ);
|
||||
b.add_input<decl::Vector>("Vector").subtype(PROP_XYZ).is_default_link_socket();
|
||||
b.add_input<decl::Matrix>("Transform");
|
||||
b.add_output<decl::Vector>("Vector").subtype(PROP_XYZ);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user