C4D Python: AiASSLoad() excludes Layer nodes?

C4D Python: AiASSLoad() excludes Layer nodes?

Shawn_Kearney1
Not applicable
1,070 Views
4 Replies
Message 1 of 5

C4D Python: AiASSLoad() excludes Layer nodes?

Shawn_Kearney1
Not applicable

I'm writing a script that reads an .ass file and conforms texture formats and locations to a standard. However, with Layer nodes, the script does not seem to read them, and once the updated .ass file is written using AiASSWrite() it is excluded, resulting in broken links.

I am using the AI_NODE_ALL mask in both the load and iterator, still nothing. It's as if AiASSLoad() knows nothing about the Layer nodes and ignored them.

C4D Exports the layer nodes just fine, from both the GUI and from call c4d.CallCommand()

This is especially problematic as Arnold uses layer nodes to work with selection groups.

0 Likes
Accepted solutions (1)
1,071 Views
4 Replies
Replies (4)
Message 2 of 5

Stephen.Blair
Community Manager
Community Manager
Accepted solution

Layers are a C4DtoA thing, not Arnold.

You need to have the c4dtoa_shaders in your shader search path before you load an ass file.

If you enable logging before you load an ass file, you'll see errors for unrecognized nodes (unless you add the c4dtoa_shaders to the shader search path eg ARNOLD_PLUGIN_PATH)



// Stephen Blair
// Arnold Renderer Support
0 Likes
Message 3 of 5

peter.horvath6V6K3
Advisor
Advisor

As Stephen said, the layer shader is part of the c4dtoa_shaders library, so you have to load it first via the AiLoadPlugins() function. The binary is in the [C4D install]/plugins/C4DtoA/shaders folder.

0 Likes
Message 4 of 5

Shawn_Kearney1
Not applicable

I figured it was along these lines, since HtoA doesn't have Layers, just wasn't sure what I needed. If the proper Plugin Path is included in the ass file's options, will arnold load the plugins automatically, without AiLoadPlugins()?

0 Likes
Message 5 of 5

Shawn_Kearney1
Not applicable

Thank you! Along with Peter's help I got it figured out and working perfectly!

0 Likes