c4d_painter.h File Reference

Classes

struct   TempUVHandle
struct   TextureSize
class   PaintBitmap
class   PaintLayer
class   PaintLayerMask
class   PaintLayerFolder
class   PaintLayerBmp
class   PaintTexture
class   PaintMaterial
struct   PaintBrushData

Namespaces

  maxon

Macros

#define  PAINTER_SAVETEXTURE
#define  PAINTER_SAVETEXTURE_FLAGS
#define  PAINTER_SAVEBIT_SAVEAS
#define  PAINTER_SAVEBIT_SAVECOPY
#define  PAINTER_SAVEBIT_SAVEALLOWWARNING
#define  PAINTER_SAVEBIT_RENAMEINSCENE
#define  PAINTER_BRINGTOFRONT
#define  PAINTER_LOADTEXTURE
#define  LOADTEXTURE_FILENAME
#define  PAINTER_FORCECLOSETEXTURE
#define  PAINTER_CLOSETEXTURE
#define  PAINTER_RELOADTEXTURE
#define  RELOADTEXTURE_FILENAME
#define  UV_SET_FROM_PROJECTION_CMD_ID
#define  GETACTIVEUVSET_CHECKENABLING
#define  GETACTIVEUVSET_UVWS
#define  GETACTIVEUVSET_POLYS
#define  GETACTIVEUVSET_POLYSELECTION
#define  GETACTIVEUVSET_POINTS
#define  GETACTIVEUVSET_POINTSELECTION
#define  GETACTIVEUVSET_OBJECT
#define  GETACTIVEUVSET_MODE
#define  GETACTIVEUVSET_POLYHIDDEN
#define  GETACTIVEUVSET_EDGESELECTION
#define  GETACTIVEUVSET_ISLANDS
#define  GETACTIVEUVSET_ALL_CHECKENABLING
#define  GETACTIVEUVSET_ALL
#define  UVCOMMAND_OPTIMALMAPPING
#define  UVCOMMAND_OPTIMALCUBICMAPPING
#define  UVCOMMAND_REALIGN
#define  OPTIMALMAPPING_PRESERVEORIENTATION
#define  OPTIMALMAPPING_STRETCHTOFIT
#define  OPTIMALMAPPING_DISTORTION
#define  OPTIMALMAPPING_SPACING
#define  OPTIMALMAPPING_AREAFAK
#define  OPTIMALMAPPING_TWOD
#define  OPTIMALMAPPING_PROGRESSBAR
#define  OPTIMALMAPPING_RELAXCOUNT
#define  OPTIMALMAPPING_EQUALIZEAREA
#define  UVCOMMAND_RELAX
#define  RELAXUV_KEEP_BORDER
#define  RELAXUV_KEEP_NEIGHBORS
#define  RELAXUV_KEEP_POINTSEL
#define  RELAXUV_CUT_EDGESEL
#define  RELAXUV_EDGESEL_POINTER
#define  RELAXUV_MAX_ITERATIONS
#define  RELAXUV_MODE
#define  RELAXUV_MODE_LSCM
#define  RELAXUV_MODE_ABF
#define  RELAXUV_ITERATION_NUMBER
#define  RELAXUV_INTERACTIVE_ABF
#define  RELAXUV_LIVE_ABF_UPDATE
#define  RELAXUV_SAFE
#define  RELAXUV_ERROR_MESSAGE
#define  RELAXUV_ERROR_POLY_SELECTION
#define  UVCOMMAND_COPY_UV
#define  UVCOMMAND_PASTE_UV
#define  UVCOMMAND_MAX_UV
#define  UVCOMMAND_FLIP_SEQUENCE
#define  UVCOMMAND_CYCLE_CW_UV
#define  UVCOMMAND_CYCLE_CCW_UV
#define  UVCOMMAND_TERRACE
#define  UVCOMMAND_FIT_TO_CANVAS
#define  UVCOMMAND_TRANSFORM
#define  UVCOMMAND_TRANSFORM_MOVE_X
#define  UVCOMMAND_TRANSFORM_MOVE_Y
#define  UVCOMMAND_TRANSFORM_SCALE_X
#define  UVCOMMAND_TRANSFORM_SCALE_Y
#define  UVCOMMAND_TRANSFORM_ANGLE
#define  UVCOMMAND_LINEUP
#define  UVCOMMAND_UNSTITCH
#define  UVCOMMAND_BOUNDARY2SHAPE
#define  UVCOMMAND_BOUNDARY2SHAPE_MODE
#define  UVCOMMAND_BOUNDARY2SHAPE_CIRCLE
#define  UVCOMMAND_BOUNDARY2SHAPE_QUAD
#define  UVCOMMAND_PACK_UV
#define  UVCOMMAND_AUTOMATICUV
#define  UVCOMMAND_PACK_RASTERIZED
#define  UVCOMMAND_PACK_GEOMETRIC
#define  UVCOMMAND_PACK_BOUNDINGBOX
#define  AMSI_CREATE_MISSING_MATERIALS
#define  AMSI_CREATE_MISSING_CHANNELS
#define  AMSI_AUTOSELECT_MATERIALS
#define  AMSI_AUTOSELECT_OBJECTS
#define  AMSI_DELETE_BROKENMATERIALTAGS
#define  AMSI_ENABLEMATERIALS
#define  AMSI_SINGLEMATERIAL
#define  CREATE_CHANNEL
#define  CREATE_CHANNEL_C
#define  AMSI_ENABLED
#define  AMSI_TEXW
#define  AMSI_TEXH
#define  AMSI_TEXMIN
#define  AMSI_TEXMAX
#define  AMSI_QUANTIZE
#define  AMSI_RESCALE_EXISTING
#define  AMSI_USE_SAME_RES
#define  AMSI_UV_CALC_METHOD
#define  UV_CALC_METHOD_OPTIMAL1
#define  UV_CALC_METHOD_OPTIMAL2
#define  UV_CALC_METHOD_REALIGN
#define  AMSI_UV_CALC_EXISTING
#define  AMSI_UV_RELAXATION
#define  OBJECT_PAINTLAYERBMP
#define  OBJECT_PAINTTEXTURE
#define  OBJECT_PAINTBITMAP
#define  OBJECT_PAINTLAYERFOLDER
#define  OBJECT_PAINTLAYER
#define  UPDATE_CHILDREN
#define  UPDATE_PARENTS
#define  UPDATE_PREVIEW
#define  UPDATE_REFRESH2D
#define  UPDATE_RECALC
#define  UPDATE_NOSAVECHG
#define  UPDATE_NOOFFSET
#define  UPDATE_REFRESH3D
#define  UPDATE_REFRESHCURSOR
#define  UPDATE_NOSTOPTHREADS
#define  UPDATE_STD
#define  RECALC_NOGRID
#define  RECALC_INITBMP
#define  GETPIXEL_ALPHAMASKS
#define  GETPIXEL_USEBLENDING
#define  GETPIXEL_ALL
#define  GETPIXEL_NOMASK
#define  GETPIXEL_CACHE
#define  GETPIXEL_NOWORK
#define  GETPIXEL_ONLYWORK
#define  GETPIXEL_TILE_BOTH
#define  GETPIXEL_DONTAPPLYMASK
#define  GETPIXEL_USESELECTED
#define  GETPIXEL_DITHERING
#define  GETPIXEL_PROJECTIONPIXEL
#define  GETPIXEL_RECALCBRUSHSTROKE
#define  GETPIXEL_VOXELCACHING
#define  GETPIXEL_MERGE
#define  GETPIXEL_TILE_U
#define  GETPIXEL_TILE_V
#define  TEXTURE_FILEFORMAT
#define  TEXTURE_WIDTH
#define  TEXTURE_HEIGHT
#define  TEXTURE_MODE
#define  TEXTURE_COLOR
#define  TEXTURE_SAVE_IMMEDIATLY
#define  GETALLSTRINGS_FILESTRING
#define  GETALLSTRINGS_SUGGESTED_PATH
#define  GETALLSTRINGS_CHANNEL_ID

