CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 09-23-2005, 03:01 AM   #1
lewissatini
Veteran
portfolio
Lewis Satini
Modeler
Academy of Art University
New York City, USA
 
Join Date: Oct 2004
Posts: 93
about making a drag and drop window with MEL Script

I need help
is there anyone know how to make a drag and drop window that I can just drag my icon to the window and save it? and save the icon for the next use. also i can delete it the icon when it's not used
 
Old 09-24-2005, 02:47 AM   #2
zhang
Veteran
 
zhang's Avatar
zhang jian
TD/Software Development
Shanghai, China
 
Join Date: Sep 2003
Posts: 64
Send a message via MSN to zhang
You should try shelfLayout.

Creating a custom shelf in your window, you can drag-and-drop shelf ison/button from/to Maya's built-in shelf, you can save or delete the icons in your window. Each icon works as a normal shelf button.
__________________
///:
Zhang Jian
zhang_mdev@163.com
zjprogramming.com
imaginecube.com
//:~

Last edited by zhang : 09-24-2005 at 07:39 AM.
 
Old 09-24-2005, 07:25 AM   #3
lewissatini
Veteran
portfolio
Lewis Satini
Modeler
Academy of Art University
New York City, USA
 
Join Date: Oct 2004
Posts: 93
it's not that what i mean
i want to be like the menu when i work will full workspace my shelf is not there, so i have to find or create a menu that i can easily access. you know what i mean
 
Old 09-24-2005, 07:34 AM   #4
Bonedaddy
Getting it together
 
Bonedaddy's Avatar
portfolio
Jason Porath
Effects Artist
Dreamworks Animation
Los Angeles, USA
 
Join Date: Aug 2002
Posts: 3,685
Quote:
Originally Posted by andylou17
it's not that what i mean
i want to be like the menu when i work will full workspace my shelf is not there, so i have to find or create a menu that i can easily access. you know what i mean


Actually, I don't know what you mean.

If I understand you correctly, at the very least, you could probably jury-rig a shelfLayout to do something like that. I'm not sure it's really possible to do the drag-and-drop thing with MEL's GUI.
__________________
BREAK
 
Old 09-24-2005, 02:21 PM   #5
lewissatini
Veteran
portfolio
Lewis Satini
Modeler
Academy of Art University
New York City, USA
 
Join Date: Oct 2004
Posts: 93
I already found the script somebody in highend 3d wrote it
 
Old 09-24-2005, 02:45 PM   #6
CaptainSam
Frequenter
 
CaptainSam's Avatar
portfolio
jo jurgens
Senior TD
Qvisten Animation
Norway
 
Join Date: Jul 2002
Posts: 245
You need to add a -dragCallback to the element youre dragging, and a -dropCallback to the layout you're dragging it to. Like this:
Code:
global proc dropCallBackExample( string $dragControl, string $dropControl, string $msg[], int $x, int $y, int $type) { print "\ndropCallBackExample\n"; print $dragControl; print "\n"; print $dropControl;print "\n"; print $msg[0];print "\n"; print $x;print "\n"; print $y;print "\n"; print $type;print "\n"; } // This proc MUST return something for drag/dropCallback to work global proc string[] dragCallBackExample(string $dragControl, int $x, int $y, int $mods) { print "\ndragCallBackExample\n"; print $dragControl; print "\n"; print $x;print "\n"; print $y;print "\n"; print $mods;print "\n"; return{"need to return something here"}; } global proc dropCallBackExampleWin() { window; gridLayout -numberOfColumns 2 -cellWidthHeight 50 50; button -dragCallback dragCallBackExample -dropCallback dropCallBackExample button1; button -dragCallback dragCallBackExample -dropCallback dropCallBackExample button2; showWindow; } }
__________________
CaptainSam
 
Old 09-24-2005, 02:45 PM   #7
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:12 PM.


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