j'ai fait ce petit script tout simple pour créer 4 points et un poly, histoire de tester...
Code:
main(doc,op)
{
var test=op->GetDown();
if (!test){
test = new(PolygonObject);
test->SetName("test");
doc->InsertObject(test,op,NULL);
test->SetPoint(0,vector(-20,0,-20));
test->SetPoint(1,vector(20,0,-20));
test->SetPoint(2,vector(20,0,20));
test->SetPoint(3,vector(-20,0,20));
test->SetPolygon(0,0,1,2,3);
test->Message(MSG_UPDATE);
}
}
mais bien sur, ça ne marche pas, l'object est créé, mais aucun point. :cry: