On Thu, 6 Oct 2016, 10:24 PM Mark Jackson <[email protected]> wrote:

> Hi all,
>
> I'm trying to switch some of our base toolset so that the main UI (cmds
> built) now docks correctly in the same tab as the channelBox rather than
> docking to the right side of the main Maya UI. The ChannelBox is now a
> workspaceControl so I havce to call the UI through that as below, it's a
> bit of a pain to switch the ui over but I hate the fact that the right
> dockControl space is now the entire length of the Maya UI, and outside of
> everything else.
>
> So I did the following to make the UI tab into the workspace of the
> channelBox:
>
>
>
> element=mel.eval('getUIComponentDockControl("Channel Box / Layer Editor",
> false);')
> windowcall='myUIFunc'
> cmds.workspaceControl(animUI.workspaceCnt, label="Red9_Animation",
>                                       uiScript=windowcall,
>                                       tabToControl=(element, -1),
>                                       initialWidth=355,
>                                       initialHeight=720,
>                                       retain=False,
>                                       loadImmediately=False)
>
> cmds.workspaceControl(animUI.workspaceCnt, e=True,vis=True)  # ensure we
> set visible
> cmds.workspaceControl(animUI.workspaceCnt, e=True, mw=355)  # set
> minimumWidth
> cmds.workspaceControl(animUI.workspaceCnt, e=True,  r=True)  # raise
>
> Now that all works but I'll be damned if I can find a way to control and
> lock the width of this UI. If I go to the modelling tab and then my tab the
> ui is the correct width, presumably because I set the minimumWidth flag.
>
> However, if I go to the attributeEditor tab, then mine the ui remains the
> width of the attributeEditor. There's width query flags in the
> workspaceControl, but no edit.
>
> So the question is, how the hell do you set a base width that is respected
> for these?
>

I haven't seen Maya 2017 yet so I don't know if the details of what has
changed. But I just recently needed to integrate a custom editor into the
tabbed attribute editor dock location, in 2016. I went through the Qt
route, which gave me direct communication with the Qdockwidgets and ability
to respond to events and signals. And the width is controlled via the size
hints of the docked child widget. This meant I didn't need to deal with the
limited Maya cmds wrappers.

Not sure if this info helps but thought I would share.


> cheers
>
> Mark
>
>
>
> -------------------------------------
> Mark Jackson
> CEO / Technical Director
> red9consultancy.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAGQH2FHLSBZcEEF6jdf%2BBJht-3rXGAGjBeo0hNYKcuUwuvczuQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAGQH2FHLSBZcEEF6jdf%2BBJht-3rXGAGjBeo0hNYKcuUwuvczuQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2S3oQxPPoDFkV-4eZxFq8BLLJniCS3zZ3NAviQfK1vKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to