Render Elements Scripting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I'm trying to write a script to add some render elements to a scene, and it's working up to a point. I can add the render element but when I try to modify it's properties I get a load of errors and Max crashes.
If I do it line by line everything works, but if I execute the whole thing then it crashes. Anything below "showProperties z_re" crashes when executed as a whole, but the commands all work okay on their own. I'm sure this is really basic so sorry but I've tried to find out what I'm doing wrong and haven't been getting very far. If anyone could share some advice it would be greatly appreciated.
The render element is from Redshift if that makes any difference? Using Max 2019.3
Thanks,
Alex
re = maxOps.GetCurRenderElementMgr()
re.removeallrenderelements()
relTemp = rsdepth
re.addrenderelement (relTemp())
z_re = re.GetRenderElement (0)
showProperties z_re
z_re.depthMode = 1
z_re.useCameraNearFar = false
z_re.depthMin = 100.0
z_re.depthMin = 600.0