THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/03/2009 at 04:15, xxxxxxxx wrote:
Cinema 4D Version: 11
Platform: Mac ; Mac OSX ;
Language(s) : C.O.F.F.E.E ;
I am trying to write an export script with C.O.F.F.E.E and want to walk the hierarchy and be able to tell that the object I have is a joint, and therefore part of a skeleton.
I am walking the scene with doc->GetFirstObject(); and subsequent GetNext() and GetDown() calls on the object but when I use getclass() I typically get BaseObject but nothing more useful. I see that OJoint and OBone can be allocated but I don't see a way to ask a BaseObject what type it is (or if there are any additional methods off an OJoint or OBone).
Does anyone know a way to do this with C.O.F.F.E.E. or do I need to look at a C++ plugin, or use some naming convention on a joint?
I imagine that knowing it is a joint is probably enough.
On 28/03/2009 at 06:05, xxxxxxxx wrote:
You'll need to use GetType() (returns the ID)
or check the object by using op->IsInstanceOf(Ojoint)
> \> if (!op) return; \> \> var type = op->GetType(); \> println(type); // this will print the ID \> \> if(op->IsInstanceOf(Ojoint)); \> println("Ojoint it is"); \>
\> if (!op) return; \> \> var type = op->GetType(); \> println(type); // this will print the ID \> \> if(op->IsInstanceOf(Ojoint)); \> println("Ojoint it is"); \>
On 28/03/2009 at 07:46, xxxxxxxx wrote:
Ahhh, right. Thanks! I'll give that a go - I thought there should be something in there somewhere! guess I am too used to my code being intelisensed for me!
Am I right in thinking that I cannot call any Ojoint specific methods though?
On 28/03/2009 at 08:42, xxxxxxxx wrote:
Works like a dream