Example #1
0
void wendy_GIO_ROP::save_gdp_to_disk( char *arnold_dso_path,OP_Context &context,char *savePath)
{
    OP_Node * node = this->getInput(0);
    if(node)
    {
        SOP_Node * getNode = node->castToSOPNode();

        std::cout<<"the node name is"<<getNode->getName()<<std::endl;
        GU_Detail *sop_detail = (GU_Detail *)getNode->getCookedGeo(context);
        // save the geometry into desk
        g_global_io global_io;
        updateAttributeList(global_io,sop_detail);
        ofstream fout;
        fout.open(savePath,std::ios_base::binary);
        global_io.save(fout);
        fout.close();

        // mata data for the ass
        save_mata_ass(arnold_dso_path,savePath,sop_detail);

    }

    else
    {
        std::cout<<"No Sop Geometry Connect!\n";
        return ;
    }
}