The beauty in open source projects is that you start something all by yourself and soon you get people to collaborate and add their own ideas and experience… that’s what started to happen with YCDIVFX Maxplus Packages.
Daniel Santana, a portuguese programmer and 3dsmax user has made the very first contribution to the project and what a contribution! He developed a custom class that allows you to easily interact with render elements.
Take a look on how easy it is now to work with python and render elements:
if __name__ == '__main__': re = RenderElementManager() print 'Number of render elements %s' % len(re) for element in re.Elements: print 'Element %s is %s' % (element.ElementName, 'enabled' if element.VrayVFB else 'disabled') element.VrayVFB = False print 'Element %s is now %s' % (element.ElementName, 'enabled' if element.VrayVFB else 'disabled') print 'Filename=', element.File
You can find it here https://github.com/arturleao/YCDIVFX_MaxPlus and please feel free to make your own contributions and/or comments!
One Response
Flo
First of all: Great piece of Code, I found it yesterday while struggling around with Render Elements in MaxPlus, its really helpfull. But i recently stumled upon a problem. I tried to change the filepath of an vray render element.
code looks something like this:
for element in re.Elements:
print element.file
print path = “C:/foo/foo/foo.exr”
element.File = path
print element.file
But the Console shows something like that:
\localdatalala
C:/foo/foo/foo.exr
File
so the path does not change properly. even if I change the variable path to: \localdatalala it doesn’t work. do you have any Idea how to fix that?