27 {
PFIELD_SHAPE_LINE,
"LINE", 0,
"Line",
"Field originates from the local Z axis of the object"},
32 "Field originates from the local XY plane of the object"},
37 "Field originates from the surface of the object"},
42 "Field originates from all of the vertices of the object"},
43 {0,
nullptr, 0,
nullptr,
nullptr},
48# include <fmt/format.h>
57 {
PFIELD_SHAPE_LINE,
"LINE", 0,
"Line",
"Field originates from the local Z axis of the object"},
62 "Field originates from the local XY plane of the object"},
64 {0,
nullptr, 0,
nullptr,
nullptr},
69 {
PFIELD_SHAPE_LINE,
"LINE", 0,
"Line",
"Field originates from the local Z axis of the object"},
74 "Field originates from the local XY plane of the object"},
75 {0,
nullptr, 0,
nullptr,
nullptr},
83 {0,
nullptr, 0,
nullptr,
nullptr},
90 {0,
nullptr, 0,
nullptr,
nullptr},
96 {0,
nullptr, 0,
nullptr,
nullptr},
99# include <fmt/format.h>
123 switch (
GS(
ptr->owner_id->name)) {
132 "Trying to get PTCacheID from an invalid ID type "
133 "(Only scenes and objects are supported).");
137 return (*ob !=
nullptr || *scene !=
nullptr);
140static std::optional<std::string> rna_PointCache_path(
const PointerRNA *
ptr)
145 Scene *scene =
nullptr;
147 if (!rna_Cache_get_valid_owner_ID(
ptr, &ob, &scene)) {
154 return "rigidbody_world.point_cache";
170 char name_esc[
sizeof(md->
name) * 2];
177 return fmt::format(
"modifiers[\"{}\"].particle_system.point_cache", name_esc);
186 for (; surface; surface = surface->
next) {
188 char name_surface_esc[
sizeof(surface->
name) * 2];
191 "modifiers[\"{}\"].canvas_settings.canvas_surfaces[\"{}\"].point_cache",
202 return fmt::format(
"modifiers[\"{}\"].point_cache", name_esc);
209 return fmt::format(
"modifiers[\"{}\"].point_cache", name_esc);
214 return fmt::format(
"modifiers[\"{}\"].point_cache", name_esc);
225 Scene *scene =
nullptr;
227 if (!rna_Cache_get_valid_owner_ID(
ptr, &ob, &scene)) {
251 Scene *scene =
nullptr;
253 if (!rna_Cache_get_valid_owner_ID(
ptr, &ob, &scene)) {
270bool rna_Cache_use_disk_cache_override_apply(
Main * ,
294 Scene *scene =
nullptr;
296 if (!rna_Cache_get_valid_owner_ID(
ptr, &ob, &scene)) {
301 bool use_new_name =
true;
316 PTCacheID *pid =
nullptr, *pid2 =
nullptr;
322 if (pid->
cache == cache) {
328 use_new_name =
false;
357 while (cache->
prev) {
366static void rna_Cache_active_point_cache_index_range(
373 Scene *scene =
nullptr;
375 if (!rna_Cache_get_valid_owner_ID(
ptr, &ob, &scene)) {
387static int rna_Cache_active_point_cache_index_get(
PointerRNA *
ptr)
392 Scene *scene =
nullptr;
394 if (!rna_Cache_get_valid_owner_ID(
ptr, &ob, &scene)) {
408static void rna_Cache_active_point_cache_index_set(
PointerRNA *
ptr,
int value)
411 Scene *scene =
nullptr;
413 if (!rna_Cache_get_valid_owner_ID(
ptr, &ob, &scene)) {
425static void rna_PointCache_frame_step_range(
432 Scene *scene =
nullptr;
434 if (!rna_Cache_get_valid_owner_ID(
ptr, &ob, &scene)) {
449 Scene *scene =
nullptr;
451 if (!rna_Cache_get_valid_owner_ID(
ptr, &ob, &scene)) {
463 return int(strlen(cache->
info));
466static std::optional<std::string> rna_CollisionSettings_path(
const PointerRNA * )
474 char name_esc[
sizeof(md->
name) * 2];
477 return fmt::format(
"modifiers[\"{}\"].settings", name_esc);
488static bool rna_SoftBodySettings_use_edges_get(
PointerRNA *
ptr)
494static void rna_SoftBodySettings_use_edges_set(
PointerRNA *
ptr,
bool value)
505static bool rna_SoftBodySettings_use_goal_get(
PointerRNA *
ptr)
511static void rna_SoftBodySettings_use_goal_set(
PointerRNA *
ptr,
bool value)
522static bool rna_SoftBodySettings_stiff_quads_get(
PointerRNA *
ptr)
528static void rna_SoftBodySettings_stiff_quads_set(
PointerRNA *
ptr,
bool value)
539static bool rna_SoftBodySettings_self_collision_get(
PointerRNA *
ptr)
545static void rna_SoftBodySettings_self_collision_set(
PointerRNA *
ptr,
bool value)
567static void rna_SoftBodySettings_new_aero_set(
PointerRNA *
ptr,
int value)
578static bool rna_SoftBodySettings_face_collision_get(
PointerRNA *
ptr)
584static void rna_SoftBodySettings_face_collision_set(
PointerRNA *
ptr,
bool value)
595static bool rna_SoftBodySettings_edge_collision_get(
PointerRNA *
ptr)
601static void rna_SoftBodySettings_edge_collision_set(
PointerRNA *
ptr,
bool value)
612static void rna_SoftBodySettings_goal_vgroup_get(
PointerRNA *
ptr,
char *value)
618static int rna_SoftBodySettings_goal_vgroup_length(
PointerRNA *
ptr)
624static void rna_SoftBodySettings_goal_vgroup_set(
PointerRNA *
ptr,
const char *value)
630static void rna_SoftBodySettings_mass_vgroup_set(
PointerRNA *
ptr,
const char *value)
636static void rna_SoftBodySettings_spring_vgroup_set(
PointerRNA *
ptr,
const char *value)
642static std::optional<std::string> rna_SoftBodySettings_path(
const PointerRNA *
ptr)
646 char name_esc[
sizeof(md->
name) * 2];
649 return fmt::format(
"modifiers[\"{}\"].settings", name_esc);
654 ID *
id =
ptr->owner_id;
661 if (particle_id_check(
ptr)) {
666 part->pd->tex =
nullptr;
669 if (part->pd2 && part->pd2->forcefield !=
PFIELD_TEXTURE && part->pd2->tex) {
671 part->pd2->tex =
nullptr;
684 ob->
pd->
tex =
nullptr;
702 if (!particle_id_check(
ptr)) {
712static void rna_FieldSettings_type_set(
PointerRNA *
ptr,
int value)
716 part_deflect->forcefield = value;
718 if (!particle_id_check(
ptr)) {
734 if (particle_id_check(
ptr)) {
742 rna_FieldSettings_shape_update(bmain, scene,
ptr);
755static std::optional<std::string> rna_FieldSettings_path(
const PointerRNA *
ptr)
761 if (particle_id_check(
ptr)) {
765 if (part->pd == pd) {
766 return "force_field_1";
768 else if (part->pd2 == pd) {
769 return "force_field_2";
785 ID *
id =
ptr->owner_id;
809static std::optional<std::string> rna_EffectorWeight_path(
const PointerRNA *
ptr)
814 if (particle_id_check(
ptr)) {
818 if (part->effector_weights == ew) {
819 return "effector_weights";
823 ID *
id =
ptr->owner_id;
830 return "rigidbody_world.effector_weights";
842 char name_esc[
sizeof(md->
name) * 2];
844 return fmt::format(
"modifiers[\"{}\"].settings.effector_weights", name_esc);
853 char name_esc[
sizeof(md->
name) * 2];
855 return fmt::format(
"modifiers[\"{}\"].settings.effector_weights", name_esc);
865 char name_esc[
sizeof(md->
name) * 2];
867 return fmt::format(
"modifiers[\"{}\"].domain_settings.effector_weights", name_esc);
880 for (; surface; surface = surface->
next) {
882 char name_esc[
sizeof(md->
name) * 2];
883 char name_esc_surface[
sizeof(surface->
name) * 2];
888 "modifiers[\"{}\"].canvas_settings.canvas_surfaces[\"{}\"]"
933 rna_softbody_update(bmain, scene,
ptr);
943 if (particle_id_check(
ptr)) {
944 return empty_shape_items;
951 return curve_vortex_shape_items;
954 return curve_shape_items;
958 return vortex_shape_items;
965 return empty_vortex_shape_items;
968 return empty_shape_items;
1020 prop,
"Disk Cache",
"Save cache files to disk (.blend file must be saved first)");
1023 prop,
nullptr,
nullptr,
"rna_Cache_use_disk_cache_override_apply");
1075 "Use this file's path for the disk cache when library linked into another file "
1076 "(for local bakes per scene file, disable this option)");
1097 "rna_Cache_active_point_cache_index_get",
1098 "rna_Cache_active_point_cache_index_set",
1099 "rna_Cache_active_point_cache_index_range");
1131 "rna_Cache_list_begin",
1132 "rna_iterator_listbase_next",
1133 "rna_iterator_listbase_end",
1134 "rna_iterator_listbase_get",
1154 srna,
"Collision Settings",
"Collision settings for object in physics simulation");
1161 prop,
"Enabled",
"Enable this object as a collider for physics systems");
1182 prop,
"Friction Factor",
"Amount of friction during particle collision");
1195 prop,
"Permeability",
"Chance that the particle will pass through the mesh");
1215 prop,
"Inner Thickness",
"Inner face thickness (only used by softbodies)");
1236 "How much of effector force gets lost during collision with this object (in percent)");
1250 "Cloth collision acts with respect to the collider normals (improves penetration recovery)");
1257 "Cloth collision impulses act in the direction of the collider normals "
1258 "(more reliable in some cases)");
1406 {0,
"NONE", ICON_BLANK1,
"None",
""},
1411 "Create a force that acts as a boid's predators or target"},
1416 "Spherical forcefield based on the charge of particles, "
1417 "only influences other charge force fields"},
1422 "Create a force along a curve object"},
1423 {
PFIELD_DRAG,
"DRAG", ICON_FORCE_DRAG,
"Drag",
"Create a force that dampens motion"},
1426 ICON_FORCE_FLUIDFLOW,
1428 "Create a force based on fluid simulation velocities"},
1433 "Radial field toward the center of object"},
1436 ICON_FORCE_HARMONIC,
1438 "The source of this force field is the zero point of a harmonic oscillator"},
1441 ICON_FORCE_LENNARDJONES,
1443 "Forcefield based on the Lennard-Jones potential"},
1446 ICON_FORCE_MAGNETIC,
1448 "Forcefield depends on the speed of the particles"},
1449 {
PFIELD_TEXTURE,
"TEXTURE", ICON_FORCE_TEXTURE,
"Texture",
"Force field based on a texture"},
1452 ICON_FORCE_TURBULENCE,
1454 "Create turbulence with a noise field"},
1459 "Spiraling force that twists the force object's local Z axis"},
1464 "Constant force along the force object's local Z axis"},
1465 {0,
nullptr, 0,
nullptr,
nullptr},
1472 {0,
nullptr, 0,
nullptr,
nullptr},
1479 {0,
nullptr, 0,
nullptr,
nullptr},
1486 {0,
nullptr, 0,
nullptr,
nullptr},
1490 {0,
"NONE", 0,
"None",
""},
1491 {4,
"BRAID", 0,
"Braid",
""},
1492 {1,
"CURL", 0,
"Curl",
""},
1493 {2,
"RADIAL", 0,
"Radial",
""},
1494 {6,
"ROLL", 0,
"Roll",
""},
1495 {5,
"ROTATION", 0,
"Rotation",
""},
1496 {3,
"WAVE", 0,
"Wave",
""},
1497 {0,
nullptr, 0,
nullptr,
nullptr},
1504 srna,
"Field Settings",
"Field settings for an object in physics simulation");
1522 prop,
"Shape",
"Which direction is used to calculate the effector force");
1537 "How the texture effect is calculated (RGB and Curl need a RGB texture, "
1538 "else Gradient will be used instead)");
1545 prop,
"Z Direction",
"Effect in full or only positive/negative Z direction");
1574 prop,
"Quadratic Drag",
"Drag component proportional to the square of velocity");
1589 "How much the force is reduced when acting parallel to a surface, e.g. cloth");
1617 prop,
"Falloff Power",
"How quickly strength falls off with distance from the force field");
1637 prop,
"Minimum Radial Distance",
"Minimum radial distance for the field's falloff");
1644 prop,
"Maximum Radial Distance",
"Maximum radial distance for the field to work");
1651 prop,
"Radial Falloff Power",
"Radial falloff power (real gravitational falloff = 2)");
1658 prop,
"Nabla",
"Defines size of derivative offset used for calculating gradient and curl");
1687 prop,
"Use Min",
"Use a minimum radial distance for the field's falloff");
1705 prop,
"Use Global Coordinates",
"Use effector/global coordinates for turbulence");
1716 prop,
"Root Texture Coordinates",
"Texture coordinates from root particle locations");
1737 prop,
"Multiple Springs",
"Every point is affected by multiple springs");
1769 prop,
"Minimum Distance",
"The distance from which particles are affected fully");
1781 prop,
"Additive",
"Based on distance/falloff it adds a portion of the entire path");
1787 prop,
"Weights",
"Use curve weights to influence the particle influence along the curve");
1850 {
SBC_MODE_AVG,
"AVERAGE", 0,
"Average",
"Average Spring length * Ball Size"},
1851 {
SBC_MODE_MIN,
"MINIMAL", 0,
"Minimal",
"Minimal Spring length * Ball Size"},
1852 {
SBC_MODE_MAX,
"MAXIMAL", 0,
"Maximal",
"Maximal Spring length * Ball Size"},
1854 {0,
nullptr, 0,
nullptr,
nullptr},
1858 {0,
"SIMPLE", 0,
"Simple",
"Edges receive a drag force from surrounding media"},
1863 "Edges receive a lift force when passing through surrounding media"},
1864 {0,
nullptr, 0,
nullptr,
nullptr},
1871 srna,
"Soft Body Settings",
"Soft body simulation settings for an object");
1904 prop,
"Speed",
"Tweak timing for physics to control frequency and speed");
1913 "rna_SoftBodySettings_goal_vgroup_get",
1914 "rna_SoftBodySettings_goal_vgroup_length",
1915 "rna_SoftBodySettings_goal_vgroup_set");
1922 prop,
"Goal Minimum",
"Goal minimum, vertex weights are scaled to match this range");
1929 prop,
"Goal Maximum",
"Goal maximum, vertex weights are scaled to match this range");
1943 prop,
"Goal Stiffness",
"Goal (vertex target position) spring stiffness");
1976 prop,
"Spring Length",
"Alter spring length to shrink/blow up (unit %) 0 to disable");
2022 prop,
"Ball Size",
"Absolute ball size or factor if not manually adjusted");
2045 "The Runge-Kutta ODE solver error limit, low value gives more precision, "
2046 "high values speed");
2073 "Fuzziness while on collision, high values make collision handling faster "
2085 prop,
"Print Performance to Console",
"Turn on SB diagnose console prints");
2090 prop,
"Estimate Transforms",
"Store the estimated transforms in the soft body settings");
2118 prop,
"rna_SoftBodySettings_use_goal_get",
"rna_SoftBodySettings_use_goal_set");
2121 prop,
"Use Goal",
"Define forces for vertices to stick to animated position");
2126 prop,
"rna_SoftBodySettings_use_edges_get",
"rna_SoftBodySettings_use_edges_set");
2133 prop,
"rna_SoftBodySettings_stiff_quads_get",
"rna_SoftBodySettings_stiff_quads_set");
2140 prop,
"rna_SoftBodySettings_edge_collision_get",
"rna_SoftBodySettings_edge_collision_set");
2146 prop,
"rna_SoftBodySettings_face_collision_get",
"rna_SoftBodySettings_face_collision_set");
2153 prop,
"rna_SoftBodySettings_new_aero_get",
"rna_SoftBodySettings_new_aero_set",
nullptr);
2155 prop,
"Aerodynamics Type",
"Method of calculating aerodynamic interaction");
2160 prop,
"rna_SoftBodySettings_self_collision_get",
"rna_SoftBodySettings_self_collision_set");
#define FOREACH_SCENE_OBJECT_END
#define FOREACH_SCENE_OBJECT_BEGIN(scene, _instance)
ModifierData * BKE_modifiers_findby_type(const Object *ob, ModifierType type)
const ModifierTypeInfo * BKE_modifier_get_info(ModifierType type)
@ eModifierTypeFlag_UsesPointCache
void BKE_ptcache_ids_from_object(struct ListBase *lb, struct Object *ob, struct Scene *scene, int duplis)
void BKE_ptcache_update_info(PTCacheID *pid)
void BKE_ptcache_toggle_disk_cache(struct PTCacheID *pid)
void BKE_ptcache_load_external(struct PTCacheID *pid)
PTCacheID BKE_ptcache_id_find(struct Object *ob, struct Scene *scene, struct PointCache *cache)
#define PTCACHE_TYPE_SMOKE_DOMAIN
int BKE_ptcache_object_reset(struct Scene *scene, struct Object *ob, int mode)
#define PTCACHE_RESET_DEPSGRAPH
void BKE_ptcache_disk_cache_rename(struct PTCacheID *pid, const char *name_src, const char *name_dst)
#define BLI_assert_msg(a, msg)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void void BLI_freelistN(ListBase *listbase) ATTR_NONNULL(1)
int BLI_listbase_count(const ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int max_ii(int a, int b)
ATTR_WARN_UNUSED_RESULT const size_t num
bool BLI_path_make_safe_filename(char *filename) ATTR_NONNULL(1)
char * STRNCPY(char(&dst)[N], const char *src)
size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
#define UNUSED_VARS_NDEBUG(...)
#define BLT_I18NCONTEXT_ID_PARTICLESETTINGS
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
@ eModifierType_ParticleSystem
@ eModifierType_Collision
@ eModifierType_DynamicPaint
@ PFIELD_MULTIPLE_SPRINGS
@ PFIELD_CLOTH_USE_NORMAL
@ PFIELD_GUIDE_PATH_WEIGHT
@ PFIELD_CLOTH_USE_CULLING
@ PTCACHE_FLAG_INFO_DIRTY
Types and defines for representing Rigid Body entities.
Read Guarded memory(de)allocation.
#define RNA_TRANSLATION_PREC_DEFAULT
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
@ PROPOVERRIDE_NO_COMPARISON
@ PROP_PATH_SUPPORTS_BLEND_RELATIVE
BMesh const char void * data
ModifierData * modifier_add(ReportList *reports, Main *bmain, Scene *scene, Object *ob, const char *name, int type)
void check_force_modifiers(Main *bmain, Scene *scene, Object *object)
PropertyType RNA_property_type(PropertyRNA *prop)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, PointerRNA *ptr, ListBase *lb, IteratorSkipFunc skip)
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, bool value)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_struct_name_property(StructRNA *srna, PropertyRNA *prop)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_define_lib_overridable(const bool make_overridable)
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
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 RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int length[])
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
const int rna_matrix_dimsize_3x3[]
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
void RNA_def_property_override_funcs(PropertyRNA *prop, const char *diff, const char *store, const char *apply)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
int rna_object_vgroup_name_index_length(PointerRNA *ptr, int index)
void rna_object_vgroup_name_set(PointerRNA *ptr, const char *value, char *result, int result_maxncpy)
void rna_object_vgroup_name_index_set(PointerRNA *ptr, const char *value, short *index)
void rna_object_vgroup_name_index_get(PointerRNA *ptr, char *value, int index)
const EnumPropertyItem rna_enum_axis_xyz_items[]
static void rna_def_pointcache_common(StructRNA *srna)
static const EnumPropertyItem effector_shape_items[]
static void rna_def_pointcache_active(BlenderRNA *brna)
static void rna_def_collision(BlenderRNA *brna)
static void rna_def_softbody(BlenderRNA *brna)
static void rna_def_ptcache_point_caches(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_object_force(BlenderRNA *brna)
static void rna_def_effector_weight(BlenderRNA *brna)
static void rna_def_field(BlenderRNA *brna)
struct PointCache * point_cache
struct ClothSimSettings * sim_parms
struct EffectorWeights * effector_weights
struct DynamicPaintCanvasSettings * canvas
struct DynamicPaintSurface * next
struct EffectorWeights * effector_weights
struct PointCache * pointcache
struct EffectorWeights * effector_weights
struct FluidDomainSettings * domain
struct ModifierData * next
struct PointCache ** cache_ptr
struct ListBase * ptcaches
struct PointCache * cache
struct ParticleSystem * psys
struct PointCache * pointcache
IDOverrideLibraryPropertyOperation * liboverride_operation
struct PointCache * pointcache
struct RigidBodyWorld_Shared * shared
struct EffectorWeights * effector_weights
struct RigidBodyWorld * rigidbody_world
struct PointCache * pointcache
struct SoftBody_Shared * shared
struct EffectorWeights * effector_weights
void WM_main_add_notifier(uint type, void *reference)