Objects as Strings (mel) ?

64 views
Skip to first unread message

Christopher.

unread,
Jun 12, 2015, 12:34:36 PM6/12/15
to python_in...@googlegroups.com
Do you not make objects as strings in MEL ? For example;

string $one = "pSphere1";
string $two = "pCube1";

Or just alone var as such; $one = "pSphere1";


Marcus Ottosson

unread,
Jun 12, 2015, 12:51:53 PM6/12/15
to python_in...@googlegroups.com

I’d suggest you have a glance at this book, it covers both basics and advanced use of MEL, and is a good introduction to programming with Maya overall.


--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/47c38324-8ffc-4719-a06a-d0bcdbfbdf58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Marcus Ottosson
konstr...@gmail.com

Marcus Ottosson

unread,
Jun 12, 2015, 12:53:21 PM6/12/15
to python_in...@googlegroups.com
The american site seems to have more favourable reviews.

--
Marcus Ottosson
konstr...@gmail.com

Christopher.

unread,
Jun 12, 2015, 9:21:06 PM6/12/15
to python_in...@googlegroups.com
I have documentation on MEL.  Did you read this book ? The book comes across as though you are calling me stupid ? ;-) A ten plus year old book still costs almost $60, and the kindle is the same.  I suppose I should know a little C++ if I get this book.

In the meantime, instead of me waiting to buy a book, if I buy the book, someone willing to give me a clue on what I'm doing wrong, yes I may ask novice questions, I do appreciate the help.


On Friday, June 12, 2015 at 12:53:21 PM UTC-4, Marcus Ottosson wrote:
The american site seems to have more favourable reviews.

On 12 June 2015 at 17:51, Marcus Ottosson <konstr...@gmail.com> wrote:

I’d suggest you have a glance at this book, it covers both basics and advanced use of MEL, and is a good introduction to programming with Maya overall.

On 12 June 2015 at 17:34, Christopher. <crestchr...@gmail.com> wrote:
Do you not make objects as strings in MEL ? For example;

string $one = "pSphere1";
string $two = "pCube1";

Or just alone var as such; $one = "pSphere1";


--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.



--
Marcus Ottosson
konstr...@gmail.com




--
Marcus Ottosson
konstr...@gmail.com

Justin Israel

unread,
Jun 12, 2015, 9:26:29 PM6/12/15
to python_in...@googlegroups.com


On Sat, 13 Jun 2015 1:21 PM Christopher. <crestchr...@gmail.com> wrote:

I have documentation on MEL.  Did you read this book ? The book comes across as though you are calling me stupid ? ;-) A ten plus year old book still costs almost $60, and the kindle is the same.  I suppose I should know a little C++ if I get this book.

I highly doubt Marcus was trying to insult your intelligence by suggesting a book. He is one of the most helpful members of this group.

The intent, as I saw it, was to offer you ways to improve your foundation in programming. We are all happy to help with questions, but we can't always teach from scratch when there are tons of resources to get a baseline in Mel or python. But if you ask very clear detailed questions, you will get clear and detailed answers (hopefully)


In the meantime, instead of me waiting to buy a book, if I buy the book, someone willing to give me a clue on what I'm doing wrong, yes I may ask novice questions, I do appreciate the help.

On Friday, June 12, 2015 at 12:53:21 PM UTC-4, Marcus Ottosson wrote:

The american site seems to have more favourable reviews.

http://amzn.com/1558608354


On 12 June 2015 at 17:51, Marcus Ottosson <konstr...@gmail.com> wrote:


I’d suggest you have a glance at this book, it covers both basics and advanced use of MEL, and is a good introduction to programming with Maya overall.

http://www.amazon.co.uk/Complete-Maya-Programming-Extensive-Kaufmann/dp/1558608354




On 12 June 2015 at 17:34, Christopher. <crestchr...@gmail.com> wrote:

Do you not make objects as strings in MEL ? For example;

string $one = "pSphere1";

string $two = "pCube1";

Or just alone var as such; $one = "pSphere1";

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.

To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.



--

Marcus Ottosson
konstr...@gmail.com



--

Marcus Ottosson
konstr...@gmail.com

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.

To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/8653eb54-3b48-46a7-83c9-527c8c67385c%40googlegroups.com.

Crest Christopher

unread,
Jun 12, 2015, 11:33:27 PM6/12/15
to python_in...@googlegroups.com
It's that, I have a few MEL ebook style documents, they appear informative, although I haven't read them cover to cover, what may the book have that these documents don't have, besides a price tag.

Justin Israel wrote:


On Sat, 13 Jun 2015 1:21 PM Christopher. <crestchr...@gmail.com
<mailto:crestchr...@gmail.com>> wrote:

    I have documentation on MEL.  Did you read this book ? The book
    comes across as though you are calling me stupid ? ;-) A ten plus
    year old book still costs almost $60, and the kindle is the same.
    I suppose I should know a little C++ if I get this book.

