Skip to content

Calling Function from Maya #129

Answered by ImLucasBrown
deepakxyz asked this question in Q&A
Discussion options

You must be logged in to vote

There are a couple of approaches you could use.

  1. Put your function in the World Node's code block. Function, variables, modules, ect defined in the world node are available globally. You can access the world node by double clicking the layer's name or by pressing / and return (by default, / brings up the node search box).

  2. You could declare the function as a global. global test. The global keyword allows all nodes to access the name.

  3. Callables can be stored in the STAGE object. So after defining the function you could do something like STAGE.test = test, then call it in a later node via STAGE.test().

All of these are valid ways to work, however personally I tend to use NXT to formul…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@sgodanas
Comment options

@MichaelAldrich
Comment options

@sgodanas
Comment options

Answer selected by deepakxyz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants