SimplyMaya Forums

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

Home / forum / Animation / Mel Scripts & Programming / Holding C++ variable in MEL script
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 29-04-2004, 03: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, 03: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, 03: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, 03: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, 03: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, 03: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
New Thread

« Previous Thread | Next Thread »

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

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

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.