I highly doubt Marcus was trying to insult your intelligence by
suggesting a book. He is one of the most helpful members of this gro up.

The intent, as I saw it, was to offer you ways to improve your
foundation in programming. We are all happy to help with questions,
but we can't always teach from scratch when there are tons of
resources to get a baseline in Mel or python. But if you ask very
clear detailed questions, you will get clear and detailed answers
(hopefully)


    In the meantime, instead of me waiting to buy a book, if I buy the
    book, someone willing to give me a clue on what I'm doing wrong,
    yes I may ask novice questions, I do appreciate the help.

    On Friday, June 12, 2015 at 12:53:21 PM UTC-4, Marcus Ottosson wrote:

        The american site seems to have more favourable reviews.

        - http://amzn.com/1558608354


        O n 12 June 2015 at 17:51, Marcus Ottosson <konstr...@gmail.com

        <mailto:konstr...@gmail.com>> wrote:


            I’d suggest you have a glance at this book, it covers both
            basics and advanced use of MEL, and is a good introduction
            to programming with Maya overall.

            http://www.amazon.co.uk/Complete-Maya-Programming-Extensive-Kaufmann/dp/1558608354


            ​



            On 12 June 2015 at 17:34, Christopher.
            <crestchr... @gmail.com <mailto:crestchr...@gmail.com>> wrote:

                Do you not make objects as strings in MEL ? For example;

                string $one = "pSphere1";

                string $two = "pCube1";

                Or just alone var as such; $one = "pSphere1";

                --
                You received this message because you are subscribed
                to the Google Groups "Python Pr ogramming for Autodesk

                Maya" group.
                To unsubscribe from this group and stop receiving
                emails from it, send an email to
                python_inside_m...@googlegroups.com
                <mailto:python_inside_maya%2Bunsu...@googlegroups.com>.

                To view this discussion on the web visit
                https://groups.google.com/d/msgid/python_inside_may a/47c38324-8ffc-4719-a06a-d0bcdbfbdf58%40googlegroups.com

                For more options, visit
                https://groups.google.com/d/optout.



            --

            *Marcus Ottosson*
            konstr...@gmail.com <mailto:konstr...@gmail.com>



        --

        *M arcus Ottosson*
        konstr...@gmail.com <mailto:konstr...@gmail.com>



    --
    You received this message because you are subscribed to the Google
    Groups "Python Programming for Autodesk Maya" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to python_inside_m...@googlegroups.com

    To view this discussion on the web visit
Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/python_inside_maya/Ns8YMlWFwyk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
python_inside_m...@googlegroups.com
<mailto:python_inside_m...@googlegroups.com>.

To view this discussion on the web visit

Justin Israel

unread,
Jun 12, 2015, 11:44:32 PM6/12/15
to python_in...@googlegroups.com

Really, there is no reason to learn and study MEL. Just do python training.


To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/557BA48A.4090608%40gmail.com.

Crest Christopher

unread,
Jun 13, 2015, 12:21:17 AM6/13/15
to python_in...@googlegroups.com
I know, I've been told this, then on the other hand, I've been told, learn both.  It's a tug-of-war !

Friday, June 12, 2015 11:44 PM

Really, there is no reason to learn and study MEL. Just do python training.


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/Ns8YMlWFwyk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0hoRf0HHwQWiPBYGf6uVZEGvPxsVSn1VSmGhR76%2B0%2B4g%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.
Friday, June 12, 2015 9:26 PM


On Sat, 13 Jun 2015 1:21 PM Christopher. <crestchr...@gmail.com> wrote:

I have documentation on MEL.  Did you read this book ? The book comes across as though you are calling me stupid ? ;-) A ten plus year old book still costs almost $60, and the kindle is the same.  I suppose I should know a little C++ if I get this book.

I highly doubt Marcus was trying to insult your intelligence by suggesting a book. He is one of the most helpful members of this group.

The intent, as I saw it, was to offer you ways to improve your foundation in programming. We are all happy to help with questions, but we can't always teach from scratch when there are tons of resources to get a baseline in Mel or python. But if you ask very clear detailed questions, you will get clear and detailed answers (hopefully)


In the meantime, instead of me waiting to buy a book, if I buy the book, someone willing to give me a clue on what I'm doing wrong, yes I may ask novice questions, I do appreciate the help.

On Friday, June 12, 2015 at 12:53:21 PM UTC-4, Marcus Ottosson wrote:

The american site seems to have more favourable reviews.

http://amzn.com/1558608354


On 12 June 2015 at 17:51, Marcus Ottosson <konstr...@gmail.com> wrote:


I’d suggest you have a glance at this book, it covers both basics and advanced use of MEL, and is a good introduction to programming with Maya overall.

