diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2022-04-01 16:27:11 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2022-04-01 17:30:45 +0300 |
commit | e81d7bfcc9f48668f8c10d453d1a4c9c97b2c284 (patch) | |
tree | 118275554589ab307727d58f4d220337e1eee3ae /source/blender/modifiers/intern | |
parent | 5c80543c4366ee52bcc9d436c8fd7a740f7bbd9e (diff) |
Cycles: enable Alembic procedural for final renders
The Alembic procedural was only enabled during viewport renders
originally because it did not have any caching strategy. Now that
is does, we can allow its usage in final renders.
This also removes the `dag_eval_mode` argument passing to
`ModifierTypeInfo.dependsOnTime` which was originally added to detect if
we are doing a viewport render for enabling the procedural.
Differential Revision: https://developer.blender.org/D14520
Diffstat (limited to 'source/blender/modifiers/intern')
18 files changed, 20 insertions, 54 deletions
diff --git a/source/blender/modifiers/intern/MOD_build.c b/source/blender/modifiers/intern/MOD_build.c index d7baea7887d..61959d242d8 100644 --- a/source/blender/modifiers/intern/MOD_build.c +++ b/source/blender/modifiers/intern/MOD_build.c @@ -46,9 +46,7 @@ static void initData(ModifierData *md) MEMCPY_STRUCT_AFTER(bmd, DNA_struct_default_get(BuildModifierData), modifier); } -static bool dependsOnTime(struct Scene *UNUSED(scene), - ModifierData *UNUSED(md), - const int UNUSED(dag_eval_mode)) +static bool dependsOnTime(struct Scene *UNUSED(scene), ModifierData *UNUSED(md)) { return true; } diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c index 6389f420588..185b05b4cf9 100644 --- a/source/blender/modifiers/intern/MOD_cloth.c +++ b/source/blender/modifiers/intern/MOD_cloth.c @@ -201,9 +201,7 @@ static void copyData(const ModifierData *md, ModifierData *target, const int fla tclmd->solver_result = NULL; } -static bool dependsOnTime(struct Scene *UNUSED(scene), - ModifierData *UNUSED(md), - const int UNUSED(dag_eval_mode)) +static bool dependsOnTime(struct Scene *UNUSED(scene), ModifierData *UNUSED(md)) { return true; } diff --git a/source/blender/modifiers/intern/MOD_collision.c b/source/blender/modifiers/intern/MOD_collision.c index 9791b046e00..1cb308bb2a0 100644 --- a/source/blender/modifiers/intern/MOD_collision.c +++ b/source/blender/modifiers/intern/MOD_collision.c @@ -80,9 +80,7 @@ static void freeData(ModifierData *md) } } -static bool dependsOnTime(struct Scene *UNUSED(scene), - ModifierData *UNUSED(md), - const int UNUSED(dag_eval_mode)) +static bool dependsOnTime(struct Scene *UNUSED(scene), ModifierData *UNUSED(md)) { return true; } diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c index ca48d4fedd8..7ad7d6eef3d 100644 --- a/source/blender/modifiers/intern/MOD_displace.c +++ b/source/blender/modifiers/intern/MOD_displace.c @@ -80,9 +80,7 @@ static void requiredDataMask(Object *UNUSED(ob), } } -static bool dependsOnTime(struct Scene *UNUSED(scene), - ModifierData *md, - const int UNUSED(dag_eval_mode)) +static bool dependsOnTime(struct Scene *UNUSED(scene), ModifierData *md) { DisplaceModifierData *dmd = (DisplaceModifierData *)md; diff --git a/source/blender/modifiers/intern/MOD_dynamicpaint.c b/source/blender/modifiers/intern/MOD_dynamicpaint.c index 64f603b99a9..f8cf80b673c 100644 --- a/source/blender/modifiers/intern/MOD_dynamicpaint.c +++ b/source/blender/modifiers/intern/MOD_dynamicpaint.c @@ -142,9 +142,7 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte } } -static bool dependsOnTime(struct Scene *UNUSED(scene), - ModifierData *UNUSED(md), - const int UNUSED(dag_eval_mode)) +static bool dependsOnTime(struct Scene *UNUSED(scene), ModifierData *UNUSED(md)) { return true; } diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c index b3bcd181de9..87ff648f13d 100644 --- a/source/blender/modifiers/intern/MOD_explode.c +++ b/source/blender/modifiers/intern/MOD_explode.c @@ -71,9 +71,7 @@ static void copyData(const ModifierData *md, ModifierData *target, const int fla temd->facepa = NULL; } -static bool dependsOnTime(struct Scene *UNUSED(scene), - ModifierData *UNUSED(md), - const int UNUSED(dag_eval_mode)) +static bool dependsOnTime(struct Scene *UNUSED(scene), ModifierData *UNUSED(md)) { return true; } diff --git a/source/blender/modifiers/intern/MOD_fluid.c b/source/blender/modifiers/intern/MOD_fluid.c index a4c34df7ccf..562f0df510d 100644 --- a/source/blender/modifiers/intern/MOD_fluid.c +++ b/source/blender/modifiers/intern/MOD_fluid.c @@ -151,9 +151,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * #endif /* WITH_FLUID */ } -static bool dependsOnTime(struct Scene *UNUSED(scene), - ModifierData *UNUSED(md), - const int UNUSED(dag_eval_mode)) +static bool dependsOnTime(struct Scene *UNUSED(scene), ModifierData *UNUSED(md)) { return true; } diff --git a/source/blender/modifiers/intern/MOD_meshcache.c b/source/blender/modifiers/intern/MOD_meshcache.c index e5a62ba96b6..6f065797b43 100644 --- a/source/blender/modifiers/intern/MOD_meshcache.c +++ b/source/blender/modifiers/intern/MOD_meshcache.c @@ -54,9 +54,7 @@ static void initData(ModifierData *md) MEMCPY_STRUCT_AFTER(mcmd, DNA_struct_default_get(MeshCacheModifierData), modifier); } -static bool dependsOnTime(struct Scene *UNUSED(scene), - ModifierData *md, - const int UNUSED(dag_eval_mode)) +static bool dependsOnTime(struct Scene *UNUSED(scene), ModifierData *md) { MeshCacheModifierData *mcmd = (MeshCacheModifierData *)md; return (mcmd->play_mode == MOD_MESHCACHE_PLAY_CFEA); diff --git a/source/blender/modifiers/intern/MOD_meshsequencecache.cc b/source/blender/modifiers/intern/MOD_meshsequencecache.cc index cfc5b17f37e..dabbcbaf818 100644 --- a/source/blender/modifiers/intern/MOD_meshsequencecache.cc +++ b/source/blender/modifiers/intern/MOD_meshsequencecache.cc @@ -169,7 +169,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * /* Do not process data if using a render procedural, return a box instead for displaying in the * viewport. */ - if (BKE_cache_file_uses_render_procedural(cache_file, scene, DEG_get_mode(ctx->depsgraph))) { + if (BKE_cache_file_uses_render_procedural(cache_file, scene)) { return generate_bounding_box_mesh(ctx->object, org_mesh); } @@ -263,13 +263,13 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * #endif } -static bool dependsOnTime(Scene *scene, ModifierData *md, const int dag_eval_mode) +static bool dependsOnTime(Scene *scene, ModifierData *md) { #if defined(WITH_USD) || defined(WITH_ALEMBIC) MeshSeqCacheModifierData *mcmd = reinterpret_cast<MeshSeqCacheModifierData *>(md); /* Do not evaluate animations if using the render engine procedural. */ return (mcmd->cache_file != nullptr) && - !BKE_cache_file_uses_render_procedural(mcmd->cache_file, scene, dag_eval_mode); + !BKE_cache_file_uses_render_procedural(mcmd->cache_file, scene); #else UNUSED_VARS(scene, md, dag_eval_mode); return false; diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc index 89d7868831d..7545bae43b3 100644 --- a/source/blender/modifiers/intern/MOD_nodes.cc +++ b/source/blender/modifiers/intern/MOD_nodes.cc @@ -316,9 +316,7 @@ static bool check_tree_for_time_node(const bNodeTree &tree, return false; } -static bool dependsOnTime(struct Scene *UNUSED(scene), - ModifierData *md, - const int UNUSED(dag_eval_mode)) +static bool dependsOnTime(struct Scene *UNUSED(scene), ModifierData *md) { const NodesModifierData *nmd = reinterpret_cast<NodesModifierData *>(md); const bNodeTree *tree = nmd->node_group; diff --git a/source/blender/modifiers/intern/MOD_softbody.c b/source/blender/modifiers/intern/MOD_softbody.c index d43e26f25e1..d8379cc870a 100644 --- a/source/blender/modifiers/intern/MOD_softbody.c +++ b/source/blender/modifiers/intern/MOD_softbody.c @@ -47,9 +47,7 @@ static void deformVerts(ModifierData *UNUSED(md), ctx->depsgraph, scene, ctx->object, DEG_get_ctime(ctx->depsgraph), vertexCos, verts_num); } -static bool dependsOnTime(struct Scene *UNUSED(scene), - ModifierData *UNUSED(md), - const int UNUSED(dag_eval_mode)) +static bool dependsOnTime(struct Scene *UNUSED(scene), ModifierData *UNUSED(md)) { return true; } diff --git a/source/blender/modifiers/intern/MOD_surface.c b/source/blender/modifiers/intern/MOD_surface.c index f3811d98cd1..3e75e325e44 100644 --- a/source/blender/modifiers/intern/MOD_surface.c +++ b/source/blender/modifiers/intern/MOD_surface.c @@ -83,9 +83,7 @@ static void freeData(ModifierData *md) } } -static bool dependsOnTime(struct Scene *UNUSED(scene), - ModifierData *UNUSED(md), - const int UNUSED(dag_eval_mode)) +static bool dependsOnTime(struct Scene *UNUSED(scene), ModifierData *UNUSED(md)) { return true; } diff --git a/source/blender/modifiers/intern/MOD_volume_displace.cc b/source/blender/modifiers/intern/MOD_volume_displace.cc index c4a822125ba..059cfdbdd4e 100644 --- a/source/blender/modifiers/intern/MOD_volume_displace.cc +++ b/source/blender/modifiers/intern/MOD_volume_displace.cc @@ -82,9 +82,7 @@ static void foreachTexLink(ModifierData *md, Object *ob, TexWalkFunc walk, void walk(userData, ob, md, "texture"); } -static bool dependsOnTime(struct Scene *UNUSED(scene), - ModifierData *md, - const int UNUSED(dag_eval_mode)) +static bool dependsOnTime(struct Scene *UNUSED(scene), ModifierData *md) { VolumeDisplaceModifierData *vdmd = reinterpret_cast<VolumeDisplaceModifierData *>(md); if (vdmd->texture) { diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c index 8042172f204..e95d2983639 100644 --- a/source/blender/modifiers/intern/MOD_warp.c +++ b/source/blender/modifiers/intern/MOD_warp.c @@ -103,9 +103,7 @@ static void matrix_from_obj_pchan(float mat[4][4], } } -static bool dependsOnTime(struct Scene *UNUSED(scene), - ModifierData *md, - const int UNUSED(dag_eval_mode)) +static bool dependsOnTime(struct Scene *UNUSED(scene), ModifierData *md) { WarpModifierData *wmd = (WarpModifierData *)md; diff --git a/source/blender/modifiers/intern/MOD_wave.c b/source/blender/modifiers/intern/MOD_wave.c index 4da2d67b8a6..73b26dc29cd 100644 --- a/source/blender/modifiers/intern/MOD_wave.c +++ b/source/blender/modifiers/intern/MOD_wave.c @@ -55,9 +55,7 @@ static void initData(ModifierData *md) MEMCPY_STRUCT_AFTER(wmd, DNA_struct_default_get(WaveModifierData), modifier); } -static bool dependsOnTime(struct Scene *UNUSED(scene), - ModifierData *UNUSED(md), - const int UNUSED(dag_eval_mode)) +static bool dependsOnTime(struct Scene *UNUSED(scene), ModifierData *UNUSED(md)) { return true; } diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c index 02991558c18..2c733542e51 100644 --- a/source/blender/modifiers/intern/MOD_weightvgedit.c +++ b/source/blender/modifiers/intern/MOD_weightvgedit.c @@ -97,9 +97,7 @@ static void requiredDataMask(Object *UNUSED(ob), /* No need to ask for CD_PREVIEW_MLOOPCOL... */ } -static bool dependsOnTime(struct Scene *UNUSED(scene), - ModifierData *md, - const int UNUSED(dag_eval_mode)) +static bool dependsOnTime(struct Scene *UNUSED(scene), ModifierData *md) { WeightVGEditModifierData *wmd = (WeightVGEditModifierData *)md; diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c index 52c5e96c68e..b827d41e80a 100644 --- a/source/blender/modifiers/intern/MOD_weightvgmix.c +++ b/source/blender/modifiers/intern/MOD_weightvgmix.c @@ -145,9 +145,7 @@ static void requiredDataMask(Object *UNUSED(ob), /* No need to ask for CD_PREVIEW_MLOOPCOL... */ } -static bool dependsOnTime(struct Scene *UNUSED(scene), - ModifierData *md, - const int UNUSED(dag_eval_mode)) +static bool dependsOnTime(struct Scene *UNUSED(scene), ModifierData *md) { WeightVGMixModifierData *wmd = (WeightVGMixModifierData *)md; diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index 7f11d348eff..43a90b2a4ac 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -347,9 +347,7 @@ static void requiredDataMask(Object *UNUSED(ob), /* No need to ask for CD_PREVIEW_MLOOPCOL... */ } -static bool dependsOnTime(struct Scene *UNUSED(scene), - ModifierData *md, - const int UNUSED(dag_eval_mode)) +static bool dependsOnTime(struct Scene *UNUSED(scene), ModifierData *md) { WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData *)md; |