question

Alan Jones avatar image
Alan Jones asked ·

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.

arnoldmtoashaders
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Stephen Blair avatar image
Stephen Blair answered ·

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

2 comments Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

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

0 Likes 0 · ·

None of this works with a custom translator.

0 Likes 0 · ·
Max Tarpini avatar image
Max Tarpini answered ·

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.


2 comments Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

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.

0 Likes 0 · ·
Max Tarpini avatar image Max Tarpini 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 !

0 Likes 0 · ·
Stephen Blair avatar image
Stephen Blair answered ·

You need an Attribute Editor template.

For example:

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


Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.