http://www.amazon.co.uk/Complete-Maya-Programming-Extensive-Kaufmann/dp/1558608354




On 12 June 2015 at 17:34, Christopher. <crestchr...@gmail.com> wrote:

Do you not make objects as strings in MEL ? For example;

string $one = "pSphere1";

string $two = "pCube1";

Or just alone var as such; $one = "pSphere1";

--

You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.



--

Marcus Ottosson
konstr...@gmail.com



--

Marcus Ottosson
konstr...@gmail.com


--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.

To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/Ns8YMlWFwyk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1QvFq_Y2VAKyqXWjiOaczfZ%2Bbq55L9YWgyRmiQtzDE6Q%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.
Friday, June 12, 2015 9:21 PM
I have documentation on MEL.  Did you read this book ? The book comes across as though you are calling me stupid ? ;-) A ten plus year old book still costs almost $60, and the kindle is the same.  I suppose I should know a little C++ if I get this book.

In the meantime, instead of me waiting to buy a book, if I buy the book, someone willing to give me a clue on what I'm doing wrong, yes I may ask novice questions, I do appreciate the help.


On Friday, June 12, 2015 at 12:53:21 PM UTC-4, Marcus Ottosson wrote:
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/Ns8YMlWFwyk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/8653eb54-3b48-46a7-83c9-527c8c67385c%40googlegroups.com.

Justin Israel

unread,
Jun 13, 2015, 5:38:32 AM6/13/15
to python_in...@googlegroups.com


On Sat, 13 Jun 2015 4:21 PM Crest Christopher <crestchr...@gmail.com> wrote:

I know, I've been told this, then on the other hand, I've been told, learn both.  It's a tug-of-war !

MEL isn't useful outside of Maya. You can use Python beyond just the Maya platform. And if for some reason Maya's python commands API really isn't fast enough for a given problem, then you can move to a C++ plugin. 

<img src="https://mail.google.com/mail/?ui=2&ik=a7eb1b7682&attid=0.1.1&th=14deb2678fd6616f&view=fimg&rm=14deb2678fd6616f&sz=w1600-h1000&attbid=ANGjdJ_LUgFom3LQVbdV3uti_asHljmHPjtKf0f0KRxilYjbHWAH6Ul3xUZPOZsqjPpkAi7TXxYjO4IlWl_Kmp9M9OZFHZMrpSAAqOjPHWO_9gmQCrXrEFPH0DZraaE&disp=emb&zw">

Justin Israel

Friday, June 12, 2015 11:44 PM


Really, there is no reason to learn and study MEL. Just do python training.


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/Ns8YMlWFwyk/unsubscribe.


To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0hoRf0HHwQWiPBYGf6uVZEGvPxsVSn1VSmGhR76%2B0%2B4g%40mail.gmail.com.



For more options, visit https://groups.google.com/d/optout.


<img src="https://mail.google.com/mail/?ui=2&ik=a7eb1b7682&attid=0.1.1&th=14deb2678fd6616f&view=fimg&rm=14deb2678fd6616f&sz=w1600-h1000&attbid=ANGjdJ8hZc16CyWlKxU5g-hTtnBOLjv-bkcceQ1pf0AanMmXPbstGaazevPmLlz9Bo-7eZUhrOiTLXvbdbVNWk0vvS0XYAOEzuRmXFJOo1I_f8POfiOY3c9geiZEvRM&disp=emb&zw">

<img src="https://mail.google.com/mail/?ui=2&ik=a7eb1b7682&attid=0.1.2&th=14deb2678fd6616f&view=fimg&rm=14deb2678fd6616f&sz=w1600-h1000&attbid=ANGjdJ82f9wWyO9SkLf_BYT9nUQAetj91kN3irCTPpclmaU7ji85Wvw37-pUpFaxD4KG9tE1lWQ17QdhD3z3M0-MFZcKgzz5RM-Gl8kf9rN-xJsnoJIBCzF9pS6Gcok&disp=emb&zw">

Christopher.

Friday, June 12, 2015 9:21 PM


I have documentation on MEL.  Did you read this book ? The book comes across as though you are calling me stupid ? ;-) A ten plus year old book still costs almost $60, and the kindle is the same.  I suppose I should know a little C++ if I get this book.


In the meantime, instead of me waiting to buy a book, if I buy the book, someone willing to give me a clue on what I'm doing wrong, yes I may ask novice questions, I do appreciate the help.

On Friday, June 12, 2015 at 12:53:21 PM UTC-4, Marcus Ottosson wrote:


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/Ns8YMlWFwyk/unsubscribe.


To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/8653eb54-3b48-46a7-83c9-527c8c67385c%40googlegroups.com.



For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/557BAFBF.1070608%40gmail.com.

Crest Christopher

