Community
Arnold General Rendering Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Populating Custom Camera parameters in the Attribute Editor

7 REPLIES 7
Reply
Message 1 of 8
alan-LFL
388 Views, 7 Replies

Populating Custom Camera parameters in the Attribute Editor

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.

Tags (3)
Labels (3)
7 REPLIES 7
Message 2 of 8
Stephen.Blair
in reply to: alan-LFL

You need an Attribute Editor template.

For example:

https://github.com/zpelgrims/zoic/tree/master/maya/ae




// Stephen Blair
// Arnold Renderer Support
Message 3 of 8
maxtarpini
in reply to: alan-LFL

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.


Message 4 of 8
Stephen.Blair
in reply to: maxtarpini

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.



// Stephen Blair
// Arnold Renderer Support
Message 5 of 8
maxtarpini
in reply to: Stephen.Blair

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 !

Message 6 of 8
Stephen.Blair
in reply to: alan-LFL

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



// Stephen Blair
// Arnold Renderer Support
Message 7 of 8
alan-LFL
in reply to: Stephen.Blair

Thanks, Stephen, I'll give this a try.

Message 8 of 8
alan-LFL
in reply to: Stephen.Blair

None of this works with a custom translator.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report