python_states debugging

   1175   2   2
User Avatar
Member
198 posts
Joined: 1月 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
https://houdininotes.ivanlarinin.com/ [houdininotes.ivanlarinin.com]
User Avatar
Member
45 posts
Joined: 2月 2014
Offline
Calling scene_viewer.clearPromptMessage() before the call to setPromptMessage prevents the error message for me.
User Avatar
Member
198 posts
Joined: 1月 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
https://houdininotes.ivanlarinin.com/ [houdininotes.ivanlarinin.com]
  • Quick Links