I did a search on this concept and didn't really find anything that worked for me, so I'll ask it this way:

I wrote a plugin that creates an object based on elevation data.

A project I'm working on necessitates that I call this plugin in a batch form--in other words, for each "cell" of interest:
- Read the elevation data, create the object.
- Assign a surface name based on the area covered.
- Assign UV texture coordinates.
- Find the corresponding texture file for the cell and use it as the texture for the aforementioned texture map.
- Save the object and close it.

So, the first thing I did was modify the plugin so that it could be called by other plugins, lscript, whatever, by looking at the local->argument. I then went on to write an lscript that was able to call my plugin correctly and do most of the work I needed to do--except for the texturing stuff.

I couldn't get anything to work as far as automatically creating a texture layer in the surface color channel that used the proper image; it appeared to me that there was no way to add a texture layer if there wasn't already one. I saw this thread that had a couple suggestions, but I couldn't get it to work: http://www.newtek.com/forums/showthr...light=addlayer

So, I thought perhaps I'd try it in a full-fledged plugin instead of an lscript since the SDK docs make it look like you have more control over the surface (maybe that's an incorrect assumption, but still...). Now my problem is that I can't seem to call my other plugin from within this new plugin. I've tried it with both the lookup/execute and evaluate approaches, but I must be missing something fundamental since the plugin doesn't get called but the execute() returns with no errors.

Does anyone know either 1) how to do the texturing step in lscript, or 2) a place with a good example of how to call one plugin from within another.
Thanks!