Access DA from a 'script' node via an ObjectMerge with stamp

   1840   1   1
User Avatar
Member
68 posts
Joined: May 2013
Offline
Okay I have a digital asset with various parameters (of the interface controlling kind).
I use an ObjectMerge and a ‘copy’ node to instance on particles with the intent of using stamping to affect those parameters from chops.

I tried positioning a ‘Script’ node between the objectMerge and copy, which just has a pointGenerator making points (it instance on) for the total number of channels in the parameter control drivers in the chop at the time.

So far I've tried…

obj = hou.node('.').inputs()
print obj
np = obj.parm('parm')
print np


I get the object_merge1 but it has no custom digital asset parameter.

I think the question is how do I access the actual copy?
Still I wondering if this is best method?

I thought about trying to convert the SOP to a SOP OPerator or something but I don't think that's ideal. In fact it seems wrong in the end.

Or do I access some instance from the ‘copy’ node?

Or do I go to the object that is merged and put code there that calls stamp? If so how to you reference the copy1 node (via stampValue in python of course) from the seemingly hidden disconnected copies source (copied from the obectMerge node).
User Avatar
Member
68 posts
Joined: May 2013
Offline
I've only found one way… “OOP” to “SOP” conversion! as I suggested was an option previously.
As an Object node type there was really not magic code I could figure out, but I'm sure it's possible, or an explanation why it's not would be insightful.

It was not as hard as I thought to simply copy the Parameter Interface and Scripts over to a new DA as a SOP version (from the Object level DA).
Then it works as I was expecting…

node = hou.node('.').inputs()
sn = hou.node('../copy1')
node.parm(“parm”).set(sn.stampValue(“parm”, 0))

This bridges the STAMPed values to the copy instances when placed in a “Script” SOP.
:idea:
  • Quick Links