[Closed] Output SDK variables to Maxscript?
How can I do this? For now I am just trying to output values to the listener, and I’ve found that I can get it to print strings easily enough, but what if I have something like a float, matrix, or point3 value? I know there are various ways to convert different types to character arrays in C++, but does the SDK have anything like that built into it?
Also, is there any way to use ExecuteMAXScriptScript with variables from the DLL file, or will it only accept a char array?
for a int, you would to:
int i = 10;
mprintf(L"Here is the int: %i
",i);
float i = 12.3;
mprintf(L"Here is the float: %f
",i);
//String
//mynode is a node..
mprintf(L"object name is: %s
",mynode->GetName());
A float 3 you can just get the x y z values and print line:
point3 i;
mprintf(L"Here is the point3: %f,%f,%f
",i.x,i.y,i.z);
you have to include:
#include <maxscript\maxscript.h>
to use hte mprintf function if I remember correctly.
point3 i;
mprintf(L”Here is the point3: %f,%f,%f
“,i.x,i.y,i.z);
i like to output in an mxs “format” so you can cut and paste
mprintf(L"Here is the point3: [%f,%f,%f]
",i.x,i.y,i.z);
I did not think of that Klvnk, I’ll do that in my own code from now on.