Blender V5.3
BKE_dynamicpaint.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
10
11namespace blender {
12
13struct Depsgraph;
17struct ImgSeqFormatData;
18struct Object;
19struct PaintAdjData;
20struct Scene;
21
22/* Actual surface point */
24 ImgSeqFormatData *format_data; /* extra data for image sequence format */
25 void *type_data; /* data used by specific surface type */
26 PaintAdjData *adj_data; /* adjacency data for current surface */
27
28 struct PaintBakeData *bData; /* temporary per step data used for frame calculation */
30};
31
32/* Paint type surface point */
33struct PaintPoint {
34
35 /* Wet paint is handled at effect layer only
36 * and mixed to surface when drying */
37 float e_color[4];
38 float wetness;
39 short state;
40 float color[4];
41};
42
43/* height field waves */
45
46 float height;
47 float velocity;
49 short state;
50};
51
56 struct Depsgraph *depsgraph,
57 struct Scene *scene,
58 struct Object *ob,
59 struct Mesh *mesh);
66 struct DynamicPaintModifierData *tpmd,
67 int flag);
68
72bool dynamicPaint_createType(struct DynamicPaintModifierData *pmd, int type, struct Scene *scene);
79 struct DynamicPaintCanvasSettings *canvas, struct Scene *scene);
83void dynamicPaint_clearSurface(const struct Scene *scene, struct DynamicPaintSurface *surface);
87bool dynamicPaint_resetSurface(const struct Scene *scene, struct DynamicPaintSurface *surface);
89 struct DynamicPaintSurface *surface);
94/* Free brush data */
97
103 struct Object *ob,
104 int output);
109void dynamicPaintSurface_setUniqueName(struct DynamicPaintSurface *surface, const char *basename);
114
118int dynamicPaint_createUVSurface(struct Scene *scene,
119 struct DynamicPaintSurface *surface,
120 float *progress,
121 bool *do_update);
126 struct Depsgraph *depsgraph,
127 struct Scene *scene,
128 struct Object *cObject,
129 int frame);
131 const char *filepath,
132 short output_layer);
133
134/* PaintPoint state */
135#define DPAINT_PAINT_NONE -1
136#define DPAINT_PAINT_DRY 0
137#define DPAINT_PAINT_WET 1
138#define DPAINT_PAINT_NEW 2
139
140/* PaintWavePoint state */
141#define DPAINT_WAVE_ISECT_CHANGED -1
142#define DPAINT_WAVE_NONE 0
143#define DPAINT_WAVE_OBSTACLE 1
144#define DPAINT_WAVE_REFLECT_ONLY 2
145
146} // namespace blender
#define output
BMesh Iterators.
bool dynamicPaint_resetSurface(const struct Scene *scene, struct DynamicPaintSurface *surface)
void dynamicPaint_freeSurface(const struct DynamicPaintModifierData *pmd, struct DynamicPaintSurface *surface)
void dynamicPaint_outputSurfaceImage(struct DynamicPaintSurface *surface, const char *filepath, short output_layer)
void dynamicPaint_Modifier_copy(const struct DynamicPaintModifierData *pmd, struct DynamicPaintModifierData *tpmd, int flag)
struct DynamicPaintSurface * dynamicPaint_createNewSurface(struct DynamicPaintCanvasSettings *canvas, struct Scene *scene)
void dynamicPaint_clearSurface(const struct Scene *scene, struct DynamicPaintSurface *surface)
bool dynamicPaint_outputLayerExists(struct DynamicPaintSurface *surface, struct Object *ob, int output)
void dynamicPaint_Modifier_free_runtime(struct DynamicPaintRuntime *runtime)
void dynamicPaint_freeSurfaceData(struct DynamicPaintSurface *surface)
void dynamicPaint_freeBrush(struct DynamicPaintModifierData *pmd)
bool dynamicPaint_createType(struct DynamicPaintModifierData *pmd, int type, struct Scene *scene)
struct DynamicPaintSurface * get_activeSurface(struct DynamicPaintCanvasSettings *canvas)
void dynamicPaint_freeCanvas(struct DynamicPaintModifierData *pmd)
void dynamicPaint_cacheUpdateFrames(struct DynamicPaintSurface *surface)
struct Mesh * dynamicPaint_Modifier_do(struct DynamicPaintModifierData *pmd, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct Mesh *mesh)
int dynamicPaint_calculateFrame(struct DynamicPaintSurface *surface, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *cObject, int frame)
void dynamicPaintSurface_setUniqueName(struct DynamicPaintSurface *surface, const char *basename)
void dynamicPaint_Modifier_free(struct DynamicPaintModifierData *pmd)
int dynamicPaint_createUVSurface(struct Scene *scene, struct DynamicPaintSurface *surface, float *progress, bool *do_update)
void dynamicPaintSurface_updateType(struct DynamicPaintSurface *surface)
ImgSeqFormatData * format_data
struct PaintBakeData * bData