Default state for attribpaint inside HDA

   2316   3   1
User Avatar
Member
39 posts
Joined: Dec. 2013
Offline
Hi all,
I wanted to set up an hda with a attrib paint inside and have the default state be the brush paint tool. I imported the block into the hda and set "sidefx_attribpaint" as the "default state" in the HDA but I get a python error back:

Traceback (most recent call last):
File "/mnt/apps/houdini-19.0/houdini/python3.7libs/viewerstate/utils.py", line 1022, in wrapper
return func(*args,**kwargs)
File "/mnt/apps/houdini-19.0/houdini/python3.7libs/viewerstate/interface.py", line 158, in onMouseEvent
return state.onMouseEvent(kwargs)
File "/mnt/apps/houdini-19.0/houdini/viewer_states/sidefx_stroke.py", line 730, in onMouseEvent
self.onPreMouseEvent(node, ui_event, captured_parms)
File "Sop/attribpaint, ViewerStateModule", line 365, in onPreMouseEvent
File "Sop/attribpaint, ViewerStateModule", line 689, in updateCursorShape
AttributeError: 'NoneType' object has no attribute 'eval'


Houdini 19.0.657 Python 3 on linux.
Bug or me?
Thanks
Anthony Morrelle
Hired Gun
User Avatar
Member
313 posts
Joined: Oct. 2016
Offline
Hi, I tried this but it seem very problematic in several ways. Trying to use attribpaint in a subnet or HDA and doing some UI things seems like a minefield. I don't know what to think of this.

Edit: If I had to do this myself it might work if one allow the artist to dive into the subnet/HDA. A button on the subnet/HDA that selects the attribute paint node inside is a work around.

Edit2: While doing the work around I got this (H19.5):

Traceback (most recent call last):
  File "/opt/hfs19.5.403/houdini/python3.9libs/viewerstate/utils.py", line 999, in wrapper
    return func(*args,**kwargs)
  File "/opt/hfs19.5.403/houdini/python3.9libs/viewerstate/interface.py", line 202, in onMouseEvent
    return state.onMouseEvent(kwargs["args"])
  File "/opt/hfs19.5.403/houdini/viewer_states/sidefx_stroke.py", line 773, in onMouseEvent
    self.cursor.scene_viewer.beginStateUndo('Draw Stroke')
  File "/opt/hfs19.5.403/houdini/python3.9libs/hou.py", line 76134, in beginStateUndo
    return _hou.SceneViewer_beginStateUndo(self, label)
hou.OperationFailed: The attempted operation failed.
beginStateUndo error: Undo is suspended.

Comment: It is a bit wierd, because the work around did function for a while. Then when I'm trying to record it, this message appears.
Edited by SWest - Nov. 16, 2022 08:23:28
Interested in character concepts, modeling, rigging, and animation. Related tool dev with Py and VEX.
User Avatar
Member
39 posts
Joined: Dec. 2013
Offline
Interesting. Well for now I've just left it outside the HDA.
thanks!
Anthony Morrelle
Hired Gun
User Avatar
Member
19 posts
Joined: May 2018
Offline
I get similar python error when trying to have attribute paint inside a HDA with the Jeff Lait method. Seems like it does not with houdini 18.5 and onwards. Can someone from sideFX please look into this and let us know? @mabelzile

Error:
File "Sop/attribpaint, ViewerStateModule", line 358, in onPreMouseEvent
File "Sop/attribpaint, ViewerStateModule", line 681, in updateCursorShape
AttributeError: 'NoneType' object has no attribute 'eval'

