Editable objects inside HDAs, permission errors etc.

   8618   14   1
User Avatar
Member
15 posts
Joined: Aug. 2007
Offline
Hey everyone,

I've been playing around with editable objects inside HDAs. Basically, I've got a control object down inside my character asset, and I've got a number of utility scripts (inteded to be used by the animator) as callback scripts for buttons. When the animator clicks a button I want to modify certain things down inside my network. In the simplest case, I want to match one control's transforms to another set of transforms.

Now, the script to do this, is really simple. The problem I have, however, is that as soon as my HDA is locked, my script will throw a permission error, because it's trying to modify a node inside the locked asset. So… I set my control object to be an “editable object” for the asset, and that relieved the error - but brought new problems. Now, if an animator grabs the control object, they're thrown down inside the asset (which I REALLY don't want to happen), as opposed to presented with the asset level parameters.

Is there any way that I can mess with things like the transforms of an object down inside a locked asset without throwing a permission error, but without specifying that object as an editable object? Is there no way that I can force changes inside a locked asset - I'm simply changing parameters (indirectly), after all, and those parameters are indeed promoted up to the asset level - so it's not like I'm actually changing anything inside the asset, not really, but I'm still presented with a permission error - most irritating!

For those who are interested, I'm trying to set both parameter values, and also call on a nodes .setWorldTransform() method. Both of these seem to throw permission errors from within a locked asset (even if the parameter I'm trying to set is promoted to the asset level).

Any help would be greatly appreciated,
Thanks!
Steve
User Avatar
Staff
1448 posts
Joined: July 2005
Offline
you should be able to do it without the editable objects. setWorldTransform() may try to modify a few parameters, and if one of them is not promoted it will report a permission error. Try promoting all relevant parameters in addition to translate, rotate, and scale parameters (ie, the tranform order, rotation axis order and uniform scale)
User Avatar
Member
15 posts
Joined: Aug. 2007
Offline
I've actually been having issues simply trying to set parameters on a node inside a locked asset.

For example, I'll create a null object, collapse into a subnet and turn into a digital asset. I'll then promote up all it's transform parameters (i.e. the entirety of its transform folder). From there, on my asset, I'll create a simple python script (inside the asset's python module) that does something like the following:

hou.pwd().node(“null1”).parm('tx').set(10)

I'll then call the function as a callback script for a button.

Now, when the asset is unlocked, my null gets its translate X set to 10. Because its translate x is actually referencing a parameter on the asset, the parameter reference is followed, and the parameter on my asset is set to 10, and then my null references that. Fantastic.

However, when the asset is locked, I get a permission error, which is crazy, because I've promoted the parameter I'm trying to alter up to the asset (and I know that everything else is working, since when it's unlocked it works fine).

Am I doing something incorrectly? Because my understanding was the same as yours - I thought parameter references would be traced, and that as long as I was changing a parameter on my asset, everything would be fine. Unfortunately, this doesn't seem to be the case.

Cheers!
Steve
User Avatar
Staff
3455 posts
Joined: July 2005
Offline
not seeing you file I can only guess…

does
hou.pwd().node(“null1”).parm('tx').set(10)
try to set the HDA's params or the null1 inside the HDA?
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
15 posts
Joined: Aug. 2007
Offline
That's the null inside the HDA

I'm running the script from the HDA, so hou.pwd() gives me the HDA, and then .node(“null1”) gives me the null inside my HDA. The rest should be pretty clear.

Cheers!
Steve
User Avatar
Staff
3455 posts
Joined: July 2005
Offline
you should be setting the tx (etc) parameter of the HDA, not the null - because it's parameters have been promoted - it works when it's unlocked but will not when it's locked…because it's…well…locked.

HTH
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
15 posts
Joined: Aug. 2007
Offline
That's ok when I'm just setting parameter values (although it's not very useful behaviour - having Houdini follow parameter references first, before trying to set a value, would make a lot more sense), but what if I'm trying to call on the .setWorldTransform() method, as mentioned earlier? I don't know what values I want to set the parameters to, the method call calculates those for me, but in order to call that method I need to have it affect a node… and I'm back to square one (permission errors).

I can think of workarounds, but they're really nasty. Is there really no way that I can have the parameters of a node in a locked asset affected by things like a call to .setWorldTransform() without it causing an error, when those parameters have been promoted to the asset level?

Cheers for the help so far!
Steve
User Avatar
Staff
3455 posts
Joined: July 2005
Offline
I've never used Python stuff do do anything…so I don't really know what you're talking about…

maybe if you described exactly what your intended result is we can find a workflow…
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
7722 posts
Joined: July 2005
Offline
stevetwist
Now, when the asset is unlocked, my null gets its translate X set to 10. Because its translate x is actually referencing a parameter on the asset, the parameter reference is followed, and the parameter on my asset is set to 10, and then my null references that. Fantastic.

However, when the asset is locked, I get a permission error, which is crazy, because I've promoted the parameter I'm trying to alter up to the asset (and I know that everything else is working, since when it's unlocked it works fine).

This looks like a bug to me. Please submit it.
User Avatar
Member
15 posts
Joined: Aug. 2007
Offline
Bug submitted.

I really hope this can be rectified quickly, as I'm on pretty tight deadlines to get the current project completed .

If not, I guess I'll have to use my work arounds for now (though this is very undesireable).

Any news/updates regarding if this is verified to be a bug, and the progress of any fixes, would be gratefully received.

Cheers everyone, for your help!
Steve
User Avatar
Member
104 posts
Joined: July 2005
Offline
So was this a bug in the end? This thread is from 2008…

I just ran into this.

I have a python node inside my locked HDA and will throw a “Error running callback” error when the HDA is locked. Soon as I unlock the HDA, the python node works as intended.

Traceback: PermissionError: Failed to modify node or parameter because of a permission error.

Using Houdini 11.0.703

Thanks!
User Avatar
Member
30 posts
Joined: July 2005
Offline
I think this can be worked around using the User Data Dictionary and python. I am reading, writing, and modifying nodes' User data within a locked hda with no problem.

-caleb
My avatar was rendered from PRISMS
User Avatar
Member
55 posts
Joined: Oct. 2011
Offline
i have already been getting this error and it seems to work when i rectify the error
User Avatar
Member
104 posts
Joined: July 2005
Offline
i have already been getting this error and it seems to work when i rectify the error

Brilliant
User Avatar
Member
7722 posts
Joined: July 2005
Offline
The bug that stevetwist submitted was fixed in H11.1
  • Quick Links