Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

0 Neutral

About adam_perin

  • Rank

Personal Information

  • Name
    adam perin
  • Location
  1. Looking at the sample GUI_PolygonNormalShade, I'm trying to replace the material in the viewport when a visualizer is set. I have been trying to do this by copying the approach used in GUI_PolygonNormalShade but instead of writing new "Cd" attributes I want to write a new "shop_materialpath" attribute to the detail attributes. Its look like everything is correct (no crashes or errors) but I'm still not getting the new material to show in the viewport. Any ideas would be super helpful. Here is the code from the filterPrimitive function. processed = GR_PROCESSED; char arr[] = "/mat/test"; OP_Node* matNode = OPgetDirector()->findNode(arr); if (!matNode) { OP_Network *parent = (OP_Network *)OPgetDirector()->findNode("/mat"); parent->createNode("tooncolorshader", "test"); matNode = OPgetDirector()->findNode(arr); } string path(arr); auto indexedString = new GT_DAIndexedString(1); indexedString->setString(0, 0, path.c_str()); GT_AttributeListHandle dah = gt_prm->getDetailAttributes()->addAttribute("shop_materialpath", indexedString, true); auto mesh = UTverify_cast<const GT_PrimPolygonMesh *>(gt_prm.get()); ph = new GT_PrimPolygonMesh(*mesh, mesh->getPointAttributes(), mesh->getVertexAttributes(), mesh->getUniformAttributes(), dah); // return a new polygon mesh with modified shop_materialpath attribute. return ph;
  2. Scene Option

    Im making a plugin based off of the DM_InfoHook example. I cant find any examples of SceneOptions where there are any parameters being exposed in the ui (like you find on a marker visualizer below). I would like to be able to supply an int parameter and then use the data in the render. Has anyone messed with this? Let me know if you need clarification.