THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/02/2011 at 10:48, xxxxxxxx wrote:
Cinema 4D Version: 10+
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
Is there a bug or something in the MCOMMAND_JOIN modeling command?
It seems that if I try to connect 2 object with MCOMMAND_JOIN it fails if the 2 objects have different parent objects. So I tried creating a temporary document and copying the object to be joined into that document each one on the root level, then using the command on the temporary document, and bring the result back into the active document. The join failed. The resulting mesh is only one of the selected meshes.
Here's my test code:
Bool CDTestCommand::Execute(BaseDocument *doc)
StopAllThreads(); // so the document can be safely modified
AutoAlloc<AtomArray> objects; if (!objects) return FALSE;
// temporary storage
AutoAlloc<AtomArray> joinOps; if (!joinOps) return FALSE;
AutoAlloc<BaseDocument> tempDoc; if(!tempDoc) return FALSE;
LONG i, oCnt = objects->GetCount();
if(oCnt > 1)
for(i=0; i<oCnt; i++)
BaseObject *mrg = static_cast<BaseObject*>(objects->GetIndex(i));
BaseObject *cln = (BaseObject* )mrg->GetClone(COPY_NO_HIERARCHY|COPY_NO_ANIMATION,NULL);
else GePrint("GetClone() failed");
else GePrint("merge object "+LongToString(i)+" = NULL");
mcd.doc = tempDoc;
mcd.arr = joinOps;
BaseObject *newOp = static_cast<BaseObject*>(mcd.result->GetIndex(0));
Is something wrong with my code?
On 01/03/2011 at 08:07, xxxxxxxx wrote:
OK, never mind.
I decided to use this instead:
On 01/03/2011 at 10:19, xxxxxxxx wrote:
I've posted a bug concerning the SMC and the Mirror tool here.
But that's not the only SMC I've had problems with. Mostly in Coffee.
I have a feeling that there are at least a few more of them in there that also don't work properly Dan.
And someone needs to go through them and see what's broken.
Probably a good job for an intern. If Maxon has coding interns.
On 16/03/2011 at 08:46, xxxxxxxx wrote:
Does it work now in C++ ?
I'm not a C++'er so I can't test it.
On 16/03/2011 at 10:33, xxxxxxxx wrote:
These SMC bugs are based in C++.
ASFAIK. Coffee and Python are derived from the C++ API. So if something is broken in C++ then they also won't work in Coffee & Python.