LM_String

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
anigreator
Posts: 36
Joined: Tue Mar 22, 2005 11:47 am

LM_String

Post by anigreator »

Hey all!

I've been trying to modify the new shape select script posted by 7feet yesterday to display the shape order in a persistent popup window (think the bone contraints dialog). This is going well so far with one exception - the shape names are stored as a 'LM_String' userdata typed variable.

Is LM_String a C-style string - a pointer to a null terminated string? And does LM, or anyone else have a code snippet for turning these into useful Lua strings?

Any help would be greatly appreciated.

Cheers!

Chris
User avatar
Lost Marble
Site Admin
Posts: 2354
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Post by Lost Marble »

An LM_String is a C++ wrapper around a C string. Unfortunately, this class has not been exposed to Lua. Although a script can "see" that a shape has a name property, it is unable to actually read or modify it, since Lua scripts don't understand how to work with the LM_String class.

Sorry. As Moho advances, we'll get more and more of this stuff exposed through the scripting interface.
anigreator
Posts: 36
Joined: Tue Mar 22, 2005 11:47 am

Post by anigreator »

Oh bums! Oh well, at least now I'm familiar with the inner workings of Moho's Lua stuff, which will come in handy further down the line. I did start getting suspicious when the only reference to shape.fName I could find was the one I'd just put in the script... should have known :)

The show goes on...
Post Reply