Jump to content

Get lua object from target


Rick
 Share

Recommended Posts

I assume the target we set is the model in the editor. Is there a way to get the lua object of that model so I can call object methods from it?

 

For example from one script that has a target:

 

GetLuaObject(GetTarget(0)):MyFunction()

 

Where MyFunction() was defined in the lua class around that target?

Link to comment
Share on other sites

I think that's addressed in the Getting_Started_With_Lua.pdf tutorial. You should be able to do:

 

objecttable[GetTarget(0)]:MyFunction()

 

I haven't tested it though, so may not work.

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...