Digital asset creation problem

   1795   2   1
User Avatar
Member
21 posts
Joined: April 2012
Offline
Hi there, I'm creating a digital asset which will be a Sop operator, but I have a problem. An attribute inside the asset references to a node at the scene level so I'm not able to encapsulate it into the asset.
I've tried to move this node inside but it messes up my attribute. It needs to stay at the scene level.
My question is: is there a way to create a digital asset which, when created, automatically creates this node at the scene level?
Thanks in advance
User Avatar
Member
696 posts
Joined: March 2009
Offline
Totally! in the scripts tab of your digital asset you can create an onCreated script and make it happen. You might find yourself scripting a lot to manage your nodes later on (e.g. what happens if the user creates two instances of your asset? Do they each create their companion nodes? What happens if the user deletes the companion nodes?), but it is possible. You can also let the user manage the required nodes by themselves if you create companion assets instead.

Cheers
Toronto - ON
My Houdini playground [renderfarm.tumblr.com]
“As technology advances, the rendering time remains constant.”
User Avatar
Member
21 posts
Joined: April 2012
Offline
Thanks rafaels. What language should I use for the script? Would you mind to give me a little example of the onCreated script? something simple like create a geometry node when the asset is created, just to understand the structure of the script, I can then develop it myself
  • Quick Links