函数

void *  SendPainterCommand ( Int32 command, BaseDocument *doc, PaintTexture *tex, BaseContainer *bc)
TempUVHandle GetActiveUVSet ( BaseDocument *doc, Int32 flags)
Bool   UpdateMeshUV ( Bool fullUpdate=false)
void  FreeActiveUVSet ( TempUVHandle *handle)
const EdgeBaseSelect GetUVSeams (const BaseObject *obj)
const EdgeBaseSelect GetUVSeams2 (const BaseObject *obj, Bool checkUVSettings=false)
Bool   CallUVCommand (const 向量 *padr, Int32 PointCount, const CPolygon *polys, Int32 lPolyCount, UVWStruct *uvw, BaseSelect *polyselection, BaseSelect *pointselection, BaseObject *op, Int32 模式, Int32 cmdid, const BaseContainer &settings)
Int32   IdentifyImage (const Filename &texpath)
Bool   BPSetupWizardWithParameters ( BaseDocument *doc, const BaseContainer &settings, AtomArray &objects, AtomArray &material)
Bool   CalculateTextureSize ( BaseDocument *doc, AtomArray &materials, TextureSize *&sizes)
Bool   GetAllStrings_AddTexture (const void *msgdata, const BaseContainer &d)
void  PainterActivateChannel ( Int32 channel, Bool multi, Bool enable)
PaintTexture PainterCreateNewTextureDialog ( String &result, Filename &resultdirectory, Int32 channelid, BaseMaterial *bmat)
maxon::Result < maxon::DrawportTextureInterface * >  PainterGetBrush ( BaseDraw *bd, PaintBrushData &brushData)

