Create a new TriObject

 
 
 
Posted by:MichiMichbeck
Data created:27 May 2010

Hey

I tried to instantiate a new TriObject: In C++ SDK it is possible by calling TriObject* CreateNewTriObject() . How is the pendant in Max.Net ?

I require the TriObject to gain a Mesh storing geometry a modifier creates.

Thx in advance
Greets, Michbeck

Have you tried: IGlobal.TriObject.Create() ? This is off the top of my head but it should work.

Marsel Khadiyev (Software Developer, EPHERE Inc.)

Have a look here for more details.

Marsel Khadiyev (Software Developer, EPHERE Inc.)

Hey, thx for your reply. Attention: you linked the reply itself in your last post :)

Actually the instance of a TriObject is created in this way: ITriObject triObj = this.global.CreateNewTriObject;

CreateNewTriObject is a property and responds with its get Method!

This will end up with a null-pointer exception:
ITriObject triObj = (ITriObject)(this.global.TriObjDescriptor.Create(true))

Greets, Michbeck

Right, I'll need to revise that. Methods that don't have parameters but return a value are translated as property getters by default.

Marsel Khadiyev (Software Developer, EPHERE Inc.)