RE: C++ : custom ice node with custom data type
This was to support polymorphism for Custom data type, similar to how you define a polymorphic port siICENodeDataLong | siICENodeDataFloat with built-in data types. For custom types, you can pass in an array of custom types that the port accepts. From: softimage-boun...@listproc.autodesk.com [mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Steven Caron Sent: Friday, April 12, 2013 11:43 AM To: softimage@listproc.autodesk.com Subject: Re: C++ : custom ice node with custom data type hey ho chung thanks for the response! i am well aware of this example code and have been referencing it already, my question still stands. if you look at the example at line 118-124 CStringArray outStateCustomType(1); outStateCustomType[0] = LGridWalkState_v1; st = nodeDef.AddOutputPort(ID_OUT_OutState, outStateCustomType, siICENodeStructureSingle, siICENodeContextComponent0D, LOut State,LOutState, ID_UNDEF,ID_UNDEF,ID_CTXT_CNS); why is it a string array? why not just a single CString? can i put two data types into one output port? doesn't make sense. i am trying to understand if there is some trick or benefit for having the argument be an array of strings vs a single string s On Thu, Apr 11, 2013 at 8:07 PM, Ho Chung Nguyen hochung.ngu...@autodesk.commailto:hochung.ngu...@autodesk.com wrote: You can connect to the SDK example workgroup and check out this custom ICE node InstallationPath\XSISDK\examples\workgroup\Addons\CustomICENodes\cppsrc_gridwalker\GridWalker.cpp attachment: winmail.dat
Re: C++ : custom ice node with custom data type
aah, that makes sense now. documentation could use some attention here. when we are on this side of the sdk/app things like this aren't always obvious. On Mon, Apr 15, 2013 at 3:51 AM, Ho Chung Nguyen hochung.ngu...@autodesk.com wrote: This was to support polymorphism for Custom data type, similar to how you define a polymorphic port siICENodeDataLong | siICENodeDataFloat with built-in data types. For custom types, you can pass in an array of custom types that the port accepts. From: softimage-boun...@listproc.autodesk.com [mailto: softimage-boun...@listproc.autodesk.com] On Behalf Of Steven Caron Sent: Friday, April 12, 2013 11:43 AM To: softimage@listproc.autodesk.com Subject: Re: C++ : custom ice node with custom data type hey ho chung thanks for the response! i am well aware of this example code and have been referencing it already, my question still stands. if you look at the example at line 118-124 CStringArray outStateCustomType(1); outStateCustomType[0] = LGridWalkState_v1; st = nodeDef.AddOutputPort(ID_OUT_OutState, outStateCustomType, siICENodeStructureSingle, siICENodeContextComponent0D, LOut State,LOutState, ID_UNDEF,ID_UNDEF,ID_CTXT_CNS); why is it a string array? why not just a single CString? can i put two data types into one output port? doesn't make sense. i am trying to understand if there is some trick or benefit for having the argument be an array of strings vs a single string s On Thu, Apr 11, 2013 at 8:07 PM, Ho Chung Nguyen hochung.ngu...@autodesk.commailto:hochung.ngu...@autodesk.com wrote: You can connect to the SDK example workgroup and check out this custom ICE node InstallationPath\XSISDK\examples\workgroup\Addons\CustomICENodes\cppsrc_gridwalker\GridWalker.cpp
C++ : custom ice node with custom data type
does anyone know why the ICENodeDef.AddOutputPort() method asks for a CStringArray of custom data types? http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.html?url=si_cpp/classXSI_1_1ICENodeDef.html,topicNumber=si_cpp_classXSI_1_1ICENodeDef_html,hash=ac0713341d32a19f748fec65f6837e6d3 i am trying to understand what benefit or feature providing multiple custom data type identifiers would do here. the documentation isn't clear on this, and since i am a n00b i need straight and to the point. thanks steven
RE: C++ : custom ice node with custom data type
You can connect to the SDK example workgroup and check out this custom ICE node InstallationPath\XSISDK\examples\workgroup\Addons\CustomICENodes\cppsrc_gridwalker\GridWalker.cpp (To connect, go to File Plugin Manager Workgroup Connect Try SDK Examples workgroup) The demo scene for this ICE node is here: InstallationPath\XSISDK\examples\workgroup\Addons\CustomICENodes\Data\Project\Scenes\GridWalker.scn The node registers a custom ICE data type called GridWalkState_v1 st = nodeDef.DefineCustomType(LGridWalkState_v1, LGrid Walk State, LHold particle states used for moving them on a grid., 23, 255, 255); And the custom data structure is actually: struct GridWalkerState { ULONG m_nRandomSequencePosition; ULONG m_nCurrentStep; LONG m_nCurrentPositionX, m_nCurrentPositionY; LONG m_nDirectionX, m_nDirectionY; }; There is no constraint between what you register and what data structure you actually use. You will still be using CDataArrayCustomType to read and write to the data passing between nodes. And you're also have to take care of resizing the elements in that array before writing to it. Custom data can have varying size, so you can have string or dynamic array in it if you'd like. From: softimage-boun...@listproc.autodesk.com [mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Steven Caron Sent: Thursday, April 11, 2013 2:18 PM To: softimage@listproc.autodesk.com Subject: C++ : custom ice node with custom data type does anyone know why the ICENodeDef.AddOutputPort() method asks for a CStringArray of custom data types? http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.html?url=si_cpp/classXSI_1_1ICENodeDef.html,topicNumber=si_cpp_classXSI_1_1ICENodeDef_html,hash=ac0713341d32a19f748fec65f6837e6d3 i am trying to understand what benefit or feature providing multiple custom data type identifiers would do here. the documentation isn't clear on this, and since i am a n00b i need straight and to the point. thanks steven attachment: winmail.dat
Re: C++ : custom ice node with custom data type
hey ho chung thanks for the response! i am well aware of this example code and have been referencing it already, my question still stands. if you look at the example at line 118-124 CStringArray outStateCustomType(1); outStateCustomType[0] = LGridWalkState_v1; st = nodeDef.AddOutputPort(ID_OUT_OutState, outStateCustomType, siICENodeStructureSingle, siICENodeContextComponent0D, LOut State,LOutState, ID_UNDEF,ID_UNDEF,ID_CTXT_CNS); why is it a string array? why not just a single CString? can i put two data types into one output port? doesn't make sense. i am trying to understand if there is some trick or benefit for having the argument be an array of strings vs a single string s On Thu, Apr 11, 2013 at 8:07 PM, Ho Chung Nguyen hochung.ngu...@autodesk.com wrote: You can connect to the SDK example workgroup and check out this custom ICE node InstallationPath\XSISDK\examples\workgroup\Addons\CustomICENodes\cppsrc_gridwalker\GridWalker.cpp