Toolchefs / atomsGaffer

Atoms Crowd extension for Gaffer
https://atoms.toolchefs.com
27 stars 15 forks source link

Override preview geometry #46

Closed gusyam closed 3 years ago

gusyam commented 3 years ago

Is there a way to override the preview geometry (sphere) that pops-up in the viewer whenever a shading node is selected? Currently I see no settings for switching to another option, or specifying an external file as the preferred lookdev "shader ball".

Taking it from the several geometry options available in Maya's Hypershade Material Viewer pane, I believe it would be beneficial to allow the user to specify a custom shader ball that is more appropriate for the particular shading element being tweaked. (Users could provide their own geometries instead of Gaffer itself having to come with several ones included)

andrewkaufman commented 3 years ago

I'm assuming you were directly this question at Gaffer itself (as opposed to this Atoms plugin) right?

You can register your own shader preview scenes via python. Just put something like this in your gaffer/startup/gui/*.py. If you use "Default" as the key you'll be overriding the built-in sphere. If you give other names they will be added to the dropdown list.

andrewkaufman commented 3 years ago

You can dropdown an ArnoldShaderBall node to see the expected structure for your custom node (which can be a user-authored Box rather than something written in code).

gusyam commented 3 years ago

Sorry Andrew, my bad... Yes, Gaffer. Thanks for the quick reply anyway! It's been awhile since we last chatted...