Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Programming (https://simplymaya.com/forum/forumdisplay.php?f=32)
-   -   Holding C++ variable in MEL script (https://simplymaya.com/forum/showthread.php?t=11617)

yaki 29-04-2004 03:21 PM

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

Alan 29-04-2004 03:33 PM

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

yaki 29-04-2004 03:38 PM

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

Alan 29-04-2004 03:39 PM

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

yaki 29-04-2004 03:44 PM

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?

Alan 29-04-2004 03:53 PM

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

Alan


All times are GMT. The time now is 09:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018