[Sidefx-houdini-list] Preview Window

Andrew D Lyons tstexture at gmail.com
Fri Mar 26 15:32:23 EDT 2010


It doesn't look like you can lock the display to a target SOP. You
would have to switch the display flag in your SOPnet, home the view
(and do whatever it is you want to do), and then set the display flag
back to the original SOP. Lets say your target SOP node object was
called "node", and extending Alvaro's code above:

# Store current display SOP:
dispNode = node.parent().displayNode()

# Get the view object
persp = [view for view in pane_tab.viewports() if 'persp' in view.name()][0]

# Set the display object to your node and home
node.setDisplayFlag(True)
persp.home()

# Then later restore the display flag  to where it was:
dispNode.setDisplayFlag(True)

I guess you could set up a hou.ui.eventLoop to trigger the final
restore display flag command when the floating window disappears - but
yuck.

Finally, there's not even a hscript command to do this - so I wouldn't
hold your breath waiting for a HOM wrapper...

Cheers

On 26 March 2010 11:41, Alvaro Castaneda <varomix at gmail.com> wrote:
> *just call the right function, hehe my mistake that last line should be
>
> doPreviewPane(p)
>
> sorry
> *
> On Fri, Mar 26, 2010 at 12:39 PM, Alvaro Castaneda <varomix at gmail.com>wrote:
>
>> *hehe, Share Peter hehe
>>
>> you could try with a scene viewer
>> something like this maybe
>>
>> *
>>>
>>> *def doPreviewPane(node):*
>>> *    pane_tab =
>>> hou.ui.curDesktop().createFloatingPaneTab(hou.paneTabType.SceneViewer)*
>>> *    pane_tab.setCurrentNode(node)*
>>> *    pane_tab.setPin(True)*
>>> *    return pane_tab*
>>>
>>>
>>> *p = hou.node('/obj/platonic_object1/platonic1')*
>>>
>>> *openParmPane(p)*
>>>
>>
>> might work
>>
>> l8r
>> *
>>
>>
>> *
>> On Fri, Mar 26, 2010 at 12:20 PM, Peter Bowmar <pbowmar at gmail.com> wrote:
>>
>>> Yes!
>>>
>>> On 26 March 2010 10:11,  <Sean.Lewkiw at cis-vancouver.com> wrote:
>>> > Does anyone know of an hscript or python command that will replicate the
>>> > SOP right mouse click "Preview Window" action?
>>> >
>>> > Sean
>>> >
>>> >
>>> > --
>>> > Sean Lewkiw - Digital FX Supervisor
>>> > CIS Vancouver
>>> > 50 West 2nd Avenue
>>> > Vancouver BC V5Y 1B3
>>> > P:  (604) 874-8700
>>> >
>>> > This e-mail and any attachments are intended only for use by the
>>> > addressee(s) named herein and may contain confidential information. If
>>> you
>>> > are not the intended recipient of this e-mail, you are hereby notified
>>> any
>>> > dissemination, distribution or copying of this email and any attachments
>>> > is strictly prohibited. If you receive this email in error, please
>>> > immediately notify the sender by return email and permanently delete the
>>> > original, any copy and any printout thereof. The integrity and security
>>> of
>>> > e-mail cannot be guaranteed.
>>> >
>>> >
>>> > _______________________________________________
>>> > Sidefx-houdini-list mailing list
>>> > Sidefx-houdini-list at sidefx.com
>>> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>> >
>>> _______________________________________________
>>> Sidefx-houdini-list mailing list
>>> Sidefx-houdini-list at sidefx.com
>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>>
>>
>>
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>



-- 
=======================================
Andrew D Lyons | Digital Artist | http://www.tstex.com
=======================================



More information about the Sidefx-houdini-list mailing list