THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/04/2004 at 16:15, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.100
Platform: Windows ;
Language(s) : C++ ;
---------
Hi,
I am new to C4D Pluggin and found out the last days that this forum is the only way to really learn Plugin Coding for Cinema :-/ ...
I am about to Insert an Object into an active document but cannot see nor select it... It took me about 2 days to find the right commands but they do not seem to work, what went wrong? Is there any readable help except for the SDK api to learn such things?
My Code:
BaseObject *obbc;
BaseContainer ObjDescr;
Vector Seiten;
Seiten.x = 10.0;
Seiten.y = 10.0;
Seiten.z = 10.0;
ObjDescr.SetVector(PRIM_CUBE_LEN, Seiten);
obbc = AllocPrimitiveObject(PRIMITIVE_CUBE);
ClearMem(&obbc, sizeof(obbc));
obbc = GeneratePrimitive(GetActiveDocument(), PRIMITIVE_CUBE, ObjDescr, 10, NULL, NULL);
obbc->SetName("TestQuader");
GetActiveDocument()->InsertObject(obbc, NULL, NULL, TRUE);
I suppose this should work but nothing happens - help! (Actually the routine is startet as I checked with some debugging output cut off in this code excerpt, so this cannot be the problem