Community
Maya Forum
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Python commands for Arnold?

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
yesthatjohn
7262 Views, 6 Replies

Python commands for Arnold?

Are there Python commands to create lights in Arnold?  I found the arnold module, but I don't see any commands related to lights.  Does anyone have resources to learn how to do this stuff?  Any help appreciated.

6 REPLIES 6
Message 2 of 7
sean.heasley
in reply to: yesthatjohn

Hi @yesthatjohn and welcome to the community!

 

I'm curious as to why you're looking for a python command with Arnold lights.

 

Does manually placing the lights from the arnold drop down not work for you? When you get a chance, please come back with a bit more information so I can properly assist you!

Message 3 of 7
Stephen.Blair
in reply to: yesthatjohn

No, Not for creating lights in Maya.

 

That's actually MtoA, not Arnold, and in this case the distinction is important.

 

If you really want to dig into how MtoA creates the nodes in a Maya scene, you can start with C:\solidangle\mtoadeploy\2017\scripts\mtoa\ui\arnoldmenu.py

 

That's the code for the Arnold menu, including the Arnold > Lights menu. But it's not an API, so it's not designed for public use.

 

 

 

 

Arnold itself is a rendering library with a C++ API. And that API has Python bindings, so you can create Arnold lights using the Arnold Python api. 

 

But that's not what happens inside Maya. Inside Maya you have the MtoA plugin creating Maya nodes (eg a locator for an area light)

 

 


@yesthatjohn wrote:

Are there Python commands to create lights in Arnold?  I found the arnold module, but I don't see any commands related to lights.  Does anyone have resources to learn how to do this stuff?  Any help appreciated.


 



// Stephen Blair
// Arnold Renderer Support
Message 4 of 7

Hi @yesthatjohn

 

I'm just checking in to see if you need more help with this. Did the suggestion that @Stephen.Blair provided work for you?

If so, please click Accept as Solution on the posts that helped you so others in the community can find them easily.

Message 5 of 7
yesthatjohn
in reply to: Stephen.Blair

Hi,

 

That was a big help.  Thx!  On my Centos 7 distribution I found the file you mentioned here:

 

/opt/solidangle/mtoa/2017/scripts/mtoa/ui

Message 6 of 7
rdavidowitz
in reply to: yesthatjohn

It's been a while. Have Python commands been added for the Arnold lights? 

Message 7 of 7
syby119
in reply to: rdavidowitz

To create an area light in arnold, simply use cmds.createNode("aiAreaLight")

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

Post to forums  

Autodesk Design & Make Report