20# include <fmt/format.h>
42static int rna_Meta_texspace_editable(
const PointerRNA *ptr,
const char ** )
48static void rna_Meta_texspace_location_get(
PointerRNA *ptr,
float *values)
57static void rna_Meta_texspace_location_set(
PointerRNA *ptr,
const float *values)
64static void rna_Meta_texspace_size_get(
PointerRNA *ptr,
float *values)
73static void rna_Meta_texspace_size_set(
PointerRNA *ptr,
const float *values)
82 ID *
id = ptr->owner_id;
90 MetaBall *mb = id_cast<MetaBall *>(ptr->owner_id);
108 rna_MetaBall_update_data(bmain, scene, ptr);
130 reports,
RPT_ERROR,
"Metaball '%s' does not contain spline given", mb->id.name + 2);
135 ml_ptr->invalidate();
144static void rna_MetaBall_elements_clear(
MetaBall *mb)
146 mb->elems.free_no_destruct();
155static bool rna_Meta_is_editmode_get(
PointerRNA *ptr)
157 MetaBall *mb = id_cast<MetaBall *>(ptr->owner_id);
158 return (mb->editelems !=
nullptr);
161static std::optional<std::string> rna_MetaElement_path(
const PointerRNA *ptr)
163 const MetaBall *mb = id_cast<MetaBall *>(ptr->owner_id);
177 return fmt::format(
"elements[{}]",
index);
226 prop,
"Size X",
"Size of element, use of components depends on element type");
234 prop,
"Size Y",
"Size of element, use of components depends on element type");
242 prop,
"Size Z",
"Size of element, use of components depends on element type");
294 "Type for the new metaball element");
295 parm =
RNA_def_pointer(func,
"element",
"MetaElement",
"",
"The newly created metaball element");
302 parm =
RNA_def_pointer(func,
"element",
"MetaElement",
"",
"The element to remove");
319 {
MB_UPDATE_ALWAYS,
"UPDATE_ALWAYS", 0,
"Always",
"While editing, update metaball always"},
324 "While editing, update metaball in half resolution"},
325 {
MB_UPDATE_FAST,
"FAST", 0,
"Fast",
"While editing, update metaball without polygonization"},
326 {
MB_UPDATE_NEVER,
"NEVER", 0,
"Never",
"While editing, don't update metaball at all"},
327 {0,
nullptr, 0,
nullptr,
nullptr},
373 "Auto Texture Space",
374 "Adjust active object's texture space automatically when transforming object");
381 prop,
"rna_Meta_texspace_location_get",
"rna_Meta_texspace_location_set",
nullptr);
390 prop,
"rna_Meta_texspace_size_get",
"rna_Meta_texspace_size_set",
nullptr);
396 RNA_def_property_float(prop,
nullptr,
"rot");
417 "rna_IDMaterials_assign_int");
Object is a sort of wrapper for general info.
Read Blender memory allocation and freeing.
#define RNA_TRANSLATION_PREC_DEFAULT
void WM_main_add_notifier(uint type, void *reference)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
MetaElem * BKE_mball_element_add(MetaBall *mb, int type)
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
static void rna_def_metaball(BlenderRNA *brna)
MINLINE void copy_v3_v3(float r[3], const float a[3])
static void rna_def_metaball_elements(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
float normalize_qt(float q[4])
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
static void rna_def_metaelement(BlenderRNA *brna)
void RNA_api_meta(StructRNA *srna)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
const EnumPropertyItem rna_enum_metaelem_type_items[]
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void rna_def_animdata_common(StructRNA *srna)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier_c_str, int type, int subtype)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint)
void DEG_id_tag_update(ID *id, unsigned int flags)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier_c_str, const char *call)
void BKE_mball_properties_copy(Main *bmain, MetaBall *metaball_src)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_function_flag(FunctionRNA *func, FunctionFlag flag)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
bool BLI_remlink_safe(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void RNA_def_property_array(PropertyRNA *prop, int length)
void RNA_def_meta(BlenderRNA *brna)