THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/01/2011 at 09:07, xxxxxxxx wrote:
User Information:
Cinema 4D Version:
Platform:
Language(s) : C.O.F.F.E.E ;
---------
Hi,
I'm having some trouble with the Remove-Function of the BaseList2D class.
When i call this function, the object will be removed from the document, as it should be.
But the variable still contains the object.
I want to use this variable again, so it should be overwritten with a new defintion, but anything i do, it won't work.
I have an object that should be removed. The new Object is later allocated in the same variable.
But anything i do, its like the old object is kept.
var doc = GetActiveDocument();
var op, bc;
op = doc->GetActiveObject();
if (op) {
op->Remove();
doc->MultiMessage(MSG_UPDATE);
}
op = AllocObject(Ocube);
bc = op->GetContainer();
doc->InsertObject(op,null,null);
///Make Editable
doc->SetActiveObject(op);
SendModelingCommand(MCOMMAND_MAKEEDITABLE, doc, op, bc, MODIFY_ALL);
op = doc->GetActiveObject();
bc = op->GetContainer();
Subdivider(op,true,2,true); //A function i declared to subdive
The result i recieve, is that the old object gets subdivided, not the new cube. And i just don't get why and how i can prevent from this. :cry::cry:
The very strange is, if I change the variable for just the active object which gets removed, the result is the same O.o
thanks in advance, nux