CStatus RegisterToonixLighter( PluginRegistrar& in_reg ) { ICENodeDef nodeDef; nodeDef = Application().GetFactory().CreateICENodeDef(L"ToonixLighter",L"ToonixLighter"); CStatus st; st = nodeDef.PutColor(ToonixNodeR,ToonixNodeG,ToonixNodeB); st.AssertSucceeded( ) ; // Add custom types definition. st = nodeDef.DefineCustomType(L"ToonixData",L"ToonixData",L"ToonixData",ToonixLineR,ToonixLineG,ToonixLineB); st.AssertSucceeded( ) ; // Add input ports and groups. st = nodeDef.AddPortGroup(ID_G_100); st.AssertSucceeded( ) ; CStringArray ToonixLineCustomType(1); ToonixLineCustomType[0] = L"ToonixData"; st = nodeDef.AddInputPort(ID_IN_ToonixData,ID_G_100,ToonixLineCustomType,siICENodeStructureSingle,siICENodeContextSingleton,L"ToonixData",L"ToonixData",ID_UNDEF,ID_UNDEF,ID_CTXT_CNS); st.AssertSucceeded( ) ; st = nodeDef.AddInputPort(ID_IN_ViewPosition,ID_G_100,siICENodeDataVector3,siICENodeStructureSingle,siICENodeContextSingleton,L"ViewPosition",L"ViewPosition"); st.AssertSucceeded( ) ; st = nodeDef.AddInputPort(ID_IN_LightPosition,ID_G_100,siICENodeDataVector3,siICENodeStructureAny,siICENodeContextSingleton,L"LightPosition",L"LightPosition"); st.AssertSucceeded( ) ; st = nodeDef.AddInputPort(ID_IN_LightBias,ID_G_100,siICENodeDataFloat,siICENodeStructureAny,siICENodeContextSingleton,L"LightBias",L"LightBias",0.0); st.AssertSucceeded( ) ; st = nodeDef.AddInputPort(ID_IN_LightDistance,ID_G_100,siICENodeDataFloat,siICENodeStructureAny,siICENodeContextSingleton,L"LightDistance",L"LightDistance",100.0); st.AssertSucceeded( ) ; st = nodeDef.AddInputPort(ID_IN_Revert,ID_G_100,siICENodeDataBool,siICENodeStructureSingle,siICENodeContextSingleton,L"Revert",L"Revert",false); st.AssertSucceeded( ) ; st = nodeDef.AddInputPort(ID_IN_Push,ID_G_100,siICENodeDataFloat,siICENodeStructureSingle,siICENodeContextSingleton,L"Push",L"Push",0.0); st.AssertSucceeded( ) ; st = nodeDef.AddInputPort(ID_IN_ByTriangle,ID_G_100,siICENodeDataBool,siICENodeStructureSingle,siICENodeContextSingleton,L"ByTriangle",L"ByTriangle",true); st.AssertSucceeded( ) ; // Add output ports. st = nodeDef.AddOutputPort(ID_OUT_Vertices,siICENodeDataVector3,siICENodeStructureArray,siICENodeContextSingleton,L"Vertices",L"Vertices",ID_UNDEF,ID_UNDEF,ID_CTXT_CNS); st.AssertSucceeded( ) ; st = nodeDef.AddOutputPort(ID_OUT_Polygons,siICENodeDataLong,siICENodeStructureArray,siICENodeContextSingleton,L"Polygons",L"Polygons",ID_UNDEF,ID_UNDEF,ID_CTXT_CNS); st.AssertSucceeded( ) ; PluginItem nodeItem = in_reg.RegisterICENode(nodeDef); nodeItem.PutCategories(L"Toonix"); return CStatus::OK; }
CStatus RegisterToonixCurve(PluginRegistrar& in_reg) { ICENodeDef nodeDef; nodeDef = Application().GetFactory().CreateICENodeDef(L"ToonixCurve", L"ToonixCurve"); CStatus st; st = nodeDef.PutColor(ToonixNodeR, ToonixNodeG, ToonixNodeB); st.AssertSucceeded(); st = nodeDef.PutThreadingModel(siICENodeSingleThreading); st.AssertSucceeded(); // Add custom types definition. st = nodeDef.DefineCustomType(L"ToonixLine", L"ToonixLine", L"ToonixLine", ToonixLineR, ToonixLineG, ToonixLineB); st.AssertSucceeded(); // Add input ports and groups. st = nodeDef.AddPortGroup(ID_G_100); st.AssertSucceeded(); st = nodeDef.AddInputPort(ID_IN_Curves, ID_G_100, siICENodeDataGeometry, siICENodeStructureSingle, siICENodeContextSingleton, L"Curves", L"Curves"); st.AssertSucceeded(); st = nodeDef.AddInputPort(ID_IN_ViewPosition, ID_G_100, siICENodeDataVector3, siICENodeStructureAny, siICENodeContextSingleton, L"ViewPoint", L"ViewPoint"); st.AssertSucceeded(); st = nodeDef.AddInputPort(ID_IN_Width, ID_G_100, siICENodeDataFloat, siICENodeStructureSingle, siICENodeContextSingleton, L"Width", L"Width", 0.1); st.AssertSucceeded(); st = nodeDef.AddInputPort(ID_IN_BreakAngle, ID_G_100, siICENodeDataFloat, siICENodeStructureSingle, siICENodeContextSingleton, L"BreakAngle", L"BreakAngle", 90.0); st.AssertSucceeded(); st = nodeDef.AddInputPort(ID_IN_Extend, ID_G_100, siICENodeDataFloat, siICENodeStructureSingle, siICENodeContextSingleton, L"Extend", L"Extend", 0.0); st.AssertSucceeded(); st = nodeDef.AddInputPort(ID_IN_FilterPoints, ID_G_100, siICENodeDataFloat, siICENodeStructureSingle, siICENodeContextSingleton, L"FilterPoints", L"FilterPoints", 0.0); st.AssertSucceeded(); st = nodeDef.AddInputPort(ID_IN_Smooth, ID_G_100, siICENodeDataBool, siICENodeStructureSingle, siICENodeContextSingleton, L"SmoothSilhouette", L"SmoothSilhouette", true); st.AssertSucceeded(); // Add output ports. CStringArray ToonixLineCustomType(1); ToonixLineCustomType[0] = L"ToonixLine"; st = nodeDef.AddOutputPort(ID_OUT_ToonixLine, ToonixLineCustomType, siICENodeStructureSingle, siICENodeContextSingleton, L"ToonixLine", L"ToonixLine", ID_UNDEF, ID_UNDEF, ID_CTXT_CNS); st.AssertSucceeded(); PluginItem nodeItem = in_reg.RegisterICENode(nodeDef); nodeItem.PutCategories(L"Toonix"); return CStatus::OK; }
CStatus RegisterToonixMesher( PluginRegistrar& in_reg ) { ICENodeDef nodeDef; nodeDef = Application().GetFactory().CreateICENodeDef(L"ToonixMesher",L"ToonixMesher"); CStatus st; st = nodeDef.PutColor(ToonixNodeR,ToonixNodeG,ToonixNodeB); st.AssertSucceeded( ) ; st = nodeDef.PutThreadingModel(siICENodeSingleThreading); st.AssertSucceeded( ) ; // Add custom types definition. st = nodeDef.DefineCustomType(L"ToonixLine",L"ToonixLine",L"ToonixLine",ToonixLineR,ToonixLineG,ToonixLineB); st.AssertSucceeded( ) ; // Add input ports and groups. st = nodeDef.AddPortGroup(ID_G_100); st.AssertSucceeded( ) ; CStringArray ToonixLineCustomType(1); ToonixLineCustomType[0] = L"ToonixLine"; st = nodeDef.AddInputPort(ID_IN_ToonixLine,ID_G_100,ToonixLineCustomType,siICENodeStructureSingle,siICENodeContextSingleton,L"ToonixLine",L"ToonixLine",ID_UNDEF,ID_UNDEF,ID_CTXT_CNS); st.AssertSucceeded( ) ; st = nodeDef.AddInputPort(ID_IN_Subdiv,ID_G_100,siICENodeDataLong,siICENodeStructureSingle,siICENodeContextSingleton,L"Subdivisions",L"Subdivisions",6); st.AssertSucceeded( ) ; st = nodeDef.AddInputPort(ID_IN_ViewPosition,ID_G_100,siICENodeDataVector3,siICENodeStructureSingle,siICENodeContextSingleton,L"ViewPosition",L"ViewPosition"); st.AssertSucceeded( ) ; // Add output ports. st = nodeDef.AddOutputPort(ID_OUT_Vertices,siICENodeDataVector3,siICENodeStructureArray,siICENodeContextSingleton,L"Vertices",L"Vertices",ID_UNDEF,ID_UNDEF,ID_CTXT_CNS); st.AssertSucceeded( ) ; st = nodeDef.AddOutputPort(ID_OUT_Polygons,siICENodeDataLong,siICENodeStructureArray,siICENodeContextSingleton,L"Polygons",L"Polygons",ID_UNDEF,ID_UNDEF,ID_CTXT_CNS); st.AssertSucceeded( ) ; PluginItem nodeItem = in_reg.RegisterICENode(nodeDef); nodeItem.PutCategories(L"Toonix"); return CStatus::OK; }