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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiika Hamalainen <blender@miikah.org>2011-06-16 14:41:00 +0400
committerMiika Hamalainen <blender@miikah.org>2011-06-16 14:41:00 +0400
commit3de22dec26606c2c526f7193db038fa5125f9b03 (patch)
treedd308dd2061a50b0f1bc2e63b6c05716f9bcab73 /source/blender/makesdna/DNA_dynamicpaint_types.h
parent3b41ab432badf2d4598b798e0d0c6c9ece51172b (diff)
Dynamic Paint:
Committed changes from previous weeks, biggest changes are: * Canvas can now have multiple "surfaces" that each can have specific format, type and settings. * Renewed UI to support this new system. * Aside from old "image sequence" output format, Dynamic Paint can now work on vertex level as well. Currently vertex paint and displace are supported. * Integrated vertex level painting with Point Cache. * Added viewport preview for Point Cache surfaces. Due to massive amount of changes, old Dynamic Paint saves are no longer supported. Also some features are temporarily missing or may not work properly.
Diffstat (limited to 'source/blender/makesdna/DNA_dynamicpaint_types.h')
-rw-r--r--source/blender/makesdna/DNA_dynamicpaint_types.h130
1 files changed, 80 insertions, 50 deletions
diff --git a/source/blender/makesdna/DNA_dynamicpaint_types.h b/source/blender/makesdna/DNA_dynamicpaint_types.h
index 96b673fc70b..327153e1640 100644
--- a/source/blender/makesdna/DNA_dynamicpaint_types.h
+++ b/source/blender/makesdna/DNA_dynamicpaint_types.h
@@ -13,24 +13,39 @@
#ifndef DNA_DYNAMICPAINT_TYPES_H
#define DNA_DYNAMICPAINT_TYPES_H
+#include "DNA_listBase.h"
struct CurveMapping;
+struct PaintSurfaceData;
-/* 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 */
+/* surface format */
+#define MOD_DPAINT_SURFACE_F_PTEX 0
+#define MOD_DPAINT_SURFACE_F_VERTEX 1
+#define MOD_DPAINT_SURFACE_F_IMAGESEQ 2
+
+/* surface type */
+#define MOD_DPAINT_SURFACE_T_PAINT 0
+#define MOD_DPAINT_SURFACE_T_DISPLACE 1
+#define MOD_DPAINT_SURFACE_T_WEIGHT 2
+#define MOD_DPAINT_SURFACE_T_IWAVE 3
+
+/* surface flags */
+#define MOD_DPAINT_ACTIVE (1<<0) /* Is surface enabled */
-#define MOD_DPAINT_DRY_LOG (1<<4) /* Use 1/x for drying paint */
+#define MOD_DPAINT_ANTIALIAS (1<<1) /* do antialiasing */
+#define MOD_DPAINT_DISSOLVE (1<<2) /* do dissolve */
+#define MOD_DPAINT_MULALPHA (1<<3) /* Multiply color by alpha when saving image */
+#define MOD_DPAINT_DISSOLVE_LOG (1<<4) /* Use 1/x for surface dissolve */
+#define MOD_DPAINT_DRY_LOG (1<<5) /* 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 */
+#define MOD_DPAINT_PREVIEW (1<<6) /* preview this surface on viewport*/
-/* disp_type */
-#define MOD_DPAINT_DISPFOR_PNG 0 /* displacement output format */
-#define MOD_DPAINT_DISPFOR_OPENEXR 1 /* displacement output format */
+/* canvas flags */
+#define MOD_DPAINT_PREVIEW_READY (1<<0) /* if viewport preview is ready */
+#define MOD_DPAINT_BAKING (1<<1) /* baking an image sequence */
+
+/* image_fileformat */
+#define MOD_DPAINT_IMGFORMAT_PNG 0
+#define MOD_DPAINT_IMGFORMAT_OPENEXR 1
/* disp_format */
#define MOD_DPAINT_DISP_DISPLACE 0 /* displacement output displace map */
@@ -41,34 +56,53 @@ struct CurveMapping;
#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;
+typedef struct DynamicPaintSurface {
- 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;
+ struct DynamicPaintSurface *next, *prev;
+ struct DynamicPaintCanvasSettings *canvas; /* for fast RNA access */
+ struct PaintSurfaceData *data;
+
+ struct Group *brush_group;
+
+ /* cache */
+ struct PointCache *pointcache;
+ struct ListBase ptcaches;
+ int current_frame;
+
+ /* surface */
+ char name[64];
+ short format, type;
+ short disp_type, image_fileformat;
+ short effect_ui; /* just ui selection box */
+ short pad;
+ int flags, effect;
+ float intitial_color[4];
+
+ int image_resolution, substeps;
int start_frame, end_frame;
- int substeps;
- int dry_speed;
- int diss_speed;
+ int dry_speed, 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 image_output_path[240];
+ char output_name[40];
+ char output_name2[40]; /* some surfaces have 2 outputs */
+
+} DynamicPaintSurface;
+
+/* Canvas settings */
+typedef struct DynamicPaintCanvasSettings {
+ struct DynamicPaintModifierData *pmd; /* for fast RNA access */
+ struct DerivedMesh *dm;
+
+ struct ListBase surfaces;
+ short active_sur, flags;
+ int pad;
+
+
char ui_info[128]; // UI info text
char error[64]; // Bake error description
@@ -77,24 +111,20 @@ typedef struct 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
+#define MOD_DPAINT_USE_MATERIAL (1<<1) /* use object material */
+#define MOD_DPAINT_ABS_ALPHA (1<<2) /* don't increase alpha unless
paint alpha is higher than existing */
-#define MOD_DPAINT_ERASE (1<<6) /* removes paint */
+#define MOD_DPAINT_ERASE (1<<3) /* 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 */
+#define MOD_DPAINT_RAMP_ALPHA (1<<4) /* only read falloff ramp alpha */
+#define MOD_DPAINT_PROX_FACEALIGNED (1<<5) /* do proximity check only in normal dir */
+//#define MOD_DPAINT_EDGE_DISP (1<<6) /* add displacement to intersection edges */
/* 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 */
+#define MOD_DPAINT_COL_VOLUME 0 /* paint with mesh volume */
+#define MOD_DPAINT_COL_DIST 1 /* paint using distance to mesh surface */
+#define MOD_DPAINT_COL_VOLDIST 2 /* use both volume and distance */
+#define MOD_DPAINT_COL_PSYS 3 /* use particle system */
/* proximity_falloff */
#define MOD_DPAINT_PRFALL_SHARP 0 /* no-falloff */
@@ -103,7 +133,7 @@ typedef struct DynamicPaintCanvasSettings {
/* Painter settings */
-typedef struct DynamicPaintPainterSettings {
+typedef struct DynamicPaintBrushSettings {
struct DynamicPaintModifierData *pmd; /* for fast RNA access */
struct DerivedMesh *dm;
struct ParticleSystem *psys;
@@ -123,10 +153,10 @@ typedef struct DynamicPaintPainterSettings {
struct ColorBand *paint_ramp; /* Proximity paint falloff */
short proximity_falloff;
- short pad; // replace if need for new value
+ short brush_settings_context; /* ui settings display */
int pad2; // replace if need for new value
//int pad;
-} DynamicPaintPainterSettings;
+} DynamicPaintBrushSettings;
#endif