Jump to content

geometry permission error geometry is read-only


cloudfx

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?

Link to comment
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.

Link to comment
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?

Link to comment
Share on other sites

  • 6 years later...

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
Link to comment
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. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...