Geometry Nodes: Rotate Euler: Use "Local" instead of "Point"
Since points aren't relevant in function nodes, replace all mentions of it with "local" to illustrate rotations done in local-space instead. Differential Revision: https://developer.blender.org/D12881
This commit is contained in:
parent
c383397d07
commit
41dc558747
|
@ -2090,7 +2090,7 @@ typedef enum GeometryNodeRotatePointsSpace {
|
|||
|
||||
typedef enum FunctionNodeRotateEulerSpace {
|
||||
FN_NODE_ROTATE_EULER_SPACE_OBJECT = 0,
|
||||
FN_NODE_ROTATE_EULER_SPACE_POINT = 1,
|
||||
FN_NODE_ROTATE_EULER_SPACE_LOCAL = 1,
|
||||
} FunctionNodeRotateEulerSpace;
|
||||
|
||||
typedef enum GeometryNodeAlignRotationToVectorAxis {
|
||||
|
|
|
@ -9902,10 +9902,10 @@ static void def_fn_rotate_euler(StructRNA *srna)
|
|||
ICON_NONE,
|
||||
"Object",
|
||||
"Rotate the input rotation in the local space of the object"},
|
||||
{FN_NODE_ROTATE_EULER_SPACE_POINT,
|
||||
"POINT",
|
||||
{FN_NODE_ROTATE_EULER_SPACE_LOCAL,
|
||||
"LOCAL",
|
||||
ICON_NONE,
|
||||
"Point",
|
||||
"Local",
|
||||
"Rotate the input rotation in its local space"},
|
||||
{0, NULL, 0, NULL, NULL},
|
||||
};
|
||||
|
@ -9921,7 +9921,7 @@ static void def_fn_rotate_euler(StructRNA *srna)
|
|||
prop = RNA_def_property(srna, "space", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "custom2");
|
||||
RNA_def_property_enum_items(prop, space_items);
|
||||
RNA_def_property_ui_text(prop, "Space", "Base orientation of the points");
|
||||
RNA_def_property_ui_text(prop, "Space", "Base orientation for rotation");
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
}
|
||||
|
||||
|
|
|
@ -82,8 +82,8 @@ static const fn::MultiFunction *get_multi_function(bNode &bnode)
|
|||
mat3_to_eul(result, mat_res);
|
||||
return result;
|
||||
}};
|
||||
static fn::CustomMF_SI_SI_SO<float3, float3, float3> point_euler_rot{
|
||||
"Rotate Euler by Euler/Point", [](const float3 &input, const float3 &rotation) {
|
||||
static fn::CustomMF_SI_SI_SO<float3, float3, float3> local_euler_rot{
|
||||
"Rotate Euler by Euler/Local", [](const float3 &input, const float3 &rotation) {
|
||||
float input_mat[3][3];
|
||||
eul_to_mat3(input_mat, input);
|
||||
float rot_mat[3][3];
|
||||
|
@ -94,8 +94,8 @@ static const fn::MultiFunction *get_multi_function(bNode &bnode)
|
|||
mat3_to_eul(result, mat_res);
|
||||
return result;
|
||||
}};
|
||||
static fn::CustomMF_SI_SI_SI_SO<float3, float3, float, float3> point_AA_rot{
|
||||
"Rotate Euler by AxisAngle/Point", [](const float3 &input, const float3 &axis, float angle) {
|
||||
static fn::CustomMF_SI_SI_SI_SO<float3, float3, float, float3> local_AA_rot{
|
||||
"Rotate Euler by AxisAngle/Local", [](const float3 &input, const float3 &axis, float angle) {
|
||||
float input_mat[3][3];
|
||||
eul_to_mat3(input_mat, input);
|
||||
float rot_mat[3][3];
|
||||
|
@ -109,10 +109,10 @@ static const fn::MultiFunction *get_multi_function(bNode &bnode)
|
|||
short type = bnode.custom1;
|
||||
short space = bnode.custom2;
|
||||
if (type == FN_NODE_ROTATE_EULER_TYPE_AXIS_ANGLE) {
|
||||
return space == FN_NODE_ROTATE_EULER_SPACE_OBJECT ? &obj_AA_rot : &point_AA_rot;
|
||||
return space == FN_NODE_ROTATE_EULER_SPACE_OBJECT ? &obj_AA_rot : &local_AA_rot;
|
||||
}
|
||||
if (type == FN_NODE_ROTATE_EULER_TYPE_EULER) {
|
||||
return space == FN_NODE_ROTATE_EULER_SPACE_OBJECT ? &obj_euler_rot : &point_euler_rot;
|
||||
return space == FN_NODE_ROTATE_EULER_SPACE_OBJECT ? &obj_euler_rot : &local_euler_rot;
|
||||
}
|
||||
BLI_assert_unreachable();
|
||||
return nullptr;
|
||||
|
|
Loading…
Reference in New Issue