Using Gaffer Scripts as procedurals in Maya...

84 views
Skip to first unread message

Hradec

unread,
Jan 16, 2017, 9:59:00 PM1/16/17
to cortexdev
Hi there... 

I'm starting to test running a gaffer script as a procedural inside Maya. 

I was able to use a simple gaffer script which reads an alembic geometry, and it works perfectly in Maya. 

But I was wondering... Is there a way to "expose" some gaffer node parameters to the Maya UI?

Also, what exactly does the "Context Items" parameters? 

cheers...
-H

John Haddon

unread,
Jan 20, 2017, 2:39:28 PM1/20/17
to cortexdev
Hi Hradec,

You can't automatically expose Gaffer node parameters directly in Maya at present. We have talked about making a custom Maya standin for Gaffer procedurals though, to encourage adoption for folks wanting a Maya/Gaffer hybrid solution but without access to Image Engine's fancy Caribou setup.

But you could use the context parameter to define a list of arbitrary variables which can be used in expressions in your Gaffer node graph. The syntax isn't particularly user friendly because it is just designed as an internal mechanism for passing arbitrary data - basically it's just a series of arbitrary flag/value pairs where the flag provides the variable name and the value is parsed as a python expression. So something like `-myInt 10 -myFloat 1.0 -myString something`.

To read those from a Gaffer expression you'd do something like `context.get( "myFloat", defaultValue )`. Let us know if that makes sense or you need any more information...

Cheers...
John

--
--
You received this message because you are subscribed to the "cortexdev" group.
To post to this group, send email to cort...@googlegroups.com
To unsubscribe from this group, send email to cortexdev-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cortexdev?hl=en
---
You received this message because you are subscribed to the Google Groups "cortexdev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cortexdev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
John Haddon - R&D Programmer
Image Engine
studio: +1 (604) 874-5634 | jo...@image-engine.com | www.image-engine.com



15 West 5th Avenue, Vancouver, BC, V5Y 1H4, Canada

If you are not the intended recipient, disclosure, copying, distribution and use of this email is prohibited. Please notify us immediately and delete this email from your systems. You may contact us at in...@image-engine.com if you do not wish to receive further commercial electronic messages. We may still send you messages for which we do not require consent.

Reply all
Reply to author
Forward
0 new messages