On 04/07/2014 at 10:05, xxxxxxxx wrote:
You assign the material to the object using a Texture tag on the object and using ttag->SetMaterial() (where ttag is a pointer to your TextureTag). Your best option is to create the Material once (possibly on the first creation of your objects) and check for their existence thereafter (use a unique name or some other distinguishing criteria). You could store a Link in your plugin object that stores the Material once assigned and you would only create the Material if the Link was NULL or reset the Link if the Material being used changes (if ever). Since you will be creating the objects and texture tags everytime GVO() runs through, you will need to set the Material link and tag each time.