Message 1 of 3

Not applicable
09-28-2020
03:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hello everyone,
I want to write a python-script that batch renders shaders to textures using render to texture from Arnold, but I'm already stuck at step one.
cmds.arnoldRenderToTexture("Path")
Produces an error "No geometry selected" no matter how many Meshes I have selected in the scene. cmds.ls(sl=1) confirms, that I have selected something. I have inspected the python-file for render to texture and found the line, where the script checks for selected objects.
For reference:
[...]
selList = cmds.ls(sl=1)
if (len(selList) == 0):
cmds.confirmDialog( title='Render To Texture', message='No Geometry Selected', button=['Ok'], defaultButton='Ok', cancelButton='Ok', dismissString='Ok' )
return False
cmds.arnoldRenderToTexture(folder=outFolder, shader=shader, resolution=resolution, aa_samples=aa_sampling, filter=filter_type, filter_width=filter_width, all_udims=all_udims, udims=udims, uv_set=uv_set, normal_offset=normalOffset, enable_aovs=enableAovs, extend_edges=extendEdges,u_start=uStart, u_scale=uScale, v_start=vStart, v_scale=vScale, sequence= useSequence, frame_start=frameStart, frame_end=frameEnd, frame_step=frameStep, frame_padding=framePadding)
[...]
The error should not appear, as long as I have selected something. But it does.
Any help is much appreciated, thank you.
Btw. Doing the same manually with the Arnold Utilities works just fine.
Solved! Go to Solution.