Macro Definition Documentation

◆  UV_SET_FROM_PROJECTION_CMD_ID

#define UV_SET_FROM_PROJECTION_CMD_ID

Set UVW from Projection command in texture view.

Function Documentation

◆  SendPainterCommand()

void* SendPainterCommand ( Int32   命令 ,
BaseDocument doc ,
PaintTexture tex ,
BaseContainer bc  
)

Sends commands to BodyPaint 3D .

参数
[in] 命令 The command: PAINTER
[in] doc The optional document for the operation.
[in] tex The optional paint texture for the operation.
[in] bc The optional container for the operation: PAINTER
返回
The BodyPaint 3D window handle. Private .

◆  GetActiveUVSet()

TempUVHandle * GetActiveUVSet ( BaseDocument doc ,
Int32   flags  
)

Retrieves the document's active UV set.

参数
[in] doc The document returning the active UV set.
[in] flags The flags: GETACTIVEUVSET
返回
A temporary handle to the active UV set, or nullptr if there is no active UV set. Has to be freed with FreeActiveUVSet() .

◆  UpdateMeshUV()

Bool UpdateMeshUV ( Bool   fullUpdate = false )

Updates the mesh based on the UVW result of interactive unwrapping.

返回
true if successful, otherwise false .

◆  FreeActiveUVSet()

void FreeActiveUVSet ( TempUVHandle handle )

Frees the active UV set.

参数
[in] handle The temporary handle of the UV set to be freed.

◆  GetUVSeams()

const EdgeBaseSelect * GetUVSeams ( const BaseObject obj )

Deprecated . Use GetUVSeams2(obj, true) to have the same behavior as before, but most of the time you want the "checkUVSettings" parameter to be false. Gets the UV seam edges for obj .
The edges are indexed by 4 * polygon + edge where polygon is the polygon index and edge is the edge index between 0 and 3 .

注意
If the UV seams are disabled in the UV viewport, nullptr will be returned.
参数
[in] obj The object of the UV set.
返回
The UV seam edges. The UV mesh owns the pointed base select.

◆  GetUVSeams2()

const EdgeBaseSelect * GetUVSeams2 ( const BaseObject obj ,
Bool   checkUVSettings = false  
)

Gets the UV seam edges for obj .
The edges are indexed by 4 * polygon + edge where polygon is the polygon index and edge is the edge index between 0 and 3 .

参数
[in] obj The object of the UV set.
[in] checkUVSettings If true and the UV seams are disabled in the UV viewport, nullptr will be return. If false, will always return the UV seams, without checking if the UV seams settings is enabled or not in the UV viewport.
返回
The UV seam edges. The UV mesh owns the pointed base select.

◆  CallUVCommand()

Bool CallUVCommand ( const 向量 padr ,
Int32   PointCount ,
const CPolygon polys ,
Int32   lPolyCount ,
UVWStruct uvw ,
BaseSelect polyselection ,
BaseSelect pointselection ,
BaseObject op ,
Int32   mode ,
Int32   cmdid ,
const BaseContainer settings  
)

Calls UV commands.
范例:

