CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 10-30-2012, 05:50 AM   #1
DEVILSAN
Earth Born>> goo.gl/mJh20
 
DEVILSAN's Avatar
portfolio
Sanjeev Kumar
MPC
India
 
Join Date: Jan 2005
Posts: 290
Red face has anyone build dockable file dialog box ?

I am wondering if some one has made a dockable file open dialog box or do I have to make it from scratch?

If I have to build it all from scratch then I'd need some pointers, I do not want the bottom File name part and file type part, I am more interested in a dropdown in which text can be entered choose a different path , and the file folder view at the bottom of it....

the optionMenuGrp lets build drop down but text is not editable, and how do I show icon images in iconTextScrollList like shown above in the file/folder browser

I would guess it is doable using PyQt but is it doable just with cmd module...?
Attached Images
File Type: png fileopener.png (22.3 KB, 68 views)

Last edited by DEVILSAN : 10-30-2012 at 05:56 AM.
 
Old 10-30-2012, 09:44 AM   #2
NaughtyNathan
HighEnd3D deserter
 
NaughtyNathan's Avatar
Naughty Nathan
Technical Artist
Sony SCEE Liverpool
Manchester, United Kingdom
 
Join Date: May 2008
Posts: 2,608
A file dialog has to be modal, and you can't have a dockable modal dialog, it just doesn't make any sense... I don't think you can do this with the standard cmd set.
 
Old 10-30-2012, 04:12 PM   #3
bk3d
Know-it-All
 
bk3d's Avatar
portfolio
brian keffer
Environment Artist
Sanzaru
fremont, USA
 
Join Date: Mar 2010
Posts: 312
Send a message via Yahoo to bk3d
Ditto. I think you can only dock window UI elements.

Taken straight from the Maya dockControl help:
Create a dockable control, also known as tool palette or utility window. Dock controls are secondary windows placed in the dock area around the central control in a main window. Dock windows can be moved inside their current area, moved into new areas and floated (e.g. undocked). Dock control consists of a title bar and the content area. The titlebar displays the dock control window title, a float button and a close button. Depending on the state of the dock control, the float and close buttons may be either disabled or not shown at all.
 
Old 10-30-2012, 05:24 PM   #4
DEVILSAN
Earth Born>> goo.gl/mJh20
 
DEVILSAN's Avatar
portfolio
Sanjeev Kumar
MPC
India
 
Join Date: Jan 2005
Posts: 290
Red face

Quote:
Originally Posted by bk3d
Ditto. I think you can only dock window UI elements.

Taken straight from the Maya dockControl help:
Create a dockable control, also known as tool palette or utility window. Dock controls are secondary windows placed in the dock area around the central control in a main window. Dock windows can be moved inside their current area, moved into new areas and floated (e.g. undocked). Dock control consists of a title bar and the content area. The titlebar displays the dock control window title, a float button and a close button. Depending on the state of the dock control, the float and close buttons may be either disabled or not shown at all.


well man, I know the basic stuff, their is no need of making something that already exist, so what I am making is going to load up when maya is launched with the current project scene loaded to select the maya file and open. its not big of a pain to click the open button to load the maya file, however its make a lot easier if u have multiple drive or a slow(fragmented) disk then this is window will be helpful as later case will slow the process of loading the file open dialog..

I have made a basic GUI, the only problem I know have it works in maya 2013 but the GUI doesnt shows up correctly in 2010...




I put the code her if anyone board smart enough to point out what I am doing wrong..

