Welcome to mirror list, hosted at ThFree Co, Russian Federation.

DNA_dynamicpaint_types.h « makesdna « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 96b673fc70b3aadb71e08ea63187a35e9aaba6e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/**
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* Contributor(s): Miika Hämäläinen
*
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef DNA_DYNAMICPAINT_TYPES_H
#define DNA_DYNAMICPAINT_TYPES_H

struct CurveMapping;

/* flags */
#define MOD_DPAINT_ANTIALIAS (1<<0) /* do antialiasing */
#define MOD_DPAINT_DISSOLVE (1<<1) /* do dissolve */
#define MOD_DPAINT_FLATTEN (1<<2) /* do displace flatten */
#define MOD_DPAINT_MULALPHA (1<<3) /* Multiply color by alpha when saving */

#define MOD_DPAINT_DRY_LOG (1<<4) /* Use 1/x for drying paint */

/* output */
#define MOD_DPAINT_OUT_PAINT (1<<0) /* output paint texture */
#define MOD_DPAINT_OUT_WET (1<<1) /* output wetmap */
#define MOD_DPAINT_OUT_DISP (1<<2) /* output displace texture */

/* disp_type */
#define MOD_DPAINT_DISPFOR_PNG 0 /* displacement output format */
#define MOD_DPAINT_DISPFOR_OPENEXR 1 /* displacement output format */

/* disp_format */
#define MOD_DPAINT_DISP_DISPLACE 0 /* displacement output displace map */
#define MOD_DPAINT_DISP_DEPTH 1 /* displacement output depth data */

/* effect */
#define MOD_DPAINT_EFFECT_DO_SPREAD (1<<0) /* do spread effect */
#define MOD_DPAINT_EFFECT_DO_DRIP (1<<1) /* do spread effect */
#define MOD_DPAINT_EFFECT_DO_SHRINK (1<<2) /* do spread effect */


/* Canvas settings */
typedef struct DynamicPaintCanvasSettings {
	struct DynamicPaintModifierData *pmd; /* for fast RNA access */
	struct DerivedMesh *dm;
	struct PaintSurface *surface;
	
	int flags;
	int output;
	short disp_type, disp_format;
	int effect;
	short effect_ui;	// just ui selection box
	short pad;	// replace if need for another short

	int resolution;
	int start_frame, end_frame;
	int substeps;

	int dry_speed;
	int diss_speed;
	float disp_depth;
	int dflat_speed;	// displace flattening speed

	char paint_output_path[240], wet_output_path[240], displace_output_path[240];

	float spread_speed, drip_speed, shrink_speed;
	char uvlayer_name[32];

	char ui_info[128];	// UI info text
	char error[64];		// Bake error description

} DynamicPaintCanvasSettings;


/* flags */
#define MOD_DPAINT_PART_RAD (1<<0) /* use particle radius */
#define MOD_DPAINT_DO_PAINT (1<<1) /* use particle radius */
#define MOD_DPAINT_DO_WETNESS (1<<2) /* use particle radius */
#define MOD_DPAINT_DO_DISPLACE (1<<3) /* use particle radius */

#define MOD_DPAINT_USE_MATERIAL (1<<4) /* use object material */
#define MOD_DPAINT_ABS_ALPHA (1<<5) /* doesn't increase alpha unless
									paint alpha is higher than existing */
#define MOD_DPAINT_ERASE (1<<6) /* removes paint */

#define MOD_DPAINT_RAMP_ALPHA (1<<7) /* only read falloff ramp alpha */
#define MOD_DPAINT_EDGE_DISP (1<<8) /* add displacement to intersection edges */
#define MOD_DPAINT_PROX_FACEALIGNED (1<<9) /* do proximity check only in normal dir */

/* collision type */
#define MOD_DPAINT_COL_VOLUME 1 /* paint with mesh volume */
#define MOD_DPAINT_COL_DIST 2 /* paint using distance to mesh surface */
#define MOD_DPAINT_COL_VOLDIST 3 /* use both volume and distance */
#define MOD_DPAINT_COL_PSYS 4 /* use particle system */

/* proximity_falloff */
#define MOD_DPAINT_PRFALL_SHARP 0 /* no-falloff */
#define MOD_DPAINT_PRFALL_SMOOTH 1 /* smooth, linear falloff */
#define MOD_DPAINT_PRFALL_RAMP 2 /* use color ramp */


/* Painter settings */
typedef struct DynamicPaintPainterSettings {
	struct DynamicPaintModifierData *pmd; /* for fast RNA access */
	struct DerivedMesh *dm;
	struct ParticleSystem *psys;
	struct Material *mat;

	int flags;
	int collision;

	float r, g, b, alpha;
	float wetness;

	float particle_radius, particle_smooth;
	float paint_distance;
	float displace_distance, prox_displace_strength;

	// Falloff curves
	struct ColorBand *paint_ramp;	/* Proximity paint falloff */

	short proximity_falloff;
	short pad;	// replace if need for new value
	int pad2;	// replace if need for new value

	//int pad;
} DynamicPaintPainterSettings;

#endif