TempUVHandle *handle = GetActiveUVSet (pDoc, GETACTIVEUVSET_ALL );
if (!handle) return false ; CallUVCommand (pPoints, lPointCount, pPolys, lPolyCount, pUVW, pPolySel, pPointSel, op, mode, UVCOMMAND_FIT_TO_CANVAS , BaseContainer ()); handle-> SetUVW (pUVW);
参数
[in] padr The address of the points array.
[in] PointCount The number of points in padr array.
[in] polys The address of the polygons array.
[in] lPolyCount The number of polygons in polys array.
[in] uvw The address of the UV array.
[in] polyselection The polygon selection.
[in] pointselection The UV points selection.
The points are indexed by 4 * polygon + point where polygon is the polygon index and point is the point index between 0 and 3 .
[in] op The object of the UV set.
[in] mode The UV editing mode: EditorModes
[in] cmdid The UV command: UVCOMMAND
[in] settings The optional settings for the UV command.
返回
true if successful, otherwise false .

◆  IdentifyImage()

Int32 IdentifyImage ( const Filename texpath )

Identifies an image's file format.

参数
[in] texpath The texture's file path.
返回
The image's file format: FILTER

◆  BPSetupWizardWithParameters()

Bool BPSetupWizardWithParameters ( BaseDocument doc ,
const BaseContainer settings ,
AtomArray objects ,
AtomArray material  
)

Runs BodyPaint 3D paint wizard.

参数
[in] doc The document.
[in] settings The settings for the paint wizard: AMSI
[in] 对象 An array with the objects the paint wizard is using.
[in] material An array with the materials the paint wizard is using.
返回
true if successful, otherwise false .

◆  CalculateTextureSize()

Bool CalculateTextureSize ( BaseDocument doc ,
AtomArray materials ,
TextureSize *&  sizes  
)

Calculates the texture size based on the geometry and the size of the UV polygons.

参数
[in] doc The document.
[in] materials An array containing the materials the texture size calculation is applied to.
[in] sizes An array with the texture sizes, equals the number of materials. Must be freed with DeleteMem.
返回
true if successful, otherwise false .

◆  GetAllStrings_AddTexture()

Bool GetAllStrings_AddTexture ( const void *  msgdata ,
const BaseContainer d  
)

Private .

◆  PainterActivateChannel()

void PainterActivateChannel ( Int32   channel ,
Bool   multi ,
Bool   enable  
)

Activates/deactivates paint channels.

参数
[in] channel The paint channel: CHANNEL
[in] multi true for multi channel painting, false for single channel painting.
[in] enable true to activate the paint channel, false to deactivate the paint channel.

◆  PainterCreateNewTextureDialog()

PaintTexture * PainterCreateNewTextureDialog ( String result ,
Filename resultdirectory ,
Int32   channelid ,
BaseMaterial bmat  
)

Opens the texture creation dialog for a material.

参数
[out] result Filled with the texture's name (e.g. the filename).
[out] resultdirectory The directory of the texture.
[in] channelid The channel type: CHANNEL
[in] bmat The material of the texture.
返回
The created paint texture if successful, otherwise nullptr . Cinema 4D owns the pointed paint texture.

◆  PainterGetBrush()

maxon::Result <maxon::DrawportTextureInterface*> PainterGetBrush ( BaseDraw bd ,
PaintBrushData brushData  
)
TempUVHandle::SetUVW
Bool SetUVW(UVWStruct *uv)
GetActiveUVSet
TempUVHandle * GetActiveUVSet(BaseDocument *doc, Int32 flags)
TempUVHandle
定义: c4d_painter.h:62
GETACTIVEUVSET_ALL
#define GETACTIVEUVSET_ALL
Combine all flags except the enable status and ignore UV view private option.
定义: c4d_painter.h:210
CallUVCommand
Bool CallUVCommand(const Vector *padr, Int32 PointCount, const CPolygon *polys, Int32 lPolyCount, UVWStruct *uvw, BaseSelect *polyselection, BaseSelect *pointselection, BaseObject *op, Int32 mode, Int32 cmdid, const BaseContainer &settings)
UVCOMMAND_FIT_TO_CANVAS
#define UVCOMMAND_FIT_TO_CANVAS
Fit UV To Canvas.
定义: c4d_painter.h:308
BaseContainer
定义: c4d_basecontainer.h:46