Retrieving Object Data Problem
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/12/2004 at 05:52, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.012
Platform: Windows ;
Language(s) : C.O.F.F.E.E ;---------
<CODE>objectsChunk *_FormatSave::getObjData(BaseObject *obj)
{...
Polygon *poly = (Polygon * ) obj->GetTagData(Tpolygon);
Vector *point = (Vector * ) obj->GetTagData(Tpoint);
LONG numPolygons = obj->GetTagDataCount(Tpolygon);
LONG numVerts = obj->GetTagDataCount(Tpoint);...
block->verts = new Vector3[numVerts];
for (i = 0; i < numVerts; i++) {
block->verts _.x = point _.x;
block->verts _.y = point _.y;
block->verts _.z = point _.z;}
...
}</CODE>
Is this correct? it's seems to be wrong because the "obj->GetTagDataCount(Tpoint)" and "obj->GetTagDataCount(Tpolygon)" are returning 0 values, in scenes that have a cube object (i'm completely c4d noob too, i got c4d just for coding).
obs.: the "BaseObject" parameter of "objectsChunk *_FormatSave::getObjData(BaseObject *obj)" method is receiving data from the following call (modified for obvious reasons) :
<CODE>getObjData( BaseDocumentInst->GetFirstObject() );</CODE>
I started learning/coding c4d today and got some progress. I'm building this plugin to export/import my own data format and thus use it to load from my game engine.
And one more thing, there is a easy way to debug my plugin project, like using printf()?
Thanks in advance.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/12/2004 at 08:12, xxxxxxxx wrote:
i made some mistakes
block->verts.x = point.x;
block->verts.y = point.y;
block->verts.z = point.z;should be:
block->verts _.x = point _.x;
block- >verts _.y = point _.y;
block- >verts _.z = point _.z;and the language is C++
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/12/2004 at 08:31, xxxxxxxx wrote:
solved the problem
i was using a Cube Object, not a Polygon Object (oh god \o/)
and downloaded the Cinema 4D R8 SDK Help and discovered the GePrint() method from c4d_gerenal