Blender  V3.3
BKE_dynamicpaint.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #pragma once
4 
9 #include "BLI_utildefines.h"
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 struct Depsgraph;
18 struct DynamicPaintRuntime;
19 struct Object;
20 struct Scene;
21 
22 /* Actual surface point */
23 typedef struct PaintSurfaceData {
24  void *format_data; /* special data for each surface "format" */
25  void *type_data; /* data used by specific surface type */
26  struct PaintAdjData *adj_data; /* adjacency data for current surface */
27 
28  struct PaintBakeData *bData; /* temporary per step data used for frame calculation */
30 
32 
33 /* Paint type surface point */
34 typedef struct PaintPoint {
35 
36  /* Wet paint is handled at effect layer only
37  * and mixed to surface when drying */
38  float e_color[4];
39  float wetness;
40  short state;
41  float color[4];
43 
44 /* height field waves */
45 typedef struct PaintWavePoint {
46 
47  float height;
48  float velocity;
49  float brush_isect;
50  short state;
52 
57  struct Depsgraph *depsgraph,
58  struct Scene *scene,
59  struct Object *ob,
60  struct Mesh *me);
67  struct DynamicPaintModifierData *tpmd,
68  int flag);
69 
73 bool dynamicPaint_createType(struct DynamicPaintModifierData *pmd, int type, struct Scene *scene);
80  struct DynamicPaintCanvasSettings *canvas, struct Scene *scene);
95 /* Free brush data */
98 
104  struct Object *ob,
105  int output);
115 
121  float *progress,
122  short *do_update);
127  struct Depsgraph *depsgraph,
128  struct Scene *scene,
129  struct Object *cObject,
130  int frame);
132  const char *filepath,
133  short output_layer);
134 
135 /* PaintPoint state */
136 #define DPAINT_PAINT_NONE -1
137 #define DPAINT_PAINT_DRY 0
138 #define DPAINT_PAINT_WET 1
139 #define DPAINT_PAINT_NEW 2
140 
141 /* PaintWavePoint state */
142 #define DPAINT_WAVE_ISECT_CHANGED -1
143 #define DPAINT_WAVE_NONE 0
144 #define DPAINT_WAVE_OBSTACLE 1
145 #define DPAINT_WAVE_REFLECT_ONLY 2
146 
147 #ifdef __cplusplus
148 }
149 #endif
struct PaintPoint PaintPoint
struct PaintWavePoint PaintWavePoint
bool dynamicPaint_outputLayerExists(struct DynamicPaintSurface *surface, struct Object *ob, int output)
Definition: dynamicpaint.c:322
void dynamicPaint_outputSurfaceImage(struct DynamicPaintSurface *surface, const char *filepath, short output_layer)
void dynamicPaintSurface_updateType(struct DynamicPaintSurface *surface)
Definition: dynamicpaint.c:409
void dynamicPaint_freeCanvas(struct DynamicPaintModifierData *pmd)
Definition: dynamicpaint.c:979
void dynamicPaintSurface_setUniqueName(struct DynamicPaintSurface *surface, const char *basename)
Definition: dynamicpaint.c:401
bool dynamicPaint_createType(struct DynamicPaintModifierData *pmd, int type, struct Scene *scene)
bool dynamicPaint_resetSurface(const struct Scene *scene, struct DynamicPaintSurface *surface)
void dynamicPaint_Modifier_free(struct DynamicPaintModifierData *pmd)
Definition: dynamicpaint.c:997
int dynamicPaint_createUVSurface(struct Scene *scene, struct DynamicPaintSurface *surface, float *progress, short *do_update)
void dynamicPaint_freeBrush(struct DynamicPaintModifierData *pmd)
Definition: dynamicpaint.c:843
void dynamicPaint_Modifier_free_runtime(struct DynamicPaintRuntime *runtime)
Definition: dynamicpaint.c:252
struct Mesh * dynamicPaint_Modifier_do(struct DynamicPaintModifierData *pmd, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct Mesh *me)
void dynamicPaint_clearSurface(const struct Scene *scene, struct DynamicPaintSurface *surface)
struct DynamicPaintSurface * get_activeSurface(struct DynamicPaintCanvasSettings *canvas)
Definition: dynamicpaint.c:317
struct DynamicPaintSurface * dynamicPaint_createNewSurface(struct DynamicPaintCanvasSettings *canvas, struct Scene *scene)
struct PaintSurfaceData PaintSurfaceData
int dynamicPaint_calculateFrame(struct DynamicPaintSurface *surface, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *cObject, int frame)
void dynamicPaint_freeSurfaceData(struct DynamicPaintSurface *surface)
Definition: dynamicpaint.c:932
void dynamicPaint_Modifier_copy(const struct DynamicPaintModifierData *pmd, struct DynamicPaintModifierData *tpmd, int flag)
void dynamicPaint_freeSurface(const struct DynamicPaintModifierData *pmd, struct DynamicPaintSurface *surface)
void dynamicPaint_cacheUpdateFrames(struct DynamicPaintSurface *surface)
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
static char * basename(char *string)
Definition: datatoc.c:17
Scene scene
const Depsgraph * depsgraph
struct @211::@212 surface
ccl_global KernelShaderEvalInput ccl_global float * output
struct DynamicPaintCanvasSettings * canvas
uint16_t flag
Mesh_Runtime runtime
float color[4]
float e_color[4]
struct PaintBakeData * bData
struct PaintAdjData * adj_data