unread,
Jun 13, 2015, 8:09:31 AM6/13/15
to python_in...@googlegroups.com
I completely understand what you mean Justin and it's sound advice.  ;-)

If I want to debug or create thing specific to Maya using only MEL, that is when MEL knowledge is effective.  I have begun learning Python, and C++ is a nice option, I won't jump that far ahead.

Like my post a few weeks ago, whereas I asked someone to create a UI out of a script.  The reason was, it is a script I will use frequently; and I understand asking the community to make UI of scripts, without me making a starting point, is ridicules, and honestly I want to know how to do it. It just was a one time thing a script in which I wanted a UI created, maybe I should have mentioned it won't be an ongoing issue rather a novice programmer asking the community if he can get just a little more finesse applied to a script. 

Saturday, June 13, 2015 5:38 AM

For more options, visit https://groups.google.com/d/optout.
Friday, June 12, 2015 11:44 PM

Really, there is no reason to learn and study MEL. Just do python training.


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/Ns8YMlWFwyk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0hoRf0HHwQWiPBYGf6uVZEGvPxsVSn1VSmGhR76%2B0%2B4g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Friday, June 12, 2015 11:33 PM
It's that, I have a few MEL ebook style documents, they appear informative, although I haven't read them cover to cover, what may the book have that these documents don't have, besides a price tag.

Justin Israel wrote:
Friday, June 12, 2015 9:21 PM

Nicolas Combecave

unread,
Jun 13, 2015, 3:07:41 PM6/13/15
to python_in...@googlegroups.com
I'm 200% with Justin on this one!

If you learn maya python, you'll learn the maya guts as well as if you learn mel, plus a lot that will be usefull outside of maya. And applying this knowledge to debug/modify a mel script should be trivial, as maya python is really 99% a one to one copy of all mel commands.

Don't attach yourself the mel boulder to your ankle, especially if you start programming maya, you'll regret it later (as we do in our studio, because of late adoption, you know, lack of time in pre-production, etc, etc...)

This is really my 2cts, but if you poll this subject, I think you should end up with the 'go python' winning...

Cheers

Nicolas

Crest Christopher

unread,
Jun 13, 2015, 3:19:01 PM6/13/15
to python_in...@googlegroups.com
In other words, I can do all that I want to do or have plans to do with MEL, in Python. Alright, I'll devote time to Python, I hope all works out.  Problem is, I know a little JS, still learning and I have some problems debugging MEL, what do I do, bug you guys for help ? :-)


Saturday, June 13, 2015 3:07 PM
I'm 200% with Justin on this one!

If you learn maya python, you'll learn the maya guts as well as if you learn mel, plus a lot that will be usefull outside of maya. And applying this knowledge to debug/modify a mel script should be trivial, as maya python is really 99% a one to one copy of all mel commands.

Don't attach yourself the mel boulder to your ankle, especially if you start programming maya, you'll regret it later (as we do in our studio, because of late adoption, you know, lack of time in pre-production, etc, etc...)

This is really my 2cts, but if you poll this subject, I think you should end up with the 'go python' winning...

Cheers

Nicolas


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/Ns8YMlWFwyk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.

Justin Israel

unread,
Jun 13, 2015, 9:04:13 PM6/13/15
to python_in...@googlegroups.com
On Sun, Jun 14, 2015 at 7:19 AM Crest Christopher <crestchr...@gmail.com> wrote:
In other words, I can do all that I want to do or have plans to do with MEL, in Python.

Pretty much, yes.
 
Alright, I'll devote time to Python, I hope all works out.  Problem is, I know a little JS, still learning and I have some problems debugging MEL, what do I do, bug you guys for help ? :-)

Sure. We can all help each other out with specific problems. But it is likely you will have fewer situations where you will be stuck on interpreting/debugging the existing code, if you improve on foundations. As others have mentioned, since the Python and MEL command usage mirrors each other, for the most part, it should end up being mostly transparent aside from a few MEL syntax basics. 
 

Nicolas Combecave

unread,
Jun 14, 2015, 3:10:13 AM6/14/15
to python_in...@googlegroups.com
Sure. We can all help each other out with specific problems. But it is likely you will have fewer situations where you will be stuck on interpreting/debugging the existing code, if you improve on foundations. As others have mentioned, since the Python and MEL command usage mirrors each other, for the most part, it should end up being mostly transparent aside from a few MEL syntax basics. 

Yes, you should get the idea of mel syntax very quickly as it is somewhat simple. The thing that I overlooked and got trouble with when first encountered, was the fact that mel passes arays by reference:
It can bite you if you don't know, but you can get advantage of it ifyou want to "return" more than one result from a procedure...

One other thing is that from mel you don't have access to the api, whereas you can have access to it (there are even 2 python apis) from python, but it may be for when you are more comfortable with maya itself...

Reply all
Reply to author
Forward
0 new messages