ERROR
Traceback (most recent call last):
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\utils.py", line 1029, in wrapper
return func(*args,**kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\interface.py", line 215, in onDraw
state.onDraw(kwargs)
File "Sop/attribpaint, ViewerStateModule", line 355, in onDraw
AttributeError: 'NoneType' object has no attribute 'draw'

ERROR
Traceback (most recent call last):
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\utils.py", line 1029, in wrapper
return func(*args,**kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\interface.py", line 158, in onMouseEvent
return state.onMouseEvent(kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/viewer_states\sidefx_stroke.py", line 710, in onMouseEvent
self.onPreMouseEvent(node, ui_event, captured_parms)
File "Sop/attribpaint, ViewerStateModule", line 358, in onPreMouseEvent
File "Sop/attribpaint, ViewerStateModule", line 681, in updateCursorShape
AttributeError: 'NoneType' object has no attribute 'eval'

ERROR
Traceback (most recent call last):
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\utils.py", line 1029, in wrapper
return func(*args,**kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\interface.py", line 215, in onDraw
state.onDraw(kwargs)
File "Sop/attribpaint, ViewerStateModule", line 355, in onDraw
AttributeError: 'NoneType' object has no attribute 'draw'

ERROR
Traceback (most recent call last):
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\utils.py", line 1029, in wrapper
return func(*args,**kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\interface.py", line 158, in onMouseEvent
return state.onMouseEvent(kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/viewer_states\sidefx_stroke.py", line 710, in onMouseEvent
self.onPreMouseEvent(node, ui_event, captured_parms)
File "Sop/attribpaint, ViewerStateModule", line 358, in onPreMouseEvent
File "Sop/attribpaint, ViewerStateModule", line 681, in updateCursorShape
AttributeError: 'NoneType' object has no attribute 'eval'

ERROR
Traceback (most recent call last):
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\utils.py", line 1029, in wrapper
return func(*args,**kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\interface.py", line 215, in onDraw
state.onDraw(kwargs)
File "Sop/attribpaint, ViewerStateModule", line 355, in onDraw
AttributeError: 'NoneType' object has no attribute 'draw'

ERROR
Traceback (most recent call last):
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\utils.py", line 1029, in wrapper
return func(*args,**kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\interface.py", line 158, in onMouseEvent
return state.onMouseEvent(kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/viewer_states\sidefx_stroke.py", line 710, in onMouseEvent
self.onPreMouseEvent(node, ui_event, captured_parms)
File "Sop/attribpaint, ViewerStateModule", line 358, in onPreMouseEvent
File "Sop/attribpaint, ViewerStateModule", line 681, in updateCursorShape
AttributeError: 'NoneType' object has no attribute 'eval'

ERROR
Traceback (most recent call last):
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\utils.py", line 1029, in wrapper
return func(*args,**kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\interface.py", line 215, in onDraw
state.onDraw(kwargs)
File "Sop/attribpaint, ViewerStateModule", line 355, in onDraw
AttributeError: 'NoneType' object has no attribute 'draw'

ERROR
Traceback (most recent call last):
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\utils.py", line 1029, in wrapper
return func(*args,**kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\interface.py", line 158, in onMouseEvent
return state.onMouseEvent(kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/viewer_states\sidefx_stroke.py", line 710, in onMouseEvent
self.onPreMouseEvent(node, ui_event, captured_parms)
File "Sop/attribpaint, ViewerStateModule", line 358, in onPreMouseEvent
File "Sop/attribpaint, ViewerStateModule", line 681, in updateCursorShape
AttributeError: 'NoneType' object has no attribute 'eval'

ERROR
Traceback (most recent call last):
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\utils.py", line 1029, in wrapper
return func(*args,**kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\interface.py", line 215, in onDraw
state.onDraw(kwargs)
File "Sop/attribpaint, ViewerStateModule", line 355, in onDraw
AttributeError: 'NoneType' object has no attribute 'draw'

ERROR
Traceback (most recent call last):
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\utils.py", line 1029, in wrapper
return func(*args,**kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\interface.py", line 158, in onMouseEvent
return state.onMouseEvent(kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/viewer_states\sidefx_stroke.py", line 710, in onMouseEvent
self.onPreMouseEvent(node, ui_event, captured_parms)
File "Sop/attribpaint, ViewerStateModule", line 358, in onPreMouseEvent
File "Sop/attribpaint, ViewerStateModule", line 681, in updateCursorShape
AttributeError: 'NoneType' object has no attribute 'eval'

ERROR
Traceback (most recent call last):
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\utils.py", line 1029, in wrapper
return func(*args,**kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\interface.py", line 215, in onDraw
state.onDraw(kwargs)
File "Sop/attribpaint, ViewerStateModule", line 355, in onDraw
AttributeError: 'NoneType' object has no attribute 'draw'

ERROR
Traceback (most recent call last):
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\utils.py", line 1029, in wrapper
return func(*args,**kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\interface.py", line 158, in onMouseEvent
return state.onMouseEvent(kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/viewer_states\sidefx_stroke.py", line 710, in onMouseEvent
self.onPreMouseEvent(node, ui_event, captured_parms)
File "Sop/attribpaint, ViewerStateModule", line 358, in onPreMouseEvent
File "Sop/attribpaint, ViewerStateModule", line 681, in updateCursorShape
AttributeError: 'NoneType' object has no attribute 'eval'

ERROR
Traceback (most recent call last):
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\utils.py", line 1029, in wrapper
return func(*args,**kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\interface.py", line 215, in onDraw
state.onDraw(kwargs)
File "Sop/attribpaint, ViewerStateModule", line 355, in onDraw
AttributeError: 'NoneType' object has no attribute 'draw'

ERROR
Traceback (most recent call last):
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\utils.py", line 1029, in wrapper
return func(*args,**kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\interface.py", line 158, in onMouseEvent
return state.onMouseEvent(kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/viewer_states\sidefx_stroke.py", line 710, in onMouseEvent
self.onPreMouseEvent(node, ui_event, captured_parms)
File "Sop/attribpaint, ViewerStateModule", line 358, in onPreMouseEvent
File "Sop/attribpaint, ViewerStateModule", line 681, in updateCursorShape
AttributeError: 'NoneType' object has no attribute 'eval'

ERROR
Traceback (most recent call last):
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\utils.py", line 1029, in wrapper
return func(*args,**kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\interface.py", line 215, in onDraw
state.onDraw(kwargs)
File "Sop/attribpaint, ViewerStateModule", line 355, in onDraw
AttributeError: 'NoneType' object has no attribute 'draw'

ERROR
Traceback (most recent call last):
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\utils.py", line 1029, in wrapper
return func(*args,**kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\interface.py", line 158, in onMouseEvent
return state.onMouseEvent(kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/viewer_states\sidefx_stroke.py", line 710, in onMouseEvent
self.onPreMouseEvent(node, ui_event, captured_parms)
File "Sop/attribpaint, ViewerStateModule", line 358, in onPreMouseEvent
File "Sop/attribpaint, ViewerStateModule", line 681, in updateCursorShape
AttributeError: 'NoneType' object has no attribute 'eval'

ERROR
Traceback (most recent call last):
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\utils.py", line 1029, in wrapper
return func(*args,**kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\interface.py", line 215, in onDraw
state.onDraw(kwargs)
File "Sop/attribpaint, ViewerStateModule", line 355, in onDraw
AttributeError: 'NoneType' object has no attribute 'draw'

ERROR
Traceback (most recent call last):
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\utils.py", line 1029, in wrapper
return func(*args,**kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\interface.py", line 158, in onMouseEvent
return state.onMouseEvent(kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/viewer_states\sidefx_stroke.py", line 710, in onMouseEvent
self.onPreMouseEvent(node, ui_event, captured_parms)
File "Sop/attribpaint, ViewerStateModule", line 358, in onPreMouseEvent
File "Sop/attribpaint, ViewerStateModule", line 681, in updateCursorShape
AttributeError: 'NoneType' object has no attribute 'eval'

ERROR
Traceback (most recent call last):
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\utils.py", line 1029, in wrapper
return func(*args,**kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\interface.py", line 194, in onInterrupt
state.onInterrupt(kwargs)
File "Sop/attribpaint, ViewerStateModule", line 343, in onInterrupt
AttributeError: 'NoneType' object has no attribute 'show'

ERROR
Traceback (most recent call last):
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\utils.py", line 1029, in wrapper
return func(*args,**kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\viewerstate\interface.py", line 215, in onDraw
state.onDraw(kwargs)
File "Sop/attribpaint, ViewerStateModule", line 355, in onDraw
AttributeError: 'NoneType' object has no attribute 'draw'
Edited by dude707lol - Jan. 30, 2023 10:18:56
  • Quick Links