diff options
author | Lukas Stockner <lukas.stockner@freenet.de> | 2016-08-21 06:38:48 +0300 |
---|---|---|
committer | Lukas Stockner <lukas.stockner@freenet.de> | 2016-08-21 06:38:48 +0300 |
commit | c5e9fabe19c8721e6c4541ee0f75bdd82accca13 (patch) | |
tree | 0b7e8bff0f3b1b210f37724d1c0a51f956cc0b30 /source/blender/makesdna | |
parent | 98dfe6f80035eae4de737ac883a48da304f67665 (diff) | |
parent | c00b2d89911e20c8ace12a9256c689e9f43cc63b (diff) |
Merge remote-tracking branch 'origin/master' into soc-2016-cycles_denoising
This was an extremely hacky merge with a lot of rebasing and git tricks involved, I hope it works as it's supposed to.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_ID.h | 122 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_action_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_anim_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_cachefile_types.h | 84 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_cloth_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_color_types.h | 3 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_constraint_types.h | 7 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_genfile.h | 1 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_gpencil_types.h | 143 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_modifier_types.h | 22 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_object_force.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_particle_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 23 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_screen_types.h | 17 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesdna/intern/dna_genfile.c | 5 | ||||
-rw-r--r-- | source/blender/makesdna/intern/makesdna.c | 2 |
17 files changed, 376 insertions, 67 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index bb5d2b4cf29..5c1bfc229da 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -213,43 +213,50 @@ typedef struct PreviewImage { * Written to #BHead.code (for file IO) * and the first 2 bytes of #ID.name (for runtime checks, see #GS macro). */ -#define ID_SCE MAKE_ID2('S', 'C') /* Scene */ -#define ID_LI MAKE_ID2('L', 'I') /* Library */ -#define ID_OB MAKE_ID2('O', 'B') /* Object */ -#define ID_ME MAKE_ID2('M', 'E') /* Mesh */ -#define ID_CU MAKE_ID2('C', 'U') /* Curve */ -#define ID_MB MAKE_ID2('M', 'B') /* MetaBall */ -#define ID_MA MAKE_ID2('M', 'A') /* Material */ -#define ID_TE MAKE_ID2('T', 'E') /* Tex (Texture) */ -#define ID_IM MAKE_ID2('I', 'M') /* Image */ -#define ID_LT MAKE_ID2('L', 'T') /* Lattice */ -#define ID_LA MAKE_ID2('L', 'A') /* Lamp */ -#define ID_CA MAKE_ID2('C', 'A') /* Camera */ -#define ID_IP MAKE_ID2('I', 'P') /* Ipo (depreciated, replaced by FCurves) */ -#define ID_KE MAKE_ID2('K', 'E') /* Key (shape key) */ -#define ID_WO MAKE_ID2('W', 'O') /* World */ -#define ID_SCR MAKE_ID2('S', 'R') /* Screen */ -#define ID_SCRN MAKE_ID2('S', 'N') /* (depreciated?) */ -#define ID_VF MAKE_ID2('V', 'F') /* VFont (Vector Font) */ -#define ID_TXT MAKE_ID2('T', 'X') /* Text */ -#define ID_SPK MAKE_ID2('S', 'K') /* Speaker */ -#define ID_SO MAKE_ID2('S', 'O') /* Sound */ -#define ID_GR MAKE_ID2('G', 'R') /* Group */ -#define ID_ID MAKE_ID2('I', 'D') /* (internal use only) */ -#define ID_AR MAKE_ID2('A', 'R') /* bArmature */ -#define ID_AC MAKE_ID2('A', 'C') /* bAction */ -#define ID_NT MAKE_ID2('N', 'T') /* bNodeTree */ -#define ID_BR MAKE_ID2('B', 'R') /* Brush */ -#define ID_PA MAKE_ID2('P', 'A') /* ParticleSettings */ -#define ID_GD MAKE_ID2('G', 'D') /* bGPdata, (Grease Pencil) */ -#define ID_WM MAKE_ID2('W', 'M') /* WindowManager */ -#define ID_MC MAKE_ID2('M', 'C') /* MovieClip */ -#define ID_MSK MAKE_ID2('M', 'S') /* Mask */ -#define ID_LS MAKE_ID2('L', 'S') /* FreestyleLineStyle */ -#define ID_PAL MAKE_ID2('P', 'L') /* Palette */ -#define ID_PC MAKE_ID2('P', 'C') /* PaintCurve */ - - /* NOTE! Fake IDs, needed for g.sipo->blocktype or outliner */ +typedef enum ID_Type { + ID_SCE = MAKE_ID2('S', 'C'), /* Scene */ + ID_LI = MAKE_ID2('L', 'I'), /* Library */ + ID_OB = MAKE_ID2('O', 'B'), /* Object */ + ID_ME = MAKE_ID2('M', 'E'), /* Mesh */ + ID_CU = MAKE_ID2('C', 'U'), /* Curve */ + ID_MB = MAKE_ID2('M', 'B'), /* MetaBall */ + ID_MA = MAKE_ID2('M', 'A'), /* Material */ + ID_TE = MAKE_ID2('T', 'E'), /* Tex (Texture) */ + ID_IM = MAKE_ID2('I', 'M'), /* Image */ + ID_LT = MAKE_ID2('L', 'T'), /* Lattice */ + ID_LA = MAKE_ID2('L', 'A'), /* Lamp */ + ID_CA = MAKE_ID2('C', 'A'), /* Camera */ + ID_IP = MAKE_ID2('I', 'P'), /* Ipo (depreciated, replaced by FCurves) */ + ID_KE = MAKE_ID2('K', 'E'), /* Key (shape key) */ + ID_WO = MAKE_ID2('W', 'O'), /* World */ + ID_SCR = MAKE_ID2('S', 'R'), /* Screen */ + ID_VF = MAKE_ID2('V', 'F'), /* VFont (Vector Font) */ + ID_TXT = MAKE_ID2('T', 'X'), /* Text */ + ID_SPK = MAKE_ID2('S', 'K'), /* Speaker */ + ID_SO = MAKE_ID2('S', 'O'), /* Sound */ + ID_GR = MAKE_ID2('G', 'R'), /* Group */ + ID_AR = MAKE_ID2('A', 'R'), /* bArmature */ + ID_AC = MAKE_ID2('A', 'C'), /* bAction */ + ID_NT = MAKE_ID2('N', 'T'), /* bNodeTree */ + ID_BR = MAKE_ID2('B', 'R'), /* Brush */ + ID_PA = MAKE_ID2('P', 'A'), /* ParticleSettings */ + ID_GD = MAKE_ID2('G', 'D'), /* bGPdata, (Grease Pencil) */ + ID_WM = MAKE_ID2('W', 'M'), /* WindowManager */ + ID_MC = MAKE_ID2('M', 'C'), /* MovieClip */ + ID_MSK = MAKE_ID2('M', 'S'), /* Mask */ + ID_LS = MAKE_ID2('L', 'S'), /* FreestyleLineStyle */ + ID_PAL = MAKE_ID2('P', 'L'), /* Palette */ + ID_PC = MAKE_ID2('P', 'C'), /* PaintCurve */ + ID_CF = MAKE_ID2('C', 'F'), /* CacheFile */ +} ID_Type; + +/* Only used as 'placeholder' in .blend files for directly linked datablocks. */ +#define ID_ID MAKE_ID2('I', 'D') /* (internal use only) */ + +/* Deprecated. */ +#define ID_SCRN MAKE_ID2('S', 'N') + +/* NOTE! Fake IDs, needed for g.sipo->blocktype or outliner */ #define ID_SEQ MAKE_ID2('S', 'Q') /* constraint */ #define ID_CO MAKE_ID2('C', 'O') @@ -371,6 +378,47 @@ enum { FILTER_ID_VF = (1 << 25), FILTER_ID_WO = (1 << 26), FILTER_ID_PA = (1 << 27), + FILTER_ID_CF = (1 << 28), +}; + +/* IMPORTANT: this enum matches the order currently use in set_lisbasepointers, + * keep them in sync! */ +enum { + INDEX_ID_LI = 0, + INDEX_ID_IP, + INDEX_ID_AC, + INDEX_ID_KE, + INDEX_ID_GD, + INDEX_ID_NT, + INDEX_ID_IM, + INDEX_ID_TE, + INDEX_ID_MA, + INDEX_ID_VF, + INDEX_ID_AR, + INDEX_ID_CF, + INDEX_ID_ME, + INDEX_ID_CU, + INDEX_ID_MB, + INDEX_ID_LT, + INDEX_ID_LA, + INDEX_ID_CA, + INDEX_ID_TXT, + INDEX_ID_SO, + INDEX_ID_GR, + INDEX_ID_PAL, + INDEX_ID_PC, + INDEX_ID_BR, + INDEX_ID_PA, + INDEX_ID_SPK, + INDEX_ID_WO, + INDEX_ID_MC, + INDEX_ID_SCR, + INDEX_ID_OB, + INDEX_ID_LS, + INDEX_ID_SCE, + INDEX_ID_WM, + INDEX_ID_MSK, + INDEX_ID_NULL, }; #ifdef __cplusplus diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index 9a19606d6c8..f3df9090d41 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -694,7 +694,9 @@ typedef enum eAnimEdit_Context { /* dopesheet (default) */ SACTCONT_DOPESHEET = 3, /* mask */ - SACTCONT_MASK = 4 + SACTCONT_MASK = 4, + /* cache file */ + SACTCONT_CACHEFILE = 5, } eAnimEdit_Context; /* SpaceAction AutoSnap Settings (also used by other Animation Editors) */ diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index 6bd7b3a4999..31fe8fe563e 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -450,7 +450,9 @@ typedef enum eDriver_Flags { /* the names are cached so they don't need have python unicode versions created each time */ DRIVER_FLAG_RENAMEVAR = (1<<4), /* intermediate values of driver should be shown in the UI for debugging purposes */ - DRIVER_FLAG_SHOWDEBUG = (1<<5) + DRIVER_FLAG_SHOWDEBUG = (1<<5), + /* include 'self' in the drivers namespace. */ + DRIVER_FLAG_USE_SELF = (1<<6), } eDriver_Flags; /* F-Curves -------------------------------------- */ diff --git a/source/blender/makesdna/DNA_cachefile_types.h b/source/blender/makesdna/DNA_cachefile_types.h new file mode 100644 index 00000000000..1cda0233aa8 --- /dev/null +++ b/source/blender/makesdna/DNA_cachefile_types.h @@ -0,0 +1,84 @@ +/* + * ***** 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2016 Blender Foundation. + * All rights reserved. + * + * Contributor(s): Kevin Dietrich. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file DNA_cachefile_types.h + * \ingroup DNA + */ + +#ifndef __DNA_CACHEFILE_TYPES_H__ +#define __DNA_CACHEFILE_TYPES_H__ + +#include "DNA_ID.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/* CacheFile::flag */ +enum { + CACHEFILE_DS_EXPAND = (1 << 0), +}; + +/* CacheFile::draw_flag */ +enum { + CACHEFILE_KEYFRAME_DRAWN = (1 << 0), +}; + +typedef struct AlembicObjectPath { + struct AlembicObjectPath *next, *prev; + + char path[1024]; /* 1024 = FILE_MAX, might use PATH_MAX in the future. */ +} AlembicObjectPath; + +typedef struct CacheFile { + ID id; + struct AnimData *adt; + + struct AbcArchiveHandle *handle; + + /* Paths of the objects inside of the Alembic archive referenced by this + * CacheFile. */ + ListBase object_paths; + + char filepath[1024]; /* 1024 = FILE_MAX */ + + char is_sequence; + char forward_axis; + char up_axis; + char override_frame; + + float scale; + float frame; /* The frame/time to lookup in the cache file. */ + + short flag; /* Animation flag. */ + short draw_flag; +} CacheFile; + +#ifdef __cplusplus +} +#endif + +#endif /* __DNA_CACHEFILE_TYPES_H__ */ diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index d385e303a7c..ee147da8dae 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -63,6 +63,7 @@ typedef struct ClothSimSettings { float max_sewing; /* max sewing force */ float avg_spring_len; /* used for normalized springs */ float timescale; /* parameter how fast cloth runs */ + float time_scale; /* multiplies cloth speed */ float maxgoal; /* see SB */ float eff_force_scale;/* Scaling of effector forces (see softbody_calc_forces).*/ float eff_wind_scale; /* Scaling of effector wind (see softbody_calc_forces). */ @@ -98,6 +99,7 @@ typedef struct ClothSimSettings { short presets; /* used for presets on GUI */ short reset; + char pad0[4]; struct EffectorWeights *effector_weights; } ClothSimSettings; diff --git a/source/blender/makesdna/DNA_color_types.h b/source/blender/makesdna/DNA_color_types.h index 1d88b01cf62..f7ee1ff3915 100644 --- a/source/blender/makesdna/DNA_color_types.h +++ b/source/blender/makesdna/DNA_color_types.h @@ -49,7 +49,8 @@ typedef struct CurveMapPoint { /* curvepoint->flag */ enum { CUMA_SELECT = 1, - CUMA_VECTOR = 2 + CUMA_HANDLE_VECTOR = 2, + CUMA_HANDLE_AUTO_ANIM = 4, }; typedef struct CurveMap { diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index 5fcd374b21f..fc4e7de73f5 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -458,6 +458,12 @@ typedef struct bObjectSolverConstraint { struct Object *camera; } bObjectSolverConstraint; +/* Transform matrix cache constraint */ +typedef struct bTransformCacheConstraint { + struct CacheFile *cache_file; + char object_path[1024]; /* FILE_MAX */ +} bTransformCacheConstraint; + /* ------------------------------------------ */ /* bConstraint->type @@ -494,6 +500,7 @@ typedef enum eBConstraint_Types { CONSTRAINT_TYPE_FOLLOWTRACK = 26, /* Follow Track Constraint */ CONSTRAINT_TYPE_CAMERASOLVER = 27, /* Camera Solver Constraint */ CONSTRAINT_TYPE_OBJECTSOLVER = 28, /* Object Solver Constraint */ + CONSTRAINT_TYPE_TRANSFORM_CACHE = 29, /* Transform Cache Constraint */ /* NOTE: no constraints are allowed to be added after this */ NUM_CONSTRAINT_TYPES diff --git a/source/blender/makesdna/DNA_genfile.h b/source/blender/makesdna/DNA_genfile.h index a2981c0aa76..9e9ab974b01 100644 --- a/source/blender/makesdna/DNA_genfile.h +++ b/source/blender/makesdna/DNA_genfile.h @@ -100,6 +100,7 @@ void *DNA_struct_reconstruct( int DNA_elem_array_size(const char *str); int DNA_elem_offset(struct SDNA *sdna, const char *stype, const char *vartype, const char *name); +bool DNA_struct_find(const struct SDNA *sdna, const char *stype); bool DNA_struct_elem_find(const struct SDNA *sdna, const char *stype, const char *vartype, const char *name); diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h index 41f53f9f51c..773d203bdb3 100644 --- a/source/blender/makesdna/DNA_gpencil_types.h +++ b/source/blender/makesdna/DNA_gpencil_types.h @@ -18,7 +18,7 @@ * The Original Code is Copyright (C) 2008, Blender Foundation. * This is a new part of Blender * - * Contributor(s): Joshua Leung + * Contributor(s): Joshua Leung, Antonio Vazquez * * ***** END GPL LICENSE BLOCK ***** */ @@ -32,9 +32,10 @@ #include "DNA_listBase.h" #include "DNA_ID.h" +#include "DNA_brush_types.h" struct AnimData; - +struct CurveMapping; /* Grease-Pencil Annotations - 'Stroke Point' * -> Coordinates may either be 2d or 3d depending on settings at the time @@ -44,6 +45,7 @@ struct AnimData; typedef struct bGPDspoint { float x, y, z; /* co-ordinates of point (usually 2d, but can be 3d as well) */ float pressure; /* pressure of input device (from 0 to 1) at this point */ + float strength; /* color strength (used for alpha factor) */ float time; /* seconds since start of stroke */ int flag; /* additional options (NOTE: can shrink this field down later if needed) */ } bGPDspoint; @@ -65,24 +67,113 @@ typedef struct bGPDtriangle { int v1, v2, v3; /* indices for tesselated triangle used for GP Fill */ } bGPDtriangle; +/* GP brush (used for new strokes) */ +typedef struct bGPDbrush { + struct bGPDbrush *next, *prev; + + char info[64]; /* Brush name. Must be unique. */ + short thickness; /* thickness to apply to strokes */ + short flag; + float draw_smoothfac; /* amount of smoothing to apply to newly created strokes */ + short draw_smoothlvl; /* number of times to apply smooth factor to new strokes */ + short sublevel; /* number of times to subdivide new strokes */ + + float draw_sensitivity; /* amount of sensivity to apply to newly created strokes */ + float draw_strength; /* amount of alpha strength to apply to newly created strokes */ + float draw_jitter; /* amount of jitter to apply to newly created strokes */ + float draw_angle; /* angle when the brush has full thickness */ + float draw_angle_factor; /* factor to apply when angle change (only 90 degrees) */ + float draw_random_press; /* factor of randomness for sensitivity and strength */ + float draw_random_sub; /* factor of randomness for subdivision */ + struct CurveMapping *cur_sensitivity; + struct CurveMapping *cur_strength; + struct CurveMapping *cur_jitter; +} bGPDbrush; + +/* bGPDbrush->flag */ +typedef enum eGPDbrush_Flag { + /* brush is active */ + GP_BRUSH_ACTIVE = (1 << 0), + /* brush use pressure */ + GP_BRUSH_USE_PRESSURE = (1 << 1), + /* brush use pressure for alpha factor */ + GP_BRUSH_USE_STENGTH_PRESSURE = (1 << 2), + /* brush use pressure for alpha factor */ + GP_BRUSH_USE_JITTER_PRESSURE = (1 << 3), + /* brush use random for pressure */ + GP_BRUSH_USE_RANDOM_PRESSURE = (1 << 4), + /* brush use random for strength */ + GP_BRUSH_USE_RANDOM_STRENGTH = (1 << 5) +} eGPDbrush_Flag; + +/* color of palettes */ +typedef struct bGPDpalettecolor { + struct bGPDpalettecolor *next, *prev; + char info[64]; /* Color name. Must be unique. */ + float color[4]; + float fill[4]; /* color that should be used for drawing "fills" for strokes */ + short flag; /* settings for palette color */ + char pad[6]; /* padding for compiler alignment error */ +} bGPDpalettecolor; + +/* bGPDpalettecolor->flag */ +typedef enum eGPDpalettecolor_Flag { + /* color is active */ + PC_COLOR_ACTIVE = (1 << 0), + /* don't display color */ + PC_COLOR_HIDE = (1 << 1), + /* protected from further editing */ + PC_COLOR_LOCKED = (1 << 2), + /* do onion skinning */ + PC_COLOR_ONIONSKIN = (1 << 3), + /* "volumetric" strokes (i.e. GLU Quadric discs in 3D) */ + PC_COLOR_VOLUMETRIC = (1 << 4), + /* Use High quality fill */ + PC_COLOR_HQ_FILL = (1 << 5) +} eGPDpalettecolor_Flag; + +/* palette of colors */ +typedef struct bGPDpalette { + struct bGPDpalette *next, *prev; + + /* pointer to individual colours */ + ListBase colors; + char info[64]; /* Palette name. Must be unique. */ + + short flag; + char pad[6]; /* padding for compiler alignment error */ +} bGPDpalette; + +/* bGPDpalette->flag */ +typedef enum eGPDpalette_Flag { + /* palette is active */ + PL_PALETTE_ACTIVE = (1 << 0) +} eGPDpalette_Flag; + /* Grease-Pencil Annotations - 'Stroke' * -> A stroke represents a (simplified version) of the curve * drawn by the user in one 'mousedown'->'mouseup' operation */ typedef struct bGPDstroke { struct bGPDstroke *next, *prev; + bGPDspoint *points; /* array of data-points for stroke */ - void *pad; /* keep 4 pointers at the beginning, padding for 'inittime' is tricky 64/32bit */ - int totpoints; /* number of data-points in array */ - - short thickness; /* thickness of stroke (currently not used) */ - short flag; /* various settings about this stroke */ - bGPDtriangle *triangles;/* tesselated triangles for GP Fill */ + int totpoints; /* number of data-points in array */ int tot_triangles; /* number of triangles in array */ - int pad1, *pad2; + + short thickness; /* thickness of stroke */ + short flag, pad[2]; /* various settings about this stroke */ double inittime; /* Init time of stroke */ + /* The pointer to color is only used during drawing, but not saved + * colorname is the join with the palette, but when draw, the pointer is update if the value is NULL + * to speed up the drawing + */ + char colorname[128]; /* color name */ + bGPDpalettecolor *palcolor; /* current palette color */ + /* temporary layer name only used during copy/paste to put the stroke in the original layer */ + char tmp_layerinfo[128]; } bGPDstroke; /* bGPDstroke->flag */ @@ -97,6 +188,10 @@ typedef enum eGPDstroke_Flag { GP_STROKE_SELECT = (1 << 3), /* Recalculate triangulation for high quality fill (when true, force a new recalc) */ GP_STROKE_RECALC_CACHES = (1 << 4), + /* Recalculate the color pointer using the name as index (true force a new recalc) */ + GP_STROKE_RECALC_COLOR = (1 << 5), + /* Flag used to indicate that stroke is closed and draw edge between last and first point */ + GP_STROKE_CYCLIC = (1 << 7), /* only for use with stroke-buffer (while drawing eraser) */ GP_STROKE_ERASER = (1 << 15) } eGPDstroke_Flag; @@ -139,16 +234,18 @@ typedef struct bGPDlayer { float gcolor_prev[3]; /* optional color for ghosts before the active frame */ float gcolor_next[3]; /* optional color for ghosts after the active frame */ - float color[4]; /* color that should be used to draw all the strokes in this layer */ - float fill[4]; /* color that should be used for drawing "fills" for strokes */ + float color[4]; /* Color for strokes in layers (replaced by palettecolor). Only used for ruler (which uses GPencil internally) */ + float fill[4]; /* Fill color for strokes in layers. Not used and replaced by palettecolor fill */ char info[128]; /* optional reference info about this layer (i.e. "director's comments, 12/3") * this is used for the name of the layer too and kept unique. */ - float draw_smoothfac; /* amount of smoothing to apply to newly created strokes */ - short draw_smoothlvl; /* number of times to apply smooth factor to new strokes */ - short sublevel; /* number of times to subdivide new strokes */ - short pad[4]; /* padding for compiler error */ + struct Object *parent; /* parent object */ + float inverse[4][4]; /* inverse matrix (only used if parented) */ + char parsubstr[64]; /* String describing subobject info, MAX_ID_NAME-2 */ + short partype, pad; + float tintcolor[4]; /* Color used to tint layer, alpha value is used as factor */ + float opacity; /* Opacity of the layer */ } bGPDlayer; /* bGPDlayer->flag */ @@ -176,7 +273,9 @@ typedef enum eGPDlayer_Flag { /* "volumetric" strokes (i.e. GLU Quadric discs in 3D) */ GP_LAYER_VOLUMETRIC = (1 << 10), /* Use high quality fill (instead of buggy legacy OpenGL Fill) */ - GP_LAYER_HQ_FILL = (1 << 11) + GP_LAYER_HQ_FILL = (1 << 11), + /* Unlock color */ + GP_LAYER_UNLOCK_COLOR = (1 << 12) } eGPDlayer_Flag; /* Grease-Pencil Annotations - 'DataBlock' */ @@ -187,7 +286,7 @@ typedef struct bGPdata { /* saved Grease-Pencil data */ ListBase layers; /* bGPDlayers */ int flag; /* settings for this datablock */ - + /* not-saved stroke buffer data (only used during paint-session) * - buffer must be initialized before use, but freed after * whole paint operation is over @@ -195,6 +294,12 @@ typedef struct bGPdata { short sbuffer_size; /* number of elements currently in cache */ short sbuffer_sflag; /* flags for stroke that cache represents */ void *sbuffer; /* stroke buffer (can hold GP_STROKE_BUFFER_MAX) */ + float scolor[4]; /* buffer color using palettes */ + char pad[6]; /* padding for compiler alignment error */ + short sflag; /* settings for palette color */ + + /* saved palettes */ + ListBase palettes; } bGPdata; /* bGPdata->flag */ @@ -229,7 +334,9 @@ typedef enum eGPdata_Flag { GP_DATA_STROKE_EDITMODE = (1 << 8), /* Convenience/cache flag to make it easier to quickly toggle onion skinning on/off */ - GP_DATA_SHOW_ONIONSKINS = (1 << 9) + GP_DATA_SHOW_ONIONSKINS = (1 << 9), + /* Draw a green and red point to indicate start and end of the stroke */ + GP_DATA_SHOW_DIRECTION = (1 << 10) } eGPdata_Flag; #endif /* __DNA_GPENCIL_TYPES_H__ */ diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index bbc8edf4344..0424dc98a25 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -85,6 +85,7 @@ typedef enum ModifierType { eModifierType_DataTransfer = 49, eModifierType_NormalEdit = 50, eModifierType_CorrectiveSmooth = 51, + eModifierType_MeshSequenceCache = 52, NUM_MODIFIER_TYPES } ModifierType; @@ -1541,4 +1542,25 @@ enum { MOD_NORMALEDIT_MIX_MUL = 3, }; +typedef struct MeshSeqCacheModifierData { + ModifierData modifier; + + struct CacheFile *cache_file; + char object_path[1024]; /* 1024 = FILE_MAX */ + + char read_flag; + char pad[7]; +} MeshSeqCacheModifierData; + +/* MeshSeqCacheModifierData.read_flag */ +enum { + MOD_MESHSEQ_READ_VERT = (1 << 0), + MOD_MESHSEQ_READ_POLY = (1 << 1), + MOD_MESHSEQ_READ_UV = (1 << 2), + MOD_MESHSEQ_READ_COLOR = (1 << 3), +}; + +#define MOD_MESHSEQ_READ_ALL \ + (MOD_MESHSEQ_READ_VERT | MOD_MESHSEQ_READ_POLY | MOD_MESHSEQ_READ_UV | MOD_MESHSEQ_READ_COLOR) + #endif /* __DNA_MODIFIER_TYPES_H__ */ diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h index cccee82cb51..59acefeffe4 100644 --- a/source/blender/makesdna/DNA_object_force.h +++ b/source/blender/makesdna/DNA_object_force.h @@ -339,6 +339,8 @@ typedef struct SoftBody { struct PointCache *pointcache; struct ListBase ptcaches; + struct Group *collision_group; + struct EffectorWeights *effector_weights; /* reverse esimated obmatrix .. no need to store in blend file .. how ever who cares */ float lcom[3]; diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h index b284a683f8e..1deb9bf3787 100644 --- a/source/blender/makesdna/DNA_particle_types.h +++ b/source/blender/makesdna/DNA_particle_types.h @@ -160,6 +160,7 @@ typedef struct ParticleSettings { struct SPHFluidSettings *fluid; struct EffectorWeights *effector_weights; + struct Group *collision_group; int flag, rt; short type, from, distr, texact; diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 4b0381826ec..7e2354e5a99 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -62,6 +62,7 @@ struct AnimData; struct Editing; struct SceneStats; struct bGPdata; +struct bGPDbrush; struct MovieClip; struct ColorSpace; @@ -1148,12 +1149,12 @@ typedef enum eGP_EditBrush_Types { GP_EDITBRUSH_TYPE_SUBDIVIDE = 7, GP_EDITBRUSH_TYPE_SIMPLIFY = 8, GP_EDITBRUSH_TYPE_CLONE = 9, - + GP_EDITBRUSH_TYPE_STRENGTH = 10, + /* !!! Update GP_EditBrush_Data brush[###]; below !!! */ TOT_GP_EDITBRUSH_TYPES } eGP_EditBrush_Types; - /* Settings for a GPencil Stroke Sculpting Brush */ typedef struct GP_EditBrush_Data { short size; /* radius of brush */ @@ -1179,17 +1180,26 @@ typedef enum eGP_EditBrush_Flag { /* GPencil Stroke Sculpting Settings */ typedef struct GP_BrushEdit_Settings { - GP_EditBrush_Data brush[10]; /* TOT_GP_EDITBRUSH_TYPES */ + GP_EditBrush_Data brush[11]; /* TOT_GP_EDITBRUSH_TYPES */ void *paintcursor; /* runtime */ int brushtype; /* eGP_EditBrush_Types */ int flag; /* eGP_BrushEdit_SettingsFlag */ + char pad[4]; + float alpha; /* alpha factor for selection color */ } GP_BrushEdit_Settings; /* GP_BrushEdit_Settings.flag */ typedef enum eGP_BrushEdit_SettingsFlag { /* only affect selected points */ - GP_BRUSHEDIT_FLAG_SELECT_MASK = (1 << 0) + GP_BRUSHEDIT_FLAG_SELECT_MASK = (1 << 0), + /* apply brush to position */ + GP_BRUSHEDIT_FLAG_APPLY_POSITION = (1 << 1), + /* apply brush to strength */ + GP_BRUSHEDIT_FLAG_APPLY_STRENGTH = (1 << 2), + /* apply brush to thickness */ + GP_BRUSHEDIT_FLAG_APPLY_THICKNESS = (1 << 3) + } eGP_BrushEdit_SettingsFlag; /* *************************************************************** */ @@ -1409,6 +1419,9 @@ typedef struct ToolSettings { /* Grease Pencil Sculpt */ struct GP_BrushEdit_Settings gp_sculpt; + /* Grease Pencil Drawing Brushes (bGPDbrush) */ + ListBase gp_brushes; + /* Image Paint (8 byttse aligned please!) */ struct ImagePaintSettings imapaint; @@ -2106,6 +2119,8 @@ typedef enum eGPencil_Flags { GP_TOOL_FLAG_PAINTSESSIONS_ON = (1 << 0), /* When creating new frames, the last frame gets used as the basis for the new one */ GP_TOOL_FLAG_RETAIN_LAST = (1 << 1), + /* Add the strokes below all strokes in the layer */ + GP_TOOL_FLAG_PAINT_ONBACK = (1 << 2) } eGPencil_Flags; /* toolsettings->gpencil_src */ diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index fbeabb351ac..e208ef39719 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -218,11 +218,18 @@ typedef struct ScrArea { char temp, pad; struct SpaceType *type; /* callbacks for this space type */ - - ListBase spacedata; /* SpaceLink */ - ListBase regionbase; /* ARegion */ - ListBase handlers; /* wmEventHandler */ - + + /* A list of space links (editors) that were open in this area before. When + * changing the editor type, we try to reuse old editor data from this list. + * The first item is the active/visible one. + */ + ListBase spacedata; /* SpaceLink */ + /* NOTE: This region list is the one from the active/visible editor (first item in + * spacedata list). Use SpaceLink.regionbase if it's inactive (but only then)! + */ + ListBase regionbase; /* ARegion */ + ListBase handlers; /* wmEventHandler */ + ListBase actionzones; /* AZone */ } ScrArea; diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 4ce0f369ebd..41188c2412f 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -738,6 +738,7 @@ typedef enum eFileSel_File_Types { FILE_TYPE_COLLADA = (1 << 13), FILE_TYPE_OPERATOR = (1 << 14), /* from filter_glob operator property */ FILE_TYPE_APPLICATIONBUNDLE = (1 << 15), + FILE_TYPE_ALEMBIC = (1 << 16), FILE_TYPE_DIR = (1 << 30), /* An FS directory (i.e. S_ISDIR on its path is true). */ FILE_TYPE_BLENDERLIB = (1 << 31), diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index 6a41591e051..96085a79eff 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -1294,6 +1294,11 @@ int DNA_elem_offset(SDNA *sdna, const char *stype, const char *vartype, const ch return (int)((intptr_t)cp); } +bool DNA_struct_find(const SDNA *sdna, const char *stype) +{ + return DNA_struct_find_nr(sdna, stype) != -1; +} + bool DNA_struct_elem_find(const SDNA *sdna, const char *stype, const char *vartype, const char *name) { const int SDNAnr = DNA_struct_find_nr(sdna, stype); diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index b78299316e1..2cea8715a65 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -129,6 +129,7 @@ static const char *includefiles[] = { "DNA_rigidbody_types.h", "DNA_freestyle_types.h", "DNA_linestyle_types.h", + "DNA_cachefile_types.h", /* see comment above before editing! */ /* empty string to indicate end of includefiles */ @@ -1340,4 +1341,5 @@ int main(int argc, char **argv) #include "DNA_rigidbody_types.h" #include "DNA_freestyle_types.h" #include "DNA_linestyle_types.h" +#include "DNA_cachefile_types.h" /* end of list */ |