Blender Git Loki

Git Commits -> Revision 975d21a

Revision 975d21a by Jacques Lucke (temp-ui-tweaks)
September 22, 2021, 13:54 (GMT)
Functions: support optional outputs in multi-function

Sometimes not all outputs of a multi-function are required by the
caller. In those cases it would be a waste of compute resources
to calculate the unused values anyway. Now, the caller of a
multi-function can specify when a specific output is not used.
The called function can check if an output is unused and may
ignore it. Multi-functions can still computed unused outputs as
before if they don't want to check if a specific output is unused.

The multi-function procedure system has been updated to support
ignored outputs in call instructions. An ignored output just has no
variable assigned to it.

The field system has been updated to generate a multi-function
procedure where unused outputs are ignored.

Commit Details:

Full Hash: 975d21a1a2885f0ff554f1092d443c758ecbe2c1
Parent Commit: 14af051
Committed By: Pablo Vazquez
Lines Changed: +226, -27

9 Modified Paths:

/source/blender/blenlib/BLI_resource_scope.hh (+11, -0) (Diff)
/source/blender/functions/FN_multi_function.hh (+7, -2) (Diff)
/source/blender/functions/FN_multi_function_params.hh (+63, -5) (Diff)
/source/blender/functions/intern/field.cc (+36, -10) (Diff)
/source/blender/functions/intern/multi_function_procedure.cc (+14, -2) (Diff)
/source/blender/functions/intern/multi_function_procedure_executor.cc (+23, -8) (Diff)
/source/blender/functions/tests/FN_field_test.cc (+16, -0) (Diff)
/source/blender/functions/tests/FN_multi_function_test.cc (+27, -0) (Diff)
/source/blender/functions/tests/FN_multi_function_test_common.hh (+29, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021