Search the Community
Showing results for tags 'setAttribValue'.
Found 1 result
Okay i've been at this for ages now. My Python skills are average maybe slightly below but in my efforts to improve i'm hitting a road block. I dont know why but i cant get the setAttribValue to work. The scene is i have about 50 points coming into my Python Geometry operator and all i'm doing is creating a new point attribute called myattr. After that i just wanna set is to something other than its default value using setAttribValue, but it doesnt matter what combination i use whether to refer to the attribute directly with quotation marks or reference it with a variable it doesnt seem to bloody work. geo = hou.pwd().geometry() fart = (1,2,1) geo.addAttrib(hou.attribType.Point, "myAttr", fart) geo.addAttrib(hou.attribType.Point, "author", 0) geo.setAttribValue("author", 5) [/CODE] Why does this not go on to set the author values to 5. Its all in the last line as without it the attributes are being generated to the points. My scene is 50 scattered points coming in thats it. I tried to do it per point with a for loop but that wasnt working either. Can someone help or give me a better example of using it and maybe using it to points in a for loop, before it drives me loopy. Doesnt help that my help browser is completly black too. Thanks Side Effects for the online Docs