AcademySoftwareFoundation / MaterialX

MaterialX is an open standard for the exchange of rich material and look-development content across applications and renderers.
http://www.materialx.org/
Apache License 2.0
1.88k stars 358 forks source link

Improve generation of shader metadata in OSL shader generation #371

Closed niklasharrysson closed 4 years ago

niklasharrysson commented 4 years ago

We should make sure all appropriate MaterialX attributes are added as OSL parameter metadata. For example docs/help, min/max values etc.

In addition we should implement support for adding in custom attributes as shader or parameter metadata. Possibly configurable by setting a list of the corresponding attribute names on the generator before generation.

niklasharrysson commented 4 years ago

For custom attributes configuration should be supported by an "exportable" attribute on the AttributeDef elements defining the custom attributes. AttributeDefs with "exportable" set to true will be exported as meta data in the shader.

niklasharrysson commented 4 years ago

Resolved by: https://github.com/materialx/MaterialX/pull/435