Here you will find documentation on all the descriptions that Cinema 4D currently has. You can list them Alphabetically, by Type or Plugin . The sample Python and C++ code is automatically generated and in some cases may not be 100% correct. If something doesn't work then please refer to the official Cinema 4D SDK documentation for more information.

IDs and information for Tvolumebuilder

Tvolumebuilder

Attributes

  • ENGLISH NAME : VolumeBuilderTag
  • NAME : Tvolumebuilder
  • INCLUDE : Tbase
  • PATH : volumes/description/tvolumebuilder.res
  • PLUGIN : volumes
  • MAXON online help (may not exist): TVOLUMEBUILDER

Elements

ID UI Name Type Parameters Cycle
ID_VOLUMEBUILDER_TAG_PERFECT_PRIMITIVE PerfectPrimitive BOOL NAME
ID_VOLUMEBUILDER_TAG_USEPOINTS UseMeshPoints BOOL NAME
ID_VOLUMEBUILDER_TAG_MESHRADIUS MeshPointRadius REAL
MIN 0.01
STEP 0.1
UNIT METER
ID_VOLUMEBUILDER_TAG_OPTIMIZEANDCLOSE OptimizeandCloseHoles BOOL NAME
ID_VOLUMEBUILDER_TAG_USEPARTICLERADIUS UseParticleSize BOOL NAME
ID_VOLUMEBUILDER_TAG_RADIUS Radius REAL
MIN 0.01
STEP 0.1
UNIT METER
ID_VOLUMEBUILDER_TAG_DENSITY Density REAL
MIN 0.01
STEP 0.1
ID_VOLUMEBUILDER_TAG_SPLINERADIUS_SCALESPLINE ScaleAlong SPLINE NEWLINE
ID_VOLUMEBUILDER_TAG_SPLINERADIUS_PERSEGMENT ScaleperSegment BOOL NAME
ID_VOLUMEBUILDER_TAG_VELOCITY_SCALE VelocityScale REAL
MIN 0.0
STEP 0.01
ID_VOLUMEBUILDER_TAG_VECTOR_CONVERSION_MODE ConvertFrom LONG  
ID_VOLUMEBUILDER_TAG_VECTOR_CONVERSION_MODE_SDF SignedDistanceField
ID_VOLUMEBUILDER_TAG_VECTOR_CONVERSION_MODE_UDF DistanceField
ID_VOLUMEBUILDER_TAG_VECTOR_CONVERSION_MODE_FOG Fog
ID_VOLUMEBUILDER_TAG_INTERIOR_VOXEL_FALLOFF InsideVoxelFalloff LONG
MIN 1
STEP 1
ID_VOLUMEBUILDER_TAG_INFINITEFALLOFF MaximumVoxelFalloff BOOL NAME
ID_VOLUMEBUILDER_TAG_ISO SurfaceThreshold REAL STEP
ID_VOLUMEBUILDER_TAG_SOURCETYPE CreationSpace LONG  
ID_VOLUMEBUILDER_TAG_SOURCETYPE_BOUNDINGBOX Box
ID_VOLUMEBUILDER_TAG_SOURCETYPE_PREVIOUS ObjectsBelow
ID_VOLUMEBUILDER_TAG_BBPOSITION P VECTOR
UNIT METER
CUSTOMGUI SUBDESCRIPTION
ID_VOLUMEBUILDER_TAG_BBSIZE S VECTOR
UNIT METER
MIN 0.0
STEP 1.0
CUSTOMGUI SUBDESCRIPTION
ID_VOLUMEBUILDER_TAG_BBROTATION R VECTOR
UNIT DEGREE
CUSTOMGUI SUBDESCRIPTION
ID_VOLUMEBUILDER_TAG_FIELD_CREATION_REF OverrideBoxMatrix LINK  
ID_VOLUMEBUILDER_TAG_CREATE_CONTROLLER CreateController BUTTON NAME
ID_VOLUMEBUILDER_TAG_HALF_BAND_MESH_INTERIOR InteriorVoxelRange LONG
MIN 1
STEP 1
ID_VOLUMEBUILDER_TAG_HALF_BAND_MESH_EXTERIOR ExteriorVoxelRange LONG
MIN 1
STEP 1
ID_VOLUMEBUILDER_TAG_HALF_BAND_SPLINE SplineVoxelRange LONG
MIN 1
STEP 1
ID_VOLUMEBUILDER_TAG_HALF_BAND_PARTICLE ParticleVoxelRange LONG
MIN 1
STEP 1

