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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRohan Rathi <rohanrathi08@gmail.com>2018-07-02 21:01:19 +0300
committerRohan Rathi <rohanrathi08@gmail.com>2018-07-02 21:01:19 +0300
commit31e43d021fdc55c6ec6741d382f4bbb05d1d62e9 (patch)
tree8ad72888c5516dcc0eb982d629a732c406177c83 /source/blender/makesdna
parent368a64fe041ee0950584f5b51e2f64036edb31d0 (diff)
parent31c9bd35bc9bb913b7a786da9c80751dbc60e006 (diff)
Merge branch 'blender2.8' into soc-2018-bevel
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_ID.h1
-rw-r--r--source/blender/makesdna/DNA_action_types.h18
-rw-r--r--source/blender/makesdna/DNA_curve_types.h1
-rw-r--r--source/blender/makesdna/DNA_effect_types.h1
-rw-r--r--source/blender/makesdna/DNA_fileglobal_types.h1
-rw-r--r--source/blender/makesdna/DNA_ipo_types.h3
-rw-r--r--source/blender/makesdna/DNA_lamp_types.h1
-rw-r--r--source/blender/makesdna/DNA_lattice_types.h1
-rw-r--r--source/blender/makesdna/DNA_layer_types.h17
-rw-r--r--source/blender/makesdna/DNA_listBase.h1
-rw-r--r--source/blender/makesdna/DNA_material_types.h1
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h5
-rw-r--r--source/blender/makesdna/DNA_nla_types.h1
-rw-r--r--source/blender/makesdna/DNA_object_fluidsim_types.h1
-rw-r--r--source/blender/makesdna/DNA_object_force_types.h1
-rw-r--r--source/blender/makesdna/DNA_object_types.h2
-rw-r--r--source/blender/makesdna/DNA_outliner_types.h1
-rw-r--r--source/blender/makesdna/DNA_packedFile_types.h2
-rw-r--r--source/blender/makesdna/DNA_rigidbody_types.h38
-rw-r--r--source/blender/makesdna/DNA_scene_types.h22
-rw-r--r--source/blender/makesdna/DNA_screen_types.h1
-rw-r--r--source/blender/makesdna/DNA_sdna_types.h1
-rw-r--r--source/blender/makesdna/DNA_space_types.h2
-rw-r--r--source/blender/makesdna/DNA_speaker_types.h1
-rw-r--r--source/blender/makesdna/DNA_texture_types.h1
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h66
-rw-r--r--source/blender/makesdna/DNA_vec_types.h1
-rw-r--r--source/blender/makesdna/DNA_view2d_types.h1
-rw-r--r--source/blender/makesdna/DNA_view3d_types.h13
-rw-r--r--source/blender/makesdna/DNA_windowmanager_types.h5
-rw-r--r--source/blender/makesdna/DNA_workspace_types.h3
-rw-r--r--source/blender/makesdna/DNA_world_types.h1
-rw-r--r--source/blender/makesdna/intern/dna_genfile.c41
33 files changed, 181 insertions, 75 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 62f8f1395c5..fa97fd53f32 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -576,6 +576,7 @@ enum {
INDEX_ID_WM,
INDEX_ID_MSK,
INDEX_ID_NULL,
+ INDEX_ID_MAX,
};
#ifdef __cplusplus
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index dac96b6ce5a..0546dcb1a6c 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -598,8 +598,8 @@ typedef struct bDopeSheet {
ID *source; /* currently ID_SCE (for Dopesheet), and ID_SC (for Grease Pencil) */
ListBase chanbase; /* cache for channels (only initialized when pinned) */ // XXX not used!
- struct Collection *filter_grp; /* object group for ADS_FILTER_ONLYOBGROUP filtering option */
- char searchstr[64]; /* string to search for in displayed names of F-Curves for ADS_FILTER_BY_FCU_NAME filtering option */
+ struct Collection *filter_grp; /* object group for option to only include objects that belong to this Collection */
+ char searchstr[64]; /* string to search for in displayed names of F-Curves, or NlaTracks/GP Layers/etc. */
int filterflag; /* flags to use for filtering data */
int flag; /* standard flags */
@@ -621,7 +621,6 @@ typedef enum eDopeSheet_FilterFlag {
/* general filtering */
ADS_FILTER_SUMMARY = (1 << 4), /* for 'DopeSheet' Editors - include 'summary' line */
- ADS_FILTER_ONLYOBGROUP = (1 << 5), /* only the objects in the specified object group get used */
/* datatype-based filtering */
ADS_FILTER_NOSHAPEKEYS = (1 << 6),
@@ -650,7 +649,6 @@ typedef enum eDopeSheet_FilterFlag {
/* general filtering 3 */
ADS_FILTER_INCL_HIDDEN = (1 << 26), /* include 'hidden' channels too (i.e. those from hidden Objects/Bones) */
- ADS_FILTER_BY_FCU_NAME = (1 << 27), /* for F-Curves, filter by the displayed name (i.e. to isolate all Location curves only) */
ADS_FILTER_ONLY_ERRORS = (1 << 28), /* show only F-Curves which are disabled/have errors - for debugging drivers */
/* GPencil Mode */
@@ -687,12 +685,16 @@ typedef struct SpaceAction {
bAction *action; /* the currently active action */
bDopeSheet ads; /* the currently active context (when not showing action) */
- char mode, autosnap; /* mode: editing context; autosnap: automatic keyframe snapping mode */
- short flag; /* flag: bitmapped settings; */
float timeslide; /* for Time-Slide transform mode drawing - current frame? */
- int cache_display; /* (eTimeline_Cache_Flag) */
- int pad;
+ short flag;
+ /* Editing context */
+ char mode;
+ /* Storage for sub-space types. */
+ char mode_prev;
+ char autosnap; /* automatic keyframe snapping mode */
+ char cache_display; /* (eTimeline_Cache_Flag) */
+ char _pad1[6];
} SpaceAction;
/* SpaceAction flag */
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index e590780f1ff..6e3573b9f80 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -470,4 +470,3 @@ enum {
#define SURF_SEEN 4
#endif
-
diff --git a/source/blender/makesdna/DNA_effect_types.h b/source/blender/makesdna/DNA_effect_types.h
index 964b330a452..373b1584c77 100644
--- a/source/blender/makesdna/DNA_effect_types.h
+++ b/source/blender/makesdna/DNA_effect_types.h
@@ -139,4 +139,3 @@ typedef struct WaveEff {
} WaveEff;
#endif
-
diff --git a/source/blender/makesdna/DNA_fileglobal_types.h b/source/blender/makesdna/DNA_fileglobal_types.h
index ed9640c365f..24fb1c86627 100644
--- a/source/blender/makesdna/DNA_fileglobal_types.h
+++ b/source/blender/makesdna/DNA_fileglobal_types.h
@@ -62,4 +62,3 @@ typedef struct FileGlobal {
#endif
-
diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h
index f97935a09a1..5f6ca277615 100644
--- a/source/blender/makesdna/DNA_ipo_types.h
+++ b/source/blender/makesdna/DNA_ipo_types.h
@@ -507,6 +507,3 @@ typedef struct Ipo {
#define IPO_DRIVER_FLAG_INVALID (1<<0)
#endif
-
-
-
diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h
index e1ab56a0206..ff649f3ffe3 100644
--- a/source/blender/makesdna/DNA_lamp_types.h
+++ b/source/blender/makesdna/DNA_lamp_types.h
@@ -152,4 +152,3 @@ typedef struct Lamp {
#define LA_AREA_ELLIPSE 5
#endif /* __DNA_LAMP_TYPES_H__ */
-
diff --git a/source/blender/makesdna/DNA_lattice_types.h b/source/blender/makesdna/DNA_lattice_types.h
index e329743cce7..71d6b3bbb0e 100644
--- a/source/blender/makesdna/DNA_lattice_types.h
+++ b/source/blender/makesdna/DNA_lattice_types.h
@@ -83,4 +83,3 @@ typedef struct Lattice {
#define LT_ACTBP_NONE -1
#endif
-
diff --git a/source/blender/makesdna/DNA_layer_types.h b/source/blender/makesdna/DNA_layer_types.h
index 6b4dcc39005..bfdd21807b8 100644
--- a/source/blender/makesdna/DNA_layer_types.h
+++ b/source/blender/makesdna/DNA_layer_types.h
@@ -91,15 +91,19 @@ typedef struct ViewLayer {
/* Base->flag */
enum {
+ /* User controlled flags. */
BASE_SELECTED = (1 << 0), /* Object is selected. */
- BASE_VISIBLED = (1 << 1), /* Object is visible. */
- BASE_SELECTABLED = (1 << 2), /* Object can be selected. */
+ BASE_HIDDEN = (1 << 8), /* Object is hidden for editing. */
+
+ /* Runtime evaluated flags. */
+ BASE_VISIBLE = (1 << 1), /* Object is enabled and visible. */
+ BASE_SELECTABLE = (1 << 2), /* Object can be selected. */
BASE_FROMDUPLI = (1 << 3), /* Object comes from duplicator. */
/* BASE_DEPRECATED = (1 << 4), */
- BASE_FROM_SET = (1 << 5), /* To be set only by the depsgraph */
- BASE_VISIBLE_VIEWPORT = (1 << 6), /* Object is visible in viewport. */
- BASE_VISIBLE_RENDER = (1 << 7), /* Object is visible in final render */
- BASE_HIDE = (1 << 8), /* Object is hidden for editing. */
+ BASE_FROM_SET = (1 << 5), /* Object comes from set. */
+ BASE_ENABLED_VIEWPORT = (1 << 6), /* Object is enabled in viewport. */
+ BASE_ENABLED_RENDER = (1 << 7), /* Object is enabled in final render */
+ BASE_ENABLED = (1 << 9), /* Object is enabled. */
};
/* LayerCollection->flag */
@@ -152,4 +156,3 @@ typedef struct SceneCollection {
#endif
#endif /* __DNA_LAYER_TYPES_H__ */
-
diff --git a/source/blender/makesdna/DNA_listBase.h b/source/blender/makesdna/DNA_listBase.h
index f6035cd6653..ad359efa4d5 100644
--- a/source/blender/makesdna/DNA_listBase.h
+++ b/source/blender/makesdna/DNA_listBase.h
@@ -67,4 +67,3 @@ typedef struct ListBase {
#endif
#endif
-
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
index 9401f591b66..eb469895fd7 100644
--- a/source/blender/makesdna/DNA_material_types.h
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -230,4 +230,3 @@ enum {
};
#endif
-
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 33381be0ef5..5e8ead09d91 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -33,6 +33,7 @@
*/
struct Mesh;
+struct Scene;
typedef enum ModifierType {
eModifierType_None = 0,
@@ -113,9 +114,6 @@ typedef struct ModifierData {
short pad;
char name[64]; /* MAX_NAME */
- /* XXX for timing info set by caller... solve later? (ton) */
- struct Scene *scene;
-
char *error;
} ModifierData;
@@ -631,7 +629,6 @@ typedef struct SoftbodyModifierData {
typedef struct ClothModifierData {
ModifierData modifier;
- struct Scene *scene; /* the context is here */
struct Cloth *clothObject; /* The internal data structure for cloth. */
struct ClothSimSettings *sim_parms; /* definition is in DNA_cloth_types.h */
struct ClothCollSettings *coll_parms; /* definition is in DNA_cloth_types.h */
diff --git a/source/blender/makesdna/DNA_nla_types.h b/source/blender/makesdna/DNA_nla_types.h
index c5e14374fb3..72db244c1fe 100644
--- a/source/blender/makesdna/DNA_nla_types.h
+++ b/source/blender/makesdna/DNA_nla_types.h
@@ -102,4 +102,3 @@ typedef enum eActStrip_Flag {
} eActStrip_Flag;
#endif
-
diff --git a/source/blender/makesdna/DNA_object_fluidsim_types.h b/source/blender/makesdna/DNA_object_fluidsim_types.h
index b8927613a59..0b0c1c40ef4 100644
--- a/source/blender/makesdna/DNA_object_fluidsim_types.h
+++ b/source/blender/makesdna/DNA_object_fluidsim_types.h
@@ -190,4 +190,3 @@ typedef struct FluidsimSettings {
#endif
#endif /* __DNA_OBJECT_FLUIDSIM_TYPES_H__ */
-
diff --git a/source/blender/makesdna/DNA_object_force_types.h b/source/blender/makesdna/DNA_object_force_types.h
index 6d38e56f19a..ac7c969a810 100644
--- a/source/blender/makesdna/DNA_object_force_types.h
+++ b/source/blender/makesdna/DNA_object_force_types.h
@@ -407,4 +407,3 @@ typedef struct SoftBody {
#endif
#endif /* __DNA_OBJECT_FORCE_TYPES_H__ */
-
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index 45029e8d412..3bcc0fb6dcc 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -367,6 +367,7 @@ enum {
/* 23 and 24 are for life and sector (old file compat.) */
OB_ARMATURE = 25,
+ OB_TYPE_MAX,
};
/* ObjectDisplay.flag */
@@ -603,4 +604,3 @@ enum {
#endif
#endif
-
diff --git a/source/blender/makesdna/DNA_outliner_types.h b/source/blender/makesdna/DNA_outliner_types.h
index d775061d85a..449f71905f0 100644
--- a/source/blender/makesdna/DNA_outliner_types.h
+++ b/source/blender/makesdna/DNA_outliner_types.h
@@ -117,4 +117,3 @@ enum {
#endif
-
diff --git a/source/blender/makesdna/DNA_packedFile_types.h b/source/blender/makesdna/DNA_packedFile_types.h
index 00a54c2db7f..d2e0dd92cbc 100644
--- a/source/blender/makesdna/DNA_packedFile_types.h
+++ b/source/blender/makesdna/DNA_packedFile_types.h
@@ -57,5 +57,3 @@ enum ePF_FileStatus {
};
#endif /* PACKEDFILE_TYPES_H */
-
-
diff --git a/source/blender/makesdna/DNA_rigidbody_types.h b/source/blender/makesdna/DNA_rigidbody_types.h
index 5a7e7c92380..693707b8b7a 100644
--- a/source/blender/makesdna/DNA_rigidbody_types.h
+++ b/source/blender/makesdna/DNA_rigidbody_types.h
@@ -42,6 +42,16 @@ struct EffectorWeights;
/* ******************************** */
/* RigidBody World */
+/* Container for data shared by original and evaluated copies of RigidBodyWorld */
+typedef struct RigidBodyWorld_Shared {
+ /* cache */
+ struct PointCache *pointcache;
+ struct ListBase ptcaches;
+
+ /* References to Physics Sim objects. Exist at runtime only ---------------------- */
+ void *physics_world; /* Physics sim world (i.e. btDiscreteDynamicsWorld) */
+} RigidBodyWorld_Shared;
+
/* RigidBodyWorld (rbw)
*
* Represents a "simulation scene" existing within the parent scene.
@@ -58,9 +68,9 @@ typedef struct RigidBodyWorld {
int pad;
float ltime; /* last frame world was evaluated for (internal) */
- /* cache */
- struct PointCache *pointcache;
- struct ListBase ptcaches;
+ struct RigidBodyWorld_Shared *shared; /* This pointer is shared between all evaluated copies */
+ struct PointCache *pointcache DNA_DEPRECATED; /* Moved to shared->pointcache */
+ struct ListBase ptcaches DNA_DEPRECATED; /* Moved to shared->ptcaches */
int numbodies; /* number of objects in rigid body group */
short steps_per_second; /* number of simulation steps thaken per second */
@@ -68,9 +78,6 @@ typedef struct RigidBodyWorld {
int flag; /* (eRigidBodyWorld_Flag) settings for this RigidBodyWorld */
float time_scale; /* used to speed up or slow down the simulation */
-
- /* References to Physics Sim objects. Exist at runtime only ---------------------- */
- void *physics_world; /* Physics sim world (i.e. btDiscreteDynamicsWorld) */
} RigidBodyWorld;
/* Flags for RigidBodyWorld */
@@ -86,6 +93,18 @@ typedef enum eRigidBodyWorld_Flag {
/* ******************************** */
/* RigidBody Object */
+/* Container for data that is shared among CoW copies.
+ *
+ * This is placed in a separate struct so that, for example, the physics_shape
+ * pointer can be replaced without having to update all CoW copies. */
+#
+#
+typedef struct RigidBodyOb_Shared {
+ /* References to Physics Sim objects. Exist at runtime only */
+ void *physics_object; /* Physics object representation (i.e. btRigidBody) */
+ void *physics_shape; /* Collision shape used by physics sim (i.e. btCollisionShape) */
+} RigidBodyOb_Shared;
+
/* RigidBodyObject (rbo)
*
* Represents an object participating in a RigidBody sim.
@@ -93,10 +112,6 @@ typedef enum eRigidBodyWorld_Flag {
* participating in a sim.
*/
typedef struct RigidBodyOb {
- /* References to Physics Sim objects. Exist at runtime only */
- void *physics_object; /* Physics object representation (i.e. btRigidBody) */
- void *physics_shape; /* Collision shape used by physics sim (i.e. btCollisionShape) */
-
/* General Settings for this RigidBodyOb */
short type; /* (eRigidBodyOb_Type) role of RigidBody in sim */
short shape; /* (eRigidBody_Shape) collision shape to use */
@@ -123,6 +138,8 @@ typedef struct RigidBodyOb {
float orn[4]; /* rigid body orientation */
float pos[3]; /* rigid body position */
float pad1;
+
+ struct RigidBodyOb_Shared *shared; /* This pointer is shared between all evaluated copies */
} RigidBodyOb;
@@ -311,4 +328,3 @@ typedef enum eRigidBodyCon_Flag {
/* ******************************** */
#endif /* __DNA_RIGIDBODY_TYPES_H__ */
-
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 6113a7bb0f9..0b8f8ee5ed1 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -1236,6 +1236,9 @@ typedef struct ToolSettings {
/* Auto-IK */
short autoik_chainlen; /* runtime only */
+ /* SCE_MPR_LOC/SCAL */
+ char manipulator_flag;
+
/* Grease Pencil */
char gpencil_flags; /* flags/options for how the tool works */
char gpencil_src; /* for main 3D view Grease Pencil, where data comes from */
@@ -1245,7 +1248,7 @@ typedef struct ToolSettings {
char gpencil_seq_align; /* : Sequencer Preview */
char gpencil_ima_align; /* : Image Editor */
- char _pad3[4];
+ char _pad3[3];
/* Grease Pencil Sculpt */
struct GP_BrushEdit_Settings gp_sculpt;
@@ -1724,22 +1727,22 @@ extern const char *RE_engine_id_CYCLES;
/* deprecate this! */
#define TESTBASE(base) ( \
(((base)->flag & BASE_SELECTED) != 0) && \
- (((base)->flag & BASE_VISIBLED) != 0))
+ (((base)->flag & BASE_VISIBLE) != 0))
#define TESTBASELIB(base) ( \
(((base)->flag & BASE_SELECTED) != 0) && \
((base)->object->id.lib == NULL) && \
- (((base)->flag & BASE_VISIBLED) != 0))
+ (((base)->flag & BASE_VISIBLE) != 0))
#define TESTBASELIB_BGMODE(base) ( \
(((base)->flag & BASE_SELECTED) != 0) && \
((base)->object->id.lib == NULL) && \
- (((base)->flag & BASE_VISIBLED) != 0))
+ (((base)->flag & BASE_VISIBLE) != 0))
#define BASE_EDITABLE_BGMODE(base) ( \
((base)->object->id.lib == NULL) && \
- (((base)->flag & BASE_VISIBLED) != 0))
+ (((base)->flag & BASE_VISIBLE) != 0))
#define BASE_SELECTABLE(base) \
- (((base)->flag & BASE_SELECTABLED) != 0)
+ (((base)->flag & BASE_SELECTABLE) != 0)
#define BASE_VISIBLE(base) ( \
- ((base)->flag & BASE_VISIBLED) != 0)
+ ((base)->flag & BASE_VISIBLE) != 0)
#define FIRSTBASE(_view_layer) ((_view_layer)->object_bases.first)
#define LASTBASE(_view_layer) ((_view_layer)->object_bases.last)
@@ -2011,6 +2014,11 @@ typedef enum eImagePaintMode {
#define EDGE_MODE_TAG_BEVEL 4
#define EDGE_MODE_TAG_FREESTYLE 5
+/* ToolSettings.manipulator_flag */
+#define SCE_MANIP_TRANSLATE 1
+#define SCE_MANIP_ROTATE 2
+#define SCE_MANIP_SCALE 4
+
/* ToolSettings.gpencil_flags */
typedef enum eGPencil_Flags {
/* "Continuous Drawing" - The drawing operator enters a mode where multiple strokes can be drawn */
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index 500d198fa74..3ee6bc38644 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -501,4 +501,3 @@ enum {
#define RGN_DRAW_REFRESH_UI 8 /* re-create uiBlock's where possible */
#define RGN_DRAW_NO_REBUILD 16
#endif
-
diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h
index bd8f23f30c1..27d18e49634 100644
--- a/source/blender/makesdna/DNA_sdna_types.h
+++ b/source/blender/makesdna/DNA_sdna_types.h
@@ -82,4 +82,3 @@ typedef struct BHead8 {
} BHead8;
#endif
-
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 4f07a30ed70..bbfbf660774 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -274,7 +274,7 @@ typedef enum eSpaceOutliner_Flag {
/* SpaceOops.filter */
typedef enum eSpaceOutliner_Filter {
- SO_FILTER_SEARCH = (1 << 0),
+ SO_FILTER_SEARCH = (1 << 0), /* Run-time flag. */
/* SO_FILTER_ENABLE = (1 << 1), */ /* Deprecated */
SO_FILTER_NO_OBJECT = (1 << 2),
SO_FILTER_NO_OB_CONTENT = (1 << 3), /* Not only mesh, but modifiers, constraints, ... */
diff --git a/source/blender/makesdna/DNA_speaker_types.h b/source/blender/makesdna/DNA_speaker_types.h
index f7bc3b41e55..a7408293131 100644
--- a/source/blender/makesdna/DNA_speaker_types.h
+++ b/source/blender/makesdna/DNA_speaker_types.h
@@ -65,4 +65,3 @@ typedef struct Speaker {
#define SPK_RELATIVE (1<<2)
#endif /* __DNA_SPEAKER_TYPES_H__ */
-
diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h
index bc0b3609a09..ca420195b99 100644
--- a/source/blender/makesdna/DNA_texture_types.h
+++ b/source/blender/makesdna/DNA_texture_types.h
@@ -549,4 +549,3 @@ enum {
#endif
#endif
-
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index f4e8d5e0000..d2782dee9ff 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -48,6 +48,11 @@ struct ColorBand;
#define MAX_STYLE_NAME 64
+#define GPU_VIEWPORT_QUALITY_FXAA 0.10f
+#define GPU_VIEWPORT_QUALITY_TAA8 0.25f
+#define GPU_VIEWPORT_QUALITY_TAA16 0.6f
+#define GPU_VIEWPORT_QUALITY_TAA32 0.8f
+
/* default offered by Blender.
* uiFont.uifont_id */
typedef enum eUIFont_ID {
@@ -430,6 +435,51 @@ typedef struct bPathCompare {
char flag, pad[7];
} bPathCompare;
+typedef struct bUserMenu {
+ struct bUserMenu *next, *prev;
+ char space_type;
+ char _pad0[7];
+ char context[64];
+ /* bUserMenuItem */
+ ListBase items;
+} bUserMenu;
+
+/* May be part of bUserMenu or other list. */
+typedef struct bUserMenuItem {
+ struct bUserMenuItem *next, *prev;
+ char ui_name[64];
+ char type;
+ char _pad0[7];
+} bUserMenuItem;
+
+typedef struct bUserMenuItem_Op {
+ bUserMenuItem item;
+ char op_idname[64];
+ struct IDProperty *prop;
+ char opcontext;
+ char _pad0[7];
+} bUserMenuItem_Op;
+
+typedef struct bUserMenuItem_Menu {
+ bUserMenuItem item;
+ char mt_idname[64];
+} bUserMenuItem_Menu;
+
+typedef struct bUserMenuItem_Prop {
+ bUserMenuItem item;
+ char context_data_path[256];
+ char prop_id[64];
+ int prop_index;
+ char _pad0[4];
+} bUserMenuItem_Prop;
+
+enum {
+ USER_MENU_TYPE_SEP = 1,
+ USER_MENU_TYPE_OPERATOR = 2,
+ USER_MENU_TYPE_MENU = 3,
+ USER_MENU_TYPE_PROP = 4,
+};
+
typedef struct SolidLight {
int flag, pad;
float col[4], spec[4], vec[4];
@@ -511,12 +561,14 @@ typedef struct UserDef {
struct ListBase user_keymaps;
struct ListBase addons;
struct ListBase autoexec_paths;
+ struct ListBase user_menus; /* bUserMenu */
+
char keyconfigstr[64];
short undosteps;
short pad1;
int undomemory;
- int pad3;
+ float gpu_viewport_quality;
short gp_manhattendist, gp_euclideandist, gp_eraser;
short gp_settings; /* eGP_UserdefSettings */
short tb_leftmouse, tb_rightmouse;
@@ -541,14 +593,13 @@ typedef struct UserDef {
char keyhandles_new; /* handle types for newly added keyframes */
char gpu_select_method;
char gpu_select_pick_deph;
- char gpu_viewport_antialias;
+ char pad0;
char view_frame_type; /* eZoomFrame_Mode */
int view_frame_keyframes; /* number of keyframes to zoom around current frame */
float view_frame_seconds; /* seconds to zoom around current frame */
- short scrcastfps; /* frame rate for screencast to be played back */
- short scrcastwait; /* milliseconds between screencast snapshots */
+ char _pad1[4];
short widget_unit; /* private, defaults to 20 for 72 DPI setting */
short anisotropic_filter;
@@ -632,7 +683,7 @@ typedef enum eUserPref_Flag {
USER_FLAG_DEPRECATED_7 = (1 << 7), /* cleared */
USER_MAT_ON_OB = (1 << 8),
USER_FLAG_DEPRECATED_9 = (1 << 9), /* cleared */
- USER_FLAG_DEPRECATED_10 = (1 << 10), /* cleared */
+ USER_DEVELOPER_UI = (1 << 10),
USER_TOOLTIPS = (1 << 11),
USER_TWOBUTTONMOUSE = (1 << 12),
USER_NONUMPAD = (1 << 13),
@@ -804,8 +855,9 @@ typedef enum eOpenGL_SelectOptions {
/* max anti alias draw method UserDef.gpu_viewport_antialias */
typedef enum eOpenGL_AntiAliasMethod {
- USER_AA_NONE = 0,
- USER_AA_FXAA = 1,
+ USER_AA_NONE = 0,
+ USER_AA_FXAA = 1,
+ USER_AA_TAA8 = 2,
} eOpenGL_AntiAliasMethod;
/* text draw options
diff --git a/source/blender/makesdna/DNA_vec_types.h b/source/blender/makesdna/DNA_vec_types.h
index 7ec259370b5..4a7aaaaa940 100644
--- a/source/blender/makesdna/DNA_vec_types.h
+++ b/source/blender/makesdna/DNA_vec_types.h
@@ -95,4 +95,3 @@ typedef struct rctf {
} rctf;
#endif
-
diff --git a/source/blender/makesdna/DNA_view2d_types.h b/source/blender/makesdna/DNA_view2d_types.h
index dce78638328..ebeb639e8aa 100644
--- a/source/blender/makesdna/DNA_view2d_types.h
+++ b/source/blender/makesdna/DNA_view2d_types.h
@@ -169,4 +169,3 @@ enum {
};
#endif
-
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index b7ad9f7d921..6dbed4d5d6f 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -167,12 +167,19 @@ typedef struct View3DOverlay {
/* Paint mode settings */
int paint_flag;
+ /* Alpha for texture, weight, vertex paint overlay */
+ float texture_paint_mode_opacity;
+ float vertex_paint_mode_opacity;
+ float weight_paint_mode_opacity;
+
/* Armature edit/pose mode settings */
int arm_flag;
float bone_selection_alpha;
/* Other settings */
float wireframe_threshold;
+
+ int pad;
} View3DOverlay;
/* 3D ViewPort Struct */
@@ -331,7 +338,7 @@ typedef struct View3D {
#define V3D_SOLID_MATCAP (1 << 12) /* user flag */
#define V3D_SHOW_SOLID_MATCAP (1 << 13) /* runtime flag */
#define V3D_OCCLUDE_WIRE (1 << 14)
-#define V3D_SHOW_MODE_SHADE_OVERRIDE (1 << 15)
+#define V3D_SHOW_MODE_SHADE_OVERRIDE (1 << 15) /* XXX: DNA deprecated */
/* View3d->flag3 (short) */
@@ -355,11 +362,12 @@ enum {
V3D_SHADING_MATCAP_FLIP_X = (1 << 6),
};
-/* View3DShading->single_color_type */
+/* View3DShading->color_type */
enum {
V3D_SHADING_MATERIAL_COLOR = 0,
V3D_SHADING_RANDOM_COLOR = 1,
V3D_SHADING_SINGLE_COLOR = 2,
+ V3D_SHADING_TEXTURE_COLOR = 3,
};
/* View3DOverlay->flag */
@@ -447,4 +455,3 @@ enum {
#define RV3D_CAMZOOM_MAX_FACTOR 44.9852813742385702928f
#endif
-
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index 19d4ab10165..c6ad1470561 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -232,6 +232,9 @@ typedef struct wmWindow {
/* custom drawing callbacks */
ListBase drawcalls;
+
+ /* Private runtime info to show text in the status bar. */
+ void *cursor_keymap_status;
} wmWindow;
#ifdef ime_data
@@ -324,7 +327,7 @@ typedef struct wmKeyMap {
/* runtime */
/** Verify if enabled in the current context, use #WM_keymap_poll instead of direct calls. */
- int (*poll)(struct bContext *);
+ bool (*poll)(struct bContext *);
/** For modal, #EnumPropertyItem for now. */
const void *modal_items;
} wmKeyMap;
diff --git a/source/blender/makesdna/DNA_workspace_types.h b/source/blender/makesdna/DNA_workspace_types.h
index b29e1f808c0..585794fbe97 100644
--- a/source/blender/makesdna/DNA_workspace_types.h
+++ b/source/blender/makesdna/DNA_workspace_types.h
@@ -145,6 +145,9 @@ typedef struct WorkSpace {
char _pad[2];
int flags DNA_PRIVATE_WORKSPACE; /* enum eWorkSpaceFlags */
+
+ /* Info text from modal operators (runtime). */
+ char *status_text;
} WorkSpace;
/* internal struct, but exported for read/write */
diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h
index 38bfb20581b..2e38a402abb 100644
--- a/source/blender/makesdna/DNA_world_types.h
+++ b/source/blender/makesdna/DNA_world_types.h
@@ -120,4 +120,3 @@ enum {
#define WO_DS_SHOW_TEXS (1<<2)
#endif
-
diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c
index 257c57e5a9a..cf059c08cd5 100644
--- a/source/blender/makesdna/intern/dna_genfile.c
+++ b/source/blender/makesdna/intern/dna_genfile.c
@@ -977,10 +977,47 @@ static int elem_strcmp(const char *name, const char *oname)
}
/**
+ * Returns whether the specified field exists according to the struct format
+ * pointed to by old.
+ *
+ * \param sdna Old SDNA
+ * \param type Current field type name
+ * \param name Current field name
+ * \param old Pointer to struct information in sdna
+ * \return true when existsing, false otherwise.
+ */
+static bool elem_exists(
+ const SDNA *sdna,
+ const char *type,
+ const char *name,
+ const short *old)
+{
+ int a, elemcount;
+ const char *otype, *oname;
+
+ /* in old is the old struct */
+ elemcount = old[1];
+ old += 2;
+ for (a = 0; a < elemcount; a++, old += 2) {
+ otype = sdna->types[old[0]];
+ oname = sdna->names[old[1]];
+
+ if (elem_strcmp(name, oname) == 0) { /* name equal */
+ return strcmp(type, otype) == 0; /* type equal */
+ }
+ }
+ return false;
+}
+
+/**
* Returns the address of the data for the specified field within olddata
* according to the struct format pointed to by old, or NULL if no such
* field can be found.
*
+ * Passing olddata=NULL doesn't work reliably for existence checks; it will
+ * return NULL both when the field is found at offset 0 and when it is not
+ * found at all. For field existence checks, use elem_exists() instead.
+ *
* \param sdna Old SDNA
* \param type Current field type name
* \param name Current field name
@@ -1390,9 +1427,9 @@ bool DNA_struct_elem_find(const SDNA *sdna, const char *stype, const char *varty
if (SDNAnr != -1) {
const short * const spo = sdna->structs[SDNAnr];
- const char * const cp = find_elem(sdna, vartype, name, spo, NULL, NULL);
+ const bool found = elem_exists(sdna, vartype, name, spo);
- if (cp) {
+ if (found) {
return true;
}
}