Blair Pierpont
blair_p
About Me
専門知識
Technical Director
業界:
Film/TV
Connect
LOCATION
United States
ウェブサイト
Houdini Engine
Availability
Not Specified
Recent Forum Posts
Python Node accessing Python Object 2016年2月23日13:39
You don't have access to each node's code, so the code itself would have to store python objects in the node's user data.
You can specify strings in userData, or objects in cachedUserData. So you could have the following in nodeA
class Foo(object):
pass
node.setCachedUserData('foo', Foo())
node.setUserData('bar', ‘baz’)
and then access it in nodeC with the following:
nodeA = node.inputs()
foo = nodeA.cachedUserData('foo')
bar = nodeA.userData('bar')
Keep in mind that userData is volatile, it gets deleted once the scene is closed. cachedUserData is stored in the file itself, and thus never deleted.
You can specify strings in userData, or objects in cachedUserData. So you could have the following in nodeA
class Foo(object):
pass
node.setCachedUserData('foo', Foo())
node.setUserData('bar', ‘baz’)
and then access it in nodeC with the following:
nodeA = node.inputs()
foo = nodeA.cachedUserData('foo')
bar = nodeA.userData('bar')
Keep in mind that userData is volatile, it gets deleted once the scene is closed. cachedUserData is stored in the file itself, and thus never deleted.
changes in new H14 Popnet 2015年9月16日13:00
try out pop spin, pop drag spin.
installation and file structure considerations 2014年3月18日15:15
If you base everything off of where your hip files exist then it can be extremely simple since you only use $HIP to determine the base directory.
datadir = $HIP/data
picdir = $HIP/pic
etc.
It can get more complicated when using logical paths but you can always overwrite $HIP in 456.cmd/456.py
datadir = $HIP/data
picdir = $HIP/pic
etc.
It can get more complicated when using logical paths but you can always overwrite $HIP in 456.cmd/456.py