cloudfx Posted September 19, 2012 Share Posted September 19, 2012 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? Quote Link to comment Share on other sites More sharing options...
rdg Posted September 19, 2012 Share Posted September 19, 2012 If you ask a SOP for its geometry via hou.SopNode.geometry, you’ll get a read-only reference to it. 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 Quote Link to comment Share on other sites More sharing options...
cloudfx Posted September 19, 2012 Author Share Posted September 19, 2012 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. Quote Link to comment Share on other sites More sharing options...
cloudfx Posted September 19, 2012 Author Share Posted September 19, 2012 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? Quote Link to comment Share on other sites More sharing options...
ivr Posted June 29, 2019 Share Posted June 29, 2019 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! Quote Link to comment Share on other sites More sharing options...
anim Posted June 29, 2019 Share Posted June 29, 2019 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 1 Quote Link to comment Share on other sites More sharing options...
ivr Posted June 29, 2019 Share Posted June 29, 2019 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.