OpenShadingLanguage icon indicating copy to clipboard operation
OpenShadingLanguage copied to clipboard

Feature: Ability to sparsely gather scalar values and connect them to elements of a dynamic or statically sized array parameter

Open sfriedmapixar opened this issue 1 year ago • 0 comments

Description

This requires you to first declare a setting for the dynamic array input that
will be used to size and provide values for any unconnected elements of the
dynamically sized array.  After that, individual scalar->arrayelem connections
can be specified from any number of different upstream shading nodes.  This
facilitates gathering inputs from across your shading network, for example
several procedurally generated color signals and using them to drive inputs
to shading nodes that are best left dynamically sized, such as the inputs
to spline operations.

Tests

This includes a new test in vararray-scalar-connect to demonstrate and
test the new connection method.

Checklist:

  • [ X] I have read the contribution guidelines.
  • [X] I have updated the documentation, if applicable.
  • [X] I have ensured that the change is tested somewhere in the testsuite (adding new test cases if necessary).
  • [X] My code follows the prevailing code style of this project. If I haven't already run clang-format v17 before submitting, I definitely will look at the CI test that runs clang-format and fix anything that it highlights as being nonconforming.

sfriedmapixar avatar Jun 07 '24 23:06 sfriedmapixar