Example Code

The following code does not use the correct values when setting the data. You should check directly in C4D for the correct values that you should use in place of the ones that are shown. This code is just to show you how to access the values for getting and setting the parameters.

Python

import c4d
from c4d import gui
def main():
    obj = c4d.BaseObject(c4d.Osphere)
    tag = obj.MakeTag(c4d.Tvolumebuilder)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    tag[c4d.ID_VOLUMEBUILDER_TAG_PERFECT_PRIMITIVE] = True
    tag[c4d.ID_VOLUMEBUILDER_TAG_USEPOINTS] = True
    tag[c4d.ID_VOLUMEBUILDER_TAG_MESHRADIUS] = 0.1
    tag[c4d.ID_VOLUMEBUILDER_TAG_OPTIMIZEANDCLOSE] = True
    tag[c4d.ID_VOLUMEBUILDER_TAG_USEPARTICLERADIUS] = True
    tag[c4d.ID_VOLUMEBUILDER_TAG_RADIUS] = 0.1
    tag[c4d.ID_VOLUMEBUILDER_TAG_DENSITY] = 0.1
    tag[c4d.ID_VOLUMEBUILDER_TAG_SPLINERADIUS_PERSEGMENT] = True
    tag[c4d.ID_VOLUMEBUILDER_TAG_VELOCITY_SCALE] = 0.1
    tag[c4d.ID_VOLUMEBUILDER_TAG_VECTOR_CONVERSION_MODE] = c4d.ID_VOLUMEBUILDER_TAG_VECTOR_CONVERSION_MODE_SDF
    tag[c4d.ID_VOLUMEBUILDER_TAG_INTERIOR_VOXEL_FALLOFF] = 1
    tag[c4d.ID_VOLUMEBUILDER_TAG_INFINITEFALLOFF] = True
    tag[c4d.ID_VOLUMEBUILDER_TAG_ISO] = 0.1
    tag[c4d.ID_VOLUMEBUILDER_TAG_SOURCETYPE] = c4d.ID_VOLUMEBUILDER_TAG_SOURCETYPE_BOUNDINGBOX
    tag[c4d.ID_VOLUMEBUILDER_TAG_BBPOSITION] = c4d.Vector(1.0,1.0,1.0)
    tag[c4d.ID_VOLUMEBUILDER_TAG_BBSIZE] = c4d.Vector(1.0,1.0,1.0)
    tag[c4d.ID_VOLUMEBUILDER_TAG_BBROTATION] = c4d.Vector(1.0,1.0,1.0)
    tag[c4d.ID_VOLUMEBUILDER_TAG_HALF_BAND_MESH_INTERIOR] = 1
    tag[c4d.ID_VOLUMEBUILDER_TAG_HALF_BAND_MESH_EXTERIOR] = 1
    tag[c4d.ID_VOLUMEBUILDER_TAG_HALF_BAND_SPLINE] = 1
    tag[c4d.ID_VOLUMEBUILDER_TAG_HALF_BAND_PARTICLE] = 1
    
    #Second way, using the base container.
    bc = tag.GetDataInstance()
    bc.SetBool(c4d.ID_VOLUMEBUILDER_TAG_PERFECT_PRIMITIVE,True)
    bc.SetBool(c4d.ID_VOLUMEBUILDER_TAG_USEPOINTS,True)
    bc.SetFloat(c4d.ID_VOLUMEBUILDER_TAG_MESHRADIUS,0.1)
    bc.SetBool(c4d.ID_VOLUMEBUILDER_TAG_OPTIMIZEANDCLOSE,True)
    bc.SetBool(c4d.ID_VOLUMEBUILDER_TAG_USEPARTICLERADIUS,True)
    bc.SetFloat(c4d.ID_VOLUMEBUILDER_TAG_RADIUS,0.1)
    bc.SetFloat(c4d.ID_VOLUMEBUILDER_TAG_DENSITY,0.1)
    bc.SetBool(c4d.ID_VOLUMEBUILDER_TAG_SPLINERADIUS_PERSEGMENT,True)
    bc.SetFloat(c4d.ID_VOLUMEBUILDER_TAG_VELOCITY_SCALE,0.1)
    bc.SetInt32(c4d.ID_VOLUMEBUILDER_TAG_VECTOR_CONVERSION_MODE,c4d.ID_VOLUMEBUILDER_TAG_VECTOR_CONVERSION_MODE_SDF)
    bc.SetInt32(c4d.ID_VOLUMEBUILDER_TAG_INTERIOR_VOXEL_FALLOFF,1)
    bc.SetBool(c4d.ID_VOLUMEBUILDER_TAG_INFINITEFALLOFF,True)
    bc.SetFloat(c4d.ID_VOLUMEBUILDER_TAG_ISO,0.1)
    bc.SetInt32(c4d.ID_VOLUMEBUILDER_TAG_SOURCETYPE,c4d.ID_VOLUMEBUILDER_TAG_SOURCETYPE_BOUNDINGBOX)
    bc.SetVector(c4d.ID_VOLUMEBUILDER_TAG_BBPOSITION, c4d.Vector(1.0,1.0,1.0)
    bc.SetVector(c4d.ID_VOLUMEBUILDER_TAG_BBSIZE, c4d.Vector(1.0,1.0,1.0)
    bc.SetVector(c4d.ID_VOLUMEBUILDER_TAG_BBROTATION, c4d.Vector(1.0,1.0,1.0)
    bc.SetInt32(c4d.ID_VOLUMEBUILDER_TAG_HALF_BAND_MESH_INTERIOR,1)
    bc.SetInt32(c4d.ID_VOLUMEBUILDER_TAG_HALF_BAND_MESH_EXTERIOR,1)
    bc.SetInt32(c4d.ID_VOLUMEBUILDER_TAG_HALF_BAND_SPLINE,1)
    bc.SetInt32(c4d.ID_VOLUMEBUILDER_TAG_HALF_BAND_PARTICLE,1)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../volumes/description/tvolumebuilder.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Osphere);
    pDoc->InsertObject(pObject);
    pDoc->StartUndo();
    pDoc->AddUndo(UNDOTYPE_NEW,pObject);
    pDoc->EndUndo();
    pDoc->StartUndo();
    BaseTag *pTag = pObject->MakeTag(Tvolumebuilder);
    pDoc->AddUndo(UNDOTYPE_NEW,pTag);
    pDoc->EndUndo();
    pObject->Message(MSG_UPDATE);
    
    //You can set parameters two different ways. 

    //First way              
    //Some objects do not store all their data in the container. You need to use GetParameter()/SetParameter() instead. 

    DESCFLAGS_SET flags = DESCFLAGS_SET_PARAM_SET;
    pTag->SetParameter(DescID(ID_VOLUMEBUILDER_TAG_PERFECT_PRIMITIVE),GeData(true),flags);
    pTag->SetParameter(DescID(ID_VOLUMEBUILDER_TAG_USEPOINTS),GeData(true),flags);
    pTag->SetParameter(DescID(ID_VOLUMEBUILDER_TAG_MESHRADIUS),GeData(0.1),flags);
    pTag->SetParameter(DescID(ID_VOLUMEBUILDER_TAG_OPTIMIZEANDCLOSE),GeData(true),flags);
    pTag->SetParameter(DescID(ID_VOLUMEBUILDER_TAG_USEPARTICLERADIUS),GeData(true),flags);
    pTag->SetParameter(DescID(ID_VOLUMEBUILDER_TAG_RADIUS),GeData(0.1),flags);
    pTag->SetParameter(DescID(ID_VOLUMEBUILDER_TAG_DENSITY),GeData(0.1),flags);
    pTag->SetParameter(DescID(ID_VOLUMEBUILDER_TAG_SPLINERADIUS_PERSEGMENT),GeData(true),flags);
    pTag->SetParameter(DescID(ID_VOLUMEBUILDER_TAG_VELOCITY_SCALE),GeData(0.1),flags);
    pTag->SetParameter(DescID(ID_VOLUMEBUILDER_TAG_VECTOR_CONVERSION_MODE),GeData(ID_VOLUMEBUILDER_TAG_VECTOR_CONVERSION_MODE_SDF),flags);
    pTag->SetParameter(DescID(ID_VOLUMEBUILDER_TAG_INTERIOR_VOXEL_FALLOFF),GeData(1),flags);
    pTag->SetParameter(DescID(ID_VOLUMEBUILDER_TAG_INFINITEFALLOFF),GeData(true),flags);
    pTag->SetParameter(DescID(ID_VOLUMEBUILDER_TAG_ISO),GeData(0.1),flags);
    pTag->SetParameter(DescID(ID_VOLUMEBUILDER_TAG_SOURCETYPE),GeData(ID_VOLUMEBUILDER_TAG_SOURCETYPE_BOUNDINGBOX),flags);
    pTag->SetParameter(DescID(ID_VOLUMEBUILDER_TAG_BBPOSITION),GeData(Vector(1.0,1.0,1.0)),flags);
    pTag->SetParameter(DescID(ID_VOLUMEBUILDER_TAG_BBSIZE),GeData(Vector(1.0,1.0,1.0)),flags);
    pTag->SetParameter(DescID(ID_VOLUMEBUILDER_TAG_BBROTATION),GeData(Vector(1.0,1.0,1.0)),flags);
    pTag->SetParameter(DescID(ID_VOLUMEBUILDER_TAG_HALF_BAND_MESH_INTERIOR),GeData(1),flags);
    pTag->SetParameter(DescID(ID_VOLUMEBUILDER_TAG_HALF_BAND_MESH_EXTERIOR),GeData(1),flags);
    pTag->SetParameter(DescID(ID_VOLUMEBUILDER_TAG_HALF_BAND_SPLINE),GeData(1),flags);
    pTag->SetParameter(DescID(ID_VOLUMEBUILDER_TAG_HALF_BAND_PARTICLE),GeData(1),flags);
    pTag->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pTag->GetDataInstance();
    bc->SetBool(ID_VOLUMEBUILDER_TAG_PERFECT_PRIMITIVE,true);
    bc->SetBool(ID_VOLUMEBUILDER_TAG_USEPOINTS,true);
    bc->SetFloat(ID_VOLUMEBUILDER_TAG_MESHRADIUS,0.1);
    bc->SetBool(ID_VOLUMEBUILDER_TAG_OPTIMIZEANDCLOSE,true);
    bc->SetBool(ID_VOLUMEBUILDER_TAG_USEPARTICLERADIUS,true);
    bc->SetFloat(ID_VOLUMEBUILDER_TAG_RADIUS,0.1);
    bc->SetFloat(ID_VOLUMEBUILDER_TAG_DENSITY,0.1);
    bc->SetBool(ID_VOLUMEBUILDER_TAG_SPLINERADIUS_PERSEGMENT,true);
    bc->SetFloat(ID_VOLUMEBUILDER_TAG_VELOCITY_SCALE,0.1);
    bc->SetInt32(ID_VOLUMEBUILDER_TAG_VECTOR_CONVERSION_MODE,ID_VOLUMEBUILDER_TAG_VECTOR_CONVERSION_MODE_SDF);
    bc->SetInt32(ID_VOLUMEBUILDER_TAG_INTERIOR_VOXEL_FALLOFF,1);
    bc->SetBool(ID_VOLUMEBUILDER_TAG_INFINITEFALLOFF,true);
    bc->SetFloat(ID_VOLUMEBUILDER_TAG_ISO,0.1);
    bc->SetInt32(ID_VOLUMEBUILDER_TAG_SOURCETYPE,ID_VOLUMEBUILDER_TAG_SOURCETYPE_BOUNDINGBOX);
    bc->SetVector(ID_VOLUMEBUILDER_TAG_BBPOSITION, c4d.Vector(1.0,1.0,1.0);
    bc->SetVector(ID_VOLUMEBUILDER_TAG_BBSIZE, c4d.Vector(1.0,1.0,1.0);
    bc->SetVector(ID_VOLUMEBUILDER_TAG_BBROTATION, c4d.Vector(1.0,1.0,1.0);
    bc->SetInt32(ID_VOLUMEBUILDER_TAG_HALF_BAND_MESH_INTERIOR,1);
    bc->SetInt32(ID_VOLUMEBUILDER_TAG_HALF_BAND_MESH_EXTERIOR,1);
    bc->SetInt32(ID_VOLUMEBUILDER_TAG_HALF_BAND_SPLINE,1);
    bc->SetInt32(ID_VOLUMEBUILDER_TAG_HALF_BAND_PARTICLE,1);
    pTag->Message(MSG_UPDATE);                                                      
}
             

Buttons

This node has buttons. Buttons can manually be executed by calling the following code

Python

c4d.CallButton(tag,c4d.ID_VOLUMEBUILDER_TAG_CREATE_CONTROLLER)

C++

DescriptionCommand dc;
dc.id = DescID(ID_VOLUMEBUILDER_TAG_CREATE_CONTROLLER);             
pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);