Hi all,
In the Arnold section of a camera's attribute editor, when you pick some of the integrated Arnold camera types, you'll see the Arnold parameters for that camera node appear beneath them.
I've registered my parameters in the node and have also done the metadata calls in code, but they don't appear there. This leads me to believe there is some other mechanism required to make them appear. I've looking in the mtoa translator structure, but there isn't anything immediately obvious in there as the place to do it.
Any chance somebody knows the intended workflow to expose custom camera parameters to the UI in maya?
Cheers,
Alan.
You need an Attribute Editor template.
For example:
https://github.com/zpelgrims/zoic/tree/master/maya/ae
However Stephen, I have a problem myself, whatever name I use in the node loader (multiple classes in a single lib) it's not seen by the translator that is looking for the library name as the maya node camera.
For example my camera is romboCamera (set as both maya.name and maya.translator, it doesn't matter I do it in the C++ node_parameters section or in a .mtd file) ... when I register its AEtemplate with :
templates.registerTranslatorUI(AEromboCameraTemplate, "camera", "romboCamera")
at startup I get this warning ::
# Warning: [mtoa] Registering UI for unknown translator "romboCamera" for Maya node camera. Valid choices are: "libRomboArnold", "perspective", "spherical", "vr_camera", "<built-in>", "orthographic", "fisheye", "cylindrical" #
you see as 'valid choice' I have 'libRomboArnold' .. but that has never been registered anywhere, it's just the name of the linked library, libRomboArnold.so. Now if I match the registration name in the AETemplate with the one of the library.. it actually works and all the params are there and working correctly.
When you call RegisterTranslator() is the second argument an empty string?
Then MtoA uses the library name (libRomboArnold in this case) as the translator name.
Apparently, it does call the library name also if there's a mismatch between 2nd arg (registerTranslatorUI() ) and maya.name where they should be both 'camera'. I was using the camera name there (romboCamera) and not 'camera'. Now everything is working cool. Thanks a bunch !
There's no documentation for the AE templates, but there's a lot of examples for the MtoA nodes:
S:\solidangle\mtoadeploy\2019-3.3.0.2\scripts\mtoa\ui\ae