Help in Visual C ++2005 programming
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/09/2008 at 03:45, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 10.5
Platform: Windows ;
Language(s) : C.O.F.F.E.E ; C++ ;---------
Hi there ..i tried to create a cube object ...
in coffee the code was :
var cube1 = new(CubeObject);
cube1->SetName("Object");
GetActiveDocument()->InsertObject(cube1,NULL,NULL);but in VC++ error show up ..
i take a look in the SDK i found this :
static BaseObject* Alloc(ocube)
VC++ gives errors on "ocube" and i'm sure it's right
and this :
BaseObject *GeneratePrimitive(BaseDocument *doc, LONG type, const BaseContainer &bc;, Real lod, Bool isoparm, BaseThread *bt)
but i didn't know the exact parameters ..
So help me please ..
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/09/2008 at 03:55, xxxxxxxx wrote:
I see two errors here.
First in COFFEE you should use
AllocObject(Ocube) and not new(CubeObject) anymore.
Second it is Ocube and not ocube.
In C++ it would be something like this
>
\> BaseObject \*cube = NULL; \> cube = BaseObject::Alloc(Ocube); \> if(!cube) return FALSE; \> \> doc- >InsertObject(cube, NULL, NULL); \>
Please also check the SDK examples.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/09/2008 at 06:23, xxxxxxxx wrote:
i tried your code and give me 2 errors :
Error 1 error C2065: 'doc' : undeclared identifier
Error 2 error C2227: left of '->InsertObject' must point to class/struct/union/generic type
it works when i Define the doc :
BaseDocument *doc = GetActiveDocument();
BaseObject *cube = NULL;
cube = BaseObject::Alloc(Ocube);
doc->InsertObject(cube, NULL, NULL);thanks Matthias ...
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/09/2008 at 06:28, xxxxxxxx wrote:
doc is the BaseDocument.
Please check the SDK examples and the SDK documentation for a general introduction into the C++ plugin API.
cheers,
Matthias