Jump to content
Sign in to follow this  
cloudfx

geometry permission error geometry is read-only

Recommended Posts

I am making a python Sop node and it does not let me write access to geo with error msg of "geometry permission error geometry is read-only"

Is this it is because NC commercial version?

or

geo = hou.node("obj/geo1/temp").geometry() is referencing read-only?

Share this post


Link to post
Share on other sites

http://www.sidefx.com/docs/houdini12.1/hom/hou/Geometry

You need to connect the node you want to modify to your pythonSOP.

See http://www.sidefx.com/docs/houdini12.1/hom/pythonsop

Yes, that is how I created python type geometry operator that I could bring it in SOP Network.

and also using below should give me write access to geo?

geo = hou.pwd().geometry()

I think I am missing something.

Share this post


Link to post
Share on other sites

Yes, that is how I created python type geometry operator that I could bring it in SOP Network.

and also using below should give me write access to geo?

geo = hou.pwd().geometry()

I think I am missing something.

geoPdef = hou.pwd().inputs()[0].geometry() is returning "read-only" type geo.

geoPdef = hou.pwd().geometry() has "write-access".

Then, how would I select different inputs and make them "write-access"able?

Share this post


Link to post
Share on other sites

Hello, cloudfx!

Did you figure out how you could access geometry from different inputs so they would be "write-access"able? I am having the same issue. Thanks!

Share this post


Link to post
Share on other sites

you can't make geometry owned by other nodes to be writeable from outside, and chances are you don't need to 

it's readable, so you can access it, read any info you want and use in the current Python SOP to modify the current geo

or if you want to, you can create a copy of that geo, modify it and pass as a current geo in Python SOP for example

node = hou.pwd()
geo2 = node.inputs()[1].geometry().freeze() # get copy of second input geo
# now geo2 contains the copy of second input geo and can be modified

# for example using sop verbs
xform = hou.sopNodeTypeCategory().nodeVerbs()['xform']
xform.setParms({'t':(0,1,0), 'r':(90,0,0)})
xform.execute(geo2, [geo2])

# then just replace the current geo with it for example
geo = node.geometry() # get current geo
geo.clear() # clear current geo
geo.merge(geo2) # merge in modified copy of second input geo

 

  • Like 1

Share this post


Link to post
Share on other sites

Thank you, Tomas!

I had the same problem when using geometry from a DOP Import in the first input of a Python node, but making a copy of the geometry worked in that case as well. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×