Using python for OTL parameter control

   4793   4   0
User Avatar
Member
110 posts
Joined:
Offline
Hey gang, I've got an OTL I'm making and I'd like to be able to set a display flag inside the sop world using a button.

So far It works using python callback script using kwargs and then in the Scripts tab I create my display function for the specific node, it works fine on my master OTL. But as soon as I drop down a second OTL, that's locked, I get a locked/permissions error.

My question is, is there any way around this? Is there some sort of command or flag I'm missing, or is this just an illegal function in the grand scheme of things?

I know there's an opset command, but I hadn't given that a try yet, since I'm not sure how it works on an OTL.

Thanks!
-Rick
User Avatar
Member
110 posts
Joined:
Offline
Got it, here's a little hip file. I had to use Editable Nodes inside the OTL to get it to work, but it seems I have to use an object itself, not a sop.

Attachments:
test_display_otl_v01.hip (64.4 KB)

User Avatar
Member
665 posts
Joined: July 2005
Offline
Hi Ratmann,

Often times I will use a Switch SOP to control the display of OTLs.

The Switch SOP is actually pretty cool. It's aware of what it's inputs are, and will only cook the displayed chain.

cheers,
-j
User Avatar
Member
1908 posts
Joined: Nov. 2006
Online
The fundamental nature of an asset is you can't make changes to a locked asset. Trying to change flags is of course never allowed. Using editable nodes is basically a hack. As Jacob said, using a Switch SOP to control which shape you see is the better way. The problem with using an editable node is that you can dive in and change any parameter or add/delete nodes inside it as well.
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
110 posts
Joined:
Offline
Ack right, hadn't quite realised it was leaving my obj open.

Looks like I'll have to look into the switch sop and do some clever sop and parameter jumbling for this.

Thanks gang!
  • Quick Links