On 28/04/2015 at 06:22, xxxxxxxx wrote:
actually I'm not sure about your actual intent, whether you are trying to create a new material and assign it to your generated object, or if you simply want to assign an existing material.
In the first case the answer is, you can't do that in GetVirtualObjects(). As discussed in another thread, you are not allowed to change the scene from within GetVirtualObjects(). And inserting a new material obviously is a change to the current scene. So in this case you'd probably have to create a button in your interface and do the material creation in response to the button press.
The case of an already existing material is much simpler. You'd simply create a TextureTag, set the material and assign the tag to your object via InsertTag().