Jump to content

Re Draw Viewport from DM_MouseHook


Recommended Posts

Hi Everybody,

 

Does anyone know of a way to force the viewport to redraw?  Even if from python?  I tried "hou.ui.triggerUpdate" but no to avail.

 

 

I've tried calling DM_VPortAgent::doRender(REgetMainRender(), view_width, view_height).  Which does call DM_SceneHook::render.

 

I've also tried REgetRender(), but nothing happens until the next time a state updates the viewer and it just renders the first frame blank, usually minus what the scene hook renders.

 

My thought is that RegetRender() is not the "current renderer" though in the grand scheme of things I really have no frame of reference for what that means.  I attempted to use REgetMainRender().createNewRenderContext() but that just crashes even though it's not null, if I remember correctly.  I also tried some more out there stuff like creating an FBO, flushing the renderer, swapping the frame etc, etc.  Usually nothing happens.

 

 

Is it possible to force a redraw from a DM_MouseHook? 

 

I just found the section in the Docs about DM_MouseHook is does seem to imply this is the correct usage, I am missing something really simple?  

Edited by MrScienceOfficer
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...