Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Maya Basics & Newbie Lounge (https://simplymaya.com/forum/forumdisplay.php?f=31)
-   -   GUI's in MEL (https://simplymaya.com/forum/showthread.php?t=28322)

wjpiovano 29-11-2007 05:06 AM

GUI's in MEL
 
Hi,

I need to develop a GUI which can manipulate objects through Maya. My main issue is that I don't want it to look like I'm just running a script in Maya; I want it to look like a stand-alone app that you can run without having any prior knowledge of Maya whatsoever. I was thinking of:

- Maya plug-in which opens a whole new maximized MEL window
- Separate GUI (C# or Java) which can call MEL commands on Maya (which is running in background)

Are either of these viable? As I said, I want someone to be able to open and use this app without having to play with Maya itself (it's a program for evolving 3D art).

And on a completely separate note, can MEL take a screenshot of the current 3D view?

Thanks.

djknucklez1 29-11-2007 11:28 AM

hmmm...
 
wow! that's very ambitious. Do you have prior experience using MEL scripting and C++ programing?

t1ck135 29-11-2007 08:39 PM

There's a few options open to you (and probably many more) if you already have programming skills or are willing to dive in at the deep end and try.

1) Hardcore way - Learn C++ and MEL (as djknucklez1 mentioned) and create a custom tool from scratch
2) Middle of the road depending on programming skills - Use a custom development toolkit that encapsulates a lot of the tedious and hard work into easy to use libraries. One I'm going to be looking at playing with real soon is wxwidgets http://www.wxwidgets.org/
I found this after looking into a cool looking re-topology program called topogun which is based on it. wxwidgets is flexible on what programming languages can be used but you'll still need to know one of them or to dive in at the deep end and start learning one.
3) Lower end but still requiring programming skills - Learn MEL/Python (depending on your version of Maya) and build a custom interface that sits within Maya. I did one of these in the summer for my flocking tool (see my sig). It uses Python and generates a new window with lots of input sections etc. It's worth grabbing a copy to see how some of the commands work and should be well commented.

If you decide to dive in then good luck
Simon

gster123 29-11-2007 09:33 PM

You could have a look into the MEL DEV kit thats bundeld with maya, it allows you to create a plug in for maya via Visual Studio and C++, theres samples and tutorials to get you going.

t1ck135 29-11-2007 09:40 PM

Hi Steve,

Hope things are good :)
hows it going with that by the way? have you managed to get a plugin going?

Si

wjpiovano 30-11-2007 01:26 AM

Hey again.

I know C++ but have just gotten started with MEL. Done a few simple GUI's and played around with commands in the references.

The app I'm going for might sound a bit more ambitious than it actually is. All I need is to execute a number of transformations on a primitive, display screenshots of that primitive, and save the transformations. Given what you've said, I think MEL is probably enough. Correct me if I'm wrong, but I could do something like this:

- Create a sphere
- Change its attributes (say move some of its vertices)
- Take a few screenshots with playblast from different angles (moving camera around)
- Keep track of the list of transformations done to the primitive
- Delete the primitive
- Draw a symbolButton which has the screenshot image on it
- Repeat process on another primitive, with different transformations

All these things I think you can do in MEL. This app will allow you to click on two of the symbolButtons (representing two different transformed primitives), and the script will take the transformations of the two selected objects and merge them into a new object.

The only question for me is, can I save the transformations done to an object, as a piece of text?


All times are GMT. The time now is 04:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018