Introduction to Maya - Modeling Fundamentals Vol 2
This course will look in the fundamentals of modeling in Maya with an emphasis on creating good topology. It's aimed at people that have some modeling experience in Maya but are having trouble with complex objects.
# 1 29-04-2004 , 03:21 PM
Registered User
Join Date: Apr 2004
Posts: 4

Holding C++ variable in MEL script

Hi,

Does any one knows how to hold a C++ variable in MEL script.
I made a plug-in that connects MAYA to other software, and when the command ends I'm loosing the connection. I want to hold the connection alive and for that I must hold a C++ variable in the MEL script or to find away that one MEL plug-in recognize variable from another.

Does any of you have an idea?

Thanks

Yaki

# 2 29-04-2004 , 03:33 PM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
return it from a function and have the mel script call it? I'm not sure how easy that is as I havent really played wit hte API much, but I'm sure you can do it.

Alan


Technical Director - Framestore

Currently working on: Your Highness

IMDB
# 3 29-04-2004 , 03:38 PM
Registered User
Join Date: Apr 2004
Posts: 4
Alan,

Thanks for the answer, the problem is when I return it to the MEL script I need to hold it in a MEL variable, and I don't know how to define a MEL variable that holds such var (e.g. Connection). I tried to make a simple case to trasfer and get a String Var and coulndn't make it.
I'm quite lost so any help will be welcome....

Thanks again
Yaki

# 4 29-04-2004 , 03:39 PM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
so you can't stroe it in a string in MEL? that's weird. Can you assign the string at all? cause then you can make the connectino in maya and plugit back together.

Alan


Technical Director - Framestore

Currently working on: Your Highness

IMDB
# 5 29-04-2004 , 03:44 PM
Registered User
Join Date: Apr 2004
Posts: 4
I managed to store the stirng as MAYA string, but the connection variable is uniqe to MFC (uses socket for connection) so it is a different case.

I tryied the connection a global var in the plug-in and it didn't work either.

Any idea?

# 6 29-04-2004 , 03:53 PM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
I'm sorry no I dont have any ideas. As I said I'm not familiar with the API user added image sorry

Alan


Technical Director - Framestore

Currently working on: Your Highness

IMDB
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads