Unable to create primitives
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/11/2003 at 07:56, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.200
Platform: Mac OSX ;
Language(s) : C.O.F.F.E.E ;---------
I am having some serious COFFEE blues in version 8.2. I am unable to create PrimitiveObjects. The problem in its simplest form:Insert the following lines into the Execute method of the MenuPlugin stub supplied with the SDK:
var x = new(PrimitiveObject);
x->SetPrimitiveType(PRIMITIVE_CUBE); // fails here, x is NILx is NIL everytime. There is no other code in the example besides the minimum MenuPlugin overrides. COFFEE is not failing completely as I am able to create NullObjects or BooleObjects, for example. Can anyone create a PrimitiveObject? I'm freaked out!!
PS. Even in a COFFEE Expression Tag, the same 2 lines of code will fail... but I am able to create primitives thru the GUI : (
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/11/2003 at 07:40, xxxxxxxx wrote:
Starting with Version 8 you need to directly name the objects (instead of PrimitiveObject which no longer exists) - here's the complete list:
FFDObject
BezierObject
CameraObject
FloorObject
SkyObject
EnvironmentObject
ForegroundObject
BackgroundObject
ConPlaneObject
LoftObject
ExtrudeObject
HyperNURBSObject
LatheObject
SweepObject
BoneObject
MetaballObject
InstanceObject
ParticleObject
DeflectorObject
GravitationObject
RotationObject
WindObject
FrictionObject
TurbulenceObject
AttractorObject
DestructorObject
ExplosionObject
WindDeformObject
FormulaObject
ShatterObject
MeltObject
BooleObject
WrapObject
BendObject
BulgeObject
ShearObject
TaperObject
TwistObject
StageObject
MicrophoneObject
LoudspeakerObject
HeadphoneObject
NullObject
CubeObject
SphereObject
PlatonicObject
ConeObject
TorusObject
DiscObject
TubeObject
FigureObject
PyramidObject
PlaneObject
FractalObject
CylinderObject
CapsuleObject
OiltankObject
ReliefObject
SinglePolyObject
SplineFormulaObject
SplineTextObject
SplineNSideObject
Spline4SideObject
SplineCircleObject
SplineArcObject
SplineCissoidObject
SplineCycloidObject
SplineProfileObject
SplineHelixObject
SplineRectangleObject
SplineFlowerObject
SplineStarObject
SplineCogwheelObject
SplineContourObject
SymmetryObject
ArrayObject -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/11/2003 at 08:42, xxxxxxxx wrote:
Using the SDK PrimitiveObject example, I replaced PRIMITIVE_CUBE with CubeObject and it still does not work. What needs to be changed with this example to make it work?
// Creates a cube that's 200x100x300
var cube = new(PrimitiveObject);
cube->SetPrimitiveType(PRIMITIVE_CUBE);var bc = cube->GetContainer();
bc->SetData(PRIM_CUBE_LEN, vector(200, 100, 300));
cube->SetContainer(bc); -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/11/2003 at 09:14, xxxxxxxx wrote:
Nono...
var cube = new(CubeObject);
There is no SetPrimitiveType anymore! -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/11/2003 at 09:29, xxxxxxxx wrote:
This gives a syntax error at line 2 row 16.
// Creates a cube that's 200x100x300
var cube = new(CubeObject);
var bc = cube->GetContainer();
bc->SetData(PRIM_CUBE_LEN, vector(200, 100, 300));
cube->SetContainer(bc); -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/11/2003 at 09:34, xxxxxxxx wrote:
You're sure you're using version 8? Your code definitely works...
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/11/2003 at 09:43, xxxxxxxx wrote:
Yes, I am using V8.207. I have inserted a null object and and a coffee expression tag. Placing this code in and compiling and executing produces no errors but does not create a cube. If I save this code as a COF file I get a (4) Too few parameters error.
main(doc,op)
{
// Creates a cube that's 200x100x300
var cube = new(CubeObject);
var bc = cube->GetContainer();
bc->SetData(PRIM_CUBE_LEN, vector(200, 100, 300));
cube->SetContainer(bc);
} -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/11/2003 at 14:06, xxxxxxxx wrote:
You've forgotten to insert the object into the document
doc->InsertObject(cube,NULL,NULL); -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/11/2003 at 14:33, xxxxxxxx wrote:
That worked!
Thank you.