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:
authorNick Samarin <nicks1987@bigmir.net>2011-02-16 20:07:18 +0300
committerNick Samarin <nicks1987@bigmir.net>2011-02-16 20:07:18 +0300
commitc5f6a01dd5998976addd2085470bb73a150579e5 (patch)
tree42b3345fb3ea2e7607a6d1eec379b8ce23b5ffbc /source/blender/makesdna
parent4cf62f1e7e2bb28b47f79e4bd7c1482ab742ebbd (diff)
parent9e9e028f059f29d493dc020dda965a9bea8ffd6b (diff)
synched with trunk at revision 34793
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/CMakeLists.txt65
-rw-r--r--source/blender/makesdna/DNA_ID.h10
-rw-r--r--source/blender/makesdna/DNA_action_types.h77
-rw-r--r--source/blender/makesdna/DNA_actuator_types.h6
-rw-r--r--source/blender/makesdna/DNA_anim_types.h64
-rw-r--r--source/blender/makesdna/DNA_armature_types.h20
-rw-r--r--source/blender/makesdna/DNA_boid_types.h2
-rw-r--r--source/blender/makesdna/DNA_brush_types.h4
-rw-r--r--source/blender/makesdna/DNA_camera_types.h2
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h57
-rw-r--r--source/blender/makesdna/DNA_curve_types.h15
-rw-r--r--source/blender/makesdna/DNA_customdata_types.h8
-rw-r--r--source/blender/makesdna/DNA_fileglobal_types.h3
-rw-r--r--source/blender/makesdna/DNA_genfile.h2
-rw-r--r--source/blender/makesdna/DNA_group_types.h4
-rw-r--r--source/blender/makesdna/DNA_image_types.h14
-rw-r--r--source/blender/makesdna/DNA_ipo_types.h4
-rw-r--r--source/blender/makesdna/DNA_lamp_types.h2
-rw-r--r--source/blender/makesdna/DNA_lattice_types.h8
-rw-r--r--source/blender/makesdna/DNA_material_types.h1
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h6
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h3
-rw-r--r--source/blender/makesdna/DNA_meta_types.h2
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h64
-rw-r--r--source/blender/makesdna/DNA_node_types.h11
-rw-r--r--source/blender/makesdna/DNA_object_force.h40
-rw-r--r--source/blender/makesdna/DNA_object_types.h27
-rw-r--r--source/blender/makesdna/DNA_particle_types.h51
-rw-r--r--source/blender/makesdna/DNA_scene_types.h77
-rw-r--r--source/blender/makesdna/DNA_screen_types.h27
-rw-r--r--source/blender/makesdna/DNA_sdna_types.h2
-rw-r--r--source/blender/makesdna/DNA_sensor_types.h8
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h4
-rw-r--r--source/blender/makesdna/DNA_smoke_types.h3
-rw-r--r--source/blender/makesdna/DNA_space_types.h173
-rw-r--r--source/blender/makesdna/DNA_text_types.h2
-rw-r--r--source/blender/makesdna/DNA_texture_types.h18
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h57
-rw-r--r--source/blender/makesdna/DNA_vec_types.h4
-rw-r--r--source/blender/makesdna/DNA_vfont_types.h1
-rw-r--r--source/blender/makesdna/DNA_view3d_types.h44
-rw-r--r--source/blender/makesdna/DNA_windowmanager_types.h25
-rw-r--r--source/blender/makesdna/DNA_world_types.h2
-rw-r--r--source/blender/makesdna/Makefile39
-rw-r--r--source/blender/makesdna/intern/CMakeLists.txt34
-rw-r--r--source/blender/makesdna/intern/Makefile87
-rw-r--r--source/blender/makesdna/intern/dna_genfile.c39
-rw-r--r--source/blender/makesdna/intern/makesdna.c11
48 files changed, 651 insertions, 578 deletions
diff --git a/source/blender/makesdna/CMakeLists.txt b/source/blender/makesdna/CMakeLists.txt
index cb61082000d..b1e1b589c6e 100644
--- a/source/blender/makesdna/CMakeLists.txt
+++ b/source/blender/makesdna/CMakeLists.txt
@@ -24,4 +24,67 @@
#
# ***** END GPL LICENSE BLOCK *****
-ADD_SUBDIRECTORY(intern)
+# Use PARENT_SCOPE so makesrna can access.
+set(SRC_DNA_INC
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_ID.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_action_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_actuator_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_anim_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_armature_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_boid_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_brush_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_camera_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_cloth_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_color_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_constraint_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_controller_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_curve_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_customdata_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_documentation.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_effect_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_fileglobal_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_genfile.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_gpencil_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_group_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_image_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_ipo_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_key_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_lamp_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_lattice_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_listBase.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_material_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_mesh_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_meshdata_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_meta_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_modifier_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_nla_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_node_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_object_fluidsim.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_object_force.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_object_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_outliner_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_packedFile_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_particle_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_property_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_scene_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_screen_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_sdna_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_sensor_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_sequence_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_smoke_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_sound_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_space_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_text_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_texture_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_userdef_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_vec_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_vfont_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_view2d_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_view3d_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_windowmanager_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DNA_world_types.h
+
+ PARENT_SCOPE
+)
+
+add_subdirectory(intern)
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 49c2df42810..7d4d3d7c333 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -127,8 +127,9 @@ typedef struct Library {
#define PREVIEW_MIPMAP_LARGE 1
typedef struct PreviewImage {
+ /* All values of 2 are really PREVIEW_MIPMAPS */
unsigned int w[2];
- unsigned int h[2];
+ unsigned int h[2];
short changed[2];
short changed_timestamp[2];
unsigned int * rect[2];
@@ -199,6 +200,11 @@ typedef struct PreviewImage {
#define ID_REAL_USERS(id) (((ID *)id)->us - ((((ID *)id)->flag & LIB_FAKEUSER) ? 1:0))
+#ifdef GS
+#undef GS
+#endif
+#define GS(a) (*((short *)(a)))
+
/* id->flag: set frist 8 bits always at zero while reading */
#define LIB_LOCAL 0
#define LIB_EXTERN 1
@@ -215,6 +221,8 @@ typedef struct PreviewImage {
#define LIB_DOIT 1024
/* tag existing data before linking so we know what is new */
#define LIB_PRE_EXISTING 2048
+/* runtime */
+#define LIB_ID_RECALC 4096
#ifdef __cplusplus
}
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index f7bbf9235ab..17f9afce7c3 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -56,7 +56,7 @@ typedef struct bMotionPathVert {
/* bMotionPathVert->flag */
typedef enum eMotionPathVert_Flag {
/* vert is selected */
- MOTIONPATH_VERT_SEL = (1<<0),
+ MOTIONPATH_VERT_SEL = (1<<0)
} eMotionPathVert_Flag;
/* ........ */
@@ -79,7 +79,7 @@ typedef enum eMotionPath_Flag {
/* (for bones) path represents the head of the bone */
MOTIONPATH_FLAG_BHEAD = (1<<0),
/* motion path is being edited */
- MOTIONPATH_FLAG_EDIT = (1<<1),
+ MOTIONPATH_FLAG_EDIT = (1<<1)
} eMotionPath_Flag;
/* Visualisation General --------------------------- */
@@ -114,7 +114,7 @@ typedef struct bAnimVizSettings {
/* bAnimVizSettings->recalc */
typedef enum eAnimViz_RecalcFlags {
/* motionpaths need recalculating */
- ANIMVIZ_RECALC_PATHS = (1<<0),
+ ANIMVIZ_RECALC_PATHS = (1<<0)
} eAnimViz_RecalcFlags;
@@ -127,13 +127,13 @@ typedef enum eOnionSkin_Types {
/* show ghosts within the specified frame range */
GHOST_TYPE_RANGE,
/* show ghosts on keyframes within the specified range only */
- GHOST_TYPE_KEYS,
+ GHOST_TYPE_KEYS
} eOnionSkin_Types;
/* bAnimVizSettings->ghost_flag */
typedef enum eOnionSkin_Flag {
/* only show selected bones in ghosts */
- GHOST_FLAG_ONLYSEL = (1<<0),
+ GHOST_FLAG_ONLYSEL = (1<<0)
} eOnionSkin_Flag;
@@ -142,7 +142,7 @@ typedef enum eMotionPaths_Types {
/* show the paths along their entire ranges */
MOTIONPATH_TYPE_RANGE = 0,
/* only show the parts of the paths around the current frame */
- MOTIONPATH_TYPE_ACFRA,
+ MOTIONPATH_TYPE_ACFRA
} eMotionPath_Types;
/* bAnimVizSettings->path_viewflag */
@@ -154,7 +154,7 @@ typedef enum eMotionPaths_ViewFlag {
/* show keyframe/frame numbers */
MOTIONPATH_VIEW_KFNOS = (1<<2),
/* find keyframes in whole action (instead of just in matching group name) */
- MOTIONPATH_VIEW_KFACT = (1<<3),
+ MOTIONPATH_VIEW_KFACT = (1<<3)
} eMotionPath_ViewFlag;
/* bAnimVizSettings->path_bakeflag */
@@ -164,7 +164,7 @@ typedef enum eMotionPaths_BakeFlag {
/* for bones - calculate head-points for curves instead of tips */
MOTIONPATH_BAKE_HEADS = (1<<1),
/* motion paths exist for AnimVizSettings instance - set when calc for first time, and unset when clearing */
- MOTIONPATH_BAKE_HAS_PATHS = (1<<2),
+ MOTIONPATH_BAKE_HAS_PATHS = (1<<2)
} eMotionPath_BakeFlag;
/* ************************************************ */
@@ -188,7 +188,7 @@ typedef struct bPoseChannel {
short flag; /* dynamic, for detecting transform changes */
short constflag; /* for quick detecting which constraints affect this channel */
short ikflag; /* settings for IK bones */
- short selectflag; /* copy of bone flag, so you can work with library armatures */
+ short selectflag; /* copy of bone flag, so you can work with library armatures, not for runtime use */
short protectflag; /* protect channels from being transformed */
short agrp_index; /* index of action-group this bone belongs to (0 = default/no group) */
@@ -203,12 +203,10 @@ typedef struct bPoseChannel {
struct bPoseChannel *child; /* set on read file or rebuild pose, the 'ik' child, for b-bones */
struct ListBase iktree; /* only while evaluating pose */
- /* only while deform, stores precalculated b_bone deform mats,
- dual quaternions */
- void *b_bone_mats;
- void *dual_quat;
- void *b_bone_dual_quats;
-
+ bMotionPath *mpath; /* motion path cache for this bone */
+ struct Object *custom; /* draws custom object instead of default bone shape */
+ struct bPoseChannel *custom_tx; /* odd feature, display with another bones transform. needed in rare cases for advanced rigs, since the alternative is highly complicated - campbell */
+
/* transforms - written in by actions or transform */
float loc[3];
float size[3];
@@ -234,9 +232,6 @@ typedef struct bPoseChannel {
float iklinweight; /* weight of joint stretch constraint */
float *path; /* totpath x 3 x float */ // XXX depreceated... old animation system (armature only viz)
- bMotionPath *mpath; /* motion path cache for this bone */
- struct Object *custom; /* draws custom object instead of default bone shape */
- struct bPoseChannel *custom_tx; /* odd feature, display with another bones transform. needed in rare cases for advanced rigs, since the alternative is highly complicated - campbell */
} bPoseChannel;
@@ -265,7 +260,7 @@ typedef enum ePchan_Flag {
/* has Spline IK */
POSE_HAS_IKS = (1<<14),
/* spline IK solving */
- POSE_IKSPLINE = (1<<15),
+ POSE_IKSPLINE = (1<<15)
} ePchan_Flag;
/* PoseChannel constflag (constraint detection) */
@@ -278,7 +273,7 @@ typedef enum ePchan_ConstFlag {
/* only for drawing Posemode too */
PCHAN_HAS_STRIDE = (1<<4),
/* spline IK */
- PCHAN_HAS_SPLINEIK = (1<<5),
+ PCHAN_HAS_SPLINEIK = (1<<5)
} ePchan_ConstFlag;
/* PoseChannel->ikflag */
@@ -296,7 +291,7 @@ typedef enum ePchan_IkFlag {
BONE_IK_NO_XDOF_TEMP = (1<<10),
BONE_IK_NO_YDOF_TEMP = (1<<11),
- BONE_IK_NO_ZDOF_TEMP = (1<<12),
+ BONE_IK_NO_ZDOF_TEMP = (1<<12)
} ePchan_IkFlag;
/* PoseChannel->rotmode and Object->rotmode */
@@ -314,9 +309,11 @@ typedef enum eRotationModes {
/* NOTE: space is reserved here for 18 other possible
* euler rotation orders not implemented
*/
- ROT_MODE_MAX, /* sentinel for Py API */
/* axis angle rotations */
- ROT_MODE_AXISANGLE = -1
+ ROT_MODE_AXISANGLE = -1,
+
+ ROT_MODE_MIN = ROT_MODE_AXISANGLE, /* sentinel for Py API */
+ ROT_MODE_MAX = ROT_MODE_ZYX
} eRotationModes;
/* Pose ------------------------------------ */
@@ -330,7 +327,9 @@ typedef struct bPose {
ListBase chanbase; /* list of pose channels, PoseBones in RNA */
struct GHash *chanhash; /* ghash for quicker string lookups */
- short flag, proxy_layer; /* proxy layer: copy from armature, gets synced */
+ short flag, pad;
+ unsigned int proxy_layer; /* proxy layer: copy from armature, gets synced */
+ int pad1;
float ctime; /* local action time of this pose */
float stride_offset[3]; /* applied to object */
@@ -364,7 +363,7 @@ typedef enum ePose_Flags {
/* set by armature_rebuild_pose to give a chance to the IK solver to rebuild IK tree */
POSE_WAS_REBUILT = (1<<5),
/* set by game_copy_pose to indicate that this pose is used in the game engine */
- POSE_GAME_ENGINE = (1<<6),
+ POSE_GAME_ENGINE = (1<<6)
} ePose_Flags;
/* IK Solvers ------------------------------------ */
@@ -372,7 +371,7 @@ typedef enum ePose_Flags {
/* bPose->iksolver and bPose->ikparam->iksolver */
typedef enum ePose_IKSolverType {
IKSOLVER_LEGACY = 0,
- IKSOLVER_ITASC,
+ IKSOLVER_ITASC
} ePose_IKSolverType;
/* header for all bPose->ikparam structures */
@@ -401,7 +400,7 @@ typedef enum eItasc_Flags {
ITASC_AUTO_STEP = (1<<0),
ITASC_INITIAL_REITERATION = (1<<1),
ITASC_REITERATION = (1<<2),
- ITASC_SIMULATION = (1<<3),
+ ITASC_SIMULATION = (1<<3)
} eItasc_Flags;
/* bItasc->solver */
@@ -425,7 +424,7 @@ typedef enum eItasc_Solver {
* 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
- * primarily to colour bones in the 3d-view. There are other benefits too, but those are mostly related
+ * primarily to color bones in the 3d-view. There are other benefits too, but those are mostly related
* to Action-Groups.
*/
typedef struct bActionGroup {
@@ -496,7 +495,7 @@ typedef enum eAction_Flags {
/* flags for evaluation/editing */
ACT_MUTED = (1<<9),
ACT_PROTECTED = (1<<10),
- ACT_DISABLED = (1<<11),
+ ACT_DISABLED = (1<<11)
} eAction_Flags;
@@ -533,7 +532,7 @@ typedef enum eDopeSheet_FilterFlag {
ADS_FILTER_NOSHAPEKEYS = (1<<6),
ADS_FILTER_NOMESH = (1<<7),
ADS_FILTER_NOOBJ = (1<<8), /* for animdata on object level, if we only want to concentrate on materials/etc. */
- // NOTE: there are a few more spaces for datablock filtering here...
+ ADS_FILTER_NOLAT = (1<<9),
ADS_FILTER_NOCAM = (1<<10),
ADS_FILTER_NOMAT = (1<<11),
ADS_FILTER_NOLAM = (1<<12),
@@ -553,12 +552,12 @@ typedef enum eDopeSheet_FilterFlag {
ADS_FILTER_INCL_HIDDEN = (1<<26), /* include 'hidden' channels too (i.e. those from hidden Objects/Bones) */
/* combination filters (some only used at runtime) */
- ADS_FILTER_NOOBDATA = (ADS_FILTER_NOCAM|ADS_FILTER_NOMAT|ADS_FILTER_NOLAM|ADS_FILTER_NOCUR|ADS_FILTER_NOPART|ADS_FILTER_NOARM),
+ ADS_FILTER_NOOBDATA = (ADS_FILTER_NOCAM|ADS_FILTER_NOMAT|ADS_FILTER_NOLAM|ADS_FILTER_NOCUR|ADS_FILTER_NOPART|ADS_FILTER_NOARM)
} eDopeSheet_FilterFlag;
/* DopeSheet general flags */
typedef enum eDopeSheet_Flag {
- ADS_FLAG_SUMMARY_COLLAPSED = (1<<0), /* when summary is shown, it is collapsed, so all other channels get hidden */
+ ADS_FLAG_SUMMARY_COLLAPSED = (1<<0) /* when summary is shown, it is collapsed, so all other channels get hidden */
} eDopeSheet_Flag;
@@ -596,9 +595,9 @@ typedef enum eSAction_Flag {
SACTION_NOTRANSKEYCULL = (1<<4),
/* don't include keyframes that are out of view */
//SACTION_HORIZOPTIMISEON = (1<<5), // XXX depreceated... old irrelevant trick
- /* hack for moving pose-markers (temp flag) */
- SACTION_POSEMARKERS_MOVE = (1<<6),
- /* don't draw action channels using group colours (where applicable) */
+ /* show pose-markers (local to action) in Action Editor mode */
+ SACTION_POSEMARKERS_SHOW = (1<<6),
+ /* don't draw action channels using group colors (where applicable) */
SACTION_NODRAWGCOLORS = (1<<7), // XXX depreceated... irrelevant for current groups implementation
/* don't draw current frame number beside frame indicator */
SACTION_NODRAWCFRANUM = (1<<8),
@@ -607,7 +606,7 @@ typedef enum eSAction_Flag {
/* don't perform realtime updates */
SACTION_NOREALTIMEUPDATES = (1<<10),
/* move markers as well as keyframes */
- SACTION_MARKERS_MOVE = (1<<11),
+ SACTION_MARKERS_MOVE = (1<<11)
} eSAction_Flag;
/* SpaceAction Mode Settings */
@@ -619,7 +618,7 @@ typedef enum eAnimEdit_Context {
/* editing of gpencil data */
SACTCONT_GPENCIL,
/* dopesheet (default) */
- SACTCONT_DOPESHEET,
+ SACTCONT_DOPESHEET
} eAnimEdit_Context;
/* SpaceAction AutoSnap Settings (also used by other Animation Editors) */
@@ -631,7 +630,7 @@ typedef enum eAnimEdit_AutoSnap {
/* snap to actual frames/seconds (nla-action time) */
SACTSNAP_FRAME,
/* snap to nearest marker */
- SACTSNAP_MARKER,
+ SACTSNAP_MARKER
} eAnimEdit_AutoSnap;
@@ -670,7 +669,7 @@ typedef enum ACHAN_FLAG {
ACHAN_EXPANDED = (1<<4),
ACHAN_SHOWIPO = (1<<5),
ACHAN_SHOWCONS = (1<<6),
- ACHAN_MOVED = (1<<31),
+ ACHAN_MOVED = (1<<31)
} ACHAN_FLAG;
#endif
diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h
index 147d621a4f2..55966e9650b 100644
--- a/source/blender/makesdna/DNA_actuator_types.h
+++ b/source/blender/makesdna/DNA_actuator_types.h
@@ -48,7 +48,7 @@ typedef struct bAddObjectActuator {
typedef struct bActionActuator {
struct bAction *act; /* Pointer to action */
short type, flag; /* Playback type */ // not in use
- int sta, end; /* Start & End frames */
+ float sta, end; /* Start & End frames */
char name[32]; /* For property-driven playback */
char frameProp[32]; /* Set this property to the actions current frame */
short blendin; /* Number of frames of blending */
@@ -112,14 +112,14 @@ typedef struct bObjectActuator {
short damping;
float forceloc[3], forcerot[3];
float pad[3], pad1[3];
- float dloc[3], drot[3];
+ float dloc[3], drot[3]; /* angle in radians */
float linearvelocity[3], angularvelocity[3];
struct Object *reference;
} bObjectActuator;
typedef struct bIpoActuator {
short flag, type;
- int sta, end;
+ float sta, end;
char name[32];
char frameProp[32]; /* Set this property to the actions current frame */
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h
index 8c2fc7db390..e09d7635f75 100644
--- a/source/blender/makesdna/DNA_anim_types.h
+++ b/source/blender/makesdna/DNA_anim_types.h
@@ -88,7 +88,7 @@ typedef enum eFModifier_Flags {
/* modifier is active one (in UI) for editing purposes */
FMODIFIER_FLAG_ACTIVE = (1<<2),
/* user wants modifier to be skipped */
- FMODIFIER_FLAG_MUTED = (1<<3),
+ FMODIFIER_FLAG_MUTED = (1<<3)
} eFModifier_Flags;
/* --- */
@@ -109,7 +109,7 @@ typedef struct FMod_Generator {
/* generator modes */
typedef enum eFMod_Generator_Modes {
FCM_GENERATOR_POLYNOMIAL = 0,
- FCM_GENERATOR_POLYNOMIAL_FACTORISED,
+ FCM_GENERATOR_POLYNOMIAL_FACTORISED
} eFMod_Generator_Modes;
@@ -118,7 +118,7 @@ typedef enum eFMod_Generator_Modes {
*/
typedef enum eFMod_Generator_Flags {
/* generator works in conjunction with other modifiers (i.e. doesn't replace those before it) */
- FCM_GENERATOR_ADDITIVE = (1<<0),
+ FCM_GENERATOR_ADDITIVE = (1<<0)
} eFMod_Generator_Flags;
@@ -149,7 +149,7 @@ typedef enum eFMod_Generator_Functions {
FCM_GENERATOR_FN_TAN,
FCM_GENERATOR_FN_SQRT,
FCM_GENERATOR_FN_LN,
- FCM_GENERATOR_FN_SINC,
+ FCM_GENERATOR_FN_SINC
} eFMod_Generator_Functions;
@@ -186,7 +186,7 @@ typedef enum eFMod_Cycling_Modes {
FCM_EXTRAPOLATE_NONE = 0, /* don't do anything */
FCM_EXTRAPOLATE_CYCLIC, /* repeat keyframe range as-is */
FCM_EXTRAPOLATE_CYCLIC_OFFSET, /* repeat keyframe range, but with offset based on gradient between values */
- FCM_EXTRAPOLATE_MIRROR, /* alternate between forward and reverse playback of keyframe range */
+ FCM_EXTRAPOLATE_MIRROR /* alternate between forward and reverse playback of keyframe range */
} eFMod_Cycling_Modes;
@@ -209,7 +209,7 @@ typedef enum eFMod_Limit_Flags {
FCM_LIMIT_XMIN = (1<<0),
FCM_LIMIT_XMAX = (1<<1),
FCM_LIMIT_YMIN = (1<<2),
- FCM_LIMIT_YMAX = (1<<3),
+ FCM_LIMIT_YMAX = (1<<3)
} eFMod_Limit_Flags;
@@ -229,7 +229,7 @@ typedef enum eFMod_Noise_Modifications {
FCM_NOISE_MODIF_REPLACE = 0, /* Modify existing curve, matching it's shape */
FCM_NOISE_MODIF_ADD, /* Add noise to the curve */
FCM_NOISE_MODIF_SUBTRACT, /* Subtract noise from the curve */
- FCM_NOISE_MODIF_MULTIPLY, /* Multiply the curve by noise */
+ FCM_NOISE_MODIF_MULTIPLY /* Multiply the curve by noise */
} eFMod_Noise_Modifications;
@@ -379,7 +379,7 @@ typedef enum eDriver_Types {
/* smallest value */
DRIVER_TYPE_MIN,
/* largest value */
- DRIVER_TYPE_MAX,
+ DRIVER_TYPE_MAX
} eDriver_Types;
/* driver flags */
@@ -396,7 +396,7 @@ typedef enum eDriver_Flags {
/* the names are cached so they dont need have python unicode versions created each time */
DRIVER_FLAG_RENAMEVAR = (1<<4),
/* intermediate values of driver should be shown in the UI for debugging purposes */
- DRIVER_FLAG_SHOWDEBUG = (1<<5),
+ DRIVER_FLAG_SHOWDEBUG = (1<<5)
} eDriver_Flags;
/* F-Curves -------------------------------------- */
@@ -465,19 +465,22 @@ typedef enum eFCurve_Flags {
FCURVE_INT_VALUES = (1<<11),
/* curve can only have certain discrete-number values (no interpolation at all, for enums/booleans) */
FCURVE_DISCRETE_VALUES = (1<<12),
+
+ /* temporary tag for editing */
+ FCURVE_TAGGED = (1<<15)
} eFCurve_Flags;
/* extrapolation modes (only simple value 'extending') */
typedef enum eFCurve_Extend {
FCURVE_EXTRAPOLATE_CONSTANT = 0, /* just extend min/max keyframe value */
- FCURVE_EXTRAPOLATE_LINEAR, /* just extend gradient of segment between first segment keyframes */
+ FCURVE_EXTRAPOLATE_LINEAR /* just extend gradient of segment between first segment keyframes */
} eFCurve_Extend;
/* curve coloring modes */
typedef enum eFCurve_Coloring {
FCURVE_COLOR_AUTO_RAINBOW = 0, /* automatically determine color using rainbow (calculated at drawtime) */
FCURVE_COLOR_AUTO_RGB, /* automatically determine color using XYZ (array index) <-> RGB */
- FCURVE_COLOR_CUSTOM, /* custom color */
+ FCURVE_COLOR_CUSTOM /* custom color */
} eFCurve_Coloring;
/* ************************************************ */
@@ -572,7 +575,7 @@ typedef enum eNlaStrip_Blend_Mode {
NLASTRIP_MODE_REPLACE = 0,
NLASTRIP_MODE_ADD,
NLASTRIP_MODE_SUBTRACT,
- NLASTRIP_MODE_MULTIPLY,
+ NLASTRIP_MODE_MULTIPLY
} eNlaStrip_Blend_Mode;
/* NLA Strip Extrpolation Mode */
@@ -582,7 +585,7 @@ typedef enum eNlaStrip_Extrapolate_Mode {
/* only hold+extend last frame */
NLASTRIP_EXTEND_HOLD_FORWARD,
/* don't contribute at all */
- NLASTRIP_EXTEND_NOTHING,
+ NLASTRIP_EXTEND_NOTHING
} eNlaStrip_Extrapolate_Mode;
/* NLA Strip Settings */
@@ -619,7 +622,7 @@ typedef enum eNlaStrip_Flag {
/* temporary editing flags */
/* NLA-Strip is really just a temporary meta used to facilitate easier transform code */
NLASTRIP_FLAG_TEMP_META = (1<<30),
- NLASTRIP_FLAG_EDIT_TOUCHED = (1<<31),
+ NLASTRIP_FLAG_EDIT_TOUCHED = (1<<31)
} eNlaStrip_Flag;
/* NLA Strip Type */
@@ -629,7 +632,7 @@ typedef enum eNlaStrip_Type {
/* 'transition' - blends between the adjacent strips */
NLASTRIP_TYPE_TRANSITION,
/* 'meta' - a strip which acts as a container for a few others */
- NLASTRIP_TYPE_META,
+ NLASTRIP_TYPE_META
} eNlaStrip_Type;
/* NLA Tracks ------------------------------------- */
@@ -666,7 +669,7 @@ typedef enum eNlaTrack_Flag {
NLATRACK_PROTECTED = (1<<4),
/* track is not allowed to execute, usually as result of tweaking being enabled (internal flag) */
- NLATRACK_DISABLED = (1<<10),
+ NLATRACK_DISABLED = (1<<10)
} eNlaTrack_Flag;
@@ -702,7 +705,7 @@ typedef struct KS_Path {
/* KS_Path->flag */
typedef enum eKSP_Settings {
/* entire array (not just the specified index) gets keyframed */
- KSP_FLAG_WHOLE_ARRAY = (1<<0),
+ KSP_FLAG_WHOLE_ARRAY = (1<<0)
} eKSP_Settings;
/* KS_Path->groupmode */
@@ -716,26 +719,9 @@ typedef enum eKSP_Grouping {
/* path should be grouped using name of inner-most context item from templates
* - this is most useful for relative KeyingSets only
*/
- KSP_GROUP_TEMPLATE_ITEM,
+ KSP_GROUP_TEMPLATE_ITEM
} eKSP_Grouping;
-/* KS_Path->templates (Template Flags)
- *
- * Templates in paths are used to substitute information from the
- * active context into relavent places in the path strings. This
- * enum here defines the flags which define which templates are
- * required by a path before it can be used
- */
-typedef enum eKSP_TemplateTypes {
- KSP_TEMPLATE_OBJECT = (1<<0), /* #obj - selected object */
- KSP_TEMPLATE_PCHAN = (1<<1), /* #pch - selected posechannel */
- KSP_TEMPLATE_CONSTRAINT = (1<<2), /* #con - active only */
- KSP_TEMPLATE_NODE = (1<<3), /* #nod - selected node */
- KSP_TEMPLATE_MODIFIER = (1<<4), /* #mod - active only */
-
- KSP_TEMPLATE_ROT = (1<<16), /* modify rotation paths based on rotation mode of Object or Pose Channel */
-} eKSP_TemplateTypes;
-
/* ---------------- */
/* KeyingSet definition (ks)
@@ -767,7 +753,7 @@ typedef enum eKS_Settings {
/* keyingset cannot be removed (and doesn't need to be freed) */
KEYINGSET_BUILTIN = (1<<0),
/* keyingset does not depend on context info (i.e. paths are absolute) */
- KEYINGSET_ABSOLUTE = (1<<1),
+ KEYINGSET_ABSOLUTE = (1<<1)
} eKS_Settings;
/* Flags for use by keyframe creation/deletion calls */
@@ -777,7 +763,7 @@ typedef enum eInsertKeyFlags {
INSERTKEY_FAST = (1<<2), /* don't recalculate handles,etc. after adding key */
INSERTKEY_FASTR = (1<<3), /* don't realloc mem (or increase count, as array has already been set out) */
INSERTKEY_REPLACE = (1<<4), /* only replace an existing keyframe (this overrides INSERTKEY_NEEDED) */
- INSERTKEY_XYZ2RGB = (1<<5), /* transform F-Curves should have XYZ->RGB color mode */
+ INSERTKEY_XYZ2RGB = (1<<5) /* transform F-Curves should have XYZ->RGB color mode */
} eInsertKeyFlags;
/* ************************************************ */
@@ -874,14 +860,14 @@ typedef enum eAnimData_Flag {
ADT_UI_ACTIVE = (1<<15),
/* F-Curves from this AnimData block are not visible in the Graph Editor */
- ADT_CURVES_NOT_VISIBLE = (1<<16),
+ ADT_CURVES_NOT_VISIBLE = (1<<16)
} eAnimData_Flag;
/* Animation Data recalculation settings (to be set by depsgraph) */
typedef enum eAnimData_Recalc {
ADT_RECALC_DRIVERS = (1<<0),
ADT_RECALC_ANIM = (1<<1),
- ADT_RECALC_ALL = (ADT_RECALC_DRIVERS|ADT_RECALC_ANIM),
+ ADT_RECALC_ALL = (ADT_RECALC_DRIVERS|ADT_RECALC_ANIM)
} eAnimData_Recalc;
/* Base Struct for Anim ------------------------------------- */
diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h
index f7533ff9bde..89c2d69b8be 100644
--- a/source/blender/makesdna/DNA_armature_types.h
+++ b/source/blender/makesdna/DNA_armature_types.h
@@ -57,8 +57,9 @@ typedef struct Bone {
int flag;
float arm_head[3];
- float arm_tail[3]; /* head/tail and roll in Armature Space (rest pos) */
+ float arm_tail[3]; /* head/tail in Armature Space (rest pos) */
float arm_mat[4][4]; /* matrix: (bonemat(b)+head(b))*arm_mat(b-1), rest pos*/
+ float arm_roll; /* roll in Armature Space (rest pos) */
float dist, weight; /* dist, weight: for non-deformgroup deforms */
float xwidth, length, zwidth; /* width: for block bones. keep in this order, transform! */
@@ -68,7 +69,7 @@ typedef struct Bone {
float size[3]; /* patch for upward compat, UNUSED! */
int layer; /* layers that bone appears on */
short segments; /* for B-bones */
- short pad[3];
+ short pad[1];
} Bone;
typedef struct bArmature {
@@ -79,6 +80,12 @@ typedef struct bArmature {
ListBase chainbase;
ListBase *edbo; /* editbone listbase, we use pointer so we can check state */
+ /* active bones should work like active object where possible
+ * - active and selection are unrelated
+ * - active & hidden is not allowed
+ * - from the user perspective active == last selected
+ * - active should be ignored when not visible (hidden layer) */
+
Bone *act_bone; /* active bone (when not in editmode) */
void *act_edbone; /* active editbone (in editmode) */
@@ -89,9 +96,8 @@ typedef struct bArmature {
short deformflag;
short pathflag;
- int pad;
-
- int layer, layer_protected; /* for buttons to work, both variables in this order together */
+ unsigned int layer_used; /* for UI, to show which layers are there */
+ unsigned int layer, layer_protected; /* for buttons to work, both variables in this order together */
// XXX depreceated... old animaton system (armature only viz) ---
short ghostep, ghostsize; /* number of frames to ghosts to show, and step between them */
@@ -116,7 +122,7 @@ typedef enum eArmature_Flag {
ARM_MIRROR_EDIT = (1<<8),
ARM_AUTO_IK = (1<<9),
ARM_NO_CUSTOM = (1<<10), /* made option negative, for backwards compat */
- ARM_COL_CUSTOM = (1<<11), /* draw custom colours */
+ ARM_COL_CUSTOM = (1<<11), /* draw custom colors */
ARM_GHOST_ONLYSEL = (1<<12), /* when ghosting, only show selected bones (this should belong to ghostflag instead) */ // XXX depreceated
ARM_DS_EXPAND = (1<<13)
} eArmature_Flag;
@@ -180,7 +186,7 @@ typedef enum eBone_Flag {
BONE_EDITMODE_LOCKED = (1<<19), /* bone transforms are locked in EditMode */
BONE_TRANSFORM_CHILD = (1<<20), /* Indicates that a parent is also being transformed */
BONE_UNSELECTABLE = (1<<21), /* bone cannot be selected */
- BONE_NO_LOCAL_LOCATION = (1<<22), /* bone location is in armature space */
+ BONE_NO_LOCAL_LOCATION = (1<<22) /* bone location is in armature space */
} eBone_Flag;
#endif
diff --git a/source/blender/makesdna/DNA_boid_types.h b/source/blender/makesdna/DNA_boid_types.h
index c4324612aff..83f8f4d0199 100644
--- a/source/blender/makesdna/DNA_boid_types.h
+++ b/source/blender/makesdna/DNA_boid_types.h
@@ -104,6 +104,8 @@ typedef enum BoidMode {
eBoidMode_Liftoff,
NUM_BOID_MODES
} BoidMode;
+
+
typedef struct BoidData {
float health, acc[3];
short state_id, mode;
diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h
index 1492319fe22..6ddad214af4 100644
--- a/source/blender/makesdna/DNA_brush_types.h
+++ b/source/blender/makesdna/DNA_brush_types.h
@@ -127,6 +127,10 @@ typedef struct Brush {
#define BRUSH_FRONTFACE (1<<27)
#define BRUSH_CUSTOM_ICON (1<<28)
+/* temporary flag which sets up autmatically for correct
+ brush drawing when inverted modal operator is running */
+#define BRUSH_INVERTED (1<<29)
+
/* Brush.sculpt_tool */
#define SCULPT_TOOL_DRAW 1
#define SCULPT_TOOL_SMOOTH 2
diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h
index 3a9c7b22cde..11c8533783e 100644
--- a/source/blender/makesdna/DNA_camera_types.h
+++ b/source/blender/makesdna/DNA_camera_types.h
@@ -78,7 +78,7 @@ typedef struct Camera {
#define CAM_PANORAMA 128
/* yafray: dof sampling switch */
-#define CAM_YF_NO_QMC 512
+/* #define CAM_YF_NO_QMC 512 */ /* depreceated */
#ifdef __cplusplus
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
index dbd9be14c0e..275ffd93ae5 100644
--- a/source/blender/makesdna/DNA_constraint_types.h
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -94,7 +94,7 @@ typedef struct bConstraintTarget {
/* bConstraintTarget -> flag */
typedef enum B_CONSTRAINT_TARGET_FLAG {
- CONSTRAINT_TAR_TEMP = (1<<0), /* temporary target-struct that needs to be freed after use */
+ CONSTRAINT_TAR_TEMP = (1<<0) /* temporary target-struct that needs to be freed after use */
} B_CONSTRAINT_TARGET_FLAG;
/* bConstraintTarget/bConstraintOb -> type */
@@ -476,7 +476,7 @@ typedef enum eBConstraint_SpaceTypes {
/* for posechannels - local with parent */
CONSTRAINT_SPACE_PARLOCAL, /* = 3 */
/* for files from between 2.43-2.46 (should have been parlocal) */
- CONSTRAINT_SPACE_INVALID, /* = 4. do not exchange for anything! */
+ CONSTRAINT_SPACE_INVALID /* = 4. do not exchange for anything! */
} eBConstraint_SpaceTypes;
/* bConstraintChannel.flag */
@@ -496,7 +496,7 @@ typedef enum eCopyRotation_Flags {
ROTLIKE_X_INVERT = (1<<4),
ROTLIKE_Y_INVERT = (1<<5),
ROTLIKE_Z_INVERT = (1<<6),
- ROTLIKE_OFFSET = (1<<7),
+ ROTLIKE_OFFSET = (1<<7)
} eCopyRotation_Flags;
/* bLocateLikeConstraint.flag */
@@ -509,7 +509,7 @@ typedef enum eCopyLocation_Flags {
LOCLIKE_X_INVERT = (1<<4),
LOCLIKE_Y_INVERT = (1<<5),
LOCLIKE_Z_INVERT = (1<<6),
- LOCLIKE_OFFSET = (1<<7),
+ LOCLIKE_OFFSET = (1<<7)
} eCopyLocation_Flags;
/* bSizeLikeConstraint.flag */
@@ -517,50 +517,50 @@ typedef enum eCopyScale_Flags {
SIZELIKE_X = (1<<0),
SIZELIKE_Y = (1<<1),
SIZELIKE_Z = (1<<2),
- SIZELIKE_OFFSET = (1<<3),
+ SIZELIKE_OFFSET = (1<<3)
} eCopyScale_Flags;
/* bSameVolumeConstraint.flag */
typedef enum eSameVolume_Modes {
SAMEVOL_X = 0,
SAMEVOL_Y,
- SAMEVOL_Z,
+ SAMEVOL_Z
} eSameVolume_Modes;
/* Locked-Axis Values (Locked Track) */
typedef enum eLockAxis_Modes {
LOCK_X = 0,
LOCK_Y,
- LOCK_Z,
+ LOCK_Z
} eLockAxis_Modes;
/* Up-Axis Values (TrackTo and Locked Track) */
typedef enum eUpAxis_Modes {
UP_X = 0,
UP_Y,
- UP_Z,
+ UP_Z
} eUpAxis_Modes;
-/* Tracking axis (TrackTo, Locked Track, Damped Track) */
+/* Tracking axis (TrackTo, Locked Track, Damped Track) and minmax (floor) constraint */
typedef enum eTrackToAxis_Modes {
TRACK_X = 0,
TRACK_Y,
TRACK_Z,
TRACK_nX,
TRACK_nY,
- TRACK_nZ,
+ TRACK_nZ
} eTrackToAxis_Modes;
/* FollowPath flags */
typedef enum eFollowPath_Flags {
FOLLOWPATH_FOLLOW = (1<<0),
FOLLOWPATH_STATIC = (1<<1),
- FOLLOWPATH_RADIUS = (1<<2),
+ FOLLOWPATH_RADIUS = (1<<2)
} eFollowPath_Flags;
/* bTrackToConstraint->flags */
typedef enum eTrackTo_Flags {
- TARGET_Z_UP = (1<<0),
+ TARGET_Z_UP = (1<<0)
} eTrackTo_Flags;
/* Strech To Constraint -> volmode */
@@ -568,14 +568,14 @@ typedef enum eStretchTo_VolMode {
VOLUME_XZ = 0,
VOLUME_X,
VOLUME_Z,
- NO_VOLUME,
+ NO_VOLUME
} eStretchTo_VolMode;
/* Stretch To Constraint -> plane mode */
typedef enum eStretchTo_PlaneMode {
PLANE_X = 0,
PLANE_Y,
- PLANE_Z,
+ PLANE_Z
} eStretchTo_PlaneMode;
/* Clamp-To Constraint ->flag */
@@ -583,12 +583,12 @@ typedef enum eClampTo_Modes {
CLAMPTO_AUTO = 0,
CLAMPTO_X,
CLAMPTO_Y,
- CLAMPTO_Z,
+ CLAMPTO_Z
} eClampTo_Modes;
/* ClampTo Constraint ->flag2 */
typedef enum eClampTo_Flags {
- CLAMPTO_CYCLIC = (1<<0),
+ CLAMPTO_CYCLIC = (1<<0)
} eClampTo_Flags;
/* bKinematicConstraint->flag */
@@ -611,7 +611,7 @@ typedef enum eKinematic_Flags {
CONSTRAINT_IK_NO_ROT_Y = (1<<12),
CONSTRAINT_IK_NO_ROT_Z = (1<<13),
/* axis relative to target */
- CONSTRAINT_IK_TARGETAXIS = (1<<14),
+ CONSTRAINT_IK_TARGETAXIS = (1<<14)
} eKinematic_Flags;
/* bSplineIKConstraint->flag */
@@ -625,7 +625,7 @@ typedef enum eSplineIK_Flags {
/* evenly distribute the bones along the path regardless of length */
CONSTRAINT_SPLINEIK_EVENSPLITS = (1<<3),
/* don't adjust the x and z scaling of the bones by the curve radius */
- CONSTRAINT_SPLINEIK_NO_CURVERAD = (1<<4),
+ CONSTRAINT_SPLINEIK_NO_CURVERAD = (1<<4)
} eSplineIK_Flags;
/* bSplineIKConstraint->xzScaleMode */
@@ -635,14 +635,14 @@ typedef enum eSplineIK_XZScaleModes {
/* bones in the chain should take their x/z scales from the original scaling */
CONSTRAINT_SPLINEIK_XZS_ORIGINAL,
/* x/z scales are the inverse of the y-scale */
- CONSTRAINT_SPLINEIK_XZS_VOLUMETRIC,
+ CONSTRAINT_SPLINEIK_XZS_VOLUMETRIC
} eSplineIK_XZScaleModes;
/* MinMax (floor) flags */
typedef enum eFloor_Flags {
MINMAX_STICKY = (1<<0),
MINMAX_STUCK = (1<<1),
- MINMAX_USEROT = (1<<2),
+ MINMAX_USEROT = (1<<2)
} eFloor_Flags;
/* transform limiting constraints -> flag2 */
@@ -650,7 +650,7 @@ typedef enum eTransformLimits_Flags2 {
/* not used anymore - for older Limit Location constraints only */
LIMIT_NOPARENT = (1<<0),
/* for all Limit constraints - allow to be used during transform? */
- LIMIT_TRANSFORM = (1<<1),
+ LIMIT_TRANSFORM = (1<<1)
} eTransformLimits_Flags2;
/* transform limiting constraints -> flag (own flags) */
@@ -660,33 +660,33 @@ typedef enum eTransformLimits_Flags {
LIMIT_YMIN = (1<<2),
LIMIT_YMAX = (1<<3),
LIMIT_ZMIN = (1<<4),
- LIMIT_ZMAX = (1<<5),
+ LIMIT_ZMAX = (1<<5)
} eTransformLimits_Flags;
/* limit rotation constraint -> flag (own flags) */
typedef enum eRotLimit_Flags {
LIMIT_XROT = (1<<0),
LIMIT_YROT = (1<<1),
- LIMIT_ZROT = (1<<2),
+ LIMIT_ZROT = (1<<2)
} eRotLimit_Flags;
/* distance limit constraint */
/* bDistLimitConstraint->flag */
typedef enum eDistLimit_Flag {
- LIMITDIST_USESOFT = (1<<0),
+ LIMITDIST_USESOFT = (1<<0)
} eDistLimit_Flag;
/* bDistLimitConstraint->mode */
typedef enum eDistLimit_Modes {
LIMITDIST_INSIDE = 0,
LIMITDIST_OUTSIDE,
- LIMITDIST_ONSURFACE,
+ LIMITDIST_ONSURFACE
} eDistLimit_Modes;
/* python constraint -> flag */
typedef enum ePyConstraint_Flags {
PYCON_USETARGETS = (1<<0),
- PYCON_SCRIPTERROR = (1<<1),
+ PYCON_SCRIPTERROR = (1<<1)
} ePyConstraint_Flags;
/* ChildOf Constraint -> flag */
@@ -700,6 +700,7 @@ typedef enum eChildOf_Flags {
CHILDOF_SIZEX = (1<<6),
CHILDOF_SIZEY = (1<<7),
CHILDOF_SIZEZ = (1<<8),
+ CHILDOF_ALL = 511
} eChildOf_Flags;
/* Pivot Constraint */
@@ -720,7 +721,7 @@ typedef enum ePivotConstraint_Axis {
/* consider +ve y-axis rotations */
PIVOTCON_AXIS_Y,
/* consider +ve z-axis rotations */
- PIVOTCON_AXIS_Z,
+ PIVOTCON_AXIS_Z
} ePivotConstraint_Axis;
/* settings for Pivot Constraint in general */
@@ -728,7 +729,7 @@ typedef enum ePivotConstraint_Flag {
/* offset is to be interpreted as being a fixed-point in space */
PIVOTCON_FLAG_OFFSET_ABS = (1<<0),
/* rotation-based activation uses negative rotation to drive result */
- PIVOTCON_FLAG_ROTACT_NEG = (1<<1),
+ PIVOTCON_FLAG_ROTACT_NEG = (1<<1)
} ePivotConstraint_Flag;
/* Rigid-Body Constraint */
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index 50579660806..d66246a4136 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -63,8 +63,8 @@ typedef struct PathPoint {
#
#
typedef struct Path {
- int len;
struct PathPoint *data;
+ int len;
float totdist;
} Path;
@@ -171,7 +171,7 @@ typedef struct Curve {
struct BoundBox *bb;
ListBase nurb; /* actual data, called splines in rna */
- ListBase disp;
+ ListBase disp; /* undeformed display list, used mostly for texture space calculation */
EditNurb *editnurb; /* edited data, not in file, use pointer so we can check for it */
@@ -189,11 +189,11 @@ typedef struct Curve {
float rot[3];
short texflag, pad1; /* keep a short because of give_obdata_texspace() */
-
- short drawflag, twist_mode, pad[2];
+ short drawflag, twist_mode;
float twist_smooth, smallcaps_scale;
- short pathlen, totcol;
+ int pathlen;
+ short pad, totcol;
short flag, bevresol;
float width, ext1, ext2;
@@ -314,14 +314,14 @@ typedef enum eBezTriple_Handle {
HD_AUTO,
HD_VECT,
HD_ALIGN,
- HD_AUTO_ANIM, /* not real handle type, but is just used as dummy item for anim code */
+ HD_AUTO_ANIM /* not real handle type, but is just used as dummy item for anim code */
} eBezTriple_Handle;
/* interpolation modes (used only for BezTriple->ipo) */
typedef enum eBezTriple_Interpolation {
BEZT_IPO_CONST = 0, /* constant interpolation */
BEZT_IPO_LIN, /* linear interpolation */
- BEZT_IPO_BEZ, /* bezier interpolation */
+ BEZT_IPO_BEZ /* bezier interpolation */
} eBezTriple_Interpolation;
/* types of keyframe (used only for BezTriple->hide when BezTriple is used in F-Curves) */
@@ -329,6 +329,7 @@ typedef enum eBezTriple_KeyframeType {
BEZT_KEYTYPE_KEYFRAME = 0, /* default - 'proper' Keyframe */
BEZT_KEYTYPE_EXTREME, /* 'extreme' keyframe */
BEZT_KEYTYPE_BREAKDOWN, /* 'breakdown' keyframe */
+ BEZT_KEYTYPE_JITTER, /* 'jitter' keyframe (for adding 'filler' secondary motion) */
} eBezTriple_KeyframeType;
/* checks if the given BezTriple is selected */
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h
index 313c5634819..1478557d8f2 100644
--- a/source/blender/makesdna/DNA_customdata_types.h
+++ b/source/blender/makesdna/DNA_customdata_types.h
@@ -30,6 +30,10 @@
#ifndef DNA_CUSTOMDATA_TYPES_H
#define DNA_CUSTOMDATA_TYPES_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* descriptor and storage for a custom data layer */
typedef struct CustomDataLayer {
int type; /* type of data in layer */
@@ -130,4 +134,8 @@ typedef struct CustomData {
#define MAX_MTFACE 8
#define MAX_MCOL 8
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/source/blender/makesdna/DNA_fileglobal_types.h b/source/blender/makesdna/DNA_fileglobal_types.h
index ae539a18963..0c3a9429de6 100644
--- a/source/blender/makesdna/DNA_fileglobal_types.h
+++ b/source/blender/makesdna/DNA_fileglobal_types.h
@@ -47,7 +47,8 @@ typedef struct FileGlobal {
struct Scene *curscene;
int fileflags;
int globalf;
-
+ int revision; /* svn revision from buildinfo */
+ int pad;
/* file path where this was saved, for recover */
char filename[240]; /* 240 = FILE_MAX */
} FileGlobal;
diff --git a/source/blender/makesdna/DNA_genfile.h b/source/blender/makesdna/DNA_genfile.h
index 75d21644267..8e00a89af09 100644
--- a/source/blender/makesdna/DNA_genfile.h
+++ b/source/blender/makesdna/DNA_genfile.h
@@ -45,7 +45,7 @@ char *DNA_struct_get_compareflags(struct SDNA *sdna, struct SDNA *newsdna);
void *DNA_struct_reconstruct(struct SDNA *newsdna, struct SDNA *oldsdna, char *compflags, int oldSDNAnr, int blocks, void *data);
int DNA_elem_array_size(const char *astr, int len);
-int DNA_elem_offset(struct SDNA *sdna, char *stype, char *vartype, char *name);
+int DNA_elem_offset(struct SDNA *sdna, const char *stype, const char *vartype, const char *name);
#endif
diff --git a/source/blender/makesdna/DNA_group_types.h b/source/blender/makesdna/DNA_group_types.h
index 61a527dd351..7416f6ea397 100644
--- a/source/blender/makesdna/DNA_group_types.h
+++ b/source/blender/makesdna/DNA_group_types.h
@@ -40,8 +40,8 @@ typedef struct GroupObject {
struct GroupObject *next, *prev;
struct Object *ob;
void *lampren; /* used while render */
- int recalc; /* copy of ob->recalc, used to set animated groups OK */
- int pad;
+ short recalc; /* copy of ob->recalc, used to set animated groups OK */
+ char pad[6];
} GroupObject;
diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h
index d1aa3c00ac4..3df3c8b41c6 100644
--- a/source/blender/makesdna/DNA_image_types.h
+++ b/source/blender/makesdna/DNA_image_types.h
@@ -44,16 +44,20 @@ struct GPUTexture;
/* ImageUser is in Texture, in Nodes, Background Image, Image Window, .... */
/* should be used in conjunction with an ID * to Image. */
typedef struct ImageUser {
+ struct Scene *scene; /* to retrieve render result */
+
int framenr; /* movies, sequences: current to display */
int frames; /* total amount of frames to use */
int offset, sfra; /* offset within movie, start frame in global time */
- short fie_ima, cycl; /* fields/image in movie, cyclic flag */
- short flag, ok;
-
+ char fie_ima, cycl; /* fields/image in movie, cyclic flag */
+ char ok, pad;
+
short multi_index, layer, pass; /* listbase indices, for menu browsing or retrieve buffer */
- short menunr; /* localized menu entry, for handling browse event */
+
+ short flag;
- struct Scene *scene; /* to retrieve render result */
+ int pad2;
+
} ImageUser;
/* iuser->flag */
diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h
index b7e15808ff0..d0554a7aaa5 100644
--- a/source/blender/makesdna/DNA_ipo_types.h
+++ b/source/blender/makesdna/DNA_ipo_types.h
@@ -421,10 +421,10 @@ typedef struct Ipo {
#define PART_TOTNAM 25
#define PART_EMIT_FREQ 1
-#define PART_EMIT_LIFE 2
+/* #define PART_EMIT_LIFE 2 */ /*UNUSED*/
#define PART_EMIT_VEL 3
#define PART_EMIT_AVE 4
-#define PART_EMIT_SIZE 5
+/* #define PART_EMIT_SIZE 5 */ /*UNUSED*/
#define PART_AVE 6
#define PART_SIZE 7
diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h
index 5231108a756..1028d733c65 100644
--- a/source/blender/makesdna/DNA_lamp_types.h
+++ b/source/blender/makesdna/DNA_lamp_types.h
@@ -140,7 +140,7 @@ typedef struct Lamp {
#define LA_SHAD_RAY 8192
/* yafray: lamp shadowbuffer flag, softlight */
/* Since it is used with LOCAL lamp, can't use LA_SHAD */
-#define LA_YF_SOFT 16384
+/* #define LA_YF_SOFT 16384 */ /* no longer used */
#define LA_LAYER_SHADOW 32768
#define LA_SHAD_TEX (1<<16)
#define LA_SHOW_CONE (1<<17)
diff --git a/source/blender/makesdna/DNA_lattice_types.h b/source/blender/makesdna/DNA_lattice_types.h
index 94fc9fefb66..bf2ada51155 100644
--- a/source/blender/makesdna/DNA_lattice_types.h
+++ b/source/blender/makesdna/DNA_lattice_types.h
@@ -31,6 +31,7 @@
#include "DNA_ID.h"
+struct AnimData;
struct BPoint;
struct Ipo;
struct Key;
@@ -46,17 +47,18 @@ typedef struct EditLatt {
typedef struct Lattice {
ID id;
+ struct AnimData *adt;
short pntsu, pntsv, pntsw, flag;
short opntsu, opntsv, opntsw, pad2;
- char typeu, typev, typew, type;
+ char typeu, typev, typew, pad3;
int pad;
float fu, fv, fw, du, dv, dw;
struct BPoint *def;
- struct Ipo *ipo;
+ struct Ipo *ipo; /* XXX: depreceated... old animation system */
struct Key *key;
struct MDeformVert *dvert;
@@ -75,5 +77,7 @@ typedef struct Lattice {
#define LT_GRID 1
#define LT_OUTSIDE 2
+#define LT_DS_EXPAND 4
+
#endif
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
index f8eb6e76693..5a117d59f8a 100644
--- a/source/blender/makesdna/DNA_material_types.h
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -300,6 +300,7 @@ typedef struct Material {
#define TEXCO_TANGENT 4096
/* still stored in vertex->accum, 1 D */
#define TEXCO_STRAND 8192
+#define TEXCO_PARTICLE 8192 /* strand is used for normal materials, particle for halo materials */
#define TEXCO_STRESS 16384
#define TEXCO_SPEED 32768
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index 4e41309cff4..853c123e5d7 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -153,9 +153,9 @@ typedef struct TFace {
#define ME_DRAWSHARP (1 << 8)
#define ME_DRAWBWEIGHTS (1 << 9)
-#define ME_DRAW_EDGELEN (1 << 10)
-#define ME_DRAW_FACEAREA (1 << 11)
-#define ME_DRAW_EDGEANG (1 << 12)
+#define ME_DRAWEXTRA_EDGELEN (1 << 10)
+#define ME_DRAWEXTRA_FACEAREA (1 << 11)
+#define ME_DRAWEXTRA_FACEANG (1 << 12)
/* old global flags:
#define G_DRAWEDGES (1 << 18)
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index 6dba547f423..59a1828909b 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -61,8 +61,7 @@ typedef struct MDeformVert {
typedef struct MVert {
float co[3];
short no[3];
- short mat_nr;
- char flag, bweight, pad[2];
+ char flag, bweight;
} MVert;
/* at the moment alpha is abused for vertex painting
diff --git a/source/blender/makesdna/DNA_meta_types.h b/source/blender/makesdna/DNA_meta_types.h
index feadf7cd510..dc0ac7fd80c 100644
--- a/source/blender/makesdna/DNA_meta_types.h
+++ b/source/blender/makesdna/DNA_meta_types.h
@@ -48,7 +48,7 @@ typedef struct MetaElem {
short type, flag, selcol1, selcol2;
float x, y, z; /* Position of center of MetaElem */
- float quat[4]; /* Rotation of MetaElem */
+ float quat[4]; /* Rotation of MetaElem (MUST be kept normalized) */
float expx; /* dimension parameters, used for some types like cubes */
float expy;
float expz;
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 0a3533becc8..6e8367385ed 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -68,9 +68,8 @@ typedef enum ModifierType {
eModifierType_Screw,
/* placeholder, keep this so durian files load in
* trunk with the correct modifier once its merged */
- eModifierType_NavMesh,
eModifierType_Warp,
-
+ eModifierType_NavMesh,
NUM_MODIFIER_TYPES
} ModifierType;
@@ -81,6 +80,7 @@ typedef enum ModifierMode {
eModifierMode_OnCage = (1<<3),
eModifierMode_Expanded = (1<<4),
eModifierMode_Virtual = (1<<5),
+ eModifierMode_ApplyOnSpline = (1<<6),
eModifierMode_DisableTemporary = (1 << 31)
} ModifierMode;
@@ -211,30 +211,32 @@ typedef struct ArrayModifierData {
#define MOD_ARR_FITCURVE 2
/* ArrayModifierData->offset_type */
-#define MOD_ARR_OFF_CONST 1<<0
-#define MOD_ARR_OFF_RELATIVE 1<<1
-#define MOD_ARR_OFF_OBJ 1<<2
+#define MOD_ARR_OFF_CONST (1<<0)
+#define MOD_ARR_OFF_RELATIVE (1<<1)
+#define MOD_ARR_OFF_OBJ (1<<2)
/* ArrayModifierData->flags */
-#define MOD_ARR_MERGE 1<<0
-#define MOD_ARR_MERGEFINAL 1<<1
+#define MOD_ARR_MERGE (1<<0)
+#define MOD_ARR_MERGEFINAL (1<<1)
typedef struct MirrorModifierData {
ModifierData modifier;
- short axis, flag;
+ short axis; /* deprecated, use flag instead */
+ short flag;
float tolerance;
struct Object *mirror_ob;
} MirrorModifierData;
/* MirrorModifierData->flag */
-#define MOD_MIR_CLIPPING 1<<0
-#define MOD_MIR_MIRROR_U 1<<1
-#define MOD_MIR_MIRROR_V 1<<2
-#define MOD_MIR_AXIS_X 1<<3
-#define MOD_MIR_AXIS_Y 1<<4
-#define MOD_MIR_AXIS_Z 1<<5
-#define MOD_MIR_VGROUP 1<<6
+#define MOD_MIR_CLIPPING (1<<0)
+#define MOD_MIR_MIRROR_U (1<<1)
+#define MOD_MIR_MIRROR_V (1<<2)
+#define MOD_MIR_AXIS_X (1<<3)
+#define MOD_MIR_AXIS_Y (1<<4)
+#define MOD_MIR_AXIS_Z (1<<5)
+#define MOD_MIR_VGROUP (1<<6)
+#define MOD_MIR_NO_MERGE (1<<7)
typedef struct EdgeSplitModifierData {
ModifierData modifier;
@@ -244,8 +246,8 @@ typedef struct EdgeSplitModifierData {
} EdgeSplitModifierData;
/* EdgeSplitModifierData->flags */
-#define MOD_EDGESPLIT_FROMANGLE 1<<1
-#define MOD_EDGESPLIT_FROMFLAG 1<<2
+#define MOD_EDGESPLIT_FROMANGLE (1<<1)
+#define MOD_EDGESPLIT_FROMFLAG (1<<2)
typedef struct BevelModifierData {
ModifierData modifier;
@@ -332,7 +334,7 @@ typedef struct UVProjectModifierData {
#define MOD_UVPROJECT_MAXPROJECTORS 10
/* UVProjectModifierData->flags */
-#define MOD_UVPROJECT_OVERRIDEIMAGE 1<<0
+#define MOD_UVPROJECT_OVERRIDEIMAGE (1<<0)
typedef struct DecimateModifierData {
ModifierData modifier;
@@ -341,7 +343,6 @@ typedef struct DecimateModifierData {
int faceCount;
} DecimateModifierData;
-
/* Smooth modifier flags */
#define MOD_SMOOTH_X (1<<1)
#define MOD_SMOOTH_Y (1<<2)
@@ -386,13 +387,13 @@ enum {
};
/* WaveModifierData.flag */
-#define MOD_WAVE_X 1<<1
-#define MOD_WAVE_Y 1<<2
-#define MOD_WAVE_CYCL 1<<3
-#define MOD_WAVE_NORM 1<<4
-#define MOD_WAVE_NORM_X 1<<5
-#define MOD_WAVE_NORM_Y 1<<6
-#define MOD_WAVE_NORM_Z 1<<7
+#define MOD_WAVE_X (1<<1)
+#define MOD_WAVE_Y (1<<2)
+#define MOD_WAVE_CYCL (1<<3)
+#define MOD_WAVE_NORM (1<<4)
+#define MOD_WAVE_NORM_X (1<<5)
+#define MOD_WAVE_NORM_Y (1<<6)
+#define MOD_WAVE_NORM_Z (1<<7)
typedef struct WaveModifierData {
ModifierData modifier;
@@ -550,12 +551,9 @@ typedef struct MeshDeformModifierData {
} MeshDeformModifierData;
typedef enum {
- eParticleSystemFlag_Loaded = (1<<0),
- eParticleSystemFlag_Pars = (1<<1),
- eParticleSystemFlag_FromCurve = (1<<2),
- eParticleSystemFlag_DM_changed = (1<<3),
- eParticleSystemFlag_Disabled = (1<<4),
- eParticleSystemFlag_psys_updated = (1<<5),
+ eParticleSystemFlag_Pars = (1<<0),
+ eParticleSystemFlag_psys_updated = (1<<1),
+ eParticleSystemFlag_file_loaded = (1<<2),
} ParticleSystemModifierFlag;
typedef struct ParticleSystemModifierData {
@@ -728,10 +726,8 @@ typedef struct ScrewModifierData {
#define MOD_SCREW_OBJECT_OFFSET (1<<2)
// #define MOD_SCREW_OBJECT_ANGLE (1<<4)
-
typedef struct NavMeshModifierData {
ModifierData modifier;
-
} NavMeshModifierData;
#endif
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index fe422bfa689..5fbbf4338c4 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -149,7 +149,7 @@ typedef struct bNode {
#define NODE_TEST 256
/* composite: don't do node but pass on buffer(s) */
#define NODE_MUTED 512
-#define NODE_CUSTOM_NAME 1024
+#define NODE_CUSTOM_NAME 1024 /* deprecated! */
typedef struct bNodeLink {
struct bNodeLink *next, *prev;
@@ -216,12 +216,11 @@ typedef struct NodeImageAnim {
typedef struct NodeBlurData {
short sizex, sizey;
- short samples, maxspeed, minspeed, relative;
+ short samples, maxspeed, minspeed, relative, aspect;
+ short curved;
float fac, percentx, percenty;
short filtertype;
char bokeh, gamma;
- short curved;
- short pad;
int image_in_width, image_in_height; /* needed for absolute/relative conversions */
} NodeBlurData;
@@ -336,4 +335,8 @@ typedef struct TexNodeOutput {
#define CMP_NODE_CHANNEL_MATTE_CS_YUV 3
#define CMP_NODE_CHANNEL_MATTE_CS_YCC 4
+#define CMP_NODE_BLUR_ASPECT_NONE 0
+#define CMP_NODE_BLUR_ASPECT_Y 1
+#define CMP_NODE_BLUR_ASPECT_X 2
+
#endif
diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h
index 63a6b8fbe4a..7656ae6372b 100644
--- a/source/blender/makesdna/DNA_object_force.h
+++ b/source/blender/makesdna/DNA_object_force.h
@@ -129,7 +129,9 @@ typedef struct EffectorWeights {
*/
#define BPHYS_DATA_INDEX 0
#define BPHYS_DATA_LOCATION 1
+#define BPHYS_DATA_SMOKE_LOW 1
#define BPHYS_DATA_VELOCITY 2
+#define BPHYS_DATA_SMOKE_HIGH 2
#define BPHYS_DATA_ROTATION 3
#define BPHYS_DATA_AVELOCITY 4 /* used for particles */
#define BPHYS_DATA_XCONST 4 /* used for cloth */
@@ -139,20 +141,41 @@ typedef struct EffectorWeights {
#define BPHYS_TOT_DATA 8
+#define BPHYS_EXTRA_FLUID_SPRINGS 1
+
+typedef struct PTCacheExtra {
+ struct PTCacheExtra *next, *prev;
+ unsigned int type, totdata;
+ void *data;
+} PTCacheExtra;
+
typedef struct PTCacheMem {
struct PTCacheMem *next, *prev;
- int frame, totpoint;
+ unsigned int frame, totpoint;
unsigned int data_types, flag;
- int *index_array; /* quick access to stored points with index */
void *data[8]; /* BPHYS_TOT_DATA */
void *cur[8]; /* BPHYS_TOT_DATA */
+
+ struct ListBase extradata;
} PTCacheMem;
typedef struct PointCache {
struct PointCache *next, *prev;
int flag; /* generic flag */
- int step; /* frames between cached frames */
+
+ int step; /* The number of frames between cached frames.
+ * This should probably be an upper bound for a per point adaptive step in the future,
+ * buf for now it's the same for all points. Without adaptivity this can effect the perceived
+ * simulation quite a bit though. If for example particles are colliding with a horizontal
+ * plane (with high damping) they quickly come to a stop on the plane, however there are still
+ * forces acting on the particle (gravity and collisions), so the particle velocity isn't necessarily
+ * zero for the whole duration of the frame even if the particle seems stationary. If all simulation
+ * frames aren't cached (step > 1) these velocities are interpolated into movement for the non-cached
+ * frames. The result will look like the point is oscillating around the collision location. So for
+ * now cache step should be set to 1 for accurate reproduction of collisions.
+ */
+
int simframe; /* current frame of simulation (only if SIMULATION_VALID) */
int startframe; /* simulation start frame */
int endframe; /* simulation end frame */
@@ -161,12 +184,15 @@ typedef struct PointCache {
/* for external cache files */
int totpoint; /* number of cached points */
- int index, rt; /* modifier stack index */
+ int index; /* modifier stack index */
+ short compression, rt;
char name[64];
char prev_name[64];
char info[64];
char path[240]; /* file path */
+ char *cached_frames; /* array of length endframe-startframe+1 with flags to indicate cached frames */
+ /* can be later used for other per frame flags too if needed */
struct ListBase mem_cache;
struct PTCacheEdit *edit;
@@ -313,7 +339,7 @@ typedef struct SoftBody {
/* pd->flag: various settings */
#define PFIELD_USEMAX 1
-#define PDEFLE_DEFORM 2
+/*#define PDEFLE_DEFORM 2*/ /*UNUSED*/
#define PFIELD_GUIDE_PATH_ADD 4 /* TODO: do_versions for below */
#define PFIELD_PLANAR 8 /* used for do_versions */
#define PDEFLE_KILL_PART 16
@@ -371,6 +397,10 @@ typedef struct SoftBody {
/* PTCACHE_OUTDATED + PTCACHE_FRAMES_SKIPPED */
#define PTCACHE_REDO_NEEDED 258
+#define PTCACHE_COMPRESS_NO 0
+#define PTCACHE_COMPRESS_LZO 1
+#define PTCACHE_COMPRESS_LZMA 2
+
/* ob->softflag */
#define OB_SB_ENABLE 1 /* deprecated, use modifier */
#define OB_SB_GOAL 2
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index f1e0323985f..5245d52226d 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -200,7 +200,7 @@ typedef struct Object {
float bbsize[3];
short index; /* custom index, for renderpasses */
unsigned short actdef; /* current deformation group, note: index starts at 1 */
- float col[4]; /* object color, adjusted via IPO's only */
+ float col[4]; /* object color */
/**
* Settings for game objects
* bit 0: Object has dynamic behaviour
@@ -322,16 +322,15 @@ extern Object workob;
#define PARSLOW 16
/* (short) transflag */
-#define OB_OFFS_LOCAL 1
- // XXX OB_QUAT was never used, but is now depreceated in favour of standard rotation handling...
-#define OB_QUAT 2
+/*#define OB_OFFS_LOCAL 1*/ /*UNUSED*/
+/* #define OB_QUAT 2 */ /* never used, free flag */
#define OB_NEG_SCALE 4
#define OB_DUPLI (8+16+256+512+2048)
#define OB_DUPLIFRAMES 8
#define OB_DUPLIVERTS 16
#define OB_DUPLIROT 32
#define OB_DUPLINOSPEED 64
-#define OB_POWERTRACK 128
+/*#define OB_POWERTRACK 128*/ /*UNUSED*/
#define OB_DUPLIGROUP 256
#define OB_DUPLIFACES 512
#define OB_DUPLIFACES_SCALE 1024
@@ -344,9 +343,9 @@ extern Object workob;
#define OB_DRAWKEY 1
#define OB_DRAWKEYSEL 2
#define OB_OFFS_OB 4
-#define OB_OFFS_MAT 8
-#define OB_OFFS_VKEY 16
-#define OB_OFFS_PATH 32
+/* #define OB_OFFS_MAT 8 */ /*UNUSED*/
+/* #define OB_OFFS_VKEY 16 */ /*UNUSED*/
+/* #define OB_OFFS_PATH 32 */ /*UNUSED*/
#define OB_OFFS_PARENT 64
#define OB_OFFS_PARTICLE 128
/* get ipo from from action or not? */
@@ -403,7 +402,7 @@ extern Object workob;
#define OB_BOUND_CONE 3
#define OB_BOUND_POLYH 4
#define OB_BOUND_POLYT 5
-#define OB_BOUND_DYN_MESH 6
+/* #define OB_BOUND_DYN_MESH 6 */ /*UNUSED*/
#define OB_BOUND_CAPSULE 7
@@ -418,7 +417,7 @@ extern Object workob;
/* NOTE: this was used as a proper setting in past, so nullify before using */
#define BA_TEMP_TAG 32
-#define BA_FROMSET 128
+/* #define BA_FROMSET 128 */ /*UNUSED*/
#define BA_TRANSFORM_CHILD 256 /* child of a transformed object */
#define BA_TRANSFORM_PARENT 8192 /* parent of a transformed object */
@@ -439,7 +438,8 @@ extern Object workob;
#define OB_RECALC_DATA 2
/* time flag is set when time changes need recalc, so baked systems can ignore it */
#define OB_RECALC_TIME 4
-#define OB_RECALC_ALL 7
+ /* only use for matching any flag, NOT as an argument since more flags may be added. */
+#define OB_RECALC_ALL (OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME)
/* controller state */
#define OB_MAX_STATES 30
@@ -479,7 +479,7 @@ extern Object workob;
#define OB_LOCK_RIGID_BODY_Y_ROT_AXIS 64
#define OB_LOCK_RIGID_BODY_Z_ROT_AXIS 128
-#define OB_LIFE (OB_PROP|OB_DYNAMIC|OB_ACTOR|OB_MAINACTOR|OB_CHILD)
+/* #define OB_LIFE (OB_PROP|OB_DYNAMIC|OB_ACTOR|OB_MAINACTOR|OB_CHILD) */
/* ob->body_type */
#define OB_BODY_TYPE_NO_COLLISION 0
@@ -562,6 +562,9 @@ typedef enum ObjectMode {
OB_MODE_POSE = 64
} ObjectMode;
+/* any mode where the brush system is used */
+#define OB_MODE_ALL_PAINT (OB_MODE_SCULPT|OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT)
+
#define MAX_DUPLI_RECUR 8
#ifdef __cplusplus
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index 105fa6d5289..e26414a0d72 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -61,6 +61,11 @@ typedef struct BoidParticle {
float rt;
} BoidParticle;
+typedef struct ParticleSpring {
+ float rest_length;
+ unsigned int particle_index[2], delete_flag;
+}ParticleSpring;
+
/* Child particles are created around or between parent particles */
typedef struct ChildParticle {
int num, parent; /* num is face index on the final derived mesh */
@@ -116,12 +121,17 @@ typedef struct ParticleData {
typedef struct SPHFluidSettings {
/*Particle Fluid*/
- float spring_k, radius, rest_length;
+ float spring_k, radius, rest_length, plasticity_constant, yield_ratio;
float viscosity_omega, viscosity_beta;
float stiffness_k, stiffness_knear, rest_density;
float buoyancy;
+ int flag, pad;
} SPHFluidSettings;
+/* fluid->flag */
+#define SPH_VISCOELASTIC_SPRINGS 1
+#define SPH_CURRENT_REST_LENGTH 2
+
typedef struct ParticleSettings {
ID id;
struct AnimData *adt;
@@ -158,12 +168,12 @@ typedef struct ParticleSettings {
/* general values */
float sta, end, lifetime, randlife;
- float timetweak, jitfac, eff_hair;
- int totpart, userjit, grid_res;
+ float timetweak, jitfac, eff_hair, grid_rand;
+ int totpart, userjit, grid_res, rt;
/* initial velocity factors */
float normfac, obfac, randfac, partfac, tanfac, tanphase, reactfac;
- float ob_vel[3], rt;
+ float ob_vel[3];
float avefac, phasefac, randrotfac, randphasefac;
/* physical properties */
float mass, size, randsize, reactshape;
@@ -178,13 +188,17 @@ typedef struct ParticleSettings {
/* clumping */
float clumpfac, clumppow;
/* kink */
- float kink_amp, kink_freq, kink_shape;
+ float kink_amp, kink_freq, kink_shape, kink_flat;
+ float kink_amp_clump;
/* rough */
float rough1, rough1_size;
float rough2, rough2_size, rough2_thres;
float rough_end, rough_end_shape;
/* length */
float clength, clength_thres;
+ /* parting */
+ float parting_fac;
+ float parting_min, parting_max;
/* branching */
float branch_thres;
/* drawing stuff */
@@ -232,8 +246,8 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
float imat[4][4]; /* used for duplicators */
float cfra, tree_frame;
- int seed, rt;
- int flag, totpart, totchild, totcached, totchildcache;
+ int seed, child_seed;
+ int flag, totpart, totunexist, totchild, totcached, totchildcache, rt;
short recalc, target_psys, totkeyed, bakespace;
char bb_uvname[3][32]; /* billboard uv name */
@@ -250,6 +264,9 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
struct ListBase *effectors;
+ ParticleSpring *fluid_springs;
+ int tot_fluidsprings, alloc_fluidsprings;
+
struct KDTree *tree; /* used for interactions with self and other systems */
struct ParticleDrawData *pdd;
@@ -273,7 +290,7 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
/* for dopesheet */
#define PART_DS_EXPAND 8
-#define PART_HAIR_GEOMETRY 16
+#define PART_HAIR_REGROW 16 /* regrow hair for each frame */
#define PART_UNBORN 32 /*show unborn particles*/
#define PART_DIED 64 /*show died particles*/
@@ -287,25 +304,25 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
#define PART_ROT_DYN (1<<14) /* dynamic rotation */
#define PART_SIZEMASS (1<<16)
-//#define PART_HAIR_GRAVITY (1<<15)
+#define PART_HIDE_ADVANCED_HAIR (1<<15)
//#define PART_ABS_TIME (1<<17)
//#define PART_GLOB_TIME (1<<18)
#define PART_BOIDS_2D (1<<19)
-#define PART_BRANCHING (1<<20)
-#define PART_ANIM_BRANCHING (1<<21)
-#define PART_SYMM_BRANCHING (1<<24)
+//#define PART_BRANCHING (1<<20)
+//#define PART_ANIM_BRANCHING (1<<21)
+//#define PART_SYMM_BRANCHING (1<<24)
#define PART_HAIR_BSPLINE 1024
#define PART_GRID_INVERT (1<<26)
-#define PART_CHILD_EFFECT (1<<27)
-#define PART_CHILD_SEAMS (1<<28)
-#define PART_CHILD_RENDER (1<<29)
-#define PART_CHILD_GUIDE (1<<30)
+#define PART_CHILD_EFFECT (1<<27)
+#define PART_CHILD_LONG_HAIR (1<<28)
+/* #define PART_CHILD_RENDER (1<<29) */ /*UNUSED*/
+#define PART_CHILD_GUIDE (1<<30)
#define PART_SELF_EFFECT (1<<22)
@@ -442,7 +459,7 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
#define PSYS_ENABLED 16 /* deprecated */
#define PSYS_HAIR_UPDATED 32 /* signal for updating hair particle mode */
#define PSYS_DRAWING 64
-//#define PSYS_SOFT_BAKE 128
+#define PSYS_USE_IMAT 128
#define PSYS_DELETE 256 /* remove particlesystem as soon as possible */
#define PSYS_HAIR_DONE 512
#define PSYS_KEYED 1024
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 094a065145e..348afac766a 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -221,8 +221,8 @@ typedef struct RenderData {
float edgeR, edgeG, edgeB;
short fullscreen, xplay, yplay, freqplay; /* standalone player */ // XXX deprecated since 2.5
- short depth, attrib, rt2; /* standalone player */ // XXX deprecated since 2.5
- short frame_step; /* frames to jump during render/playback */
+ short depth, attrib; /* standalone player */ // XXX deprecated since 2.5
+ int frame_step; /* frames to jump during render/playback */
short stereomode; /* standalone player stereo settings */ // XXX deprecated since 2.5
@@ -458,13 +458,14 @@ typedef struct GameData {
* bit 3: (gameengine): Activity culling is enabled.
* bit 5: (gameengine) : enable Bullet DBVT tree for view frustrum culling
*/
- short mode, flag, matmode/*, pad[2]*/;
+ short mode, flag, matmode, pad[2];
short occlusionRes; /* resolution of occlusion Z buffer in pixel */
short physicsEngine;
short ticrate, maxlogicstep, physubstep, maxphystep;
short obstacleSimulation;
float levelHeight;
+
/* standalone player */
struct GameFraming framing;
short fullscreen, xplay, yplay, freqplay;
@@ -472,8 +473,8 @@ typedef struct GameData {
/* stereo/dome mode */
struct GameDome dome;
- short stereoflag, stereomode, xsch, ysch; //xsch and ysch can be deleted !!!
- float eyeseparation;
+ short stereoflag, stereomode, xsch, ysch; //xsch and ysch used for backwards compat.
+ float eyeseparation, pad1;
RecastData recastData;
} GameData;
@@ -517,7 +518,8 @@ typedef struct GameData {
#define GAME_GLSL_NO_EXTRA_TEX (1 << 11)
#define GAME_IGNORE_DEPRECATION_WARNINGS (1 << 12)
#define GAME_ENABLE_ANIMATION_RECORD (1 << 13)
-#define GAME_SHOW_OBSTACLE_SIMULATION (1 << 14)
+#define GAME_SHOW_MOUSE (1 << 14)
+#define GAME_SHOW_OBSTACLE_SIMULATION (1 << 15)
/* GameData.matmode */
#define GAME_MAT_TEXFACE 0
@@ -683,8 +685,11 @@ typedef struct ToolSettings {
short uvcalc_mapalign;
short uvcalc_flag;
short uv_flag, uv_selectmode;
- short uv_pad[2];
-
+ short uv_pad;
+
+ /* Grease Pencil */
+ short gpencil_flags;
+
/* Auto-IK */
short autoik_chainlen;
@@ -769,8 +774,10 @@ typedef struct bStats {
typedef struct UnitSettings {
/* Display/Editing unit options for each scene */
float scale_length; /* maybe have other unit conversions? */
- short system;
- short flag; /* imperial, metric etc */
+ char system; /* imperial, metric etc */
+ char system_rotation; /* not implimented as a propper unit system yet */
+ short flag;
+
} UnitSettings;
typedef struct PhysicsSettings {
@@ -786,7 +793,6 @@ typedef struct Scene {
struct World *world;
struct Scene *set;
- struct Image *ima;
ListBase base;
struct Base *basact; /* active base */
@@ -798,7 +804,7 @@ typedef struct Scene {
unsigned int lay; /* bitflags for layer visibility */
int layact; /* active layer */
- int pad1;
+ unsigned int customdata_mask; /* XXX. runtime flag for drawing, actually belongs in the window, only used by object_handle_update() */
short flag; /* various settings */
@@ -830,7 +836,7 @@ typedef struct Scene {
short dagisvalid, dagflags;
short recalc; /* recalc = counterpart of ob->recalc */
- short jumpframe;
+ short pad6;
int pad5;
/* User-Defined KeyingSets */
@@ -854,12 +860,6 @@ typedef struct Scene {
/* **************** RENDERDATA ********************* */
-/* bufflag */
-#define R_BACKBUF 1
-#define R_BACKBUFANIM 2
-#define R_FRONTBUF 4
-#define R_FRONTBUFANIM 8
-
/* flag */
/* use preview range */
#define SCER_PRV_RANGE (1<<0)
@@ -877,7 +877,7 @@ typedef struct Scene {
#define R_BORDER 0x0200
#define R_PANORAMA 0x0400 /* deprecated as scene option, still used in renderer */
#define R_CROP 0x0800
-#define R_COSMO 0x1000
+/*#define R_COSMO 0x1000 deprecated */
#define R_ODDFIELD 0x2000
#define R_MBLUR 0x4000
/* unified was here */
@@ -885,7 +885,7 @@ typedef struct Scene {
/* R_GAUSS is obsolete, but used to retrieve setting from old files */
#define R_GAUSS 0x20000
/* fbuf obsolete... */
-#define R_FBUF 0x40000
+/*#define R_FBUF 0x40000*/
/* threads obsolete... is there for old files, now use for autodetect threads */
#define R_THREADS 0x80000
/* Use the same flag for autothreads */
@@ -906,7 +906,7 @@ typedef struct Scene {
#define R_OUTPUT_SCREEN 0
#define R_OUTPUT_AREA 1
#define R_OUTPUT_WINDOW 2
-#define R_OUTPUT_FORKED 3
+/*#define R_OUTPUT_FORKED 3*/
/* filtertype */
#define R_FILTER_BOX 0
@@ -950,10 +950,10 @@ typedef struct Scene {
#define R_COMP_FREE 0x0800
#define R_NO_IMAGE_LOAD 0x1000
#define R_NO_TEX 0x2000
-#define R_STAMP_INFO 0x4000 /* deprecated */
+#define R_NO_FRAME_UPDATE 0x4000
#define R_FULL_SAMPLE 0x8000
-#define R_DEPRECATED 0x10000
-#define R_RECURS_PROTECTION 0x20000
+/* #define R_DEPRECATED 0x10000 */
+/* #define R_RECURS_PROTECTION 0x20000 */
#define R_TEXNODE_PREVIEW 0x40000
/* r->stamp */
@@ -968,7 +968,8 @@ typedef struct Scene {
#define R_STAMP_FILENAME 0x0100
#define R_STAMP_SEQSTRIP 0x0200
#define R_STAMP_RENDERTIME 0x0400
-#define R_STAMP_ALL (R_STAMP_TIME|R_STAMP_FRAME|R_STAMP_DATE|R_STAMP_CAMERA|R_STAMP_SCENE|R_STAMP_NOTE|R_STAMP_MARKER|R_STAMP_FILENAME|R_STAMP_SEQSTRIP|R_STAMP_RENDERTIME)
+#define R_STAMP_CAMERALENS 0x0800
+#define R_STAMP_ALL (R_STAMP_TIME|R_STAMP_FRAME|R_STAMP_DATE|R_STAMP_CAMERA|R_STAMP_SCENE|R_STAMP_NOTE|R_STAMP_MARKER|R_STAMP_FILENAME|R_STAMP_SEQSTRIP|R_STAMP_RENDERTIME|R_STAMP_CAMERALENS)
/* alphamode */
#define R_ADDSKY 0
@@ -989,7 +990,7 @@ typedef struct Scene {
/* #define R_HAMX 2 */ /* hamx is nomore */
/* #define R_FTYPE 3 */ /* ftype is nomore */
#define R_JPEG90 4
-#define R_MOVIE 5
+/*#define R_MOVIE 5*/ /* movie is nomore */
#define R_IRIZ 7
#define R_RAWTGA 14
#define R_AVIRAW 15
@@ -1064,6 +1065,7 @@ typedef struct Scene {
#define TESTBASELIB_BGMODE(v3d, scene, base) ( ((base)->flag & SELECT) && ((base)->lay & (v3d ? v3d->lay : scene->lay)) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
#define BASE_EDITABLE_BGMODE(v3d, scene, base) (((base)->lay & (v3d ? v3d->lay : scene->lay)) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
#define BASE_SELECTABLE(v3d, base) ((base->lay & v3d->lay) && (base->object->restrictflag & (OB_RESTRICT_SELECT|OB_RESTRICT_VIEW))==0)
+#define BASE_VISIBLE(v3d, base) ((base->lay & v3d->lay) && (base->object->restrictflag & OB_RESTRICT_VIEW)==0)
#define FIRSTBASE scene->base.first
#define LASTBASE scene->base.last
#define BASACT (scene->basact)
@@ -1074,7 +1076,6 @@ typedef struct Scene {
#define ID_NEW_US2(a) if( ((ID *)a)->newid) {(a)= ((ID *)a)->newid; ((ID *)a)->us++;}
#define CFRA (scene->r.cfra)
#define SUBFRA (scene->r.subframe)
-#define F_CFRA ((float)(scene->r.cfra))
#define SFRA (scene->r.sfra)
#define EFRA (scene->r.efra)
#define PRVRANGEON (scene->r.flag & SCER_PRV_RANGE)
@@ -1183,8 +1184,9 @@ typedef enum SculptFlags {
/* ImagePaintSettings.flag */
#define IMAGEPAINT_DRAWING 1
-#define IMAGEPAINT_DRAW_TOOL 2
-#define IMAGEPAINT_DRAW_TOOL_DRAWING 4
+// #define IMAGEPAINT_DRAW_TOOL 2 // deprecated
+// #define IMAGEPAINT_DRAW_TOOL_DRAWING 4 // deprecated
+
/* projection painting only */
#define IMAGEPAINT_PROJECT_DISABLE 8 /* Non projection 3D painting */
#define IMAGEPAINT_PROJECT_XRAY 16
@@ -1196,7 +1198,7 @@ typedef enum SculptFlags {
/* toolsettings->uvcalc_flag */
#define UVCALC_FILLHOLES 1
-#define UVCALC_NO_ASPECT_CORRECT 2 /* would call this UVCALC_ASPECT_CORRECT, except it should be default with old file */
+/*#define UVCALC_NO_ASPECT_CORRECT 2*/ /* would call this UVCALC_ASPECT_CORRECT, except it should be default with old file */
#define UVCALC_TRANSFORM_CORRECT 4 /* adjust UV's while transforming to avoid distortion */
/* toolsettings->uv_flag */
@@ -1216,13 +1218,16 @@ typedef enum SculptFlags {
#define EDGE_MODE_TAG_CREASE 3
#define EDGE_MODE_TAG_BEVEL 4
+/* toolsettings->gpencil_flags */
+#define GP_TOOL_FLAG_PAINTSESSIONS_ON (1<<0)
+
/* toolsettings->particle flag */
#define PE_KEEP_LENGTHS 1
#define PE_LOCK_FIRST 2
#define PE_DEFLECT_EMITTER 4
#define PE_INTERPOLATE_ADDED 8
#define PE_DRAW_PART 16
-#define PE_X_MIRROR 64 /* deprecated */
+/* #define PE_X_MIRROR 64 */ /* deprecated */
#define PE_FADE_TIME 128
#define PE_AUTO_VELOCITY 256
@@ -1251,10 +1256,10 @@ typedef enum SculptFlags {
#define RETOPO 1
#define RETOPO_PAINT 2
-/* toolsettings->retopo_paint_tool */
-#define RETOPO_PEN 1
-#define RETOPO_LINE 2
-#define RETOPO_ELLIPSE 4
+/* toolsettings->retopo_paint_tool */ /*UNUSED*/
+/* #define RETOPO_PEN 1 */
+/* #define RETOPO_LINE 2 */
+/* #define RETOPO_ELLIPSE 4 */
/* toolsettings->skgen_options */
#define SKGEN_FILTER_INTERNAL (1 << 0)
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index a811fd9c014..52d8b2e8dd9 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -54,7 +54,11 @@ typedef struct bScreen {
struct Scene *scene;
struct Scene *newscene; /* temporary when switching */
- short full; /* fade out? */
+ int redraws_flag; /* user-setting for which editors get redrawn during anim playback (used to be time->redraws) */
+ int pad1;
+
+ short full; /* temp screen for image render display or fileselect */
+ short temp; /* temp screen in a temp window, don't save (like user prefs) */
short winid; /* winid from WM, starts with 1 */
short do_draw; /* notifier for drawing edges */
short do_refresh; /* notifier for scale screen, changed screen, etc */
@@ -66,7 +70,7 @@ typedef struct bScreen {
short mainwin; /* screensize subwindow, for screenedges and global menus */
short subwinactive; /* active subwindow */
- int pad2;
+ short pad;
struct wmTimer *animtimer; /* if set, screen has timer handler added in window */
void *context; /* context callback */
@@ -187,20 +191,20 @@ typedef struct ARegion {
#define HEADERDOWN 1
#define HEADERTOP 2
-#define SCREENNORMAL 0
-#define SCREENFULL 1
-#define SCREENAUTOPLAY 2
-#define SCREENTEMP 3
+/* screen->full */
+#define SCREENNORMAL 0
+#define SCREENFULL 1
+#define SCREENFULLTEMP 2
/* Panel->snap - for snapping to screen edges */
#define PNL_SNAP_NONE 0
-#define PNL_SNAP_TOP 1
-#define PNL_SNAP_RIGHT 2
-#define PNL_SNAP_BOTTOM 4
-#define PNL_SNAP_LEFT 8
+/* #define PNL_SNAP_TOP 1 */
+/* #define PNL_SNAP_RIGHT 2 */
+#define PNL_SNAP_BOTTOM 4
+/* #define PNL_SNAP_LEFT 8 */
-#define PNL_SNAP_DIST 9.0
+/* #define PNL_SNAP_DIST 9.0 */
/* paneltype flag */
#define PNL_DEFAULT_CLOSED 1
@@ -214,6 +218,7 @@ typedef struct ARegion {
#define SCREEN_HANDLER_VERSE 3
/* regiontype, first two are the default set */
+/* Do NOT change order, append on end. Types are hardcoded needed */
enum {
RGN_TYPE_WINDOW = 0,
RGN_TYPE_HEADER,
diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h
index f2bdfeff9dd..8e291035be7 100644
--- a/source/blender/makesdna/DNA_sdna_types.h
+++ b/source/blender/makesdna/DNA_sdna_types.h
@@ -38,7 +38,7 @@ typedef struct SDNA {
int datalen; /* length of data */
int nr_names; /* total number of struct members */
- char **names; /* struct member names */
+ const char **names; /* struct member names */
int pointerlen; /* size of a pointer in bytes */
diff --git a/source/blender/makesdna/DNA_sensor_types.h b/source/blender/makesdna/DNA_sensor_types.h
index d7256b5b9e0..d2f6eb11952 100644
--- a/source/blender/makesdna/DNA_sensor_types.h
+++ b/source/blender/makesdna/DNA_sensor_types.h
@@ -207,6 +207,14 @@ typedef struct bJoystickSensor {
#define SENS_RAY_NEG_Z_AXIS 5
//#define SENS_RAY_NEGATIVE_AXIS 1
+/* bRadarSensor->axis */
+#define SENS_RADAR_X_AXIS 0
+#define SENS_RADAR_Y_AXIS 1
+#define SENS_RADAR_Z_AXIS 2
+#define SENS_RADAR_NEG_X_AXIS 3
+#define SENS_RADAR_NEG_Y_AXIS 4
+#define SENS_RADAR_NEG_Z_AXIS 5
+
/* bMessageSensor->type */
#define SENS_MESG_MESG 0
#define SENS_MESG_PROP 1
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index d51dec97351..4fcf7bd6250 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -42,6 +42,7 @@ struct bSound;
typedef struct StripElem {
char name[80];
+ int orig_width, orig_height;
} StripElem;
typedef struct StripCrop {
@@ -81,7 +82,6 @@ typedef struct Strip {
int startstill, endstill;
StripElem *stripdata;
char dir[160];
- int orx, ory;
StripProxy *proxy;
StripCrop *crop;
StripTransform *transform;
@@ -232,6 +232,8 @@ typedef struct SpeedControlVars {
int lastValidFrame;
} SpeedControlVars;
+#define SELECT 1
+
/* Editor->over_flag */
#define SEQ_EDIT_OVERLAY_SHOW 1
#define SEQ_EDIT_OVERLAY_ABS 2
diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h
index b8be51b378f..0482c19e189 100644
--- a/source/blender/makesdna/DNA_smoke_types.h
+++ b/source/blender/makesdna/DNA_smoke_types.h
@@ -35,6 +35,7 @@
#define MOD_SMOKE_DISSOLVE_LOG (1<<3) /* using 1/x for dissolve */
#define MOD_SMOKE_HIGH_SMOOTH (1<<5) /* smoothens high res emission*/
+#define MOD_SMOKE_FILE_LOAD (1<<6) /* flag for file load */
/* noise */
#define MOD_SMOKE_NOISEWAVE (1<<0)
@@ -86,6 +87,8 @@ typedef struct SmokeDomainSettings {
int v3dnum;
int cache_comp;
int cache_high_comp;
+
+ /* Smoke uses only one cache from now on (index [0]), but keeping the array for now for reading old files. */
struct PointCache *point_cache[2]; /* definition is in DNA_object_force.h */
struct ListBase ptcaches[2];
struct EffectorWeights *effector_weights;
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index ce038ee4a95..287dcf433eb 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -84,11 +84,20 @@ typedef struct SpaceInfo {
short blockhandler[8]; /* XXX depricate this */
- struct bScreen *screen; /* browse screen */
- struct Scene *scene; /* browse scene */
+ char rpt_mask;
+ char pad[7];
} SpaceInfo;
+/* SpaceInfo.rpt_mask */
+enum {
+ INFO_RPT_DEBUG = 1<<0,
+ INFO_RPT_INFO = 1<<1,
+ INFO_RPT_OP = 1<<2,
+ INFO_RPT_WARN = 1<<3,
+ INFO_RPT_ERR = 1<<4,
+};
+
/* 'Graph' Editor (formerly known as the IPO Editor) */
typedef struct SpaceIpo {
SpaceLink *next, *prev;
@@ -126,7 +135,8 @@ typedef struct SpaceButs {
short mainb, mainbo, mainbuser; /* context tabs */
short re_align, align; /* align for panels */
short preview; /* preview is signal to refresh */
- char flag, pad[3];
+ short texture_context; /* texture context selector (material, world, brush)*/
+ char flag, pad;
void *path; /* runtime */
int pathflag, dataicon; /* runtime */
@@ -157,7 +167,7 @@ typedef struct SpaceSeq {
} SpaceSeq;
typedef struct FileSelectParams {
- char title[24]; /* title, also used for the text of the execute button */
+ char title[32]; /* title, also used for the text of the execute button */
char dir[240]; /* directory */
char file[80]; /* file */
char renamefile[80];
@@ -231,9 +241,8 @@ typedef struct SpaceOops {
/* search stuff */
char search_string[32];
struct TreeStoreElem search_tse;
- int search_flags, do_;
-
- short flag, outlinevis, storeflag, pad;
+
+ short flag, outlinevis, storeflag, search_flags;
} SpaceOops;
typedef struct SpaceImage {
@@ -241,34 +250,30 @@ typedef struct SpaceImage {
ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype;
- float blockscale;
- short blockhandler[8];
-
+ int flag;
+
struct Image *image;
struct ImageUser iuser;
+ struct CurveMapping *cumap;
- struct CurveMapping *cumap;
- short menunr, imanr, pad2;
+ struct Scopes scopes; /* histogram waveform and vectorscope */
+ struct Histogram sample_line_hist; /* sample line histogram */
+
+ struct bGPdata *gpd; /* grease pencil data */
+
+ float cursor[2]; /* UV editor 2d cursor */
+ float xof, yof; /* user defined offset, image is centered */
+ float zoom; /* user defined zoom level */
+ float centx, centy; /* storage for offset while render drawing */
+
short curtile; /* the currently active tile of the image when tile is enabled, is kept in sync with the active faces tile */
- int flag;
- short imtypenr, lock;
- short pin, pad3;
+ short imtypenr;
+ short lock;
+ short pin;
char dt_uv; /* UV draw type */
char sticky; /* sticky selection type */
char dt_uvstretch;
char around;
- float cursor[2]; /* UV editor 2d cursor */
-
- float xof, yof; /* user defined offset, image is centered */
- float zoom, pad4; /* user defined zoom level */
- float centx, centy; /* storage for offset while render drawing */
-
- struct bGPdata *gpd; /* grease pencil data */
-
- struct Scopes scopes; /* histogram waveform and vectorscope */
-
- struct Histogram sample_line_hist; /* sample line histogram */
-
} SpaceImage;
typedef struct SpaceNla {
@@ -318,6 +323,8 @@ typedef struct SpaceText {
char findstr[256]; /* ST_MAX_FIND_STR */
char replacestr[256]; /* ST_MAX_FIND_STR */
+
+ void *drawcache; /* cache for faster drawing */
} SpaceText;
typedef struct Script {
@@ -334,9 +341,6 @@ typedef struct Script {
char scriptarg[256];
} Script;
#define SCRIPT_SET_NULL(_script) _script->py_draw = _script->py_event = _script->py_button = _script->py_browsercallback = _script->py_globaldict = NULL; _script->flags = 0;
-#define SCRIPT_RUNNING 0x01
-#define SCRIPT_GUI 0x02
-#define SCRIPT_FILESEL 0x04
typedef struct SpaceScript {
SpaceLink *next, *prev;
@@ -351,15 +355,11 @@ typedef struct SpaceScript {
void *but_refs;
} SpaceScript;
+# /* Only store the data array in the cache to avoid constant reallocation. */
+# /* No need to store when saved. */
typedef struct SpaceTimeCache {
struct SpaceTimeCache *next, *prev;
- int type;
- int flag;
-
float *array;
- int len;
- int startframe, endframe;
- int ok;
} SpaceTimeCache;
typedef struct SpaceTime {
@@ -373,7 +373,7 @@ typedef struct SpaceTime {
ListBase caches;
int cache_display, pad;
- int flag, redraws;
+ int flag, redraws; /* redraws is deprecated... moved to screen */
} SpaceTime;
@@ -397,8 +397,9 @@ typedef struct SpaceNode {
float mx, my; /* mousepos for drawing socketless link */
struct bNodeTree *nodetree, *edittree;
- int treetype; /* treetype: as same nodetree->type */
- short texfrom, pad; /* texfrom object, world or brush */
+ int treetype; /* treetype: as same nodetree->type */
+ short texfrom; /* texfrom object, world or brush */
+ short recalc; /* currently on 0/1, for auto compo */
struct bGPdata *gpd; /* grease-pencil data */
} SpaceNode;
@@ -406,6 +407,9 @@ typedef struct SpaceNode {
/* snode->flag */
#define SNODE_BACKDRAW 2
#define SNODE_DISPGP 4
+#define SNODE_USE_ALPHA 8
+#define SNODE_SHOW_ALPHA 16
+#define SNODE_AUTO_RENDER 32
/* snode->texfrom */
#define SNODE_TEX_OBJECT 0
@@ -507,21 +511,6 @@ enum {
CONSOLE_LINE_ERROR
};
-/* SpaceConsole.rpt_mask */
-enum {
- CONSOLE_TYPE_PYTHON=0,
- CONSOLE_TYPE_REPORT,
-};
-
-/* SpaceConsole.type see BKE_report.h */
-enum {
- CONSOLE_RPT_DEBUG = 1<<0,
- CONSOLE_RPT_INFO = 1<<1,
- CONSOLE_RPT_OP = 1<<2,
- CONSOLE_RPT_WARN = 1<<3,
- CONSOLE_RPT_ERR = 1<<4,
-};
-
typedef struct SpaceConsole {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
@@ -531,9 +520,7 @@ typedef struct SpaceConsole {
short blockhandler[8]; // XXX are these needed?
/* space vars */
- int type; /* console/report/..? */
- int rpt_mask; /* which reports to display */
- int flag, lheight;
+ int lheight, pad;
ListBase scrollback; /* ConsoleLine; output */
ListBase history; /* ConsoleLine; command history, current edited line is the first */
@@ -641,10 +628,15 @@ typedef struct SpaceSound {
/* sbuts->flag */
#define SB_PRV_OSA 1
#define SB_PIN_CONTEXT 2
-#define SB_WORLD_TEX 4
-#define SB_BRUSH_TEX 8
+//#define SB_WORLD_TEX 4 //not used anymore
+//#define SB_BRUSH_TEX 8 //not used anymore
#define SB_SHADING_CONTEXT 16
+/* sbuts->texture_context */
+#define SB_TEXC_MAT_OR_LAMP 0
+#define SB_TEXC_WORLD 1
+#define SB_TEXC_BRUSH 2
+
/* sbuts->align */
#define BUT_FREE 0
#define BUT_HORIZONTAL 1
@@ -716,7 +708,7 @@ enum FileSortTypeE {
#define EDITING (1<<0)
#define ACTIVEFILE (1<<1)
#define BLENDERFILE (1<<2)
-#define PSXFILE (1<<3)
+#define BLENDERFILE_BACKUP (1<<3)
#define IMAGEFILE (1<<4)
#define MOVIEFILE (1<<5)
#define PYSCRIPTFILE (1<<6)
@@ -747,35 +739,35 @@ enum FileSortTypeE {
#define SI_STICKY_VERTEX 2
/* SpaceImage->flag */
-#define SI_BE_SQUARE 1<<0
-#define SI_EDITTILE 1<<1
-#define SI_CLIP_UV 1<<2
-#define SI_DRAWTOOL 1<<3
-#define SI_DEPRECATED1 1<<4 /* stick UVs to others in the same location */
-#define SI_DRAWSHADOW 1<<5
-#define SI_SELACTFACE 1<<6 /* deprecated */
-#define SI_DEPRECATED2 1<<7
-#define SI_DEPRECATED3 1<<8 /* stick UV selection to mesh vertex (UVs wont always be touching) */
-#define SI_COORDFLOATS 1<<9
-#define SI_PIXELSNAP 1<<10
-#define SI_LIVE_UNWRAP 1<<11
-#define SI_USE_ALPHA 1<<12
-#define SI_SHOW_ALPHA 1<<13
-#define SI_SHOW_ZBUF 1<<14
+#define SI_BE_SQUARE (1<<0)
+#define SI_EDITTILE (1<<1)
+#define SI_CLIP_UV (1<<2)
+#define SI_DRAWTOOL (1<<3)
+#define SI_DEPRECATED1 (1<<4) /* stick UVs to others in the same location */
+#define SI_DRAWSHADOW (1<<5)
+#define SI_SELACTFACE (1<<6) /* deprecated */
+#define SI_DEPRECATED2 (1<<7)
+#define SI_DEPRECATED3 (1<<8) /* stick UV selection to mesh vertex (UVs wont always be touching) */
+#define SI_COORDFLOATS (1<<9)
+#define SI_PIXELSNAP (1<<10)
+#define SI_LIVE_UNWRAP (1<<11)
+#define SI_USE_ALPHA (1<<12)
+#define SI_SHOW_ALPHA (1<<13)
+#define SI_SHOW_ZBUF (1<<14)
/* next two for render window dislay */
-#define SI_PREVSPACE 1<<15
-#define SI_FULLWINDOW 1<<16
-#define SI_DEPRECATED4 1<<17
-#define SI_DEPRECATED5 1<<18
+#define SI_PREVSPACE (1<<15)
+#define SI_FULLWINDOW (1<<16)
+#define SI_DEPRECATED4 (1<<17)
+#define SI_DEPRECATED5 (1<<18)
/* this means that the image is drawn until it reaches the view edge,
* in the image view, its unrelated to the 'tile' mode for texface */
-#define SI_DRAW_TILE 1<<19
-#define SI_SMOOTH_UV 1<<20
-#define SI_DRAW_STRETCH 1<<21
-#define SI_DISPGP 1<<22
-#define SI_DRAW_OTHER 1<<23
+#define SI_DRAW_TILE (1<<19)
+#define SI_SMOOTH_UV (1<<20)
+#define SI_DRAW_STRETCH (1<<21)
+#define SI_DISPGP (1<<22)
+#define SI_DRAW_OTHER (1<<23)
-#define SI_COLOR_CORRECTION 1<<24
+#define SI_COLOR_CORRECTION (1<<24)
/* SpaceIpo->flag (Graph Editor Settings) */
/* OLD DEPRECEATED SETTING */
@@ -803,6 +795,8 @@ enum FileSortTypeE {
#define SIPO_TEMP_NEEDCHANSYNC (1<<10)
/* don't perform realtime updates */
#define SIPO_NOREALTIMEUPDATES (1<<11)
+ /* don't draw curves with AA ("beauty-draw") for performance */
+#define SIPO_BEAUTYDRAW_OFF (1<<12)
/* SpaceIpo->mode (Graph Editor Mode) */
enum {
@@ -860,12 +854,6 @@ enum {
#define B_IMASELHOME 451
#define B_IMASELREMOVEBIP 452
-#define C_BACK 0xBAAAAA
-#define C_DARK 0x665656
-#define C_DERK 0x766666
-#define C_HI 0xCBBBBB
-#define C_LO 0x544444
-
/* nla->flag */
/* flags (1<<0), (1<<1), and (1<<3) are depreceated flags from old blenders */
/* draw timing in seconds instead of frames */
@@ -885,7 +873,7 @@ enum {
/* only keyframes from active/selected channels get shown */
#define TIME_ONLYACTSEL 4
-/* time->redraws */
+/* time->redraws (now screen->redraws_flag) */
#define TIME_REGION 1
#define TIME_ALL_3D_WIN 2
#define TIME_ALL_ANIM_WIN 4
@@ -933,6 +921,7 @@ enum {
/* space types, moved from DNA_screen_types.h */
+/* Do NOT change order, append on end. types are hardcoded needed */
enum {
SPACE_EMPTY,
SPACE_VIEW3D,
diff --git a/source/blender/makesdna/DNA_text_types.h b/source/blender/makesdna/DNA_text_types.h
index d89d15fa302..82de3fc1833 100644
--- a/source/blender/makesdna/DNA_text_types.h
+++ b/source/blender/makesdna/DNA_text_types.h
@@ -48,7 +48,7 @@ typedef struct TextMarker {
int lineno, start, end, pad1; /* line number and start/end character indices */
int group, flags; /* see BKE_text.h for flag defines */
- char color[4], pad[4]; /* draw color of the marker */
+ unsigned char color[4], pad[4]; /* draw color of the marker */
} TextMarker;
typedef struct Text {
diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h
index e9e058cbbd6..41eebca821c 100644
--- a/source/blender/makesdna/DNA_texture_types.h
+++ b/source/blender/makesdna/DNA_texture_types.h
@@ -34,6 +34,10 @@
#include "DNA_ID.h"
#include "DNA_image_types.h" /* ImageUser */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct AnimData;
struct Ipo;
struct PluginTex;
@@ -220,7 +224,7 @@ typedef struct Tex {
float vn_mexp;
short vn_distm, vn_coltype;
- short noisedepth, noisetype;
+ short noisedepth, noisetype; /* noisedepth MUST be <= 30 else we get floating point exceptions */
/* newnoise: noisebasis type for clouds/marble/etc, noisebasis2 only used for distorted noise */
short noisebasis, noisebasis2;
@@ -450,7 +454,11 @@ typedef struct TexMapping {
#define MTEX_VIEWSPACE 16
#define MTEX_DUPLI_MAPTO 32
#define MTEX_OB_DUPLI_ORIG 64
-#define MTEX_NEW_BUMP 128
+#define MTEX_COMPAT_BUMP 128
+#define MTEX_3TAP_BUMP 256
+#define MTEX_5TAP_BUMP 512
+#define MTEX_BUMP_OBJECTSPACE 1024
+#define MTEX_BUMP_TEXTURESPACE 2048
/* blendtype */
#define MTEX_BLEND 0
@@ -548,11 +556,17 @@ typedef struct TexMapping {
#define TEX_VD_RAW_16BIT 2
#define TEX_VD_IMAGE_SEQUENCE 3
#define TEX_VD_SMOKE 4
+/* for voxels which use VoxelData->source_path */
+#define TEX_VD_IS_SOURCE_PATH(_format) (ELEM3(_format, TEX_VD_BLENDERVOXEL, TEX_VD_RAW_8BIT, TEX_VD_RAW_16BIT))
/* smoke data types */
#define TEX_VD_SMOKEDENSITY 0
#define TEX_VD_SMOKEHEAT 1
#define TEX_VD_SMOKEVEL 2
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 52e82eb743d..d8ab447b93a 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -35,6 +35,10 @@
#include "DNA_listBase.h"
#include "DNA_texture_types.h" /* ColorBand */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* themes; defines in BIF_resource.h */
struct ColorBand;
@@ -45,7 +49,7 @@ struct ColorBand;
/* default uifont_id offered by Blender */
#define UIFONT_DEFAULT 0
-#define UIFONT_BITMAP 1
+/*#define UIFONT_BITMAP 1*/ /*UNUSED*/
/* free slots */
#define UIFONT_CUSTOM1 2
#define UIFONT_CUSTOM2 3
@@ -84,6 +88,7 @@ typedef struct uiFontStyle {
/* this is fed to the layout engine and widget code */
+
typedef struct uiStyle {
struct uiStyle *next, *prev;
@@ -154,13 +159,13 @@ typedef struct ThemeSpace {
/* main window colors */
char back[4];
char title[4];
- char text[4];
+ char text[4];
char text_hi[4];
/* header colors */
char header[4];
char header_title[4];
- char header_text[4];
+ char header_text[4];
char header_text_hi[4];
/* button/tool regions */
@@ -172,7 +177,7 @@ typedef struct ThemeSpace {
/* listview regions */
char list[4];
char list_title[4];
- char list_text[4];
+ char list_text[4];
char list_text_hi[4];
/* float panel */
@@ -195,6 +200,7 @@ typedef struct ThemeSpace {
char edge_seam[4], edge_sharp[4], edge_facesel[4], edge_crease[4];
char face[4], face_select[4]; // solid faces
char face_dot[4]; // selected color
+ char extra_edge_len[4], extra_face_angle[4], extra_face_area[4], pad3[4];
char normal[4];
char vertex_normal[4];
char bone_solid[4], bone_pose[4];
@@ -344,7 +350,7 @@ typedef struct UserDef {
short tw_hotspot, tw_flag, tw_handlesize, tw_size;
short textimeout,texcollectrate;
short wmdrawmethod; /* removed wmpad */
- short pad2;
+ short dragthreshold;
int memcachelimit;
int prefetchframes;
short frameserverport;
@@ -372,6 +378,9 @@ typedef struct UserDef {
short autokey_mode; /* autokeying mode */
short autokey_flag; /* flags for autokeying */
+
+ short text_render, pad9; /*options for text rendering*/
+ float pad10;
struct ColorBand coba_weight; /* from texture.h */
@@ -396,16 +405,16 @@ extern UserDef U; /* from blenkernel blender.c */
/* flag */
#define USER_AUTOSAVE (1 << 0)
-#define USER_AUTOGRABGRID (1 << 1) /* deprecated */
-#define USER_AUTOROTGRID (1 << 2) /* deprecated */
-#define USER_AUTOSIZEGRID (1 << 3) /* deprecated */
+/*#define USER_AUTOGRABGRID (1 << 1) deprecated */
+/*#define USER_AUTOROTGRID (1 << 2) deprecated */
+/*#define USER_AUTOSIZEGRID (1 << 3) deprecated */
#define USER_SCENEGLOBAL (1 << 4)
#define USER_TRACKBALL (1 << 5)
-#define USER_DUPLILINK (1 << 6)
-#define USER_FSCOLLUM (1 << 7)
+/*#define USER_DUPLILINK (1 << 6) deprecated */
+/*#define USER_FSCOLLUM (1 << 7) deprecated */
#define USER_MAT_ON_OB (1 << 8)
/*#define USER_NO_CAPSLOCK (1 << 9)*/ /* not used anywhere */
-#define USER_VIEWMOVE (1 << 10)
+/*#define USER_VIEWMOVE (1 << 10)*/ /* not used anywhere */
#define USER_TOOLTIPS (1 << 11)
#define USER_TWOBUTTONMOUSE (1 << 12)
#define USER_NONUMPAD (1 << 13)
@@ -421,6 +430,7 @@ extern UserDef U; /* from blenkernel blender.c */
#define USER_FILENOUI (1 << 23)
#define USER_NONEGFRAMES (1 << 24)
#define USER_TXT_TABSTOSPACES_DISABLE (1 << 25)
+#define USER_TOOLTIPS_PYTHON (1 << 26)
/* helper macro for checking frame clamping */
#define FRAMENUMBER_MIN_CLAMP(cfra) \
@@ -442,10 +452,10 @@ extern UserDef U; /* from blenkernel blender.c */
#define USER_DRAWVIEWINFO (1 << 4)
#define USER_PLAINMENUS (1 << 5) // old EVTTOCONSOLE print ghost events, here for tuhopuu compat. --phase
// old flag for hide pulldown was here
-#define USER_FLIPFULLSCREEN (1 << 7)
+/*#define USER_FLIPFULLSCREEN (1 << 7)*/ /* deprecated */
#define USER_ALLWINCODECS (1 << 8)
#define USER_MENUOPENAUTO (1 << 9)
-#define USER_PANELPINNED (1 << 10) /* deprecated */
+/*#define USER_PANELPINNED (1 << 10) deprecated */
#define USER_AUTOPERSP (1 << 11)
#define USER_LOCKAROUND (1 << 12)
#define USER_GLOBALUNDO (1 << 13)
@@ -464,6 +474,8 @@ extern UserDef U; /* from blenkernel blender.c */
#define USER_ZOOM_INVERT (1 << 25)
#define USER_ZOOM_DOLLY_HORIZ (1 << 26)
#define USER_SPLASH_DISABLE (1 << 27)
+#define USER_HIDE_RECENT (1 << 28)
+#define USER_SHOW_THUMBNAILS (1 << 29)
/* Auto-Keying mode */
/* AUTOKEY_ON is a bitflag */
@@ -480,20 +492,20 @@ extern UserDef U; /* from blenkernel blender.c */
#define AUTOKEY_FLAG_INSERTNEEDED (1<<1)
#define AUTOKEY_FLAG_AUTOMATKEY (1<<2)
#define AUTOKEY_FLAG_XYZ2RGB (1<<3)
- /* U.autokey_flag (strictly autokeying only) */
+
+/* toolsettings->autokey_flag */
#define AUTOKEY_FLAG_ONLYKEYINGSET (1<<6)
- /* toolsettings->autokey_flag */
#define ANIMRECORD_FLAG_WITHNLA (1<<10)
/* transopts */
#define USER_TR_TOOLTIPS (1 << 0)
#define USER_TR_BUTTONS (1 << 1)
#define USER_TR_MENUS (1 << 2)
-#define USER_TR_FILESELECT (1 << 3)
-#define USER_TR_TEXTEDIT (1 << 4)
+/*#define USER_TR_FILESELECT (1 << 3) deprecated*/
+/*#define USER_TR_TEXTEDIT (1 << 4) deprecated*/
#define USER_DOTRANSLATE (1 << 5)
#define USER_USETEXTUREFONT (1 << 6)
-#define CONVERT_TO_UTF8 (1 << 7)
+/*#define CONVERT_TO_UTF8 (1 << 7) deprecated*/
/* dupflag */
#define USER_DUP_MESH (1 << 0)
@@ -510,7 +522,7 @@ extern UserDef U; /* from blenkernel blender.c */
#define USER_DUP_PSYS (1 << 11)
/* gameflags */
-#define USER_DEPRECATED_FLAG 1
+// #define USER_DEPRECATED_FLAG 1
// #define USER_DISABLE_SOUND 2 deprecated, don't use without checking for
// backwards compatibilty in do_versions!
#define USER_DISABLE_MIPMAP 4
@@ -524,6 +536,9 @@ extern UserDef U; /* from blenkernel blender.c */
#define USER_DRAW_AUTOMATIC 3
#define USER_DRAW_OVERLAP_FLIP 4
+/* text draw options*/
+#define USER_TEXT_DISABLE_AA (1 << 0)
+
/* tw_flag (transform widget) */
/* gp_settings (Grease Pencil Settings) */
@@ -558,4 +573,8 @@ extern UserDef U; /* from blenkernel blender.c */
#define TH_OLDSKOOL 3
#define TH_SHADED 4
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/source/blender/makesdna/DNA_vec_types.h b/source/blender/makesdna/DNA_vec_types.h
index 5d6f1039ed5..b5e3dff7db9 100644
--- a/source/blender/makesdna/DNA_vec_types.h
+++ b/source/blender/makesdna/DNA_vec_types.h
@@ -43,7 +43,7 @@ typedef struct vec2f {
} vec2f;
/* not used at the moment */
-#if 0
+/*
typedef struct vec2i {
int x, y;
} vec2i;
@@ -75,7 +75,7 @@ typedef struct vec4f {
typedef struct vec4d {
double x, y, z, w;
} vec4d;
-#endif
+*/
typedef struct rcti {
int xmin, xmax;
diff --git a/source/blender/makesdna/DNA_vfont_types.h b/source/blender/makesdna/DNA_vfont_types.h
index 0ea60c732cf..e342ef1cd79 100644
--- a/source/blender/makesdna/DNA_vfont_types.h
+++ b/source/blender/makesdna/DNA_vfont_types.h
@@ -55,5 +55,6 @@ typedef struct VFont {
#define FO_PAGEDOWN 9
#define FO_SELCHANGE 10
+#define FO_BUILTIN_NAME "<builtin>"
#endif
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index f692c80f81f..d429f55eb6c 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -89,14 +89,16 @@ typedef struct RegionView3D {
/* transform widget matrix */
float twmat[4][4];
-
- float viewquat[4], dist, zfac; /* zfac is initgrabz() result */
- float camdx, camdy; /* camera view offsets, 1.0 = viewplane moves entire width/height */
- float pixsize;
- float ofs[3];
- short camzoom, viewbut;
+
+ float viewquat[4]; /* view rotation, must be kept normalized */
+ float dist; /* distance from 'ofs' along -viewinv[2] vector, where result is negative as is 'ofs' */
+ float zfac; /* initgrabz() result */
+ float camdx, camdy; /* camera view offsets, 1.0 = viewplane moves entire width/height */
+ float pixsize; /* runtime only */
+ float ofs[3]; /* view center & orbit pivot, negative of worldspace location */
+ short camzoom;
short twdrawflag;
- short pad;
+ int pad;
short rflag, viewlock;
short persp;
@@ -120,7 +122,7 @@ typedef struct RegionView3D {
/* last view */
float lviewquat[4];
- short lpersp, lview;
+ short lpersp, lview; /* lpersp can never be set to 'RV3D_CAMOB' */
float gridview;
float twangle[3];
@@ -139,7 +141,7 @@ typedef struct View3D {
float viewquat[4], dist, pad1; /* XXX depricated */
- int lay_used; /* used while drawing */
+ unsigned int lay_used; /* used while drawing */
short persp; /* XXX depricated */
short view; /* XXX depricated */
@@ -153,13 +155,14 @@ typedef struct View3D {
char ob_centre_bone[32]; /* optional string for armature bone to define center */
- int lay, layact;
+ unsigned int lay;
+ int layact;
/**
* The drawing mode for the 3d display. Set to OB_WIRE, OB_SOLID,
* OB_SHADED or OB_TEXTURE */
short drawtype;
- short pad2;
+ short ob_centre_cursor; /* optional bool for 3d cursor to define center */
short scenelock, around, pad3;
short flag, flag2;
@@ -167,7 +170,7 @@ typedef struct View3D {
float lens, grid;
float gridview; /* XXX deprecated, now in RegionView3D */
- float padf, near, far;
+ float near, far;
float ofs[3]; /* XXX deprecated */
float cursor[3];
@@ -181,9 +184,6 @@ typedef struct View3D {
short twtype, twmode, twflag;
short twdrawflag; /* XXX deprecated */
- /* customdata flags from modes */
- unsigned int customdata_mask;
-
/* afterdraw, for xray & transparent */
struct ListBase afterdraw_transp;
struct ListBase afterdraw_xray;
@@ -202,20 +202,13 @@ typedef struct View3D {
} View3D;
-/* XXX this needs cleaning */
/* View3D->flag (short) */
-#define V3D_MODE (16+32+64+128+256+512)
-#define V3D_DISPIMAGE 1
+/*#define V3D_DISPIMAGE 1*/ /*UNUSED*/
#define V3D_DISPBGPICS 2
#define V3D_HIDE_HELPLINES 4
#define V3D_INVALID_BACKBUF 8
-#define V3D_EDITMODE 16
-#define V3D_VERTEXPAINT 32
-#define V3D_FACESELECT 64
-#define V3D_POSEMODE 128
-#define V3D_TEXTUREPAINT 256
-#define V3D_WEIGHTPAINT 512
+
#define V3D_ALIGN 1024
#define V3D_SELECT_OUTLINE 2048
#define V3D_ZBUF_SELECT 4096
@@ -228,7 +221,6 @@ typedef struct View3D {
#define RV3D_CAMOB 2
/* RegionView3d->rflag */
-#define RV3D_FLYMODE 2
#define RV3D_CLIPPING 4
#define RV3D_NAVIGATING 8
#define RV3D_GPULIGHT_UPDATE 16
@@ -293,7 +285,7 @@ typedef struct View3D {
/* USE = user setting, DRAW = based on selection */
#define V3D_USE_MANIPULATOR 1
#define V3D_DRAW_MANIPULATOR 2
-#define V3D_CALC_MANIPULATOR 4
+/* #define V3D_CALC_MANIPULATOR 4 */ /*UNUSED*/
/* BGPic->flag */
/* may want to use 1 for select ?*/
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index e6d0772f425..f47ea06645b 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -81,16 +81,20 @@ typedef enum ReportType {
enum ReportListFlags {
RPT_PRINT = 1,
RPT_STORE = 2,
- RPT_FREE = 4,
+ RPT_FREE = 4
};
+#
+#
typedef struct Report {
struct Report *next, *prev;
short type; /* ReportType */
short flag;
int len; /* strlen(message), saves some time calculating the word wrap */
- char *typestr;
- char *message;
+ const char *typestr;
+ const char *message;
} Report;
+
+/* saved in the wm, dont remove */
typedef struct ReportList {
ListBase list;
int printlevel; /* ReportType */
@@ -100,6 +104,8 @@ typedef struct ReportList {
} ReportList;
/* timer customdata to control reports display */
+#
+#
typedef struct ReportTimerInfo {
float col[3];
float greyscale;
@@ -140,8 +146,8 @@ typedef struct wmWindowManager {
} wmWindowManager;
/* wmWindowManager.initialized */
-#define WM_INIT_WINDOW 1<<0
-#define WM_INIT_KEYMAP 1<<1
+#define WM_INIT_WINDOW (1<<0)
+#define WM_INIT_KEYMAP (1<<1)
/* the savable part, rest of data is local in ghostwinlay */
typedef struct wmWindow {
@@ -163,9 +169,10 @@ typedef struct wmWindow {
short monitor; /* multiscreen... no idea how to store yet */
short active; /* set to 1 if an active window, for quick rejects */
short cursor; /* current mouse cursor type */
- short lastcursor; /* for temp waitcursor */
+ short lastcursor; /* previous cursor when setting modal one */
+ short modalcursor; /* the current modal cursor */
short addmousemove; /* internal: tag this for extra mousemove event, makes cursors/buttons active on UI switching */
- short pad2[2];
+ short pad2;
struct wmEvent *eventstate; /* storage for event system */
@@ -222,7 +229,7 @@ typedef struct wmKeyMapItem {
/* runtime */
short maptype; /* keymap editor */
- short id; /* unique identifier */
+ short id; /* unique identifier. Positive for kmi that override builtins, negative otherwise */
short pad;
struct PointerRNA *ptr; /* rna pointer to access properties */
} wmKeyMapItem;
@@ -307,7 +314,7 @@ typedef struct wmOperator {
typedef enum wmRadialControlMode {
WM_RADIALCONTROL_SIZE,
WM_RADIALCONTROL_STRENGTH,
- WM_RADIALCONTROL_ANGLE,
+ WM_RADIALCONTROL_ANGLE
} wmRadialControlMode;
#endif /* DNA_WINDOWMANAGER_TYPES_H */
diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h
index 42c80f4b8b5..68b3c32db97 100644
--- a/source/blender/makesdna/DNA_world_types.h
+++ b/source/blender/makesdna/DNA_world_types.h
@@ -140,7 +140,7 @@ typedef struct World {
/* mode */
#define WO_MIST 1
#define WO_STARS 2
-#define WO_DOF 4
+/*#define WO_DOF 4*/
#define WO_ACTIVITY_CULLING 8
#define WO_ENV_LIGHT 16
#define WO_DBVT_CULLING 32
diff --git a/source/blender/makesdna/Makefile b/source/blender/makesdna/Makefile
deleted file mode 100644
index f83a6288e8d..00000000000
--- a/source/blender/makesdna/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# $Id$
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): none yet.
-#
-# ***** END GPL LICENSE BLOCK *****
-#
-#
-# This module does not build normal .o's, but a DNA.c file, to be
-# compiled with the rest of the sources. To speed things up a little,
-# the compilation is done here.
-#
-# Bounces make to subdirectories.
-
-SOURCEDIR = source/blender/makesdna
-DIRS = intern
-
-include nan_subdirs.mk
diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt
index d42289e17c4..ba9e7d30e80 100644
--- a/source/blender/makesdna/intern/CMakeLists.txt
+++ b/source/blender/makesdna/intern/CMakeLists.txt
@@ -1,3 +1,4 @@
+# -*- mode: cmake; indent-tabs-mode: t; -*-
# $Id$
# ***** BEGIN GPL LICENSE BLOCK *****
#
@@ -24,30 +25,41 @@
#
# ***** END GPL LICENSE BLOCK *****
-INCLUDE_DIRECTORIES(../../../../intern/guardedalloc ..)
-FILE(GLOB INC_FILES ../*.h)
+# message(STATUS "Configuring makesdna")
+
+blender_include_dirs(
+ ../../../../intern/guardedalloc
+ ..
+)
# Build makesdna executable
-SET(SRC
+set(SRC
makesdna.c
../../../../intern/guardedalloc/intern/mallocn.c
)
-IF(WIN32)
- LIST(APPEND SRC ../../../../intern/guardedalloc/intern/mmap_win.c)
-ENDIF(WIN32)
+if(WIN32 AND NOT UNIX)
+ list(APPEND SRC
+ ../../../../intern/guardedalloc/intern/mmap_win.c
+ )
+endif()
-ADD_EXECUTABLE(makesdna ${SRC} ${INC_FILES})
+# SRC_DNA_INC is defined in the parent dir
+
+add_executable(makesdna ${SRC} ${SRC_DNA_INC})
# Output dna.c
-ADD_CUSTOM_COMMAND(
+add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dna.c
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna ${CMAKE_CURRENT_BINARY_DIR}/dna.c ${CMAKE_SOURCE_DIR}/source/blender/makesdna/
DEPENDS makesdna
)
# Build bf_dna library
-SET(SRC dna_genfile.c dna.c)
-BLENDERLIB(bf_dna "${SRC}" "${INC}")
+set(SRC
+ dna_genfile.c
+ dna.c
+ ${SRC_DNA_INC}
+)
-MESSAGE(STATUS "Configuring makesdna")
+blender_add_lib(bf_dna "${SRC}" "${INC}")
diff --git a/source/blender/makesdna/intern/Makefile b/source/blender/makesdna/intern/Makefile
deleted file mode 100644
index 55b0c42acda..00000000000
--- a/source/blender/makesdna/intern/Makefile
+++ /dev/null
@@ -1,87 +0,0 @@
-#
-# $Id$
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): none yet.
-#
-# ***** END GPL LICENSE BLOCK *****
-#
-#
-
-LIBNAME = dna
-DIR = $(OCGDIR)/blender/makesdna
-CSRCS = DNA.c $(wildcard dna_*.c)
-
-include nan_compile.mk
-
-CFLAGS += $(LEVEL_1_C_WARNINGS)
-
-CPPFLAGS += -I$(OPENGL_HEADERS)
-CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
-CPPFLAGS += -I../../blenlib
-CPPFLAGS += -I..
-
-ifeq ($(OS),windows)
- # Windows needs these extra libs because of winstuff... It is not
- # _really_ needed, but it is the easiest fix for now. If you have
- # some spare time, try to trace down the exact dep. Then again, you
- # could also spend that time making the sdna system more robust.
- ifneq ($(FREE_WINDOWS),true)
- WINLIBS = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
- WINLIBS += advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
- WINLIBS += winmm.lib opengl32.lib glu32.lib largeint.lib
- WINLIBS += /link /nodefaultlib:libc
- else
- LDFLAGS += -mwindows -mno-cygwin
- endif
-endif
-
-ifeq ($(OS), darwin)
- LDFLAGS += -arch $(MACOSX_ARCHITECTURE) #-isysroot $(MACOSX_SDK) -mmacosx-version-min=$(MACOSX_MIN_VERS)
-endif
-
-clean::
- @$(RM) $(DIR)/makesdna* $(DIR)/DNA.c
- @$(RM) $(DIR)/debug/makesdna* $(DIR)/debug/DNA.c
-
-# TODO include right .mk for ldflags
-
-# A small note: we do not use the debug version of the alloc lib. That
-# is done quite intentionally. If there is a bug in that lib, it needs
-# to be fixed by the module maintainer.
-DNAOBJS = $(filter-out %DNA.o, $(OBJS))
-
-$(DIR)/$(DEBUG_DIR)makesdna: $(DNAOBJS) $(DIR)/$(DEBUG_DIR)makesdna.o $(NAN_GUARDEDALLOC)/lib/libguardedalloc.a
- $(CC) $(LDFLAGS) -o $@ $^
-
-$(DIR)/$(DEBUG_DIR)DNA.c: $(DIR)/$(DEBUG_DIR)makesdna
- ifeq ($(OS),windows)
- $(SRCHOME)/tools/cygwin/cl_wrapper.pl - $(DIR)/$(DEBUG_DIR)makesdna \
- $(DIR)/$(DEBUG_DIR)DNA.c
- else
- $(DIR)/$(DEBUG_DIR)makesdna $(DIR)/$(DEBUG_DIR)DNA.c
- endif
-
-$(DIR)/$(DEBUG_DIR)makesdna.o: makesdna.c $(wildcard ../*.h)
- $(CC) -c $(CFLAGS) $(CPPFLAGS) makesdna.c -o $@
-
diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c
index fd98fd4ef08..c103e74ca34 100644
--- a/source/blender/makesdna/intern/dna_genfile.c
+++ b/source/blender/makesdna/intern/dna_genfile.c
@@ -43,7 +43,7 @@
/* gcc 4.1 on mingw was complaining that __int64 was already defined
actually is saw the line below as typedef long long long long...
-Anyhow, since its already defined, its safe to do an ifndef here- Cambpell*/
+Anyhow, since its already defined, its safe to do an ifndef here- Campbell */
#ifdef FREE_WINDOWS
#ifndef __int64
typedef long long __int64;
@@ -196,7 +196,7 @@ void DNA_sdna_free(SDNA *sdna)
MEM_freeN(sdna);
}
-static int ispointer(char *name)
+static int ispointer(const char *name)
{
/* check if pointer or function pointer */
return (name[0]=='*' || (name[0]=='(' && name[1]=='*'));
@@ -206,7 +206,7 @@ static int elementsize(SDNA *sdna, short type, short name)
/* call with numbers from struct-array */
{
int mul, namelen, len;
- char *cp;
+ const char *cp;
cp= sdna->names[name];
len= 0;
@@ -251,7 +251,7 @@ static void printstruct(SDNA *sdna, short strnr)
}
#endif
-static short *findstruct_name(SDNA *sdna, char *str)
+static short *findstruct_name(SDNA *sdna, const char *str)
{
int a;
short *sp=0;
@@ -502,7 +502,7 @@ static void recurs_test_compflags(SDNA *sdna, char *compflags, int structnr)
{
int a, b, typenr, elems;
short *sp;
- char *cp;
+ const char *cp;
/* check all structs, test if it's inside another struct */
sp= sdna->structs[structnr];
@@ -546,7 +546,7 @@ char *DNA_struct_get_compareflags(SDNA *sdna, SDNA *newsdna)
*/
int a, b;
short *spold, *spcur;
- char *str1, *str2;
+ const char *str1, *str2;
char *compflags;
if(sdna->nr_structs==0) {
@@ -627,7 +627,7 @@ char *DNA_struct_get_compareflags(SDNA *sdna, SDNA *newsdna)
return compflags;
}
-static void cast_elem(char *ctype, char *otype, char *name, char *curdata, char *olddata)
+static void cast_elem(char *ctype, char *otype, const char *name, char *curdata, char *olddata)
{
double val = 0.0;
int arrlen, curlen=1, oldlen=1, ctypenr, otypenr;
@@ -721,7 +721,7 @@ static void cast_elem(char *ctype, char *otype, char *name, char *curdata, char
}
}
-static void cast_pointer(int curlen, int oldlen, char *name, char *curdata, char *olddata)
+static void cast_pointer(int curlen, int oldlen, const char *name, char *curdata, char *olddata)
{
#ifdef WIN32
__int64 lval;
@@ -764,7 +764,7 @@ static void cast_pointer(int curlen, int oldlen, char *name, char *curdata, char
}
}
-static int elem_strcmp(char *name, char *oname)
+static int elem_strcmp(const char *name, const char *oname)
{
int a=0;
@@ -780,10 +780,10 @@ static int elem_strcmp(char *name, char *oname)
return 0;
}
-static char *find_elem(SDNA *sdna, char *type, char *name, short *old, char *olddata, short **sppo)
+static char *find_elem(SDNA *sdna, const char *type, const char *name, short *old, char *olddata, short **sppo)
{
int a, elemcount, len;
- char *otype, *oname;
+ const char *otype, *oname;
/* without arraypart, so names can differ: return old namenr and type */
@@ -811,7 +811,7 @@ static char *find_elem(SDNA *sdna, char *type, char *name, short *old, char *old
return 0;
}
-static void reconstruct_elem(SDNA *newsdna, SDNA *oldsdna, char *type, char *name, char *curdata, short *old, char *olddata)
+static void reconstruct_elem(SDNA *newsdna, SDNA *oldsdna, char *type, const char *name, char *curdata, short *old, char *olddata)
{
/* rules: test for NAME:
- name equal:
@@ -823,7 +823,8 @@ static void reconstruct_elem(SDNA *newsdna, SDNA *oldsdna, char *type, char *nam
can I force this?)
*/
int a, elemcount, len, array, oldsize, cursize, mul;
- char *otype, *oname, *cp;
+ char *otype;
+ const char *oname, *cp;
/* is 'name' an array? */
cp= name;
@@ -868,6 +869,10 @@ static void reconstruct_elem(SDNA *newsdna, SDNA *oldsdna, char *type, char *nam
mul= len/oldsize;
mul*= (cursize < oldsize)? cursize: oldsize;
memcpy(curdata, olddata, mul);
+
+ /* terminate strings */
+ if(oldsize > cursize && strcmp(type, "char")==0)
+ curdata[mul-1]= 0;
}
else {
if(cursize>oldsize) cast_elem(type, otype, oname, curdata, olddata);
@@ -888,7 +893,8 @@ static void reconstruct_struct(SDNA *newsdna, SDNA *oldsdna, char *compflags, in
*/
int a, elemcount, elen, eleno, mul, mulo, firststructtypenr;
short *spo, *spc, *sppo;
- char *name, *nameo, *type, *cpo, *cpc;
+ char *type, *cpo, *cpc;
+ const char *name, *nameo;
if(oldSDNAnr== -1) return;
if(curSDNAnr== -1) return;
@@ -965,7 +971,8 @@ void DNA_struct_switch_endian(SDNA *oldsdna, int oldSDNAnr, char *data)
*/
int a, mul, elemcount, elen, elena, firststructtypenr;
short *spo, *spc, skip;
- char *name, *type, *cpo, *cur, cval;
+ char *type, *cpo, *cur, cval;
+ const char *name;
if(oldSDNAnr== -1) return;
firststructtypenr= *(oldsdna->structs[0]);
@@ -1095,7 +1102,7 @@ void *DNA_struct_reconstruct(SDNA *newsdna, SDNA *oldsdna, char *compflags, int
return cur;
}
-int DNA_elem_offset(SDNA *sdna, char *stype, char *vartype, char *name)
+int DNA_elem_offset(SDNA *sdna, const char *stype, const char *vartype, const char *name)
{
int SDNAnr= DNA_struct_find_nr(sdna, stype);
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index 577b18556c8..7762ce170df 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -62,7 +62,7 @@
/* Included the path relative from /source/blender/ here, so we can move */
/* headers around with more freedom. */
-char *includefiles[] = {
+const char *includefiles[] = {
// if you add files here, please add them at the end
// of makesdna.c (this file) as well
@@ -162,7 +162,7 @@ int additional_slen_offset;
/**
* Add type <str> to struct indexed by <len>, if it was not yet found.
*/
-int add_type(char *str, int len);
+int add_type(const char *str, int len);
/**
* Add variable <str> to
@@ -214,7 +214,7 @@ void printStructLenghts(void);
/* ************************* MAKEN DNA ********************** */
-int add_type(char *str, int len)
+int add_type(const char *str, int len)
{
int nr;
char *cp;
@@ -244,7 +244,7 @@ int add_type(char *str, int len)
if(nr_types>=maxnr) {
printf("too many types\n");
- return nr_types-1;;
+ return nr_types-1;
}
nr_types++;
@@ -269,7 +269,7 @@ int add_name(char *str)
additional_slen_offset = 0;
- if((str[0]==0) /* || (str[1]==0) */) return -1;
+ if(str[0]==0 /* || (str[1]==0) */) return -1;
if (str[0] == '(' && str[1] == '*') {
/* we handle function pointer and special array cases here, e.g.
@@ -281,7 +281,6 @@ int add_name(char *str)
if (debugSDNA > 3) printf("\t\t\t\t*** Function pointer or multidim array pointer found\n");
/* functionpointer: transform the type (sometimes) */
i = 0;
- j = 0;
while (str[i] != ')') {
buf[i] = str[i];