I am working in a HDA, and using Python Viewer States... I would like to modify (write) a primitive attribute (primnum 0 for example) with the mouse wheel. so my code is:
Gerardo Castellanos but it gives me an error: ... AttributeError: 'Polygon' object has no attribute 'setAttributeValue'
but the polygon class has that method, why it does not work?
the method is called setAttribValue()
However even with correct method call I assume you will get permission error as its not allowed to modify geometry of SOP nodes with external scripts,( only Python SOP can modify its own geo during its cook)
So you may want to consider modifying a geometry stashed in a data parm on your HDA which can be then referenced in internal Stash SOP for example