44 return std::string(new_str);
53 const int RNA_SCALE_PREC_DEFAULT = 3;
54 return fmt::format(
"{:.{}f}", value, RNA_SCALE_PREC_DEFAULT);
101 layout_.
label(
RPT_(
"Matrix has a shear"), ICON_STATUS_WARNING);
104 float loc[3], quat[4], size[3];
108 col = &layout_.
column(
true);
111 row = &col->
row(
true);
115 row = &col->
row(
true);
119 row = &col->
row(
true);
124 float eul[3], axis[3];
127 col = &layout_.
column(
true);
131 row = &col->
row(
true);
135 row = &col->
row(
true);
139 row = &col->
row(
true);
143 row = &col->
row(
true);
150 row = &col->
row(
true);
154 row = &col->
row(
true);
158 row = &col->
row(
true);
162 row = &col->
row(
true);
169 row = &col->
row(
true);
173 row = &col->
row(
true);
177 row = &col->
row(
true);
183 row = &layout_.
row(
true);
194 TIP_(
"Rotation mode.\n\nOnly affects the way "
195 "rotation is displayed, rotation itself is unaffected."));
199 col = &layout_.
column(
true);
202 row = &col->
row(
true);
206 row = &col->
row(
true);
210 row = &col->
row(
true);
222 RNA_warning(
"4x4 Matrix property not found: %s.%s",
#define RNA_warning(format,...)
#define RNA_SUBTYPE_UNIT_VALUE(subtype)
#define RNA_TRANSLATION_PREC_DEFAULT
#define RNA_SUBTYPE_UNIT(subtype)
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
constexpr const char * c_str() const
static void draw_matrix_template(Layout &layout, PointerRNA &ptr, PropertyRNA &prop)
static void rotation_mode_menu_callback(bContext *, Layout *layout, void *)
void template_matrix(Layout *layout, PointerRNA *ptr, StringRefNull propname)
static std::string format_unit_value(float value, PropertySubType subtype, Layout &layout)
static std::string format_coefficient(float value)
void button_flag_enable(Button *but, int64_t flag)
Button * uiDefMenuBut(Block *block, MenuCreateFunc func, void *arg, StringRef str, int x, int y, short width, short height, std::optional< StringRef > tip)
static int rotation_mode_index
void button_flag_disable(Button *but, int64_t flag)
Layout * uiItemL_respect_property_split(Layout *layout, StringRef text, int icon)
Button * uiDefButV(Block *block, ButtonType type, StringRef str, int x, int y, short width, short height, T *poin, float min, float max, std::optional< StringRef > tip)
void button_type_set_menu_from_pulldown(Button *but)
int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
double BKE_unit_value_scale(const UnitSettings &settings, int unit_type, double value)
void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *values)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void copy_m3_m4(float m1[3][3], const float m2[4][4])
const EnumPropertyItem rna_enum_object_rotation_mode_items[]
uint RNA_enum_items_count(const EnumPropertyItem *item)
PropertyType RNA_property_type(PropertyRNA *prop)
bool is_orthogonal_m3(const float m[3][3])
void quat_to_eulO(float e[3], short order, const float q[4])
void quat_to_axis_angle(float axis[3], float *angle, const float q[4])
size_t BKE_unit_value_as_string(char *str, int str_maxncpy, double value, int prec, int type, const UnitSettings &settings, bool pad, bool do_unit_suffix)
const char * RNA_struct_identifier(const StructRNA *type)
PropertySubType RNA_property_subtype(PropertyRNA *prop)
void mat4_decompose(float loc[3], float quat[4], float size[3], const float wmat[4][4])
const UnitSettings * unit
void use_property_split_set(bool is_sep)
void label(StringRef name, int icon)
Layout & column(bool align)