SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.


SM Forums / Maya Questions / Programming / How to modify/wrap existing Maya window?

Programming MEL Scripts, Expressions & Programming Related Topics

Join the conversation. Reply to post
 
Thread Tools
24-12-2014, 08:57 PM   #1
memory_leak
Registered User
 
Join Date: Apr 2006
Posts: 4
How to modify/wrap existing Maya window?
I am building a script to create 3d text from a file containing list of words. I have no problems to read in text file and parse it with MEL. Now what I wan't to do is to create a gui but I don't want to recreate all the work that is already done within Maya. Instead of building my own text options gui, I would like to wrap Mayas existing dialog (Options box) for createing text and just to extend it with my own option to open a text file. Maya's text dialog is created with MEL command "CreateTextOptions" which is declared as default runtime command. I don't see any script file where they declrate this piece of gui, so I am not sure if it is done with C++ or MEL. I wonder is somebody can point me to what script it is declared/defined in or give me any tip how to wrap TextOptions gui into my own window if it is possible. Recreating all options for creating text, with bevels and all the other options seems just like a bit too much work for something that simple I wish to do.

Merry x-mass and thank in advance.

ps. Yeah, I am new to MEL scripting, but I am quite experience C++/C/Java programmer.
  Reply with quote
25-12-2014, 12:37 AM   #2
Gen
Super Moderator
 
Gen's Avatar
 
Join Date: Dec 2006
Location: South FL
Posts: 3,518
After turning on "Echo all commands" in the script editor I noticed a line with

Code:
performtextCurves 1
I was able to run a

Code:
whatIs performtextCurves
on and was told its found in the Maya installation's "/scripts/others" folder.
__________________
- Genny
__________________
::|| My CG Blog ||::
::|| My Maya FAQ ||::
  Reply with quote
25-12-2014, 02:23 AM   #3
memory_leak
Registered User
 
Join Date: Apr 2006
Posts: 4
That's the way :-). Thanks for tips, it was exactly what I was looking for.

I am not used to Maya at all, I just have to make some scripts for a project I am involved with, and I have to figure out MEL on the way. I have already cooked together part of the gui to choose fonts and files, but I will now see if I can source this file you are pointing me too and just add an extra button and text field to it.

Thanks.

Last edited by memory_leak; 25-12-2014 at 02:25 AM.
  Reply with quote
31-12-2014, 01:10 AM   #4
memory_leak
Registered User
 
Join Date: Apr 2006
Posts: 4
Just as curiosa, your tip was very helpful. Still some functionality left to implement before the script is done, but GUI part is mostly implemented:



Edit:

I am finally done with my first sketch and my very first MEL script! It is not final yet, but it can be used to creat large bulk of text in a go. Here are few shots:





If somebody would like to gve it a try I would appreciate some feedback.

To give a hint it can be usefull if you are into this kind of things:

https://www.youtube.com/watch?v=Zlk_japqbs4

Last edited by memory_leak; 03-01-2015 at 06:24 AM.
  Reply with quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Separating a Polygon into pieces NishantBalgovind Maya Modeling 7 18-08-2015 12:36 PM
HELP PLEASE Dushyant Maya Technical Issues 12 25-08-2012 08:49 AM
Maya Not Loading on Virtual Machine drgraphics Maya Technical Issues 2 31-01-2010 09:33 PM
odd window problem (maya 8) Radical Edward Maya Basics & Newbie Lounge 4 06-12-2006 12:51 AM
Maya vs. 3DS, Light Wave, Rhino ino ect... THX1138 Maya Basics & Newbie Lounge 45 17-09-2003 02:09 PM