diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-06-11 00:50:43 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-06-11 00:50:43 +0400 |
commit | 8135cc9f954e0d63ab3e97d4a7c52ff5e573eef0 (patch) | |
tree | a12ec0daccfc45b7e3c68e4a2d7099655daf619d /source/blender/makesdna | |
parent | 0f33d5719fd0adc666e7e92e0f062281f4285f13 (diff) | |
parent | 298feff39006c14aa28b5e0232aa7ed70a83a496 (diff) |
Merged changes in the trunk up to revision 47700.
Conflicts resolved:
source/blender/blenkernel/BKE_main.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/intern/library.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/interface/resources.c
source/blender/makesdna/DNA_ID.h
source/blender/makesdna/DNA_action_types.h
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/SConscript
source/blender/makesrna/intern/rna_internal.h
source/blender/makesrna/intern/rna_main.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/windowmanager/WM_types.h
Diffstat (limited to 'source/blender/makesdna')
19 files changed, 781 insertions, 474 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 814b1d18876..46a0f21fde0 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -206,6 +206,7 @@ typedef struct PreviewImage { #define ID_GD MAKE_ID2('G', 'D') /* GreasePencil */ #define ID_WM MAKE_ID2('W', 'M') /* WindowManager */ #define ID_MC MAKE_ID2('M', 'C') /* MovieClip */ +#define ID_MSK MAKE_ID2('M', 'S') /* Mask */ #define ID_LS MAKE_ID2('L', 'S') /* FreestyleLineStyle */ /* NOTE! Fake IDs, needed for g.sipo->blocktype or outliner */ diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index a997a655899..651b69f6aca 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -50,37 +50,37 @@ struct GHash; /* Data point for motion path (mpv) */ typedef struct bMotionPathVert { - float co[3]; /* coordinates of point in 3D-space */ - int flag; /* quick settings */ + float co[3]; /* coordinates of point in 3D-space */ + int flag; /* quick settings */ } bMotionPathVert; /* bMotionPathVert->flag */ typedef enum eMotionPathVert_Flag { - /* vert is selected */ - MOTIONPATH_VERT_SEL = (1<<0) + /* vert is selected */ + MOTIONPATH_VERT_SEL = (1 << 0) } eMotionPathVert_Flag; /* ........ */ /* Motion Path data cache (mpath) - * - for elements providing transforms (i.e. Objects or PoseChannels) + * - for elements providing transforms (i.e. Objects or PoseChannels) */ typedef struct bMotionPath { - bMotionPathVert *points; /* path samples */ - int length; /* the number of cached verts */ + bMotionPathVert *points; /* path samples */ + int length; /* the number of cached verts */ - int start_frame; /* for drawing paths, the start frame number */ - int end_frame; /* for drawing paths, the end frame number */ + int start_frame; /* for drawing paths, the start frame number */ + int end_frame; /* for drawing paths, the end frame number */ - int flag; /* baking settings - eMotionPath_Flag */ + int flag; /* baking settings - eMotionPath_Flag */ } bMotionPath; /* bMotionPath->flag */ 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) + /* (for bones) path represents the head of the bone */ + MOTIONPATH_FLAG_BHEAD = (1 << 0), + /* motion path is being edited */ + MOTIONPATH_FLAG_EDIT = (1 << 1) } eMotionPath_Flag; /* Visualisation General --------------------------- */ @@ -89,83 +89,83 @@ typedef enum eMotionPath_Flag { /* Animation Visualisation Settings (avs) */ typedef struct bAnimVizSettings { /* Onion-Skinning Settings ----------------- */ - int ghost_sf, ghost_ef; /* start and end frames of ghost-drawing range (only used for GHOST_TYPE_RANGE) */ - int ghost_bc, ghost_ac; /* number of frames before/after current frame to show */ + int ghost_sf, ghost_ef; /* start and end frames of ghost-drawing range (only used for GHOST_TYPE_RANGE) */ + int ghost_bc, ghost_ac; /* number of frames before/after current frame to show */ - short ghost_type; /* eOnionSkin_Types */ - short ghost_step; /* number of frames between each ghost shown (not for GHOST_TYPE_KEYS) */ + short ghost_type; /* eOnionSkin_Types */ + short ghost_step; /* number of frames between each ghost shown (not for GHOST_TYPE_KEYS) */ - short ghost_flag; /* eOnionSkin_Flag */ + short ghost_flag; /* eOnionSkin_Flag */ /* General Settings ------------------------ */ - short recalc; /* eAnimViz_RecalcFlags */ + short recalc; /* eAnimViz_RecalcFlags */ /* Motion Path Settings ------------------- */ - short path_type; /* eMotionPath_Types */ - short path_step; /* number of frames between points indicated on the paths */ + short path_type; /* eMotionPath_Types */ + short path_step; /* number of frames between points indicated on the paths */ - short path_viewflag; /* eMotionPaths_ViewFlag */ - short path_bakeflag; /* eMotionPaths_BakeFlag */ + short path_viewflag; /* eMotionPaths_ViewFlag */ + short path_bakeflag; /* eMotionPaths_BakeFlag */ - int path_sf, path_ef; /* start and end frames of path-calculation range */ - int path_bc, path_ac; /* number of frames before/after current frame to show */ + int path_sf, path_ef; /* start and end frames of path-calculation range */ + int path_bc, path_ac; /* number of frames before/after current frame to show */ } bAnimVizSettings; /* bAnimVizSettings->recalc */ typedef enum eAnimViz_RecalcFlags { - /* motionpaths need recalculating */ - ANIMVIZ_RECALC_PATHS = (1<<0) + /* motionpaths need recalculating */ + ANIMVIZ_RECALC_PATHS = (1 << 0) } eAnimViz_RecalcFlags; /* bAnimVizSettings->ghost_type */ typedef enum eOnionSkin_Types { - /* no ghosts at all */ + /* no ghosts at all */ GHOST_TYPE_NONE = 0, - /* around current frame */ - GHOST_TYPE_ACFRA, - /* show ghosts within the specified frame range */ - GHOST_TYPE_RANGE, - /* show ghosts on keyframes within the specified range only */ - GHOST_TYPE_KEYS + /* around current frame */ + GHOST_TYPE_ACFRA = 1, + /* show ghosts within the specified frame range */ + GHOST_TYPE_RANGE = 2, + /* show ghosts on keyframes within the specified range only */ + GHOST_TYPE_KEYS = 3 } eOnionSkin_Types; /* bAnimVizSettings->ghost_flag */ typedef enum eOnionSkin_Flag { - /* only show selected bones in ghosts */ - GHOST_FLAG_ONLYSEL = (1<<0) + /* only show selected bones in ghosts */ + GHOST_FLAG_ONLYSEL = (1 << 0) } eOnionSkin_Flag; /* bAnimVizSettings->path_type */ typedef enum eMotionPaths_Types { - /* show the paths along their entire ranges */ + /* 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 + /* only show the parts of the paths around the current frame */ + MOTIONPATH_TYPE_ACFRA = 1, } eMotionPath_Types; /* bAnimVizSettings->path_viewflag */ typedef enum eMotionPaths_ViewFlag { - /* show frames on path */ - MOTIONPATH_VIEW_FNUMS = (1<<0), - /* show keyframes on path */ - MOTIONPATH_VIEW_KFRAS = (1<<1), - /* 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) + /* show frames on path */ + MOTIONPATH_VIEW_FNUMS = (1 << 0), + /* show keyframes on path */ + MOTIONPATH_VIEW_KFRAS = (1 << 1), + /* 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) } eMotionPath_ViewFlag; /* bAnimVizSettings->path_bakeflag */ typedef enum eMotionPaths_BakeFlag { - /* motion paths directly associated with this block of settings needs updating */ - MOTIONPATH_BAKE_NEEDS_RECALC = (1<<0), - /* 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) + /* motion paths directly associated with this block of settings needs updating */ + MOTIONPATH_BAKE_NEEDS_RECALC = (1 << 0), + /* 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) } eMotionPath_BakeFlag; /* ************************************************ */ @@ -179,142 +179,142 @@ typedef enum eMotionPaths_BakeFlag { * with respect to the restposition of Armature bones */ typedef struct bPoseChannel { - struct bPoseChannel *next, *prev; + struct bPoseChannel *next, *prev; - IDProperty *prop; /* User-Defined Properties on this PoseChannel */ + IDProperty *prop; /* User-Defined Properties on this PoseChannel */ - ListBase constraints;/* Constraints that act on this PoseChannel */ - char name[64]; /* need to match bone name length: MAXBONENAME */ + ListBase constraints; /* Constraints that act on this PoseChannel */ + char name[64]; /* need to match bone name length: MAXBONENAME */ - short flag; /* dynamic, for detecting transform changes */ - short ikflag; /* settings for IK bones */ - short protectflag; /* protect channels from being transformed */ - short agrp_index; /* index of action-group this bone belongs to (0 = default/no group) */ - char constflag; /* for quick detecting which constraints affect this channel */ - char selectflag; /* copy of bone flag, so you can work with library armatures, not for runtime use */ - char pad0[6]; + short flag; /* dynamic, for detecting transform changes */ + short ikflag; /* settings for IK bones */ + short protectflag; /* protect channels from being transformed */ + short agrp_index; /* index of action-group this bone belongs to (0 = default/no group) */ + char constflag; /* for quick detecting which constraints affect this channel */ + char selectflag; /* copy of bone flag, so you can work with library armatures, not for runtime use */ + char pad0[6]; - struct Bone *bone; /* set on read file or rebuild pose */ - struct bPoseChannel *parent; /* set on read file or rebuild pose */ - struct bPoseChannel *child; /* set on read file or rebuild pose, the 'ik' child, for b-bones */ - - struct ListBase iktree; /* "IK trees" - only while evaluating pose */ - struct ListBase siktree; /* Spline-IK "trees" - only while evaluating pose */ - - 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. + struct Bone *bone; /* set on read file or rebuild pose */ + struct bPoseChannel *parent; /* set on read file or rebuild pose */ + struct bPoseChannel *child; /* set on read file or rebuild pose, the 'ik' child, for b-bones */ + + struct ListBase iktree; /* "IK trees" - only while evaluating pose */ + struct ListBase siktree; /* Spline-IK "trees" - only while evaluating pose */ + + 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]; - - /* rotations - written in by actions or transform (but only one representation gets used at any time) */ - float eul[3]; /* euler rotation */ - float quat[4]; /* quaternion rotation */ - float rotAxis[3], rotAngle; /* axis-angle rotation */ - short rotmode; /* eRotationModes - rotation representation to use */ - short pad; + /* transforms - written in by actions or transform */ + float loc[3]; + float size[3]; + + /* rotations - written in by actions or transform (but only one representation gets used at any time) */ + float eul[3]; /* euler rotation */ + float quat[4]; /* quaternion rotation */ + float rotAxis[3], rotAngle; /* axis-angle rotation */ + short rotmode; /* eRotationModes - rotation representation to use */ + short pad; - float chan_mat[4][4]; /* matrix result of loc/quat/size , and where we put deform in, see next line */ - float pose_mat[4][4]; /* constraints accumulate here. in the end, pose_mat = bone->arm_mat * chan_mat + float chan_mat[4][4]; /* matrix result of loc/quat/size , and where we put deform in, see next line */ + float pose_mat[4][4]; /* constraints accumulate here. in the end, pose_mat = bone->arm_mat * chan_mat * this matrix is object space */ - float constinv[4][4]; /* inverse result of constraints. + float constinv[4][4]; /* inverse result of constraints. * doesn't include effect of restposition, parent, and local transform*/ - float pose_head[3]; /* actually pose_mat[3] */ - float pose_tail[3]; /* also used for drawing help lines... */ + float pose_head[3]; /* actually pose_mat[3] */ + float pose_tail[3]; /* also used for drawing help lines... */ - float limitmin[3], limitmax[3]; /* DOF constraint, note! - these are stored in degrees, not radians */ - float stiffness[3]; /* DOF stiffness */ - float ikstretch; - float ikrotweight; /* weight of joint rotation constraint */ - float iklinweight; /* weight of joint stretch constraint */ + float limitmin[3], limitmax[3]; /* DOF constraint, note! - these are stored in degrees, not radians */ + float stiffness[3]; /* DOF stiffness */ + float ikstretch; + float ikrotweight; /* weight of joint rotation constraint */ + float iklinweight; /* weight of joint stretch constraint */ - void *temp; /* use for outliner */ + void *temp; /* use for outliner */ } bPoseChannel; /* PoseChannel (transform) flags */ typedef enum ePchan_Flag { - /* has transforms */ - POSE_LOC = (1<<0), - POSE_ROT = (1<<1), - POSE_SIZE = (1<<2), - /* old IK/cache stuff... */ - POSE_IK_MAT = (1<<3), - POSE_UNUSED2 = (1<<4), - POSE_UNUSED3 = (1<<5), - POSE_UNUSED4 = (1<<6), - POSE_UNUSED5 = (1<<7), - /* has Standard IK */ - POSE_HAS_IK = (1<<8), - /* IK/Pose solving*/ - POSE_CHAIN = (1<<9), - POSE_DONE = (1<<10), - /* visualisation */ - POSE_KEY = (1<<11), - POSE_STRIDE = (1<<12), - /* standard IK solving */ - POSE_IKTREE = (1<<13), - /* has Spline IK */ - POSE_HAS_IKS = (1<<14), - /* spline IK solving */ - POSE_IKSPLINE = (1<<15) + /* has transforms */ + POSE_LOC = (1 << 0), + POSE_ROT = (1 << 1), + POSE_SIZE = (1 << 2), + /* old IK/cache stuff... */ + POSE_IK_MAT = (1 << 3), + POSE_UNUSED2 = (1 << 4), + POSE_UNUSED3 = (1 << 5), + POSE_UNUSED4 = (1 << 6), + POSE_UNUSED5 = (1 << 7), + /* has Standard IK */ + POSE_HAS_IK = (1 << 8), + /* IK/Pose solving*/ + POSE_CHAIN = (1 << 9), + POSE_DONE = (1 << 10), + /* visualisation */ + POSE_KEY = (1 << 11), + POSE_STRIDE = (1 << 12), + /* standard IK solving */ + POSE_IKTREE = (1 << 13), + /* has Spline IK */ + POSE_HAS_IKS = (1 << 14), + /* spline IK solving */ + POSE_IKSPLINE = (1 << 15) } ePchan_Flag; /* PoseChannel constflag (constraint detection) */ typedef enum ePchan_ConstFlag { - PCHAN_HAS_IK = (1<<0), - PCHAN_HAS_CONST = (1<<1), - /* only used for drawing Posemode, not stored in channel */ - PCHAN_HAS_ACTION = (1<<2), - PCHAN_HAS_TARGET = (1<<3), - /* only for drawing Posemode too */ - PCHAN_HAS_STRIDE = (1<<4), - /* spline IK */ - PCHAN_HAS_SPLINEIK = (1<<5) + PCHAN_HAS_IK = (1 << 0), + PCHAN_HAS_CONST = (1 << 1), + /* only used for drawing Posemode, not stored in channel */ + PCHAN_HAS_ACTION = (1 << 2), + PCHAN_HAS_TARGET = (1 << 3), + /* only for drawing Posemode too */ + PCHAN_HAS_STRIDE = (1 << 4), + /* spline IK */ + PCHAN_HAS_SPLINEIK = (1 << 5) } ePchan_ConstFlag; /* PoseChannel->ikflag */ typedef enum ePchan_IkFlag { - BONE_IK_NO_XDOF = (1<<0), - BONE_IK_NO_YDOF = (1<<1), - BONE_IK_NO_ZDOF = (1<<2), + BONE_IK_NO_XDOF = (1 << 0), + BONE_IK_NO_YDOF = (1 << 1), + BONE_IK_NO_ZDOF = (1 << 2), - BONE_IK_XLIMIT = (1<<3), - BONE_IK_YLIMIT = (1<<4), - BONE_IK_ZLIMIT = (1<<5), - - BONE_IK_ROTCTL = (1<<6), - BONE_IK_LINCTL = (1<<7), + BONE_IK_XLIMIT = (1 << 3), + BONE_IK_YLIMIT = (1 << 4), + BONE_IK_ZLIMIT = (1 << 5), + + BONE_IK_ROTCTL = (1 << 6), + BONE_IK_LINCTL = (1 << 7), - BONE_IK_NO_XDOF_TEMP = (1<<10), - BONE_IK_NO_YDOF_TEMP = (1<<11), - BONE_IK_NO_ZDOF_TEMP = (1<<12) + BONE_IK_NO_XDOF_TEMP = (1 << 10), + BONE_IK_NO_YDOF_TEMP = (1 << 11), + BONE_IK_NO_ZDOF_TEMP = (1 << 12) } ePchan_IkFlag; /* PoseChannel->rotmode and Object->rotmode */ typedef enum eRotationModes { - /* quaternion rotations (default, and for older Blender versions) */ - ROT_MODE_QUAT = 0, - /* euler rotations - keep in sync with enum in BLI_math.h */ - ROT_MODE_EUL = 1, /* Blender 'default' (classic) - must be as 1 to sync with BLI_math_rotation.h defines */ + /* quaternion rotations (default, and for older Blender versions) */ + ROT_MODE_QUAT = 0, + /* euler rotations - keep in sync with enum in BLI_math.h */ + ROT_MODE_EUL = 1, /* Blender 'default' (classic) - must be as 1 to sync with BLI_math_rotation.h defines */ ROT_MODE_XYZ = 1, - ROT_MODE_XZY, - ROT_MODE_YXZ, - ROT_MODE_YZX, - ROT_MODE_ZXY, - ROT_MODE_ZYX, + ROT_MODE_XZY = 2, + ROT_MODE_YXZ = 3, + ROT_MODE_YZX = 4, + ROT_MODE_ZXY = 5, + ROT_MODE_ZYX = 6, /* NOTE: space is reserved here for 18 other possible * euler rotation orders not implemented */ - /* axis angle rotations */ + /* axis angle rotations */ ROT_MODE_AXISANGLE = -1, - ROT_MODE_MIN = ROT_MODE_AXISANGLE, /* sentinel for Py API */ + ROT_MODE_MIN = ROT_MODE_AXISANGLE, /* sentinel for Py API */ ROT_MODE_MAX = ROT_MODE_ZYX } eRotationModes; @@ -326,46 +326,46 @@ typedef enum eRotationModes { * though there is a define for it (hack for the outliner). */ typedef struct bPose { - ListBase chanbase; /* list of pose channels, PoseBones in RNA */ - struct GHash *chanhash; /* ghash for quicker string lookups */ + ListBase chanbase; /* list of pose channels, PoseBones in RNA */ + struct GHash *chanhash; /* ghash for quicker string lookups */ short flag, pad; - unsigned int proxy_layer; /* proxy layer: copy from armature, gets synced */ + 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 */ - float cyclic_offset[3]; /* result of match and cycles, applied in BKE_pose_where_is() */ + float ctime; /* local action time of this pose */ + float stride_offset[3]; /* applied to object */ + float cyclic_offset[3]; /* result of match and cycles, applied in BKE_pose_where_is() */ - ListBase agroups; /* list of bActionGroups */ + ListBase agroups; /* list of bActionGroups */ - int active_group; /* index of active group (starts from 1) */ - int iksolver; /* ik solver to use, see ePose_IKSolverType */ - void *ikdata; /* temporary IK data, depends on the IK solver. Not saved in file */ - void *ikparam; /* IK solver parameters, structure depends on iksolver */ + int active_group; /* index of active group (starts from 1) */ + int iksolver; /* ik solver to use, see ePose_IKSolverType */ + void *ikdata; /* temporary IK data, depends on the IK solver. Not saved in file */ + void *ikparam; /* IK solver parameters, structure depends on iksolver */ - bAnimVizSettings avs; /* settings for visualization of bone animation */ + bAnimVizSettings avs; /* settings for visualization of bone animation */ char proxy_act_bone[64]; /* proxy active bone name, MAXBONENAME */ } bPose; /* Pose->flag */ typedef enum ePose_Flags { - /* results in BKE_pose_rebuild being called */ - POSE_RECALC = (1<<0), - /* prevents any channel from getting overridden by anim from IPO */ - POSE_LOCKED = (1<<1), - /* clears the POSE_LOCKED flag for the next time the pose is evaluated */ - POSE_DO_UNLOCK = (1<<2), - /* pose has constraints which depend on time (used when depsgraph updates for a new frame) */ - POSE_CONSTRAINTS_TIMEDEPEND = (1<<3), - /* recalculate bone paths */ - POSE_RECALCPATHS = (1<<4), - /* set by BKE_pose_rebuild 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) + /* results in BKE_pose_rebuild being called */ + POSE_RECALC = (1 << 0), + /* prevents any channel from getting overridden by anim from IPO */ + POSE_LOCKED = (1 << 1), + /* clears the POSE_LOCKED flag for the next time the pose is evaluated */ + POSE_DO_UNLOCK = (1 << 2), + /* pose has constraints which depend on time (used when depsgraph updates for a new frame) */ + POSE_CONSTRAINTS_TIMEDEPEND = (1 << 3), + /* recalculate bone paths */ + POSE_RECALCPATHS = (1 << 4), + /* set by BKE_pose_rebuild 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) } ePose_Flags; /* IK Solvers ------------------------------------ */ @@ -378,37 +378,37 @@ typedef enum ePose_IKSolverType { /* header for all bPose->ikparam structures */ typedef struct bIKParam { - int iksolver; + int iksolver; } bIKParam; /* bPose->ikparam when bPose->iksolver=1 */ typedef struct bItasc { - int iksolver; + int iksolver; float precision; short numiter; short numstep; float minstep; float maxstep; - short solver; + short solver; short flag; float feedback; - float maxvel; /* max velocity to SDLS solver */ - float dampmax; /* maximum damping for DLS solver */ - float dampeps; /* threshold of singular value from which the damping start progressively */ + float maxvel; /* max velocity to SDLS solver */ + float dampmax; /* maximum damping for DLS solver */ + float dampeps; /* threshold of singular value from which the damping start progressively */ } bItasc; /* bItasc->flag */ typedef enum eItasc_Flags { - ITASC_AUTO_STEP = (1<<0), - ITASC_INITIAL_REITERATION = (1<<1), - ITASC_REITERATION = (1<<2), - ITASC_SIMULATION = (1<<3) + ITASC_AUTO_STEP = (1 << 0), + ITASC_INITIAL_REITERATION = (1 << 1), + ITASC_REITERATION = (1 << 2), + ITASC_SIMULATION = (1 << 3) } eItasc_Flags; /* bItasc->solver */ typedef enum eItasc_Solver { - ITASC_SOLVER_SDLS = 0, /* selective damped least square, suitable for CopyPose constraint */ - ITASC_SOLVER_DLS /* damped least square with numerical filtering of damping */ + ITASC_SOLVER_SDLS = 0, /* selective damped least square, suitable for CopyPose constraint */ + ITASC_SOLVER_DLS = 1, /* damped least square with numerical filtering of damping */ } eItasc_Solver; /* ************************************************ */ @@ -434,34 +434,34 @@ typedef enum eItasc_Solver { typedef struct bActionGroup { struct bActionGroup *next, *prev; - ListBase channels; /* Note: this must not be touched by standard listbase functions which would clear links to other channels */ + ListBase channels; /* Note: this must not be touched by standard listbase functions which would clear links to other channels */ - int flag; /* settings for this action-group */ - int customCol; /* index of custom color set to use when used for bones (0=default - used for all old files, -1=custom set) */ - char name[64]; /* name of the group */ + int flag; /* settings for this action-group */ + int customCol; /* index of custom color set to use when used for bones (0=default - used for all old files, -1=custom set) */ + char name[64]; /* name of the group */ - ThemeWireColor cs; /* color set to use when customCol == -1 */ + ThemeWireColor cs; /* color set to use when customCol == -1 */ } bActionGroup; /* Action Group flags */ typedef enum eActionGroup_Flag { - /* group is selected */ - AGRP_SELECTED = (1<<0), - /* group is 'active' / last selected one */ - AGRP_ACTIVE = (1<<1), - /* keyframes/channels belonging to it cannot be edited */ - AGRP_PROTECTED = (1<<2), - /* for UI (DopeSheet), sub-channels are shown */ - AGRP_EXPANDED = (1<<3), - /* sub-channels are not evaluated */ - AGRP_MUTED = (1<<4), - /* sub-channels are not visible in Graph Editor */ - AGRP_NOTVISIBLE = (1<<5), - /* for UI (Graph Editor), sub-channels are shown */ - AGRP_EXPANDED_G = (1<<6), - - AGRP_TEMP = (1<<30), - AGRP_MOVED = (1<<31) + /* group is selected */ + AGRP_SELECTED = (1 << 0), + /* group is 'active' / last selected one */ + AGRP_ACTIVE = (1 << 1), + /* keyframes/channels belonging to it cannot be edited */ + AGRP_PROTECTED = (1 << 2), + /* for UI (DopeSheet), sub-channels are shown */ + AGRP_EXPANDED = (1 << 3), + /* sub-channels are not evaluated */ + AGRP_MUTED = (1 << 4), + /* sub-channels are not visible in Graph Editor */ + AGRP_NOTVISIBLE = (1 << 5), + /* for UI (Graph Editor), sub-channels are shown */ + AGRP_EXPANDED_G = (1 << 6), + + AGRP_TEMP = (1 << 30), + AGRP_MOVED = (1 << 31) } eActionGroup_Flag; @@ -478,31 +478,31 @@ typedef enum eActionGroup_Flag { * affects a group of related settings (as defined by the user). */ typedef struct bAction { - ID id; /* ID-serialisation for relinking */ + ID id; /* ID-serialisation for relinking */ - ListBase curves; /* function-curves (FCurve) */ - ListBase chanbase; /* legacy data - Action Channels (bActionChannel) in pre-2.5 animation system */ - ListBase groups; /* groups of function-curves (bActionGroup) */ - ListBase markers; /* markers local to the Action (used to provide Pose-Libraries) */ + ListBase curves; /* function-curves (FCurve) */ + ListBase chanbase; /* legacy data - Action Channels (bActionChannel) in pre-2.5 animation system */ + ListBase groups; /* groups of function-curves (bActionGroup) */ + ListBase markers; /* markers local to the Action (used to provide Pose-Libraries) */ - int flag; /* settings for this action */ - int active_marker; /* index of the active marker */ + int flag; /* settings for this action */ + int active_marker; /* index of the active marker */ - int idroot; /* type of ID-blocks that action can be assigned to (if 0, will be set to whatever ID first evaluates it) */ + int idroot; /* type of ID-blocks that action can be assigned to (if 0, will be set to whatever ID first evaluates it) */ int pad; } bAction; /* Flags for the action */ typedef enum eAction_Flags { - /* flags for displaying in UI */ - ACT_COLLAPSED = (1<<0), - ACT_SELECTED = (1<<1), - - /* flags for evaluation/editing */ - ACT_MUTED = (1<<9), - ACT_PROTECTED = (1<<10), - ACT_DISABLED = (1<<11) + /* flags for displaying in UI */ + ACT_COLLAPSED = (1 << 0), + ACT_SELECTED = (1 << 1), + + /* flags for evaluation/editing */ + ACT_MUTED = (1 << 9), + ACT_PROTECTED = (1 << 10), + ACT_DISABLED = (1 << 11) } eAction_Flags; @@ -511,68 +511,68 @@ typedef enum eAction_Flags { /* Storage for Dopesheet/Grease-Pencil Editor data */ typedef struct bDopeSheet { - ID *source; /* currently ID_SCE (for Dopesheet), and ID_SC (for Grease Pencil) */ - ListBase chanbase; /* cache for channels (only initialized when pinned) */ // XXX not used! + ID *source; /* currently ID_SCE (for Dopesheet), and ID_SC (for Grease Pencil) */ + ListBase chanbase; /* cache for channels (only initialized when pinned) */ // XXX not used! - struct Group *filter_grp; /* object group for ADS_FILTER_ONLYOBGROUP filtering option */ - char searchstr[64]; /* string to search for in displayed names of F-Curves for ADS_FILTER_BY_FCU_NAME filtering option */ + struct Group *filter_grp; /* object group for ADS_FILTER_ONLYOBGROUP filtering option */ + char searchstr[64]; /* string to search for in displayed names of F-Curves for ADS_FILTER_BY_FCU_NAME filtering option */ - int filterflag; /* flags to use for filtering data */ - int flag; /* standard flags */ + int filterflag; /* flags to use for filtering data */ + int flag; /* standard flags */ - int renameIndex; /* index+1 of channel to rename - only gets set by renaming operator */ + int renameIndex; /* index+1 of channel to rename - only gets set by renaming operator */ int pad; } bDopeSheet; /* DopeSheet filter-flag */ typedef enum eDopeSheet_FilterFlag { - /* general filtering */ - ADS_FILTER_ONLYSEL = (1<<0), /* only include channels relating to selected data */ - - /* temporary filters */ - ADS_FILTER_ONLYDRIVERS = (1<<1), /* for 'Drivers' editor - only include Driver data from AnimData */ - ADS_FILTER_ONLYNLA = (1<<2), /* for 'NLA' editor - only include NLA data from AnimData */ - ADS_FILTER_SELEDIT = (1<<3), /* for Graph Editor - used to indicate whether to include a filtering flag or not */ - - /* general filtering 2 */ - ADS_FILTER_SUMMARY = (1<<4), /* for 'DopeSheet' Editors - include 'summary' line */ - ADS_FILTER_ONLYOBGROUP = (1<<5), /* only the objects in the specified object group get used */ - - /* datatype-based filtering */ - ADS_FILTER_NOSHAPEKEYS = (1<<6), - ADS_FILTER_NOMESH = (1<<7), - ADS_FILTER_NOOBJ = (1<<8), /* for animdata on object level, if we only want to concentrate on materials/etc. */ - ADS_FILTER_NOLAT = (1<<9), - ADS_FILTER_NOCAM = (1<<10), - ADS_FILTER_NOMAT = (1<<11), - ADS_FILTER_NOLAM = (1<<12), - ADS_FILTER_NOCUR = (1<<13), - ADS_FILTER_NOWOR = (1<<14), - ADS_FILTER_NOSCE = (1<<15), - ADS_FILTER_NOPART = (1<<16), - ADS_FILTER_NOMBA = (1<<17), - ADS_FILTER_NOARM = (1<<18), - ADS_FILTER_NONTREE = (1<<19), - ADS_FILTER_NOTEX = (1<<20), - ADS_FILTER_NOSPK = (1<<21), - ADS_FILTER_NOLINESTYLE = (1<<22), - - /* NLA-specific filters */ - ADS_FILTER_NLA_NOACT = (1<<25), /* if the AnimData block has no NLA data, don't include to just show Action-line */ - - /* general filtering 3 */ - ADS_FILTER_INCL_HIDDEN = (1<<26), /* include 'hidden' channels too (i.e. those from hidden Objects/Bones) */ - ADS_FILTER_BY_FCU_NAME = (1<<27), /* for F-Curves, filter by the displayed name (i.e. to isolate all Location curves only) */ - - /* 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_NOSPK) + /* general filtering */ + ADS_FILTER_ONLYSEL = (1 << 0), /* only include channels relating to selected data */ + + /* temporary filters */ + ADS_FILTER_ONLYDRIVERS = (1 << 1), /* for 'Drivers' editor - only include Driver data from AnimData */ + ADS_FILTER_ONLYNLA = (1 << 2), /* for 'NLA' editor - only include NLA data from AnimData */ + ADS_FILTER_SELEDIT = (1 << 3), /* for Graph Editor - used to indicate whether to include a filtering flag or not */ + + /* general filtering 2 */ + ADS_FILTER_SUMMARY = (1 << 4), /* for 'DopeSheet' Editors - include 'summary' line */ + ADS_FILTER_ONLYOBGROUP = (1 << 5), /* only the objects in the specified object group get used */ + + /* datatype-based filtering */ + ADS_FILTER_NOSHAPEKEYS = (1 << 6), + ADS_FILTER_NOMESH = (1 << 7), + ADS_FILTER_NOOBJ = (1 << 8), /* for animdata on object level, if we only want to concentrate on materials/etc. */ + ADS_FILTER_NOLAT = (1 << 9), + ADS_FILTER_NOCAM = (1 << 10), + ADS_FILTER_NOMAT = (1 << 11), + ADS_FILTER_NOLAM = (1 << 12), + ADS_FILTER_NOCUR = (1 << 13), + ADS_FILTER_NOWOR = (1 << 14), + ADS_FILTER_NOSCE = (1 << 15), + ADS_FILTER_NOPART = (1 << 16), + ADS_FILTER_NOMBA = (1 << 17), + ADS_FILTER_NOARM = (1 << 18), + ADS_FILTER_NONTREE = (1 << 19), + ADS_FILTER_NOTEX = (1 << 20), + ADS_FILTER_NOSPK = (1 << 21), + ADS_FILTER_NOLINESTYLE = (1 << 22), + + /* NLA-specific filters */ + ADS_FILTER_NLA_NOACT = (1 << 25), /* if the AnimData block has no NLA data, don't include to just show Action-line */ + + /* general filtering 3 */ + ADS_FILTER_INCL_HIDDEN = (1 << 26), /* include 'hidden' channels too (i.e. those from hidden Objects/Bones) */ + ADS_FILTER_BY_FCU_NAME = (1 << 27), /* for F-Curves, filter by the displayed name (i.e. to isolate all Location curves only) */ + + /* 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_NOSPK) } 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_SHOW_DBFILTERS = (1<<1) /* show filters for datablocks */ + ADS_FLAG_SUMMARY_COLLAPSED = (1 << 0), /* when summary is shown, it is collapsed, so all other channels get hidden */ + ADS_FLAG_SHOW_DBFILTERS = (1 << 1) /* show filters for datablocks */ } eDopeSheet_Flag; @@ -580,72 +580,74 @@ typedef enum eDopeSheet_Flag { /* Action Editor Space. This is defined here instead of in DNA_space_types.h */ typedef struct SpaceAction { struct SpaceLink *next, *prev; - ListBase regionbase; /* storage of regions for inactive spaces */ + ListBase regionbase; /* storage of regions for inactive spaces */ int spacetype; float blockscale; short blockhandler[8]; - View2D v2d DNA_DEPRECATED; /* copied to region */ + View2D v2d DNA_DEPRECATED; /* copied to region */ - bAction *action; /* the currently active action */ - bDopeSheet ads; /* the currently active context (when not showing action) */ + bAction *action; /* the currently active action */ + bDopeSheet ads; /* the currently active context (when not showing action) */ - char mode, autosnap; /* mode: editing context; autosnap: automatic keyframe snapping mode */ - short flag; /* flag: bitmapped settings; */ - float timeslide; /* for Time-Slide transform mode drawing - current frame? */ + char mode, autosnap; /* mode: editing context; autosnap: automatic keyframe snapping mode */ + short flag; /* flag: bitmapped settings; */ + float timeslide; /* for Time-Slide transform mode drawing - current frame? */ } SpaceAction; /* SpaceAction flag */ typedef enum eSAction_Flag { - /* during transform (only set for TimeSlide) */ - SACTION_MOVING = (1<<0), - /* show sliders */ - SACTION_SLIDERS = (1<<1), - /* draw time in seconds instead of time in frames */ - SACTION_DRAWTIME = (1<<2), - /* don't filter action channels according to visibility */ + /* during transform (only set for TimeSlide) */ + SACTION_MOVING = (1 << 0), + /* show sliders */ + SACTION_SLIDERS = (1 << 1), + /* draw time in seconds instead of time in frames */ + SACTION_DRAWTIME = (1 << 2), + /* don't filter action channels according to visibility */ //SACTION_NOHIDE = (1<<3), // XXX depreceated... old animation system - /* don't kill overlapping keyframes after transform */ - SACTION_NOTRANSKEYCULL = (1<<4), - /* don't include keyframes that are out of view */ + /* don't kill overlapping keyframes after transform */ + SACTION_NOTRANSKEYCULL = (1 << 4), + /* don't include keyframes that are out of view */ //SACTION_HORIZOPTIMISEON = (1<<5), // XXX depreceated... old irrelevant trick - /* 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), - /* don't draw current frame number beside frame indicator */ - SACTION_NODRAWCFRANUM = (1<<8), - /* temporary flag to force channel selections to be synced with main */ - SACTION_TEMP_NEEDCHANSYNC = (1<<9), - /* don't perform realtime updates */ - SACTION_NOREALTIMEUPDATES = (1<<10), - /* move markers as well as keyframes */ - SACTION_MARKERS_MOVE = (1<<11) + /* 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), + /* don't draw current frame number beside frame indicator */ + SACTION_NODRAWCFRANUM = (1 << 8), + /* temporary flag to force channel selections to be synced with main */ + SACTION_TEMP_NEEDCHANSYNC = (1 << 9), + /* don't perform realtime updates */ + SACTION_NOREALTIMEUPDATES = (1 << 10), + /* move markers as well as keyframes */ + SACTION_MARKERS_MOVE = (1 << 11) } eSAction_Flag; /* SpaceAction Mode Settings */ typedef enum eAnimEdit_Context { - /* action on the active object */ - SACTCONT_ACTION = 0, - /* list of all shapekeys on the active object, linked with their F-Curves */ - SACTCONT_SHAPEKEY, - /* editing of gpencil data */ - SACTCONT_GPENCIL, - /* dopesheet (default) */ - SACTCONT_DOPESHEET + /* action on the active object */ + SACTCONT_ACTION = 0, + /* list of all shapekeys on the active object, linked with their F-Curves */ + SACTCONT_SHAPEKEY = 1, + /* editing of gpencil data */ + SACTCONT_GPENCIL = 2, + /* dopesheet (default) */ + SACTCONT_DOPESHEET = 3, + /* mask */ + SACTCONT_MASK = 4 } eAnimEdit_Context; /* SpaceAction AutoSnap Settings (also used by other Animation Editors) */ typedef enum eAnimEdit_AutoSnap { - /* no auto-snap */ - SACTSNAP_OFF = 0, - /* snap to 1.0 frame/second intervals */ - SACTSNAP_STEP, - /* snap to actual frames/seconds (nla-action time) */ - SACTSNAP_FRAME, - /* snap to nearest marker */ - SACTSNAP_MARKER + /* no auto-snap */ + SACTSNAP_OFF = 0, + /* snap to 1.0 frame/second intervals */ + SACTSNAP_STEP = 1, + /* snap to actual frames/seconds (nla-action time) */ + SACTSNAP_FRAME = 2, + /* snap to nearest marker */ + SACTSNAP_MARKER = 3 } eAnimEdit_AutoSnap; @@ -653,7 +655,7 @@ typedef enum eAnimEdit_AutoSnap { /* Legacy Data */ /* WARNING: Action Channels are now depreceated... they were part of the old animation system! - * (ONLY USED FOR DO_VERSIONS...) + * (ONLY USED FOR DO_VERSIONS...) * * Action Channels belong to Actions. They are linked with an IPO block, and can also own * Constraint Channels in certain situations. @@ -664,27 +666,27 @@ typedef enum eAnimEdit_AutoSnap { * to the position of the group in the list, and their position within the group. */ typedef struct bActionChannel { - struct bActionChannel *next, *prev; - bActionGroup *grp; /* Action Group this Action Channel belongs to */ + struct bActionChannel *next, *prev; + bActionGroup *grp; /* Action Group this Action Channel belongs to */ - struct Ipo *ipo; /* IPO block this action channel references */ - ListBase constraintChannels; /* Constraint Channels (when Action Channel represents an Object or Bone) */ + struct Ipo *ipo; /* IPO block this action channel references */ + ListBase constraintChannels; /* Constraint Channels (when Action Channel represents an Object or Bone) */ - int flag; /* settings accessed via bitmapping */ - char name[64]; /* channel name, MAX_NAME */ - int temp; /* temporary setting - may be used to indicate group that channel belongs to during syncing */ + int flag; /* settings accessed via bitmapping */ + char name[64]; /* channel name, MAX_NAME */ + int temp; /* temporary setting - may be used to indicate group that channel belongs to during syncing */ } bActionChannel; /* Action Channel flags (ONLY USED FOR DO_VERSIONS...) */ typedef enum ACHAN_FLAG { - ACHAN_SELECTED = (1<<0), - ACHAN_HILIGHTED = (1<<1), - ACHAN_HIDDEN = (1<<2), - ACHAN_PROTECTED = (1<<3), - ACHAN_EXPANDED = (1<<4), - ACHAN_SHOWIPO = (1<<5), - ACHAN_SHOWCONS = (1<<6), - ACHAN_MOVED = (1<<31) + ACHAN_SELECTED = (1 << 0), + ACHAN_HILIGHTED = (1 << 1), + ACHAN_HIDDEN = (1 << 2), + ACHAN_PROTECTED = (1 << 3), + ACHAN_EXPANDED = (1 << 4), + ACHAN_SHOWIPO = (1 << 5), + ACHAN_SHOWCONS = (1 << 6), + 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 f4e06455c63..4a5ad69cb91 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -62,8 +62,7 @@ typedef struct bActionActuator { float layer_weight; /* How much of the previous layer to use for blending. (<0 = disable, 0 = add mode) */ } bActionActuator; -typedef struct Sound3D -{ +typedef struct Sound3D { float min_gain; float max_gain; float reference_distance; diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index fd8b08e68c6..4928a88b33e 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -44,8 +44,7 @@ * variables with different names to minimize confusion. */ -typedef struct ClothSimSettings -{ +typedef struct ClothSimSettings { struct LinkNode *cache; /* UNUSED atm */ float mingoal; /* see SB */ float Cdis; /* Mechanical damping of springs. */ @@ -83,14 +82,13 @@ typedef struct ClothSimSettings short shapekey_rest; /* vertex group for scaling structural stiffness */ short presets; /* used for presets on GUI */ short reset; - short pad; + short pad; struct EffectorWeights *effector_weights; } ClothSimSettings; -typedef struct ClothCollSettings -{ +typedef struct ClothCollSettings { struct LinkNode *collision_list; /* e.g. pointer to temp memory for collisions */ float epsilon; /* min distance for collisions. */ float self_friction; /* Fiction/damping with self contact. */ @@ -101,6 +99,9 @@ typedef struct ClothCollSettings short self_loop_count; /* How many iterations for the selfcollision loop */ short loop_count; /* How many iterations for the collision loop. */ struct Group *group; /* Only use colliders from this group of objects */ + short vgroup_selfcol; /* vgroup to paint which vertices are used for self collisions */ + short pad; + int pad2; } ClothCollSettings; diff --git a/source/blender/makesdna/DNA_color_types.h b/source/blender/makesdna/DNA_color_types.h index 676389ffeea..99e2a123fe7 100644 --- a/source/blender/makesdna/DNA_color_types.h +++ b/source/blender/makesdna/DNA_color_types.h @@ -96,22 +96,36 @@ typedef enum CurveMappingPreset { } CurveMappingPreset; /* histogram->mode */ -#define HISTO_MODE_LUMA 0 -#define HISTO_MODE_RGB 1 -#define HISTO_MODE_R 2 -#define HISTO_MODE_G 3 -#define HISTO_MODE_B 4 +enum { + HISTO_MODE_LUMA = 0, + HISTO_MODE_RGB = 1, + HISTO_MODE_R = 2, + HISTO_MODE_G = 3, + HISTO_MODE_B = 4, + HISTO_MODE_ALPHA = 5 +}; + +enum { + HISTO_FLAG_LINE = (1 << 0), + HISTO_FLAG_SAMPLELINE = (1 << 1) +}; typedef struct Histogram { int channels; int x_resolution; + float data_luma[256]; float data_r[256]; float data_g[256]; float data_b[256]; - float data_luma[256]; + float data_a[256]; float xmax, ymax; - int mode; + short mode; + short flag; int height; + + /* sample line only */ + /* image coords src -> dst */ + float co[2][2]; } Histogram; struct ImBuf; diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index 7a2d2929e47..59d8e81de39 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -380,7 +380,7 @@ typedef struct bRotLimitConstraint { short flag2; } bRotLimitConstraint; -/* Limit Scaling Constraint */ +/* Limit Scale Constraint */ typedef struct bSizeLimitConstraint { float xmin, xmax; float ymin, ymax; diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h index dfc70e5bd66..f6c4822bb55 100644 --- a/source/blender/makesdna/DNA_image_types.h +++ b/source/blender/makesdna/DNA_image_types.h @@ -65,6 +65,7 @@ typedef struct ImageUser { #define IMA_ANIM_ALWAYS 1 #define IMA_ANIM_REFRESHED 2 /* #define IMA_DO_PREMUL 4 */ +#define IMA_NEED_FRAME_RECALC 8 typedef struct Image { ID id; diff --git a/source/blender/makesdna/DNA_listBase.h b/source/blender/makesdna/DNA_listBase.h index 35549aee3d2..333e414278d 100644 --- a/source/blender/makesdna/DNA_listBase.h +++ b/source/blender/makesdna/DNA_listBase.h @@ -41,22 +41,19 @@ extern "C" { #endif /* generic - all structs which are used in linked-lists used this */ -typedef struct Link -{ +typedef struct Link { struct Link *next, *prev; } Link; /* use this when it is not worth defining a custom one... */ -typedef struct LinkData -{ +typedef struct LinkData { struct LinkData *next, *prev; void *data; } LinkData; /* never change the size of this! genfile.c detects pointerlen with it */ -typedef struct ListBase -{ +typedef struct ListBase { void *first, *last; } ListBase; diff --git a/source/blender/makesdna/DNA_mask_types.h b/source/blender/makesdna/DNA_mask_types.h new file mode 100644 index 00000000000..20701f9adc0 --- /dev/null +++ b/source/blender/makesdna/DNA_mask_types.h @@ -0,0 +1,191 @@ +/* + * ***** 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) 2012 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Blender Foundation, + * Sergey Sharybin + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file DNA_mask_types.h + * \ingroup DNA + * \since march-2012 + * \author Sergey Sharybin + */ + +#ifndef __DNA_MASK_TYPES_H__ +#define __DNA_MASK_TYPES_H__ + +#include "DNA_defs.h" +#include "DNA_ID.h" +#include "DNA_listBase.h" +#include "DNA_curve_types.h" + +typedef struct Mask { + ID id; + struct AnimData *adt; + ListBase masklayers; /* mask layers */ + int masklay_act; /* index of active mask layer (-1 == None) */ + int masklay_tot; /* total number of mask layers */ + + int sfra, efra; /* frames, used by the sequencer */ + + int flag; /* for anim info */ + int pad; +} Mask; + +typedef struct MaskParent { + // int flag; /* parenting flags */ /* not used */ + int pad; + int id_type; /* type of parenting */ + ID *id; /* ID block of entity to which mask/spline is parented to + * in case of parenting to movie tracking data set to MovieClip datablock */ + char parent[64]; /* entity of parent to which parenting happened + * in case of parenting to movie tracking data contains name of layer */ + char sub_parent[64]; /* sub-entity of parent to which parenting happened + * in case of parenting to movie tracking data contains name of track */ + float parent_orig[2]; /* track location at the moment of parenting */ +} MaskParent; + +typedef struct MaskSplinePointUW { + float u, w; /* u coordinate along spline segment and weight of this point */ + int flag; /* different flags of this point */ +} MaskSplinePointUW; + +typedef struct MaskSplinePoint { + BezTriple bezt; /* actual point coordinates and it's handles */ + int pad; + int tot_uw; /* number of uv feather values */ + MaskSplinePointUW *uw; /* feather UV values */ + MaskParent parent; /* parenting information of particular spline point */ +} MaskSplinePoint; + +typedef struct MaskSpline { + struct MaskSpline *next, *prev; + + int flag; /* defferent spline flag (closed, ...) */ + int tot_point; /* total number of points */ + MaskSplinePoint *points; /* points which defines spline itself */ + MaskParent parent; /* parenting information of the whole spline */ + + int weight_interp, pad; /* weight interpolation */ + + MaskSplinePoint *points_deform; /* deformed copy of 'points' BezTriple data - not saved */ +} MaskSpline; + +/* one per frame */ +typedef struct MaskLayerShape { + struct MaskLayerShape *next, *prev; + + float *data; /* u coordinate along spline segment and weight of this point */ + int tot_vert; /* to ensure no buffer overruns's: alloc size is (tot_vert * MASK_OBJECT_SHAPE_ELEM_SIZE) */ + int frame; /* different flags of this point */ + char flag; /* animation flag */ + char pad[7]; +} MaskLayerShape; + +/* cast to this for convenience, not saved */ +#define MASK_OBJECT_SHAPE_ELEM_SIZE 8 /* 3x 2D points + weight + radius == 8 */ + +# +# +typedef struct MaskLayerShapeElem { + float value[MASK_OBJECT_SHAPE_ELEM_SIZE]; +} MaskLayerShapeElem; + +typedef struct MaskLayer { + struct MaskLayer *next, *prev; + + char name[64]; /* name of the mask layer (64 = MAD_ID_NAME - 2) */ + + ListBase splines; /* list of splines which defines this mask layer */ + ListBase splines_shapes; + + struct MaskSpline *act_spline; /* active spline */ + struct MaskSplinePoint *act_point; /* active point */ + + /* blending options */ + float alpha; + char blend; + char blend_flag; + + char flag; /* for animation */ + char restrictflag; /* matching 'Object' flag of the same name - eventually use in the outliner */ +} MaskLayer; + +/* MaskParent->flag */ +/* #define MASK_PARENT_ACTIVE (1 << 0) */ /* UNUSED */ + +/* MaskSpline->flag */ +/* reserve (1 << 0) for SELECT */ +#define MASK_SPLINE_CYCLIC (1 << 1) + +/* MaskSpline->weight_interp */ +#define MASK_SPLINE_INTERP_LINEAR 1 +#define MASK_SPLINE_INTERP_EASE 2 + +/* ob->restrictflag */ +#define MASK_RESTRICT_VIEW 1 +#define MASK_RESTRICT_SELECT 2 +#define MASK_RESTRICT_RENDER 4 + +/* SpaceClip->mask_draw_flag */ +#define MASK_DRAWFLAG_SMOOTH 1 + +/* copy of eSpaceImage_UVDT */ +/* SpaceClip->mask_draw_type */ +enum { + MASK_DT_OUTLINE = 0, + MASK_DT_DASH, + MASK_DT_BLACK, + MASK_DT_WHITE +}; + +/* masklay->blend */ +enum { + MASK_BLEND_ADD = 0, + MASK_BLEND_SUBTRACT = 1 +}; + +/* masklay->blend_flag */ +enum { + MASK_BLENDFLAG_INVERT = (1 << 0) +}; + +/* masklay->flag */ +enum { + MASK_LAYERFLAG_LOCKED = (1 << 4), + MASK_LAYERFLAG_SELECT = (1 << 5) +}; + +/* masklay_shape->flag */ +enum { + MASK_SHAPE_SELECT = (1 << 0) +}; + + +/* mask->flag */ +enum { + MASK_ANIMF_EXPAND = (1 << 4) +}; + +#endif // __DNA_MASK_TYPES_H__ diff --git a/source/blender/makesdna/DNA_movieclip_types.h b/source/blender/makesdna/DNA_movieclip_types.h index f073a1957dc..b9d63167700 100644 --- a/source/blender/makesdna/DNA_movieclip_types.h +++ b/source/blender/makesdna/DNA_movieclip_types.h @@ -85,11 +85,16 @@ typedef struct MovieClip { int flag; int len; /* length of movie */ + + int start_frame, pad; } MovieClip; typedef struct MovieClipScopes { int ok; /* 1 means scopes are ok and recalculation is unneeded */ int track_preview_height; /* height of track preview widget */ + int frame_width, frame_height; /* width and height of frame for which scopes are calculated */ + struct MovieTrackingMarker undist_marker; /* undistorted position of marker used for pattern sampling */ + struct ImBuf *track_search; /* search area of a track */ struct ImBuf *track_preview; /* ImBuf displayed in track preview */ float track_pos[2]; /* sub-pizel position of marker in track ImBuf */ short track_disabled; /* active track is disabled, special notifier should be drawn */ @@ -121,6 +126,7 @@ typedef struct MovieClipScopes { /* MovieClip->flag */ #define MCLIP_USE_PROXY (1<<0) #define MCLIP_USE_PROXY_CUSTOM_DIR (1<<1) +/*#define MCLIP_CUSTOM_START_FRAME (1<<2)*/ /* UNUSED */ #define MCLIP_TIMECODE_FLAGS (MCLIP_USE_PROXY|MCLIP_USE_PROXY_CUSTOM_DIR) diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 5b87ecc44ae..5be7688d714 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -241,6 +241,14 @@ typedef struct bNodeLink { #define NTREE_QUALITY_MEDIUM 1 #define NTREE_QUALITY_LOW 2 +/* tree->chunksize */ +#define NTREE_CHUNCKSIZE_32 32 +#define NTREE_CHUNCKSIZE_64 64 +#define NTREE_CHUNCKSIZE_128 128 +#define NTREE_CHUNCKSIZE_256 256 +#define NTREE_CHUNCKSIZE_512 512 +#define NTREE_CHUNCKSIZE_1024 1024 + /* the basis for a Node tree, all links and nodes reside internal here */ /* only re-usable node trees are in the library though, materials and textures allocate own tree struct */ typedef struct bNodeTree { @@ -563,6 +571,7 @@ typedef struct NodeTexSky { typedef struct NodeTexImage { NodeTexBase base; + ImageUser iuser; int color_space, pad; } NodeTexImage; @@ -572,6 +581,7 @@ typedef struct NodeTexChecker { typedef struct NodeTexEnvironment { NodeTexBase base; + ImageUser iuser; int color_space, projection; } NodeTexEnvironment; diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 44d7ec660f2..24d33b49db2 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -301,6 +301,15 @@ typedef struct DupliObject { short type; /* from Object.transflag */ char no_draw, animated; + + /* Lowest-level particle index. + * Note: This is needed for particle info in shaders. + * Otherwise dupli groups in particle systems would override the + * index value from higher dupli levels. Would be nice to have full generic access + * to all dupli levels somehow, but for now this should cover most use-cases. + */ + int particle_index; + int pad; } DupliObject; /* **************** OBJECT ********************* */ diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h index f5d525d47b5..0853df87a35 100644 --- a/source/blender/makesdna/DNA_particle_types.h +++ b/source/blender/makesdna/DNA_particle_types.h @@ -234,8 +234,8 @@ typedef struct ParticleSettings { struct PartDeflect *pd2; } ParticleSettings; -typedef struct ParticleSystem -{ /* note1: make sure all (runtime) are NULL's in 'copy_particlesystem' XXX, this function is no more! - need to invstigate */ +typedef struct ParticleSystem { + /* note1: make sure all (runtime) are NULL's in 'copy_particlesystem' XXX, this function is no more! - need to invstigate */ /* note2: make sure any uses of this struct in DNA are accounted for in 'BKE_object_copy_particlesystems' */ struct ParticleSystem *next, *prev; diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 5cdd3fbd183..eb6742aa9f9 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1008,7 +1008,8 @@ typedef struct ToolSettings { short snap_flag, snap_target; short proportional, prop_mode; char proportional_objects; /* proportional edit, object mode */ - char pad[5]; + char proportional_mask; /* proportional edit, object mode */ + char pad[4]; char auto_normalize; /*auto normalizing mode in wpaint*/ char multipaint; /* paint multiple bones in wpaint */ diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index b4dc40a81c3..161c448476d 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -72,7 +72,7 @@ typedef struct StripColorBalance { } StripColorBalance; typedef struct StripProxy { - char dir[768]; // custom directory for index and proxy files + char dir[768]; // custom directory for index and proxy files // (defaults to BL_proxy) char file[256]; // custom file @@ -81,7 +81,7 @@ typedef struct StripProxy { short tc; // time code in use short quality; // proxy build quality - short build_size_flags;// size flags (see below) of all proxies + short build_size_flags; // size flags (see below) of all proxies // to build short build_tc_flags; // time code flags (see below) of all tc indices // to build @@ -110,28 +110,29 @@ typedef struct Sequence { void *lib; /* needed (to be like ipo), else it will raise libdata warnings, this should never be used */ char name[64]; /* SEQ_NAME_MAXSTR - name, set by default and needs to be unique, for RNA paths */ - int flag, type; /*flags bitmap (see below) and the type of sequence*/ + int flag, type; /*flags bitmap (see below) and the type of sequence*/ int len; /* the length of the contents of this strip - before handles are applied */ int start, startofs, endofs; int startstill, endstill; int machine, depth; /*machine - the strip channel, depth - the depth in the sequence when dealing with metastrips */ - int startdisp, enddisp; /*starting and ending points in the sequence*/ + int startdisp, enddisp; /*starting and ending points in the sequence*/ float sat; float mul, handsize; short anim_preseek; - short streamindex; /* streamindex for movie or sound files with several streams */ + short streamindex; /* streamindex for movie or sound files with several streams */ int multicam_source; /* for multicam source selection */ - int clip_flag; /* MOVIECLIP render flags */ + int clip_flag; /* MOVIECLIP render flags */ Strip *strip; - struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ + struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ struct Scene *scene; struct Object *scene_camera; /* override scene camera */ struct anim *anim; /* for MOVIE strips */ struct MovieClip *clip; /* for MOVIECLIP strips */ + struct Mask *mask; /* for MASK strips */ float effect_fader; float speed_fader; @@ -139,16 +140,16 @@ typedef struct Sequence { /* pointers for effects: */ struct Sequence *seq1, *seq2, *seq3; - ListBase seqbase; /* list of strips for metastrips */ + ListBase seqbase; /* list of strips for metastrips */ - struct bSound *sound; /* the linked "bSound" object */ + struct bSound *sound; /* the linked "bSound" object */ void *scene_sound; float volume; - float pitch, pan; /* pitch (-0.1..10), pan -2..2 */ + float pitch, pan; /* pitch (-0.1..10), pan -2..2 */ float strobe; - void *effectdata; /* Struct pointer for effect settings */ + void *effectdata; /* Struct pointer for effect settings */ int anim_startofs; /* only use part of animation file */ int anim_endofs; /* is subtle different to startofs / endofs */ @@ -157,8 +158,8 @@ typedef struct Sequence { int blend_mode; float blend_opacity; - /* is sfra needed anymore? - it looks like its only used in one place */ - int sfra, pad; /* starting frame according to the timeline of the scene. */ + /* is sfra needed anymore? - it looks like its only used in one place */ + int sfra, pad; /* starting frame according to the timeline of the scene. */ } Sequence; typedef struct MetaStack { @@ -169,7 +170,7 @@ typedef struct MetaStack { typedef struct Editing { ListBase *seqbasep; /* pointer to the current list of seq's being edited (can be within a meta strip) */ - ListBase seqbase; /* pointer to the top-most seq's */ + ListBase seqbase; /* pointer to the top-most seq's */ ListBase metastack; /* Context vars, used to be static */ @@ -189,12 +190,12 @@ typedef struct WipeVars { } WipeVars; typedef struct GlowVars { - float fMini; /* Minimum intensity to trigger a glow */ + float fMini; /* Minimum intensity to trigger a glow */ float fClamp; - float fBoost; /* Amount to multiply glow intensity */ - float dDist; /* Radius of glow blurring */ - int dQuality; - int bNoComp; /* SHOW/HIDE glow buffer */ + float fBoost; /* Amount to multiply glow intensity */ + float dDist; /* Radius of glow blurring */ + int dQuality; + int bNoComp; /* SHOW/HIDE glow buffer */ } GlowVars; typedef struct TransformVars { @@ -214,7 +215,7 @@ typedef struct SolidColorVars { } SolidColorVars; typedef struct SpeedControlVars { - float * frameMap; + float *frameMap; float globalSpeed; int flags; int length; @@ -226,11 +227,11 @@ typedef struct SpeedControlVars { #define SELECT 1 /* Editor->over_flag */ -#define SEQ_EDIT_OVERLAY_SHOW 1 -#define SEQ_EDIT_OVERLAY_ABS 2 +#define SEQ_EDIT_OVERLAY_SHOW 1 +#define SEQ_EDIT_OVERLAY_ABS 2 -#define SEQ_STRIP_OFSBOTTOM 0.2f -#define SEQ_STRIP_OFSTOP 0.8f +#define SEQ_STRIP_OFSBOTTOM 0.2f +#define SEQ_STRIP_OFSTOP 0.8f /* SpeedControlVars->flags */ #define SEQ_SPEED_INTEGRATE 1 @@ -238,42 +239,42 @@ typedef struct SpeedControlVars { #define SEQ_SPEED_COMPRESS_IPO_Y 4 /* ***************** SEQUENCE ****************** */ -#define SEQ_NAME_MAXSTR 64 +#define SEQ_NAME_MAXSTR 64 /* seq->flag */ -#define SEQ_LEFTSEL (1<<1) -#define SEQ_RIGHTSEL (1<<2) -#define SEQ_OVERLAP (1<<3) -#define SEQ_FILTERY (1<<4) -#define SEQ_MUTE (1<<5) -#define SEQ_MAKE_PREMUL (1<<6) -#define SEQ_REVERSE_FRAMES (1<<7) -#define SEQ_IPO_FRAME_LOCKED (1<<8) -#define SEQ_EFFECT_NOT_LOADED (1<<9) -#define SEQ_FLAG_DELETE (1<<10) -#define SEQ_FLIPX (1<<11) -#define SEQ_FLIPY (1<<12) -#define SEQ_MAKE_FLOAT (1<<13) -#define SEQ_LOCK (1<<14) -#define SEQ_USE_PROXY (1<<15) -#define SEQ_USE_TRANSFORM (1<<16) -#define SEQ_USE_CROP (1<<17) -#define SEQ_USE_COLOR_BALANCE (1<<18) -#define SEQ_USE_PROXY_CUSTOM_DIR (1<<19) - -#define SEQ_USE_PROXY_CUSTOM_FILE (1<<21) -#define SEQ_USE_EFFECT_DEFAULT_FADE (1<<22) +#define SEQ_LEFTSEL (1 << 1) +#define SEQ_RIGHTSEL (1 << 2) +#define SEQ_OVERLAP (1 << 3) +#define SEQ_FILTERY (1 << 4) +#define SEQ_MUTE (1 << 5) +#define SEQ_MAKE_PREMUL (1 << 6) +#define SEQ_REVERSE_FRAMES (1 << 7) +#define SEQ_IPO_FRAME_LOCKED (1 << 8) +#define SEQ_EFFECT_NOT_LOADED (1 << 9) +#define SEQ_FLAG_DELETE (1 << 10) +#define SEQ_FLIPX (1 << 11) +#define SEQ_FLIPY (1 << 12) +#define SEQ_MAKE_FLOAT (1 << 13) +#define SEQ_LOCK (1 << 14) +#define SEQ_USE_PROXY (1 << 15) +#define SEQ_USE_TRANSFORM (1 << 16) +#define SEQ_USE_CROP (1 << 17) +#define SEQ_USE_COLOR_BALANCE (1 << 18) +#define SEQ_USE_PROXY_CUSTOM_DIR (1 << 19) + +#define SEQ_USE_PROXY_CUSTOM_FILE (1 << 21) +#define SEQ_USE_EFFECT_DEFAULT_FADE (1 << 22) // flags for whether those properties are animated or not -#define SEQ_AUDIO_VOLUME_ANIMATED (1<<24) -#define SEQ_AUDIO_PITCH_ANIMATED (1<<25) -#define SEQ_AUDIO_PAN_ANIMATED (1<<26) -#define SEQ_AUDIO_DRAW_WAVEFORM (1<<27) +#define SEQ_AUDIO_VOLUME_ANIMATED (1 << 24) +#define SEQ_AUDIO_PITCH_ANIMATED (1 << 25) +#define SEQ_AUDIO_PAN_ANIMATED (1 << 26) +#define SEQ_AUDIO_DRAW_WAVEFORM (1 << 27) -#define SEQ_INVALID_EFFECT (1<<31) +#define SEQ_INVALID_EFFECT (1 << 31) /* convenience define for all selection flags */ -#define SEQ_ALLSEL (SELECT+SEQ_LEFTSEL+SEQ_RIGHTSEL) +#define SEQ_ALLSEL (SELECT + SEQ_LEFTSEL + SEQ_RIGHTSEL) /* deprecated, don't use a flag anymore*/ /*#define SEQ_ACTIVE 1048576*/ @@ -296,51 +297,53 @@ typedef struct SpeedControlVars { #define SEQ_PROXY_TC_RECORD_RUN_NO_GAPS 8 #define SEQ_PROXY_TC_ALL 15 -/* seq->type WATCH IT: SEQ_EFFECT BIT is used to determine if this is an effect strip!!! */ -#define SEQ_IMAGE 0 -#define SEQ_META 1 -#define SEQ_SCENE 2 -#define SEQ_MOVIE 3 -#define SEQ_RAM_SOUND 4 -#define SEQ_HD_SOUND 5 -#define SEQ_SOUND 4 -#define SEQ_MOVIECLIP 6 - -#define SEQ_EFFECT 8 -#define SEQ_CROSS 8 -#define SEQ_ADD 9 -#define SEQ_SUB 10 -#define SEQ_ALPHAOVER 11 -#define SEQ_ALPHAUNDER 12 -#define SEQ_GAMCROSS 13 -#define SEQ_MUL 14 -#define SEQ_OVERDROP 15 -// #define SEQ_PLUGIN 24 /* Deprecated */ -#define SEQ_WIPE 25 -#define SEQ_GLOW 26 -#define SEQ_TRANSFORM 27 -#define SEQ_COLOR 28 -#define SEQ_SPEED 29 -#define SEQ_MULTICAM 30 -#define SEQ_ADJUSTMENT 31 -#define SEQ_EFFECT_MAX 31 +/* seq->type WATCH IT: SEQ_TYPE_EFFECT BIT is used to determine if this is an effect strip!!! */ +enum { + SEQ_TYPE_IMAGE = 0, + SEQ_TYPE_META = 1, + SEQ_TYPE_SCENE = 2, + SEQ_TYPE_MOVIE = 3, + SEQ_TYPE_SOUND_RAM = 4, + SEQ_TYPE_SOUND_HD = 5, + SEQ_TYPE_MOVIECLIP = 6, + SEQ_TYPE_MASK = 7, + + SEQ_TYPE_EFFECT = 8, + SEQ_TYPE_CROSS = 8, + SEQ_TYPE_ADD = 9, + SEQ_TYPE_SUB = 10, + SEQ_TYPE_ALPHAOVER = 11, + SEQ_TYPE_ALPHAUNDER = 12, + SEQ_TYPE_GAMCROSS = 13, + SEQ_TYPE_MUL = 14, + SEQ_TYPE_OVERDROP = 15, + /* SEQ_TYPE_PLUGIN = 24, */ /* Deprecated */ + SEQ_TYPE_WIPE = 25, + SEQ_TYPE_GLOW = 26, + SEQ_TYPE_TRANSFORM = 27, + SEQ_TYPE_COLOR = 28, + SEQ_TYPE_SPEED = 29, + SEQ_TYPE_MULTICAM = 30, + SEQ_TYPE_ADJUSTMENT = 31, + SEQ_TYPE_EFFECT_MAX = 31 +}; #define STRIPELEM_FAILED 0 #define STRIPELEM_OK 1 #define STRIPELEM_PREVIEW_DONE 1 -#define SEQ_MOVIECLIP_RENDER_UNDISTORTED (1<<0) -#define SEQ_MOVIECLIP_RENDER_STABILIZED (1<<1) +#define SEQ_MOVIECLIP_RENDER_UNDISTORTED (1 << 0) +#define SEQ_MOVIECLIP_RENDER_STABILIZED (1 << 1) #define SEQ_BLEND_REPLACE 0 -/* all other BLEND_MODEs are simple SEQ_EFFECT ids and therefore identical +/* all other BLEND_MODEs are simple SEQ_TYPE_EFFECT ids and therefore identical * to the table above. (Only those effects that handle _exactly_ two inputs, * otherwise, you can't really blend, right :) !) */ -#define SEQ_HAS_PATH(_seq) (ELEM4((_seq)->type, SEQ_MOVIE, SEQ_IMAGE, SEQ_RAM_SOUND, SEQ_HD_SOUND)) +#define SEQ_HAS_PATH(_seq) (ELEM4((_seq)->type, SEQ_TYPE_MOVIE, SEQ_TYPE_IMAGE, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SOUND_HD)) #endif diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 8f3062655b7..a315feed6c5 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -67,6 +67,7 @@ struct wmOperator; struct wmTimer; struct MovieClip; struct MovieClipScopes; +struct Mask; /* SpaceLink (Base) ==================================== */ @@ -998,7 +999,10 @@ typedef struct SpaceClip { * defined when drawing and used for mouse position calculation */ /* movie postprocessing */ - int postproc_flag, pad2; + int postproc_flag; + + /* grease pencil */ + short gpencil_src, pad2; void *draw_context; @@ -1006,7 +1010,14 @@ typedef struct SpaceClip { short dope_sort; /* sort order in dopesheet view */ short dope_flag; /* dopsheet view flags */ - int pad3; + int around; /* pivot point for transforms */ + + /* **** mask editing **** */ + struct Mask *mask; + /* draw options */ + char mask_draw_flag; + char mask_draw_type; + char pad3[6]; } SpaceClip; /* SpaceClip->flag */ @@ -1037,6 +1048,7 @@ typedef enum eSpaceClip_Mode { SC_MODE_TRACKING = 0, SC_MODE_RECONSTRUCTION, SC_MODE_DISTORTION, + SC_MODE_MASKEDIT, } eSpaceClip_Mode; /* SpaceClip->view */ @@ -1051,6 +1063,7 @@ typedef enum eSpaceClip_Dopesheet_Sort { SC_DOPE_SORT_NAME = 0, SC_DOPE_SORT_LONGEST, SC_DOPE_SORT_TOTAL, + SC_DOPE_SORT_AVERAGE_ERROR, } eSpaceClip_Dopesheet_Sort; /* SpaceClip->dope_flag */ @@ -1058,6 +1071,12 @@ typedef enum eSpaceClip_Dopesheet_Flag { SC_DOPE_SORT_INVERSE = (1 << 0), } eSpaceClip_Dopesheet_Flag; +/* SpaceClip->gpencil_src */ +typedef enum eSpaceClip_GPencil_Source { + SC_GPENCIL_SRC_CLIP = 0, + SC_GPENCIL_SRC_TRACK = 1, +} eSpaceClip_GPencil_Source; + /* **************** SPACE DEFINES ********************* */ /* headerbuttons: 450-499 */ diff --git a/source/blender/makesdna/DNA_tracking_types.h b/source/blender/makesdna/DNA_tracking_types.h index 6bf059c7ecb..c5b0174a3c9 100644 --- a/source/blender/makesdna/DNA_tracking_types.h +++ b/source/blender/makesdna/DNA_tracking_types.h @@ -35,10 +35,12 @@ #ifndef __DNA_TRACKING_TYPES_H__ #define __DNA_TRACKING_TYPES_H__ +#include "DNA_defs.h" #include "DNA_listBase.h" /* match-moving data */ +struct bGPdata; struct ImBuf; struct MovieReconstructedCamera; struct MovieTrackingCamera; @@ -68,6 +70,27 @@ typedef struct MovieTrackingCamera { typedef struct MovieTrackingMarker { float pos[2]; /* 2d position of marker on frame (in unified 0..1 space) */ + + /* corners of pattern in the following order: + * + * Y + * ^ + * | (3) --- (2) + * | | | + * | | | + * | | | + * | (0) --- (1) + * +-------------> X + * + * the coordinates are stored relative to pos. + */ + float pattern_corners[4][2]; + + /* positions of left-bottom and right-top corners of search area (in unified 0..1 units, + * relative to marker->pos + */ + float search_min[2], search_max[2]; + int framenr; /* number of frame marker is associated with */ int flag; /* Marker's flag (alive, ...) */ } MovieTrackingMarker; @@ -78,8 +101,19 @@ typedef struct MovieTrackingTrack { char name[64]; /* MAX_NAME */ /* ** setings ** */ - float pat_min[2], pat_max[2]; /* positions of left-bottom and right-top corners of pattern (in unified 0..1 space) */ - float search_min[2], search_max[2]; /* positions of left-bottom and right-top corners of search area (in unified 0..1 space) */ + + /* positions of left-bottom and right-top corners of pattern (in unified 0..1 units, + * relative to marker->pos) + * moved to marker's corners since planar tracking implementation + */ + float pat_min[2] DNA_DEPRECATED, pat_max[2] DNA_DEPRECATED; + + /* positions of left-bottom and right-top corners of search area (in unified 0..1 units, + * relative to marker->pos + * moved to marker since affine tracking implementation + */ + float search_min[2] DNA_DEPRECATED, search_max[2] DNA_DEPRECATED; + float offset[2]; /* offset to "parenting" point */ /* ** track ** */ @@ -95,33 +129,32 @@ typedef struct MovieTrackingTrack { int flag, pat_flag, search_flag; /* flags (selection, ...) */ float color[3]; /* custom color for track */ - /* tracking algorithm to use; can be KLT or SAD */ + /* ** control how tracking happens */ short frames_limit; /* number of frames to be tarcked during single tracking session (if TRACKING_FRAMES_LIMIT is set) */ short margin; /* margin from frame boundaries */ short pattern_match; /* re-adjust every N frames */ - short tracker; /* tracking algorithm used for this track */ - - /* ** KLT tracker settings ** */ - short pyramid_levels, pad2; /* number of pyramid levels to use for KLT tracking */ - - /* ** SAD tracker settings ** */ + /* tracking parameters */ + short motion_model; /* model of the motion for this track */ + int algorithm_flag; /* flags for the tracking algorithm (use brute, use esm, use pyramid, etc */ float minimum_correlation; /* minimal correlation which is still treated as successful tracking */ + + struct bGPdata *gpd; /* grease-pencil data */ } MovieTrackingTrack; typedef struct MovieTrackingSettings { int flag; /* ** default tracker settings */ - short default_tracker; /* tracking algorithm used by default */ - short default_pyramid_levels; /* number of pyramid levels to use for KLT tracking */ - float default_minimum_correlation; /* minimal correlation which is still treated as successful tracking */ - short default_pattern_size; /* size of pattern area for new tracks */ - short default_search_size; /* size of search area for new tracks */ - short default_frames_limit; /* number of frames to be tarcked during single tracking session (if TRACKING_FRAMES_LIMIT is set) */ - short default_margin; /* margin from frame boundaries */ - short default_pattern_match; /* re-adjust every N frames */ - short default_flag; /* default flags like color channels used by default */ + short default_motion_model; /* model of the motion for this track */ + short default_algorithm_flag; /* flags for the tracking algorithm (use brute, use esm, use pyramid, etc */ + float default_minimum_correlation; /* minimal correlation which is still treated as successful tracking */ + short default_pattern_size; /* size of pattern area for new tracks */ + short default_search_size; /* size of search area for new tracks */ + short default_frames_limit; /* number of frames to be tarcked during single tracking session (if TRACKING_FRAMES_LIMIT is set) */ + short default_margin; /* margin from frame boundaries */ + short default_pattern_match; /* re-adjust every N frames */ + short default_flag; /* default flags like color channels used by default */ short motion_flag; /* flags describes motion type */ @@ -255,10 +288,17 @@ enum { #define TRACK_PREVIEW_GRAYSCALE (1<<9) #define TRACK_DOPE_SEL (1<<10) -/* MovieTrackingTrack->tracker */ -#define TRACKER_KLT 0 -#define TRACKER_SAD 1 -#define TRACKER_HYBRID 2 +/* MovieTrackingTrack->motion_model */ +#define TRACK_MOTION_MODEL_TRANSLATION 0 +#define TRACK_MOTION_MODEL_TRANSLATION_ROTATION 1 +#define TRACK_MOTION_MODEL_TRANSLATION_SCALE 2 +#define TRACK_MOTION_MODEL_TRANSLATION_ROTATION_SCALE 3 +#define TRACK_MOTION_MODEL_AFFINE 4 +#define TRACK_MOTION_MODEL_HOMOGRAPHY 5 + +/* MovieTrackingTrack->algorithm_flag */ +#define TRACK_ALGORITHM_FLAG_USE_BRUTE 1 +#define TRACK_ALGORITHM_FLAG_USE_NORMALIZATION 2 /* MovieTrackingTrack->adjframes */ #define TRACK_MATCH_KEYFRAME 0 diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index f53cdf60d6d..6160af6eaf9 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -237,7 +237,7 @@ typedef struct ThemeSpace { char syntaxl[4], syntaxn[4], syntaxb[4]; // syntax for textwindow and nodes char syntaxv[4], syntaxc[4]; - char movie[4], movieclip[4], image[4], scene[4], audio[4]; // for sequence editor + char movie[4], movieclip[4], mask[4], image[4], scene[4], audio[4]; // for sequence editor char effect[4], hpad0[4], transition[4], meta[4]; char editmesh_active[4]; @@ -250,7 +250,7 @@ typedef struct ThemeSpace { char bundle_solid[4]; char path_before[4], path_after[4]; char camera_path[4]; - char hpad[7]; + char hpad[3]; char preview_back[4]; char preview_stitch_face[4]; @@ -264,8 +264,19 @@ typedef struct ThemeSpace { char selected_highlight[4]; /* outliner - selected item */ char skin_root[4]; /* Skin modifier root color */ - + int pad4; + + /* NLA */ + char anim_active[4]; /* Active Action + Summary Channel */ + char anim_non_active[4]; /* Active Action = NULL */ + + char nla_tweaking[4]; /* NLA 'Tweaking' action/strip */ + char nla_tweakdupli[4]; /* NLA - warning color for duplicate instances of tweaking strip */ + + char nla_transition[4], nla_transition_sel[4]; /* NLA "Transition" strips */ + char nla_meta[4], nla_meta_sel[4]; /* NLA "Meta" strips */ + char nla_sound[4], nla_sound_sel[4]; /* NLA "Sound" strips */ } ThemeSpace; diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 6b965b04685..177db545483 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -132,6 +132,7 @@ static const char *includefiles[] = { "DNA_movieclip_types.h", "DNA_tracking_types.h", "DNA_dynamicpaint_types.h", + "DNA_mask_types.h", "DNA_freestyle_types.h", "DNA_linestyle_types.h", @@ -1243,6 +1244,7 @@ int main(int argc, char **argv) #include "DNA_movieclip_types.h" #include "DNA_tracking_types.h" #include "DNA_dynamicpaint_types.h" +#include "DNA_mask_types.h" #include "DNA_freestyle_types.h" #include "DNA_linestyle_types.h" /* end of list */ |