well that was such a dumb act of me to specify height, but I wish I had
some good experience

for outliner visibility I will try what you suggested but becuase on
opening a scene the outliner existence always turns out to be be false, I
added this code
                                myOut=
cmds.outlinerPanel("mpanel",parent="panelLayout" ,init=True,needsInit=True)
                                cmds.control(myOut, edit=True,visible=True,
parent="panelLayout")
but still it is not showing up


On Thu, Dec 6, 2012 at 11:28 PM, Justin Israel <[email protected]>wrote:

> I still don't understand why you need to worry about the height value. If
> you are using a formLayout (don't specify height and width in the layout.
> It should just max out to the tab area), then it is your dock widget that
> will manage the size of the children. The outliner panel will be the max of
> its parent and the parent will fit into the dock area.
>
> self.widgets["tabLayout"]= ...
> panelLayout = cmds.formLayout("panelLayout",**parent=
> self.widgets["tabLayout"])
>
> panel = cmds.outlinerPanel()
> cmds.formLayout(panelLayout, e=True,
>                               **  attachForm=[
>                               **      (panel, "top", 0),
>                               **      (panel, "left", 0),
>                               **      (panel, "bottom", 0),
>                               **      (panel, "right", 0)
>                               **  ])
>
> You should not have to specify width/height anywhere.
>
> For the problem with the scene opening, you can watch for that event and
> ensure your outliner panel is visible, using a 
> scriptJob<http://download.autodesk.com/global/docs/maya2012/en_us/CommandsPython/scriptJob.html>.
> There is a *SceneOpened *event you can attach to a handler to watch for
> this.
>
>
> On Wednesday, December 5, 2012 9:41:59 PM UTC-8, san wrote:
>
>> and another surprise , when the new scene opens the tab switches the
>> Outliner is not their and (even though it is their when i start the
>> script), and since cmds.outlinerPanel does not have visible parameter how
>> should i make it visbile again ?
>>
>> To figure out whits hiding i tested print "Outliner Exists: %s" %
>> str(cmds.outlinerPanel("**mpanel", q=True,exists=True))
>> and found on opening a scene file it the above line is evaluating to be
>> false,
>> So to show it again...
>>
>> mpanel=cmds.outlinerPanel("**mpanel",parent="panelLayout"
>> ,init=True,needsInit=True) # didnt work
>>
>> then also tried this way:
>>                               **  mpanel= cmds.outlinerPanel()
>>                               **  cmds.control(mpanel, edit=True,
>> parent="panelLayout")
>> again it didnt work ...:-(
>>
>> what is causing the visibility to be false ?
>>
>> in the method where i switch the tab i try to show it agian using
>> outlinerWindow()
>>
>>
>> On Thu, Dec 6, 2012 at 8:38 AM, šãñ <[email protected]> wrote:
>>
>>>  this is code what i have set so far,
>>> self.widgets["window"] = cmds.window(self.winName, title = "Mini Me",
>>> widthHeight=self.widthHeight )
>>>                 self.widgets["tabLayout"]=**cmds.tabLayout('tabLayout',*
>>> *innerMarginWidth=0,scr=True,**cr=True,h=self.widthHeight[1],
>>>                               **
>>> innerMarginHeight=0)
>>>  #outliner tab
>>> panelLayout = cmds.formLayout("panelLayout",**parent="tabLayout",w=self.
>>> **widthHeight[0]-50,h=self.**widthHeight[1])
>>> panel = cmds.outlinerPanel()
>>> cmds.formLayout(panelLayout, e=True, h=self.widthHeight[1],
>>>
>>>                               **  attachForm=[
>>>                               **      (panel, "top", 0),
>>>                               **      (panel, "left", 0),
>>>                               **      (panel, "bottom", 0),
>>>                               **      (panel, "right", 0)
>>>                               **  ])
>>>
>>> the panelLayout is a child of Outliner tab,
>>>
>>>
>>>
>>> On Thu, Dec 6, 2012 at 8:01 AM, Justin Israel <[email protected]>wrote:
>>>
>>>> Which modalPanel? Why do you need an exact height? Can't you just use
>>>> the form layout to lock all the edges to the parent? Maybe I am missing
>>>> something.
>>>>
>>>>
>>>> On Wed, Dec 5, 2012 at 6:25 PM, šãñ <[email protected]> wrote:
>>>>
>>>>> thats it, how can i grab the height of modalPanel so the docked GUI
>>>>> height can be set exactly every time..
>>>>>
>>>>>
>>>>> On Thu, Dec 6, 2012 at 12:22 AM, Justin Israel <[email protected]>wrote:
>>>>>
>>>>>> You can use a formLayout instead of a columnLayout and it will
>>>>>> attached better.
>>>>>> Simple standalone example with a window:
>>>>>>
>>>>>> win = cmds.window(w=400, h=600)
>>>>>> tab = cmds.tabLayout()
>>>>>>
>>>>>> panelLayout = cmds.formLayout("Outliner")
>>>>>> panel = cmds.outlinerPanel()
>>>>>> cmds.formLayout(panelLayout, e=True,
>>>>>>                 attachForm=[
>>>>>>                     (panel, "top", 0),
>>>>>>                     (panel, "left", 0),
>>>>>>                     (panel, "bottom", 0),
>>>>>>                     (panel, "right", 0)
>>>>>>                 ])
>>>>>>
>>>>>> cmds.showWindow(win)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wednesday, December 5, 2012 12:12:36 AM UTC-8, san wrote:
>>>>>>>
>>>>>>> <https://lh4.googleusercontent.com/-aNTaeYOvYFM/UL8Bz1RBqqI/AAAAAAAADeI/YDqyeIeu_Bk/s1600/theproblemo.PNG>
>>>>>>>
>>>>>>>
>>>>>>> On Wednesday, December 5, 2012 1:41:11 PM UTC+5:30, san wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> Well,i need to update my maya project manager and told by user to
>>>>>>>> add outliner inside of it as a tab so if user opens the scene from 
>>>>>>>> project
>>>>>>>> Manager the tab switches to  the next outliner tab, i have managed to 
>>>>>>>> put
>>>>>>>> outliner inside of tab but it doesnt seem to show up full height(see 
>>>>>>>> image
>>>>>>>> above)
>>>>>>>> The tabLayout that contains all tabs:
>>>>>>>>
>>>>>>>> self.widgets["tabLayout"]=**cmds**.tabLayout('tabLayout',**innerMa*
>>>>>>>> *rginWidth=0,scr=True,h=**300,cr=**True,innerMarginHeight=**0)
>>>>>>>>
>>>>>>>>                 #outliner tab
>>>>>>>>                 self.widgets["outlinerLayout"]****
>>>>>>>> =cmds.columnLayout("**outlinerLa**yout", adj=True,
>>>>>>>> parent="tabLayout")
>>>>>>>>                 if not cmds.window("**outlinerPanel1Win**dow",
>>>>>>>> q=True, exists=True):
>>>>>>>>                         cmds.OutlinerWindow()
>>>>>>>>                 mel.eval('control -e -p '+self.widgets["**
>>>>>>>> outlinerLayout**"]+' outlinerPanel1Window;')
>>>>>>>>
>>>>>>>> I do not know what am I missing,
>>>>>>>> by the combination of cr=True & adj =True, it shows full width of
>>>>>>>> specified for dockControl, I have tried to specifying the height of
>>>>>>>> columnLayout but still it shows  up like this
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>  --
>>>>>> view archives: 
>>>>>> http://groups.google.com/**group/python_inside_maya<http://groups.google.com/group/python_inside_maya>
>>>>>> change your subscription settings: http://groups.google.com/**
>>>>>> group/python_inside_maya/**subscribe<http://groups.google.com/group/python_inside_maya/subscribe>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> **
>>>>>
>>>>> [image: San's personal blog]<http://feeds.feedburner.com/SanLuthraBlog>
>>>>>
>>>>> *
>>>>> *
>>>>>
>>>>>  --
>>>>> view archives: 
>>>>> http://groups.google.com/**group/python_inside_maya<http://groups.google.com/group/python_inside_maya>
>>>>> change your subscription settings: http://groups.google.com/**
>>>>> group/python_inside_maya/**subscribe<http://groups.google.com/group/python_inside_maya/subscribe>
>>>>>
>>>>
>>>>  --
>>>> view archives: 
>>>> http://groups.google.com/**group/python_inside_maya<http://groups.google.com/group/python_inside_maya>
>>>> change your subscription settings: http://groups.google.com/**
>>>> group/python_inside_maya/**subscribe<http://groups.google.com/group/python_inside_maya/subscribe>
>>>>
>>>
>>>
>>>
>>> --
>>> **
>>>
>>> [image: San's personal blog] <http://feeds.feedburner.com/SanLuthraBlog>
>>>
>>> *
>>> *
>>>
>>>
>>
>>
>> --
>> **
>>
>> [image: San's personal blog] <http://feeds.feedburner.com/SanLuthraBlog>
>>
>> *
>> *
>>
>>   --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>



-- 
**

[image: San's personal blog] <http://feeds.feedburner.com/SanLuthraBlog>

*
*

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to