View Full Version : Need help getting point locations after defomations

07-12-2003, 09:46 AM
Hey everyone,

I've been working on a Generic LScript for exporting LW scenes to Renderman RIB files for shading and rendering. I've kind of hit a dead end with documentation and such.

I'm looking for a way to get point positions for a mesh AFTER any displacements or deformations (caused by bones, plugins, or textures) have taken place in LW. Any help is appreciated, and don't think you will go unrewarded because I will release the script when it is near completion. Thanks.

Bart Robinson

07-13-2003, 08:31 AM
use the source[] data member.

07-15-2003, 09:37 AM
I saw this in the manual, but I was thinking it only worked in Displacement Object Agent type scripts...? Since you gave such a nice example for my light intensity question, maybe one for this too? I gave the source[] data member a little try last night and came up with errors. Again this is for use in a generic "run-once" type script.

07-15-2003, 08:08 PM
oh i see. i didnt know you were writing a generic.

if this is the case, given the current architecture of lw, you must use the IPC (or Queue) system to communicate the point locations of your object. iow, create a displacement script that reads the points' locations and make those locations as IPC-global variables so they can be read by other lscript, like your generic.

another way of doing it is this: i'm assuming, since it is a generic, that the retrieval of values is a one-shot thing. if this is so, write a displacement script that reads the points, have the those point locations parsed and outputted to a text file (globalstore() the path location of the text file). then write the generic script to retrieve the path of the text file (globalrecall()) and parse it to get the info. this, however, is not the IPC way of doing it.

read up the old html release notes on IPC or the newer docs on the Queue Object Agent. i'm not familiar with the latter and how it handles variable types. possibly, you can populate an array of point locations from the dm script and then retrieve that array in your gn script.

07-15-2003, 08:36 PM
hold on... if you're planning to use the IPC or Queue(), i dont think you should be writing a generic. possibly a better one will be a master class. i'm not sure if generics can access IPC variables, or how effectively they can do that. i'm not sure about this, but i do know that i have been successful in doing it in master class scripts. something to do with generics not sharing any memory time with other plugins compared to master class ones.