CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 07-11-2013, 06:35 AM   #1
Hamburger
Expert
portfolio
Where is it?
Architectural Viz
Australia
 
Join Date: Sep 2004
Posts: 2,014
Unhappy flushing iconTextButton

Hi there, I built an asset browser which each asset has a PNG associated with the file.

I'm using iconTextButton to display these assets/PNG in a grid format.

Whenever I open the UI containing all the assets, Maya.exe's memory usage goes up 1gb.

That's as expected.

The problem is each time I open the UI (MEL command, modelBank), Maya's memory usage goes up another 1gb...repeat this command a couple of times and obviously, it begins to be not a good idea. Sp it's incrementally building.

What are some ways I can flush the memory when closing the UI?

Or better yet get Maya to remember that it's trying to load something that is already in it's memory.
 
Old 07-11-2013, 12:11 PM   #2
zeroeffect
Code Junkie
portfolio
Chris Zurbrigg
Software Developer
Independent
Canada
 
Join Date: Jul 2005
Posts: 220
Each time you create the UI does your code call:
Code:
if (`window -exists $windowName`) deleteUI $windowName;

If so, try only creating the UI once and then just hide/show it after that (test if it exists first). This way Maya doesn't always have to rebuild it.

-ChrisZ
 
Old 07-12-2013, 01:20 AM   #3
Hamburger
Expert
portfolio
Where is it?
Architectural Viz
Australia
 
Join Date: Sep 2004
Posts: 2,014
Good point, but once deleteUI is removed and I try to launch the showWindow command again then I just get;

line 141: Object's name 'modelBank' is not unique. //

Most of the MEL stuff I see just recommended to deletUI when you get this error is what I've obviously been doing.

Do you (or anyone else reading) know of a way to tell Maya to use the same object name?
 
Old 07-12-2013, 02:49 AM   #4
Hamburger
Expert
portfolio
Where is it?
Architectural Viz
Australia
 
Join Date: Sep 2004
Posts: 2,014
Okay, got that working now, but the individual iconTextButton won't update obviously after the icon has changed on the hdd.

Anyone know of a way to tell maya to update iconTextButton without redrawing the whole UI?
 
Old 07-12-2013, 09:11 AM   #5
DeadlyNightshade
Plz...
 
DeadlyNightshade's Avatar
portfolio
Martin Dahlin
Jr. Technical Artist
King
Stockholm, Sweden
 
Join Date: Jul 2012
Posts: 898
Quote:
Originally Posted by Hamburger
Okay, got that working now, but the individual iconTextButton won't update obviously after the icon has changed on the hdd.

Anyone know of a way to tell maya to update iconTextButton without redrawing the whole UI?

Afaik you can't, you have to rebuild the UI - at least the part that is holding the iconTextButton.

But maybe there is some way to do this with Maya API
__________________
Nightshade UV Editor (script for Maya) - Extends Maya's default UV Texture Editor with additional tools.
 
Old 07-12-2013, 09:11 AM   #6
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 11:37 AM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.