diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-25 16:07:17 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-25 16:07:17 +0300 |
commit | b1532493c27b08444745cef348641f3a0e899ba8 (patch) | |
tree | 84db57081ef3e1d2a1bfbf3c4bbfe352854164f2 /source/blender/makesdna | |
parent | 9186b9ae4806f4bbc1a14417c408e844f8e8cc1a (diff) | |
parent | e7721f5ec8b859d14c982a8a34bc269ab7eed82b (diff) |
Merge branch 'master' into blender2.8
Conflicts:
source/blender/blenkernel/BKE_particle.h
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/particle.c
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_brush_types.h | 9 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_color_types.h | 3 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_genfile.h | 9 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 10 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_view3d_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/intern/dna_genfile.c | 27 |
6 files changed, 33 insertions, 27 deletions
diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h index 3dca087c7fa..f4a1677efc4 100644 --- a/source/blender/makesdna/DNA_brush_types.h +++ b/source/blender/makesdna/DNA_brush_types.h @@ -4,7 +4,7 @@ * 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. + * 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 @@ -70,7 +70,6 @@ typedef struct Brush { float normal_weight; float rake_factor; /* rake actual data (not texture), used for sculpt */ - int pad; short blend; /* blend mode */ short ob_mode; /* & with ob->mode to see if the brush is compatible, use for display only. */ @@ -95,7 +94,6 @@ typedef struct Brush { float plane_offset; /* offset for plane brushes (clay, flatten, fill, scrape) */ - int flag2; int gradient_spacing; int gradient_stroke_mode; /* source for stroke color gradient application */ int gradient_fill_mode; /* source for fill tool color gradient application */ @@ -104,7 +102,7 @@ typedef struct Brush { char vertexpaint_tool; /* active vertex/weight paint blend mode (poorly named) */ char imagepaint_tool; /* active image paint tool */ char mask_tool; /* enum BrushMaskTool, only used if sculpt_tool is SCULPT_TOOL_MASK */ - + float autosmooth_factor; float crease_pinch_factor; @@ -333,5 +331,4 @@ typedef enum BlurKernelType { #define MAX_BRUSH_PIXEL_RADIUS 500 -#endif - +#endif /* __DNA_BRUSH_TYPES_H__ */ diff --git a/source/blender/makesdna/DNA_color_types.h b/source/blender/makesdna/DNA_color_types.h index c9a5e056e4a..1d88b01cf62 100644 --- a/source/blender/makesdna/DNA_color_types.h +++ b/source/blender/makesdna/DNA_color_types.h @@ -157,10 +157,11 @@ typedef struct Scopes { /* scopes->wavefrm_mode */ #define SCOPES_WAVEFRM_LUMA 0 -#define SCOPES_WAVEFRM_RGB 1 +#define SCOPES_WAVEFRM_RGB_PARADE 1 #define SCOPES_WAVEFRM_YCC_601 2 #define SCOPES_WAVEFRM_YCC_709 3 #define SCOPES_WAVEFRM_YCC_JPEG 4 +#define SCOPES_WAVEFRM_RGB 5 typedef struct ColorManagedViewSettings { int flag, pad; diff --git a/source/blender/makesdna/DNA_genfile.h b/source/blender/makesdna/DNA_genfile.h index 0e34792e624..a2981c0aa76 100644 --- a/source/blender/makesdna/DNA_genfile.h +++ b/source/blender/makesdna/DNA_genfile.h @@ -69,8 +69,11 @@ typedef enum eSDNA_Type { * For use with #DNA_struct_reconstruct & #DNA_struct_get_compareflags */ enum eSDNA_StructCompare { + /* Struct has disappeared (values of this struct type will not be loaded by the current Blender) */ SDNA_CMP_REMOVED = 0, + /* Struct is the same (can be loaded with straight memory copy after any necessary endian conversion) */ SDNA_CMP_EQUAL = 1, + /* Struct is different in some way (needs to be copied/converted field by field) */ SDNA_CMP_NOT_EQUAL = 2, }; @@ -89,15 +92,15 @@ void DNA_sdna_current_free(void); int DNA_struct_find_nr_ex(const struct SDNA *sdna, const char *str, unsigned int *index_last); int DNA_struct_find_nr(const struct SDNA *sdna, const char *str); void DNA_struct_switch_endian(const struct SDNA *oldsdna, int oldSDNAnr, char *data); -char *DNA_struct_get_compareflags(const struct SDNA *sdna, const struct SDNA *newsdna); +const char *DNA_struct_get_compareflags(const struct SDNA *sdna, const struct SDNA *newsdna); void *DNA_struct_reconstruct( const struct SDNA *newsdna, const struct SDNA *oldsdna, - char *compflags, int oldSDNAnr, int blocks, void *data); + const char *compflags, int oldSDNAnr, int blocks, const void *data); 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_elem_find(struct SDNA *sdna, const char *stype, const char *vartype, const char *name); +bool DNA_struct_elem_find(const struct SDNA *sdna, const char *stype, const char *vartype, const char *name); int DNA_elem_type_size(const eSDNA_Type elem_nr); diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 87b6813712f..804c58e445c 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1240,7 +1240,9 @@ typedef struct CurvePaintSettings { char flag; char depth_mode; char surface_plane; - int error_threshold; + char fit_method; + char pad; + short error_threshold; float radius_min, radius_max; float radius_taper_start, radius_taper_end; float surface_offset; @@ -1255,6 +1257,12 @@ enum { CURVE_PAINT_FLAG_DEPTH_STROKE_OFFSET_ABS = (1 << 3), }; +/* CurvePaintSettings.fit_method */ +enum { + CURVE_PAINT_FIT_METHOD_REFIT = 0, + CURVE_PAINT_FIT_METHOD_SPLIT = 1, +}; + /* CurvePaintSettings.depth_mode */ enum { CURVE_PAINT_PROJECT_CURSOR = 0, diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 5b533d1ec48..4c243507e82 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -239,7 +239,7 @@ typedef struct View3D { float stereo3d_convergence_alpha; /* Previous viewport draw type. - * Runtime-only, set in the rendered viewport otggle operator. + * Runtime-only, set in the rendered viewport toggle operator. */ short prev_drawtype; short pad1; diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index 4db98bda7dd..6a41591e051 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -632,13 +632,8 @@ static void recurs_test_compflags(const SDNA *sdna, char *compflags, int structn /** * Constructs and returns an array of byte flags with one element for each struct in oldsdna, * indicating how it compares to newsdna: - * - * flag value: - * - 0 Struct has disappeared (values of this struct type will not be loaded by the current Blender) - * - 1 Struct is the same (can be loaded with straight memory copy after any necessary endian conversion) - * - 2 Struct is different in some way (needs to be copied/converted field by field) */ -char *DNA_struct_get_compareflags(const SDNA *oldsdna, const SDNA *newsdna) +const char *DNA_struct_get_compareflags(const SDNA *oldsdna, const SDNA *newsdna) { int a, b; const short *sp_old, *sp_new; @@ -909,12 +904,12 @@ static int elem_strcmp(const char *name, const char *oname) * \param sppo Optional place to return pointer to field info in sdna * \return Data address. */ -static char *find_elem( +static const char *find_elem( const SDNA *sdna, const char *type, const char *name, const short *old, - char *olddata, + const char *olddata, const short **sppo) { int a, elemcount, len; @@ -1062,7 +1057,7 @@ static void reconstruct_struct( const char *compflags, int oldSDNAnr, - char *data, + const char *data, int curSDNAnr, char *cur) { @@ -1073,7 +1068,8 @@ static void reconstruct_struct( int a, elemcount, elen, eleno, mul, mulo, firststructtypenr; const short *spo, *spc, *sppo; const char *type; - char *cpo, *cpc; + const char *cpo; + char *cpc; const char *name, *nameo; unsigned int oldsdna_index_last = UINT_MAX; @@ -1111,7 +1107,7 @@ static void reconstruct_struct( if (spc[0] >= firststructtypenr && !ispointer(name)) { /* struct field type */ /* where does the old struct data start (and is there an old one?) */ - cpo = find_elem(oldsdna, type, name, spo, data, &sppo); + cpo = (char *)find_elem(oldsdna, type, name, spo, data, &sppo); if (cpo) { oldSDNAnr = DNA_struct_find_nr_ex(oldsdna, type, &oldsdna_index_last); @@ -1188,7 +1184,7 @@ void DNA_struct_switch_endian(const SDNA *oldsdna, int oldSDNAnr, char *data) if (spc[0] >= firststructtypenr && !ispointer(name)) { /* struct field type */ /* where does the old data start (is there one?) */ - char *cpo = find_elem(oldsdna, type, name, spo, data, NULL); + char *cpo = (char *)find_elem(oldsdna, type, name, spo, data, NULL); if (cpo) { oldSDNAnr = DNA_struct_find_nr_ex(oldsdna, type, &oldsdna_index_last); @@ -1250,11 +1246,12 @@ void DNA_struct_switch_endian(const SDNA *oldsdna, int oldSDNAnr, char *data) */ void *DNA_struct_reconstruct( const SDNA *newsdna, const SDNA *oldsdna, - char *compflags, int oldSDNAnr, int blocks, void *data) + const char *compflags, int oldSDNAnr, int blocks, const void *data) { int a, curSDNAnr, curlen = 0, oldlen; const short *spo, *spc; - char *cur, *cpc, *cpo; + char *cur, *cpc; + const char *cpo; const char *type; /* oldSDNAnr == structnr, we're looking for the corresponding 'cur' number */ @@ -1297,7 +1294,7 @@ int DNA_elem_offset(SDNA *sdna, const char *stype, const char *vartype, const ch return (int)((intptr_t)cp); } -bool DNA_struct_elem_find(SDNA *sdna, const char *stype, const char *vartype, const char *name) +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); |