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(L"GridWalkState_v1",
                           L"Grid Walk State",
                           L"Hold 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>>

Reply via email to