PDA

View Full Version : modelPanel is buggy


claudiof
03-19-2009, 05:26 PM
string $window = `window`;
paneLayout aaa;
modelPanel sd;
showWindow $window;

run this code once.
than close window.and run again.
// Error: line 3: Object's name is not unique: sd.

and than run this line:
deleteUI sd;

and run code block written before :

string $window = `window`;
paneLayout aaa;
modelPanel sd;
showWindow $window;

// Error: line 3: Object's name is not unique: sd.


and than run this line:
deleteUI sd;

C!R!A!S!H!

Buexe
03-19-2009, 10:39 PM
check the docs on the deleteUI command, very useful ; )

deleteUI -panel sd;

claudiof
03-20-2009, 12:10 AM
thanks.nice trick.didnt know that.

but deleteUI $window
deletes all its children except modelPanel.it is weird.
and
deleteUI sd
doesnt gives any error.and makes maya crashed.

modelEditor seems more suitable for now.

Pyrokinesis
03-22-2009, 02:00 AM
//Mel

if ( `window -exists myUI`)
deleteUI myUI;

window -title "Window Title" -wh 310 525 -maximizeButton 0 myUI;
paneLayout;
modelPanel;

showWindow myUI;



Run this to close it:


deleteUI myUI;

claudiof
03-23-2009, 01:42 AM
ok the main problem I wanted to show is not to close and freewindow.so I have no problem howto close a window.



I mean modelPanel doesnt got free from memory.



run code like this :

if ( `window -exists myUI`)



deleteUI myUI;







window -title "Window Title" -wh 310 525 -maximizeButton 0 myUI;



$HAPPYFREEDOBJECT=`paneLayout`;



$MEMORYSCRAP=`modelPanel`;



showWindow myUI;







and delete window with :



deleteUI myUI;



and run this:

objectTypeUI $MEMORYSCRAP

// modelEditor //



than run this :

objectTypeUI $HAPPYFREEDOBJECT

// Error: line 1: Object not found: myUI|paneLayout1. //



if there is a c programmer here can see the problem.

the modeleditor didnt freed from memory.Thus closing window freed panelayout.but it forgot modeleditor to get free



thus if you run your window again and again.

your memory creates piles of instance of modelpanel .

but only one other objects (I didnt tiried all controls 1by1).





having got 8 gigs of ram doesnt mean that is not a problem for PC and not need to be fixed.

Pyrokinesis
03-28-2009, 12:58 PM
you are calling a layout without a window, what exactly are you trying to achieve by doing that? I would say that this is the source of your problems, if you are going to call a layout, use a window...

CGTalk Moderation
03-28-2009, 12:58 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.