RE: C++ question
| Date : Tue, 5 Jul 2005 17:01:17 +0900 |
| To : <XSI(at)Softimage.COM> |
| From : "Hans,Veenendaal,AMplus R&D,SOJ" <Hans_van_Veenendaal(at)sega.co.jp> |
| Subject : RE: C++ question |
Thanks a lot!
I'll have a go with this.
Hans.
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf Of Aloys Baillet
Sent: Tuesday, July 05, 2005 2:46 PM
To: XSI(at)Softimage.COM
Subject: Re: C++ questionHi Hans,
Indeed, that's one of the missing features of the C++ API...
You will have to use the CComAPIHandler to get the Member property.
Here is some code that should help you if it's the first time you're using it.
The tricky part is that the SceneItemCollection COM object is not translated in a CRefArray by the GetProperty, so you have to use the CComAPIHandler all the way long...
CComAPIHandler oGroup( oGroupRef );
CValue oGroupMembers( oGroup.GetProperty( L"Members") );
CComAPIHandler oGroupSceneItems( oGroupMembers );
long nbMembers = oGroupSceneItems.GetProperty(L"Count");
Application().LogMessage(L"NB Members: " + CValue(nbMembers).GetAsText());
for (long i=0; i<nbMembers; i++)
{
CValue oRef;
CValueArray oArgs(1);
oArgs[0] = CValue(i);
oGroupSceneItems.Invoke(L"Item", oGroupSceneItems.PropertyGet , oRef, oArgs);
X3DObject oObj(oRef);
Application().LogMessage(L"Member : " + oObj.GetFullName());
}
Hope this helps!
Aloys<snip>--
Aloys Baillet - XSI Technical Director
Character Dpt - Animal Logic
--
| DATE: | << | >> | THREAD: | << | >> | INDEX: | Main | Thread |
|---|
- Previous by Date: OT: Dinosaur skeleton model
- Next by Date: OT: Dinosaur skeleton model
- Previous by Thread: OT: Dinosaur skeleton model
- Next by Thread: OT: Dinosaur skeleton model
- Index(es):
| Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available. |