int CMAPImport::DoImport(const TCHAR *filename,ImpInterface *i,Interface *gi, BOOL suppressPrompts) { if(!objFileRead(filename, i)) return 0; /* GenLight *light = i->CreateLightObject(OMNI_LIGHT); ImpNode *light_node = i->CreateNode(); Matrix3 tm; tm.IdentityMatrix(); light_node->Reference(light); light_node->SetTransform(0, tm); i->AddNodeToScene(light_node); light_node->SetName(_T("light")); */ i->RedrawViews(); return 1; }
int OBJImport::DoImport(const TCHAR *filename,ImpInterface *i,Interface *gi, BOOL suppressPrompts) { TriObject *object = CreateNewTriObject(); if(!object) return 0; if(objFileRead(filename, &object->GetMesh())) { ImpNode *node = i->CreateNode(); if(!node) { delete object; return 0; } Matrix3 tm; tm.IdentityMatrix(); node->Reference(object); node->SetTransform(0,tm); i->AddNodeToScene(node); node->SetName(GetString(IDS_TH_WAVE_OBJ_NAME)); i->RedrawViews(); return 1; } return 0; }