how to differentiate object is joint?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/08/2008 at 23:26, xxxxxxxx wrote:
User Information:
Cinema 4D Version: r9.5
Platform: Windows ;
Language(s) : C++ ;---------
I Want to differentiate object is joint or not in scene,
how Can I to Do by C++ sdk?
thank you advance!!!
Just check for Ojoint.>
\> if(op->GetType() == Ojoint) \> { \> //do something \> } \>
cheers,
Matthias-----------------
MAXON
developer support
that raise error show Ojoint is undefine,where is define Ojoint ? my code can't be compiler passed, Ojoint is not define:
void GetAllJoint(BaseDocument *doc, BaseObject *oJoints, int& iOutResult)
{
if (oJoints)
{
BaseObject *res = NULL;
ModelingCommandData cd;
cd.doc = doc;
cd.op = oJoints;
if(!SendModelingCommand(MCOMMAND_CURRENTSTATETOOBJECT, cd)) return;
res = static_cast<BaseObject*>(cd.result->GetIndex(0));
if(!res) return ;
if(res->GetType() == Ojoint)
{
iOutResult = 1;
}
if(oJoints->GetDown())
{
GetAllJoint(doc, oJoints->GetDown());
}
if(oJoints->GetNext())
{
GetAllJoint(doc, oJoints->GetNext(), iOutResult);
}
}
}
bool IsJointed()
{
BaseDocument *doc=GetActiveDocument();
BaseObject *obj = doc->GetFirstObject();
int iRet = 0;
if(obj)
{
GetAllJoint( doc,obj, iRet);
if ( iRet > 0)
{
return true;
}}
return false;
} -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/08/2008 at 23:39, xxxxxxxx wrote:
Ojoint is probably defined in the '_<_install_>_:modules' folder under 'ca2'. What I do to avoid these situations is copy the modules folder into my (copy of the) resource folder. Otherwise, you'll need to include the appropriate header include folders in your project settings.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/08/2008 at 00:34, xxxxxxxx wrote:
Which version of Cinema4D are you using? It compiles just fine under Cinema4D 10.5.
Btw. please don't open double threads for the same subject as it makes it harder to support.
cheers,
Matthias