Maya Training

Creating characters In Maya and Zbrush

Maya Training

Creating character renders in Maya 2017 and Arnold

Maya Training

Spach-Alspaugh House the complete courseware
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 29-04-2004, 04:21 PM   #1
yaki
Registered User
 
Join Date: Apr 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
yaki is offline   Reply With Quote
Old 29-04-2004, 04:33 PM   #2
Alan
Moderator
 
Alan's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
Thanks: 0
Thanked 5 Times in 5 Posts
Default

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
Alan is offline   Reply With Quote
Old 29-04-2004, 04:38 PM   #3
yaki
Registered User
 
Join Date: Apr 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
yaki is offline   Reply With Quote
Old 29-04-2004, 04:39 PM   #4
Alan
Moderator
 
Alan's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
Thanks: 0
Thanked 5 Times in 5 Posts
Default

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
Alan is offline   Reply With Quote
Old 29-04-2004, 04:44 PM   #5
yaki
Registered User
 
Join Date: Apr 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?
yaki is offline   Reply With Quote
Old 29-04-2004, 04:53 PM   #6
Alan
Moderator
 
Alan's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
Thanks: 0
Thanked 5 Times in 5 Posts
Default

I'm sorry no I dont have any ideas. As I said I'm not familiar with the API sorry

Alan
__________________
Technical Director - Framestore

Currently working on: Your Highness

IMDB
Alan is offline   Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
MEL headache! happymat27 Members Lounge 5 05-12-2010 09:43 AM
MEL headache!! happymat27 Mel Scripts & Programming 1 03-12-2010 04:41 PM

Thread Tools





A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2017 SimplyMaya - vBulletin® Copyright © 2000-2017, Jelsoft Enterprises Ltd.