Code:
import maya.cmds as cmds import maya.mel as mel import os,sys class BaseInitializer(object): def __init__(self): self.prjDir = cmds.workspace(fn=True) #returns project directory pass class GUI(BaseInitializer): def __init__(self): BaseInitializer.__init__(self) self.widgets={} self.winName="minime" self.dock="" self.v=mel.eval('getApplicationVersionAsFloat') if self.v>= 2011: self.dock=True else: self.dock=False self.createUI(self.winName,self.dock) def createUI(self,winName,dock): """ Creates dockable GUI if maya version above 2011 else creates flying window """ if self.dock: if cmds.dockControl(self.winName,exists=True): print "dock exist", self.winName cmds.deleteUI(self.winName) else: if cmds.window(self.winName, exists=True): cmds.deleteUI(self.winName) print "WindowName: ", self.winName print "state of dock: ", dock self.widgets["window"] = cmds.window(self.winName, title = "Mini Me", width = 300, height = 350) #create main layout self.widgets["mainLayout"]=cmds.columnLayout("mainLayout") self.widgets["rowColumnLayout"]= cmds.rowColumnLayout('rowColumnLayout',nc=3, cw=[(1,50),(2,185),(3,30)],columnOffset=[(1,"both",5),(2,"both",5)]) #adding controls self.widgets["lookinLabel"]=cmds.text('lookinLabel',label="Look in") self.widgets["location"]=cmds.textField('location',tx=self.prjDir,h=20) self.widgets["browsBtn"]=cmds.iconTextButton('browsBtn',image1='fileOpen.x pm') self.widgets["fileLayout"]=cmds.rowColumnLayout('fileLayout', h=250,nc=1, parent='mainLayout',columnOffset=(1,"both",5)) self.widgets["fileLister"]=cmds.iconTextScrollList('fileLister',h=250, allowMultiSelection=False,append=('one', 'two', 'three' ) ) #layout for buttons self.widgets['btnLayout']=cmds.rowColumnLayout('btnLayout',nc=2,parent='mai nLayout', cw=[(1,130),(2,130)],columnOffset=[(1,"both",6),(2,"both",5)]) self.widgets["setPrjBtn"]=cmds.button('setPrjBtn',label='Set Project') self.widgets["openBtn"]=cmds.button('openBtn',label='Open Selected') #Show the window if self.dock: cmds.dockControl(self.winName, label="Mini Me", area="left",allowedArea="left", content=self.widgets["window"]) else: cmds.showWindow(self.widgets["window"]) pass class Actions(): def __init__(self): pass


I gave it a name of minime since its a small tool with minimal functionality..
I greatly appreciate your input...
Attached Images
File Type: png minime.PNG (6.9 KB, 56 views)
File Type: png minime2010.PNG (10.0 KB, 54 views)
 
Old 11-04-2012, 06:27 PM   #5
DEVILSAN
Earth Born>> goo.gl/mJh20
 
DEVILSAN's Avatar
portfolio
Sanjeev Kumar
MPC
India
 
Join Date: Jan 2005
Posts: 290
well I implemented my own version of something that I wanted, not exactly the functionality of dialog box alot simpler as file explorer but some added feature for maya artist..



I am not an experienced programmer but I guess I can build logic, http://goo.gl/lXrEK building an explorer functionality was pretty easy.
 
Old 11-04-2012, 09:59 PM   #6
PozestStar
Your Majesty
portfolio
Melissa Starks
Cloth Sim Queen! Kinda...
Starving Artist ><
USA
 
Join Date: May 2007
Posts: 185
Send a message via AIM to PozestStar
Wow, this looks really interesting

Did you ever figure out how to fix that issue with the window not appearing correctly in 2010? If so, I'd like to know how you did it.
 
Old 11-05-2012, 05:41 AM   #7
DEVILSAN
Earth Born>> goo.gl/mJh20
 
DEVILSAN's Avatar
portfolio
Sanjeev Kumar
MPC
India
 
Join Date: Jan 2005
Posts: 290
no, while I was working on it developed another snag that restricts this app to run on 2010, and moreover if its not dockable then whats it will open up like modal dialog box, other than the features I have added it would just be a sacrifice not to be ablt to use in 2010 but hey its a python script and if u r or anyone one on 2010 is a geek to understand the logic can build one for 2010 give me credits of primary author.. he he
 
Old 11-05-2012, 05:41 AM   #8
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 12:29 PM.


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