diff options
author | Rohan Rathi <rohanrathi08@gmail.com> | 2018-06-11 18:33:07 +0300 |
---|---|---|
committer | Rohan Rathi <rohanrathi08@gmail.com> | 2018-06-11 18:33:07 +0300 |
commit | 12551299326fea494020d19708220a9d31dd11d0 (patch) | |
tree | c6a81baaf6dc869071fafa46f0597f22c7acdb6e /source/blender/makesdna | |
parent | 0c6410ec0cffdcb0641fa85d8394f7c682c44143 (diff) | |
parent | 7529690df38ced314d59af3b10c610e3fd56c807 (diff) |
Merge branch 'blender2.8' into soc-2018-bevel
Diffstat (limited to 'source/blender/makesdna')
24 files changed, 416 insertions, 277 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 4d59a7c9669..8043e01a147 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -229,7 +229,7 @@ typedef struct ID { /* Only set for datablocks which are coming from copy-on-write, points to * the original version of it. */ - void *orig_id; + struct ID *orig_id; void *py_instance; } ID; @@ -381,7 +381,8 @@ typedef enum ID_Type { #define ID_CHECK_UNDO(id) ((GS((id)->name) != ID_SCR) && (GS((id)->name) != ID_WM) && (GS((id)->name) != ID_WS)) -#define ID_BLEND_PATH(_bmain, _id) ((_id)->lib ? (_id)->lib->filepath : (_bmain)->name) +#define ID_BLEND_PATH(_bmain, _id) ((_id)->lib ? (_id)->lib->filepath : BKE_main_blendfile_path((_bmain))) +#define ID_BLEND_PATH_FROM_GLOBAL(_id) ((_id)->lib ? (_id)->lib->filepath : BKE_main_blendfile_path_from_global()) #define ID_MISSING(_id) (((_id)->tag & LIB_TAG_MISSING) != 0) @@ -467,8 +468,8 @@ enum { LIB_TAG_PRE_EXISTING = 1 << 11, /* The datablock is a copy-on-write/localized version. */ - LIB_TAG_COPY_ON_WRITE = 1 << 12, - LIB_TAG_COPY_ON_WRITE_EVAL = 1 << 13, + LIB_TAG_COPIED_ON_WRITE = 1 << 12, + LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT = 1 << 13, LIB_TAG_LOCALIZED = 1 << 14, /* RESET_NEVER tag datablock for freeing etc. behavior (usually set when copying real one into temp/runtime one). */ @@ -491,9 +492,7 @@ enum { ID_RECALC_DRAW_CACHE = 1 << 3, ID_RECALC_GEOMETRY = 1 << 4, ID_RECALC_TRANSFORM = 1 << 5, - ID_RECALC_COLLECTIONS = 1 << 6, - ID_RECALC_COPY_ON_WRITE = 1 << 7, - ID_RECALC_TIME = 1 << 8, + ID_RECALC_COPY_ON_WRITE = 1 << 6, /* Special flag to check if SOMETHING was changed. */ ID_RECALC_ALL = (~(int)0), }; diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index 2e73f5754d3..2266390d348 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_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 @@ -61,7 +61,8 @@ typedef struct bMotionPathVert { /* bMotionPathVert->flag */ typedef enum eMotionPathVert_Flag { /* vert is selected */ - MOTIONPATH_VERT_SEL = (1 << 0) + MOTIONPATH_VERT_SEL = (1 << 0), + MOTIONPATH_VERT_KEY = (1 << 1), } eMotionPathVert_Flag; /* ........ */ @@ -79,6 +80,12 @@ typedef struct bMotionPath { float color[3]; /* optional custom color */ int line_thickness; /* line thickness */ int flag; /* baking settings - eMotionPath_Flag */ + + /* Used for drawing. */ + struct Gwn_VertBuf *points_vbo; + struct Gwn_Batch *batch_line; + struct Gwn_Batch *batch_points; + void *pad; } bMotionPath; /* bMotionPath->flag */ @@ -199,8 +206,8 @@ typedef struct bPoseChannelDrawData { /* PoseChannel * - * A PoseChannel stores the results of Actions and transform information - * with respect to the restposition of Armature bones + * A PoseChannel stores the results of Actions and transform information + * with respect to the restposition of Armature bones */ typedef struct bPoseChannel { struct bPoseChannel *next, *prev; @@ -277,6 +284,9 @@ typedef struct bPoseChannel { void *temp; /* use for outliner */ /* Runtime data for color and bbone segment matrix. */ bPoseChannelDrawData *draw_data; + + /* Points to an original pose channel. */ + struct bPoseChannel *orig_pchan; } bPoseChannel; @@ -489,14 +499,14 @@ typedef enum eItasc_Solver { /* Action-Channel Group (agrp) * - * These are stored as a list per-Action, and are only used to - * group that Action's channels in an Animation Editor. + * These are stored as a list per-Action, and are only used to + * group that Action's channels in an Animation Editor. * * Even though all FCurves live in a big list per Action, each group they are in also * holds references to the achans within that list which belong to it. Care must be taken to * ensure that action-groups never end up being the sole 'owner' of a channel. - * - * This is also exploited for bone-groups. Bone-Groups are stored per bPose, and are used + * + * This is also exploited for bone-groups. Bone-Groups are stored per bPose, and are used * primarily to color bones in the 3d-view. There are other benefits too, but those are mostly related * to Action-Groups. * @@ -543,13 +553,13 @@ typedef enum eActionGroup_Flag { /* Action - reusable F-Curve 'bag' (act) * - * This contains F-Curves that may affect settings from more than one ID blocktype and/or - * datablock (i.e. sub-data linked/used directly to the ID block that the animation data is linked to), + * This contains F-Curves that may affect settings from more than one ID blocktype and/or + * datablock (i.e. sub-data linked/used directly to the ID block that the animation data is linked to), * but with the restriction that the other unrelated data (i.e. data that is not directly used or linked to * by the source ID block). * - * It serves as a 'unit' of reusable animation information (i.e. keyframes/motion data), that - * affects a group of related settings (as defined by the user). + * It serves as a 'unit' of reusable animation information (i.e. keyframes/motion data), that + * affects a group of related settings (as defined by the user). */ typedef struct bAction { ID id; /* ID-serialisation for relinking */ @@ -667,10 +677,10 @@ typedef enum eDopeSheet_Flag { typedef struct SpaceAction { struct SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - float blockscale; - - short blockhandler[8]; + char spacetype; + char link_flag; + char _pad0[6]; + /* End 'SpaceLink' header. */ View2D v2d DNA_DEPRECATED; /* copied to region */ @@ -764,14 +774,14 @@ typedef enum eTimeline_Cache_Flag { /* WARNING: Action Channels are now deprecated... they were part of the old animation system! * (ONLY USED FOR DO_VERSIONS...) - * - * Action Channels belong to Actions. They are linked with an IPO block, and can also own - * Constraint Channels in certain situations. + * + * Action Channels belong to Actions. They are linked with an IPO block, and can also own + * Constraint Channels in certain situations. * * Action-Channels can only belong to one group at a time, but they still live the Action's * list of achans (to preserve backwards compatibility, and also minimize the code * that would need to be recoded). Grouped achans are stored at the start of the list, according - * to the position of the group in the list, and their position within the group. + * to the position of the group in the list, and their position within the group. */ typedef struct bActionChannel { struct bActionChannel *next, *prev; diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index c2248778c46..63dc8920a4b 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -47,7 +47,7 @@ extern "C" { /* F-Curve Modifiers (fcm) * * These alter the way F-Curves behave, by altering the value that is returned - * when evaluating the curve's data at some time (t). + * when evaluating the curve's data at some time (t). */ typedef struct FModifier { struct FModifier *next, *prev; @@ -134,7 +134,7 @@ typedef enum eFMod_Generator_Flags { /* 'Built-In Function' Generator modifier data - * + * * This uses the general equation for equations: * y = amplitude * fn(phase_multiplier*x + phase_offset) + y_offset * @@ -397,14 +397,14 @@ typedef enum eDriverVar_Flags { /* Channel Driver (i.e. Drivers / Expressions) (driver) * - * Channel Drivers are part of the dependency system, and are executed in addition to + * Channel Drivers are part of the dependency system, and are executed in addition to * normal user-defined animation. They take the animation result of some channel(s), and * use that (optionally combined with its own F-Curve for modification of results) to define * the value of some setting semi-procedurally. * * Drivers are stored as part of F-Curve data, so that the F-Curve's RNA-path settings (for storing * what setting the driver will affect). The order in which they are stored defines the order that they're - * evaluated in. This order is set by the Depsgraph's sorting stuff. + * evaluated in. This order is set by the Depsgraph's sorting stuff. */ typedef struct ChannelDriver { ListBase variables; /* targets for this driver (i.e. list of DriverVar) */ @@ -583,8 +583,8 @@ typedef struct AnimMapPair { /* Retargetting Information for Actions * - * This should only be used if it is strictly necessary (i.e. user will need to explicitly - * add this when they find that some channels do not match, or motion is not going to right + * This should only be used if it is strictly necessary (i.e. user will need to explicitly + * add this when they find that some channels do not match, or motion is not going to right * places). When executing an action, this will be checked to see if it provides any useful * remaps for the given paths. * @@ -607,7 +607,7 @@ typedef struct AnimMapper { /* NLA Strip (strip) * * A NLA Strip is a container for the reuse of Action data, defining parameters - * to control the remapping of the Action data to some destination. + * to control the remapping of the Action data to some destination. */ typedef struct NlaStrip { struct NlaStrip *next, *prev; @@ -716,7 +716,7 @@ typedef enum eNlaStrip_Type { /* NLA Track (nlt) * - * A track groups a bunch of 'strips', which should form a continuous set of + * A track groups a bunch of 'strips', which should form a continuous set of * motion, on top of which other such groups can be layered. This should allow * for animators to work in a non-destructive manner, layering tweaks, etc. over * 'rough' blocks of their work. @@ -759,7 +759,7 @@ typedef enum eNlaTrack_Flag { * dynamic data-block - such as PoseChannels - to act upon, ala * Maya's 'Character Sets' and XSI's 'Marking Sets'), or they may * be generic (using various placeholder template tags that will be - * replaced with appropriate information from the context). + * replaced with appropriate information from the context). */ typedef struct KS_Path { struct KS_Path *next, *prev; @@ -807,7 +807,7 @@ typedef enum eKSP_Grouping { * be keyframed together, providing a convenient way for animators * to insert keyframes without resorting to Auto-Keyframing. * - * A few 'generic' (non-absolute and dependent on templates) KeyingSets + * A few 'generic' (non-absolute and dependent on templates) KeyingSets * are defined 'built-in' to facilitate easy animating for the casual * animator without the need to add extra steps to the rigging process. */ @@ -864,7 +864,7 @@ typedef enum eInsertKeyFlags { * * This is used to as temporary storage of values which have been changed by the user, but not * yet keyframed (thus, would get overwritten by the animation system before the user had a chance - * to see the changes that were made). + * to see the changes that were made). * * It is probably not needed for overriding keyframed values in most cases, as those will only get evaluated * on frame-change now. That situation may change in future. @@ -881,11 +881,11 @@ typedef struct AnimOverride { /* AnimData ------------------------------------- */ /* Animation data for some ID block (adt) - * + * * This block of data is used to provide all of the necessary animation data for a datablock. * Currently, this data will not be reusable, as there shouldn't be any need to do so. - * - * This information should be made available for most if not all ID-blocks, which should + * + * This information should be made available for most if not all ID-blocks, which should * enable all of its settings to be animatable locally. Animation from 'higher-up' ID-AnimData * blocks may override local settings. * @@ -917,6 +917,8 @@ typedef struct AnimData { ListBase drivers; /* standard user-created Drivers/Expressions (used as part of a rig) */ ListBase overrides; /* temp storage (AnimOverride) of values for settings that are animated (but the value hasn't been keyframed) */ + FCurve **driver_array; /* runtime data, for depsgraph evaluation */ + /* settings for animation evaluation */ int flag; /* user-defined settings */ int recalc; /* depsgraph recalculation flags */ @@ -961,8 +963,6 @@ typedef enum eAnimData_Flag { typedef enum eAnimData_Recalc { ADT_RECALC_DRIVERS = (1 << 0), ADT_RECALC_ANIM = (1 << 1), - /* Only apply f-curve value if its original DNA value matches current DNA value. */ - ADT_RECALC_CHECK_ORIG_DNA = (1 << 2), ADT_RECALC_ALL = (ADT_RECALC_DRIVERS | ADT_RECALC_ANIM) } eAnimData_Recalc; diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index f0f8c3fe2bd..6f6ce7d08db 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -157,7 +157,7 @@ typedef enum eConstraint_IK_Type { /* Spline IK Constraint * Aligns 'n' bones to the curvature defined by the curve, - * with the chain ending on the bone that owns this constraint, + * with the chain ending on the bone that owns this constraint, * and starting on the nth parent. */ typedef struct bSplineIKConstraint { diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index fd0170b9766..f1b0c32e53b 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -92,7 +92,7 @@ typedef struct BevList { /** * Keyframes on F-Curves (allows code reuse of Bezier eval code) and - * Points on Bezier Curves/Paths are generally BezTriples + * Points on Bezier Curves/Paths are generally BezTriples * * \note alfa location in struct is abused by Key system * diff --git a/source/blender/makesdna/DNA_freestyle_types.h b/source/blender/makesdna/DNA_freestyle_types.h index 158bdf573b3..36cf151b76e 100644 --- a/source/blender/makesdna/DNA_freestyle_types.h +++ b/source/blender/makesdna/DNA_freestyle_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 diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h index d5a5a1d5d4a..c7ca92ba5cc 100644 --- a/source/blender/makesdna/DNA_gpencil_types.h +++ b/source/blender/makesdna/DNA_gpencil_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 diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h index 374104d8b13..5ba822616eb 100644 --- a/source/blender/makesdna/DNA_ipo_types.h +++ b/source/blender/makesdna/DNA_ipo_types.h @@ -29,7 +29,7 @@ * \ingroup DNA * \deprecated * The contents of this file are now officially deprecated. They were used for the 'old' animation system, - * which has (as of 2.50) been replaced with a completely new system by Joshua Leung (aligorith). All defines, + * which has (as of 2.50) been replaced with a completely new system by Joshua Leung (aligorith). All defines, * etc. are only still maintained to provide backwards compatibility for old files. */ diff --git a/source/blender/makesdna/DNA_linestyle_types.h b/source/blender/makesdna/DNA_linestyle_types.h index f9b9f8a4641..fa9ce358549 100644 --- a/source/blender/makesdna/DNA_linestyle_types.h +++ b/source/blender/makesdna/DNA_linestyle_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 diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index 564e6aee3fc..64c40cc3efa 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -73,7 +73,13 @@ typedef struct Material { /* Colors from Blender Internal that we are still using. */ float r, g, b; float specr, specg, specb; - float alpha, ray_mirror, spec, gloss_mir; + float alpha DNA_DEPRECATED; + float ray_mirror DNA_DEPRECATED; + float spec; + float gloss_mir DNA_DEPRECATED; /* renamed and inversed to roughness */ + float roughness; + float metallic; + float pad4[2]; /* Ror buttons and render. */ char pr_type, use_nodes; diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index 6d38fe22ea1..4014db72adf 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -164,8 +164,8 @@ typedef struct MLoop { * MEdge *ed = &medge[mloop[lt->tri[j]].e]; * unsigned int tri_edge[2] = {mloop[lt->tri[j]].v, mloop[lt->tri[j_next]].v}; * - * if (((ed->v1 == tri_edge[0]) && (ed->v1 == tri_edge[1])) || - * ((ed->v1 == tri_edge[1]) && (ed->v1 == tri_edge[0]))) + * if (((ed->v1 == tri_edge[0]) && (ed->v2 == tri_edge[1])) || + * ((ed->v1 == tri_edge[1]) && (ed->v2 == tri_edge[0]))) * { * printf("real edge found %u %u\n", tri_edge[0], tri_edge[1]); * } diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index af1045ee059..7d8d1883100 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_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 diff --git a/source/blender/makesdna/DNA_object_enums.h b/source/blender/makesdna/DNA_object_enums.h index 524c85948f3..802ca6c7d0d 100644 --- a/source/blender/makesdna/DNA_object_enums.h +++ b/source/blender/makesdna/DNA_object_enums.h @@ -47,6 +47,7 @@ typedef enum eObjectMode { #define OB_MODE_ALL_SCULPT (OB_MODE_SCULPT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT) /* Any mode that has data we need to free when switching modes, see: #ED_object_mode_generic_exit */ -#define OB_MODE_ALL_MODE_DATA (OB_MODE_EDIT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_SCULPT) +#define OB_MODE_ALL_MODE_DATA \ + (OB_MODE_EDIT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_SCULPT | OB_MODE_POSE) #endif /* __DNA_OBJECT_ENUMS_H__ */ diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 64c67f7d325..f37bccbfe4e 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -143,6 +143,23 @@ typedef struct ObjectDisplay { int flag; } ObjectDisplay; +/* Not saved in file! */ +typedef struct Object_Runtime { + /* Original mesh pointer, before object->data was changed to point + * to mesh_eval. + * Is assigned by dependency graph's copy-on-write evaluation. + */ + struct Mesh *mesh_orig; + /* Mesh structure created during object evaluation. + * It has all modifiers applied. + */ + struct Mesh *mesh_eval; + /* Mesh structure created during object evaluation. + * It has deforemation only modifiers applied on it. + */ + struct Mesh *mesh_deform_eval; +} Object_Runtime; + typedef struct Object { ID id; struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ @@ -299,10 +316,8 @@ typedef struct Object { int pad6; int select_color; - /* Mesh structure created during object evaluation. - * It has all modifiers applied. - */ - struct Mesh *mesh_evaluated; + /* Runtime evaluation data. */ + Object_Runtime runtime; /* Object Display */ struct ObjectDisplay display; @@ -327,26 +342,6 @@ typedef struct ObHook { float force; } ObHook; -/* runtime only, but include here for rna access */ -typedef struct DupliObject { - struct DupliObject *next, *prev; - struct Object *ob; - float mat[4][4]; - float orco[3], uv[2]; - - short type; /* from Object.transflag */ - char no_draw, animated; - - /* persistent identifier for a dupli object, for inter-frame matching of - * objects with motion blur, or inter-update matching for syncing */ - int persistent_id[16]; /* 2*MAX_DUPLI_RECUR */ - - /* particle this dupli was generated from */ - struct ParticleSystem *particle_system; - unsigned int random_id; - unsigned int pad; -} DupliObject; - /* **************** OBJECT ********************* */ /* used many places... should be specialized */ @@ -389,6 +384,10 @@ enum { #define OB_TYPE_SUPPORT_PARVERT(_type) \ (ELEM(_type, OB_MESH, OB_SURF, OB_CURVE, OB_LATTICE)) +/** Matches #OB_TYPE_SUPPORT_EDITMODE. */ +#define OB_DATA_SUPPORT_EDITMODE(_type) \ + (ELEM(_type, ID_ME, ID_CU, ID_MB, ID_LT, ID_AR)) + /* is this ID type used as object data */ #define OB_DATA_SUPPORT_ID(_id_type) \ (ELEM(_id_type, ID_ME, ID_CU, ID_MB, ID_LA, ID_SPK, ID_LP, ID_CA, ID_LT, ID_AR)) diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h index 583b8504524..8437c93a722 100644 --- a/source/blender/makesdna/DNA_particle_types.h +++ b/source/blender/makesdna/DNA_particle_types.h @@ -255,12 +255,18 @@ typedef struct ParticleSettings { /* modified dm support */ short use_modifier_stack; - short pad5; - int pad8; - float twist; - float pad6; + /* hair shape */ + short shape_flag; + short pad6; + + float twist, pad8; + + /* hair thickness shape */ + float shape; + float rad_root, rad_tip, rad_scale; + struct CurveMapping *twistcurve; void *pad7; } ParticleSettings; @@ -449,6 +455,11 @@ typedef enum eParticleChildFlag { PART_CHILD_USE_TWIST_CURVE = (1<<3), } eParticleChildFlag; +/* part->shape_flag */ +typedef enum eParticleShapeFlag { + PART_SHAPE_CLOSE_TIP = (1<<0), +} eParticleShapeFlag; + /* part->draw_col */ #define PART_DRAW_COL_NONE 0 #define PART_DRAW_COL_MAT 1 diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 0559df7950d..7d26fc6af3f 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -713,12 +713,21 @@ typedef struct RenderData { ListBase views; /* SceneRenderView */ short actview; short views_format; - short pad8[2]; + + /* Hair Display */ + short hair_type, hair_subdiv; /* Motion blur shutter */ struct CurveMapping mblur_shutter_curve; } RenderData; +/* RenderData.hair_type */ +typedef enum eHairType { + SCE_HAIR_SHAPE_STRAND = 0, + SCE_HAIR_SHAPE_STRIP = 1, +} eHairType; + + /* *************************************************************** */ /* Render Conversion/Simplfication Settings */ @@ -1379,6 +1388,7 @@ typedef struct SceneDisplay { float matcap_ssao_factor_edge; float matcap_hair_brightness_randomness; int matcap_ssao_samples; + } SceneDisplay; typedef struct SceneEEVEE { @@ -1617,7 +1627,7 @@ enum { /* #define R_DEPRECATED 0x10000 */ /* #define R_RECURS_PROTECTION 0x20000 */ #define R_TEXNODE_PREVIEW 0x40000 -#define R_VIEWPORT_PREVIEW 0x80000 +/* #define R_VIEWPORT_PREVIEW 0x80000 */ #define R_EXR_CACHE_FILE 0x100000 #define R_MULTIVIEW 0x200000 diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index ef0dbceef38..91bf1bbddbd 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -121,7 +121,9 @@ typedef struct Panel { /* the part from uiBlock that needs saved in file */ char panelname[64], tabname[64]; /* defined as UI_MAX_NAME_STR */ char drawname[64]; /* panelname is identifier for restoring location */ - int ofsx, ofsy, sizex, sizey; + int ofsx, ofsy; /* offset within the region */ + int sizex, sizey; /* panel size including children */ + int blocksizex, blocksizey; /* panel size excluding children */ short labelofs, pad; short flag, runtime_flag; short control; @@ -129,6 +131,7 @@ typedef struct Panel { /* the part from uiBlock that needs saved in file */ int sortorder; /* panels are aligned according to increasing sortorder */ struct Panel *paneltab; /* this panel is tabbed in *paneltab */ void *activedata; /* runtime for panel manipulation */ + ListBase children; /* sub panels */ } Panel; @@ -274,11 +277,12 @@ typedef struct ScrArea { * SPACE_EMPTY. Also, versioning uses it to nicely replace deprecated * editors. It's been there for ages, name doesn't fit any more... */ char butspacetype; /* eSpace_Type (SPACE_FOO) */ + short butspacetype_subtype; short winx, winy; /* size */ - short headertype DNA_DEPRECATED;/* OLD! 0=no header, 1= down, 2= up */ - short do_refresh; /* private, for spacetype refresh callback */ + char headertype DNA_DEPRECATED;/* OLD! 0=no header, 1= down, 2= up */ + char do_refresh; /* private, for spacetype refresh callback */ short flag; short region_active_win; /* index of last used region of 'RGN_TYPE_WINDOW' * runtime variable, updated by executing operators */ @@ -386,6 +390,7 @@ enum { /*PNL_TABBED = (1 << 3), */ /*UNUSED*/ PNL_OVERLAP = (1 << 4), PNL_PIN = (1 << 5), + PNL_POPOVER = (1 << 6), }; /* Panel->snap - for snapping to screen edges */ diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 3bc5118c996..18fd17c006e 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -72,7 +72,9 @@ struct BLI_mempool; //#define WITH_GLOBAL_AREA_WRITING -/* SpaceLink (Base) ==================================== */ +/* -------------------------------------------------------------------- */ +/** \name SpaceLink (Base) + * \{ */ /** * The base structure all the other spaces @@ -82,22 +84,26 @@ struct BLI_mempool; typedef struct SpaceLink { struct SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - float blockscale DNA_DEPRECATED; /* XXX make deprecated */ - short blockhandler[8] DNA_DEPRECATED; /* XXX make deprecated */ + char spacetype; + char link_flag; + char _pad0[6]; } SpaceLink; +/** \} */ -/* Space Info ========================================== */ +/* -------------------------------------------------------------------- */ +/** \name Space Info + * \{ */ /* Info Header */ typedef struct SpaceInfo { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - float blockscale DNA_DEPRECATED; - short blockhandler[8] DNA_DEPRECATED; /* XXX make deprecated */ - + char spacetype; + char link_flag; + char _pad0[6]; + /* End 'SpaceLink' header. */ + char rpt_mask; char pad[7]; } SpaceInfo; @@ -111,27 +117,32 @@ typedef enum eSpaceInfo_RptMask { INFO_RPT_ERR = (1 << 4), } eSpaceInfo_RptMask; +/** \} */ -/* Properties Editor ==================================== */ +/* -------------------------------------------------------------------- */ +/** \name Properties Editor + * \{ */ /* Properties Editor */ typedef struct SpaceButs { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - float blockscale DNA_DEPRECATED; - - short blockhandler[8] DNA_DEPRECATED; + char spacetype; + char link_flag; + char _pad0[6]; + /* End 'SpaceLink' header. */ View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ - + + /* For different kinds of property editors (exposed in the space type selector). */ + short space_subtype; + short mainb, mainbo, mainbuser; /* context tabs */ short re_align, align; /* align for panels */ short preview; /* preview is signal to refresh */ char flag; char collection_context; - char pad[2]; - + void *path; /* runtime */ int pathflag, dataicon; /* runtime */ ID *pinid; @@ -140,18 +151,18 @@ typedef struct SpaceButs { } SpaceButs; /* button defines (deprecated) */ -/* warning: the values of these defines are used in sbuts->tabs[8] */ -/* sbuts->mainb new */ +#ifdef DNA_DEPRECATED_ALLOW +/* warning: the values of these defines are used in SpaceButs.tabs[8] */ +/* SpaceButs.mainb new */ #define CONTEXT_SCENE 0 #define CONTEXT_OBJECT 1 -#define CONTEXT_TYPES 2 +// #define CONTEXT_TYPES 2 #define CONTEXT_SHADING 3 #define CONTEXT_EDITING 4 -#define CONTEXT_SCRIPT 5 -//#define CONTEXT_LOGIC 6 +// #define CONTEXT_SCRIPT 5 +// #define CONTEXT_LOGIC 6 -/* sbuts->mainb old (deprecated) */ -#ifdef DNA_DEPRECATED_ALLOW +/* SpaceButs.mainb old (deprecated) */ // #define BUTS_VIEW 0 #define BUTS_LAMP 1 #define BUTS_MAT 2 @@ -167,9 +178,9 @@ typedef struct SpaceButs { // #define BUTS_SOUND 12 #define BUTS_CONSTRAINT 13 // #define BUTS_EFFECTS 14 -#endif +#endif /* DNA_DEPRECATED_ALLOW */ -/* buts->mainb new */ +/* SpaceButs.mainb new */ typedef enum eSpaceButtons_Context { BCONTEXT_RENDER = 0, BCONTEXT_SCENE = 1, @@ -185,13 +196,14 @@ typedef enum eSpaceButtons_Context { BCONTEXT_CONSTRAINT = 11, BCONTEXT_BONE_CONSTRAINT = 12, BCONTEXT_VIEW_LAYER = 13, + BCONTEXT_TOOL = 14, BCONTEXT_WORKSPACE = 15, /* always as last... */ BCONTEXT_TOT } eSpaceButtons_Context; -/* sbuts->flag */ +/* SpaceButs.flag */ typedef enum eSpaceButtons_Flag { SB_PRV_OSA = (1 << 0), SB_PIN_CONTEXT = (1 << 1), @@ -201,7 +213,7 @@ typedef enum eSpaceButtons_Flag { SB_SHADING_CONTEXT = (1 << 4), } eSpaceButtons_Flag; -/* sbuts->align */ +/* SpaceButs.align */ typedef enum eSpaceButtons_Align { BUT_FREE = 0, BUT_HORIZONTAL = 1, @@ -209,35 +221,25 @@ typedef enum eSpaceButtons_Align { BUT_AUTO = 3, } eSpaceButtons_Align; -/* sbuts->scaflag */ -#define BUTS_SENS_SEL 1 -#define BUTS_SENS_ACT 2 -#define BUTS_SENS_LINK 4 -#define BUTS_CONT_SEL 8 -#define BUTS_CONT_ACT 16 -#define BUTS_CONT_LINK 32 -#define BUTS_ACT_SEL 64 -#define BUTS_ACT_ACT 128 -#define BUTS_ACT_LINK 256 -#define BUTS_SENS_STATE 512 -#define BUTS_ACT_STATE 1024 -#define BUTS_CONT_INIT_STATE 2048 +/** \} */ - -/* Outliner =============================================== */ +/* -------------------------------------------------------------------- */ +/** \name Outliner + * \{ */ /* Outliner */ typedef struct SpaceOops { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - float blockscale DNA_DEPRECATED; - short blockhandler[8] DNA_DEPRECATED; + char spacetype; + char link_flag; + char _pad0[6]; + /* End 'SpaceLink' header. */ View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ - + ListBase tree; - + /* treestore is an ordered list of TreeStoreElem's from outliner tree; * Note that treestore may contain duplicate elements if element * is used multiple times in outliner tree (e. g. linked objects) @@ -245,7 +247,7 @@ typedef struct SpaceOops { * therefore readfile.c/writefile.c linearize treestore into TreeStore structure */ struct BLI_mempool *treestore; - + /* search stuff */ char search_string[64]; struct TreeStoreElem search_tse; @@ -255,13 +257,13 @@ typedef struct SpaceOops { char filter_state; char pad; short filter_id_type; - + /* pointers to treestore elements, grouped by (id, type, nr) in hashtable for faster searching */ void *treehash; } SpaceOops; -/* SpaceOops->flag */ +/* SpaceOops.flag */ typedef enum eSpaceOutliner_Flag { SO_TESTBLOCKS = (1 << 0), SO_NEWSELECTED = (1 << 1), @@ -270,7 +272,7 @@ typedef enum eSpaceOutliner_Flag { SO_SKIP_SORT_ALPHA = (1 << 4), } eSpaceOutliner_Flag; -/* SpaceOops->filter */ +/* SpaceOops.filter */ typedef enum eSpaceOutliner_Filter { SO_FILTER_SEARCH = (1 << 0), /* SO_FILTER_ENABLE = (1 << 1), */ /* Deprecated */ @@ -312,7 +314,7 @@ typedef enum eSpaceOutliner_Filter { SO_FILTER_OB_STATE | \ SO_FILTER_NO_COLLECTION) -/* SpaceOops->filter_state */ +/* SpaceOops.filter_state */ typedef enum eSpaceOutliner_StateFilter { SO_FILTER_OB_ALL = 0, SO_FILTER_OB_VISIBLE = 1, @@ -320,7 +322,7 @@ typedef enum eSpaceOutliner_StateFilter { SO_FILTER_OB_ACTIVE = 3, } eSpaceOutliner_StateFilter; -/* SpaceOops->outlinevis */ +/* SpaceOops.outlinevis */ typedef enum eSpaceOutliner_Mode { SO_SCENES = 0, /* SO_CUR_SCENE = 1, */ /* deprecated! */ @@ -340,7 +342,7 @@ typedef enum eSpaceOutliner_Mode { SO_VIEW_LAYER = 15, } eSpaceOutliner_Mode; -/* SpaceOops->storeflag */ +/* SpaceOops.storeflag */ typedef enum eSpaceOutliner_StoreFlag { /* cleanup tree */ SO_TREESTORE_CLEANUP = (1 << 0), @@ -350,34 +352,38 @@ typedef enum eSpaceOutliner_StoreFlag { SO_TREESTORE_REBUILD = (1 << 2), } eSpaceOutliner_StoreFlag; -/* outliner search flags (SpaceOops->search_flags) */ +/* outliner search flags (SpaceOops.search_flags) */ typedef enum eSpaceOutliner_Search_Flags { SO_FIND_CASE_SENSITIVE = (1 << 0), SO_FIND_COMPLETE = (1 << 1), SO_SEARCH_RECURSIVE = (1 << 2), } eSpaceOutliner_Search_Flags; +/** \} */ -/* Graph Editor ========================================= */ +/* -------------------------------------------------------------------- */ +/** \name Graph Editor + * \{ */ /* 'Graph' Editor (formerly known as the IPO Editor) */ typedef struct SpaceIpo { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - float blockscale DNA_DEPRECATED; - short blockhandler[8] DNA_DEPRECATED; - + char spacetype; + char link_flag; + char _pad0[6]; + /* End 'SpaceLink' header. */ + View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ - + struct bDopeSheet *ads; /* settings for filtering animation data (NOTE: we use a pointer due to code-linking issues) */ - + ListBase ghostCurves; /* sampled snapshots of F-Curves used as in-session guides */ - + short mode; /* mode for the Graph editor (eGraphEdit_Mode) */ short autosnap; /* time-transform autosnapping settings for Graph editor (eAnimEdit_AutoSnap in DNA_action_types.h) */ int flag; /* settings for Graph editor (eGraphEdit_Flag) */ - + float cursorTime; /* time value for cursor (when in drivers mode; animation uses current frame) */ float cursorVal; /* cursor value (y-value, x-value is current frame) */ int around; /* pivot point for transforms */ @@ -385,11 +391,11 @@ typedef struct SpaceIpo { } SpaceIpo; -/* SpaceIpo->flag (Graph Editor Settings) */ +/* SpaceIpo.flag (Graph Editor Settings) */ typedef enum eGraphEdit_Flag { /* OLD DEPRECEATED SETTING */ /* SIPO_LOCK_VIEW = (1 << 0), */ - + /* don't merge keyframes on the same frame after a transform */ SIPO_NOTRANSKEYCULL = (1 << 1), /* don't show any keyframe handles at all */ @@ -422,7 +428,7 @@ typedef enum eGraphEdit_Flag { SIPO_NORMALIZE_FREEZE = (1 << 15), } eGraphEdit_Flag; -/* SpaceIpo->mode (Graph Editor Mode) */ +/* SpaceIpo.mode (Graph Editor Mode) */ typedef enum eGraphEdit_Mode { /* all animation curves (from all over Blender) */ SIPO_MODE_ANIMATION = 0, @@ -430,26 +436,30 @@ typedef enum eGraphEdit_Mode { SIPO_MODE_DRIVERS = 1, } eGraphEdit_Mode; +/** \} */ -/* NLA Editor ============================================= */ +/* -------------------------------------------------------------------- */ +/** \name NLA Editor + * \{ */ /* NLA Editor */ typedef struct SpaceNla { struct SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - float blockscale DNA_DEPRECATED; - short blockhandler[8] DNA_DEPRECATED; + char spacetype; + char link_flag; + char _pad0[6]; + /* End 'SpaceLink' header. */ short autosnap; /* this uses the same settings as autosnap for Action Editor */ short flag; int pad; - + struct bDopeSheet *ads; View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ } SpaceNla; -/* nla->flag */ +/* SpaceNla.flag */ typedef enum eSpaceNla_Flag { /* flags (1<<0), (1<<1), and (1<<3) are deprecated flags from old verisons */ @@ -465,10 +475,13 @@ typedef enum eSpaceNla_Flag { SNLA_NOLOCALMARKERS = (1 << 7), } eSpaceNla_Flag; +/** \} */ -/* Timeline =============================================== */ +/* -------------------------------------------------------------------- */ +/** \name Timeline + * \{ */ -/* time->redraws (now screen->redraws_flag) */ +/* SpaceTime.redraws (now bScreen.redraws_flag) */ typedef enum eScreen_Redraws_Flag { TIME_REGION = (1 << 0), TIME_ALL_3D_WIN = (1 << 1), @@ -484,19 +497,23 @@ typedef enum eScreen_Redraws_Flag { TIME_FOLLOW = (1 << 15), } eScreen_Redraws_Flag; -/* Sequence Editor ======================================= */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Sequence Editor + * \{ */ /* Sequencer */ typedef struct SpaceSeq { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - float blockscale DNA_DEPRECATED; - - short blockhandler[8] DNA_DEPRECATED; + char spacetype; + char link_flag; + char _pad0[6]; + /* End 'SpaceLink' header. */ View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ - + float xof DNA_DEPRECATED, yof DNA_DEPRECATED; /* deprecated: offset for drawing the image preview */ short mainb; /* weird name for the sequencer subtype (seq, image, luma... etc) */ short render_size; /* eSpaceSeq_Proxy_RenderSize */ @@ -521,7 +538,7 @@ typedef struct SpaceSeq { } SpaceSeq; -/* sseq->mainb */ +/* SpaceSeq.mainb */ typedef enum eSpaceSeq_RegionType { SEQ_DRAW_SEQUENCE = 0, SEQ_DRAW_IMG_IMBUF = 1, @@ -530,14 +547,14 @@ typedef enum eSpaceSeq_RegionType { SEQ_DRAW_IMG_HISTOGRAM = 4, } eSpaceSeq_RegionType; -/* sseq->draw_flag */ +/* SpaceSeq.draw_flag */ typedef enum eSpaceSeq_DrawFlag { SEQ_DRAW_BACKDROP = (1 << 0), SEQ_DRAW_OFFSET_EXT = (1 << 1), } eSpaceSeq_DrawFlag; -/* sseq->flag */ +/* SpaceSeq.flag */ typedef enum eSpaceSeq_Flag { SEQ_DRAWFRAMES = (1 << 0), SEQ_MARKER_TRANS = (1 << 1), @@ -552,14 +569,14 @@ typedef enum eSpaceSeq_Flag { SEQ_SHOW_METADATA = (1 << 10), } eSpaceSeq_Flag; -/* sseq->view */ +/* SpaceSeq.view */ typedef enum eSpaceSeq_Displays { SEQ_VIEW_SEQUENCE = 1, SEQ_VIEW_PREVIEW = 2, SEQ_VIEW_SEQUENCE_PREVIEW = 3, } eSpaceSeq_Dispays; -/* sseq->render_size */ +/* SpaceSeq.render_size */ typedef enum eSpaceSeq_Proxy_RenderSize { SEQ_PROXY_RENDER_SIZE_NONE = -1, SEQ_PROXY_RENDER_SIZE_SCENE = 0, @@ -580,14 +597,18 @@ typedef struct MaskSpaceInfo { char pad3[5]; } MaskSpaceInfo; -/* sseq->mainb */ +/* SpaceSeq.mainb */ typedef enum eSpaceSeq_OverlayType { SEQ_DRAW_OVERLAY_RECT = 0, SEQ_DRAW_OVERLAY_REFERENCE = 1, SEQ_DRAW_OVERLAY_CURRENT = 2 } eSpaceSeq_OverlayType; -/* File Selector ========================================== */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name File Selector + * \{ */ /* Config and Input for File Selector */ typedef struct FileSelectParams { @@ -631,29 +652,33 @@ typedef struct FileSelectParams { typedef struct SpaceFile { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - + char spacetype; + char link_flag; + char _pad0[6]; + /* End 'SpaceLink' header. */ + + char _pad1[4]; int scroll_offset; struct FileSelectParams *params; /* config and input for file select */ - + struct FileList *files; /* holds the list of files to show */ ListBase *folders_prev; /* holds the list of previous directories to show */ ListBase *folders_next; /* holds the list of next directories (pushed from previous) to show */ - /* operator that is invoking fileselect + /* operator that is invoking fileselect * op->exec() will be called on the 'Load' button. * if operator provides op->cancel(), then this will be invoked * on the cancel button. */ - struct wmOperator *op; + struct wmOperator *op; struct wmTimer *smoothscroll_timer; struct wmTimer *previews_timer; struct FileLayout *layout; - + short recentnr, bookmarknr; short systemnr, system_bookmarknr; } SpaceFile; @@ -862,15 +887,20 @@ enum { FILE_ENTRY_INVALID_PREVIEW = 1 << 0, /* The preview for this entry could not be generated. */ }; -/* Image/UV Editor ======================================== */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Image/UV Editor + * \{ */ /* Image/UV Editor */ typedef struct SpaceImage { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - - int flag; + char spacetype; + char link_flag; + char _pad0[6]; + /* End 'SpaceLink' header. */ struct Image *image; struct ImageUser iuser; @@ -897,13 +927,14 @@ typedef struct SpaceImage { /* Filter settings when editor shows other object's UVs. */ int other_uv_filter; - int pad2; + + int flag; MaskSpaceInfo mask_info; } SpaceImage; -/* SpaceImage->dt_uv */ +/* SpaceImage.dt_uv */ typedef enum eSpaceImage_UVDT { SI_UVDT_OUTLINE = 0, SI_UVDT_DASH = 1, @@ -911,20 +942,20 @@ typedef enum eSpaceImage_UVDT { SI_UVDT_WHITE = 3, } eSpaceImage_UVDT; -/* SpaceImage->dt_uvstretch */ +/* SpaceImage.dt_uvstretch */ typedef enum eSpaceImage_UVDT_Stretch { SI_UVDT_STRETCH_ANGLE = 0, SI_UVDT_STRETCH_AREA = 1, } eSpaceImage_UVDT_Stretch; -/* SpaceImage->mode */ +/* SpaceImage.mode */ typedef enum eSpaceImage_Mode { SI_MODE_VIEW = 0, SI_MODE_PAINT = 1, SI_MODE_MASK = 2 /* note: mesh edit mode overrides mask */ } eSpaceImage_Mode; -/* SpaceImage->sticky +/* SpaceImage.sticky * Note DISABLE should be 0, however would also need to re-arrange icon order, * also, sticky loc is the default mode so this means we don't need to 'do_versions' */ typedef enum eSpaceImage_Sticky { @@ -933,7 +964,7 @@ typedef enum eSpaceImage_Sticky { SI_STICKY_VERTEX = 2, } eSpaceImage_Sticky; -/* SpaceImage->flag */ +/* SpaceImage.flag */ typedef enum eSpaceImage_Flag { /* SI_BE_SQUARE = (1 << 0), */ /* deprecated */ /* SI_EDITTILE = (1 << 1), */ /* deprecated */ @@ -950,14 +981,14 @@ typedef enum eSpaceImage_Flag { SI_USE_ALPHA = (1 << 12), SI_SHOW_ALPHA = (1 << 13), SI_SHOW_ZBUF = (1 << 14), - + /* next two for render window display */ SI_PREVSPACE = (1 << 15), SI_FULLWINDOW = (1 << 16), - + /* SI_DEPRECATED4 = (1 << 17), */ /* deprecated */ /* SI_DEPRECATED5 = (1 << 18), */ /* deprecated */ - + /* this means that the image is drawn until it reaches the view edge, * in the image view, it's unrelated to the 'tile' mode for texface */ @@ -977,21 +1008,26 @@ typedef enum eSpaceImage_Flag { SI_SHOW_B = (1 << 29), } eSpaceImage_Flag; -/* SpaceImage->other_uv_filter */ +/* SpaceImage.other_uv_filter */ typedef enum eSpaceImage_OtherUVFilter { SI_FILTER_SAME_IMAGE = 0, SI_FILTER_ALL = 1, } eSpaceImage_OtherUVFilter; -/* Text Editor ============================================ */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Text Editor + * \{ */ /* Text Editor */ typedef struct SpaceText { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - float blockscale DNA_DEPRECATED; - short blockhandler[8] DNA_DEPRECATED; + char spacetype; + char link_flag; + char _pad0[6]; + /* End 'SpaceLink' header. */ struct Text *text; @@ -1032,20 +1068,24 @@ typedef enum eSpaceText_Flags { /* scrollable */ ST_SCROLL_SELECT = (1 << 0), /* clear namespace after script execution (BPY_main.c) */ - ST_CLEAR_NAMESPACE = (1 << 4), - + ST_CLEAR_NAMESPACE = (1 << 4), + ST_FIND_WRAP = (1 << 5), ST_FIND_ALL = (1 << 6), ST_SHOW_MARGIN = (1 << 7), ST_MATCH_CASE = (1 << 8), - + ST_FIND_ACTIVATE = (1 << 9), } eSpaceText_Flags; -/* stext->findstr/replacestr */ +/* SpaceText.findstr/replacestr */ #define ST_MAX_FIND_STR 256 -/* Script View (Obsolete) ================================== */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Script View (Obsolete) + * \{ */ /* Script Runtime Data - Obsolete (pre 2.5) */ typedef struct Script { @@ -1068,62 +1108,68 @@ typedef struct Script { typedef struct SpaceScript { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - float blockscale DNA_DEPRECATED; + char spacetype; + char link_flag; + char _pad0[6]; + /* End 'SpaceLink' header. */ + struct Script *script; short flags, menunr; int pad1; - + void *but_refs; } SpaceScript; -/* Nodes Editor =========================================== */ +/** \} */ -/* Node Editor */ +/* -------------------------------------------------------------------- */ +/** \name Nodes Editor + * \{ */ typedef struct bNodeTreePath { struct bNodeTreePath *next, *prev; - + struct bNodeTree *nodetree; bNodeInstanceKey parent_key; /* base key for nodes in this tree instance */ int pad; float view_center[2]; /* v2d center point, so node trees can have different offsets in editors */ - + char node_name[64]; /* MAX_NAME */ } bNodeTreePath; typedef struct SpaceNode { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - float blockscale DNA_DEPRECATED; - short blockhandler[8] DNA_DEPRECATED; - + char spacetype; + char link_flag; + char _pad0[6]; + /* End 'SpaceLink' header. */ + View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ - + struct ID *id, *from; /* context, no need to save in file? well... pinning... */ short flag, pad1; /* menunr: browse id block in header */ float aspect, pad2; /* internal state variables */ - + float xof, yof; /* offset for drawing the backdrop */ float zoom; /* zoom for backdrop */ float cursor[2]; /* mouse pos for drawing socketless link and adding nodes */ - + /* XXX nodetree pointer info is all in the path stack now, * remove later on and use bNodeTreePath instead. For now these variables are set when pushing/popping * from path stack, to avoid having to update all the functions and operators. Can be done when * design is accepted and everything is properly tested. */ ListBase treepath; - + struct bNodeTree *nodetree, *edittree; - + /* tree type for the current node tree */ char tree_idname[64]; int treetype DNA_DEPRECATED; /* treetype: as same nodetree->type */ int pad3; - + short texfrom; /* texfrom object, world or brush */ short shaderfrom; /* shader from object or world */ short recalc; /* currently on 0/1, for auto compo */ @@ -1138,7 +1184,7 @@ typedef struct SpaceNode { struct bGPdata *gpd; /* grease-pencil data */ } SpaceNode; -/* snode->flag */ +/* SpaceNode.flag */ typedef enum eSpaceNode_Flag { SNODE_BACKDRAW = (1 << 1), SNODE_SHOW_GPENCIL = (1 << 2), @@ -1149,13 +1195,13 @@ typedef enum eSpaceNode_Flag { SNODE_SHOW_B = (1 << 9), SNODE_AUTO_RENDER = (1 << 5), // SNODE_SHOW_HIGHLIGHT = (1 << 6), DNA_DEPRECATED -// SNODE_USE_HIDDEN_PREVIEW = (1 << 10), DNA_DEPRECATED December2013 +// SNODE_USE_HIDDEN_PREVIEW = (1 << 10), DNA_DEPRECATED December2013 // SNODE_NEW_SHADERS = (1 << 11), DNA_DEPRECATED SNODE_PIN = (1 << 12), SNODE_SKIP_INSOFFSET = (1 << 13), /* automatically offset following nodes in a chain on insertion */ } eSpaceNode_Flag; -/* snode->texfrom */ +/* SpaceNode.texfrom */ typedef enum eSpaceNode_TexFrom { /* SNODE_TEX_OBJECT = 0, */ SNODE_TEX_WORLD = 1, @@ -1163,30 +1209,34 @@ typedef enum eSpaceNode_TexFrom { SNODE_TEX_LINESTYLE = 3, } eSpaceNode_TexFrom; -/* snode->shaderfrom */ +/* SpaceNode.shaderfrom */ typedef enum eSpaceNode_ShaderFrom { SNODE_SHADER_OBJECT = 0, SNODE_SHADER_WORLD = 1, SNODE_SHADER_LINESTYLE = 2, } eSpaceNode_ShaderFrom; -/* snode->insert_ofs_dir */ +/* SpaceNode.insert_ofs_dir */ enum { SNODE_INSERTOFS_DIR_RIGHT = 0, SNODE_INSERTOFS_DIR_LEFT = 1, }; -/* Console ================================================ */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Console + * \{ */ /* Console content */ typedef struct ConsoleLine { struct ConsoleLine *next, *prev; - + /* keep these 3 vars so as to share free, realloc funcs */ int len_alloc; /* allocated length */ int len; /* real len - strlen() */ - char *line; - + char *line; + int cursor; int type; /* only for use when in the 'scrollback' listbase */ } ConsoleLine; @@ -1204,10 +1254,11 @@ typedef enum eConsoleLine_Type { typedef struct SpaceConsole { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - float blockscale DNA_DEPRECATED; // XXX are these needed? - short blockhandler[8] DNA_DEPRECATED; // XXX are these needed? - + char spacetype; + char link_flag; + char _pad0[6]; + /* End 'SpaceLink' header. */ + /* space vars */ int lheight, pad; @@ -1215,32 +1266,46 @@ typedef struct SpaceConsole { ListBase history; /* ConsoleLine; command history, current edited line is the first */ char prompt[256]; char language[32]; /* multiple consoles are possible, not just python */ - + int sel_start; int sel_end; } SpaceConsole; +/** \} */ -/* User Preferences ======================================= */ +/* -------------------------------------------------------------------- */ +/** \name User Preferences + * \{ */ -/* User Preferences View */ typedef struct SpaceUserPref { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - - char pad[3]; + char spacetype; + char link_flag; + char _pad0[6]; + /* End 'SpaceLink' header. */ + + char _pad1[7]; char filter_type; char filter[64]; /* search term for filtering in the UI */ } SpaceUserPref; -/* Motion Tracking ======================================== */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Motion Tracking + * \{ */ /* Clip Editor */ typedef struct SpaceClip { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; + char spacetype; + char link_flag; + char _pad0[6]; + /* End 'SpaceLink' header. */ + + char _pad1[4]; float xof, yof; /* user defined offset, image is centered */ float xlockof, ylockof; /* user defined offset from locked position */ @@ -1275,7 +1340,7 @@ typedef struct SpaceClip { MaskSpaceInfo mask_info; } SpaceClip; -/* SpaceClip->flag */ +/* SpaceClip.flag */ typedef enum eSpaceClip_Flag { SC_SHOW_MARKER_PATTERN = (1 << 0), SC_SHOW_MARKER_SEARCH = (1 << 1), @@ -1302,7 +1367,7 @@ typedef enum eSpaceClip_Flag { SC_SHOW_METADATA = (1 << 22), } eSpaceClip_Flag; -/* SpaceClip->mode */ +/* SpaceClip.mode */ typedef enum eSpaceClip_Mode { SC_MODE_TRACKING = 0, /*SC_MODE_RECONSTRUCTION = 1,*/ /* DEPRECATED */ @@ -1310,21 +1375,25 @@ typedef enum eSpaceClip_Mode { SC_MODE_MASKEDIT = 3, } eSpaceClip_Mode; -/* SpaceClip->view */ +/* SpaceClip.view */ typedef enum eSpaceClip_View { SC_VIEW_CLIP = 0, SC_VIEW_GRAPH = 1, SC_VIEW_DOPESHEET = 2, } eSpaceClip_View; -/* SpaceClip->gpencil_src */ +/* SpaceClip.gpencil_src */ typedef enum eSpaceClip_GPencil_Source { SC_GPENCIL_SRC_CLIP = 0, SC_GPENCIL_SRC_TRACK = 1, } eSpaceClip_GPencil_Source; -/* Top Bar ======================================= */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Top Bar + * \{ */ /* These two lines with # tell makesdna this struct can be excluded. * Should be: #ifndef WITH_GLOBAL_AREA_WRITING */ @@ -1333,12 +1402,17 @@ typedef enum eSpaceClip_GPencil_Source { typedef struct SpaceTopBar { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - - int pad; + char spacetype; + char link_flag; + char _pad0[6]; + /* End 'SpaceLink' header. */ } SpaceTopBar; -/* Status Bar ======================================= */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Status Bar + * \{ */ /* These two lines with # tell makesdna this struct can be excluded. * Should be: #ifndef WITH_GLOBAL_AREA_WRITING */ @@ -1347,13 +1421,17 @@ typedef struct SpaceTopBar { typedef struct SpaceStatusBar { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - - int pad; + char spacetype; + char link_flag; + char _pad0[6]; + /* End 'SpaceLink' header. */ } SpaceStatusBar; +/** \} */ -/* **************** SPACE DEFINES ********************* */ +/* -------------------------------------------------------------------- */ +/** \name Space Defines (eSpace_Type) + * \{ */ /* space types, moved from DNA_screen_types.h */ /* Do NOT change order, append on end. types are hardcoded needed */ @@ -1391,7 +1469,8 @@ typedef enum eSpace_Type { /* use for function args */ #define SPACE_TYPE_ANY -1 - #define IMG_SIZE_FALLBACK 256 +/** \} */ + #endif /* __DNA_SPACE_TYPES_H__ */ diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 9817d44c96b..17f520fdfa9 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -150,9 +150,9 @@ typedef struct uiWidgetStateColors { typedef struct uiPanelColors { char header[4]; char back[4]; + char sub_back[4]; short show_header; short show_back; - int pad; } uiPanelColors; typedef struct uiGradientColors { @@ -617,6 +617,7 @@ typedef enum eUserPref_Section { USER_SECTION_THEME = 4, USER_SECTION_INPUT = 5, USER_SECTION_ADDONS = 6, + USER_SECTION_LIGHT = 7, } eUserPref_Section; /* UserDef.flag */ diff --git a/source/blender/makesdna/DNA_vec_types.h b/source/blender/makesdna/DNA_vec_types.h index 1420ca48c22..7ec259370b5 100644 --- a/source/blender/makesdna/DNA_vec_types.h +++ b/source/blender/makesdna/DNA_vec_types.h @@ -23,7 +23,7 @@ * Contributor(s): none yet. * * ***** END GPL LICENSE BLOCK ***** - * + * */ /** \file DNA_vec_types.h diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index dd3e0c25992..9686981d674 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -140,15 +140,19 @@ typedef struct View3DShading { short light; char pad[2]; char studio_light[256]; /* FILE_MAXFILE */ + char matcap[256]; /* FILE_MAXFILE */ float shadow_intensity; float single_color[3]; float studiolight_rot_z; - float pad2; + float studiolight_background; float object_outline_color[3]; - float pad3; + float xray_alpha; + + float cavity_valley_factor; + float cavity_ridge_factor; } View3DShading; /* 3D Viewport Overlay setings */ @@ -165,15 +169,20 @@ typedef struct View3DOverlay { /* Armature edit/pose mode settings */ int arm_flag; + float bone_selection_alpha; + + /* Other settings */ + float wireframe_threshold; } View3DOverlay; /* 3D ViewPort Struct */ typedef struct View3D { struct SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - float blockscale; - short blockhandler[8]; + char spacetype; + char link_flag; + char _pad0[6]; + /* End 'SpaceLink' header. */ float viewquat[4] DNA_DEPRECATED; float dist DNA_DEPRECATED; @@ -199,7 +208,7 @@ typedef struct View3D { int layact; short ob_centre_cursor; /* optional bool for 3d cursor to define center */ - short scenelock, _pad0; + short scenelock, _pad1; short flag, flag2, pad2; float lens, grid; @@ -332,14 +341,18 @@ typedef struct View3D { enum { V3D_LIGHTING_FLAT = 0, V3D_LIGHTING_STUDIO = 1, - V3D_LIGHTING_SCENE = 2 + V3D_LIGHTING_MATCAP = 2, }; /* View3DShading->flag */ enum { - V3D_SHADING_OBJECT_OUTLINE = (1 << 0), - V3D_SHADING_XRAY = (1 << 1), - V3D_SHADING_SHADOW = (1 << 2), + V3D_SHADING_OBJECT_OUTLINE = (1 << 0), + V3D_SHADING_XRAY = (1 << 1), + V3D_SHADING_SHADOW = (1 << 2), + V3D_SHADING_SCENE_LIGHT = (1 << 3), + V3D_SHADING_SPECULAR_HIGHLIGHT = (1 << 4), + V3D_SHADING_CAVITY = (1 << 5), + V3D_SHADING_MATCAP_FLIP_X = (1 << 6), }; /* View3DShading->single_color_type */ @@ -347,7 +360,6 @@ enum { V3D_SHADING_MATERIAL_COLOR = 0, V3D_SHADING_RANDOM_COLOR = 1, V3D_SHADING_SINGLE_COLOR = 2, - V3D_SHADING_OBJECT_COLOR = 3, }; /* View3DOverlay->flag */ @@ -355,6 +367,11 @@ enum { V3D_OVERLAY_FACE_ORIENTATION = (1 << 0), V3D_OVERLAY_HIDE_CURSOR = (1 << 1), V3D_OVERLAY_BONE_SELECTION = (1 << 2), + V3D_OVERLAY_LOOK_DEV = (1 << 3), + V3D_OVERLAY_WIREFRAMES = (1 << 4), + V3D_OVERLAY_HIDE_TEXT = (1 << 5), + V3D_OVERLAY_HIDE_MOTION_PATHS = (1 << 6), + V3D_OVERLAY_ONION_SKINS = (1 << 7), }; /* View3DOverlay->edit_flag */ diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 7d7fa5fcf23..6d5d2c380e2 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_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 @@ -18,7 +18,7 @@ * The Original Code is Copyright (C) 2007 Blender Foundation. * All rights reserved. * - * + * * Contributor(s): Blender Foundation * * ***** END GPL LICENSE BLOCK ***** diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt index 5b8dcd97108..06fd23cdff2 100644 --- a/source/blender/makesdna/intern/CMakeLists.txt +++ b/source/blender/makesdna/intern/CMakeLists.txt @@ -53,6 +53,7 @@ endif() # SRC_DNA_INC is defined in the parent dir add_cc_flags_custom_test(makesdna) +setup_platform_linker_flags() add_executable(makesdna ${SRC} ${SRC_DNA_INC}) diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index c1f8341ddc6..b0da028127c 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -172,7 +172,7 @@ static int additional_slen_offset; static int add_type(const char *str, int len); /** - * Add variable \c str to + * Add variable \c str to * \param str */ static int add_name(const char *str); @@ -191,22 +191,22 @@ static int preprocess_include(char *maindata, int len); /** * Scan this file for serializable types. - */ + */ static int convert_include(const char *filename); /** * Determine how many bytes are needed for an array. - */ + */ static int arraysize(const char *str); /** * Determine how many bytes are needed for each struct. - */ + */ static int calculate_structlens(int); /** * Construct the DNA.c file - */ + */ static void dna_write(FILE *file, const void *pntr, const int size); /** |