Tutorials

Using Script Snippets

Previous Next

 

There are currently two snippet graph nodes, a MaxScript Snippet and a Python Snippet. These nodes give users the ability to execute snippets of code to preform user design edits or changes to their 3ds Max scene.

 

In the tutorial below we will walk through the process of creating a MaxScript Snippet node to random change the z position of the nodes in the scene each time the graph is execute.

 


 

The first thing we will do is create an Objects By Name node in Vexus. This node will be used so our maxscript snippet can target all the scene objects. As seen in the image below, we will use a wildcard * as the Node Names values.

 

 

 

Next, create a Maxscript Snippet node connected to the Objects By Name as seen in the image.

 

 

 

To being setting up the the snippet node, we must first enable the Maxscript Snippet node's parameter 'Select Input Nodes'. This parameter tells the graph node to only affect the objects being passed into from other graph nodes. What this is going to do under the hood is select the objects in 3ds Max, that are being passed. This allows us to create a maxscript snippet that works based on the current selection.

 

 

 

Now we can create a snippet of code for randomizing the z position of our objects and paste it into our graph node.

 

 

Now each time you execute the node in the graph, the objects in the 3ds Max scene will randomly move on the Z axis. This same technique can setup can be used for the Python Snippet, the only difference being the scripting language.

 


 

Copyright © 2019 Boomer Labs and JokerMartini

http://boomerlabs.com/vexus