xsPolyInstance
Create an instance object as Cinema 4D does, except that it is a polygonal instance.
R12 32/64 - Mac/PC
xsSplitSelectionTags
Create distinct objects from Polygon Selection tags.
R12 32/64 - Mac/PC
AlignAssistant
Aligns children to PSR (Position / Scale / Rotation).
The first and the last object in the group are alignment-objects.
xsLayerColor
Associate to each object, a material depends on its layer.
R12 32/64 - Mac/PC

xsTargetCamera
Create a target camera at the same position as the current view camera.
xsTextureTags
Remove all texture tags from nonexistent materials in a single click.
SetInstance
On principle it is the same as the C4D build-in function "Add Instance Object"
but it works with multiple objects and it also takes the PSR of the original object.
The created instance object isn't selected (allow to create instances more fastly).
MergeDocument
How to merge two documents in COFFEE :
Example of use :
-
MyMenuPlugin::Execute(doc)
-
{
-
var file = new(Filename);
-
if (file->FileSelect("File to merge", FALSE) == FALSE)
-
return FALSE;
-
MergeDocument(doc, file);
-
return TRUE;
-
}
-
The MergeDocument() code :
ContainerFile
ContainerFile is a class which allow to save and apply all object's matrix of a hierarchy :
-
class ContainerFile
-
{
-
public:
-
ContainerFile(name);
-
Write(parent);
-
Apply(parent);
-
};
-
Just include this file in your COFFEE code : container_file.coh
include "container_file.coh"
Here the saveread plugin to show how to use this class : saveread.cof
/!\ Update available
AddBitmapButton
How to add a bitmap button in a COFFEE interface :
[bool] AddBitmapButton([int] id, [GeDialog] dialog, [string] name, [int] flags);
Use like this :
-
enum {
-
MY_BUTTON = 1000,
-
BITMAP_BUTTON,
-
_DUMMY_
-
}
-
-
MyDialog::CreateLayout()
-
{
-
SetTitle(PLUGIN_NAME);
-
AddButton(MY_BUTTON, BFV_FIT, 100, 15, "Dummy");
-
AddBitmapButton(BITMAP_BUTTON, this, "image.bmp", BFH_CENTER);
-
return TRUE;
-
}
-
-
MyDialog::Command(id, msg)
-
{
-
switch (id)
-
{
-
case MY_BUTTON :
-
println("Dummy button clicked");
-
break;
-
case BITMAP_BUTTON :
-
println("Bitmap button clicked");
-
break;
-
}
-
return TRUE;
-
}
Just include this file in your COFFEE code : bitmap_button.coh
include "bitmap_button.coh"
AddBitmap
How to add a bitmap in a COFFEE interface :
[bool] AddBitmap([int] id, [GeDialog] dialog, [string] name, [int] flags);
Use like this :
-
enum {
-
MY_BUTTON = 1000,
-
MY_BITMAP,
-
_DUMMY_
-
}
-
-
MyDialog::CreateLayout()
-
{
-
SetTitle(PLUGIN_NAME);
-
AddButton(MY_BUTTON, BFV_FIT, 100, 15, "Dummy");
-
AddBitmap(MY_BITMAP, this, "my_image.jpg", BFH_CENTER);
-
return TRUE;
-
}
Just include this file in your COFFEE code : bitmap_gui.coh
include "bitmap_gui.coh"
Vector & Stack
-
/*
-
** stack.coh
-
**
-
** Made by yann koeth
-
** Wed Mar 31 15:55:55 2010
-
*/
-
-
class Stack
-
{
-
private:
-
var data;
-
var next;
-
var count;
-
public:
-
Stack();
-
Push(data);
-
GetNext();
-
GetCount();
-
GetArray();
-
};
-
-
Stack::Stack()
-
{
-
next = NULL;
-
count = 0;
-
}
-
-
Stack::Push(data)
-
{
-
var ne = new(Stack);
-
ne->data = data;
-
ne->next = this;
-
ne->count = ++this->count;
-
this = ne;
-
return (this);
-
}
-
-
Stack::GetNext()
-
{
-
return (next);
-
}
-
-
Stack::GetCount()
-
{
-
return (count);
-
}
-
-
Stack::GetArray()
-
{
-
var arr = new(array, count + 1);
-
var i, stack;
-
for (i = 0, stack = this; i < count && stack; i++, stack = stack->next)
-
arr[i] = stack->data;
-
arr[i] = NULL;
-
return (arr);
-
}
-
/*
-
** StdVector.coh
-
**
-
** Made by yann koeth
-
** Wed Mar 31 15:55:55 2010
-
*/
-
-
class StdVector
-
{
-
private:
-
var arr;
-
var len;
-
public:
-
StdVector();
-
Size();
-
PushBack(value);
-
PushFront(value);
-
At(i);
-
};
-
-
StdVector::StdVector()
-
{
-
arr = new(array, 0);
-
len = 0;
-
}
-
-
StdVector::Size()
-
{
-
return len;
-
}
-
-
StdVector::PushBack(value)
-
{
-
var tmp = arr;
-
arr = new(array, len + 1);
-
var size = sizeof(tmp);
-
var i;
-
for (i = 0; i < size; i++)
-
arr[i] = tmp[i];
-
arr[size] = value;
-
len++;
-
}
-
-
StdVector::PushFront(value)
-
{
-
var tmp = arr;
-
arr = new(array, len + 1);
-
arr[0] = value;
-
var size = sizeof(tmp);
-
var i;
-
for(i=0; i<size; i++)
-
arr[i+1] = tmp[i];
-
len++;
-
}
-
-
StdVector::At(i)
-
{
-
if (i < sizeof(arr))
-
return arr[i];
-
else
-
return NULL;
-
}
xsXRefUpdate
![]()
Ceci est un plugin COFFEE pour Cinema 4D qui permet de mettre à jour les références de XRefs.
This is a COFFEE plugin for Cinema 4D that can update XRefs references.
Example :
XRef = object_02.c4d
Folder :
-- object1.c4d
-- object_02.c4d
-- object-4.c4d
-- object006.c4d
Le plugin va mettre à jour object_02.c4d en object006.c4d (le plus récent).
The plugin will update object_02.c4d into object006.c4d (the most recent).


(8 votes, average: 4.75 out of 5)
