diff options
Diffstat (limited to 'source/blender/makesrna')
20 files changed, 1042 insertions, 270 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index 31d1ed54fa1..d2e27bdbcad 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -259,6 +259,7 @@ extern StructRNA RNA_FreestyleLineStyle; extern StructRNA RNA_FreestyleModuleSettings; extern StructRNA RNA_FreestyleSettings; extern StructRNA RNA_Function; +extern StructRNA RNA_FunctionNode; extern StructRNA RNA_GPencilFrame; extern StructRNA RNA_GPencilInterpolateSettings; extern StructRNA RNA_GPencilLayer; @@ -548,6 +549,9 @@ extern StructRNA RNA_ShrinkwrapConstraint; extern StructRNA RNA_ShrinkwrapModifier; extern StructRNA RNA_SimpleDeformModifier; extern StructRNA RNA_SimplifyGpencilModifier; +extern StructRNA RNA_Simulation; +extern StructRNA RNA_SimulationNode; +extern StructRNA RNA_SimulationNodeTree; extern StructRNA RNA_SkinModifier; extern StructRNA RNA_SmoothGpencilModifier; extern StructRNA RNA_SmoothModifier; @@ -930,10 +934,6 @@ void RNA_property_update_main(struct Main *bmain, PropertyRNA *prop); bool RNA_property_update_check(struct PropertyRNA *prop); -void RNA_property_update_cache_add(PointerRNA *ptr, PropertyRNA *prop); -void RNA_property_update_cache_flush(struct Main *bmain, struct Scene *scene); -void RNA_property_update_cache_free(void); - /* Property Data */ bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop); diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h index fef98f9da4b..b6bae805636 100644 --- a/source/blender/makesrna/RNA_enum_types.h +++ b/source/blender/makesrna/RNA_enum_types.h @@ -23,6 +23,10 @@ #include "RNA_types.h" +#ifdef __cplusplus +extern "C" { +#endif + struct bNodeSocketType; struct bNodeTreeType; struct bNodeType; @@ -191,6 +195,8 @@ extern const EnumPropertyItem rna_enum_node_socket_in_out_items[]; extern const EnumPropertyItem rna_enum_node_math_items[]; extern const EnumPropertyItem rna_enum_mapping_type_items[]; extern const EnumPropertyItem rna_enum_node_vec_math_items[]; +extern const EnumPropertyItem rna_enum_node_boolean_math_items[]; +extern const EnumPropertyItem rna_enum_node_float_compare_items[]; extern const EnumPropertyItem rna_enum_node_filter_items[]; extern const EnumPropertyItem rna_enum_node_map_range_items[]; extern const EnumPropertyItem rna_enum_node_clamp_items[]; @@ -315,4 +321,8 @@ const EnumPropertyItem *RNA_mask_local_itemf(struct bContext *C, /* Non confirming, utility function. */ const EnumPropertyItem *RNA_enum_node_tree_types_itemf_impl(struct bContext *C, bool *r_free); +#ifdef __cplusplus +} +#endif + #endif /* __RNA_ENUM_TYPES_H__ */ diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 64b7a3e70c1..cd05aba8794 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -103,6 +103,13 @@ if(WITH_NEW_OBJECT_TYPES) ) endif() +if (WITH_NEW_SIMULATION_TYPE) + list(APPEND DEFSRC + rna_simulation.c + ) +endif() + + set(APISRC rna_action_api.c rna_animation_api.c @@ -342,6 +349,11 @@ if(WITH_NEW_OBJECT_TYPES) add_definitions(-DWITH_NEW_OBJECT_TYPES) endif() +if (WITH_NEW_SIMULATION_TYPE) + add_definitions(-DWITH_NEW_SIMULATION_TYPE) +endif() + + # Build makesrna executable blender_include_dirs( . diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 46854bc6307..86a088f38ed 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -4302,6 +4302,9 @@ static RNAProcessItem PROCESS_ITEMS[] = { {"rna_screen.c", NULL, RNA_def_screen}, {"rna_sculpt_paint.c", NULL, RNA_def_sculpt_paint}, {"rna_sequencer.c", "rna_sequencer_api.c", RNA_def_sequencer}, +#ifdef WITH_NEW_SIMULATION_TYPE + {"rna_simulation.c", NULL, RNA_def_simulation}, +#endif {"rna_space.c", "rna_space_api.c", RNA_def_space}, {"rna_speaker.c", NULL, RNA_def_speaker}, {"rna_test.c", NULL, RNA_def_test}, diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 699ce0f041e..891c30af466 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -71,6 +71,9 @@ const EnumPropertyItem rna_enum_id_type_items[] = { {ID_PA, "PARTICLE", ICON_PARTICLE_DATA, "Particle", ""}, {ID_LP, "LIGHT_PROBE", ICON_LIGHTPROBE_CUBEMAP, "Light Probe", ""}, {ID_SCE, "SCENE", ICON_SCENE_DATA, "Scene", ""}, +#ifdef WITH_NEW_SIMULATION_TYPE + {ID_SIM, "SIMULATION", ICON_PHYSICS, "Simulation", ""}, /* TODO: Use correct icon. */ +#endif {ID_SO, "SOUND", ICON_SOUND, "Sound", ""}, {ID_SPK, "SPEAKER", ICON_SPEAKER, "Speaker", ""}, {ID_TXT, "TEXT", ICON_TEXT, "Text", ""}, @@ -303,6 +306,11 @@ short RNA_type_to_ID_code(const StructRNA *type) if (base_type == &RNA_Screen) { return ID_SCR; } +# ifdef WITH_NEW_SIMULATION_TYPE + if (base_type == &RNA_Simulation) { + return ID_SIM; + } +# endif if (base_type == &RNA_Sound) { return ID_SO; } @@ -405,6 +413,12 @@ StructRNA *ID_code_to_RNA_type(short idcode) return &RNA_Scene; case ID_SCR: return &RNA_Screen; + case ID_SIM: +# ifdef WITH_NEW_SIMULATION_TYPE + return &RNA_Simulation; +# else + return &RNA_ID; +# endif case ID_SO: return &RNA_Sound; case ID_SPK: diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index b56a18c18a9..85892758a88 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -98,8 +98,6 @@ void RNA_exit(void) { StructRNA *srna; - RNA_property_update_cache_free(); - for (srna = BLENDER_RNA.structs.first; srna; srna = srna->cont.next) { if (srna->cont.prophash) { BLI_ghash_free(srna->cont.prophash, NULL, NULL); @@ -2308,115 +2306,6 @@ void RNA_property_update_main(Main *bmain, Scene *scene, PointerRNA *ptr, Proper rna_property_update(NULL, bmain, scene, ptr, prop); } -/* RNA Updates Cache ------------------------ */ -/* Overview of RNA Update cache system: - * - * RNA Update calls need to be cached in order to maintain reasonable performance - * of the animation system (i.e. maintaining a somewhat interactive framerate) - * while still allowing updates to be called (necessary in particular for modifier - * property updates to actually work). - * - * The cache is structured with a dual-layer structure - * - L1 = PointerRNA used as key; owner_id is used (it should always be defined, - * and most updates end up using just that anyways) - * - L2 = Update functions to be called on those PointerRNA's - */ - -/* cache element */ -typedef struct tRnaUpdateCacheElem { - struct tRnaUpdateCacheElem *next, *prev; - - PointerRNA ptr; /* L1 key - id as primary, data secondary/ignored? */ - ListBase L2Funcs; /* L2 functions (LinkData<RnaUpdateFuncRef>) */ -} tRnaUpdateCacheElem; - -/* cache global (tRnaUpdateCacheElem's) - only accessible using these API calls */ -static ListBase rna_updates_cache = {NULL, NULL}; - -/* ........................... */ - -void RNA_property_update_cache_add(PointerRNA *ptr, PropertyRNA *prop) -{ - const bool is_rna = (prop->magic == RNA_MAGIC); - tRnaUpdateCacheElem *uce = NULL; - UpdateFunc fn = NULL; - LinkData *ld; - - /* sanity check */ - if (NULL == ptr) { - return; - } - - prop = rna_ensure_property(prop); - - /* we can only handle update calls with no context args for now (makes animsys updates easier) */ - if ((is_rna == false) || (prop->update == NULL) || (prop->flag & PROP_CONTEXT_UPDATE)) { - return; - } - fn = prop->update; - - /* find cache element for which key matches... */ - for (uce = rna_updates_cache.first; uce; uce = uce->next) { - /* Just match by id only for now, - * since most update calls that we'll encounter only really care about this. */ - /* TODO: later, the cache might need to have some nesting on L1 to cope better - * with these problems + some tagging to indicate we need this */ - if (uce->ptr.owner_id == ptr->owner_id) { - break; - } - } - if (uce == NULL) { - /* create new instance */ - uce = MEM_callocN(sizeof(tRnaUpdateCacheElem), "tRnaUpdateCacheElem"); - BLI_addtail(&rna_updates_cache, uce); - - /* copy pointer */ - RNA_pointer_create(ptr->owner_id, ptr->type, ptr->data, &uce->ptr); - } - - /* check on the update func */ - for (ld = uce->L2Funcs.first; ld; ld = ld->next) { - /* stop on match - function already cached */ - if (fn == ld->data) { - return; - } - } - /* else... if still here, we need to add it */ - BLI_addtail(&uce->L2Funcs, BLI_genericNodeN(fn)); -} - -void RNA_property_update_cache_flush(Main *bmain, Scene *scene) -{ - tRnaUpdateCacheElem *uce; - - /* TODO: should we check that bmain and scene are valid? The above stuff doesn't! */ - - /* execute the cached updates */ - for (uce = rna_updates_cache.first; uce; uce = uce->next) { - LinkData *ld; - - for (ld = uce->L2Funcs.first; ld; ld = ld->next) { - UpdateFunc fn = (UpdateFunc)ld->data; - fn(bmain, scene, &uce->ptr); - } - } -} - -void RNA_property_update_cache_free(void) -{ - tRnaUpdateCacheElem *uce, *ucn; - - for (uce = rna_updates_cache.first; uce; uce = ucn) { - ucn = uce->next; - - /* free L2 cache */ - BLI_freelistN(&uce->L2Funcs); - - /* remove self */ - BLI_freelinkN(&rna_updates_cache, uce); - } -} - /* ---------------------------------------------------------------------- */ /* Property Data */ @@ -5785,10 +5674,10 @@ static char *rna_idp_path(PointerRNA *ptr, } /** - * Find the path from the structure referenced by the pointer to the IDProperty object. + * Find the path from the structure referenced by the pointer to the #IDProperty object. * - * \param ptr Reference to the object owning the custom property storage. - * \param needle Custom property object to find. + * \param ptr: Reference to the object owning the custom property storage. + * \param needle: Custom property object to find. * \return Relative path or NULL. */ char *RNA_path_from_struct_to_idproperty(PointerRNA *ptr, IDProperty *needle) diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c index e087056e850..d89bdcd074f 100644 --- a/source/blender/makesrna/intern/rna_fluid.c +++ b/source/blender/makesrna/intern/rna_fluid.c @@ -73,44 +73,112 @@ static void rna_Fluid_dependency_update(Main *bmain, Scene *scene, PointerRNA *p DEG_relations_tag_update(bmain); } -static void rna_Fluid_resetCache(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) +static void rna_Fluid_datacache_reset(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { +# ifdef WITH_FLUID FluidDomainSettings *settings = (FluidDomainSettings *)ptr->data; if (settings->mmd && settings->mmd->domain) { - settings->mmd->domain->cache_flag |= (FLUID_DOMAIN_OUTDATED_DATA | - FLUID_DOMAIN_OUTDATED_NOISE | - FLUID_DOMAIN_OUTDATED_MESH | - FLUID_DOMAIN_OUTDATED_PARTICLES); + Object *ob = (Object *)ptr->owner_id; + int cache_map = (FLUID_DOMAIN_OUTDATED_DATA | FLUID_DOMAIN_OUTDATED_NOISE | + FLUID_DOMAIN_OUTDATED_MESH | FLUID_DOMAIN_OUTDATED_PARTICLES); + BKE_fluid_cache_free(settings, ob, cache_map); } +# endif DEG_id_tag_update(ptr->owner_id, ID_RECALC_GEOMETRY); } -static void rna_Fluid_reset(Main *bmain, Scene *scene, PointerRNA *ptr) +static void rna_Fluid_noisecache_reset(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) +{ +# ifdef WITH_FLUID + FluidDomainSettings *settings = (FluidDomainSettings *)ptr->data; + if (settings->mmd && settings->mmd->domain) { + Object *ob = (Object *)ptr->owner_id; + int cache_map = FLUID_DOMAIN_OUTDATED_NOISE; + BKE_fluid_cache_free(settings, ob, cache_map); + } +# endif + DEG_id_tag_update(ptr->owner_id, ID_RECALC_GEOMETRY); +} +static void rna_Fluid_meshcache_reset(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { - # ifdef WITH_FLUID - { - FluidDomainSettings *settings = (FluidDomainSettings *)ptr->data; - BKE_fluid_modifier_reset(settings->mmd); + FluidDomainSettings *settings = (FluidDomainSettings *)ptr->data; + if (settings->mmd && settings->mmd->domain) { + Object *ob = (Object *)ptr->owner_id; + int cache_map = FLUID_DOMAIN_OUTDATED_MESH; + BKE_fluid_cache_free(settings, ob, cache_map); } # endif + DEG_id_tag_update(ptr->owner_id, ID_RECALC_GEOMETRY); +} +static void rna_Fluid_particlescache_reset(Main *UNUSED(bmain), + Scene *UNUSED(scene), + PointerRNA *ptr) +{ +# ifdef WITH_FLUID + FluidDomainSettings *settings = (FluidDomainSettings *)ptr->data; + if (settings->mmd && settings->mmd->domain) { + Object *ob = (Object *)ptr->owner_id; + int cache_map = FLUID_DOMAIN_OUTDATED_PARTICLES; + BKE_fluid_cache_free(settings, ob, cache_map); + } +# endif + DEG_id_tag_update(ptr->owner_id, ID_RECALC_GEOMETRY); +} +static void rna_Fluid_guidingcache_reset(Main *UNUSED(bmain), + Scene *UNUSED(scene), + PointerRNA *ptr) +{ +# ifdef WITH_FLUID + FluidDomainSettings *settings = (FluidDomainSettings *)ptr->data; + if (settings->mmd && settings->mmd->domain) { + Object *ob = (Object *)ptr->owner_id; + int cache_map = (FLUID_DOMAIN_OUTDATED_DATA | FLUID_DOMAIN_OUTDATED_NOISE | + FLUID_DOMAIN_OUTDATED_MESH | FLUID_DOMAIN_OUTDATED_PARTICLES | + FLUID_DOMAIN_OUTDATED_GUIDE); + BKE_fluid_cache_free(settings, ob, cache_map); + } +# endif + DEG_id_tag_update(ptr->owner_id, ID_RECALC_GEOMETRY); +} + +static void rna_Fluid_effector_reset(Main *bmain, Scene *scene, PointerRNA *ptr) +{ +# ifdef WITH_FLUID + FluidEffectorSettings *settings = (FluidEffectorSettings *)ptr->data; + settings->flags |= FLUID_EFFECTOR_NEEDS_UPDATE; +# endif + + rna_Fluid_update(bmain, scene, ptr); +} - rna_Fluid_resetCache(bmain, scene, ptr); +static void rna_Fluid_flow_reset(Main *bmain, Scene *scene, PointerRNA *ptr) +{ +# ifdef WITH_FLUID + FluidFlowSettings *settings = (FluidFlowSettings *)ptr->data; + settings->flags |= FLUID_FLOW_NEEDS_UPDATE; +# endif rna_Fluid_update(bmain, scene, ptr); } -static void rna_Fluid_reset_dependency(Main *bmain, Scene *scene, PointerRNA *ptr) +static void rna_Fluid_domain_reset(Main *bmain, Scene *scene, PointerRNA *ptr) { +# ifdef WITH_FLUID FluidDomainSettings *settings = (FluidDomainSettings *)ptr->data; + BKE_fluid_modifier_reset(settings->mmd); +# endif + rna_Fluid_datacache_reset(bmain, scene, ptr); + rna_Fluid_update(bmain, scene, ptr); +} + +static void rna_Fluid_reset_dependency(Main *bmain, Scene *scene, PointerRNA *ptr) +{ # ifdef WITH_FLUID + FluidDomainSettings *settings = (FluidDomainSettings *)ptr->data; BKE_fluid_modifier_reset(settings->mmd); # endif - if (settings->mmd && settings->mmd->domain) { - settings->mmd->domain->point_cache[0]->flag |= PTCACHE_OUTDATED; - } - rna_Fluid_dependency_update(bmain, scene, ptr); } @@ -161,7 +229,7 @@ static void rna_Fluid_flip_parts_update(Main *bmain, Scene *scene, PointerRNA *p /* Only create a particle system in liquid domain mode. */ if (mmd->domain->type != FLUID_DOMAIN_TYPE_LIQUID) { - rna_Fluid_reset(bmain, scene, ptr); + rna_Fluid_domain_reset(bmain, scene, ptr); return; } @@ -1260,14 +1328,14 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "adapt_res"); RNA_def_property_range(prop, 0, 512); RNA_def_property_ui_text(prop, "Additional", "Maximum number of additional cells"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "adapt_margin", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "adapt_margin"); RNA_def_property_range(prop, 2, 24); RNA_def_property_ui_text( prop, "Margin", "Margin added around fluid to minimize boundary interference"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "adapt_threshold", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0, 1.0); @@ -1276,14 +1344,14 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) prop, "Threshold", "Minimum amount of fluid a cell can contain before it is considered empty"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "use_adaptive_domain", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_DOMAIN_USE_ADAPTIVE_DOMAIN); RNA_def_property_ui_text( prop, "Adaptive Domain", "Adapt simulation resolution and size to fluid"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_domain_reset"); /* fluid domain options */ @@ -1297,44 +1365,44 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "Resolution used for the fluid domain. Value corresponds to the longest domain side " "(resolution for other domain sides is calculated automatically)"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_domain_reset"); prop = RNA_def_property(srna, "use_collision_border_front", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "border_collisions", FLUID_DOMAIN_BORDER_FRONT); RNA_def_property_ui_text(prop, "Front", "Enable collisions with front domain border"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "use_collision_border_back", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "border_collisions", FLUID_DOMAIN_BORDER_BACK); RNA_def_property_ui_text(prop, "Back", "Enable collisions with back domain border"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "use_collision_border_right", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "border_collisions", FLUID_DOMAIN_BORDER_RIGHT); RNA_def_property_ui_text(prop, "Right", "Enable collisions with right domain border"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "use_collision_border_left", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "border_collisions", FLUID_DOMAIN_BORDER_LEFT); RNA_def_property_ui_text(prop, "Left", "Enable collisions with left domain border"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "use_collision_border_top", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "border_collisions", FLUID_DOMAIN_BORDER_TOP); RNA_def_property_ui_text(prop, "Top", "Enable collisions with top domain border"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "use_collision_border_bottom", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "border_collisions", FLUID_DOMAIN_BORDER_BOTTOM); RNA_def_property_ui_text(prop, "Bottom", "Enable collisions with bottom domain border"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION); RNA_def_property_float_sdna(prop, NULL, "gravity"); RNA_def_property_array(prop, 3); RNA_def_property_range(prop, -1000.1, 1000.1); RNA_def_property_ui_text(prop, "Gravity", "Gravity in X, Y and Z direction"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "domain_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); @@ -1347,7 +1415,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) prop = RNA_def_property(srna, "delete_in_obstacle", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_DOMAIN_DELETE_IN_OBSTACLE); RNA_def_property_ui_text(prop, "Clear In Obstacle", "Delete fluid inside obstacles"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); /* smoke domain options */ @@ -1359,7 +1427,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) prop, "Buoyancy Density", "Buoyant force based on smoke density (higher value results in faster rising smoke)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "beta", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "beta"); @@ -1369,7 +1437,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) prop, "Buoyancy Heat", "Buoyant force based on smoke heat (higher value results in faster rising smoke)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "dissolve_speed", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "diss_speed"); @@ -1379,23 +1447,23 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) prop, "Dissolve Speed", "Determine how quickly the smoke dissolves (lower value makes smoke disappear faster)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "vorticity", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "vorticity"); RNA_def_property_range(prop, 0.0, 4.0); RNA_def_property_ui_text(prop, "Vorticity", "Amount of turbulence and rotation in smoke"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "highres_sampling", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, smoke_highres_sampling_items); RNA_def_property_ui_text(prop, "Emitter", "Method for sampling the high resolution flow"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "use_dissolve_smoke", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_DOMAIN_USE_DISSOLVE); RNA_def_property_ui_text(prop, "Dissolve Smoke", "Let smoke disappear over time"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "use_dissolve_smoke_log", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_DOMAIN_USE_DISSOLVE_LOG); @@ -1403,7 +1471,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) prop, "Logarithmic Dissolve", "Dissolve smoke in a logarithmic fashion. Dissolves quickly at first, but lingers longer"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); /* flame options */ @@ -1412,19 +1480,19 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) RNA_def_property_ui_range(prop, 0.01, 2.0, 1.0, 5); RNA_def_property_ui_text( prop, "Speed", "Speed of the burning reaction (higher value results in smaller flames)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "flame_smoke", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0, 8.0); RNA_def_property_ui_range(prop, 0.0, 4.0, 1.0, 5); RNA_def_property_ui_text(prop, "Smoke", "Amount of smoke created by burning fuel"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "flame_vorticity", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0, 2.0); RNA_def_property_ui_range(prop, 0.0, 1.0, 1.0, 5); RNA_def_property_ui_text(prop, "Vorticity", "Additional vorticity for the flames"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "flame_ignition", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.5, 5.0); @@ -1433,7 +1501,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) prop, "Minimum", "Minimum temperature of the flames (higher value results in faster rising flames)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "flame_max_temp", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 1.0, 10.0); @@ -1442,12 +1510,12 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) prop, "Maximum", "Maximum temperature of the flames (higher value results in faster rising flames)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "flame_smoke_color", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Smoke Color", "Color of smoke emitted from burning fuel"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); /* noise options */ @@ -1456,19 +1524,20 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) RNA_def_property_range(prop, 0.0, 10.0); RNA_def_property_ui_range(prop, 0.0, 10.0, 1, 2); RNA_def_property_ui_text(prop, "Strength", "Strength of noise"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_noisecache_reset"); prop = RNA_def_property(srna, "noise_pos_scale", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "noise_pos_scale"); RNA_def_property_range(prop, 0.0001, 10.0); RNA_def_property_ui_text( prop, "Scale", "Scale of noise (higher value results in larger vortices)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_noisecache_reset"); prop = RNA_def_property(srna, "noise_time_anim", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "noise_time_anim"); RNA_def_property_range(prop, 0.0001, 10.0); RNA_def_property_ui_text(prop, "Time", "Animation time of noise"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_noisecache_reset"); prop = RNA_def_property(srna, "noise_scale", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "noise_scale"); @@ -1479,7 +1548,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "The noise simulation is scaled up by this factor (compared to the " "base resolution of the domain)"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_domain_reset"); prop = RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "noise_type"); @@ -1487,7 +1556,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Noise Method", "Noise method which is used during the high-res simulation"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_domain_reset"); prop = RNA_def_property(srna, "use_noise", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_DOMAIN_USE_NOISE); @@ -1501,7 +1570,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "simulation_method"); RNA_def_property_enum_items(prop, simulation_methods); RNA_def_property_ui_text(prop, "Simulation Method", "Change the underlying simulation method"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_domain_reset"); prop = RNA_def_property(srna, "flip_ratio", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0, 1.0); @@ -1510,18 +1579,18 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "FLIP Ratio", "PIC/FLIP Ratio. A value of 1.0 will result in a completely FLIP based simulation. Use a " "lower value for simulations which should produce smaller splashes"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "particle_randomness", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0, 10.0); RNA_def_property_ui_text(prop, "Randomness", "Randomness factor for particle sampling"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "particle_number", PROP_INT, PROP_NONE); RNA_def_property_range(prop, 1, 5); RNA_def_property_ui_text( prop, "Number", "Particle number factor (higher value results in more particles)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "particle_min", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "particle_minimum"); @@ -1530,7 +1599,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "Minimum", "Minimum number of particles per cell (ensures that each cell has at " "least this amount of particles)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "particle_max", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "particle_maximum"); @@ -1539,7 +1608,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "Maximum", "Maximum number of particles per cell (ensures that each cell has at " "most this amount of particles)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "particle_radius", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0, 10.0); @@ -1547,7 +1616,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "Radius", "Particle radius factor. Increase this value if the simulation appears " "to leak volume, decrease it if the simulation seems to gain volume"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "particle_band_width", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0, 1000.0); @@ -1555,7 +1624,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) prop, "Width", "Particle (narrow) band width (higher value results in thicker band and more particles)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "use_flip_particles", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "particle_type", FLUID_DOMAIN_PARTICLE_FLIP); @@ -1569,7 +1638,8 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) prop, "Fractional Obstacles", "Fractional obstacles improve and smoothen the fluid-obstacle boundary"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "fractions_threshold", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.001, 1.0); @@ -1579,7 +1649,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "Determines how much fluid is allowed in an obstacle cell " "(higher values will tag a boundary cell as an obstacle easier " "and reduce the boundary smoothening effect)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); /* diffusion options */ @@ -1588,7 +1658,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Use Diffusion", "Enable fluid diffusion settings (e.g. viscosity, surface tension)"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_domain_reset"); prop = RNA_def_property(srna, "surface_tension", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0, 100.0); @@ -1596,7 +1666,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) prop, "Tension", "Surface tension of liquid (higher value results in greater hydrophobic behaviour)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "viscosity_base", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "viscosity_base"); @@ -1605,7 +1675,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) prop, "Viscosity Base", "Viscosity setting: value that is multiplied by 10 to the power of (exponent*-1)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "viscosity_exponent", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "viscosity_exponent"); @@ -1615,12 +1685,12 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "Viscosity Exponent", "Negative exponent for the viscosity value (to simplify entering small values " "e.g. 5*10^-6)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "domain_size", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.001, 10000.0); RNA_def_property_ui_text(prop, "Meters", "Domain size in meters (longest domain side)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_domain_reset"); /* mesh options options */ @@ -1630,7 +1700,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) prop, "Upper Concavity", "Upper mesh concavity bound (high values tend to smoothen and fill out concave regions)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_meshcache_reset"); prop = RNA_def_property(srna, "mesh_concave_lower", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0, 10.0); @@ -1638,17 +1708,17 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) prop, "Lower Concavity", "Lower mesh concavity bound (high values tend to smoothen and fill out concave regions)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_meshcache_reset"); prop = RNA_def_property(srna, "mesh_smoothen_pos", PROP_INT, PROP_NONE); RNA_def_property_range(prop, 0, 100); RNA_def_property_ui_text(prop, "Smoothen Pos", "Positive mesh smoothening"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_meshcache_reset"); prop = RNA_def_property(srna, "mesh_smoothen_neg", PROP_INT, PROP_NONE); RNA_def_property_range(prop, 0, 100); RNA_def_property_ui_text(prop, "Smoothen Neg", "Negative mesh smoothening"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_meshcache_reset"); prop = RNA_def_property(srna, "mesh_scale", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "mesh_scale"); @@ -1660,7 +1730,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "resolution of the domain). For best meshing, it is recommended to " "adjust the mesh particle radius alongside this value"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_domain_reset"); prop = RNA_def_property(srna, "mesh_generator", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "mesh_generator"); @@ -1689,7 +1759,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "Caches velocities of mesh vertices. These will be used " "(automatically) when rendering with motion blur enabled"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_domain_reset"); prop = RNA_def_property(srna, "mesh_particle_radius", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0, 10.0); @@ -1697,7 +1767,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "Radius", "Particle radius factor (higher value results in larger (meshed) " "particles). Needs to be adjusted after changing the mesh scale"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_meshcache_reset"); /* secondary particles options */ @@ -1709,7 +1779,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "Minimum Wave Crest Potential", "Lower clamping threshold for marking fluid cells as wave crests " "(lower value results in more marked cells)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_particlescache_reset"); prop = RNA_def_property(srna, "sndparticle_potential_max_wavecrest", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sndparticle_tau_max_wc"); @@ -1719,7 +1789,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "Maximum Wave Crest Potential", "Upper clamping threshold for marking fluid cells as wave crests " "(higher value results in less marked cells)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_particlescache_reset"); prop = RNA_def_property(srna, "sndparticle_potential_min_trappedair", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sndparticle_tau_min_ta"); @@ -1729,7 +1799,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "Minimum Trapped Air Potential", "Lower clamping threshold for marking fluid cells where air is trapped " "(lower value results in more marked cells)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_particlescache_reset"); prop = RNA_def_property(srna, "sndparticle_potential_max_trappedair", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sndparticle_tau_max_ta"); @@ -1739,7 +1809,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "Maximum Trapped Air Potential", "Upper clamping threshold for marking fluid cells where air is trapped " "(higher value results in less marked cells)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_particlescache_reset"); prop = RNA_def_property(srna, "sndparticle_potential_min_energy", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sndparticle_tau_min_k"); @@ -1750,7 +1820,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "Minimum Kinetic Energy Potential", "Lower clamping threshold that indicates the fluid speed where cells start to emit " "particles (lower values result in generally more particles)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_particlescache_reset"); prop = RNA_def_property(srna, "sndparticle_potential_max_energy", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sndparticle_tau_max_k"); @@ -1761,7 +1831,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "Maximum Kinetic Energy Potential", "Upper clamping threshold that indicates the fluid speed where cells no longer emit more " "particles (higher value results in generally less particles)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_particlescache_reset"); prop = RNA_def_property(srna, "sndparticle_sampling_wavecrest", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "sndparticle_k_wc"); @@ -1770,7 +1840,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Wave Crest Sampling", "Maximum number of particles generated per wave crest cell per frame"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_particlescache_reset"); prop = RNA_def_property(srna, "sndparticle_sampling_trappedair", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "sndparticle_k_ta"); @@ -1779,7 +1849,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Trapped Air Sampling", "Maximum number of particles generated per trapped air cell per frame"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_particlescache_reset"); prop = RNA_def_property(srna, "sndparticle_bubble_buoyancy", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sndparticle_k_b"); @@ -1789,7 +1859,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "Bubble Buoyancy", "Amount of buoyancy force that rises bubbles (high value results in " "bubble movement mainly upwards)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_particlescache_reset"); prop = RNA_def_property(srna, "sndparticle_bubble_drag", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sndparticle_k_d"); @@ -1799,28 +1869,28 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "Bubble Drag", "Amount of drag force that moves bubbles along with the fluid (high " "value results in bubble movement mainly along with the fluid)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_particlescache_reset"); prop = RNA_def_property(srna, "sndparticle_life_min", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sndparticle_l_min"); RNA_def_property_range(prop, 0.0, 10000.0); RNA_def_property_ui_range(prop, 0.0, 10000.0, 100.0, 1); RNA_def_property_ui_text(prop, "Minimum Lifetime", "Lowest possible particle lifetime"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_particlescache_reset"); prop = RNA_def_property(srna, "sndparticle_life_max", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sndparticle_l_max"); RNA_def_property_range(prop, 0.0, 10000.0); RNA_def_property_ui_range(prop, 0.0, 10000.0, 100.0, 1); RNA_def_property_ui_text(prop, "Maximum Lifetime", "Highest possible particle lifetime"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_particlescache_reset"); prop = RNA_def_property(srna, "sndparticle_boundary", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "sndparticle_boundary"); RNA_def_property_enum_items(prop, sndparticle_boundary_items); RNA_def_property_ui_text( prop, "Particles in Boundary", "How particles that left the domain are treated"); - RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_particlescache_reset"); prop = RNA_def_property(srna, "sndparticle_combined_export", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "sndparticle_combined_export"); @@ -1839,7 +1909,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "Potential Radius", "Radius to compute potential for each cell (higher values are slower " "but create smoother potential grids)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_particlescache_reset"); prop = RNA_def_property(srna, "sndparticle_update_radius", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "sndparticle_update_radius"); @@ -1849,7 +1919,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "Update Radius", "Radius to compute position update for each particle (higher values " "are slower but particles move less chaotic)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_particlescache_reset"); prop = RNA_def_property(srna, "particle_scale", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "particle_scale"); @@ -1860,7 +1930,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "The particle simulation is scaled up by this factor (compared to the " "base resolution of the domain)"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_domain_reset"); prop = RNA_def_property(srna, "use_spray_particles", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "particle_type", FLUID_DOMAIN_PARTICLE_SPRAY); @@ -1892,13 +1962,13 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "guide_alpha"); RNA_def_property_range(prop, 1.0, 100.0); RNA_def_property_ui_text(prop, "Weight", "Guiding weight (higher value results in greater lag)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_guidingcache_reset"); prop = RNA_def_property(srna, "guide_beta", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "guide_beta"); RNA_def_property_range(prop, 1, 50); RNA_def_property_ui_text(prop, "Size", "Guiding size (higher value results in larger vortices)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_guidingcache_reset"); prop = RNA_def_property(srna, "guide_vel_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "guide_vel_factor"); @@ -1907,7 +1977,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) prop, "Velocity Factor", "Guiding velocity factor (higher value results in greater guiding velocities)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_guidingcache_reset"); prop = RNA_def_property(srna, "guide_source", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "guide_source"); @@ -1924,13 +1994,13 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "", "Use velocities from this object for the guiding effect (object needs " "to have fluid modifier and be of type domain))"); - RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Fluid_update"); + RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Fluid_guidingcache_reset"); prop = RNA_def_property(srna, "use_guide", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_DOMAIN_USE_GUIDE); RNA_def_property_ui_text(prop, "Use Guiding", "Enable fluid guiding"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_guidingcache_reset"); /* cache options */ @@ -1968,7 +2038,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) prop, NULL, "rna_Fluid_cachetype_mesh_set", "rna_Fluid_cachetype_mesh_itemf"); RNA_def_property_ui_text( prop, "File Format", "Select the file format to be used for caching surface data"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_meshcache_reset"); prop = RNA_def_property(srna, "cache_data_format", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "cache_data_format"); @@ -1977,7 +2047,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) prop, NULL, "rna_Fluid_cachetype_data_set", "rna_Fluid_cachetype_volume_itemf"); RNA_def_property_ui_text( prop, "File Format", "Select the file format to be used for caching volumetric data"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "cache_particle_format", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "cache_particle_format"); @@ -1986,7 +2056,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) prop, NULL, "rna_Fluid_cachetype_particle_set", "rna_Fluid_cachetype_particle_itemf"); RNA_def_property_ui_text( prop, "File Format", "Select the file format to be used for caching particle data"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_particlescache_reset"); prop = RNA_def_property(srna, "cache_noise_format", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "cache_noise_format"); @@ -1995,21 +2065,21 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) prop, NULL, "rna_Fluid_cachetype_noise_set", "rna_Fluid_cachetype_volume_itemf"); RNA_def_property_ui_text( prop, "File Format", "Select the file format to be used for caching noise data"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_noisecache_reset"); prop = RNA_def_property(srna, "cache_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "cache_type"); RNA_def_property_enum_items(prop, cache_types); RNA_def_property_enum_funcs(prop, NULL, "rna_Fluid_cachetype_set", NULL); RNA_def_property_ui_text(prop, "Type", "Change the cache type of the simulation"); - RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Fluid_domain_reset"); prop = RNA_def_property(srna, "cache_directory", PROP_STRING, PROP_DIRPATH); RNA_def_property_string_maxlength(prop, FILE_MAX); RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Fluid_cache_directory_set"); RNA_def_property_string_sdna(prop, NULL, "cache_directory"); RNA_def_property_ui_text(prop, "Cache directory", "Directory that contains fluid cache files"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, NULL); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_update"); prop = RNA_def_property(srna, "is_cache_baking_data", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "cache_flag", FLUID_DOMAIN_BAKING_DATA); @@ -2069,7 +2139,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "only needed if you plan to analyze the cache (e.g. view grids, velocity vectors, " "particles) in Mantaflow directly (outside of Blender) after baking the simulation"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_domain_reset"); /* time options */ @@ -2077,19 +2147,19 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "time_scale"); RNA_def_property_range(prop, 0.0001, 10.0); RNA_def_property_ui_text(prop, "Time Scale", "Adjust simulation speed"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "cfl_condition", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "cfl_condition"); RNA_def_property_range(prop, 0.0, 10.0); RNA_def_property_ui_text( prop, "CFL", "Maximal velocity per cell (higher value results in greater timesteps)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "use_adaptive_timesteps", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_DOMAIN_USE_ADAPTIVE_TIME); RNA_def_property_ui_text(prop, "Use Adaptive Time Steps", ""); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "timesteps_min", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "timesteps_minimum"); @@ -2097,7 +2167,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) RNA_def_property_ui_range(prop, 0, 100, 1, -1); RNA_def_property_ui_text( prop, "Minimum", "Minimum number of simulation steps to perform for one frame"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "timesteps_max", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "timesteps_maximum"); @@ -2105,7 +2175,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) RNA_def_property_ui_range(prop, 0, 100, 1, -1); RNA_def_property_ui_text( prop, "Maximum", "Maximum number of simulation steps to perform for one frame"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); /* display settings */ @@ -2316,26 +2386,26 @@ static void rna_def_fluid_flow_settings(BlenderRNA *brna) RNA_def_property_range(prop, 0.0, 10); RNA_def_property_ui_range(prop, 0.0, 1.0, 1.0, 4); RNA_def_property_ui_text(prop, "Density", ""); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "smoke_color", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_float_sdna(prop, NULL, "color"); RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Smoke Color", "Color of smoke"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "fuel_amount", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0, 10); RNA_def_property_ui_range(prop, 0.0, 5.0, 1.0, 4); RNA_def_property_ui_text(prop, "Flame Rate", ""); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "temperature", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "temperature"); RNA_def_property_range(prop, -10, 10); RNA_def_property_ui_range(prop, -10, 10, 1, 1); RNA_def_property_ui_text(prop, "Temp. Diff.", "Temperature difference to ambient temperature"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "psys"); @@ -2349,13 +2419,13 @@ static void rna_def_fluid_flow_settings(BlenderRNA *brna) RNA_def_property_enum_items(prop, flow_type_items); RNA_def_property_enum_funcs(prop, NULL, "rna_Fluid_flowtype_set", NULL); RNA_def_property_ui_text(prop, "Flow Type", "Change type of fluid in the simulation"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "flow_behavior", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "behavior"); RNA_def_property_enum_items(prop, flow_behavior_items); RNA_def_property_ui_text(prop, "Flow Behavior", "Change flow behavior in the simulation"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "flow_source", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "source"); @@ -2363,20 +2433,20 @@ static void rna_def_fluid_flow_settings(BlenderRNA *brna) RNA_def_property_enum_funcs( prop, NULL, "rna_Fluid_flowsource_set", "rna_Fluid_flowsource_itemf"); RNA_def_property_ui_text(prop, "Source", "Change how fluid is emitted"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "use_absolute", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_FLOW_ABSOLUTE); RNA_def_property_ui_text(prop, "Absolute Density", "Only allow given density value in emitter area and will not add up"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "use_initial_velocity", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_FLOW_INITVELOCITY); RNA_def_property_ui_text( prop, "Initial Velocity", "Fluid has some initial velocity when it is emitted"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "velocity_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "vel_multi"); @@ -2386,28 +2456,28 @@ static void rna_def_fluid_flow_settings(BlenderRNA *brna) "Source", "Multiplier of source velocity passed to fluid (source velocity is " "non-zero only if object is moving)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "velocity_normal", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "vel_normal"); RNA_def_property_range(prop, -100.0, 100.0); RNA_def_property_ui_range(prop, -2.0, 2.0, 0.05, 5); RNA_def_property_ui_text(prop, "Normal", "Amount of normal directional velocity"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "velocity_random", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "vel_random"); RNA_def_property_range(prop, 0.0, 10.0); RNA_def_property_ui_range(prop, 0.0, 2.0, 0.05, 5); RNA_def_property_ui_text(prop, "Random", "Amount of random velocity"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "velocity_coord", PROP_FLOAT, PROP_XYZ); RNA_def_property_float_sdna(prop, NULL, "vel_coord"); RNA_def_property_array(prop, 3); RNA_def_property_range(prop, -1000.1, 1000.1); RNA_def_property_ui_text(prop, "Initial", "Initial velocity in X, Y and Z direction"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "volume_density", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0, 1.0); @@ -2416,7 +2486,7 @@ static void rna_def_fluid_flow_settings(BlenderRNA *brna) "Volume Emission", "Controls fluid emission from within the mesh (higher value results in " "greater emissions from inside the mesh)"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "surface_distance", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0, 10.0); @@ -2425,7 +2495,7 @@ static void rna_def_fluid_flow_settings(BlenderRNA *brna) "Surface Emission", "Controls fluid emission from the mesh surface (higher value results " "in emission further away from the mesh surface"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "use_plane_init", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_FLOW_USE_PLANE_INIT); @@ -2434,24 +2504,24 @@ static void rna_def_fluid_flow_settings(BlenderRNA *brna) "Is Planar", "Treat this object as a planar and unclosed mesh. Fluid will only be emitted from the mesh " "surface and based on the surface emission value"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "particle_size", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.1, 20.0); RNA_def_property_ui_range(prop, 0.5, 5.0, 0.05, 5); RNA_def_property_ui_text(prop, "Size", "Particle size in simulation cells"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "use_particle_size", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_FLOW_USE_PART_SIZE); RNA_def_property_ui_text( prop, "Set Size", "Set particle size in simulation cells or use nearest cell"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "use_inflow", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_FLOW_USE_INFLOW); RNA_def_property_ui_text(prop, "Enabled", "Control when to apply inflow"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "subframes", PROP_INT, PROP_NONE); RNA_def_property_range(prop, 0, 200); @@ -2460,7 +2530,7 @@ static void rna_def_fluid_flow_settings(BlenderRNA *brna) "Subframes", "Number of additional samples to take between frames to improve " "quality of fast moving flows"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "density_vertex_group", PROP_STRING, PROP_NONE); RNA_def_property_string_funcs(prop, @@ -2469,41 +2539,41 @@ static void rna_def_fluid_flow_settings(BlenderRNA *brna) "rna_FluidFlow_density_vgroup_set"); RNA_def_property_ui_text( prop, "Vertex Group", "Name of vertex group which determines surface emission rate"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "use_texture", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_FLOW_TEXTUREEMIT); RNA_def_property_ui_text(prop, "Use Texture", "Use a texture to control emission strength"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "texture_map_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "texture_type"); RNA_def_property_enum_items(prop, flow_texture_types); RNA_def_property_ui_text(prop, "Mapping", "Texture mapping type"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "uvlayer_name"); RNA_def_property_ui_text(prop, "UV Map", "UV map name"); RNA_def_property_string_funcs(prop, NULL, NULL, "rna_FluidFlow_uvlayer_set"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "noise_texture", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Texture", "Texture that controls emission strength"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "texture_size", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.01, 10.0); RNA_def_property_ui_range(prop, 0.1, 5.0, 0.05, 5); RNA_def_property_ui_text(prop, "Size", "Size of texture mapping"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); prop = RNA_def_property(srna, "texture_offset", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0, 200.0); RNA_def_property_ui_range(prop, 0.0, 100.0, 0.05, 5); RNA_def_property_ui_text(prop, "Offset", "Z-offset of texture mapping"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_flow_reset"); } static void rna_def_fluid_effector_settings(BlenderRNA *brna) @@ -2553,36 +2623,36 @@ static void rna_def_fluid_effector_settings(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, effector_type_items); RNA_def_property_ui_text(prop, "Effector Type", "Change type of effector in the simulation"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_effector_reset"); prop = RNA_def_property(srna, "surface_distance", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0, 10.0); RNA_def_property_ui_range(prop, 0.0, 10.0, 0.05, 5); RNA_def_property_ui_text( prop, "Surface", "Additional distance around mesh surface to consider as effector"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_effector_reset"); prop = RNA_def_property(srna, "use_plane_init", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_EFFECTOR_USE_PLANE_INIT); RNA_def_property_ui_text(prop, "Is Planar", "Treat this object as a planar, unclosed mesh"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_domain_reset"); prop = RNA_def_property(srna, "velocity_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "vel_multi"); RNA_def_property_range(prop, -100.0, 100.0); RNA_def_property_ui_text(prop, "Source", "Multiplier of obstacle velocity"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_effector_reset"); prop = RNA_def_property(srna, "guide_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "guide_mode"); RNA_def_property_enum_items(prop, fluid_guide_mode_items); RNA_def_property_ui_text(prop, "Guiding mode", "How to create guiding velocities"); - RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Fluid_update"); + RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Fluid_effector_reset"); prop = RNA_def_property(srna, "use_effector", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_EFFECTOR_USE_EFFEC); RNA_def_property_ui_text(prop, "Enabled", "Control when to apply the effector"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_effector_reset"); prop = RNA_def_property(srna, "subframes", PROP_INT, PROP_NONE); RNA_def_property_range(prop, 0, 200); @@ -2591,7 +2661,7 @@ static void rna_def_fluid_effector_settings(BlenderRNA *brna) "Subframes", "Number of additional samples to take between frames to improve " "quality of fast moving effector objects"); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_effector_reset"); } void RNA_def_fluid(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index d0e084dc0e7..63fe1cf05ca 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -1664,13 +1664,11 @@ static void rna_def_gpencil_layer(BlenderRNA *brna) prop = RNA_def_property(srna, "use_mask_layer", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_USE_MASK); - RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Mask Layer", "Mask pixels from underlying layers drawing"); RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); prop = RNA_def_property(srna, "use_lights", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_USE_LIGHTS); - RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text( prop, "Use Lights", "Enable the use of lights on stroke and fill materials"); RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c index 5475f62cb8c..cb16dae7afa 100644 --- a/source/blender/makesrna/intern/rna_gpencil_modifier.c +++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c @@ -129,6 +129,11 @@ const EnumPropertyItem rna_enum_object_greasepencil_modifier_type_items[] = { "Opacity", "Opacity of the strokes"}, {eGpencilModifierType_Tint, "GP_TINT", ICON_MOD_TINT, "Tint", "Tint strokes with new color"}, + {eGpencilModifierType_Texture, + "GP_TEXTURE", + ICON_TEXTURE, + "Texture", + "Change stroke uv texture values"}, {0, NULL, 0, NULL, NULL}, }; @@ -234,6 +239,8 @@ static StructRNA *rna_GpencilModifier_refine(struct PointerRNA *ptr) return &RNA_ArmatureGpencilModifier; case eGpencilModifierType_Multiply: return &RNA_MultiplyGpencilModifier; + case eGpencilModifierType_Texture: + return &RNA_TextureGpencilModifier; /* Default */ case eGpencilModifierType_None: case NUM_GREASEPENCIL_MODIFIER_TYPES: @@ -302,6 +309,7 @@ RNA_GP_MOD_VGROUP_NAME_SET(Smooth, vgname); RNA_GP_MOD_VGROUP_NAME_SET(Hook, vgname); RNA_GP_MOD_VGROUP_NAME_SET(Offset, vgname); RNA_GP_MOD_VGROUP_NAME_SET(Armature, vgname); +RNA_GP_MOD_VGROUP_NAME_SET(Texture, vgname); # undef RNA_GP_MOD_VGROUP_NAME_SET @@ -2138,6 +2146,140 @@ static void rna_def_modifier_gpencilmultiply(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); } +static void rna_def_modifier_gpenciltexture(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + static const EnumPropertyItem fit_type_items[] = { + {GP_TEX_CONSTANT_LENGTH, + "CONSTANT_LENGTH", + 0, + "Keep Texture at Constant Length", + "Keep the texture at a constant length regardless of the length of each stroke"}, + {GP_TEX_FIT_STROKE, + "FIT_STROKE", + 0, + "Fit Texture to Stroke Length", + "Scale the texture to fit the length of each stroke"}, + {0, NULL, 0, NULL, NULL}, + }; + + static const EnumPropertyItem mode_items[] = { + {STROKE, "STROKE", 0, "Stroke UVs", "Manipulate only stroke UVs"}, + {FILL, "FILL", 0, "Fill UVs", "Manipulate only fill UVs"}, + {STROKE_AND_FILL, + "STROKE_AND_FILL", + 0, + "Stroke and Fill UVs", + "Manipulate both stroke and fill UVs"}, + {0, NULL, 0, NULL, NULL}, + }; + + srna = RNA_def_struct(brna, "TextureGpencilModifier", "GpencilModifier"); + RNA_def_struct_ui_text(srna, "Texture Modifier", "Transform stroke texture UVs Modifier"); + RNA_def_struct_sdna(srna, "TextureGpencilModifierData"); + RNA_def_struct_ui_icon(srna, ICON_TEXTURE); + + prop = RNA_def_property(srna, "layer", PROP_STRING, PROP_NONE); + RNA_def_property_string_sdna(prop, NULL, "layername"); + RNA_def_property_ui_text(prop, "Layer", "Layer name"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + + prop = RNA_def_property(srna, "invert_layers", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_TEX_INVERT_LAYER); + RNA_def_property_ui_text(prop, "Inverse Layers", "Inverse filter"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + + prop = RNA_def_property(srna, "material", PROP_STRING, PROP_NONE); + RNA_def_property_string_sdna(prop, NULL, "materialname"); + RNA_def_property_ui_text(prop, "Material", "Material name"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + + prop = RNA_def_property(srna, "invert_materials", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_TEX_INVERT_MATERIAL); + RNA_def_property_ui_text(prop, "Inverse Materials", "Inverse filter"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + + prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE); + RNA_def_property_string_sdna(prop, NULL, "vgname"); + RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name for modulating the deform"); + RNA_def_property_string_funcs(prop, NULL, NULL, "rna_TextureGpencilModifier_vgname_set"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + + prop = RNA_def_property(srna, "invert_vertex", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_TEX_INVERT_VGROUP); + RNA_def_property_ui_text(prop, "Inverse VertexGroup", "Inverse filter"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + + prop = RNA_def_property(srna, "pass_index", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "pass_index"); + RNA_def_property_range(prop, 0, 100); + RNA_def_property_ui_text(prop, "Pass", "Pass index"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + + prop = RNA_def_property(srna, "invert_material_pass", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_TEX_INVERT_PASS); + RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + + prop = RNA_def_property(srna, "layer_pass", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "layer_pass"); + RNA_def_property_range(prop, 0, 100); + RNA_def_property_ui_text(prop, "Pass", "Layer pass index"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + + prop = RNA_def_property(srna, "invert_layer_pass", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_TEX_INVERT_LAYERPASS); + RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + + prop = RNA_def_property(srna, "uv_offset", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "uv_offset"); + RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); + RNA_def_property_ui_range(prop, -100.0, 100.0, 0.1, 3); + RNA_def_property_float_default(prop, 0.0f); + RNA_def_property_ui_text(prop, "Offset UVs", "Offset value to add to stroke UVs"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + + prop = RNA_def_property(srna, "uv_scale", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "uv_scale"); + RNA_def_property_range(prop, 0.0, FLT_MAX); + RNA_def_property_ui_range(prop, 0.0, 100.0, 0.1, 3); + RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_ui_text(prop, "UV Scale", "Factor to scale the UVs"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + + prop = RNA_def_property(srna, "fill_rotation", PROP_FLOAT, PROP_ANGLE); + RNA_def_property_float_sdna(prop, NULL, "fill_rotation"); + RNA_def_property_ui_text(prop, "Fill Rotation", "Additional rotation of the fill UV"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + + prop = RNA_def_property(srna, "fill_offset", PROP_FLOAT, PROP_COORDS); + RNA_def_property_float_sdna(prop, NULL, "fill_offset"); + RNA_def_property_array(prop, 2); + RNA_def_property_ui_text(prop, "Fill Offset", "Additional offset of the fill UV"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + + prop = RNA_def_property(srna, "fill_scale", PROP_FLOAT, PROP_COORDS); + RNA_def_property_float_sdna(prop, NULL, "fill_scale"); + RNA_def_property_range(prop, 0.01f, 100.0f); + RNA_def_property_ui_text(prop, "Fill Scale", "Additional scale of the fill UV"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + + prop = RNA_def_property(srna, "fit_method", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "fit_method"); + RNA_def_property_enum_items(prop, fit_type_items); + RNA_def_property_ui_text(prop, "Fit Method", ""); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_dependency_update"); + + prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "mode"); + RNA_def_property_enum_items(prop, mode_items); + RNA_def_property_ui_text(prop, "Mode", ""); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_dependency_update"); +} + void RNA_def_greasepencil_modifier(BlenderRNA *brna) { StructRNA *srna; @@ -2211,6 +2353,7 @@ void RNA_def_greasepencil_modifier(BlenderRNA *brna) rna_def_modifier_gpencilhook(brna); rna_def_modifier_gpencilarmature(brna); rna_def_modifier_gpencilmultiply(brna); + rna_def_modifier_gpenciltexture(brna); } #endif diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h index 27097261930..cb59eee6afa 100644 --- a/source/blender/makesrna/intern/rna_internal.h +++ b/source/blender/makesrna/intern/rna_internal.h @@ -185,6 +185,7 @@ void RNA_def_render(struct BlenderRNA *brna); void RNA_def_rigidbody(struct BlenderRNA *brna); void RNA_def_rna(struct BlenderRNA *brna); void RNA_def_scene(struct BlenderRNA *brna); +void RNA_def_simulation(struct BlenderRNA *brna); void RNA_def_view_layer(struct BlenderRNA *brna); void RNA_def_screen(struct BlenderRNA *brna); void RNA_def_sculpt_paint(struct BlenderRNA *brna); @@ -449,6 +450,7 @@ void RNA_def_main_lightprobes(BlenderRNA *brna, PropertyRNA *cprop); void RNA_def_main_hairs(BlenderRNA *brna, PropertyRNA *cprop); void RNA_def_main_pointclouds(BlenderRNA *brna, PropertyRNA *cprop); void RNA_def_main_volumes(BlenderRNA *brna, PropertyRNA *cprop); +void RNA_def_main_simulations(BlenderRNA *brna, PropertyRNA *cprop); /* ID Properties */ diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c index 855d5f46890..2f37e4079c7 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -134,6 +134,9 @@ RNA_MAIN_LISTBASE_FUNCS_DEF(pointclouds) RNA_MAIN_LISTBASE_FUNCS_DEF(scenes) RNA_MAIN_LISTBASE_FUNCS_DEF(screens) RNA_MAIN_LISTBASE_FUNCS_DEF(shapekeys) +# ifdef WITH_NEW_SIMULATION_TYPE +RNA_MAIN_LISTBASE_FUNCS_DEF(simulations) +# endif RNA_MAIN_LISTBASE_FUNCS_DEF(sounds) RNA_MAIN_LISTBASE_FUNCS_DEF(speakers) RNA_MAIN_LISTBASE_FUNCS_DEF(texts) @@ -402,6 +405,14 @@ void RNA_def_main(BlenderRNA *brna) "Volumes", "Volume data-blocks", RNA_def_main_volumes}, +# ifdef WITH_NEW_SIMULATION_TYPE + {"simulations", + "Simulation", + "rna_Main_simulations_begin", + "Simulations", + "Simulation data-blocks", + RNA_def_main_simulations}, +# endif {NULL, NULL, NULL, NULL, NULL, NULL}, }; diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index 9799054ccd2..c5781175d65 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -69,6 +69,7 @@ # include "BKE_particle.h" # include "BKE_pointcloud.h" # include "BKE_scene.h" +# include "BKE_simulation.h" # include "BKE_sound.h" # include "BKE_speaker.h" # include "BKE_text.h" @@ -98,6 +99,7 @@ # include "DNA_node_types.h" # include "DNA_particle_types.h" # include "DNA_pointcloud_types.h" +# include "DNA_simulation_types.h" # include "DNA_sound_types.h" # include "DNA_speaker_types.h" # include "DNA_text_types.h" @@ -738,6 +740,18 @@ static Volume *rna_Main_volumes_new(Main *bmain, const char *name) return volume; } +# ifdef WITH_NEW_SIMULATION_TYPE +static Simulation *rna_Main_simulations_new(Main *bmain, const char *name) +{ + char safe_name[MAX_ID_NAME - 2]; + rna_idname_validate(name, safe_name); + + Simulation *simulation = BKE_simulation_add(bmain, safe_name); + id_us_min(&simulation->id); + return simulation; +} +# endif + /* tag functions, all the same */ # define RNA_MAIN_ID_TAG_FUNCS_DEF(_func_name, _listbase_name, _id_type) \ static void rna_Main_##_func_name##_tag(Main *bmain, bool value) \ @@ -785,6 +799,9 @@ RNA_MAIN_ID_TAG_FUNCS_DEF(hairs, hairs, ID_HA) RNA_MAIN_ID_TAG_FUNCS_DEF(pointclouds, pointclouds, ID_PT) # endif RNA_MAIN_ID_TAG_FUNCS_DEF(volumes, volumes, ID_VO) +# ifdef WITH_NEW_SIMULATION_TYPE +RNA_MAIN_ID_TAG_FUNCS_DEF(simulations, simulations, ID_SIM) +# endif # undef RNA_MAIN_ID_TAG_FUNCS_DEF @@ -2304,4 +2321,44 @@ void RNA_def_main_volumes(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); } +void RNA_def_main_simulations(BlenderRNA *brna, PropertyRNA *cprop) +{ + StructRNA *srna; + FunctionRNA *func; + PropertyRNA *parm; + + RNA_def_property_srna(cprop, "BlendDataSimulations"); + srna = RNA_def_struct(brna, "BlendDataSimulations", NULL); + RNA_def_struct_sdna(srna, "Main"); + RNA_def_struct_ui_text(srna, "Main Simulations", "Collection of simulations"); + + func = RNA_def_function(srna, "new", "rna_Main_simulations_new"); + RNA_def_function_ui_description(func, "Add a new simulation to the main database"); + parm = RNA_def_string(func, "name", "Simulation", 0, "", "New name for the data-block"); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); + /* return type */ + parm = RNA_def_pointer(func, "simulation", "Simulation", "", "New simulation data-block"); + RNA_def_function_return(func, parm); + + func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); + RNA_def_function_flag(func, FUNC_USE_REPORTS); + RNA_def_function_ui_description(func, "Remove a simulation from the current blendfile"); + parm = RNA_def_pointer(func, "simulation", "Simulation", "", "Simulation to remove"); + RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); + RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); + RNA_def_boolean( + func, "do_unlink", true, "", "Unlink all usages of this simulation before deleting it"); + RNA_def_boolean(func, + "do_id_user", + true, + "", + "Decrement user counter of all datablocks used by this simulation data"); + RNA_def_boolean( + func, "do_ui_user", true, "", "Make sure interface does not reference this simulation data"); + + func = RNA_def_function(srna, "tag", "rna_Main_simulations_tag"); + parm = RNA_def_boolean(func, "value", 0, "Value", ""); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); +} + #endif diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index e13b9caa90c..ccc141c1bb2 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -920,7 +920,7 @@ static bool rna_HookModifier_object_override_apply(Main *UNUSED(bmain), { BLI_assert(len_dst == len_src && (!ptr_storage || len_dst == len_storage) && len_dst == 0); BLI_assert(opop->operation == IDOVERRIDE_LIBRARY_OP_REPLACE && - "Unsupported RNA override operation on Hook modifier target objet pointer"); + "Unsupported RNA override operation on Hook modifier target object pointer"); UNUSED_VARS_NDEBUG(ptr_storage, len_dst, len_src, len_storage, opop); /* We need a special handling here because setting hook target resets invert parent matrix, diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 31d6ff80f34..9242ad7237f 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -81,6 +81,35 @@ static const EnumPropertyItem node_socket_type_items[] = { {SOCK_STRING, "STRING", 0, "String", ""}, {SOCK_RGBA, "RGBA", 0, "RGBA", ""}, {SOCK_SHADER, "SHADER", 0, "Shader", ""}, + {SOCK_OBJECT, "OBJECT", 0, "Object", ""}, + {SOCK_IMAGE, "IMAGE", 0, "Image", ""}, + {SOCK_EMITTERS, "EMITTERS", 0, "Emitters", ""}, + {SOCK_EVENTS, "EVENTS", 0, "Events", ""}, + {SOCK_FORCES, "FORCES", 0, "Forces", ""}, + {SOCK_CONTROL_FLOW, "CONTROL_FLOW", 0, "Control Flow", ""}, + {0, NULL, 0, NULL, NULL}, +}; + +static const EnumPropertyItem particle_attribute_socket_type_items[] = { + {SOCK_FLOAT, "FLOAT", 0, "Float", ""}, + {SOCK_INT, "INT", 0, "Int", ""}, + {SOCK_BOOLEAN, "BOOLEAN", 0, "Boolean", ""}, + {SOCK_VECTOR, "VECTOR", 0, "Vector", ""}, + {SOCK_RGBA, "RGBA", 0, "Color", ""}, + {SOCK_OBJECT, "OBJECT", 0, "Object", ""}, + {SOCK_IMAGE, "IMAGE", 0, "Image", ""}, + {0, NULL, 0, NULL, NULL}, +}; + +static const EnumPropertyItem node_socket_data_type_items[] = { + {SOCK_FLOAT, "FLOAT", 0, "Float", ""}, + {SOCK_INT, "INT", 0, "Int", ""}, + {SOCK_BOOLEAN, "BOOLEAN", 0, "Boolean", ""}, + {SOCK_VECTOR, "VECTOR", 0, "Vector", ""}, + {SOCK_STRING, "STRING", 0, "String", ""}, + {SOCK_RGBA, "RGBA", 0, "Color", ""}, + {SOCK_OBJECT, "OBJECT", 0, "Object", ""}, + {SOCK_IMAGE, "IMAGE", 0, "Image", ""}, {0, NULL, 0, NULL, NULL}, }; @@ -244,6 +273,47 @@ const EnumPropertyItem rna_enum_node_vec_math_items[] = { {0, NULL, 0, NULL, NULL}, }; +const EnumPropertyItem rna_enum_node_boolean_math_items[] = { + {NODE_BOOLEAN_MATH_AND, "AND", 0, "And", "Outputs true only when both inputs are true"}, + {NODE_BOOLEAN_MATH_OR, "OR", 0, "Or", "Outputs or when at least one of the inputs is true"}, + {NODE_BOOLEAN_MATH_NOT, "NOT", 0, "Not", "Outputs the opposite of the input"}, + {0, NULL, 0, NULL, NULL}, +}; + +const EnumPropertyItem rna_enum_node_float_compare_items[] = { + {NODE_FLOAT_COMPARE_LESS_THAN, + "LESS_THAN", + 0, + "A < B", + "True when the first input is smaller than second input"}, + {NODE_FLOAT_COMPARE_LESS_EQUAL, + "LESS_EQUAL", + 0, + "A <= B", + "True when the first input is smaller than the second input or equal"}, + {NODE_FLOAT_COMPARE_GREATER_THAN, + "GREATER_THAN", + 0, + "A > B", + "True when the first input is greater than the second input"}, + {NODE_FLOAT_COMPARE_GREATER_EQUAL, + "GREATER_EQUAL", + 0, + "A >= B", + "True when the first input is greater than the second input or equal"}, + {NODE_FLOAT_COMPARE_EQUAL, + "EQUAL", + 0, + "A = B", + "True when both inputs are approximately equal"}, + {NODE_FLOAT_COMPARE_NOT_EQUAL, + "NOT_EQUAL", + 0, + "A != B", + "True when both inputs are not approximately equal"}, + {0, NULL, 0, NULL, NULL}, +}; + const EnumPropertyItem rna_enum_node_map_range_items[] = { {NODE_MAP_RANGE_LINEAR, "LINEAR", @@ -669,6 +739,34 @@ static const EnumPropertyItem *rna_node_static_type_itemf(bContext *UNUSED(C), # undef DefNode } + if (RNA_struct_is_a(ptr->type, &RNA_SimulationNode)) { +# define DefNode(Category, ID, DefFunc, EnumName, StructName, UIName, UIDesc) \ + if (STREQ(#Category, "SimulationNode")) { \ + tmp.value = ID; \ + tmp.identifier = EnumName; \ + tmp.name = UIName; \ + tmp.description = UIDesc; \ + tmp.icon = ICON_NONE; \ + RNA_enum_item_add(&item, &totitem, &tmp); \ + } +# include "../../nodes/NOD_static_types.h" +# undef DefNode + } + + if (RNA_struct_is_a(ptr->type, &RNA_FunctionNode)) { +# define DefNode(Category, ID, DefFunc, EnumName, StructName, UIName, UIDesc) \ + if (STREQ(#Category, "FunctionNode")) { \ + tmp.value = ID; \ + tmp.identifier = EnumName; \ + tmp.name = UIName; \ + tmp.description = UIDesc; \ + tmp.icon = ICON_NONE; \ + RNA_enum_item_add(&item, &totitem, &tmp); \ + } +# include "../../nodes/NOD_static_types.h" +# undef DefNode + } + RNA_enum_item_end(&item, &totitem); *r_free = true; @@ -1785,6 +1883,50 @@ static StructRNA *rna_TextureNode_register(Main *bmain, return nt->rna_ext.srna; } +static StructRNA *rna_SimulationNode_register(Main *bmain, + ReportList *reports, + void *data, + const char *identifier, + StructValidateFunc validate, + StructCallbackFunc call, + StructFreeFunc free) +{ + bNodeType *nt = rna_Node_register_base( + bmain, reports, &RNA_SimulationNode, data, identifier, validate, call, free); + if (!nt) { + return NULL; + } + + nodeRegisterType(nt); + + /* update while blender is running */ + WM_main_add_notifier(NC_NODE | NA_EDITED, NULL); + + return nt->rna_ext.srna; +} + +static StructRNA *rna_FunctionNode_register(Main *bmain, + ReportList *reports, + void *data, + const char *identifier, + StructValidateFunc validate, + StructCallbackFunc call, + StructFreeFunc free) +{ + bNodeType *nt = rna_Node_register_base( + bmain, reports, &RNA_FunctionNode, data, identifier, validate, call, free); + if (!nt) { + return NULL; + } + + nodeRegisterType(nt); + + /* update while blender is running */ + WM_main_add_notifier(NC_NODE | NA_EDITED, NULL); + + return nt->rna_ext.srna; +} + static IDProperty *rna_Node_idprops(PointerRNA *ptr, bool create) { bNode *node = ptr->data; @@ -3581,6 +3723,15 @@ static void rna_ShaderNode_socket_update(Main *bmain, Scene *scene, PointerRNA * rna_Node_update(bmain, scene, ptr); } +static void rna_FunctionNode_socket_update(Main *bmain, Scene *scene, PointerRNA *ptr) +{ + bNodeTree *ntree = (bNodeTree *)ptr->owner_id; + bNode *node = (bNode *)ptr->data; + + nodeUpdate(ntree, node); + rna_Node_update(bmain, scene, ptr); +} + static void rna_CompositorNodeScale_update(Main *bmain, Scene *scene, PointerRNA *ptr) { bNodeTree *ntree = (bNodeTree *)ptr->owner_id; @@ -3590,6 +3741,15 @@ static void rna_CompositorNodeScale_update(Main *bmain, Scene *scene, PointerRNA rna_Node_update(bmain, scene, ptr); } +static void rna_SimulationNode_socket_update(Main *bmain, Scene *scene, PointerRNA *ptr) +{ + bNodeTree *ntree = (bNodeTree *)ptr->owner_id; + bNode *node = (bNode *)ptr->data; + + nodeUpdate(ntree, node); + rna_Node_update(bmain, scene, ptr); +} + static PointerRNA rna_ShaderNodePointDensity_psys_get(PointerRNA *ptr) { bNode *node = ptr->data; @@ -4016,6 +4176,39 @@ static void def_math(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } +static void def_boolean_math(StructRNA *srna) +{ + PropertyRNA *prop; + + prop = RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "custom1"); + RNA_def_property_enum_items(prop, rna_enum_node_boolean_math_items); + RNA_def_property_ui_text(prop, "Operation", ""); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_FunctionNode_socket_update"); +} + +static void def_float_compare(StructRNA *srna) +{ + PropertyRNA *prop; + + prop = RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "custom1"); + RNA_def_property_enum_items(prop, rna_enum_node_float_compare_items); + RNA_def_property_ui_text(prop, "Operation", ""); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_FunctionNode_socket_update"); +} + +static void def_fn_switch(StructRNA *srna) +{ + PropertyRNA *prop; + + prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "custom1"); + RNA_def_property_enum_items(prop, node_socket_data_type_items); + RNA_def_property_ui_text(prop, "Data Type", "Data type for inputs and outputs"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_FunctionNode_socket_update"); +} + static void def_vector_math(StructRNA *srna) { PropertyRNA *prop; @@ -7899,6 +8092,82 @@ static void def_tex_bricks(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } +/* -- Simulation Nodes --------------------------------------------------------- */ + +static void def_sim_particle_time_step_event(StructRNA *srna) +{ + static const EnumPropertyItem mode_items[] = { + {NODE_PARTICLE_TIME_STEP_EVENT_BEGIN, + "BEGIN", + 0, + "Begin", + "Execute for every particle at the beginning of each time step"}, + {NODE_PARTICLE_TIME_STEP_EVENT_END, + "END", + 0, + "End", + "Execute for every particle at the end of each time step"}, + {0, NULL, 0, NULL, NULL}, + }; + + PropertyRNA *prop; + + prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "custom1"); + RNA_def_property_enum_items(prop, mode_items); + RNA_def_property_ui_text(prop, "Mode", "When in each time step is the event triggered"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); +} + +static void def_sim_particle_attribute(StructRNA *srna) +{ + PropertyRNA *prop; + + prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "custom1"); + RNA_def_property_enum_items(prop, particle_attribute_socket_type_items); + RNA_def_property_ui_text( + prop, + "Data Type", + "Expected type of the attribute. A default value is returned if the type is not correct"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_SimulationNode_socket_update"); +} + +static void def_sim_set_particle_attribute(StructRNA *srna) +{ + PropertyRNA *prop; + + prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "custom1"); + RNA_def_property_enum_items(prop, particle_attribute_socket_type_items); + RNA_def_property_ui_text( + prop, + "Data Type", + "Expected type of the attribute. Nothing is done if the type is not correct"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_SimulationNode_socket_update"); +} + +static void def_sim_time(StructRNA *srna) +{ + static const EnumPropertyItem mode_items[] = { + {NODE_SIM_INPUT_SIMULATION_TIME, + "SIMULATION_TIME", + 0, + "Simulation Time", + "Time since start of simulation"}, + {NODE_SIM_INPUT_SCENE_TIME, "SCENE_TIME", 0, "Scene Time", "Time shown in the timeline"}, + {0, NULL, 0, NULL, NULL}, + }; + + PropertyRNA *prop; + + prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "custom1"); + RNA_def_property_enum_items(prop, mode_items); + RNA_def_property_ui_text(prop, "Mode", "The time to output"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_SimulationNode_socket_update"); +} + /* -------------------------------------------------------------------------- */ static void rna_def_shader_node(BlenderRNA *brna) @@ -7936,6 +8205,26 @@ static void rna_def_texture_node(BlenderRNA *brna) RNA_def_struct_register_funcs(srna, "rna_TextureNode_register", "rna_Node_unregister", NULL); } +static void rna_def_simulation_node(BlenderRNA *brna) +{ + StructRNA *srna; + + srna = RNA_def_struct(brna, "SimulationNode", "NodeInternal"); + RNA_def_struct_ui_text(srna, "Simulation Node", ""); + RNA_def_struct_sdna(srna, "bNode"); + RNA_def_struct_register_funcs(srna, "rna_SimulationNode_register", "rna_Node_unregister", NULL); +} + +static void rna_def_function_node(BlenderRNA *brna) +{ + StructRNA *srna; + + srna = RNA_def_struct(brna, "FunctionNode", "NodeInternal"); + RNA_def_struct_ui_text(srna, "Function Node", ""); + RNA_def_struct_sdna(srna, "bNode"); + RNA_def_struct_register_funcs(srna, "rna_FunctionNode_register", "rna_Node_unregister", NULL); +} + /* -------------------------------------------------------------------------- */ static void rna_def_node_socket(BlenderRNA *brna) @@ -8492,6 +8781,104 @@ static void rna_def_node_socket_virtual(BlenderRNA *brna, const char *identifier RNA_def_struct_sdna(srna, "bNodeSocket"); } +static void rna_def_node_socket_object(BlenderRNA *brna, + const char *identifier, + const char *interface_idname) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna = RNA_def_struct(brna, identifier, "NodeSocketStandard"); + RNA_def_struct_ui_text(srna, "Object Node Socket", "Object socket of a node"); + RNA_def_struct_sdna(srna, "bNodeSocket"); + + RNA_def_struct_sdna_from(srna, "bNodeSocketValueObject", "default_value"); + + prop = RNA_def_property(srna, "default_value", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "value"); + RNA_def_property_struct_type(prop, "Object"); + RNA_def_property_ui_text(prop, "Default Value", "Input value used for unconnected socket"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_NodeSocketStandard_value_update"); + RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT | PROP_CONTEXT_UPDATE); + + /* socket interface */ + srna = RNA_def_struct(brna, interface_idname, "NodeSocketInterfaceStandard"); + RNA_def_struct_ui_text(srna, "Object Node Socket Interface", "Object socket of a node"); + RNA_def_struct_sdna(srna, "bNodeSocket"); + + RNA_def_struct_sdna_from(srna, "bNodeSocketValueObject", "default_value"); + + prop = RNA_def_property(srna, "default_value", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "value"); + RNA_def_property_struct_type(prop, "Object"); + RNA_def_property_ui_text(prop, "Default Value", "Input value used for unconnected socket"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_NodeSocketInterface_update"); +} + +static void rna_def_node_socket_image(BlenderRNA *brna, + const char *identifier, + const char *interface_idname) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna = RNA_def_struct(brna, identifier, "NodeSocketStandard"); + RNA_def_struct_ui_text(srna, "Image Node Socket", "Image socket of a node"); + RNA_def_struct_sdna(srna, "bNodeSocket"); + + RNA_def_struct_sdna_from(srna, "bNodeSocketValueImage", "default_value"); + + prop = RNA_def_property(srna, "default_value", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "value"); + RNA_def_property_struct_type(prop, "Image"); + RNA_def_property_ui_text(prop, "Default Value", "Input value used for unconnected socket"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_NodeSocketStandard_value_update"); + RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT | PROP_CONTEXT_UPDATE); + + /* socket interface */ + srna = RNA_def_struct(brna, interface_idname, "NodeSocketInterfaceStandard"); + RNA_def_struct_ui_text(srna, "Image Node Socket Interface", "Image socket of a node"); + RNA_def_struct_sdna(srna, "bNodeSocket"); + + RNA_def_struct_sdna_from(srna, "bNodeSocketValueImage", "default_value"); + + prop = RNA_def_property(srna, "default_value", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "value"); + RNA_def_property_struct_type(prop, "Image"); + RNA_def_property_ui_text(prop, "Default Value", "Input value used for unconnected socket"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_NodeSocketInterface_update"); +} + +static void rna_def_node_socket_effector(BlenderRNA *brna, + const char *identifier, + const char *interface_idname) +{ + StructRNA *srna; + + srna = RNA_def_struct(brna, identifier, "NodeSocketStandard"); + RNA_def_struct_ui_text(srna, "", ""); + RNA_def_struct_sdna(srna, "bNodeSocket"); + + srna = RNA_def_struct(brna, interface_idname, "NodeSocketInterfaceStandard"); + RNA_def_struct_ui_text(srna, "", ""); + RNA_def_struct_sdna(srna, "bNodeSocket"); +} + +static void rna_def_node_socket_control_flow(BlenderRNA *brna, + const char *identifier, + const char *interface_idname) +{ + StructRNA *srna; + + srna = RNA_def_struct(brna, identifier, "NodeSocketStandard"); + RNA_def_struct_ui_text(srna, "", ""); + RNA_def_struct_sdna(srna, "bNodeSocket"); + + srna = RNA_def_struct(brna, interface_idname, "NodeSocketInterfaceStandard"); + RNA_def_struct_ui_text(srna, "", ""); + RNA_def_struct_sdna(srna, "bNodeSocket"); +} + static void rna_def_node_socket_standard_types(BlenderRNA *brna) { /* XXX Workaround: Registered functions are not exposed in python by bpy, @@ -8626,6 +9013,17 @@ static void rna_def_node_socket_standard_types(BlenderRNA *brna) rna_def_node_socket_shader(brna, "NodeSocketShader", "NodeSocketInterfaceShader"); rna_def_node_socket_virtual(brna, "NodeSocketVirtual"); + + rna_def_node_socket_object(brna, "NodeSocketObject", "NodeSocketInterfaceObject"); + + rna_def_node_socket_image(brna, "NodeSocketImage", "NodeSocketInterfaceImage"); + + rna_def_node_socket_effector(brna, "NodeSocketEmitters", "NodeSocketInterfaceEmitters"); + rna_def_node_socket_effector(brna, "NodeSocketEvents", "NodeSocketInterfaceEvents"); + rna_def_node_socket_effector(brna, "NodeSocketForces", "NodeSocketInterfaceForces"); + + rna_def_node_socket_control_flow( + brna, "NodeSocketControlFlow", "NodeSocketInterfaceControlFlow"); } static void rna_def_internal_node(BlenderRNA *brna) @@ -9251,6 +9649,7 @@ static void rna_def_nodetree(BlenderRNA *brna) {NTREE_SHADER, "SHADER", ICON_MATERIAL, "Shader", "Shader nodes"}, {NTREE_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture nodes"}, {NTREE_COMPOSIT, "COMPOSITING", ICON_RENDERLAYERS, "Compositing", "Compositing nodes"}, + {NTREE_SIMULATION, "SIMULATION", ICON_PHYSICS, "Simulation", "Simulation nodes"}, {0, NULL, 0, NULL, NULL}, }; @@ -9474,6 +9873,17 @@ static void rna_def_texture_nodetree(BlenderRNA *brna) RNA_def_struct_ui_icon(srna, ICON_TEXTURE); } +static void rna_def_simulation_nodetree(BlenderRNA *brna) +{ + StructRNA *srna; + + srna = RNA_def_struct(brna, "SimulationNodeTree", "NodeTree"); + RNA_def_struct_ui_text( + srna, "Simulation Node Tree", "Node tree consisting of linked nodes used for simulations"); + RNA_def_struct_sdna(srna, "bNodeTree"); + RNA_def_struct_ui_icon(srna, ICON_PHYSICS); /* TODO: Use correct icon. */ +} + static StructRNA *define_specific_node(BlenderRNA *brna, const char *struct_name, const char *base_name, @@ -9560,6 +9970,8 @@ void RNA_def_nodetree(BlenderRNA *brna) rna_def_shader_node(brna); rna_def_compositor_node(brna); rna_def_texture_node(brna); + rna_def_simulation_node(brna); + rna_def_function_node(brna); rna_def_nodetree(brna); @@ -9568,6 +9980,7 @@ void RNA_def_nodetree(BlenderRNA *brna) rna_def_composite_nodetree(brna); rna_def_shader_nodetree(brna); rna_def_texture_nodetree(brna); + rna_def_simulation_nodetree(brna); # define DefNode(Category, ID, DefFunc, EnumName, StructName, UIName, UIDesc) \ { \ @@ -9584,12 +9997,13 @@ void RNA_def_nodetree(BlenderRNA *brna) */ # include "../../nodes/NOD_static_types.h" - /* Node group types need to be defined for shader, compositor, texture nodes individually. - * Cannot use the static types header for this, since they share the same int id. + /* Node group types need to be defined for shader, compositor, texture, simulation nodes + * individually. Cannot use the static types header for this, since they share the same int id. */ define_specific_node(brna, "ShaderNodeGroup", "ShaderNode", "Group", "", def_group); define_specific_node(brna, "CompositorNodeGroup", "CompositorNode", "Group", "", def_group); define_specific_node(brna, "TextureNodeGroup", "TextureNode", "Group", "", def_group); + define_specific_node(brna, "SimulationNodeGroup", "SimulationNode", "Group", "", def_group); def_custom_group(brna, "ShaderNodeCustomGroup", "ShaderNode", diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index b108093a9dd..1ebcb1c776d 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -3192,7 +3192,6 @@ static void rna_def_object(BlenderRNA *brna) prop = RNA_def_property(srna, "use_grease_pencil_lights", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_USE_GPENCIL_LIGHTS); RNA_def_property_boolean_default(prop, true); - RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Use Lights", "Lights affect grease pencil object"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_GPencil_update"); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 27ebbe79085..6548aa01091 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -5699,6 +5699,16 @@ static void rna_def_scene_render_data(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}, }; + static const EnumPropertyItem meta_input_items[] = { + {0, "SCENE", 0, "Scene", "Use metadata from the current scene"}, + {R_STAMP_STRIPMETA, + "STRIPS", + 0, + "Sequencer Strips", + "Use metadata from the strips in the sequencer"}, + {0, NULL, 0, NULL, NULL}, + }; + rna_def_scene_ffmpeg_settings(brna); srna = RNA_def_struct(brna, "RenderSettings", NULL); @@ -6216,10 +6226,10 @@ static void rna_def_scene_render_data(BlenderRNA *brna) prop, "Stamp Labels", "Display stamp labels (\"Camera\" in front of camera name, etc.)"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); - prop = RNA_def_property(srna, "use_stamp_strip_meta", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_STRIPMETA); - RNA_def_property_ui_text( - prop, "Strip Metadata", "Use metadata from the strips in the sequencer"); + prop = RNA_def_property(srna, "metadata_input", PROP_ENUM, PROP_NONE); /* as an enum */ + RNA_def_property_enum_bitflag_sdna(prop, NULL, "stamp"); + RNA_def_property_enum_items(prop, meta_input_items); + RNA_def_property_ui_text(prop, "Metadata Input", "Where to take the metadata from"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "use_stamp_memory", PROP_BOOLEAN, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_simulation.c b/source/blender/makesrna/intern/rna_simulation.c new file mode 100644 index 00000000000..789ea299feb --- /dev/null +++ b/source/blender/makesrna/intern/rna_simulation.c @@ -0,0 +1,56 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/** \file + * \ingroup RNA + */ + +#include <stdlib.h> + +#include "RNA_define.h" +#include "RNA_enum_types.h" + +#include "DNA_simulation_types.h" + +#include "rna_internal.h" + +#ifdef RNA_RUNTIME + +#else + +static void rna_def_simulation(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna = RNA_def_struct(brna, "Simulation", "ID"); + RNA_def_struct_ui_text(srna, "Simulation", "Simulation data-block"); + RNA_def_struct_ui_icon(srna, ICON_PHYSICS); /* TODO: Use correct icon. */ + + prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "nodetree"); + RNA_def_property_ui_text(prop, "Node Tree", "Node tree defining the simulation"); + + /* common */ + rna_def_animdata_common(srna); +} + +void RNA_def_simulation(BlenderRNA *brna) +{ + rna_def_simulation(brna); +} + +#endif diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 1f072d2eb26..266bf1334ba 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -45,6 +45,7 @@ #include "DNA_node_types.h" #include "DNA_object_types.h" #include "DNA_sequence_types.h" +#include "DNA_simulation_types.h" #include "DNA_space_types.h" #include "DNA_view3d_types.h" #include "DNA_workspace_types.h" @@ -2166,6 +2167,40 @@ static void rna_SpaceNodeEditor_node_tree_update(const bContext *C, PointerRNA * ED_node_tree_update(C); } +# ifdef WITH_NEW_SIMULATION_TYPE +static PointerRNA rna_SpaceNodeEditor_simulation_get(PointerRNA *ptr) +{ + SpaceNode *snode = (SpaceNode *)ptr->data; + ID *id = snode->id; + if (id && GS(id->name) == ID_SIM) { + return rna_pointer_inherit_refine(ptr, &RNA_Simulation, snode->id); + } + else { + return PointerRNA_NULL; + } +} + +static void rna_SpaceNodeEditor_simulation_set(PointerRNA *ptr, + const PointerRNA value, + struct ReportList *UNUSED(reports)) +{ + SpaceNode *snode = (SpaceNode *)ptr->data; + if (!STREQ(snode->tree_idname, "SimulationNodeTree")) { + return; + } + + Simulation *sim = (Simulation *)value.data; + if (sim != NULL) { + bNodeTree *ntree = sim->nodetree; + ED_node_tree_start(snode, ntree, NULL, NULL); + } + else { + ED_node_tree_start(snode, NULL, NULL, NULL); + } + snode->id = &sim->id; +} +# endif + static int rna_SpaceNodeEditor_tree_type_get(PointerRNA *ptr) { SpaceNode *snode = (SpaceNode *)ptr->data; @@ -2935,6 +2970,12 @@ static void rna_def_space_image_uv(BlenderRNA *brna) prop, "Tile Grid Shape", "How many tiles will be shown in the background"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL); + prop = RNA_def_property(srna, "uv_opacity", PROP_FLOAT, PROP_FACTOR); + RNA_def_property_float_sdna(prop, NULL, "uv_opacity"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "UV Opacity", "Opacity of UV overlays"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL); + /* todo: move edge and face drawing options here from G.f */ prop = RNA_def_property(srna, "pixel_snap_mode", PROP_ENUM, PROP_NONE); @@ -5521,6 +5562,13 @@ static void rna_def_fileselect_idfilter(BlenderRNA *brna) "Show/hide Point Cloud data-blocks"}, # endif {FILTER_ID_SCE, "filter_scene", ICON_SCENE_DATA, "Scenes", "Show Scene data-blocks"}, +# ifdef WITH_NEW_SIMULATION_TYPE + {FILTER_ID_SIM, + "filter_simulation", + ICON_PHYSICS, + "Simulations", + "Show Simulation data-blocks"}, /* TODO: Use correct icon. */ +# endif {FILTER_ID_SPK, "filter_speaker", ICON_SPEAKER, "Speakers", "Show Speaker data-blocks"}, {FILTER_ID_SO, "filter_sound", ICON_SOUND, "Sounds", "Show Sound data-blocks"}, {FILTER_ID_TE, "filter_texture", ICON_TEXTURE_DATA, "Textures", "Show Texture data-blocks"}, @@ -6202,6 +6250,19 @@ static void rna_def_space_node(BlenderRNA *brna) RNA_def_property_ui_text( prop, "ID From", "Data-block from which the edited data-block is linked"); +# ifdef WITH_NEW_SIMULATION_TYPE + prop = RNA_def_property(srna, "simulation", PROP_POINTER, PROP_NONE); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_struct_type(prop, "Simulation"); + RNA_def_property_ui_text(prop, "Simulation", "Simulation that is being edited"); + RNA_def_property_pointer_funcs(prop, + "rna_SpaceNodeEditor_simulation_get", + "rna_SpaceNodeEditor_simulation_set", + NULL, + NULL); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE, NULL); +# endif + prop = RNA_def_property(srna, "path", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "treepath", NULL); RNA_def_property_struct_type(prop, "NodeTreePath"); diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index a169e81237d..2a64ffa73cd 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -693,7 +693,7 @@ void RNA_api_ui_layout(StructRNA *srna) static float node_socket_color_default[] = {0.0f, 0.0f, 0.0f, 1.0f}; /* simple layout specifiers */ - func = RNA_def_function(srna, "row", "uiLayoutRow"); + func = RNA_def_function(srna, "row", "uiLayoutRowWithHeading"); parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in"); RNA_def_function_return(func, parm); RNA_def_function_ui_description( @@ -701,8 +701,14 @@ void RNA_api_ui_layout(StructRNA *srna) "Sub-layout. Items placed in this sublayout are placed next to each other " "in a row"); RNA_def_boolean(func, "align", false, "", "Align buttons to each other"); + RNA_def_string(func, + "heading", + NULL, + UI_MAX_NAME_STR, + "Heading", + "Label to insert into the layout for this row"); - func = RNA_def_function(srna, "column", "uiLayoutColumn"); + func = RNA_def_function(srna, "column", "uiLayoutColumnWithHeading"); parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in"); RNA_def_function_return(func, parm); RNA_def_function_ui_description( @@ -710,6 +716,12 @@ void RNA_api_ui_layout(StructRNA *srna) "Sub-layout. Items placed in this sublayout are placed under each other " "in a column"); RNA_def_boolean(func, "align", false, "", "Align buttons to each other"); + RNA_def_string(func, + "heading", + NULL, + UI_MAX_NAME_STR, + "Heading", + "Label to insert into the layout for this column"); func = RNA_def_function(srna, "column_flow", "uiLayoutColumnFlow"); RNA_def_int(func, "columns", 0, 0, INT_MAX, "", "Number of columns, 0 is automatic", 0, INT_MAX); @@ -887,6 +899,20 @@ void RNA_api_ui_layout(StructRNA *srna) RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); api_ui_item_common(func); + func = RNA_def_function(srna, "prop_decorator", "uiItemDecoratorR"); + api_ui_item_rna_common(func); + RNA_def_int(func, + "index", + /* RNA_NO_INDEX == -1 */ + -1, + -2, + INT_MAX, + "", + "The index of this button, when set a single member of an array can be accessed, " + "when set to -1 all array members are used", + -2, + INT_MAX); + for (int is_menu_hold = 0; is_menu_hold < 2; is_menu_hold++) { func = (is_menu_hold) ? RNA_def_function(srna, "operator_menu_hold", "rna_uiItemOMenuHold") : RNA_def_function(srna, "operator", "rna_uiItemO"); @@ -1492,6 +1518,7 @@ void RNA_api_ui_layout(StructRNA *srna) RNA_def_function_flag(func, FUNC_USE_CONTEXT); func = RNA_def_function(srna, "template_node_link", "uiTemplateNodeLink"); + RNA_def_function_flag(func, FUNC_USE_CONTEXT); parm = RNA_def_pointer(func, "ntree", "NodeTree", "", ""); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); parm = RNA_def_pointer(func, "node", "Node", "", ""); diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index c08a95d7e16..d1af3ea7910 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -6063,10 +6063,6 @@ static void rna_def_userdef_experimental(BlenderRNA *brna) prop, "Undo Legacy", "Use legacy undo (slower than the new default one, but may be more stable in some cases)"); - - prop = RNA_def_property(srna, "use_menu_search", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "use_menu_search", 1); - RNA_def_property_ui_text(prop, "Menu Search", "Search actions by menus instead of operators"); } static void rna_def_userdef_addon_collection(BlenderRNA *brna, PropertyRNA *cprop) |