Autodesk / sitoa

Arnold plugin for Softimage
Apache License 2.0
33 stars 16 forks source link

Add pick button for lights in Toon shader #24

Closed JenusL closed 5 years ago

JenusL commented 5 years ago

We should add a pick button and handle object name translation so that we can easily pick lights in the Toon shader. @sjannuz Had this to say about it:

One thing about toon, is that the lights, if any, must be referenced by name, so we'd need a button to translate a picked light into its SItoA name. I can check what I was doing before camera_projection turned the projection camera into a node (was a string in Arnold 4).

sjannuz commented 5 years ago

Here is the mentioned change happened for camera_projection, in ParamsCommon.cpp

camera_projection

JenusL commented 5 years ago

I started to work on this yesterday and I'm done with the name translation. I will investigate what Pick button solution to use and add that before I create a PR.

sjannuz commented 5 years ago

IIRC, what automagically adds the Pick button in ShaderDef.cpp is case AI_TYPE_NODE: return siShaderDataTypeReference; This works for node parameters. You can probably add an exception for the toon lights, that are strings instead, and use that return type for them, instead of siShaderDataTypeString. How am I missing Softimage !