diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2019-08-18 14:24:15 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2019-08-18 14:24:15 +0300 |
commit | 8209f25c3b08f726a221cbcbcfa48dbea597c772 (patch) | |
tree | 0e02482c8b6e87a75e02098c69cee051596da42e /source/blender/makesdna | |
parent | 4befee9e620f3c0b17711b56cc19bdebd7d401f5 (diff) | |
parent | 454b120f48201abe2e1a9ca7e5d25c28cb04013a (diff) |
Merge branch 'master' into filebrowser_redesign
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_documentation.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_gpencil_modifier_types.h | 5 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_gpencil_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_material_types.h | 12 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_mesh_types.h | 5 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_meshdata_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 45 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_object_force_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_outliner_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 18 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_screen_types.h | 7 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 29 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_windowmanager_types.h | 17 | ||||
-rw-r--r-- | source/blender/makesdna/intern/dna_genfile.c | 2 |
15 files changed, 109 insertions, 48 deletions
diff --git a/source/blender/makesdna/DNA_documentation.h b/source/blender/makesdna/DNA_documentation.h index be11b3d9040..0251625292c 100644 --- a/source/blender/makesdna/DNA_documentation.h +++ b/source/blender/makesdna/DNA_documentation.h @@ -27,7 +27,7 @@ * blender file. There is an executable that scans all files, looking * for struct-s to serialize (hence sdna: Struct \ref DNA). From this * information, it builds a file with numbers that encode the format, - * the names of variables, and the plce to look for them. + * the names of variables, and the place to look for them. * * \section dnaissues Known issues with DNA * diff --git a/source/blender/makesdna/DNA_gpencil_modifier_types.h b/source/blender/makesdna/DNA_gpencil_modifier_types.h index 82628065014..83ee8be7f68 100644 --- a/source/blender/makesdna/DNA_gpencil_modifier_types.h +++ b/source/blender/makesdna/DNA_gpencil_modifier_types.h @@ -502,8 +502,11 @@ typedef struct SimplifyGpencilModifierData { short step; /** Custom index for passes. */ int layer_pass; - /* Sample length */ + /** Sample length */ float length; + /** Merge distance */ + float distance; + char _pad[4]; } SimplifyGpencilModifierData; typedef enum eSimplifyGpencil_Flag { diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h index bf72ce5e598..9682fa1d13b 100644 --- a/source/blender/makesdna/DNA_gpencil_types.h +++ b/source/blender/makesdna/DNA_gpencil_types.h @@ -651,6 +651,8 @@ typedef enum eGP_DrawMode { ((gpd) && (gpd->flag & \ (GP_DATA_STROKE_EDITMODE | GP_DATA_STROKE_SCULPTMODE | GP_DATA_STROKE_WEIGHTMODE))) #define GPENCIL_PAINT_MODE(gpd) ((gpd) && (gpd->flag & (GP_DATA_STROKE_PAINTMODE))) +#define GPENCIL_SCULPT_MODE(gpd) ((gpd) && (gpd->flag & GP_DATA_STROKE_SCULPTMODE)) +#define GPENCIL_WEIGHT_MODE(gpd) ((gpd) && (gpd->flag & GP_DATA_STROKE_WEIGHTMODE)) #define GPENCIL_SCULPT_OR_WEIGHT_MODE(gpd) \ ((gpd) && (gpd->flag & (GP_DATA_STROKE_SCULPTMODE | GP_DATA_STROKE_WEIGHTMODE))) #define GPENCIL_NONE_EDIT_MODE(gpd) \ diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index 152ecb85991..1d1ccef8846 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -306,12 +306,12 @@ typedef struct Material { /* blend_method */ enum { - MA_BM_SOLID, - MA_BM_ADD, - MA_BM_MULTIPLY, - MA_BM_CLIP, - MA_BM_HASHED, - MA_BM_BLEND, + MA_BM_SOLID = 0, + // MA_BM_ADD = 1, /* deprecated */ + // MA_BM_MULTIPLY = 2, /* deprecated */ + MA_BM_CLIP = 3, + MA_BM_HASHED = 4, + MA_BM_BLEND = 5, }; /* blend_flag */ diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index 8a9a69ac178..caa7c98335a 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -193,9 +193,10 @@ typedef struct Mesh { short totcol; + float remesh_voxel_size; + char _pad1[4]; /** Deprecated multiresolution modeling data, only keep for loading old files. */ struct Multires *mr DNA_DEPRECATED; - void *_pad1; Mesh_Runtime runtime; } Mesh; @@ -250,6 +251,8 @@ enum { ME_FLAG_UNUSED_8 = 1 << 8, /* cleared */ ME_DS_EXPAND = 1 << 9, ME_SCULPT_DYNAMIC_TOPOLOGY = 1 << 10, + ME_REMESH_SMOOTH_NORMALS = 1 << 11, + ME_REMESH_REPROJECT_PAINT_MASK = 1 << 12, }; /* me->cd_flag */ diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index 88eef05f8be..af350cfee48 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -188,10 +188,6 @@ typedef struct MVertTri { unsigned int tri[3]; } MVertTri; -// typedef struct MTexPoly { -// void *_pad; -//} MTexPoly; - typedef struct MLoopUV { float uv[2]; int flag; diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 75c0721f72a..81b93ce6541 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -184,6 +184,8 @@ typedef enum eNodeSocketFlag { /** socket hidden automatically, to distinguish from manually hidden */ SOCK_AUTO_HIDDEN__DEPRECATED = (1 << 8), SOCK_NO_INTERNAL_LINK = (1 << 9), + /** Draw socket in a more compact form. */ + SOCK_COMPACT = (1 << 10), } eNodeSocketFlag; /* limit data in bNode to what we want to see saved? */ @@ -1010,6 +1012,11 @@ typedef struct NodeCryptomatte { char _pad[4]; } NodeCryptomatte; +typedef struct NodeDenoise { + char hdr; + char _pad[7]; +} NodeDenoise; + /* script node mode */ #define NODE_SCRIPT_INTERNAL 0 #define NODE_SCRIPT_EXTERNAL 1 @@ -1160,31 +1167,31 @@ typedef struct NodeCryptomatte { /* math node clamp */ #define SHD_MATH_CLAMP 1 -/* Math node operation/ */ +/* Math node operations. */ enum { NODE_MATH_ADD = 0, - NODE_MATH_SUB = 1, - NODE_MATH_MUL = 2, + NODE_MATH_SUBTRACT = 1, + NODE_MATH_MULTIPLY = 2, NODE_MATH_DIVIDE = 3, - NODE_MATH_SIN = 4, - NODE_MATH_COS = 5, - NODE_MATH_TAN = 6, - NODE_MATH_ASIN = 7, - NODE_MATH_ACOS = 8, - NODE_MATH_ATAN = 9, - NODE_MATH_POW = 10, - NODE_MATH_LOG = 11, - NODE_MATH_MIN = 12, - NODE_MATH_MAX = 13, + NODE_MATH_SINE = 4, + NODE_MATH_COSINE = 5, + NODE_MATH_TANGENT = 6, + NODE_MATH_ARCSINE = 7, + NODE_MATH_ARCCOSINE = 8, + NODE_MATH_ARCTANGENT = 9, + NODE_MATH_POWER = 10, + NODE_MATH_LOGARITHM = 11, + NODE_MATH_MINIMUM = 12, + NODE_MATH_MAXIMUM = 13, NODE_MATH_ROUND = 14, - NODE_MATH_LESS = 15, - NODE_MATH_GREATER = 16, - NODE_MATH_MOD = 17, - NODE_MATH_ABS = 18, - NODE_MATH_ATAN2 = 19, + NODE_MATH_LESS_THAN = 15, + NODE_MATH_GREATER_THAN = 16, + NODE_MATH_MODULO = 17, + NODE_MATH_ABSOLUTE = 18, + NODE_MATH_ARCTAN2 = 19, NODE_MATH_FLOOR = 20, NODE_MATH_CEIL = 21, - NODE_MATH_FRACT = 22, + NODE_MATH_FRACTION = 22, NODE_MATH_SQRT = 23, }; diff --git a/source/blender/makesdna/DNA_object_force_types.h b/source/blender/makesdna/DNA_object_force_types.h index 2207e08558d..34a1b6d3e0b 100644 --- a/source/blender/makesdna/DNA_object_force_types.h +++ b/source/blender/makesdna/DNA_object_force_types.h @@ -271,7 +271,7 @@ typedef struct PointCache { char name[64]; char prev_name[64]; - char info[64]; + char info[128]; /** File path, 1024 = FILE_MAX. */ char path[1024]; @@ -497,6 +497,8 @@ typedef struct SoftBody { #define PTCACHE_FAKE_SMOKE (1 << 12) #define PTCACHE_IGNORE_CLEAR (1 << 13) +#define PTCACHE_FLAG_INFO_DIRTY (1 << 14) + /* PTCACHE_OUTDATED + PTCACHE_FRAMES_SKIPPED */ #define PTCACHE_REDO_NEEDED 258 diff --git a/source/blender/makesdna/DNA_outliner_types.h b/source/blender/makesdna/DNA_outliner_types.h index 1462d955f81..9776063f220 100644 --- a/source/blender/makesdna/DNA_outliner_types.h +++ b/source/blender/makesdna/DNA_outliner_types.h @@ -60,6 +60,10 @@ enum { TSE_DRAG_INTO = (1 << 6), TSE_DRAG_BEFORE = (1 << 7), TSE_DRAG_AFTER = (1 << 8), + /* Needed because outliner-only elements can be active */ + TSE_ACTIVE = (1 << 9), + /* Needed because walk selection should not activate */ + TSE_ACTIVE_WALK = (1 << 10), TSE_DRAG_ANY = (TSE_DRAG_INTO | TSE_DRAG_BEFORE | TSE_DRAG_AFTER), }; diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index f50b345e402..45159af306c 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1125,7 +1125,7 @@ typedef struct GP_Sculpt_Settings { /* GP_Sculpt_Settings.flag */ typedef enum eGP_Sculpt_SettingsFlag { /* only affect selected points */ - GP_SCULPT_SETT_FLAG_SELECT_MASK = (1 << 0), + GP_SCULPT_SETT_FLAG_DEPRECATED = (1 << 0), /* apply brush to position */ GP_SCULPT_SETT_FLAG_APPLY_POSITION = (1 << 1), /* apply brush to strength */ @@ -1142,6 +1142,16 @@ typedef enum eGP_Sculpt_SettingsFlag { GP_SCULPT_SETT_FLAG_PRIMITIVE_CURVE = (1 << 7), } eGP_Sculpt_SettingsFlag; +/* GP_Sculpt_Settings.gpencil_selectmode_sculpt */ +typedef enum eGP_Sculpt_SelectMaskFlag { + /* only affect selected points */ + GP_SCULPT_MASK_SELECTMODE_POINT = (1 << 0), + /* only affect selected strokes */ + GP_SCULPT_MASK_SELECTMODE_STROKE = (1 << 1), + /* only affect selected segmenst */ + GP_SCULPT_MASK_SELECTMODE_SEGMENT = (1 << 2), +} eGP_Sculpt_SelectMaskFlag; + /* Settings for GP Interpolation Operators */ typedef struct GP_Interpolate_Settings { /** #eGP_Interpolate_SettingsFlag. */ @@ -1412,8 +1422,10 @@ typedef struct ToolSettings { /** Default stroke thickness for annotation strokes. */ short annotate_thickness; - /** Stroke selection mode. */ - short gpencil_selectmode; + /** Stroke selection mode for Edit. */ + char gpencil_selectmode_edit; + /** Stroke selection mode for Sculpt. */ + char gpencil_selectmode_sculpt; /* Grease Pencil Sculpt */ struct GP_Sculpt_Settings gp_sculpt; diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index e37d72ff8af..fd421cd8304 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -375,6 +375,13 @@ typedef struct ScrArea { typedef struct ARegion_Runtime { /* Panel category to use between 'layout' and 'draw'. */ const char *category; + + /** + * The visible part of the region, use with region overlap not to draw + * on top of the overlapping regions. + * + * Lazy initialize, zero'd when unset, relative to #ARegion.winrct x/y min. */ + rcti visible_rect; } ARegion_Runtime; typedef struct ARegion { diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 41fc2244cce..030116ea5cc 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -244,7 +244,12 @@ typedef struct SpaceOutliner { char search_string[64]; struct TreeStoreElem search_tse; - short flag, outlinevis, storeflag, search_flags; + short flag, outlinevis, storeflag; + char search_flags; + + /** Selection syncing flag (#WM_OUTLINER_SYNC_SELECT_FROM_OBJECT and similar flags). */ + char sync_select_dirty; + int filter; char filter_state; char show_restrict_flags; @@ -263,6 +268,7 @@ typedef enum eSpaceOutliner_Flag { SO_FLAG_UNUSED_1 = (1 << 2), /* cleared */ SO_HIDE_KEYINGSETINFO = (1 << 3), SO_SKIP_SORT_ALPHA = (1 << 4), + SO_SYNC_SELECT = (1 << 5), } eSpaceOutliner_Flag; /* SpaceOutliner.filter */ @@ -281,13 +287,14 @@ typedef enum eSpaceOutliner_Filter { SO_FILTER_NO_OB_CAMERA = (1 << 10), SO_FILTER_NO_OB_OTHERS = (1 << 11), - SO_FILTER_UNUSED_12 = (1 << 12), /* cleared */ - SO_FILTER_OB_STATE_VISIBLE = (1 << 13), /* Not set via DNA. */ - SO_FILTER_OB_STATE_SELECTED = (1 << 14), /* Not set via DNA. */ - SO_FILTER_OB_STATE_ACTIVE = (1 << 15), /* Not set via DNA. */ - SO_FILTER_NO_COLLECTION = (1 << 16), + SO_FILTER_UNUSED_12 = (1 << 12), /* cleared */ + SO_FILTER_OB_STATE_VISIBLE = (1 << 13), /* Not set via DNA. */ + SO_FILTER_OB_STATE_INVISIBLE = (1 << 14), /* Not set via DNA. */ + SO_FILTER_OB_STATE_SELECTED = (1 << 15), /* Not set via DNA. */ + SO_FILTER_OB_STATE_ACTIVE = (1 << 16), /* Not set via DNA. */ + SO_FILTER_NO_COLLECTION = (1 << 17), - SO_FILTER_ID_TYPE = (1 << 17), + SO_FILTER_ID_TYPE = (1 << 18), } eSpaceOutliner_Filter; #define SO_FILTER_OB_TYPE \ @@ -295,7 +302,8 @@ typedef enum eSpaceOutliner_Filter { SO_FILTER_NO_OB_LAMP | SO_FILTER_NO_OB_CAMERA | SO_FILTER_NO_OB_OTHERS) #define SO_FILTER_OB_STATE \ - (SO_FILTER_OB_STATE_VISIBLE | SO_FILTER_OB_STATE_SELECTED | SO_FILTER_OB_STATE_ACTIVE) + (SO_FILTER_OB_STATE_VISIBLE | SO_FILTER_OB_STATE_INVISIBLE | SO_FILTER_OB_STATE_SELECTED | \ + SO_FILTER_OB_STATE_ACTIVE) #define SO_FILTER_ANY \ (SO_FILTER_NO_OB_CONTENT | SO_FILTER_NO_CHILDREN | SO_FILTER_OB_TYPE | SO_FILTER_OB_STATE | \ @@ -305,8 +313,9 @@ typedef enum eSpaceOutliner_Filter { typedef enum eSpaceOutliner_StateFilter { SO_FILTER_OB_ALL = 0, SO_FILTER_OB_VISIBLE = 1, - SO_FILTER_OB_SELECTED = 2, - SO_FILTER_OB_ACTIVE = 3, + SO_FILTER_OB_INVISIBLE = 2, + SO_FILTER_OB_SELECTED = 3, + SO_FILTER_OB_ACTIVE = 4, } eSpaceOutliner_StateFilter; /* SpaceOutliner.show_restrict_flags */ diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index b8914c7a74f..3cb96ce8bf8 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -868,6 +868,7 @@ typedef enum eUserPref_Flag { USER_NONEGFRAMES = (1 << 24), USER_TXT_TABSTOSPACES_DISABLE = (1 << 25), USER_TOOLTIPS_PYTHON = (1 << 26), + USER_ADDONS_ENABLED_ONLY = (1 << 27), } eUserPref_Flag; typedef enum eUserPref_PrefFlag { diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 8dcae41aaa2..cacc79608ad 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -131,12 +131,15 @@ typedef struct wmWindowManager { ListBase windows; /** Set on file read. */ - int initialized; + short initialized; /** Indicator whether data was saved. */ short file_saved; /** Operator stack depth to avoid nested undo pushes. */ short op_undo_depth; + /** Set after selection to notify outliner to sync. Stores type of selection */ + short outliner_sync_select_dirty; + /** Operator registry. */ ListBase operators; @@ -186,6 +189,18 @@ enum { WM_KEYCONFIG_IS_INITIALIZED = (1 << 1), }; +/* wmWindowManager.outliner_sync_select_dirty */ +enum { + WM_OUTLINER_SYNC_SELECT_FROM_OBJECT = (1 << 0), + WM_OUTLINER_SYNC_SELECT_FROM_EDIT_BONE = (1 << 1), + WM_OUTLINER_SYNC_SELECT_FROM_POSE_BONE = (1 << 2), + WM_OUTLINER_SYNC_SELECT_FROM_SEQUENCE = (1 << 3), +}; + +#define WM_OUTLINER_SYNC_SELECT_FROM_ALL \ + (WM_OUTLINER_SYNC_SELECT_FROM_OBJECT | WM_OUTLINER_SYNC_SELECT_FROM_EDIT_BONE | \ + WM_OUTLINER_SYNC_SELECT_FROM_POSE_BONE | WM_OUTLINER_SYNC_SELECT_FROM_SEQUENCE) + #define WM_KEYCONFIG_STR_DEFAULT "blender" /* IME is win32 only! */ diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index 5252c8f3350..86ba306fc6a 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -339,7 +339,7 @@ static bool init_structDNA(SDNA *sdna, bool do_endian_swap, const char **r_error data = (int *)sdna->data; - /* clear pointers incase of error */ + /* Clear pointers in case of error. */ sdna->names = NULL; sdna->types = NULL; sdna->structs = NULL; |