THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/06/2004 at 13:25, xxxxxxxx wrote:
Cinema 4D Version: 8.100
Platform: Windows ; Mac OSX ;
Language(s) : C.O.F.F.E.E ;
Terra4D is an open source plugin to combine Terragen with Cinema4D. Unfortunately it's impossible to import terrains from Terragen which are larger than 1024. It seems that there isn't enough memory to create such a big polygonobject.
if (pointcount <= 0 || polygoncount <= 0) return FALSE;
var obj = new(PolygonObject);
var points = new(array, pointcount);
var polygons = new(array, polygoncount*4);
var vc = new(VariableChanged);
var bt = new(BackupTags);
if (!obj->Message(MSG_POINTS_CHANGED, vc))
if (!obj->Message(MSG_POLYGONS_CHANGED, vc))
var obj = CreatePolygonObject(1, 2049*2049);
doc->InsertObject(obj, NULL, NULL);
The problem is the following command:
var polygons = new(array, 2048*2048*4);
I think COFFEE can't handle such big objects. But is there a workaround or something like that?
Thank you very much,
On 17/06/2004 at 19:17, xxxxxxxx wrote:
I don't think you need to set the polygon and point arrays in the function. The VariableChanged step should be enough; C4D will initialize the point and polygon arrays itself.
On 18/06/2004 at 02:37, xxxxxxxx wrote:
Mikael, thank you very much!