hitch Posted April 11, 2019 Share Posted April 11, 2019 Hi I am creating a HDA and I want to set the values of a detail attribute (an array) on an attribute create node. I am trying to do this in the python module of the HDA. In sop level, in a python node I can set an array fine, but in the python module of the HDA it errors. GeometryPermissionError: Geometry is read-only. I feel i am just missing something really simple, but can't get my head around it. I can find heaps of threads about this relating to the python sop, but not much for the python module window. I would be fine to do it all from the python sop, but I am pulling in the array from the interwebs and I want to try to chuck the HDA in unreal/unity. Any help would be greatly appreciated. def mybutton(kwargs): node = kwargs['node'] #works fine node.node("line").parm("points").set(5) testlist = [1,2,3,4,5] #works fine reading the empty array created in the below node anarray = node.node("attribcreate1").geometry().findGlobalAttrib("myArray") print(anarray) #throws read only error node.node("attribcreate1").geometry().setGlobalAttribValue("myArray", testlist) Quote Link to comment Share on other sites More sharing options...
zeemzoet Posted June 20, 2020 Share Posted June 20, 2020 Hi! Did you ever found a solution for this? I'm having a similiar problem... Thanks! Quote Link to comment Share on other sites More sharing options...
anim Posted June 20, 2020 Share Posted June 20, 2020 (edited) if you don't want to have Python SOP pulling the information every time it cooks you can have a callback scrip on the button that will for example store the geometry in Data Parameter on the HDA that can be referencing Stash SOP's data parameter for example https://www.sidefx.com/forum/topic/74110/#post-313189 Edited June 20, 2020 by anim 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.