Maxplus and render elements

posted in: Blog | 1

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 and please feel free to make your own contributions and/or comments!

One Response

  1. Flo
    | Reply

    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:


    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?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.