Fix T90476: intermittent wrong generated texture coordinates with modifiers

This caused Cycles texture_space_mesh_modifier and panorama_dicing tests to
randomly fail.

The issue was introduced with D11377, due to a missing dependency. Now ensure
we first copy the texture space parameters, and only then use or recompute then.

In general it seems like this dependency should have already been there, since
parameter evaluation includes animation and drivers, and geometry evaluation
may depend on that (even if you would not typically animate e.g. an autosmooth
angle).

Thanks Campbell for tracking this one down.
This commit is contained in:
Brecht Van Lommel 2021-08-06 13:32:19 +02:00
parent b0df8f53ba
commit f4adb35f28
Notes: blender-bot 2023-02-14 04:24:05 +01:00
Referenced by issue #90476, Intermittent failure of cycles texture_space_mesh_modifier test
1 changed files with 5 additions and 0 deletions

View File

@ -2224,6 +2224,11 @@ void DepsgraphRelationBuilder::build_object_data_geometry_datablock(ID *obdata)
OperationKey obdata_geom_eval_key(obdata, NodeType::GEOMETRY, OperationCode::GEOMETRY_EVAL);
OperationKey obdata_geom_done_key(obdata, NodeType::GEOMETRY, OperationCode::GEOMETRY_EVAL_DONE);
add_relation(obdata_geom_eval_key, obdata_geom_done_key, "ObData Geom Eval Done");
/* Link object data evaluation to parameter evaluation. */
ComponentKey parameters_key(obdata, NodeType::PARAMETERS);
add_relation(parameters_key, obdata_geom_eval_key, "ObData Geom Params");
/* Type-specific links. */
const ID_Type id_type = GS(obdata->name);
switch (id_type) {