THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/07/2003 at 16:21, xxxxxxxx wrote:
Cinema 4D Version: 8.100
Language(s) : C.O.F.F.E.E ;
hi I just started trying out coffee and I am really stuck. I've been trying to create a simple sphere , just a sphere, but no matter what I do I always get errors. I then just copy and pasted the cube primitive example straight from the SDK just to see if the code even works and all I get is the error message "(5) incompatible values, NIL / object" and the error always occurs at line "cube->SetPrimitiveType(PRIMITIVE_CUBE);" from the SDK file.
am I doing something wrong or is that code from the SDK bugged? thanks for any help in advance.
On 30/07/2003 at 04:07, xxxxxxxx wrote:
In R8 this won´t work anymore. To create for example a simple sphere it is done like this: var sphere = new(SphereObject);
All primitives now have a class of their own. For other primitive types use a hex editor and load the Cinema4D.exe executable into it. The types can be extracted then (just do a search for SphereObject...)
On 30/07/2003 at 08:49, xxxxxxxx wrote:
would someone be so kind then to further clarify things for me? what would the code be to place a sphere with rad 10 in the scene at 0 0 0 ? I just need to see one piece of solid code to get me started here... I got all the other functions written out but it's useless if I can't test it with a primitive in the scene.
thanks in advance.
On 30/07/2003 at 08:56, xxxxxxxx wrote:
? I gave you some code to create the sphere.
Inserting the sphere can be done with doc->InsertObject() for example (it will automatically be inserted at 0.0.0 if you don´t change it)
For the Radius, please see the Container ID for this value in the SDK.
Get the Container with obj->GetContainer() and use GetData(ID) to get the Radius of the sphere. Change it with SetData(ID, value) and pass the filled container back to the object with obj->SetContainer(CONTAINER);
Have a look into the SDK preword that explains how containers in Cinema 4D work.
On 30/07/2003 at 09:04, xxxxxxxx wrote:
Hey Samir, where is this SDK preword? Do you have a link?
On 30/07/2003 at 10:22, xxxxxxxx wrote:
In the SDK Documentation. Please download it from the plugincafe (WinHelp or HTML available). The complete first part called "General" will give you basic information on how to generally use the Cinema 4D SDK.