python_states debugging

   1094   2   2
User Avatar
Member
172 posts
Joined: Jan. 2014
Offline
Hi, in the example of debugging of python states in the documentation. if you use this code below and this command hou.SceneViewer.setPromptMessage()
which is really useful, you quickly get a string (too many errors, additional errors were suppressed.) Do we have a way around???
Thanks!

class MyState(object):
def __init__(self, state_name, scene_viewer):
self.state_name = state_name
self.scene_viewer = scene_viewer

def onMouseEvent(self, kwargs):
# Display the mouse position in the status line
ui_event = kwargs["ui_event"]
device = ui_event.device()
message = "Mouse x=%d y=%d" % (device.mouseX(), device.mouseY())
self.scene_viewer.setPromptMessage(message)
I contribute to the beauty of this world
User Avatar
Member
45 posts
Joined: Feb. 2014
Offline
Calling scene_viewer.clearPromptMessage() before the call to setPromptMessage prevents the error message for me.
User Avatar
Member
172 posts
Joined: Jan. 2014
Offline
Thomas Bishop
Calling scene_viewer.clearPromptMessage() before the call to setPromptMessage prevents the error message for me.
wow, thank you!
I contribute to the beauty of this world
  • Quick Links