/* ****************************************************************************** * Function Name : instanceGrid() * * Description : Instance a grid * * Input Arguments : GU_Detail *inst_gdp, GU_Detail *mb_gdp * * Return Value : int * ***************************************************************************** */ int VRAY_clusterThis::instanceGrid(GU_Detail * inst_gdp, GU_Detail * mb_gdp) { #ifdef DEBUG std::cout << "VRAY_clusterThis::instanceGrid()" << std::endl; #endif GEO_Primitive * myGrid; GU_GridParms grid_parms; UT_XformOrder xformOrder(UT_XformOrder::TRS, UT_XformOrder::XYZ); UT_Matrix4 xform(1.0); xform.rotate(myPointAttributes.N[0], myPointAttributes.N[1], myPointAttributes.N[2], xformOrder); grid_parms.rows = 2; grid_parms.cols = 2; grid_parms.xsize = mySize[0] * myPointAttributes.pscale; grid_parms.ysize = mySize[1] * myPointAttributes.pscale; grid_parms.xcenter = myPointAttributes.myNewPos[0]; grid_parms.ycenter = myPointAttributes.myNewPos[1]; grid_parms.zcenter = myPointAttributes.myNewPos[2]; grid_parms.plane = GU_PLANE_XY; myGrid = inst_gdp->buildGrid(grid_parms, GU_GRID_POLY); for(int i = 0; i < myGrid->getVertexCount(); i++) { GEO_Point * ppt = myGrid->getVertexElement(i).getPt(); UT_Vector4 P = ppt->getPos(); P *= xform; ppt->setPos(P); } VRAY_clusterThis::setInstanceAttributes(myGrid); if(myDoMotionBlur == CLUSTER_MB_DEFORMATION) { grid_parms.xcenter = myPointAttributes.myMBPos[0]; grid_parms.ycenter = myPointAttributes.myMBPos[1]; grid_parms.zcenter = myPointAttributes.myMBPos[2]; myGrid = mb_gdp->buildGrid(grid_parms, GU_GRID_POLY); for(int i = 0; i < myGrid->getVertexCount(); i++) { GEO_Point * ppt = myGrid->getVertexElement(i).getPt(); UT_Vector4 P = ppt->getPos(); P *= xform; ppt->setPos(P); } VRAY_clusterThis::setInstanceAttributes(myGrid); } if(myCVEX_Exec) VRAY_clusterThis::runCVEX(inst_gdp, mb_gdp, myCVEXFname, CLUSTER_CVEX_POINT); if(myCVEX_Exec_prim) VRAY_clusterThis::runCVEX(inst_gdp, mb_gdp, myCVEXFname_prim, CLUSTER_CVEX_PRIM); return 0; }
/* ****************************************************************************** * Function Name : instanceCube() * * Description : Instance a cube * * Input Arguments : GU_Detail *inst_gdp, GU_Detail *mb_gdp * * Return Value : int * ***************************************************************************** */ int VRAY_clusterThis::instanceCube(GU_Detail * inst_gdp, GU_Detail * mb_gdp) { #ifdef DEBUG std::cout << "VRAY_clusterThis::instanceCube()" << std::endl; #endif GEO_Primitive * myCube; UT_Matrix4 xform(1.0); UT_XformOrder xformOrder(UT_XformOrder::TRS, UT_XformOrder::XYZ); xform.rotate(myPointAttributes.N[0], myPointAttributes.N[1], myPointAttributes.N[2], xformOrder); myCube = (GEO_Primitive *) inst_gdp->cube( myPointAttributes.myNewPos[0] - ((mySize[0] * myPointAttributes.pscale) / 2), myPointAttributes.myNewPos[0] + ((mySize[0] * myPointAttributes.pscale) / 2), myPointAttributes.myNewPos[1] - ((mySize[1] * myPointAttributes.pscale) / 2), myPointAttributes.myNewPos[1] + ((mySize[1] * myPointAttributes.pscale) / 2), myPointAttributes.myNewPos[2] - ((mySize[2] * myPointAttributes.pscale) / 2), myPointAttributes.myNewPos[2] + ((mySize[2] * myPointAttributes.pscale) / 2)); for(int i = 0; i < myCube->getVertexCount(); i++) { GEO_Point * ppt = myCube->getVertexElement(i).getPt(); UT_Vector4 P = ppt->getPos(); P *= xform; ppt->setPos(P); } VRAY_clusterThis::setInstanceAttributes(myCube); if(myDoMotionBlur == CLUSTER_MB_DEFORMATION) { myCube = (GEO_Primitive *) mb_gdp->cube(myPointAttributes.myMBPos[0] - ((mySize[0] * myPointAttributes.pscale) / 2), myPointAttributes.myMBPos[0] + ((mySize[0] * myPointAttributes.pscale) / 2), myPointAttributes.myMBPos[1] - ((mySize[1] * myPointAttributes.pscale) / 2), myPointAttributes.myMBPos[1] + ((mySize[1] * myPointAttributes.pscale) / 2), myPointAttributes.myMBPos[2] - ((mySize[2] * myPointAttributes.pscale) / 2), myPointAttributes.myMBPos[2] + ((mySize[2] * myPointAttributes.pscale) / 2)); for(int i = 0; i < myCube->getVertexCount(); i++) { GEO_Point * ppt = myCube->getVertexElement(i).getPt(); UT_Vector4 P = ppt->getPos(); P *= xform; ppt->setPos(P); } VRAY_clusterThis::setInstanceAttributes(myCube); } if(myCVEX_Exec) VRAY_clusterThis::runCVEX(inst_gdp, mb_gdp, myCVEXFname, CLUSTER_CVEX_POINT); if(myCVEX_Exec_prim) VRAY_clusterThis::runCVEX(inst_gdp, mb_gdp, myCVEXFname_prim, CLUSTER_CVEX_PRIM); return 0; }
/* ****************************************************************************** * Function Name : instanceSphere() * * Description : Instance a sphere * * Input Arguments : GU_Detail *inst_gdp, GU_Detail *mb_gdp * * Return Value : int * ***************************************************************************** */ int VRAY_clusterThis::instanceSphere(GU_Detail * inst_gdp, GU_Detail * mb_gdp) { #ifdef DEBUG std::cout << "VRAY_clusterThis::instanceSphere()" << std::endl; #endif UT_Matrix4 xform(1.0); GU_PrimSphere * sphere; GU_PrimSphereParms sphere_parms; UT_XformOrder xformOrder(UT_XformOrder::SRT, UT_XformOrder::XYZ); xform.xform(xformOrder, myPointAttributes.myNewPos[0], myPointAttributes.myNewPos[1], myPointAttributes.myNewPos[2], myPointAttributes.N[0], myPointAttributes.N[1], myPointAttributes.N[2], mySize[0] * myPointAttributes.pscale, mySize[1] * myPointAttributes.pscale, mySize[2] * myPointAttributes.pscale); // xform.scale(mySize[0] * myPointAttributes.pscale, mySize[1] * myPointAttributes.pscale, mySize[2] * myPointAttributes.pscale); // xform.rotate(myPointAttributes.N[0], myPointAttributes.N[1], myPointAttributes.N[2], xformOrder); // xform.translate(myPointAttributes.myNewPos[0], myPointAttributes.myNewPos[1], myPointAttributes.myNewPos[2]); sphere_parms.gdp = inst_gdp; sphere_parms.xform = xform; sphere = (GU_PrimSphere *) GU_PrimSphere::build(sphere_parms); VRAY_clusterThis::setInstanceAttributes(sphere); if(myDoMotionBlur == CLUSTER_MB_DEFORMATION) { // xform.xform(xformOrder, myPointAttributes.myMBPos[0], myPointAttributes.myMBPos[1], myPointAttributes.myMBPos[2], // myPointAttributes.N[0], myPointAttributes.N[1], myPointAttributes.N[2], // mySize[0] * myPointAttributes.pscale, mySize[1] * myPointAttributes.pscale, mySize[2] * myPointAttributes.pscale); xform.identity(); xform.scale(mySize[0] * myPointAttributes.pscale, mySize[1] * myPointAttributes.pscale, mySize[2] * myPointAttributes.pscale); xform.rotate(myPointAttributes.N[0], myPointAttributes.N[1], myPointAttributes.N[2], xformOrder); xform.translate(myPointAttributes.myMBPos[0], myPointAttributes.myMBPos[1], myPointAttributes.myMBPos[2]); sphere_parms.gdp = mb_gdp; sphere_parms.xform = xform; sphere = (GU_PrimSphere *) GU_PrimSphere::build(sphere_parms); VRAY_clusterThis::setInstanceAttributes(sphere); } if(myCVEX_Exec) VRAY_clusterThis::runCVEX(inst_gdp, mb_gdp, myCVEXFname, CLUSTER_CVEX_POINT); if(myCVEX_Exec_prim) VRAY_clusterThis::runCVEX(inst_gdp, mb_gdp, myCVEXFname_prim, CLUSTER_CVEX_PRIM); return 0; }
/* ****************************************************************************** * Function Name : instanceMetaball() * * Description : Instance a metaball * * Input Arguments : GU_Detail *inst_gdp, GU_Detail *mb_gdp * * Return Value : int * ***************************************************************************** */ int VRAY_clusterThis::instanceMetaball(GU_Detail * inst_gdp, GU_Detail * mb_gdp) { #ifdef DEBUG std::cout << "VRAY_clusterThis::instanceMetaball()" << std::endl; #endif UT_Matrix4 xform(1.0); UT_XformOrder xformOrder(UT_XformOrder::SRT, UT_XformOrder::XYZ); GU_PrimMetaBall * metaball; GU_PrimMetaBallParms metaball_parms; xform.xform(xformOrder, myPointAttributes.myNewPos[0], myPointAttributes.myNewPos[1], myPointAttributes.myNewPos[2], myPointAttributes.N[0], myPointAttributes.N[1], myPointAttributes.N[2], mySize[0] * myPointAttributes.pscale, mySize[1] * myPointAttributes.pscale, mySize[2] * myPointAttributes.pscale); metaball_parms.gdp = inst_gdp; metaball_parms.xform = xform; metaball_parms.weight = myPointAttributes.weight; metaball = (GU_PrimMetaBall *) GU_PrimMetaBall::build(metaball_parms); VRAY_clusterThis::setInstanceAttributes(metaball); if(myDoMotionBlur == CLUSTER_MB_DEFORMATION) { metaball_parms.weight = myPointAttributes.weight; xform.identity(); xform.xform(xformOrder, myPointAttributes.myMBPos[0], myPointAttributes.myMBPos[1], myPointAttributes.myMBPos[2], myPointAttributes.N[0], myPointAttributes.N[1], myPointAttributes.N[2], mySize[0] * myPointAttributes.pscale, mySize[1] * myPointAttributes.pscale, mySize[2] * myPointAttributes.pscale); metaball_parms.gdp = mb_gdp; metaball_parms.xform = xform; metaball = (GU_PrimMetaBall *) GU_PrimMetaBall::build(metaball_parms); VRAY_clusterThis::setInstanceAttributes(metaball); } if(myCVEX_Exec) VRAY_clusterThis::runCVEX(inst_gdp, mb_gdp, myCVEXFname, CLUSTER_CVEX_POINT); if(myCVEX_Exec_prim) VRAY_clusterThis::runCVEX(inst_gdp, mb_gdp, myCVEXFname_prim, CLUSTER_CVEX_PRIM); return 0; }
/* ****************************************************************************** * Function Name : instanceTube() * * Description : Instance a tube * * Input Arguments : GU_Detail *inst_gdp, GU_Detail *mb_gdp * * Return Value : int * ***************************************************************************** */ int VRAY_clusterThis::instanceTube(GU_Detail * inst_gdp, GU_Detail * mb_gdp) { #ifdef DEBUG std::cout << "VRAY_clusterThis::instanceTube()" << std::endl; #endif GU_PrimTube * tube; GU_PrimTubeParms tube_parms; GU_CapOptions tube_cap_options; UT_Matrix4 xform(1.0); UT_XformOrder xformOrder(UT_XformOrder::SRT, UT_XformOrder::XYZ); // GU_CapOptions: //GU_CapType firstUCap //GU_CapType lastUCap //GU_CapType firstVCap //GU_CapType lastVCap //int pshapeU //int numfirstUCaps //int numlastUCaps //int numfirstVCaps //int numlastVCaps //int pshapeV //float firstUScale //float lastUScale //float firstVScale //float lastVScale // enum GU_CapType: //GU_CAP_NONE = 0, GU_CAP_FACETED = 1, GU_CAP_SHARED = 2, GU_CAP_ROUNDED = 3, GU_CAP_TANGENT = 4 // // GU_PrimTubeParms: //int rows //int cols //int orderu //int orderv //int imperfect //float taper //GEO_SurfaceType type // // GEO_SurfaceType: //GEO_PATCH_ROWS //GEO_PATCH_COLS //GEO_PATCH_ROWCOL //GEO_PATCH_TRIANGLE //GEO_PATCH_QUADS //GEO_PATCH_ALTTRIANGLE //GEO_PATCH_REVTRIANGLE tube_cap_options.numfirstUCaps = 1; tube_cap_options.numlastUCaps = 1; tube_cap_options.firstUCap = GU_CAP_FACETED; tube_cap_options.lastUCap = GU_CAP_FACETED; tube_cap_options.numfirstVCaps = 1; tube_cap_options.numlastVCaps = 1; tube_cap_options.firstVCap = GU_CAP_FACETED; tube_cap_options.lastVCap = GU_CAP_FACETED; tube_parms.rows = 4; tube_parms.cols = 10; tube_parms.taper = 1.0; tube_parms.type = GEO_PATCH_TRIANGLE; xform.xform(xformOrder, myPointAttributes.myNewPos[0], myPointAttributes.myNewPos[1], myPointAttributes.myNewPos[2], myPointAttributes.N[0], myPointAttributes.N[1], myPointAttributes.N[2], mySize[0] * myPointAttributes.pscale, mySize[1] * myPointAttributes.pscale, mySize[2] * myPointAttributes.pscale); // xform.scale(mySize[0] * myPointAttributes.pscale, mySize[1] * myPointAttributes.pscale, mySize[2] * myPointAttributes.pscale); // xform.rotate(myPointAttributes.N[0], myPointAttributes.N[1], myPointAttributes.N[2], xformOrder); // xform.translate(myPointAttributes.myNewPos[0], myPointAttributes.myNewPos[1], myPointAttributes.myNewPos[2]); // tube_parms.xform.scale(mySize[0] * myPointAttributes.pscale, mySize[1] * myPointAttributes.pscale, mySize[2] * myPointAttributes.pscale); // tube_parms.xform.rotate(myPointAttributes.N[0], myPointAttributes.N[1], myPointAttributes.N[2], xformOrder); // tube_parms.xform.translate(myPointAttributes.myNewPos[0], myPointAttributes.myNewPos[1], myPointAttributes.myNewPos[2]); tube_parms.gdp = inst_gdp; tube_parms.xform = xform; tube = (GU_PrimTube *) GU_PrimTube::build(tube_parms, tube_cap_options); VRAY_clusterThis::setInstanceAttributes(tube); if(myDoMotionBlur == CLUSTER_MB_DEFORMATION) { xform.identity(); xform.xform(xformOrder, myPointAttributes.myMBPos[0], myPointAttributes.myMBPos[1], myPointAttributes.myMBPos[2], myPointAttributes.N[0], myPointAttributes.N[1], myPointAttributes.N[2], mySize[0] * myPointAttributes.pscale, mySize[1] * myPointAttributes.pscale, mySize[2] * myPointAttributes.pscale); // xform.scale(mySize[0] * myPointAttributes.pscale, mySize[1] * myPointAttributes.pscale, mySize[2] * myPointAttributes.pscale); // xform.rotate(myPointAttributes.N[0], myPointAttributes.N[1], myPointAttributes.N[2], xformOrder); // xform.translate(myPointAttributes.myMBPos[0], myPointAttributes.myMBPos[1], myPointAttributes.myMBPos[2]); // tube_parms.xform.scale(mySize[0] * myPointAttributes.pscale, mySize[1] * myPointAttributes.pscale, mySize[2] * myPointAttributes.pscale); // tube_parms.xform.rotate(myPointAttributes.N[0], myPointAttributes.N[1], myPointAttributes.N[2], xformOrder); // tube_parms.xform.translate(myPointAttributes.myMBPos[0], myPointAttributes.myMBPos[1], myPointAttributes.myMBPos[2]); tube_parms.gdp = mb_gdp; tube = (GU_PrimTube *) GU_PrimTube::build(tube_parms, tube_cap_options); VRAY_clusterThis::setInstanceAttributes(tube); } if(myCVEX_Exec) VRAY_clusterThis::runCVEX(inst_gdp, mb_gdp, myCVEXFname, CLUSTER_CVEX_POINT); if(myCVEX_Exec_prim) VRAY_clusterThis::runCVEX(inst_gdp, mb_gdp, myCVEXFname_prim, CLUSTER_CVEX_PRIM); return 0; }
/* ****************************************************************************** * Function Name : ReadRFSDCreateAnimGeo() * * * Input Arguments : OP_Context &context * * Return Value : int * ***************************************************************************** */ inline int SOP_RF_Import::ReadRFSDCreateAnimGeo(UT_Interrupt * boss) { UT_XformOrder xformOrder(UT_XformOrder::SRT); UT_Matrix4 work_matrix; GEO_Point * ppt; try { // For each object in the SD file, read it's frame header and geometry for(int cur_object = 0; cur_object < myRFSDFile->myRF_SD_Header.num_objects; cur_object++) { // read the object's frame header data if(myRFSDFile->readSDObjFrameHdr()) throw SOP_RF_Import_Exception(canNotReadSDObjectFrameHeader, exceptionError); #ifdef DEBUG std::cout << "obj_name_len: " << myRFSDFile->myRF_SD_Obj_Frame_Header.obj_name_len << std::endl; std::cout << "Object Name: " << myRFSDFile->myRF_SD_Obj_Frame_Header.obj_name << std::endl; std::cout << "Object Transform:" << std::endl; for(int i = 0; i < 12; i++) std::cout << myRFSDFile->myRF_SD_Obj_Frame_Header.obj_world_xform[i] << "\t"; std::cout << std::endl; std::cout << "Translation Vector: " << std::endl; for(int i = 0; i < 3; i++) std::cout << myRFSDFile->myRF_SD_Obj_Frame_Header.obj_trans_vec[i] << "\t"; std::cout << std::endl; std::cout << "Rotation Vector: " << std::endl; for(int i = 0; i < 3; i++) std::cout << myRFSDFile->myRF_SD_Obj_Frame_Header.obj_rot_vec[i] << "\t"; std::cout << std::endl; std::cout << "Scale Vector: " << std::endl; for(int i = 0; i < 3; i++) std::cout << myRFSDFile->myRF_SD_Obj_Frame_Header.obj_scale_vec[i] << "\t"; std::cout << std::endl; std::cout << "Pivot Position: " << std::endl; for(int i = 0; i < 3; i++) std::cout << myRFSDFile->myRF_SD_Obj_Frame_Header.obj_pivot_pos[i] << "\t"; std::cout << std::endl << std::endl; std::cout << "CG Position: " << std::endl; for(int i = 0; i < 3; i++) std::cout << myRFSDFile->myRF_SD_Obj_Frame_Header.obj_CG_pos[i] << "\t"; std::cout << std::endl; std::cout << "CG Velocity: " << std::endl; for(int i = 0; i < 3; i++) std::cout << myRFSDFile->myRF_SD_Obj_Frame_Header.obj_CG_vel[i] << "\t"; std::cout << std::endl; std::cout << "CG Rotation: " << std::endl; for(int i = 0; i < 3; i++) std::cout << myRFSDFile->myRF_SD_Obj_Frame_Header.obj_CG_rot[i] << "\t"; std::cout << std::endl << std::endl; #endif if(myGUIState.t_sd_cg) { work_matrix.identity(); work_matrix.xform(xformOrder, myRFSDFile->myRF_SD_Obj_Frame_Header.obj_trans_vec[0], myRFSDFile->myRF_SD_Obj_Frame_Header.obj_trans_vec[1], myRFSDFile->myRF_SD_Obj_Frame_Header.obj_trans_vec[2], myRFSDFile->myRF_SD_Obj_Frame_Header.obj_rot_vec[0], myRFSDFile->myRF_SD_Obj_Frame_Header.obj_rot_vec[1], myRFSDFile->myRF_SD_Obj_Frame_Header.obj_rot_vec[2], myRFSDFile->myRF_SD_Obj_Frame_Header.obj_scale_vec[0], myRFSDFile->myRF_SD_Obj_Frame_Header.obj_scale_vec[1], myRFSDFile->myRF_SD_Obj_Frame_Header.obj_scale_vec[2], myRFSDFile->myRF_SD_Obj_Frame_Header.obj_pivot_pos[0], myRFSDFile->myRF_SD_Obj_Frame_Header.obj_pivot_pos[1], myRFSDFile->myRF_SD_Obj_Frame_Header.obj_pivot_pos[2]); // Transform the geometry gdp->transformPoints(work_matrix, (const GA_PointGroup *)objPrimitiveGrpList[cur_object]); } if(myGUIState.t_sd_cg_xform) { work_matrix.identity(); work_matrix.xform(xformOrder, myRFSDFile->myRF_SD_Obj_Frame_Header.obj_CG_pos[0], myRFSDFile->myRF_SD_Obj_Frame_Header.obj_CG_pos[1], myRFSDFile->myRF_SD_Obj_Frame_Header.obj_CG_pos[2], myRFSDFile->myRF_SD_Obj_Frame_Header.obj_CG_rot[0], myRFSDFile->myRF_SD_Obj_Frame_Header.obj_CG_rot[1], myRFSDFile->myRF_SD_Obj_Frame_Header.obj_CG_rot[2]); // Transform the geometry gdp->transformPoints(work_matrix, (const GA_PointGroup *)objPrimitiveGrpList[cur_object]); } #ifdef DEBUG std::cout << "Current primitive group: " << objPrimitiveGrpList[cur_object]->getName() << std::endl; #endif GA_RWAttributeRef attrRef; GA_RWHandleI attrIntHandle; GA_RWHandleF attrFloatHandle; GA_RWHandleV3 attrVector3Handle; // If the user wants the CG data, add it to the geo detail if(myGUIState.t_sd_cg) { if(myAttributeRefs.sd_CG_pos.isValid()) { attrVector3Handle.bind(myAttributeRefs.sd_CG_pos.getAttribute()); attrVector3Handle.set(0, UT_Vector3(myRFSDFile->myRF_SD_Obj_Frame_Header.obj_CG_pos)); } if(myAttributeRefs.sd_CG_vel.isValid()) { attrVector3Handle.bind(myAttributeRefs.sd_CG_vel.getAttribute()); attrVector3Handle.set(0, UT_Vector3(myRFSDFile->myRF_SD_Obj_Frame_Header.obj_CG_vel)); } if(myAttributeRefs.sd_CG_rot.isValid()) { attrVector3Handle.bind(myAttributeRefs.sd_CG_rot.getAttribute()); attrVector3Handle.set(0, UT_Vector3(myRFSDFile->myRF_SD_Obj_Frame_Header.obj_CG_rot)); } } // If vertex mode, update coordinates if(myRFSDFile->myRF_SD_Obj_Header.obj_mode) { for(int cur_point = 0; cur_point < myRFSDFile->obj_detail[cur_object].num_points; cur_point++) { #ifdef DEBUG std::cout << "vertex number: " << cur_point + 1 << " of " << myRFSDFile->myRF_SD_Obj_Header.num_vertices << " vertices " << std::endl; #endif if(myRFSDFile->readSDFaceCoord()) throw SOP_RF_Import_Exception(canNotReadSDAnimFaceData, exceptionError); #ifdef DEBUG std::cout << "Vertex Coordinates: " << std::endl; std::cout << myRFSDFile->myRF_SD_Face_Data.vertex[0] << "\t"; std::cout << myRFSDFile->myRF_SD_Face_Data.vertex[1] << "\t"; std::cout << myRFSDFile->myRF_SD_Face_Data.vertex[2] << std::endl; #endif // update points if(boss->opInterrupt()) throw SOP_RF_Import_Exception(theSDAnimGeoCreationInterrupt, exceptionWarning); myCurrPoint = cur_point; // Get the current point to either update position ppt = gdp->points().entry(cur_point); if(ppt == NULL) throw SOP_RF_Import_Exception(theSDAnimGeoCreationPointNULL, exceptionError); #ifdef DEBUG std::cout << "cur_object: " << cur_object << std::endl; #endif gdp->points()[cur_point]->setPos((float)myRFSDFile->myRF_SD_Face_Data.vertex[0], (float)myRFSDFile->myRF_SD_Face_Data.vertex[1], (float)myRFSDFile->myRF_SD_Face_Data.vertex[2], 1.0); #ifdef DEBUG std::cout << "position assigned" << std::endl; #endif } // for(int cur_point=0; ... } // if(myRFSDFile->myRF_SD_Obj_Header.obj_mode) } // if vertex mode } catch(SOP_RF_Import_Exception e) { e.what(); if(e.getSeverity() == exceptionWarning) addWarning(SOP_MESSAGE, errorMsgs[e.getErrorCode()]); else if(e.getSeverity() == exceptionError) addError(SOP_MESSAGE, errorMsgs[e.getErrorCode()]); if(myRFSDFile->SDifstream.is_open()) { myRFSDFile->closeSDFile(RF_FILE_READ); } return 1; } return 0; }