THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/04/2008 at 07:52, xxxxxxxx wrote:
Cinema 4D Version:
Hi. I'm a complete newbie at coffee, and so I got a lot of questions, but here is my concrete problem:
I'm trying to write a script in coffee, which creates a cube and then extrudes one polygon. After a few hours of reading and testing I managed to write the following code:
var doc = GetActiveDocument();
if (!doc) return;
var wuerfel = new(PolygonObject);
wuerfel = AllocObject(Ocube);
var datac = new(BaseContainer);
wuerfel = SendModelingCommand(MCOMMAND_MAKEEDITABLE, doc, wuerfel, datac, MODIFY_ALL);
SendModelingCommand(ID_MODELING_EXTRUDE_TOOL, doc, wuerfel, bc, MODIFY_POLYGONSELECTION);
My questions are:
1. I think I made some things to complicated, or just not the best way. I would be pleased if you tell me, which things, as I'm a real newbie and thankful for every advise on that.
2. Creating the cube works fine, making it editable also, but nothing is extrude. What's wrong here?
3. How can I select a single polygon of the cube? I tried SetPolygonSelection on the cube, but either I did something wrong or you have to go another way with a cube.
Thanks so far