Merge branch 'blender-v4.2-release'
This commit is contained in:
@@ -78,7 +78,6 @@
|
||||
"render_freestyle_svg": ("freestyle_svg_exporter", "Freestyle SVG Exporter"),
|
||||
"render_povray": ("pov_at_ble", "POV@Ble"),
|
||||
"render_ui_animation_render": ("ui_animation_render", "UI Animation Render"),
|
||||
"rigify": ("rigify", "Rigify"),
|
||||
"space_clip_editor_refine_solution": ("refine_tracking_solution", "Refine tracking solution"),
|
||||
"space_view3d_3d_navigation": ("navigation", "3D Navigation"),
|
||||
"space_view3d_align_tools": ("align_tools", "Align Tools"),
|
||||
|
||||
@@ -321,9 +321,9 @@ template<> inline AxisSigned abs(const AxisSigned &axis)
|
||||
/** Create basis vector. */
|
||||
template<typename T> T to_vector(const Axis axis)
|
||||
{
|
||||
BLI_assert(axis <= AxisSigned::from_int(T::type_length - 1));
|
||||
BLI_assert(axis.as_int() < T::type_length);
|
||||
T vec{};
|
||||
vec[axis] = 1;
|
||||
vec[axis.as_int()] = 1;
|
||||
return vec;
|
||||
}
|
||||
|
||||
|
||||
@@ -1348,7 +1348,7 @@ inline void to_loc_rot_scale_safe(const MatBase<T, 4, 4> &mat,
|
||||
VecBase<T, 3> &r_scale)
|
||||
{
|
||||
EulerXYZBase<T> euler_rotation;
|
||||
to_loc_rot_scale(mat, r_location, euler_rotation, r_scale);
|
||||
to_loc_rot_scale<AllowNegativeScale>(mat, r_location, euler_rotation, r_scale);
|
||||
if constexpr (std::is_same_v<std::decay_t<RotationT>, QuaternionBase<T>>) {
|
||||
r_rotation = to_quaternion(euler_rotation);
|
||||
}
|
||||
|
||||
@@ -60,6 +60,13 @@ TEST(math_rotation_types, AxisSignedConvertToVec)
|
||||
EXPECT_EQ(to_vector<float2>(AxisSigned::Y_NEG), float2(0, -1));
|
||||
}
|
||||
|
||||
TEST(math_rotation_types, AxisConvertToVec)
|
||||
{
|
||||
EXPECT_EQ(to_vector<float3>(Axis::X), float3(1, 0, 0));
|
||||
EXPECT_EQ(to_vector<float3>(Axis::Y), float3(0, 1, 0));
|
||||
EXPECT_EQ(to_vector<float3>(Axis::Z), float3(0, 0, 1));
|
||||
}
|
||||
|
||||
TEST(math_rotation_types, Euler3Order)
|
||||
{
|
||||
/* Asserts those match.
|
||||
|
||||
Reference in New Issue
Block a user