You might be right, I am just getting used to the Pymel workflow, perhaps is
even shorter than what I have there.

Martin

On Thu, Dec 24, 2009 at 5:41 PM, Martin La Land Romero <
martinmrom...@gmail.com> wrote:

> THis is my mel script
>
> //Get the current panel.
> string $myCurrenPane = `getPanel -withFocus`;
>
> //Get the panel type.
> string $panelType = `getPanel -to $myCurrenPane`;
>
> //Condition.
> if ($panelType == "modelPanel")
> {
>
> //Querry the isolation state.
>     int $myIsolState = `isolateSelect -q -state $myCurrenPane`;
>
> //Create a condition that says, if IsolateSel is 0 set it to 1.
> if ($myIsolState == 0)
> {
>   enableIsolateSelect $myCurrenPane true;
>  }
>
>  else
>  {
>   enableIsolateSelect $myCurrenPane false;
>   }
> }
>
> I am just trying to convert this to pymel so that I can get the hang of it.
> It does exactly what I want, which is to unhide and hide it.
>
> Hope that helps clarify my point.
>
> Martin
>
>
> On Thu, Dec 24, 2009 at 5:08 PM, Chad Dombrova <chad...@gmail.com> wrote:
>
>>
>>     #Get the current panel.
>> myPanel = pm.getPanel(withFocus=True)
>>
>>
>> #Get active panel type of.
>> myPanelType = pm.getPanel(type='myPanel')
>>
>>
>> this does not query the type of the panel, it lists the panels of the
>> given type. also, i think your intention was to pass the value of the
>> variable myPanel from the previous query, but instead you passed the string
>> 'myPanel'
>>
>>
>>  --
>> http://groups.google.com/group/python_inside_maya
>>
>
>
>
> --
> Martin La Land Romero
> www.martinromerovfx.com
> martinmrom...@gmail.com
> (415)261-2172
>



-- 
Martin La Land Romero
www.martinromerovfx.com
martinmrom...@gmail.com
(415)261-2172

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to