Cleanup: move DNA comments before struct members

Needed for clang-format in some cases, see: T53211
This commit is contained in:
2019-01-07 22:19:13 +11:00
parent 0215caeac2
commit 5a43406e1b
63 changed files with 5137 additions and 2548 deletions

View File

@@ -69,19 +69,22 @@ typedef struct DrawDataList {
typedef struct IDPropertyData { typedef struct IDPropertyData {
void *pointer; void *pointer;
ListBase group; ListBase group;
int val, val2; /* note, we actually fit a double into these two ints */ /** Note, we actually fit a double into these two ints. */
int val, val2;
} IDPropertyData; } IDPropertyData;
typedef struct IDProperty { typedef struct IDProperty {
struct IDProperty *next, *prev; struct IDProperty *next, *prev;
char type, subtype; char type, subtype;
short flag; short flag;
char name[64]; /* MAX_IDPROP_NAME */ /** MAX_IDPROP_NAME. */
char name[64];
/* saved is used to indicate if this struct has been saved yet. /* saved is used to indicate if this struct has been saved yet.
* seemed like a good idea as a pad var was needed anyway :) */ * seemed like a good idea as a pad var was needed anyway :) */
int saved; int saved;
IDPropertyData data; /* note, alignment for 64 bits */ /** Note, alignment for 64 bits. */
IDPropertyData data;
/* array length, also (this is important!) string length + 1. /* array length, also (this is important!) string length + 1.
* the idea is to be able to reuse array realloc functions on strings.*/ * the idea is to be able to reuse array realloc functions on strings.*/
@@ -187,20 +190,26 @@ enum {
IDOVERRIDESTATIC_FLAG_LOCKED = 1 << 1, /* User cannot change that override operation. */ IDOVERRIDESTATIC_FLAG_LOCKED = 1 << 1, /* User cannot change that override operation. */
}; };
/* A single overridden property, contain all operations on this one. */ /** A single overridden property, contain all operations on this one. */
typedef struct IDOverrideStaticProperty { typedef struct IDOverrideStaticProperty {
struct IDOverrideStaticProperty *next, *prev; struct IDOverrideStaticProperty *next, *prev;
/* Path from ID to overridden property. *Does not* include indices/names for final arrays/collections items. */ /**
* Path from ID to overridden property.
* *Does not* include indices/names for final arrays/collections items.
*/
char *rna_path; char *rna_path;
ListBase operations; /* List of overriding operations (IDOverridePropertyOperation) applied to this property. */ /** List of overriding operations (IDOverridePropertyOperation) applied to this property. */
ListBase operations;
} IDOverrideStaticProperty; } IDOverrideStaticProperty;
/* Main container for all overriding data info of a data-block. */ /* Main container for all overriding data info of a data-block. */
typedef struct IDOverrideStatic { typedef struct IDOverrideStatic {
struct ID *reference; /* Reference linked ID which this one overrides. */ /** Reference linked ID which this one overrides. */
ListBase properties; /* List of IDOverrideProperty structs. */ struct ID *reference;
/** List of IDOverrideProperty structs. */
ListBase properties;
short flag; short flag;
short pad[3]; short pad[3];
@@ -230,9 +239,11 @@ typedef struct ID {
void *next, *prev; void *next, *prev;
struct ID *newid; struct ID *newid;
struct Library *lib; struct Library *lib;
char name[66]; /* MAX_ID_NAME */ /** MAX_ID_NAME. */
char name[66];
/** /**
* LIB_... flags report on status of the datablock this ID belongs to (persistent, saved to and read from .blend). * LIB_... flags report on status of the datablock this ID belongs to
* (persistent, saved to and read from .blend).
*/ */
short flag; short flag;
/** /**
@@ -245,9 +256,11 @@ typedef struct ID {
int pad; int pad;
IDProperty *properties; IDProperty *properties;
IDOverrideStatic *override_static; /* Reference linked ID which this one overrides. */ /** Reference linked ID which this one overrides. */
IDOverrideStatic *override_static;
/* Only set for datablocks which are coming from copy-on-write, points to /**
* Only set for datablocks which are coming from copy-on-write, points to
* the original version of it. * the original version of it.
*/ */
struct ID *orig_id; struct ID *orig_id;
@@ -262,21 +275,27 @@ typedef struct ID {
typedef struct Library { typedef struct Library {
ID id; ID id;
struct FileData *filedata; struct FileData *filedata;
char name[1024]; /* path name used for reading, can be relative and edited in the outliner */ /** Path name used for reading, can be relative and edited in the outliner. */
char name[1024];
/* absolute filepath, this is only for convenience, 'name' is the real path used on file read but in /**
* Absolute filepath, this is only for convenience,
* 'name' is the real path used on file read but in
* some cases its useful to access the absolute one. * some cases its useful to access the absolute one.
* This is set on file read. * This is set on file read.
* Use BKE_library_filepath_set() rather than setting 'name' directly and it will be kept in sync - campbell */ * Use BKE_library_filepath_set() rather than setting 'name'
* directly and it will be kept in sync - campbell */
char filepath[1024]; char filepath[1024];
struct Library *parent; /* set for indirectly linked libs, used in the outliner and while reading */ /** Set for indirectly linked libs, used in the outliner and while reading. */
struct Library *parent;
struct PackedFile *packedfile; struct PackedFile *packedfile;
/* Temp data needed by read/write code. */ /* Temp data needed by read/write code. */
int temp_index; int temp_index;
short versionfile, subversionfile; /* see BLENDER_VERSION, BLENDER_SUBVERSION, needed for do_versions */ /** See BLENDER_VERSION, BLENDER_SUBVERSION, needed for do_versions. */
short versionfile, subversionfile;
} Library; } Library;
enum eIconSizes { enum eIconSizes {
@@ -309,9 +328,11 @@ typedef struct PreviewImage {
/* Runtime-only data. */ /* Runtime-only data. */
struct GPUTexture *gputexture[2]; struct GPUTexture *gputexture[2];
int icon_id; /* Used by previews outside of ID context. */ /** Used by previews outside of ID context. */
int icon_id;
short tag; /* Runtime data. */ /** Runtime data. */
short tag;
char pad[2]; char pad[2];
} PreviewImage; } PreviewImage;

View File

@@ -54,8 +54,10 @@ struct GHash;
/* Data point for motion path (mpv) */ /* Data point for motion path (mpv) */
typedef struct bMotionPathVert { typedef struct bMotionPathVert {
float co[3]; /* coordinates of point in 3D-space */ /** Coordinates of point in 3D-space. */
int flag; /* quick settings */ float co[3];
/** Quick settings. */
int flag;
} bMotionPathVert; } bMotionPathVert;
/* bMotionPathVert->flag */ /* bMotionPathVert->flag */
@@ -71,15 +73,22 @@ typedef enum eMotionPathVert_Flag {
* - for elements providing transforms (i.e. Objects or PoseChannels) * - for elements providing transforms (i.e. Objects or PoseChannels)
*/ */
typedef struct bMotionPath { typedef struct bMotionPath {
bMotionPathVert *points; /* path samples */ /** Path samples. */
int length; /* the number of cached verts */ bMotionPathVert *points;
/** The number of cached verts. */
int length;
int start_frame; /* for drawing paths, the start frame number */ /** For drawing paths, the start frame number. */
int end_frame; /* for drawing paths, the end frame number */ int start_frame;
/** For drawing paths, the end frame number. */
int end_frame;
float color[3]; /* optional custom color */ /** Optional custom color. */
int line_thickness; /* line thickness */ float color[3];
int flag; /* baking settings - eMotionPath_Flag */ /** Line thickness. */
int line_thickness;
/** Baking settings - eMotionPath_Flag. */
int flag;
/* Used for drawing. */ /* Used for drawing. */
struct GPUVertBuf *points_vbo; struct GPUVertBuf *points_vbo;
@@ -106,26 +115,38 @@ typedef enum eMotionPath_Flag {
/* Animation Visualization Settings (avs) */ /* Animation Visualization Settings (avs) */
typedef struct bAnimVizSettings { typedef struct bAnimVizSettings {
/* Onion-Skinning Settings ----------------- */ /* Onion-Skinning Settings ----------------- */
int ghost_sf, ghost_ef; /* start and end frames of ghost-drawing range (only used for GHOST_TYPE_RANGE) */ /** 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;
/** Number of frames befo.re/after current frame to show */
int ghost_bc, ghost_ac;
short ghost_type; /* eOnionSkin_Types */ /** EOnionSkin_Types. */
short ghost_step; /* number of frames between each ghost shown (not for GHOST_TYPE_KEYS) */ short ghost_type;
/** Number of frames between each ghost shown (not for GHOST_TYPE_KEYS). */
short ghost_step;
short ghost_flag; /* eOnionSkin_Flag */ /** EOnionSkin_Flag. */
short ghost_flag;
/* General Settings ------------------------ */ /* General Settings ------------------------ */
short recalc; /* eAnimViz_RecalcFlags */ /** EAnimViz_RecalcFlags. */
short recalc;
/* Motion Path Settings ------------------- */ /* Motion Path Settings ------------------- */
short path_type; /* eMotionPath_Types */ /** EMotionPath_Types. */
short path_step; /* number of frames between points indicated on the paths */ short path_type;
/** Number of frames between points indicated on the paths. */
short path_step;
short path_viewflag; /* eMotionPaths_ViewFlag */ /** EMotionPaths_ViewFlag. */
short path_bakeflag; /* eMotionPaths_BakeFlag */ short path_viewflag;
/** EMotionPaths_BakeFlag. */
short path_bakeflag;
int path_sf, path_ef; /* start and end frames of path-calculation range */ /** 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;
/** Number of frames before/after current frame to show. */
int path_bc, path_ac;
} bAnimVizSettings; } bAnimVizSettings;
@@ -228,83 +249,129 @@ typedef struct bPoseChannelRuntime {
typedef struct bPoseChannel { typedef struct bPoseChannel {
struct bPoseChannel *next, *prev; struct bPoseChannel *next, *prev;
IDProperty *prop; /* User-Defined Properties on this PoseChannel */ /** User-Defined Properties on this PoseChannel. */
IDProperty *prop;
ListBase constraints; /* Constraints that act on this PoseChannel */ /** Constraints that act on this PoseChannel. */
char name[64]; /* need to match bone name length: MAXBONENAME */ ListBase constraints;
/** Need to match bone name length: MAXBONENAME. */
char name[64];
short flag; /* dynamic, for detecting transform changes */ /** Dynamic, for detecting transform changes. */
short ikflag; /* settings for IK bones */ short flag;
short protectflag; /* protect channels from being transformed */ /** Settings for IK bones. */
short agrp_index; /* index of action-group this bone belongs to (0 = default/no group) */ short ikflag;
char constflag; /* for quick detecting which constraints affect this channel */ /** Protect channels from being transformed. */
char selectflag; /* copy of bone flag, so you can work with library armatures, not for runtime use */ short protectflag;
/** Index of action-group this bone belongs to (0 = default/no group). */
short agrp_index;
/** For quick detecting which constraints affect this channel. */
char constflag;
/** Copy of bone flag, so you can work with library armatures, not for runtime use. */
char selectflag;
char drawflag; char drawflag;
char bboneflag DNA_DEPRECATED; char bboneflag DNA_DEPRECATED;
char pad0[4]; char pad0[4];
struct Bone *bone; /* set on read file or rebuild pose */ /** Set on read file or rebuild pose. */
struct bPoseChannel *parent; /* set on read file or rebuild pose */ struct Bone *bone;
struct bPoseChannel *child; /* set on read file or rebuild pose, the 'ik' child, for b-bones */ /** Set on read file or rebuild pose. */
struct bPoseChannel *parent;
/** Set on read file or rebuild pose, the 'ik' child, for b-bones. */
struct bPoseChannel *child;
struct ListBase iktree; /* "IK trees" - only while evaluating pose */ /** "IK trees" - only while evaluating pose. */
struct ListBase siktree; /* Spline-IK "trees" - only while evaluating pose */ struct ListBase iktree;
/** Spline-IK "trees" - only while evaluating pose. */
struct ListBase siktree;
bMotionPath *mpath; /* motion path cache for this bone */ /** Motion path cache for this bone. */
struct Object *custom; /* draws custom object instead of default bone shape */ bMotionPath *mpath;
struct bPoseChannel *custom_tx; /* odd feature, display with another bones transform. /** Draws custom object instead of default bone shape. */
struct Object *custom;
/**
* Odd feature, display with another bones transform.
* needed in rare cases for advanced rigs, * needed in rare cases for advanced rigs,
* since the alternative is highly complicated - campbell */ * since the alternative is highly complicated - campbell
*/
struct bPoseChannel *custom_tx;
float custom_scale; float custom_scale;
char pad1[4]; char pad1[4];
/* transforms - written in by actions or transform */ /** Transforms - written in by actions or transform. */
float loc[3]; float loc[3];
float size[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 */ * Rotations - written in by actions or transform
float quat[4]; /* quaternion rotation */ * (but only one representation gets used at any time)
float rotAxis[3], rotAngle; /* axis-angle rotation */ */
short rotmode; /* eRotationModes - rotation representation to use */ /** Euler rotation. */
float eul[3];
/** Quaternion rotation. */
float quat[4];
/** Axis-angle rotation. */
float rotAxis[3], rotAngle;
/** ERotationModes - rotation representation to use. */
short rotmode;
short pad; short pad;
float chan_mat[4][4]; /* matrix result of loc/quat/size, and where we put deform in, see next line */ /** Matrix result of l.oc/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];
* this matrix is object space */ /**
float disp_mat[4][4]; /* for display, pose_mat with bone length applied */ * Constraints accumulate here. in the end, pose_mat = bone->arm_mat * chan_mat
float disp_tail_mat[4][4]; /* for display, pose_mat with bone length applied and translated to tail*/ * this matrix is object space.
float constinv[4][4]; /* inverse result of constraints. */
* doesn't include effect of restposition, parent, and local transform*/ float pose_mat[4][4];
/** For display, pose_mat with bone length applied. */
float disp_mat[4][4];
/** For display, pose_mat with bone length applied and translated to tai.l*/
float disp_tail_mat[4][4];
/**
* Inverse result of constraints.
* doesn't include effect of restposition, parent, and local transform.
*/
float constinv[4][4];
float pose_head[3]; /* actually pose_mat[3] */ /** Actually pose_mat[3]. */
float pose_tail[3]; /* also used for drawing help lines... */ float pose_head[3];
/** Also used for drawing help lines. */
float pose_tail[3];
float limitmin[3], limitmax[3]; /* DOF constraint, note! - these are stored in degrees, not radians */ /** DOF constraint, note! - these are stored in degrees, not radians. */
float stiffness[3]; /* DOF stiffness */ float limitmin[3], limitmax[3];
/** DOF stiffness. */
float stiffness[3];
float ikstretch; float ikstretch;
float ikrotweight; /* weight of joint rotation constraint */ /** Weight of joint rotation constraint. */
float iklinweight; /* weight of joint stretch constraint */ float ikrotweight;
/** Weight of joint stretch constraint. */
float iklinweight;
/* curved bones settings - these are for animating, and are applied on top of the copies in pchan->bone */ /**
* Curved bones settings - these are for animating,
* and are applied on top of the copies in pchan->bone
*/
float roll1, roll2; float roll1, roll2;
float curveInX, curveInY; float curveInX, curveInY;
float curveOutX, curveOutY; float curveOutX, curveOutY;
float ease1, ease2; float ease1, ease2;
float scaleIn, scaleOut; float scaleIn, scaleOut;
struct bPoseChannel *bbone_prev; /* B-Bone custom handles; set on read file or rebuild pose based on pchan->bone data */ /** B-Bone custom handles; set on read file or rebuild pose based on pchan->bone data. */
struct bPoseChannel *bbone_prev;
struct bPoseChannel *bbone_next; struct bPoseChannel *bbone_next;
void *temp; /* use for outliner */ /** Use for outliner. */
/* Runtime data for color and bbone segment matrix. */ void *temp;
/** Runtime data for color and bbone segment matrix. */
bPoseChannelDrawData *draw_data; bPoseChannelDrawData *draw_data;
/* Points to an original pose channel. */ /** Points to an original pose channel. */
struct bPoseChannel *orig_pchan; struct bPoseChannel *orig_pchan;
/* Runtime data. */ /** Runtime data. */
struct bPoseChannelRuntime runtime; struct bPoseChannelRuntime runtime;
} bPoseChannel; } bPoseChannel;
@@ -422,8 +489,10 @@ typedef enum eRotationModes {
* though there is a define for it (hack for the outliner). * though there is a define for it (hack for the outliner).
*/ */
typedef struct bPose { typedef struct bPose {
ListBase chanbase; /* list of pose channels, PoseBones in RNA */ /** List of pose channels, PoseBones in RNA. */
struct GHash *chanhash; /* ghash for quicker string lookups */ ListBase chanbase;
/** Ghash for quicker string lookups. */
struct GHash *chanhash;
/* Flat array of pose channels. It references pointers from /* Flat array of pose channels. It references pointers from
* chanbase. Used for quick pose channel lookup from an index. * chanbase. Used for quick pose channel lookup from an index.
@@ -431,23 +500,34 @@ typedef struct bPose {
bPoseChannel **chan_array; bPoseChannel **chan_array;
short flag, pad; short flag, pad;
unsigned int proxy_layer; /* proxy layer: copy from armature, gets synced */ /** Proxy layer: copy from armature, gets synced. */
unsigned int proxy_layer;
int pad1; int pad1;
float ctime; /* local action time of this pose */ /** Local action time of this pose. */
float stride_offset[3]; /* applied to object */ float ctime;
float cyclic_offset[3]; /* result of match and cycles, applied in BKE_pose_where_is() */ /** Applied to object. */
float stride_offset[3];
/** Result of match and cycles, applied in BKE_pose_where_is(). */
float cyclic_offset[3];
ListBase agroups; /* list of bActionGroups */ /** List of bActionGroups. */
ListBase agroups;
int active_group; /* index of active group (starts from 1) */ /** Index of active group (starts from 1). */
int iksolver; /* ik solver to use, see ePose_IKSolverType */ int active_group;
void *ikdata; /* temporary IK data, depends on the IK solver. Not saved in file */ /** Ik solver to use, see ePose_IKSolverType. */
void *ikparam; /* IK solver parameters, structure depends on iksolver */ int iksolver;
/** Temporary IK data, depends on the IK solver. Not saved in file. */
void *ikdata;
/** IK solver parameters, structure depends on iksolver. */
void *ikparam;
bAnimVizSettings avs; /* settings for visualization of bone animation */ /** Settings for visualization of bone animation. */
char proxy_act_bone[64]; /* proxy active bone name, MAXBONENAME */ bAnimVizSettings avs;
/** Proxy active bone name, MAXBONENAME. */
char proxy_act_bone[64];
} bPose; } bPose;
@@ -494,9 +574,12 @@ typedef struct bItasc {
short solver; short solver;
short flag; short flag;
float feedback; float feedback;
float maxvel; /* max velocity to SDLS solver */ /** Max velocity to SDLS solver. */
float dampmax; /* maximum damping for DLS solver */ float maxvel;
float dampeps; /* threshold of singular value from which the damping start progressively */ /** Maximum damping for DLS solver. */
float dampmax;
/** Threshold of singular value from which the damping start progressively. */
float dampeps;
} bItasc; } bItasc;
/* bItasc->flag */ /* bItasc->flag */
@@ -536,13 +619,24 @@ typedef enum eItasc_Solver {
typedef struct bActionGroup { typedef struct bActionGroup {
struct bActionGroup *next, *prev; struct bActionGroup *next, *prev;
ListBase channels; /* Note: this must not be touched by standard listbase functions which would clear links to other channels */ /**
* Note: this must not be touched by standard listbase functions
* which would clear links to other channels.
*/
ListBase channels;
int flag; /* settings for this action-group */ /** 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) */ int flag;
char name[64]; /* name of the group */ /**
* Index of custom color set to use when used for bones
* (0=default - used for all old files, -1=custom set).
*/
int customCol;
/** Name of the group. */
char name[64];
ThemeWireColor cs; /* color set to use when customCol == -1 */ /** Color set to use when customCol == -1. */
ThemeWireColor cs;
} bActionGroup; } bActionGroup;
/* Action Group flags */ /* Action Group flags */
@@ -583,17 +677,28 @@ typedef enum eActionGroup_Flag {
* affects a group of related settings (as defined by the user). * affects a group of related settings (as defined by the user).
*/ */
typedef struct bAction { typedef struct bAction {
ID id; /* ID-serialisation for relinking */ /** ID-serialisation for relinking. */
ID id;
ListBase curves; /* function-curves (FCurve) */ /** Function-curves (FCurve). */
ListBase chanbase DNA_DEPRECATED; /* legacy data - Action Channels (bActionChannel) in pre-2.5 animation system */ ListBase curves;
ListBase groups; /* groups of function-curves (bActionGroup) */ /** Legacy data - Action Channels (bActionChannel) in pre-2.5 animation system. */
ListBase markers; /* markers local to the Action (used to provide Pose-Libraries) */ ListBase chanbase DNA_DEPRECATED;
/** Groups of function-curves (bActionGroup). */
ListBase groups;
/** Markers local to the Action (used to provide Pose-Libraries). */
ListBase markers;
int flag; /* settings for this action */ /** Settings for this action. */
int active_marker; /* index of the active marker */ int flag;
/** Index of the active marker. */
int 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) */ /**
* Type of ID-blocks that action can be assigned to
* (if 0, will be set to whatever ID first evaluates it).
*/
int idroot;
int pad; int pad;
} bAction; } bAction;
@@ -616,16 +721,23 @@ typedef enum eAction_Flags {
/* Storage for Dopesheet/Grease-Pencil Editor data */ /* Storage for Dopesheet/Grease-Pencil Editor data */
typedef struct bDopeSheet { typedef struct bDopeSheet {
ID *source; /* currently ID_SCE (for Dopesheet), and ID_SC (for Grease Pencil) */ /** 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;
/** Cache for channels (only initialized when pinned). */ // XXX not used!
ListBase chanbase;
struct Collection *filter_grp; /* object group for option to only include objects that belong to this Collection */ /** Object group for option to only include objects that belong to this Collection. */
char searchstr[64]; /* string to search for in displayed names of F-Curves, or NlaTracks/GP Layers/etc. */ struct Collection *filter_grp;
/** String to search for in displayed names of F-Curves, or NlaTracks/GP Layers/etc. */
char searchstr[64];
int filterflag; /* flags to use for filtering data */ /** Flags to use for filtering data. */
int flag; /* standard flags */ int filterflag;
/** Standard flags. */
int flag;
int renameIndex; /* index+1 of channel to rename - only gets set by renaming operator */ /** Index+1 of channel to rename - only gets set by renaming operator. */
int renameIndex;
int pad; int pad;
} bDopeSheet; } bDopeSheet;
@@ -700,26 +812,33 @@ typedef struct SpaceAction_Runtime {
/* Action Editor Space. This is defined here instead of in DNA_space_types.h */ /* Action Editor Space. This is defined here instead of in DNA_space_types.h */
typedef struct SpaceAction { typedef struct SpaceAction {
struct SpaceLink *next, *prev; struct SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */ /** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype; char spacetype;
char link_flag; char link_flag;
char _pad0[6]; char _pad0[6];
/* End 'SpaceLink' header. */ /* End 'SpaceLink' header. */
View2D v2d DNA_DEPRECATED; /* copied to region */ /** Copied to region. */
View2D v2d DNA_DEPRECATED;
bAction *action; /* the currently active action */ /** The currently active action. */
bDopeSheet ads; /* the currently active context (when not showing action) */ bAction *action;
/** The currently active context (when not showing action). */
bDopeSheet ads;
float timeslide; /* for Time-Slide transform mode drawing - current frame? */ /** For Time-Slide transform mode drawing - current frame?. */
float timeslide;
short flag; short flag;
/* Editing context */ /* Editing context */
char mode; char mode;
/* Storage for sub-space types. */ /* Storage for sub-space types. */
char mode_prev; char mode_prev;
char autosnap; /* automatic keyframe snapping mode */ /** Automatic keyframe snapping mode . */
char cache_display; /* (eTimeline_Cache_Flag) */ char autosnap;
/** (eTimeline_Cache_Flag). */
char cache_display;
char _pad1[6]; char _pad1[6];
SpaceAction_Runtime runtime; SpaceAction_Runtime runtime;
@@ -824,14 +943,20 @@ typedef enum eTimeline_Cache_Flag {
*/ */
typedef struct bActionChannel { typedef struct bActionChannel {
struct bActionChannel *next, *prev; struct bActionChannel *next, *prev;
bActionGroup *grp; /* Action Group this Action Channel belongs to */ /** Action Group this Action Channel belongs to. */
bActionGroup *grp;
struct Ipo *ipo; /* IPO block this action channel references */ /** IPO block this action channel references. */
ListBase constraintChannels; /* Constraint Channels (when Action Channel represents an Object or Bone) */ struct Ipo *ipo;
/** Constraint Channels (when Action Channel represents an Object or Bone). */
ListBase constraintChannels;
int flag; /* settings accessed via bitmapping */ /** Settings accessed via bitmapping. */
char name[64]; /* channel name, MAX_NAME */ int flag;
int temp; /* temporary setting - may be used to indicate group that channel belongs to during syncing */ /** Channel name, MAX_NAME. */
char name[64];
/** Temporary setting - may be used to indicate group that channel belongs to during syncing. */
int temp;
} bActionChannel; } bActionChannel;
/* Action Channel flags (ONLY USED FOR DO_VERSIONS...) */ /* Action Channel flags (ONLY USED FOR DO_VERSIONS...) */

View File

@@ -44,7 +44,8 @@ extern "C" {
/* Modifiers -------------------------------------- */ /* Modifiers -------------------------------------- */
/* F-Curve Modifiers (fcm) /**
* F-Curve Modifiers (fcm)
* *
* These alter the way F-Curves behave, by altering the value that is returned * These alter the way F-Curves behave, by altering the value that is returned
* when evaluating the curve's data at some time (t). * when evaluating the curve's data at some time (t).
@@ -52,22 +53,33 @@ extern "C" {
typedef struct FModifier { typedef struct FModifier {
struct FModifier *next, *prev; struct FModifier *next, *prev;
struct FCurve *curve; /* containing curve, only used for updates to CYCLES */ /** Containing curve, only used for updates to CYCLES. */
void *data; /* pointer to modifier data */ struct FCurve *curve;
/** Pointer to modifier data. */
void *data;
char name[64]; /* user-defined description for the modifier - MAX_ID_NAME-2 */ /** User-defined description for the modifier - MAX_ID_NAME-2. */
short type; /* type of f-curve modifier */ char name[64];
short flag; /* settings for the modifier */ /** Type of f-curve modifier. */
short type;
/** Settings for the modifier. */
short flag;
float influence; /* the amount that the modifier should influence the value */ /** The amount that the modifier should influence the value. */
float influence;
float sfra; /* start frame of restricted frame-range */ /** Start frame of restricted frame-range. */
float efra; /* end frame of restricted frame-range */ float sfra;
float blendin; /* number of frames from sfra before modifier takes full influence */ /** End frame of restricted frame-range. */
float blendout; /* number of frames from efra before modifier fades out */ float efra;
/** Number of frames from sfra before modifier takes full influence. */
float blendin;
/** Number of frames from efra before modifier fades out. */
float blendout;
} FModifier; } FModifier;
/* Types of F-Curve modifier /**
* Types of F-Curve modifier
* WARNING: order here is important! * WARNING: order here is important!
*/ */
typedef enum eFModifier_Types { typedef enum eFModifier_Types {
@@ -107,14 +119,19 @@ typedef enum eFModifier_Flags {
/* Generator modifier data */ /* Generator modifier data */
typedef struct FMod_Generator { typedef struct FMod_Generator {
/* general generator information */ /* general generator information */
float *coefficients; /* coefficients array */ /** Coefficients array. */
unsigned int arraysize; /* size of the coefficients array */ float *coefficients;
/** Size of the coefficients array. */
unsigned int arraysize;
int poly_order; /* order of polynomial generated (i.e. 1 for linear, 2 for quadratic) */ /** Order of polynomial generated (i.e. 1 for linear, 2 for quadratic). */
int mode; /* which 'generator' to use eFMod_Generator_Modes */ int poly_order;
/** Which 'generator' to use eFMod_Generator_Modes. */
int mode;
/* settings */ /* settings */
int flag; /* settings */ /** Settings. */
int flag;
} FMod_Generator; } FMod_Generator;
/* generator modes */ /* generator modes */
@@ -133,7 +150,8 @@ typedef enum eFMod_Generator_Flags {
} eFMod_Generator_Flags; } eFMod_Generator_Flags;
/* 'Built-In Function' Generator modifier data /**
* 'Built-In Function' Generator modifier data
* *
* This uses the general equation for equations: * This uses the general equation for equations:
* y = amplitude * fn(phase_multiplier*x + phase_offset) + y_offset * y = amplitude * fn(phase_multiplier*x + phase_offset) + y_offset
@@ -142,15 +160,17 @@ typedef enum eFMod_Generator_Flags {
* x is the evaluation 'time', and 'y' is the resultant value * x is the evaluation 'time', and 'y' is the resultant value
*/ */
typedef struct FMod_FunctionGenerator { typedef struct FMod_FunctionGenerator {
/* coefficients for general equation (as above) */ /** Coefficients for general equation (as above). */
float amplitude; float amplitude;
float phase_multiplier; float phase_multiplier;
float phase_offset; float phase_offset;
float value_offset; float value_offset;
/* flags */ /* flags */
int type; /* eFMod_Generator_Functions */ /** EFMod_Generator_Functions. */
int flag; /* eFMod_Generator_flags */ int type;
/** EFMod_Generator_flags. */
int flag;
} FMod_FunctionGenerator; } FMod_FunctionGenerator;
/* 'function' generator types */ /* 'function' generator types */
@@ -166,30 +186,42 @@ typedef enum eFMod_Generator_Functions {
/* envelope modifier - envelope data */ /* envelope modifier - envelope data */
typedef struct FCM_EnvelopeData { typedef struct FCM_EnvelopeData {
float min, max; /* min/max values for envelope at this point (absolute values) */ /** Min/max values for envelope at this point (absolute values) . */
float time; /* time for that this sample-point occurs */ float min, max;
/** Time for that this sample-point occurs. */
float time;
short f1; /* settings for 'min' control point */ /** Settings for 'min' control point. */
short f2; /* settings for 'max' control point */ short f1;
/** Settings for 'max' control point. */
short f2;
} FCM_EnvelopeData; } FCM_EnvelopeData;
/* envelope-like adjustment to values (for fade in/out) */ /* envelope-like adjustment to values (for fade in/out) */
typedef struct FMod_Envelope { typedef struct FMod_Envelope {
FCM_EnvelopeData *data; /* data-points defining envelope to apply (array) */ /** Data-points defining envelope to apply (array) . */
int totvert; /* number of envelope points */ FCM_EnvelopeData *data;
/** Number of envelope points. */
int totvert;
float midval; /* value that envelope's influence is centered around / based on */ /** Value that envelope's influence is centered around / based on. */
float min, max; /* distances from 'middle-value' for 1:1 envelope influence */ float midval;
/** Distances from 'middle-value' for 1:1 envelope influence. */
float min, max;
} FMod_Envelope; } FMod_Envelope;
/* cycling/repetition modifier data */ /* cycling/repetition modifier data */
// TODO: we can only do complete cycles... // TODO: we can only do complete cycles...
typedef struct FMod_Cycles { typedef struct FMod_Cycles {
short before_mode; /* extrapolation mode to use before first keyframe */ /** Extrapolation mode to use before first keyframe. */
short after_mode; /* extrapolation mode to use after last keyframe */ short before_mode;
short before_cycles; /* number of 'cycles' before first keyframe to do */ /** Extrapolation mode to use after last keyframe. */
short after_cycles; /* number of 'cycles' after last keyframe to do */ short after_mode;
/** Number of 'cycles' before first keyframe to do. */
short before_cycles;
/** Number of 'cycles' after last keyframe to do. */
short after_cycles;
} FMod_Cycles; } FMod_Cycles;
/* cycling modes */ /* cycling modes */
@@ -203,15 +235,19 @@ typedef enum eFMod_Cycling_Modes {
/* Python-script modifier data */ /* Python-script modifier data */
typedef struct FMod_Python { typedef struct FMod_Python {
struct Text *script; /* text buffer containing script to execute */ /** Text buffer containing script to execute. */
IDProperty *prop; /* ID-properties to provide 'custom' settings */ struct Text *script;
/** ID-properties to provide 'custom' settings. */
IDProperty *prop;
} FMod_Python; } FMod_Python;
/* limits modifier data */ /* limits modifier data */
typedef struct FMod_Limits { typedef struct FMod_Limits {
rctf rect; /* rect defining the min/max values */ /** Rect defining the min/max values. */
int flag; /* settings for limiting */ rctf rect;
/** Settings for limiting. */
int flag;
int pad; int pad;
} FMod_Limits; } FMod_Limits;
@@ -246,13 +282,18 @@ typedef enum eFMod_Noise_Modifications {
/* stepped modifier data */ /* stepped modifier data */
typedef struct FMod_Stepped { typedef struct FMod_Stepped {
float step_size; /* Number of frames each interpolated value should be held */ /** Number of frames each interpolated value should be held. */
float offset; /* Reference frame number that stepping starts from */ float step_size;
/** Reference frame number that stepping starts from. */
float offset;
float start_frame; /* start frame of the frame range that modifier works in */ /** Start frame of the frame range that modifier works in. */
float end_frame; /* end frame of the frame range that modifier works in */ float start_frame;
/** End frame of the frame range that modifier works in. */
float end_frame;
int flag; /* various settings */ /** Various settings. */
int flag;
} FMod_Stepped; } FMod_Stepped;
/* stepped modifier range flags */ /* stepped modifier range flags */
@@ -268,15 +309,27 @@ typedef enum eFMod_Stepped_Flags {
* Defines how to access a dependency needed for a driver variable. * Defines how to access a dependency needed for a driver variable.
*/ */
typedef struct DriverTarget { typedef struct DriverTarget {
ID *id; /* ID-block which owns the target, no user count */ /** ID-block which owns the target, no user count. */
ID *id;
char *rna_path; /* RNA path defining the setting to use (for DVAR_TYPE_SINGLE_PROP) */ /** RNA path defining the setting to use (for DVAR_TYPE_SINGLE_PROP). */
char *rna_path;
char pchan_name[64]; /* name of the posebone to use (for vars where DTAR_FLAG_STRUCT_REF is used) - MAX_ID_NAME-2 */ /**
short transChan; /* transform channel index (for DVAR_TYPE_TRANSFORM_CHAN)*/ * Name of the posebone to use
* (for vars where DTAR_FLAG_STRUCT_REF is used) - MAX_ID_NAME-2.
*/
char pchan_name[64];
/** Transform channel index (for DVAR_TYPE_TRANSFORM_CHAN.)*/
short transChan;
short flag; /* flags for the validity of the target (NOTE: these get reset every time the types change) */ /**
int idtype; /* type of ID-block that this target can use */ * Flags for the validity of the target
* (NOTE: these get reset every time the types change).
*/
short flag;
/** Type of ID-block that this target can use. */
int idtype;
} DriverTarget; } DriverTarget;
/* Driver Target flags */ /* Driver Target flags */
@@ -329,15 +382,24 @@ typedef enum eDriverTarget_TransformChannels {
typedef struct DriverVar { typedef struct DriverVar {
struct DriverVar *next, *prev; struct DriverVar *next, *prev;
char name[64]; /* name of the variable to use in py-expression (must be valid python identifier) - MAX_ID_NAME-2 */ /**
* Name of the variable to use in py-expression
* (must be valid python identifier) - MAX_ID_NAME-2.
*/
char name[64];
DriverTarget targets[8]; /* MAX_DRIVER_TARGETS, target slots */ /** MAX_DRIVER_TARGETS, target slots. */
DriverTarget targets[8];
char num_targets; /* number of targets actually used by this variable */ /** Number of targets actually used by this variable. */
char type; /* type of driver variable (eDriverVar_Types) */ char num_targets;
/** Type of driver variable (eDriverVar_Types). */
char type;
short flag; /* validation tags, etc. (eDriverVar_Flags) */ /** Validation tags, etc. (eDriverVar_Flags). */
float curval; /* result of previous evaluation */ short flag;
/** Result of previous evaluation. */
float curval;
} DriverVar; } DriverVar;
/* Driver Variable Types */ /* Driver Variable Types */
@@ -407,22 +469,31 @@ typedef enum eDriverVar_Flags {
* evaluated in. This order is set by the Depsgraph's sorting stuff. * evaluated in. This order is set by the Depsgraph's sorting stuff.
*/ */
typedef struct ChannelDriver { typedef struct ChannelDriver {
ListBase variables; /* targets for this driver (i.e. list of DriverVar) */ /** Targets for this driver (i.e. list of DriverVar). */
ListBase variables;
/* python expression to execute (may call functions defined in an accessory file) /* python expression to execute (may call functions defined in an accessory file)
* which relates the target 'variables' in some way to yield a single usable value * which relates the target 'variables' in some way to yield a single usable value
*/ */
char expression[256]; /* expression to compile for evaluation */ /** Expression to compile for evaluation. */
void *expr_comp; /* PyObject - compiled expression, don't save this */ char expression[256];
/** PyObject - compiled expression, don't save this. */
void *expr_comp;
struct ExprPyLike_Parsed *expr_simple; /* compiled simple arithmetic expression */ /** Compiled simple arithmetic expression. */
struct ExprPyLike_Parsed *expr_simple;
float curval; /* result of previous evaluation */ /** Result of previous evaluation. */
float influence; /* influence of driver on result */ // XXX to be implemented... this is like the constraint influence setting float curval;
// XXX to be implemented... this is like the constraint influence setting
/** Influence of driver on result. */
float influence;
/* general settings */ /* general settings */
int type; /* type of driver */ /** Type of driver. */
int flag; /* settings of driver */ int type;
/** Settings of driver. */
int flag;
} ChannelDriver; } ChannelDriver;
/* driver type */ /* driver type */
@@ -465,8 +536,10 @@ typedef enum eDriver_Flags {
* than using BPoints, which contain a lot of other unnecessary data... * than using BPoints, which contain a lot of other unnecessary data...
*/ */
typedef struct FPoint { typedef struct FPoint {
float vec[2]; /* time + value */ /** Time + value. */
int flag; /* selection info */ float vec[2];
/** Selection info. */
int flag;
int pad; int pad;
} FPoint; } FPoint;
@@ -475,35 +548,49 @@ typedef struct FCurve {
struct FCurve *next, *prev; struct FCurve *next, *prev;
/* group */ /* group */
bActionGroup *grp; /* group that F-Curve belongs to */ /** Group that F-Curve belongs to. */
bActionGroup *grp;
/* driver settings */ /* driver settings */
ChannelDriver *driver; /* only valid for drivers (i.e. stored in AnimData not Actions) */ /** Only valid for drivers (i.e. stored in AnimData not Actions). */
ChannelDriver *driver;
/* evaluation settings */ /* evaluation settings */
ListBase modifiers; /* FCurve Modifiers */ /** FCurve Modifiers. */
ListBase modifiers;
/* motion data */ /* motion data */
BezTriple *bezt; /* user-editable keyframes (array) */ /** User-editable keyframes (array). */
FPoint *fpt; /* 'baked/imported' motion samples (array) */ BezTriple *bezt;
unsigned int totvert; /* total number of points which define the curve (i.e. size of arrays in FPoints) */ /** 'baked/imported' motion samples (array). */
FPoint *fpt;
/** Total number of points which define the curve (i.e. size of arrays in FPoints). */
unsigned int totvert;
/* value cache + settings */ /* value cache + settings */
float curval; /* value stored from last time curve was evaluated (not threadsafe, debug display only!) */ /** Value stored from last time curve was evaluated (not threadsafe, debug display only!). */
float curval;
/* Value which comes from original DNA ddatablock at a time f-curve was evaluated. */ /* Value which comes from original DNA ddatablock at a time f-curve was evaluated. */
float orig_dna_val; float orig_dna_val;
short flag; /* user-editable settings for this curve */ /** User-editable settings for this curve. */
short extend; /* value-extending mode for this curve (does not cover */ short flag;
char auto_smoothing; /* auto-handle smoothing mode */ /** Value-extending mode for this curve (does not cover). */
short extend;
/** Auto-handle smoothing mode. */
char auto_smoothing;
char pad[3]; char pad[3];
/* RNA - data link */ /* RNA - data link */
int array_index; /* if applicable, the index of the RNA-array item to get */ /** If applicable, the index of the RNA-array item to get. */
char *rna_path; /* RNA-path to resolve data-access */ int array_index;
/** RNA-path to resolve data-access. */
char *rna_path;
/* curve coloring (for editor) */ /* curve coloring (for editor) */
int color_mode; /* coloring method to use (eFCurve_Coloring) */ /** Coloring method to use (eFCurve_Coloring). */
float color[3]; /* the last-color this curve took */ int color_mode;
/** The last-color this curve took. */
float color[3];
float prev_norm_factor, prev_offset; float prev_norm_factor, prev_offset;
} FCurve; } FCurve;
@@ -578,34 +665,51 @@ typedef enum eFCurve_Smoothing {
typedef struct NlaStrip { typedef struct NlaStrip {
struct NlaStrip *next, *prev; struct NlaStrip *next, *prev;
ListBase strips; /* 'Child' strips (used for 'meta' strips) */ /** 'Child' strips (used for 'meta' strips). */
bAction *act; /* Action that is referenced by this strip (strip is 'user' of the action) */ ListBase strips;
/** Action that is referenced by this strip (strip is 'user' of the action). */
bAction *act;
ListBase fcurves; /* F-Curves for controlling this strip's influence and timing */ // TODO: move out? /** F-Curves for controlling this strip's influence and timing */ // TODO: move o.ut?
ListBase modifiers; /* F-Curve modifiers to be applied to the entire strip's referenced F-Curves */ ListBase fcurves;
/** F-Curve modifiers to be applied to the entire strip's referenced F-Curves. */
ListBase modifiers;
char name[64]; /* User-Visible Identifier for Strip - MAX_ID_NAME-2 */ /** User-Visible Identifier for Strip - MAX_ID_NAME-2. */
char name[64];
float influence; /* Influence of strip */ /** Influence of strip. */
float strip_time; /* Current 'time' within action being used (automatically evaluated, but can be overridden) */ float influence;
/** Current 'time' within action being used (automatically evaluated, but can be overridden). */
float strip_time;
float start, end; /* extents of the strip */ /** Extents of the strip. */
float actstart, actend; /* range of the action to use */ float start, end;
/** Range of the action to use. */
float actstart, actend;
float repeat; /* The number of times to repeat the action range (only when no F-Curves) */ /** The number of times to repeat the action range (only when no F-Curves). */
float scale; /* The amount the action range is scaled by (only when no F-Curves) */ float repeat;
/** The amount the action range is scaled by (only when no F-Curves). */
float scale;
float blendin, blendout; /* strip blending length (only used when there are no F-Curves) */ /** Strip blending length (only used when there are no F-Curves). */
short blendmode; /* strip blending mode (layer-based mixing) */ float blendin, blendout;
/** Strip blending mode (layer-based mixing). */
short blendmode;
short extendmode; /* strip extrapolation mode (time-based mixing) */ /** Strip extrapolation mode (time-based mixing). */
short extendmode;
short pad1; short pad1;
short type; /* type of NLA strip */ /** Type of NLA strip. */
short type;
void *speaker_handle; /* handle for speaker objects */ /** Handle for speaker objects. */
void *speaker_handle;
int flag; /* settings */ /** Settings. */
int flag;
int pad2; int pad2;
} NlaStrip; } NlaStrip;
@@ -689,12 +793,16 @@ typedef enum eNlaStrip_Type {
typedef struct NlaTrack { typedef struct NlaTrack {
struct NlaTrack *next, *prev; struct NlaTrack *next, *prev;
ListBase strips; /* bActionStrips in this track */ /** BActionStrips in this track. */
ListBase strips;
int flag; /* settings for this track */ /** Settings for this track. */
int index; /* index of the track in the stack (NOTE: not really useful, but we need a pad var anyways!) */ int flag;
/** Index of the track in the stack (NOTE: not really useful, but we need a pad var anyways!). */
int index;
char name[64]; /* short user-description of this track - MAX_ID_NAME-2 */ /** Short user-description of this track - MAX_ID_NAME-2. */
char name[64];
} NlaTrack; } NlaTrack;
/* settings for track */ /* settings for track */
@@ -729,19 +837,28 @@ typedef enum eNlaTrack_Flag {
typedef struct KS_Path { typedef struct KS_Path {
struct KS_Path *next, *prev; struct KS_Path *next, *prev;
ID *id; /* ID block that keyframes are for */ /** ID block that keyframes are for. */
char group[64]; /* name of the group to add to - MAX_ID_NAME-2 */ ID *id;
/** Name of the group to add to - MAX_ID_NAME-2. */
char group[64];
int idtype; /* ID-type that path can be used on */ /** ID-type that path can be used on. */
int idtype;
short groupmode; /* group naming (eKSP_Grouping) */ /** Group naming (eKSP_Grouping). */
short flag; /* various settings, etc. */ short groupmode;
/** Various settings, etc. */
short flag;
char *rna_path; /* dynamically (or statically in the case of predefined sets) path */ /** Dynamically (or statically in the case of predefined sets) path. */
int array_index; /* index that path affects */ char *rna_path;
/** Index that path affects. */
int array_index;
short keyingflag; /* (eInsertKeyFlags) settings to supply insertkey() with */ /** (eInsertKeyFlags) settings to supply insertkey() with. */
short keyingoverride; /* (eInsertKeyFlags) for each flag set, the relevant keyingflag bit overrides the default */ short keyingflag;
/** (eInsertKeyFlags) for each flag set, the relevant keyingflag bit overrides the default. */
short keyingoverride;
} KS_Path; } KS_Path;
/* KS_Path->flag */ /* KS_Path->flag */
@@ -779,19 +896,28 @@ typedef enum eKSP_Grouping {
typedef struct KeyingSet { typedef struct KeyingSet {
struct KeyingSet *next, *prev; struct KeyingSet *next, *prev;
ListBase paths; /* (KS_Path) paths to keyframe to */ /** (KS_Path) paths to keyframe to. */
ListBase paths;
char idname[64]; /* unique name (for search, etc.) - MAX_ID_NAME-2 */ /** Unique name (for search, etc.) - MAX_ID_NAME-2 . */
char name[64]; /* user-viewable name for KeyingSet (for menus, etc.) - MAX_ID_NAME-2 */ char idname[64];
char description[240]; /* (RNA_DYN_DESCR_MAX) short help text. */ /** User-viewable name for KeyingSet (for menus, etc.) - MAX_ID_NAME-2. */
char typeinfo[64]; /* name of the typeinfo data used for the relative paths - MAX_ID_NAME-2 */ char name[64];
/** (RNA_DYN_DESCR_MAX) short help text. */
char description[240];
/** Name of the typeinfo data used for the relative paths - MAX_ID_NAME-2. */
char typeinfo[64];
int active_path; /* index of the active path */ /** Index of the active path. */
int active_path;
short flag; /* settings for KeyingSet */ /** Settings for KeyingSet. */
short flag;
short keyingflag; /* (eInsertKeyFlags) settings to supply insertkey() with */ /** (eInsertKeyFlags) settings to supply insertkey() with. */
short keyingoverride; /* (eInsertKeyFlags) for each flag set, the relevant keyingflag bit overrides the default */ short keyingflag;
/** (eInsertKeyFlags) for each flag set, the relevant keyingflag bit overrides the default. */
short keyingoverride;
char pad[6]; char pad[6];
} KeyingSet; } KeyingSet;
@@ -838,10 +964,13 @@ typedef enum eInsertKeyFlags {
typedef struct AnimOverride { typedef struct AnimOverride {
struct AnimOverride *next, *prev; struct AnimOverride *next, *prev;
char *rna_path; /* RNA-path to use to resolve data-access */ /** RNA-path to use to resolve data-access. */
int array_index; /* if applicable, the index of the RNA-array item to get */ char *rna_path;
/** If applicable, the index of the RNA-array item to get. */
int array_index;
float value; /* value to override setting with */ /** Value to override setting with. */
float value;
} AnimOverride; } AnimOverride;
/* AnimData ------------------------------------- */ /* AnimData ------------------------------------- */
@@ -868,27 +997,41 @@ typedef struct AnimData {
/* nla-tracks */ /* nla-tracks */
ListBase nla_tracks; ListBase nla_tracks;
/* active NLA-track (only set/used during tweaking, so no need to worry about dangling pointers) */ /**
* Active NLA-track
* (only set/used during tweaking, so no need to worry about dangling pointers).
*/
NlaTrack *act_track; NlaTrack *act_track;
/* active NLA-strip (only set/used during tweaking, so no need to worry about dangling pointers) */ /**
* Active NLA-strip
* (only set/used during tweaking, so no need to worry about dangling pointers).
*/
NlaStrip *actstrip; NlaStrip *actstrip;
/* 'drivers' for this ID-block's settings - FCurves, but are completely /* 'drivers' for this ID-block's settings - FCurves, but are completely
* separate from those for animation data * separate from those for animation data
*/ */
ListBase drivers; /* standard user-created Drivers/Expressions (used as part of a rig) */ /** Standard user-created Drivers/Expressions (used as part of a rig). */
ListBase overrides; /* temp storage (AnimOverride) of values for settings that are animated (but the value hasn't been keyframed) */ ListBase drivers;
/** Temp storage (AnimOverride) of values for settings that are animated (but the value hasn't been keyframed). */
ListBase overrides;
FCurve **driver_array; /* runtime data, for depsgraph evaluation */ /** Runtime data, for depsgraph evaluation. */
FCurve **driver_array;
/* settings for animation evaluation */ /* settings for animation evaluation */
int flag; /* user-defined settings */ /** User-defined settings. */
int recalc; /* depsgraph recalculation flags */ int flag;
/** Depsgraph recalculation flags. */
int recalc;
/* settings for active action evaluation (based on NLA strip settings) */ /* settings for active action evaluation (based on NLA strip settings) */
short act_blendmode; /* accumulation mode for active action */ /** Accumulation mode for active action. */
short act_extendmode; /* extrapolation mode for active action */ short act_blendmode;
float act_influence; /* influence for active action */ /** Extrapolation mode for active action. */
short act_extendmode;
/** Influence for active action. */
float act_influence;
} AnimData; } AnimData;
/* Animation Data settings (mostly for NLA) */ /* Animation Data settings (mostly for NLA) */

View File

@@ -46,41 +46,62 @@ struct AnimData;
*/ */
typedef struct Bone { typedef struct Bone {
struct Bone *next, *prev; /* Next/prev elements within this list */ /** Next/prev elements within this list. */
IDProperty *prop; /* User-Defined Properties on this Bone */ struct Bone *next, *prev;
struct Bone *parent; /* Parent (ik parent if appropriate flag is set */ /** User-Defined Properties on this Bone. */
ListBase childbase; /* Children */ IDProperty *prop;
char name[64]; /* Name of the bone - must be unique within the armature, MAXBONENAME */ /** Parent (ik parent if appropriate flag is set. */
struct Bone *parent;
/** Children . */
ListBase childbase;
/** Name of the bone - must be unique within the armature, MAXBONENAME. */
char name[64];
float roll; /* roll is input for editmode, length calculated */ /** roll is input for editmode, length calculated. */
float roll;
float head[3]; float head[3];
float tail[3]; /* head/tail and roll in Bone Space */ /** head/tail and roll in Bone Space . */
float bone_mat[3][3]; /* rotation derived from head/tail/roll */ float tail[3];
/** rotation derived from head/tail/roll. */
float bone_mat[3][3];
int flag; int flag;
float arm_head[3]; float arm_head[3];
float arm_tail[3]; /* head/tail in Armature Space (rest pos) */ /** 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_tail[3];
float arm_roll; /* roll in Armature Space (rest pos) */ /** matrix: (bonemat(b)+head(b))*arm_mat(b-1), rest po.s*/
float arm_mat[4][4];
/** Roll in Armature Space (rest pos). */
float arm_roll;
float dist, weight; /* dist, weight: for non-deformgroup deforms */ /** dist, weight: for non-deformgroup deforms. */
float xwidth, length, zwidth; /* width: for block bones. keep in this order, transform! */ float dist, weight;
float rad_head, rad_tail; /* radius for head/tail sphere, defining deform as well, parent->rad_tip overrides rad_head */ /** width: for block bones. keep in this order, transform!. */
float xwidth, length, zwidth;
/** Radius for head/tail sphere, defining deform as well, parent->rad_tip overrides rad_head. */
float rad_head, rad_tail;
float roll1, roll2; /* curved bones settings - these define the "restpose" for a curved bone */ /** Curved bones settings - these define the "restpose" for a curved bone. */
float roll1, roll2;
float curveInX, curveInY; float curveInX, curveInY;
float curveOutX, curveOutY; float curveOutX, curveOutY;
float ease1, ease2; /* length of bezier handles */ /** Length of bezier handles. */
float ease1, ease2;
float scaleIn, scaleOut; float scaleIn, scaleOut;
float size[3]; /* patch for upward compat, UNUSED! */ /** patch for upward compat, UNUSED!. */
int layer; /* layers that bone appears on */ float size[3];
short segments; /* for B-bones */ /** Layers that bone appears on. */
int layer;
/** for B-bones. */
short segments;
char bbone_prev_type; /* Type of next/prev bone handles */ /** Type of next/prev bone handles. */
char bbone_prev_type;
char bbone_next_type; char bbone_next_type;
struct Bone *bbone_prev; /* Next/prev bones to use as handle references when calculating bbones (optional) */ /** Next/prev bones to use as handle references when calculating bbones (optional). */
struct Bone *bbone_prev;
struct Bone *bbone_next; struct Bone *bbone_next;
} Bone; } Bone;
@@ -90,7 +111,8 @@ typedef struct bArmature {
ListBase bonebase; ListBase bonebase;
ListBase chainbase; ListBase chainbase;
ListBase *edbo; /* editbone listbase, we use pointer so we can check state */ /** Editbone listbase, we use pointer so we can check state. */
ListBase *edbo;
/* active bones should work like active object where possible /* active bones should work like active object where possible
* - active and selection are unrelated * - active and selection are unrelated
@@ -98,25 +120,35 @@ typedef struct bArmature {
* - from the user perspective active == last selected * - from the user perspective active == last selected
* - active should be ignored when not visible (hidden layer) */ * - active should be ignored when not visible (hidden layer) */
Bone *act_bone; /* active bone */ /** Active bone. */
struct EditBone *act_edbone; /* active editbone (in editmode) */ Bone *act_bone;
/** Active editbone (in editmode). */
struct EditBone *act_edbone;
int flag; int flag;
int drawtype; int drawtype;
int gevertdeformer; /* how vertex deformation is handled in the ge */ /** How vertex deformation is handled in the ge. */
int gevertdeformer;
int pad; int pad;
short deformflag; short deformflag;
short pathflag; short pathflag;
unsigned int layer_used; /* for UI, to show which layers are there */ /** For UI, to show which layers are there. */
unsigned int layer, layer_protected; /* for buttons to work, both variables in this order together */ unsigned int layer_used;
/** For buttons to work, both variables in this order together. */
unsigned int layer, layer_protected;
// XXX deprecated... old animation system (armature only viz) --- // XXX deprecated... old animation system (armature only viz) ---
short ghostep, ghostsize; /* number of frames to ghosts to show, and step between them */ /** Number of frames to ghosts to show, and step between them . */
short ghosttype, pathsize; /* ghost drawing options and number of frames between points of path */ short ghostep, ghostsize;
int ghostsf, ghostef; /* start and end frames of ghost-drawing range */ /** Ghost drawing options and number of frames between points of path. */
int pathsf, pathef; /* start and end frames of path-calculation range for all bones */ short ghosttype, pathsize;
int pathbc, pathac; /* number of frames before/after current frame of path-calculation for all bones */ /** Start and end frames of ghost-drawing range. */
int ghostsf, ghostef;
/** Start and end frames of path-calculation range for all bones. */
int pathsf, pathef;
/** Number of frames before/after current frame of path-calculation for all bones . */
int pathbc, pathac;
// XXX end of deprecated code ---------------------------------- // XXX end of deprecated code ----------------------------------
} bArmature; } bArmature;

View File

@@ -47,44 +47,73 @@ struct Image;
struct Material; struct Material;
typedef struct BrushClone { typedef struct BrushClone {
struct Image *image; /* image for clone tool */ /** Image for clone tool. */
float offset[2]; /* offset of clone image from canvas */ struct Image *image;
float alpha, pad; /* transparency for drawing of clone image */ /** Offset of clone image from canvas. */
float offset[2];
/** Transparency for drawing of clone image. */
float alpha, pad;
} BrushClone; } BrushClone;
typedef struct BrushGpencilSettings { typedef struct BrushGpencilSettings {
float draw_smoothfac; /* amount of smoothing to apply to newly created strokes */ /** Amount of smoothing to apply to newly created strokes. */
float draw_sensitivity; /* amount of sensitivity to apply to newly created strokes */ float draw_smoothfac;
float draw_strength; /* amount of alpha strength to apply to newly created strokes */ /** Amount of sensitivity to apply to newly created strokes. */
float draw_jitter; /* amount of jitter to apply to newly created strokes */ float draw_sensitivity;
float draw_angle; /* angle when the brush has full thickness */ /** Amount of alpha strength to apply to newly created strokes. */
float draw_angle_factor; /* factor to apply when angle change (only 90 degrees) */ float draw_strength;
float draw_random_press; /* factor of randomness for pressure */ /** Amount of jitter to apply to newly created strokes. */
float draw_random_strength; /* factor of strength for strength */ float draw_jitter;
float draw_random_sub; /* factor of randomness for subdivision */ /** Angle when the brush has full thickness. */
short draw_smoothlvl; /* number of times to apply smooth factor to new strokes */ float draw_angle;
short draw_subdivide; /* number of times to subdivide new strokes */ /** Factor to apply when angle change (only 90 degrees). */
short flag; /* internal grease pencil drawing flags */ float draw_angle_factor;
/** Factor of randomness for pressure. */
float draw_random_press;
/** Factor of strength for strength. */
float draw_random_strength;
/** Factor of randomness for subdivision. */
float draw_random_sub;
/** Number of times to apply smooth factor to new strokes. */
short draw_smoothlvl;
/** Number of times to subdivide new strokes. */
short draw_subdivide;
/** Internal grease pencil drawing flags. */
short flag;
short thick_smoothlvl; /* number of times to apply thickness smooth factor to new strokes */ /** Number of times to apply thickness smooth factor to new strokes. */
float thick_smoothfac; /* amount of thickness smoothing to apply to newly created strokes */ short thick_smoothlvl;
/** Amount of thickness smoothing to apply to newly created strokes. */
float thick_smoothfac;
float fill_threshold; /* factor for transparency */ /** Factor for transparency. */
short fill_leak; /* number of pixel to consider the leak is too small (x 2) */ float fill_threshold;
/** Number of pixel to consider the leak is too small (x 2). */
short fill_leak;
char pad_1[6]; char pad_1[6];
int fill_simplylvl; /* number of simplify steps */ /** Number of simplify steps. */
int fill_draw_mode; /* type of control lines drawing mode */ int fill_simplylvl;
int icon_id; /* icon identifier */ /** Type of control lines drawing mode. */
int fill_draw_mode;
/** Icon identifier. */
int icon_id;
int input_samples; /* maximum distance before generate new point for very fast mouse movements */ /** Maximum distance before generate new point for very fast mouse movements. */
float uv_random; /* random factor for UV rotation */ int input_samples;
int brush_type DNA_DEPRECATED; /* moved to 'Brush.gpencil_tool' */ /** Random factor for UV rotation. */
int eraser_mode; /* soft, hard or stroke */ float uv_random;
float active_smooth; /* smooth while drawing factor */ /** Moved to 'Brush.gpencil_tool'. */
float era_strength_f; /* factor to apply to strength for soft eraser */ int brush_type DNA_DEPRECATED;
float era_thickness_f; /* factor to apply to thickness for soft eraser */ /** Soft, hard or stroke. */
int eraser_mode;
/** Smooth while drawing factor. */
float active_smooth;
/** Factor to apply to strength for soft eraser. */
float era_strength_f;
/** Factor to apply to thickness for soft eraser. */
float era_thickness_f;
char pad_2[4]; char pad_2[4];
struct CurveMapping *curve_sensitivity; struct CurveMapping *curve_sensitivity;
@@ -92,7 +121,8 @@ typedef struct BrushGpencilSettings {
struct CurveMapping *curve_jitter; struct CurveMapping *curve_jitter;
/* optional link of material to replace default in context */ /* optional link of material to replace default in context */
struct Material *material; /* material */ /** Material. */
struct Material *material;
} BrushGpencilSettings; } BrushGpencilSettings;
/* BrushGpencilSettings->gp_flag */ /* BrushGpencilSettings->gp_flag */
@@ -159,7 +189,8 @@ typedef struct Brush {
ID id; ID id;
struct BrushClone clone; struct BrushClone clone;
struct CurveMapping *curve; /* falloff curve */ /** Falloff curve. */
struct CurveMapping *curve;
struct MTex mtex; struct MTex mtex;
struct MTex mask_mtex; struct MTex mask_mtex;
@@ -167,51 +198,80 @@ typedef struct Brush {
struct ImBuf *icon_imbuf; struct ImBuf *icon_imbuf;
PreviewImage *preview; PreviewImage *preview;
struct ColorBand *gradient; /* color gradient */ /** Color gradient. */
struct ColorBand *gradient;
struct PaintCurve *paint_curve; struct PaintCurve *paint_curve;
char icon_filepath[1024]; /* 1024 = FILE_MAX */ /** 1024 = FILE_MAX. */
char icon_filepath[1024];
float normal_weight; float normal_weight;
float rake_factor; /* rake actual data (not texture), used for sculpt */ /** Rake actual data (not texture), used for sculpt. */
float rake_factor;
short blend; /* blend mode */ /** Blend mode. */
short ob_mode; /* eObjectMode: to see if the brush is compatible, use for display only. */ short blend;
float weight; /* brush weight */ /** #eObjectMode: to see if the brush is compatible, use for display only. */
int size; /* brush diameter */ short ob_mode;
int flag; /* general purpose flag */ /** Brush weight. */
int mask_pressure; /* pressure influence for mask */ float weight;
float jitter; /* jitter the position of the brush */ /** Brush diameter. */
int jitter_absolute; /* absolute jitter in pixels */ int size;
/** General purpose flag. */
int flag;
/** Pressure influence for mask. */
int mask_pressure;
/** Jitter the position of the brush. */
float jitter;
/** Absolute jitter in pixels. */
int jitter_absolute;
int overlay_flags; int overlay_flags;
int spacing; /* spacing of paint operations */ /** Spacing of paint operations. */
int smooth_stroke_radius; /* turning radius (in pixels) for smooth stroke */ int spacing;
float smooth_stroke_factor; /* higher values limit fast changes in the stroke direction */ /** Turning radius (in pixels) for smooth stroke. */
float rate; /* paint operations / second (airbrush) */ int smooth_stroke_radius;
/** Higher values limit fast changes in the stroke direction. */
float smooth_stroke_factor;
/** Paint operations / second (airbrush). */
float rate;
float rgb[3]; /* color */ /** Color. */
float alpha; /* opacity */ float rgb[3];
/** Opacity. */
float alpha;
float secondary_rgb[3]; /* background color */ /** Background color. */
float secondary_rgb[3];
int sculpt_plane; /* the direction of movement for sculpt vertices */ /** The direction of movement for sculpt vertices. */
int sculpt_plane;
float plane_offset; /* offset for plane brushes (clay, flatten, fill, scrape) */ /** Offset for plane brushes (clay, flatten, fill, scrape). */
float plane_offset;
int gradient_spacing; int gradient_spacing;
char gradient_stroke_mode; /* source for stroke color gradient application */ /** Source for stroke color gradient application. */
char gradient_fill_mode; /* source for fill tool color gradient application */ char gradient_stroke_mode;
/** Source for fill tool color gradient application. */
char gradient_fill_mode;
char pad; char pad;
char falloff_shape; /* Projection shape (sphere, circle) */ /** Projection shape (sphere, circle). */
char falloff_shape;
float falloff_angle; float falloff_angle;
char sculpt_tool; /* active sculpt tool */ /** Active sculpt tool. */
char vertexpaint_tool; /* active vertex paint */ char sculpt_tool;
char weightpaint_tool; /* active weight paint */ /** Active vertex paint. */
char imagepaint_tool; /* active image paint tool */ char vertexpaint_tool;
char mask_tool; /* enum eBrushMaskTool, only used if sculpt_tool is SCULPT_TOOL_MASK */ /** Active weight paint. */
char gpencil_tool; /* Active grease pencil tool. */ char weightpaint_tool;
/** Active image paint tool. */
char imagepaint_tool;
/** Enum eBrushMaskTool, only used if sculpt_tool is SCULPT_TOOL_MASK. */
char mask_tool;
/** Active grease pencil tool. */
char gpencil_tool;
char _pad0[6]; char _pad0[6];
float autosmooth_factor; float autosmooth_factor;
@@ -219,7 +279,8 @@ typedef struct Brush {
float crease_pinch_factor; float crease_pinch_factor;
float plane_trim; float plane_trim;
float height; /* affectable height of brush (layer height for layer tool, i.e.) */ /** Affectable height of brush (layer height for layer tool, i.e.). */
float height;
float texture_sample_bias; float texture_sample_bias;
@@ -268,15 +329,19 @@ typedef struct Palette {
} Palette; } Palette;
typedef struct PaintCurvePoint { typedef struct PaintCurvePoint {
BezTriple bez; /* bezier handle */ /** Bezier handle. */
float pressure; /* pressure on that point */ BezTriple bez;
/** Pressure on that point. */
float pressure;
} PaintCurvePoint; } PaintCurvePoint;
typedef struct PaintCurve { typedef struct PaintCurve {
ID id; ID id;
PaintCurvePoint *points; /* points of curve */ /** Points of curve. */
PaintCurvePoint *points;
int tot_points; int tot_points;
int add_index; /* index where next point will be added */ /** Index where next point will be added. */
int add_index;
} PaintCurve; } PaintCurve;
/* Brush.gradient_source */ /* Brush.gradient_source */

View File

@@ -62,11 +62,11 @@ typedef struct CacheFile {
struct AbcArchiveHandle *handle; struct AbcArchiveHandle *handle;
void *handle_mutex; void *handle_mutex;
/* Paths of the objects inside of the Alembic archive referenced by this /** Paths of the objects inside of the Alembic archive referenced by this CacheFile. */
* CacheFile. */
ListBase object_paths; ListBase object_paths;
char filepath[1024]; /* 1024 = FILE_MAX */ /** 1024 = FILE_MAX. */
char filepath[1024];
char is_sequence; char is_sequence;
char forward_axis; char forward_axis;
@@ -74,10 +74,13 @@ typedef struct CacheFile {
char override_frame; char override_frame;
float scale; float scale;
float frame; /* The frame/time to lookup in the cache file. */ /** The frame/time to lookup in the cache file. */
float frame_offset; /* The frame offset to subtract. */ float frame;
/** The frame offset to subtract. */
float frame_offset;
short flag; /* Animation flag. */ /** Animation flag. */
short flag;
short draw_flag; short draw_flag;
char padding[4]; char padding[4];

View File

@@ -77,10 +77,13 @@ typedef struct CameraBGImage {
typedef struct Camera { typedef struct Camera {
ID id; ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ /** Animation data (must be immediately after id for utilities to use it). */
struct AnimData *adt;
char type; /* CAM_PERSP, CAM_ORTHO or CAM_PANO */ /** CAM_PERSP, CAM_ORTHO or CAM_PANO. */
char dtx; /* draw type extra */ char type;
/** Draw type extra. */
char dtx;
short flag; short flag;
float passepartalpha; float passepartalpha;
float clipsta, clipend; float clipsta, clipend;
@@ -93,7 +96,8 @@ typedef struct Camera {
* The name was not changed so that no other files need to be modified */ * The name was not changed so that no other files need to be modified */
float YF_dofdist; float YF_dofdist;
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ /** Old animation system, deprecated for 2.5. */
struct Ipo *ipo DNA_DEPRECATED;
struct Object *dof_ob; struct Object *dof_ob;
struct GPUDOFSettings gpu_dof; struct GPUDOFSettings gpu_dof;

View File

@@ -47,91 +47,148 @@
*/ */
typedef struct ClothSimSettings { typedef struct ClothSimSettings {
struct LinkNode *cache; /* UNUSED atm */ /** UNUSED atm. */
float mingoal; /* see SB */ struct LinkNode *cache;
float Cdis DNA_DEPRECATED; /* Mechanical damping of springs. */ /** See SB. */
float Cvi; /* Viscous/fluid damping. */ float mingoal;
float gravity[3]; /* Gravity/external force vector. */ /** Mechanical damping of springs. */
float dt; /* This is the duration of our time step, computed. */ float Cdis DNA_DEPRECATED;
float mass; /* The mass of the entire cloth. */ /** Viscous/fluid damping. . */
float structural DNA_DEPRECATED; /* Structural spring stiffness. */ float Cvi;
float shear; /* Shear spring stiffness. */ /** Gravity/external force vector. . */
float bending; /* Flexion spring stiffness. */ float gravity[3];
float max_bend; /* max bending scaling value, min is "bending" */ /** This is the duration of our time step, computed.. */
float max_struct DNA_DEPRECATED; /* max structural scaling value, min is "structural" */ float dt;
float max_shear; /* max shear scaling value */ /** The mass of the entire cloth. . */
float max_sewing; /* max sewing force */ float mass;
float avg_spring_len; /* used for normalized springs */ /** Structural spring stiffness. */
float timescale; /* parameter how fast cloth runs */ float structural DNA_DEPRECATED;
float time_scale; /* multiplies cloth speed */ /** Shear spring stiffness. . */
float maxgoal; /* see SB */ float shear;
float eff_force_scale;/* Scaling of effector forces (see softbody_calc_forces).*/ /** Flexion spring stiffness. . */
float eff_wind_scale; /* Scaling of effector wind (see softbody_calc_forces). */ float bending;
/** Max bending scaling value, min is "bending". */
float max_bend;
/** Max structural scaling value, min is "structural". */
float max_struct DNA_DEPRECATED;
/** Max shear scaling value. */
float max_shear;
/** Max sewing force. */
float max_sewing;
/** Used for normalized springs. */
float avg_spring_len;
/** Parameter how fast cloth runs. */
float timescale;
/** Multiplies cloth speed. */
float time_scale;
/** See SB. */
float maxgoal;
/** Scaling of effector forces (see softbody_calc_forces)..*/
float eff_force_scale;
/** Scaling of effector wind (see softbody_calc_forces).. */
float eff_wind_scale;
float sim_time_old; float sim_time_old;
float defgoal; float defgoal;
float goalspring; float goalspring;
float goalfrict; float goalfrict;
float velocity_smooth; /* smoothing of velocities for hair */ /** Smoothing of velocities for hair. */
float density_target; /* minimum density for hair */ float velocity_smooth;
float density_strength; /* influence of hair density */ /** Minimum density for hair. */
float collider_friction; /* friction with colliders */ float density_target;
float vel_damping DNA_DEPRECATED; /* damp the velocity to speed up getting to the resting position */ /** Influence of hair density. */
float shrink_min; /* min amount to shrink cloth by 0.0f (no shrink) - 1.0f (shrink to nothing) */ float density_strength;
float shrink_max; /* max amount to shrink cloth by 0.0f (no shrink) - 1.0f (shrink to nothing) */ /** Friction with colliders. */
float collider_friction;
/** Damp the velocity to speed up getting to the resting position. */
float vel_damping DNA_DEPRECATED;
/** Min amount to shrink cloth by 0.0f (no shrink) - 1.0f (shrink to nothing). */
float shrink_min;
/** Max amount to shrink cloth by 0.0f (no shrink) - 1.0f (shrink to nothing). */
float shrink_max;
/* XXX various hair stuff /* XXX various hair stuff
* should really be separate, this struct is a horrible mess already * should really be separate, this struct is a horrible mess already
*/ */
float bending_damping; /* damping of bending springs */ /** Damping of bending springs. */
float voxel_cell_size; /* size of voxel grid cells for continuum dynamics */ float bending_damping;
/** Size of voxel grid cells for continuum dynamics. */
float voxel_cell_size;
int pad; int pad;
int stepsPerFrame; /* Number of time steps per frame. */ /** Number of time steps per frame. . */
int flags; /* flags, see CSIMSETT_FLAGS enum above. */ int stepsPerFrame;
int preroll DNA_DEPRECATED; /* How many frames of simulation to do before we start. */ /** Flags, see CSIMSETT_FLAGS enum above.. */
int maxspringlen; /* in percent!; if tearing enabled, a spring will get cut */ int flags;
short solver_type; /* which solver should be used? txold */ /** How many frames of simulation to do before we start.. */
short vgroup_bend; /* vertex group for scaling bending stiffness */ int preroll DNA_DEPRECATED;
short vgroup_mass; /* optional vertexgroup name for assigning weight.*/ /** In percent!; if tearing enabled, a spring will get cut. */
short vgroup_struct; /* vertex group for scaling structural stiffness */ int maxspringlen;
short vgroup_shrink; /* vertex group for shrinking cloth */ /** Which solver should be used? txold. */
short shapekey_rest; /* vertex group for scaling structural stiffness */ short solver_type;
short presets; /* used for presets on GUI */ /** Vertex group for scaling bending stiffness. */
short vgroup_bend;
/** Optional vertexgroup name for assigning weight..*/
short vgroup_mass;
/** Vertex group for scaling structural stiffness. */
short vgroup_struct;
/** Vertex group for shrinking cloth. */
short vgroup_shrink;
/** Vertex group for scaling structural stiffness. */
short shapekey_rest;
/** Used for presets on GUI. */
short presets;
short reset; short reset;
char pad0[4]; char pad0[4];
struct EffectorWeights *effector_weights; struct EffectorWeights *effector_weights;
short bending_model; short bending_model;
short vgroup_shear; /* Vertex group for scaling structural stiffness. */ /** Vertex group for scaling structural stiffness. */
short vgroup_shear;
float tension; float tension;
float compression; float compression;
float max_tension; float max_tension;
float max_compression; float max_compression;
float tension_damp; /* Mechanical damping of tension springs. */ /** Mechanical damping of tension springs. */
float compression_damp; /* Mechanical damping of compression springs. */ float tension_damp;
float shear_damp; /* Mechanical damping of shear springs. */ /** Mechanical damping of compression springs. */
float compression_damp;
/** Mechanical damping of shear springs. */
float shear_damp;
} ClothSimSettings; } ClothSimSettings;
typedef struct ClothCollSettings { typedef struct ClothCollSettings {
struct LinkNode *collision_list; /* e.g. pointer to temp memory for collisions */ /** E.g. pointer to temp memory for collisions. */
float epsilon; /* min distance for collisions. */ struct LinkNode *collision_list;
float self_friction; /* Fiction/damping with self contact. */ /** Min distance for collisions. . */
float friction; /* Friction/damping applied on contact with other object.*/ float epsilon;
float damping; /* Collision restitution on contact with other object.*/ /** Fiction/damping with self contact. */
float selfepsilon; /* for selfcollision */ float self_friction;
/** Friction/damping applied on contact with other object..*/
float friction;
/** Collision restitution on contact with other object..*/
float damping;
/** For selfcollision. */
float selfepsilon;
float repel_force DNA_DEPRECATED; float repel_force DNA_DEPRECATED;
float distance_repel DNA_DEPRECATED; float distance_repel DNA_DEPRECATED;
int flags; /* collision flags defined in BKE_cloth.h */ /** Collision flags defined in BKE_cloth.h. */
short self_loop_count DNA_DEPRECATED; /* How many iterations for the selfcollision loop */ int flags;
short loop_count; /* How many iterations for the collision loop. */ /** How many iterations for the selfcollision loop. */
short self_loop_count DNA_DEPRECATED;
/** How many iterations for the collision loop. . */
short loop_count;
int pad; int pad;
struct Collection *group; /* Only use colliders from this group of objects */ /** Only use colliders from this group of objects. */
short vgroup_selfcol; /* vgroup to paint which vertices are used for self collisions */ struct Collection *group;
/** Vgroup to paint which vertices are used for self collisions. */
short vgroup_selfcol;
short pad2[3]; short pad2[3];
float clamp; /* Impulse clamp for object collisions. */ /** Impulse clamp for object collisions. */
float self_clamp; /* Impulse clamp for self collisions. */ float clamp;
/** Impulse clamp for self collisions. */
float self_clamp;
} ClothCollSettings; } ClothCollSettings;

View File

@@ -56,8 +56,10 @@ typedef struct CollectionChild {
typedef struct Collection { typedef struct Collection {
ID id; ID id;
ListBase gobject; /* CollectionObject */ /** CollectionObject. */
ListBase children; /* CollectionChild */ ListBase gobject;
/** CollectionChild. */
ListBase children;
struct PreviewImage *preview; struct PreviewImage *preview;

View File

@@ -43,7 +43,8 @@
typedef struct CurveMapPoint { typedef struct CurveMapPoint {
float x, y; float x, y;
short flag, shorty; /* shorty for result lookup */ /** Shorty for result lookup. */
short flag, shorty;
} CurveMapPoint; } CurveMapPoint;
/* curvepoint->flag */ /* curvepoint->flag */
@@ -56,14 +57,21 @@ enum {
typedef struct CurveMap { typedef struct CurveMap {
short totpoint, flag; short totpoint, flag;
float range; /* quick multiply value for reading table */ /** Quick multiply value for reading table. */
float mintable, maxtable; /* the x-axis range for the table */ float range;
float ext_in[2], ext_out[2]; /* for extrapolated curves, the direction vector */ /** The x-axis range for the table. */
CurveMapPoint *curve; /* actual curve */ float mintable, maxtable;
CurveMapPoint *table; /* display and evaluate table */ /** For extrapolated curves, the direction vector. */
float ext_in[2], ext_out[2];
/** Actual curve. */
CurveMapPoint *curve;
/** Display and evaluate table. */
CurveMapPoint *table;
CurveMapPoint *premultable; /* for RGB curves, premulled table */ /** For RGB curves, premulled table. */
float premul_ext_in[2]; /* for RGB curves, premulled extrapolation vector */ CurveMapPoint *premultable;
/** For RGB curves, premulled extrapolation vector. */
float premul_ext_in[2];
float premul_ext_out[2]; float premul_ext_out[2];
} CurveMap; } CurveMap;
@@ -71,17 +79,23 @@ typedef struct CurveMap {
#define CUMA_EXTEND_EXTRAPOLATE 1 #define CUMA_EXTEND_EXTRAPOLATE 1
typedef struct CurveMapping { typedef struct CurveMapping {
int flag, cur; /* cur; for buttons, to show active curve */ /** Cur; for buttons, to show active curve. */
int flag, cur;
int preset; int preset;
int changed_timestamp; int changed_timestamp;
rctf curr, clipr; /* current rect, clip rect (is default rect too) */ /** Current rect, clip rect (is default rect too). */
rctf curr, clipr;
CurveMap cm[4]; /* max 4 builtin curves per mapping struct now */ /** Max 4 builtin curves per mapping struct now. */
float black[3], white[3]; /* black/white point (black[0] abused for current frame) */ CurveMap cm[4];
float bwmul[3]; /* black/white point multiply value, for speed */ /** Black/white point (black[0] abused for current frame). */
float black[3], white[3];
/** Black/white point multiply value, for speed. */
float bwmul[3];
float sample[3]; /* sample values, if flag set it draws line and intersection */ /** Sample values, if flag set it draws line and intersection. */
float sample[3];
short tone; short tone;
short pad[3]; short pad[3];
@@ -177,11 +191,16 @@ typedef struct Scopes {
typedef struct ColorManagedViewSettings { typedef struct ColorManagedViewSettings {
int flag, pad; int flag, pad;
char look[64]; /* look which is being applied when displaying buffer on the screen (prior to view transform) */ /** Look which is being applied when displaying buffer on the screen (prior to view transform). */
char view_transform[64]; /* view transform which is being applied when displaying buffer on the screen */ char look[64];
float exposure; /* fstop exposure */ /** View transform which is being applied when displaying buffer on the screen. */
float gamma; /* post-display gamma transform */ char view_transform[64];
struct CurveMapping *curve_mapping; /* pre-display RGB curves transform */ /** Fstop exposure. */
float exposure;
/** Post-display gamma transform. */
float gamma;
/** Pre-display RGB curves transform. */
struct CurveMapping *curve_mapping;
void *pad2; void *pad2;
} ColorManagedViewSettings; } ColorManagedViewSettings;
@@ -190,7 +209,8 @@ typedef struct ColorManagedDisplaySettings {
} ColorManagedDisplaySettings; } ColorManagedDisplaySettings;
typedef struct ColorManagedColorspaceSettings { typedef struct ColorManagedColorspaceSettings {
char name[64]; /* MAX_COLORSPACE_NAME */ /** MAX_COLORSPACE_NAME. */
char name[64];
} ColorManagedColorspaceSettings; } ColorManagedColorspaceSettings;
/* ColorManagedViewSettings->flag */ /* ColorManagedViewSettings->flag */

View File

@@ -54,25 +54,38 @@ typedef struct bConstraintChannel {
typedef struct bConstraint { typedef struct bConstraint {
struct bConstraint *next, *prev; struct bConstraint *next, *prev;
void *data; /* Constraint data (a valid constraint type) */ /** Constraint data (a valid constraint type). */
short type; /* Constraint type */ void *data;
short flag; /* Flag - General Settings */ /** Constraint type. */
short type;
/** Flag - General Settings. */
short flag;
char ownspace; /* Space that owner should be evaluated in */ /** Space that owner should be evaluated in. */
char tarspace; /* Space that target should be evaluated in (only used if 1 target) */ char ownspace;
/** Space that target should be evaluated in (only used if 1 target). */
char tarspace;
char name[64]; /* Constraint name, MAX_NAME */ /** Constraint name, MAX_NAME. */
char name[64];
short pad; short pad;
float enforce; /* Amount of influence exherted by constraint (0.0-1.0) */ /** Amount of influence exherted by constraint (0.0-1.0). */
float headtail; /* Point along subtarget bone where the actual target is. 0=head (default for all), 1=tail*/ float enforce;
/** Point along subtarget bone where the actual target is. 0=head (default for all), 1=tail. */
float headtail;
struct Ipo *ipo DNA_DEPRECATED; /* local influence ipo or driver */ /* old animation system, deprecated for 2.5 */ /* old animation system, deprecated for 2.5. */
/** Local influence ipo or driver */
struct Ipo *ipo DNA_DEPRECATED;
/* below are readonly fields that are set at runtime by the solver for use in the GE (only IK atm) */ /* below are readonly fields that are set at runtime
float lin_error; /* residual error on constraint expressed in blender unit*/ * by the solver for use in the GE (only IK atm) */
float rot_error; /* residual error on constraint expressed in radiant */ /** Residual error on constraint expressed in blender unit. */
float lin_error;
/** Residual error on constraint expressed in radiant. */
float rot_error;
} bConstraint; } bConstraint;
@@ -85,16 +98,24 @@ typedef struct bConstraint {
typedef struct bConstraintTarget { typedef struct bConstraintTarget {
struct bConstraintTarget *next, *prev; struct bConstraintTarget *next, *prev;
struct Object *tar; /* object to use as target */ /** Object to use as target. */
char subtarget[64]; /* subtarget - pchan or vgroup name, MAX_ID_NAME-2 */ struct Object *tar;
/** Subtarget - pchan or vgroup name, MAX_ID_NAME-2. */
char subtarget[64];
float matrix[4][4]; /* matrix used during constraint solving - should be cleared before each use */ /** Matrix used during constraint solving - should be cleared before each use. */
float matrix[4][4];
short space; /* space that target should be evaluated in (overrides bConstraint->tarspace) */ /** Space that target should be evaluated in (overrides bConstraint->tarspace). */
short flag; /* runtime settings (for editor, etc.) */ short space;
short type; /* type of target (eConstraintObType) */ /** Runtime settings (for editor, etc.). */
short rotOrder; /* rotation order for target (as defined in BLI_math.h) */ short flag;
float weight; /* weight for armature deform */ /** Type of target (eConstraintObType). */
short type;
/** Rotation order for target (as defined in BLI_math.h). */
short rotOrder;
/** Weight for armature deform. */
float weight;
char pad[4]; char pad[4];
} bConstraintTarget; } bConstraintTarget;
@@ -114,16 +135,29 @@ typedef enum eConstraintObType {
/* Python Script Constraint */ /* Python Script Constraint */
typedef struct bPythonConstraint { typedef struct bPythonConstraint {
struct Text *text; /* text-buffer (containing script) to execute */ /** Text-buffer (containing script) to execute. */
IDProperty *prop; /* 'id-properties' used to store custom properties for constraint */ struct Text *text;
/** 'id-properties' used to store custom properties for constraint. */
IDProperty *prop;
int flag; /* general settings/state indicators accessed by bitmapping */ /** General settings/state indicators accessed by bitmapping. */
int tarnum; /* number of targets - usually only 1-3 are needed */ int flag;
/** Number of targets - usually only 1-3 are needed. */
int tarnum;
ListBase targets; /* a list of targets that this constraint has (bConstraintTarget-s) */ /** A list of targets that this constraint has (bConstraintTarget-s). */
ListBase targets;
struct Object *tar; /* target from previous implementation (version-patch sets this to NULL on file-load) */ /**
char subtarget[64]; /* subtarger from previous implementation (version-patch sets this to "" on file-load), MAX_ID_NAME-2 */ * Target from previous implementation
* (version-patch sets this to NULL on file-load).
*/
struct Object *tar;
/**
* Subtarger from previous implementation
* (version-patch sets this to "" on file-load), MAX_ID_NAME-2.
*/
char subtarget[64];
} bPythonConstraint; } bPythonConstraint;
@@ -134,21 +168,36 @@ typedef struct bPythonConstraint {
* This is indicated in the comments for each field * This is indicated in the comments for each field
*/ */
typedef struct bKinematicConstraint { typedef struct bKinematicConstraint {
struct Object *tar; /* All: target object in case constraint needs a target */ /** All: target object in case constraint needs a target. */
short iterations; /* All: Maximum number of iterations to try */ struct Object *tar;
short flag; /* All & CopyPose: some options Like CONSTRAINT_IK_TIP */ /** All: Maximum number of iterations to try. */
short rootbone; /* All: index to rootbone, if zero go all the way to mother bone */ short iterations;
short max_rootbone; /* CopyPose: for auto-ik, maximum length of chain */ /** All & CopyPose: some options Like CONSTRAINT_IK_TIP. */
char subtarget[64]; /* All: String to specify sub-object target, MAX_ID_NAME-2 */ short flag;
struct Object *poletar; /* All: Pole vector target */ /** All: index to rootbone, if zero go all the way to mother bone. */
char polesubtarget[64]; /* All: Pole vector sub-object target, MAX_ID_NAME-2 */ short rootbone;
float poleangle; /* All: Pole vector rest angle */ /** CopyPose: for auto-ik, maximum length of chain. */
float weight; /* All: Weight of constraint in IK tree */ short max_rootbone;
float orientweight; /* CopyPose: Amount of rotation a target applies on chain */ /** All: String to specify sub-object target, MAX_ID_NAME-2. */
float grabtarget[3]; /* CopyPose: for target-less IK */ char subtarget[64];
short type; /* subtype of IK constraint: eConstraint_IK_Type */ /** All: Pole vector target. */
short mode; /* Distance: how to limit in relation to clamping sphere: LIMITDIST_.. */ struct Object *poletar;
float dist; /* Distance: distance (radius of clamping sphere) from target */ /** All: Pole vector sub-object target, MAX_ID_NAME-2. */
char polesubtarget[64];
/** All: Pole vector rest angle. */
float poleangle;
/** All: Weight of constraint in IK tree. */
float weight;
/** CopyPose: Amount of rotation a target applies on chain. */
float orientweight;
/** CopyPose: for target-less IK. */
float grabtarget[3];
/** Subtype of IK constraint: eConstraint_IK_Type. */
short type;
/** Distance: how to limit in relation to clamping sphere: LIMITDIST_... */
short mode;
/** Distance: distance (radius of clamping sphere) from target. */
float dist;
} bKinematicConstraint; } bKinematicConstraint;
typedef enum eConstraint_IK_Type { typedef enum eConstraint_IK_Type {
@@ -164,16 +213,25 @@ typedef enum eConstraint_IK_Type {
*/ */
typedef struct bSplineIKConstraint { typedef struct bSplineIKConstraint {
/* target(s) */ /* target(s) */
struct Object *tar; /* curve object (with follow path enabled) which drives the bone chain */ /** Curve object (with follow path enabled) which drives the bone chain. */
struct Object *tar;
/* binding details */ /* binding details */
float *points; /* array of numpoints items, denoting parametric positions along curve that joints should follow */ /**
short numpoints; /* number of points to bound in points array */ * Array of numpoints items,
short chainlen; /* number of bones ('n') that are in the chain */ * denoting parametric positions along curve that joints should follow.
*/
float *points;
/** Number of points to bound in points array. */
short numpoints;
/** Number of bones ('n') that are in the chain. */
short chainlen;
/* settings */ /* settings */
short flag; /* general settings for constraint */ /** General settings for constraint. */
short xzScaleMode; /* method used for determining the x & z scaling of the bones */ short flag;
/** Method used for determining the x & z scaling of the bones. */
short xzScaleMode;
/* volume preservation settings */ /* volume preservation settings */
float bulge; float bulge;
@@ -184,10 +242,12 @@ typedef struct bSplineIKConstraint {
/* Armature Constraint */ /* Armature Constraint */
typedef struct bArmatureConstraint { typedef struct bArmatureConstraint {
int flag; /* general settings/state indicators accessed by bitmapping */ /** General settings/state indicators accessed by bitmapping. */
int flag;
char pad[4]; char pad[4];
ListBase targets; /* a list of targets that this constraint has (bConstraintTarget-s) */ /** A list of targets that this constraint has (bConstraintTarget-s). */
ListBase targets;
} bArmatureConstraint; } bArmatureConstraint;
/* Single-target subobject constraints --------------------- */ /* Single-target subobject constraints --------------------- */
@@ -195,14 +255,18 @@ typedef struct bArmatureConstraint {
/* Track To Constraint */ /* Track To Constraint */
typedef struct bTrackToConstraint { typedef struct bTrackToConstraint {
struct Object *tar; struct Object *tar;
int reserved1; /* I'll be using reserved1 and reserved2 as Track and Up flags, /**
* I'll be using reserved1 and reserved2 as Track and Up flags,
* not sure if that's what they were intended for anyway. * not sure if that's what they were intended for anyway.
* Not sure either if it would create backward incompatibility if I were to rename them. * Not sure either if it would create backward incompatibility if I were to rename them.
* - theeth*/ * - theeth
*/
int reserved1;
int reserved2; int reserved2;
int flags; int flags;
int pad; int pad;
char subtarget[64]; /* MAX_ID_NAME-2 */ /** MAX_ID_NAME-2. */
char subtarget[64];
} bTrackToConstraint; } bTrackToConstraint;
/* Copy Rotation Constraint */ /* Copy Rotation Constraint */
@@ -210,7 +274,8 @@ typedef struct bRotateLikeConstraint {
struct Object *tar; struct Object *tar;
int flag; int flag;
int reserved1; int reserved1;
char subtarget[64]; /* MAX_ID_NAME-2 */ /** MAX_ID_NAME-2. */
char subtarget[64];
} bRotateLikeConstraint; } bRotateLikeConstraint;
/* Copy Location Constraint */ /* Copy Location Constraint */
@@ -218,7 +283,8 @@ typedef struct bLocateLikeConstraint {
struct Object *tar; struct Object *tar;
int flag; int flag;
int reserved1; int reserved1;
char subtarget[64]; /* MAX_ID_NAME-2 */ /** MAX_ID_NAME-2. */
char subtarget[64];
} bLocateLikeConstraint; } bLocateLikeConstraint;
/* Copy Scale Constraint */ /* Copy Scale Constraint */
@@ -226,7 +292,8 @@ typedef struct bSizeLikeConstraint {
struct Object *tar; struct Object *tar;
int flag; int flag;
int reserved1; int reserved1;
char subtarget[64]; /* MAX_ID_NAME-2 */ /** MAX_ID_NAME-2. */
char subtarget[64];
} bSizeLikeConstraint; } bSizeLikeConstraint;
/* Maintain Volume Constraint */ /* Maintain Volume Constraint */
@@ -238,7 +305,8 @@ typedef struct bSameVolumeConstraint {
/* Copy Transform Constraint */ /* Copy Transform Constraint */
typedef struct bTransLikeConstraint { typedef struct bTransLikeConstraint {
struct Object *tar; struct Object *tar;
char subtarget[64]; /* MAX_ID_NAME-2 */ /** MAX_ID_NAME-2. */
char subtarget[64];
} bTransLikeConstraint; } bTransLikeConstraint;
/* Floor Constraint */ /* Floor Constraint */
@@ -247,23 +315,28 @@ typedef struct bMinMaxConstraint {
int minmaxflag; int minmaxflag;
float offset; float offset;
int flag; int flag;
short sticky, stuck, pad1, pad2; /* for backward compatibility */ /** For backward compatibility. */
short sticky, stuck, pad1, pad2;
float cache[3]; float cache[3];
char subtarget[64]; /* MAX_ID_NAME-2 */ /** MAX_ID_NAME-2. */
char subtarget[64];
} bMinMaxConstraint; } bMinMaxConstraint;
/* Action Constraint */ /* Action Constraint */
typedef struct bActionConstraint { typedef struct bActionConstraint {
struct Object *tar; struct Object *tar;
short type; /* what transform 'channel' drives the result */ /** What transform 'channel' drives the result. */
short local; /* was used in versions prior to the Constraints recode */ short type;
/** Was used in versions prior to the Constraints recode. */
short local;
int start; int start;
int end; int end;
float min; float min;
float max; float max;
int flag; int flag;
struct bAction *act; struct bAction *act;
char subtarget[64]; /* MAX_ID_NAME-2 */ /** MAX_ID_NAME-2. */
char subtarget[64];
} bActionConstraint; } bActionConstraint;
/* Locked Axis Tracking constraint */ /* Locked Axis Tracking constraint */
@@ -271,7 +344,8 @@ typedef struct bLockTrackConstraint {
struct Object *tar; struct Object *tar;
int trackflag; int trackflag;
int lockflag; int lockflag;
char subtarget[64]; /* MAX_ID_NAME-2 */ /** MAX_ID_NAME-2. */
char subtarget[64];
} bLockTrackConstraint; } bLockTrackConstraint;
/* Damped Tracking constraint */ /* Damped Tracking constraint */
@@ -279,15 +353,19 @@ typedef struct bDampTrackConstraint {
struct Object *tar; struct Object *tar;
int trackflag; int trackflag;
int pad; int pad;
char subtarget[64]; /* MAX_ID_NAME-2 */ /** MAX_ID_NAME-2. */
char subtarget[64];
} bDampTrackConstraint; } bDampTrackConstraint;
/* Follow Path constraints */ /* Follow Path constraints */
typedef struct bFollowPathConstraint { typedef struct bFollowPathConstraint {
struct Object *tar; /* Must be path object */ /** Must be path object. */
struct Object *tar;
float offset; /* Offset in time on the path (in frames), when NOT using 'fixed position' */ /** Offset in time on the path (in frames), when NOT using 'fixed position'. */
float offset_fac; /* Parametric offset factor defining position along path, when using 'fixed position' */ float offset;
/** Parametric offset factor defining position along path, when using 'fixed position'. */
float offset_fac;
int followflag; int followflag;
@@ -306,7 +384,8 @@ typedef struct bStretchToConstraint {
float bulge_min; float bulge_min;
float bulge_max; float bulge_max;
float bulge_smooth; float bulge_smooth;
char subtarget[64]; /* MAX_ID_NAME-2 */ /** MAX_ID_NAME-2. */
char subtarget[64];
} bStretchToConstraint; } bStretchToConstraint;
/* Rigid Body constraint */ /* Rigid Body constraint */
@@ -331,42 +410,63 @@ typedef struct bRigidBodyJointConstraint {
/* Clamp-To Constraint */ /* Clamp-To Constraint */
typedef struct bClampToConstraint { typedef struct bClampToConstraint {
struct Object *tar; /* 'target' must be a curve */ /** 'target' must be a curve. */
int flag; /* which axis/plane to compare owner's location on */ struct Object *tar;
int flag2; /* for legacy reasons, this is flag2. used for any extra settings */ /** Which axis/plane to compare owner's location on . */
int flag;
/** For legacy reasons, this is flag2. used for any extra settings. */
int flag2;
} bClampToConstraint; } bClampToConstraint;
/* Child Of Constraint */ /* Child Of Constraint */
typedef struct bChildOfConstraint { typedef struct bChildOfConstraint {
struct Object *tar; /* object which will act as parent (or target comes from) */ /** Object which will act as parent (or target comes from). */
int flag; /* settings */ struct Object *tar;
/** Settings. */
int flag;
int pad; int pad;
float invmat[4][4]; /* parent-inverse matrix to use */ /** Parent-inverse matrix to use. */
char subtarget[64]; /* string to specify a subobject target, MAX_ID_NAME-2 */ float invmat[4][4];
/** String to specify a subobject target, MAX_ID_NAME-2. */
char subtarget[64];
} bChildOfConstraint; } bChildOfConstraint;
/* Generic Transform->Transform Constraint */ /* Generic Transform->Transform Constraint */
typedef struct bTransformConstraint { typedef struct bTransformConstraint {
struct Object *tar; /* target (i.e. 'driver' object/bone) */ /** Target (i.e. 'driver' object/bone). */
char subtarget[64]; /* MAX_ID_NAME-2 */ struct Object *tar;
/** MAX_ID_NAME-2. */
char subtarget[64];
short from, to; /* can be loc(0), rot(1) or size(2) */ /** Can be loc(0), rot(1) or size(2). */
char map[3]; /* defines which target-axis deform is copied by each owner-axis */ short from, to;
char expo; /* extrapolate motion? if 0, confine to ranges */ /** Defines which target-axis deform is copied by each owner-axis. */
char map[3];
/** Extrapolate motion? if 0, confine to ranges. */
char expo;
float from_min[3]; /* from_min/max defines range of target transform */ /** From_min/max defines range of target transform. */
float from_max[3]; /* to map on to to_min/max range. */ float from_min[3];
float to_min[3]; /* range of motion on owner caused by target */ /** To map on to to_min/max range. */
float from_max[3];
/** Range of motion on owner caused by target . */
float to_min[3];
float to_max[3]; float to_max[3];
float from_min_rot[3]; /* from_min/max defines range of target transform */ /** From_min/max defines range of target transform. */
float from_max_rot[3]; /* to map on to to_min/max range. */ float from_min_rot[3];
float to_min_rot[3]; /* range of motion on owner caused by target */ /** To map on to to_min/max range. */
float from_max_rot[3];
/** Range of motion on owner caused by target . */
float to_min_rot[3];
float to_max_rot[3]; float to_max_rot[3];
float from_min_scale[3]; /* from_min/max defines range of target transform */ /** From_min/max defines range of target transform. */
float from_max_scale[3]; /* to map on to to_min/max range. */ float from_min_scale[3];
float to_min_scale[3]; /* range of motion on owner caused by target */ /** To map on to to_min/max range. */
float from_max_scale[3];
/** Range of motion on owner caused by target . */
float to_min_scale[3];
float to_max_scale[3]; float to_max_scale[3];
} bTransformConstraint; } bTransformConstraint;
@@ -375,17 +475,22 @@ typedef struct bPivotConstraint {
/* Pivot Point: /* Pivot Point:
* Either target object + offset, or just offset is used * Either target object + offset, or just offset is used
*/ */
struct Object *tar; /* target object (optional) */ /** Target object (optional). */
char subtarget[64]; /* subtarget name (optional), MAX_ID_NAME-2 */ struct Object *tar;
float offset[3]; /* offset from the target to use, regardless of whether it exists */ /** Subtarget name (optional), MAX_ID_NAME-2. */
char subtarget[64];
/** Offset from the target to use, regardless of whether it exists. */
float offset[3];
/* Rotation-driven activation: /* Rotation-driven activation:
* This option provides easier one-stop setups for footrolls * This option provides easier one-stop setups for footrolls
*/ */
short rotAxis; /* rotation axes to consider for this (ePivotConstraint_Axis) */ /** Rotation axes to consider for this (ePivotConstraint_Axis). */
short rotAxis;
/* General flags */ /* General flags */
short flag; /* ePivotConstraint_Flag */ /** EPivotConstraint_Flag. */
short flag;
} bPivotConstraint; } bPivotConstraint;
/* transform limiting constraints - zero target ---------------------------- */ /* transform limiting constraints - zero target ---------------------------- */
@@ -419,37 +524,52 @@ typedef struct bSizeLimitConstraint {
/* Limit Distance Constraint */ /* Limit Distance Constraint */
typedef struct bDistLimitConstraint { typedef struct bDistLimitConstraint {
struct Object *tar; struct Object *tar;
char subtarget[64]; /* MAX_ID_NAME-2 */ /** MAX_ID_NAME-2. */
char subtarget[64];
float dist; /* distance (radius of clamping sphere) from target */ /** Distance (radius of clamping sphere) from target. */
float soft; /* distance from clamping-sphere to start applying 'fade' */ float dist;
/** Distance from clamping-sphere to start applying 'fade'. */
float soft;
short flag; /* settings */ /** Settings. */
short mode; /* how to limit in relation to clamping sphere */ short flag;
/** How to limit in relation to clamping sphere. */
short mode;
int pad; int pad;
} bDistLimitConstraint; } bDistLimitConstraint;
/* ShrinkWrap Constraint */ /* ShrinkWrap Constraint */
typedef struct bShrinkwrapConstraint { typedef struct bShrinkwrapConstraint {
struct Object *target; struct Object *target;
float dist; /* distance to kept from target */ /** Distance to kept from target. */
short shrinkType; /* shrink type (look on MOD shrinkwrap for values) */ float dist;
char projAxis; /* axis to project/constrain */ /** Shrink type (look on MOD shrinkwrap for values). */
char projAxisSpace; /* space to project axis in */ short shrinkType;
float projLimit; /* distance to search */ /** Axis to project/constrain. */
char shrinkMode; /* inside/outside/on surface (see MOD shrinkwrap) */ char projAxis;
char flag; /* options */ /** Space to project axis in. */
char trackAxis; /* axis to align to normal */ char projAxisSpace;
/** Distance to search. */
float projLimit;
/** Inside/outside/on surface (see MOD shrinkwrap). */
char shrinkMode;
/** Options. */
char flag;
/** Axis to align to normal. */
char trackAxis;
char pad; char pad;
} bShrinkwrapConstraint; } bShrinkwrapConstraint;
/* Follow Track constraints */ /* Follow Track constraints */
typedef struct bFollowTrackConstraint { typedef struct bFollowTrackConstraint {
struct MovieClip *clip; struct MovieClip *clip;
char track[64]; /* MAX_NAME */ /** MAX_NAME. */
char track[64];
int flag; int flag;
int frame_method; int frame_method;
char object[64]; /* MAX_NAME */ /** MAX_NAME. */
char object[64];
struct Object *camera; struct Object *camera;
struct Object *depth_ob; struct Object *depth_ob;
} bFollowTrackConstraint; } bFollowTrackConstraint;
@@ -464,8 +584,10 @@ typedef struct bCameraSolverConstraint {
typedef struct bObjectSolverConstraint { typedef struct bObjectSolverConstraint {
struct MovieClip *clip; struct MovieClip *clip;
int flag, pad; int flag, pad;
char object[64]; /* MAX_NAME */ /** MAX_NAME. */
float invmat[4][4]; /* parent-inverse matrix to use */ char object[64];
/** Parent-inverse matrix to use. */
float invmat[4][4];
struct Object *camera; struct Object *camera;
} bObjectSolverConstraint; } bObjectSolverConstraint;
@@ -473,7 +595,8 @@ typedef struct bObjectSolverConstraint {
typedef struct bTransformCacheConstraint { typedef struct bTransformCacheConstraint {
struct CacheFile *cache_file; struct CacheFile *cache_file;
struct CacheReader *reader; struct CacheReader *reader;
char object_path[1024]; /* FILE_MAX */ /** FILE_MAX. */
char object_path[1024];
} bTransformCacheConstraint; } bTransformCacheConstraint;
/* ------------------------------------------ */ /* ------------------------------------------ */

View File

@@ -53,7 +53,8 @@ struct GHash;
# #
# #
typedef struct PathPoint { typedef struct PathPoint {
float vec[4]; /* grr, cant get rid of tilt yet */ /** Grr, cant get rid of tilt yet. */
float vec[4];
float quat[4]; float quat[4];
float radius, weight; float radius, weight;
} PathPoint; } PathPoint;
@@ -72,8 +73,10 @@ typedef struct Path {
# #
typedef struct BevPoint { typedef struct BevPoint {
float vec[3], alfa, radius, weight, offset; float vec[3], alfa, radius, weight, offset;
float sina, cosa; /* 2D Only */ /** 2D Only. */
float dir[3], tan[3], quat[4]; /* 3D Only */ float sina, cosa;
/** 3D Only. */
float dir[3], tan[3], quat[4];
short split_tag, dupe_tag; short split_tag, dupe_tag;
} BevPoint; } BevPoint;
@@ -109,29 +112,41 @@ typedef struct BevList {
*/ */
typedef struct BezTriple { typedef struct BezTriple {
float vec[3][3]; float vec[3][3];
float alfa, weight, radius; /* alfa: tilt in 3D View, weight: used for softbody goal weight, radius: for bevel tapering */ /** Alfa: tilt in 3D View, weight: used for softbody goal weight, radius: for bevel tapering. */
float alfa, weight, radius;
char ipo; /* ipo: interpolation mode for segment from this BezTriple to the next */ /** Ipo: interpolation mode for segment from this BezTriple to the next. */
char ipo;
char h1, h2; /* h1, h2: the handle type of the two handles */ /** H1, h2: the handle type of the two handles. */
char f1, f2, f3; /* f1, f2, f3: used for selection status */ char h1, h2;
/** F1, f2, f3: used for selection status. */
char f1, f2, f3;
char hide; /* hide: used to indicate whether BezTriple is hidden (3D), type of keyframe (eBezTriple_KeyframeType) */ /** Hide: used to indicate whether BezTriple is hidden (3D), type of keyframe (eBezTriple_KeyframeType). */
char hide;
char easing; /* easing: easing type for interpolation mode (eBezTriple_Easing) */ /** Easing: easing type for interpolation mode (eBezTriple_Easing). */
float back; /* BEZT_IPO_BACK */ char easing;
float amplitude, period; /* BEZT_IPO_ELASTIC */ /** BEZT_IPO_BACK. */
float back;
/** BEZT_IPO_ELASTIC. */
float amplitude, period;
char f5; /* f5: used for auto handle to distinguish between normal handle and exception (extrema) */ /** F5: used for auto handle to distinguish between normal handle and exception (extrema). */
char f5;
char pad[3]; char pad[3];
} BezTriple; } BezTriple;
/* note; alfa location in struct is abused by Key system */ /* note; alfa location in struct is abused by Key system */
typedef struct BPoint { typedef struct BPoint {
float vec[4]; float vec[4];
float alfa, weight; /* alfa: tilt in 3D View, weight: used for softbody goal weight */ /** Alfa: tilt in 3D View, weight: used for softbody goal weight. */
short f1, hide; /* f1: selection status, hide: is point hidden or not */ float alfa, weight;
float radius, pad; /* user-set radius per point for beveling etc */ /** F1: selection status, hide: is point hidden or not. */
short f1, hide;
/** User-set radius per point for beveling etc. */
float radius, pad;
} BPoint; } BPoint;
/** /**
@@ -139,13 +154,17 @@ typedef struct BPoint {
* also, it should be NURBS (Nurb isn't the singular of Nurbs). * also, it should be NURBS (Nurb isn't the singular of Nurbs).
*/ */
typedef struct Nurb { typedef struct Nurb {
struct Nurb *next, *prev; /* multiple nurbs per curve object are allowed */ /** Multiple nurbs per curve object are allowed. */
struct Nurb *next, *prev;
short type; short type;
short mat_nr; /* index into material list */ /** Index into material list. */
short mat_nr;
short hide, flag; short hide, flag;
int pntsu, pntsv; /* number of points in the U or V directions */ /** Number of points in the U or V directions. */
int pntsu, pntsv;
short pad[2]; short pad[2];
short resolu, resolv; /* tessellation resolution in the U or V directions */ /** Tessellation resolution in the U or V directions. */
short resolu, resolv;
short orderu, orderv; short orderu, orderv;
short flagu, flagv; short flagu, flagv;
@@ -153,7 +172,8 @@ typedef struct Nurb {
BPoint *bp; BPoint *bp;
BezTriple *bezt; BezTriple *bezt;
short tilt_interp; /* KEY_LINEAR, KEY_CARDINAL, KEY_BSPLINE */ /** KEY_LINEAR, KEY_CARDINAL, KEY_BSPLINE. */
short tilt_interp;
short radius_interp; short radius_interp;
/* only used for dynamically generated Nurbs created from OB_FONT's */ /* only used for dynamically generated Nurbs created from OB_FONT's */
@@ -162,7 +182,8 @@ typedef struct Nurb {
typedef struct CharInfo { typedef struct CharInfo {
short kern; short kern;
short mat_nr; /* index start at 1, unlike mesh & nurbs */ /** Index start at 1, unlike mesh & nurbs. */
short mat_nr;
char flag; char flag;
char pad; char pad;
short pad2; short pad2;
@@ -187,16 +208,20 @@ typedef struct EditNurb {
typedef struct Curve { typedef struct Curve {
ID id; ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ /** Animation data (must be immediately after id for utilities to use it). */
struct AnimData *adt;
struct BoundBox *bb; struct BoundBox *bb;
ListBase nurb; /* actual data, called splines in rna */ /** Actual data, called splines in rna. */
ListBase nurb;
EditNurb *editnurb; /* edited data, not in file, use pointer so we can check for it */ /** Edited data, not in file, use pointer so we can check for it. */
EditNurb *editnurb;
struct Object *bevobj, *taperobj, *textoncurve; struct Object *bevobj, *taperobj, *textoncurve;
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ /** Old animation system, deprecated for 2.5. */
struct Ipo *ipo DNA_DEPRECATED;
struct Key *key; struct Key *key;
struct Material **mat; struct Material **mat;
@@ -205,9 +230,11 @@ typedef struct Curve {
float size[3]; float size[3];
float rot[3]; float rot[3];
short type; /* creation-time type of curve datablock */ /** Creation-time type of curve datablock. */
short type;
short texflag; /* keep a short because of BKE_object_obdata_texspace_get() */ /** Keep a short because of BKE_object_obdata_texspace_get(). */
short texflag;
short drawflag, twist_mode; short drawflag, twist_mode;
float twist_smooth, smallcaps_scale; float twist_smooth, smallcaps_scale;
@@ -241,8 +268,10 @@ typedef struct Curve {
int selstart, selend; int selstart, selend;
/* text data */ /* text data */
int len_wchar; /* number of characters (strinfo) */ /** Number of characters (strinfo). */
int len; /* number of bytes (str - utf8) */ int len_wchar;
/** Number of bytes (str - utf8). */
int len;
char *str; char *str;
struct EditFont *editfont; struct EditFont *editfont;
@@ -260,7 +289,8 @@ typedef struct Curve {
/* font part end */ /* font part end */
float ctime; /* current evaltime - for use by Objects parented to curves */ /** Current evaltime - for use by Objects parented to curves. */
float ctime;
float bevfac1, bevfac2; float bevfac1, bevfac2;
char bevfac1_mapping, bevfac2_mapping; char bevfac1_mapping, bevfac2_mapping;

View File

@@ -40,37 +40,56 @@ extern "C" {
/** descriptor and storage for a custom data layer */ /** descriptor and storage for a custom data layer */
typedef struct CustomDataLayer { typedef struct CustomDataLayer {
int type; /* type of data in layer */ /** Type of data in layer. */
int offset; /* in editmode, offset of layer in block */ int type;
int flag; /* general purpose flag */ /** In editmode, offset of layer in block. */
int active; /* number of the active layer of this type */ int offset;
int active_rnd; /* number of the layer to render*/ /** General purpose flag. */
int active_clone; /* number of the layer to render*/ int flag;
int active_mask; /* number of the layer to render*/ /** Number of the active layer of this type. */
int uid; /* shape keyblock unique id reference*/ int active;
char name[64]; /* layer name, MAX_CUSTOMDATA_LAYER_NAME */ /** Number of the layer to rende.r*/
void *data; /* layer data */ int active_rnd;
/** Number of the layer to rende.r*/
int active_clone;
/** Number of the layer to rende.r*/
int active_mask;
/** Shape keyblock unique id referenc.e*/
int uid;
/** Layer name, MAX_CUSTOMDATA_LAYER_NAME. */
char name[64];
/** Layer data. */
void *data;
} CustomDataLayer; } CustomDataLayer;
#define MAX_CUSTOMDATA_LAYER_NAME 64 #define MAX_CUSTOMDATA_LAYER_NAME 64
typedef struct CustomDataExternal { typedef struct CustomDataExternal {
char filename[1024]; /* FILE_MAX */ /** FILE_MAX. */
char filename[1024];
} CustomDataExternal; } CustomDataExternal;
/** structure which stores custom element data associated with mesh elements /** structure which stores custom element data associated with mesh elements
* (vertices, edges or faces). The custom data is organized into a series of * (vertices, edges or faces). The custom data is organized into a series of
* layers, each with a data type (e.g. MTFace, MDeformVert, etc.). */ * layers, each with a data type (e.g. MTFace, MDeformVert, etc.). */
typedef struct CustomData { typedef struct CustomData {
CustomDataLayer *layers; /* CustomDataLayers, ordered by type */ /** CustomDataLayers, ordered by type. */
int typemap[42]; /* runtime only! - maps types to indices of first layer of that type, CustomDataLayer *layers;
/**
* runtime only! - maps types to indices of first layer of that type,
* MUST be >= CD_NUMTYPES, but we cant use a define here. * MUST be >= CD_NUMTYPES, but we cant use a define here.
* Correct size is ensured in CustomData_update_typemap assert() */ * Correct size is ensured in CustomData_update_typemap assert().
*/
int typemap[42];
int pad_i1; int pad_i1;
int totlayer, maxlayer; /* number of layers, size of layers array */ /** Number of layers, size of layers array. */
int totsize; /* in editmode, total size of all data layers */ int totlayer, maxlayer;
struct BLI_mempool *pool; /* (BMesh Only): Memory pool for allocation of blocks */ /** In editmode, total size of all data layers. */
CustomDataExternal *external; /* external file storing customdata layers */ int totsize;
/** (BMesh Only): Memory pool for allocation of blocks. */
struct BLI_mempool *pool;
/** External file storing customdata layers. */
CustomDataExternal *external;
} CustomData; } CustomData;
/* CustomData.type */ /* CustomData.type */

View File

@@ -101,7 +101,8 @@ enum {
typedef struct DynamicPaintSurface { typedef struct DynamicPaintSurface {
struct DynamicPaintSurface *next, *prev; struct DynamicPaintSurface *next, *prev;
struct DynamicPaintCanvasSettings *canvas; /* for fast RNA access */ /** For fast RNA access. */
struct DynamicPaintCanvasSettings *canvas;
struct PaintSurfaceData *data; struct PaintSurfaceData *data;
struct Collection *brush_group; struct Collection *brush_group;
@@ -116,8 +117,10 @@ typedef struct DynamicPaintSurface {
char name[64]; char name[64];
short format, type; short format, type;
short disp_type, image_fileformat; short disp_type, image_fileformat;
short effect_ui; /* ui selection box */ /** Ui selection box. */
short preview_id; /* surface output id to preview */ short effect_ui;
/** Surface output id to preview. */
short preview_id;
short init_color_type, pad_s; short init_color_type, pad_s;
int flags, effect; int flags, effect;
@@ -127,7 +130,8 @@ typedef struct DynamicPaintSurface {
/* initial color */ /* initial color */
float init_color[4]; float init_color[4];
struct Tex *init_texture; struct Tex *init_texture;
char init_layername[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ /** MAX_CUSTOMDATA_LAYER_NAME. */
char init_layername[64];
int dry_speed, diss_speed; int dry_speed, diss_speed;
float color_dry_threshold; float color_dry_threshold;
@@ -143,10 +147,14 @@ typedef struct DynamicPaintSurface {
float wave_damping, wave_speed, wave_timescale, wave_spring, wave_smoothness; float wave_damping, wave_speed, wave_timescale, wave_spring, wave_smoothness;
int pad2; int pad2;
char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ /** MAX_CUSTOMDATA_LAYER_NAME. */
char image_output_path[1024]; /* 1024 = FILE_MAX */ char uvlayer_name[64];
char output_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ /** 1024 = FILE_MAX. */
char output_name2[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ /* some surfaces have 2 outputs */ char image_output_path[1024];
/** MAX_CUSTOMDATA_LAYER_NAME. */
char output_name[64];
/** MAX_CUSTOMDATA_LAYER_NAME */ /* some surfaces have 2 outputs. */
char output_name2[64];
} DynamicPaintSurface; } DynamicPaintSurface;
@@ -162,14 +170,16 @@ enum {
/* Canvas settings */ /* Canvas settings */
typedef struct DynamicPaintCanvasSettings { typedef struct DynamicPaintCanvasSettings {
struct DynamicPaintModifierData *pmd; /* for fast RNA access */ /** For fast RNA access. */
struct DynamicPaintModifierData *pmd;
struct Mesh *mesh; struct Mesh *mesh;
struct ListBase surfaces; struct ListBase surfaces;
short active_sur, flags; short active_sur, flags;
int pad; int pad;
char error[64]; /* Bake error description */ /** Bake error description. */
char error[64];
} DynamicPaintCanvasSettings; } DynamicPaintCanvasSettings;
@@ -228,7 +238,8 @@ enum {
/* Brush settings */ /* Brush settings */
typedef struct DynamicPaintBrushSettings { typedef struct DynamicPaintBrushSettings {
struct DynamicPaintModifierData *pmd; /* for fast RNA access */ /** For fast RNA access. */
struct DynamicPaintModifierData *pmd;
struct Mesh *mesh; struct Mesh *mesh;
struct ParticleSystem *psys; struct ParticleSystem *psys;
@@ -242,8 +253,10 @@ typedef struct DynamicPaintBrushSettings {
float paint_distance; float paint_distance;
/* color ramps */ /* color ramps */
struct ColorBand *paint_ramp; /* Proximity paint falloff */ /** Proximity paint falloff. */
struct ColorBand *vel_ramp; /* Velocity paint ramp */ struct ColorBand *paint_ramp;
/** Velocity paint ramp. */
struct ColorBand *vel_ramp;
short proximity_falloff; short proximity_falloff;
short wave_type; short wave_type;

View File

@@ -118,8 +118,10 @@ typedef struct PartEff {
short staticstep, omat, timetex, speedtex, flag2, flag2neg; short staticstep, omat, timetex, speedtex, flag2, flag2neg;
short disp, vertgroup_v; short disp, vertgroup_v;
char vgroupname[64], vgroupname_v[64]; /* MAX_VGROUP_NAME */ /** MAX_VGROUP_NAME. */
float imat[4][4]; /* inverse matrix of parent Object */ char vgroupname[64], vgroupname_v[64];
/** Inverse matrix of parent Object. */
float imat[4][4];
Particle *keys; Particle *keys;
struct Collection *group; struct Collection *group;

View File

@@ -37,7 +37,8 @@
* the moment of saving, and the file-specific settings. * the moment of saving, and the file-specific settings.
*/ */
typedef struct FileGlobal { typedef struct FileGlobal {
char subvstr[4]; /* needs to be here, for human fileformat recognition */ /** Needs to be here, for human fileformat recognition. */
char subvstr[4];
short subversion; short subversion;
short minversion, minsubversion; short minversion, minsubversion;
char pad[6]; char pad[6];
@@ -48,10 +49,12 @@ typedef struct FileGlobal {
int fileflags; int fileflags;
int globalf; int globalf;
uint64_t build_commit_timestamp; /* commit timestamp from buildinfo */ /** Commit timestamp from buildinfo. */
char build_hash[16]; /* hash from buildinfo */ uint64_t build_commit_timestamp;
/* file path where this was saved, for recover */ /** Hash from buildinfo. */
char filename[1024]; /* 1024 = FILE_MAX */ char build_hash[16];
/** File path where this was saved, for recover (1024 = FILE_MAX). */
char filename[1024];
} FileGlobal; } FileGlobal;

View File

@@ -116,16 +116,21 @@ enum {
typedef struct FreestyleLineSet { typedef struct FreestyleLineSet {
struct FreestyleLineSet *next, *prev; struct FreestyleLineSet *next, *prev;
char name[64]; /* line set name, MAX_NAME */ /** Line set name, MAX_NAME. */
char name[64];
int flags; int flags;
int selection; /* selection criteria */ /** Selection criteria. */
short qi; /* quantitative invisibility */ int selection;
/** Quantitative invisibility. */
short qi;
short pad1; short pad1;
int qi_start, qi_end; int qi_start, qi_end;
int edge_types, exclude_edge_types; /* feature edge types */ /** Feature edge types. */
int edge_types, exclude_edge_types;
int pad2; int pad2;
struct Collection *group; /* group of target objects */ /** Group of target objects. */
struct Collection *group;
struct FreestyleLineStyle *linestyle; struct FreestyleLineStyle *linestyle;
} FreestyleLineSet; } FreestyleLineSet;
@@ -141,12 +146,15 @@ typedef struct FreestyleModuleConfig {
typedef struct FreestyleConfig { typedef struct FreestyleConfig {
ListBase modules; ListBase modules;
int mode; /* scripting, editor */ /** Scripting, editor. */
int mode;
int raycasting_algorithm DNA_DEPRECATED; int raycasting_algorithm DNA_DEPRECATED;
int flags; /* suggestive contours, ridges/valleys, material boundaries */ /** Suggestive contours, ridges/valleys, material boundaries. */
int flags;
float sphere_radius; float sphere_radius;
float dkr_epsilon; float dkr_epsilon;
float crease_angle; /* in radians! */ /** In radians!. */
float crease_angle;
ListBase linesets; ListBase linesets;
} FreestyleConfig; } FreestyleConfig;

View File

@@ -35,11 +35,14 @@
struct SDNA; struct SDNA;
/* DNAstr contains the prebuilt SDNA structure defining the layouts of the types /**
* DNAstr contains the prebuilt SDNA structure defining the layouts of the types
* used by this version of Blender. It is defined in a file dna.c, which is * used by this version of Blender. It is defined in a file dna.c, which is
* generated by the makesdna program during the build process (see makesdna.c). */ * generated by the makesdna program during the build process (see makesdna.c).
*/
extern const unsigned char DNAstr[]; extern const unsigned char DNAstr[];
extern const int DNAlen; /* length of DNAstr */ /** Length of DNAstr. */
extern const int DNAlen;
/** /**
* Primitive (non-struct, non-pointer/function/array) types, * Primitive (non-struct, non-pointer/function/array) types,

View File

@@ -74,24 +74,35 @@ typedef struct GpencilModifierData {
int stackindex; int stackindex;
short flag; short flag;
short _pad; short _pad;
char name[64]; /* MAX_NAME */ /** MAX_NAME. */
char name[64];
char *error; char *error;
} GpencilModifierData; } GpencilModifierData;
typedef struct NoiseGpencilModifierData { typedef struct NoiseGpencilModifierData {
GpencilModifierData modifier; GpencilModifierData modifier;
char layername[64]; /* layer name */ /** Layer name. */
char vgname[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ char layername[64];
int pass_index; /* custom index for passes */ /** Optional vertexgroup name, MAX_VGROUP_NAME. */
int flag; /* several flags */ char vgname[64];
float factor; /* factor of noise */ /** Custom index for passes. */
int step; /* how many frames before recalculate randoms */ int pass_index;
int gp_frame; /* last gp frame used */ /** Several flags. */
int scene_frame; /* last scene frame used */ int flag;
float vrand1, vrand2; /* random values */ /** Factor of noise. */
float factor;
/** How many frames before recalculate randoms. */
int step;
/** Last gp frame used. */
int gp_frame;
/** Last scene frame used. */
int scene_frame;
/** Random values. */
float vrand1, vrand2;
struct RNG *rng; struct RNG *rng;
int layer_pass; /* custom index for passes */ /** Custom index for passes. */
int layer_pass;
char _pad[4]; char _pad[4];
} NoiseGpencilModifierData; } NoiseGpencilModifierData;
@@ -111,11 +122,16 @@ typedef enum eNoiseGpencil_Flag {
typedef struct SubdivGpencilModifierData { typedef struct SubdivGpencilModifierData {
GpencilModifierData modifier; GpencilModifierData modifier;
char layername[64]; /* layer name */ /** Layer name. */
int pass_index; /* custom index for passes */ char layername[64];
int flag; /* flags */ /** Custom index for passes. */
int level; /* factor of subdivision */ int pass_index;
int layer_pass; /* custom index for passes */ /** Flags. */
int flag;
/** Factor of subdivision. */
int level;
/** Custom index for passes. */
int layer_pass;
} SubdivGpencilModifierData; } SubdivGpencilModifierData;
typedef enum eSubdivGpencil_Flag { typedef enum eSubdivGpencil_Flag {
@@ -127,12 +143,18 @@ typedef enum eSubdivGpencil_Flag {
typedef struct ThickGpencilModifierData { typedef struct ThickGpencilModifierData {
GpencilModifierData modifier; GpencilModifierData modifier;
char layername[64]; /* layer name */ /** Layer name. */
char vgname[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ char layername[64];
int pass_index; /* custom index for passes */ /** Optional vertexgroup name, MAX_VGROUP_NAME. */
int flag; /* flags */ char vgname[64];
int thickness; /* Thickness change */ /** Custom index for passes. */
int layer_pass; /* custom index for passes */ int pass_index;
/** Flags. */
int flag;
/** Thickness change. */
int thickness;
/** Custom index for passes. */
int layer_pass;
struct CurveMapping *curve_thickness; struct CurveMapping *curve_thickness;
} ThickGpencilModifierData; } ThickGpencilModifierData;
@@ -147,13 +169,18 @@ typedef enum eThickGpencil_Flag {
typedef struct TimeGpencilModifierData { typedef struct TimeGpencilModifierData {
GpencilModifierData modifier; GpencilModifierData modifier;
char layername[64]; /* layer name */ /** Layer name. */
int layer_pass; /* custom index for passes */ char layername[64];
int flag; /* flags */ /** Custom index for passes. */
int layer_pass;
/** Flags. */
int flag;
int offset; int offset;
float frame_scale; /* animation scale */ /** Animation scale. */
float frame_scale;
int mode; int mode;
int sfra, efra; /* start and end frame for custom range */ /** Start and end frame for custom range. */
int sfra, efra;
char _pad[4]; char _pad[4];
} TimeGpencilModifierData; } TimeGpencilModifierData;
@@ -179,14 +206,21 @@ typedef enum eModifyColorGpencil_Flag {
typedef struct TintGpencilModifierData { typedef struct TintGpencilModifierData {
GpencilModifierData modifier; GpencilModifierData modifier;
char layername[64]; /* layer name */ /** Layer name. */
int pass_index; /* custom index for passes */ char layername[64];
int flag; /* flags */ /** Custom index for passes. */
float rgb[3]; /* Tint color */ int pass_index;
float factor; /* Mix factor */ /** Flags. */
char modify_color; /* modify stroke, fill or both */ int flag;
/** Tint color. */
float rgb[3];
/** Mix factor. */
float factor;
/** Modify stroke, fill or both. */
char modify_color;
char _pad[7]; char _pad[7];
int layer_pass; /* custom index for passes */ /** Custom index for passes. */
int layer_pass;
char _pad1[4]; char _pad1[4];
} TintGpencilModifierData; } TintGpencilModifierData;
@@ -199,13 +233,19 @@ typedef enum eTintGpencil_Flag {
typedef struct ColorGpencilModifierData { typedef struct ColorGpencilModifierData {
GpencilModifierData modifier; GpencilModifierData modifier;
char layername[64]; /* layer name */ /** Layer name. */
int pass_index; /* custom index for passes */ char layername[64];
int flag; /* flags */ /** Custom index for passes. */
float hsv[3]; /* hsv factors */ int pass_index;
char modify_color; /* modify stroke, fill or both */ /** Flags. */
int flag;
/** Hsv factors. */
float hsv[3];
/** Modify stroke, fill or both. */
char modify_color;
char _pad[3]; char _pad[3];
int layer_pass; /* custom index for passes */ /** Custom index for passes. */
int layer_pass;
char _pad1[4]; char _pad1[4];
} ColorGpencilModifierData; } ColorGpencilModifierData;
@@ -218,14 +258,21 @@ typedef enum eColorGpencil_Flag {
typedef struct OpacityGpencilModifierData { typedef struct OpacityGpencilModifierData {
GpencilModifierData modifier; GpencilModifierData modifier;
char layername[64]; /* layer name */ /** Layer name. */
char vgname[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ char layername[64];
int pass_index; /* custom index for passes */ /** Optional vertexgroup name, MAX_VGROUP_NAME. */
int flag; /* flags */ char vgname[64];
float factor; /* Main Opacity factor */ /** Custom index for passes. */
char modify_color; /* modify stroke, fill or both */ int pass_index;
/** Flags. */
int flag;
/** Main Opacity factor. */
float factor;
/** Modify stroke, fill or both. */
char modify_color;
char _pad[3]; char _pad[3];
int layer_pass; /* custom index for passes */ /** Custom index for passes. */
int layer_pass;
char _pad1[4]; char _pad1[4];
} OpacityGpencilModifierData; } OpacityGpencilModifierData;
@@ -240,21 +287,34 @@ typedef enum eOpacityGpencil_Flag {
typedef struct ArrayGpencilModifierData { typedef struct ArrayGpencilModifierData {
GpencilModifierData modifier; GpencilModifierData modifier;
struct Object *object; struct Object *object;
int count; /* number of elements in array */ /** Number of elements in array. */
int flag; /* several flags */ int count;
float offset[3]; /* Location increments */ /** Several flags. */
float shift[3]; /* shift increment */ int flag;
float rnd_size; /* random size factor */ /** Location increments. */
float rnd_rot; /* random size factor */ float offset[3];
float rot[3]; /* Rotation changes */ /** Shift increment. */
float scale[3]; /* Scale changes */ float shift[3];
float rnd[20]; /* (first element is the index) random values */ /** Random size factor. */
float rnd_size;
/** Random size factor. */
float rnd_rot;
/** Rotation changes. */
float rot[3];
/** Scale changes. */
float scale[3];
/** (first element is the index) random values. */
float rnd[20];
char _pad[4]; char _pad[4];
int pass_index; /* custom index for passes */ /** Custom index for passes. */
char layername[64]; /* layer name */ int pass_index;
int mat_rpl; /* material replace (0 keep default) */ /** Layer name. */
int layer_pass; /* custom index for passes */ char layername[64];
/** Material replace (0 keep default). */
int mat_rpl;
/** Custom index for passes. */
int layer_pass;
} ArrayGpencilModifierData; } ArrayGpencilModifierData;
typedef enum eArrayGpencil_Flag { typedef enum eArrayGpencil_Flag {
@@ -269,23 +329,38 @@ typedef enum eArrayGpencil_Flag {
typedef struct BuildGpencilModifierData { typedef struct BuildGpencilModifierData {
GpencilModifierData modifier; GpencilModifierData modifier;
char layername[64]; /* if set, restrict modifier to operating on this layer */ /** If set, restrict modifier to operating on this layer. */
char layername[64];
int pass_index; int pass_index;
int layer_pass; /* custom index for passes */ /** Custom index for passes. */
int layer_pass;
float start_frame; /* If GP_BUILD_RESTRICT_TIME is set, the defines the frame range where GP frames are considered */ /**
* If GP_BUILD_RESTRICT_TIME is set,
* the defines the frame range where GP frames are considered.
*/
float start_frame;
float end_frame; float end_frame;
float start_delay; /* For each pair of gp keys, number of frames before strokes start appearing */ /** For each pair of gp keys, number of frames before strokes start appearing. */
float length; /* For each pair of gp keys, number of frames that build effect must be completed within */ float start_delay;
/** For each pair of gp keys, number of frames that build effect must be completed within. */
float length;
short flag; /* (eGpencilBuild_Flag) Options for controlling modifier behavior */ /** (eGpencilBuild_Flag) Options for controlling modifier behavior. */
short flag;
short mode; /* (eGpencilBuild_Mode) How are strokes ordered */ /** (eGpencilBuild_Mode) How are strokes ordered. */
short transition; /* (eGpencilBuild_Transition) In what order do stroke points appear/disappear */ short mode;
/** (eGpencilBuild_Transition) In what order do stroke points appear/disappear. */
short transition;
short time_alignment; /* (eGpencilBuild_TimeAlignment) For the "Concurrent" mode, when should "shorter" strips start/end */ /**
* (eGpencilBuild_TimeAlignment)
* For the "Concurrent" mode, when should "shorter" strips start/end.
*/
short time_alignment;
} BuildGpencilModifierData; } BuildGpencilModifierData;
typedef enum eBuildGpencil_Mode { typedef enum eBuildGpencil_Mode {
@@ -326,13 +401,19 @@ typedef enum eBuildGpencil_Flag {
typedef struct LatticeGpencilModifierData { typedef struct LatticeGpencilModifierData {
GpencilModifierData modifier; GpencilModifierData modifier;
struct Object *object; struct Object *object;
char layername[64]; /* layer name */ /** Layer name. */
char vgname[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ char layername[64];
int pass_index; /* custom index for passes */ /** Optional vertexgroup name, MAX_VGROUP_NAME. */
int flag; /* flags */ char vgname[64];
/** Custom index for passes. */
int pass_index;
/** Flags. */
int flag;
float strength; float strength;
int layer_pass; /* custom index for passes */ /** Custom index for passes. */
void *cache_data; /* runtime only (LatticeDeformData) */ int layer_pass;
/** Runtime only (LatticeDeformData). */
void *cache_data;
} LatticeGpencilModifierData; } LatticeGpencilModifierData;
typedef enum eLatticeGpencil_Flag { typedef enum eLatticeGpencil_Flag {
@@ -345,10 +426,14 @@ typedef enum eLatticeGpencil_Flag {
typedef struct MirrorGpencilModifierData { typedef struct MirrorGpencilModifierData {
GpencilModifierData modifier; GpencilModifierData modifier;
struct Object *object; struct Object *object;
char layername[64]; /* layer name */ /** Layer name. */
int pass_index; /* custom index for passes */ char layername[64];
int flag; /* flags */ /** Custom index for passes. */
int layer_pass; /* custom index for passes */ int pass_index;
/** Flags. */
int flag;
/** Custom index for passes. */
int layer_pass;
char _pad[4]; char _pad[4];
} MirrorGpencilModifierData; } MirrorGpencilModifierData;
@@ -366,19 +451,28 @@ typedef struct HookGpencilModifierData {
GpencilModifierData modifier; GpencilModifierData modifier;
struct Object *object; struct Object *object;
char subtarget[64]; /* optional name of bone target, MAX_ID_NAME-2 */ /** Optional name of bone target, MAX_ID_NAME-2. */
char layername[64]; /* layer name */ char subtarget[64];
char vgname[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ /** Layer name. */
int pass_index; /* custom index for passes */ char layername[64];
int layer_pass; /* custom index for passes */ /** Optional vertexgroup name, MAX_VGROUP_NAME. */
char vgname[64];
/** Custom index for passes. */
int pass_index;
/** Custom index for passes. */
int layer_pass;
char _pad[4]; char _pad[4];
int flag; int flag;
char falloff_type; /* use enums from WarpGpencilModifier (exact same functionality) */ /** Use enums from WarpGpencilModifier (exact same functionality). */
char falloff_type;
char _pad1[3]; char _pad1[3];
float parentinv[4][4]; /* matrix making current transform unmodified */ /** Matrix making current transform unmodified. */
float cent[3]; /* visualization of hook */ float parentinv[4][4];
float falloff; /* if not zero, falloff is distance where influence zero */ /** Visualization of hook. */
float cent[3];
/** If not zero, falloff is distance where influence zero. */
float falloff;
float force; float force;
struct CurveMapping *curfalloff; struct CurveMapping *curfalloff;
} HookGpencilModifierData; } HookGpencilModifierData;
@@ -405,13 +499,20 @@ typedef enum eHookGpencil_Falloff {
typedef struct SimplifyGpencilModifierData { typedef struct SimplifyGpencilModifierData {
GpencilModifierData modifier; GpencilModifierData modifier;
char layername[64]; /* layer name */ /** Layer name. */
int pass_index; /* custom index for passes */ char layername[64];
int flag; /* flags */ /** Custom index for passes. */
float factor; /* factor of simplify */ int pass_index;
short mode; /* type of simplify */ /** Flags. */
short step; /* every n vertex to keep */ int flag;
int layer_pass; /* custom index for passes */ /** Factor of simplify. */
float factor;
/** Type of simplify. */
short mode;
/** Every n vertex to keep. */
short step;
/** Custom index for passes. */
int layer_pass;
char _pad[4]; char _pad[4];
} SimplifyGpencilModifierData; } SimplifyGpencilModifierData;
@@ -430,14 +531,19 @@ typedef enum eSimplifyGpencil_Mode {
typedef struct OffsetGpencilModifierData { typedef struct OffsetGpencilModifierData {
GpencilModifierData modifier; GpencilModifierData modifier;
char layername[64]; /* layer name */ /** Layer name. */
char vgname[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ char layername[64];
int pass_index; /* custom index for passes */ /** Optional vertexgroup name, MAX_VGROUP_NAME. */
int flag; /* flags */ char vgname[64];
/** Custom index for passes. */
int pass_index;
/** Flags. */
int flag;
float loc[3]; float loc[3];
float rot[3]; float rot[3];
float scale[3]; float scale[3];
int layer_pass; /* custom index for passes */ /** Custom index for passes. */
int layer_pass;
} OffsetGpencilModifierData; } OffsetGpencilModifierData;
typedef enum eOffsetGpencil_Flag { typedef enum eOffsetGpencil_Flag {
@@ -449,13 +555,20 @@ typedef enum eOffsetGpencil_Flag {
typedef struct SmoothGpencilModifierData { typedef struct SmoothGpencilModifierData {
GpencilModifierData modifier; GpencilModifierData modifier;
char layername[64]; /* layer name */ /** Layer name. */
char vgname[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ char layername[64];
int pass_index; /* custom index for passes */ /** Optional vertexgroup name, MAX_VGROUP_NAME. */
int flag; /* several flags */ char vgname[64];
float factor; /* factor of noise */ /** Custom index for passes. */
int step; /* how many times apply smooth */ int pass_index;
int layer_pass; /* custom index for passes */ /** Several flags. */
int flag;
/** Factor of noise. */
float factor;
/** How many times apply smooth. */
int step;
/** Custom index for passes. */
int layer_pass;
char _pad[4]; char _pad[4];
} SmoothGpencilModifierData; } SmoothGpencilModifierData;
@@ -472,11 +585,14 @@ typedef enum eSmoothGpencil_Flag {
typedef struct ArmatureGpencilModifierData { typedef struct ArmatureGpencilModifierData {
GpencilModifierData modifier; GpencilModifierData modifier;
short deformflag, multi; /* deformflag replaces armature->deformflag */ /** Deformflag replaces armature->deformflag. */
short deformflag, multi;
int _pad; int _pad;
struct Object *object; struct Object *object;
float *prevCos; /* stored input of previous modifier, for vertexgroup blending */ /** Stored input of previous modifier, for vertexgroup blending. */
char vgname[64]; /* MAX_VGROUP_NAME */ float *prevCos;
/** MAX_VGROUP_NAME. */
char vgname[64];
} ArmatureGpencilModifierData; } ArmatureGpencilModifierData;

View File

@@ -50,9 +50,12 @@ struct MDeformVert;
/* 'Control Point' data for primitives and curves */ /* 'Control Point' data for primitives and curves */
typedef struct bGPDcontrolpoint { typedef struct bGPDcontrolpoint {
float x, y, z; /* x and y coordinates of control point */ /** X and y coordinates of control point. */
float color[4]; /* point color */ float x, y, z;
int size; /* radius */ /** Point color. */
float color[4];
/** Radius. */
int size;
} bGPDcontrolpoint; } bGPDcontrolpoint;
/* Grease-Pencil Annotations - 'Stroke Point' /* Grease-Pencil Annotations - 'Stroke Point'
@@ -61,14 +64,21 @@ typedef struct bGPDcontrolpoint {
* This assumes that the bottom-left corner is (0,0) * This assumes that the bottom-left corner is (0,0)
*/ */
typedef struct bGPDspoint { typedef struct bGPDspoint {
float x, y, z; /* co-ordinates of point (usually 2d, but can be 3d as well) */ /** Co-ordinates of point (usually 2d, but can be 3d as well). */
float pressure; /* pressure of input device (from 0 to 1) at this point */ float x, y, z;
float strength; /* color strength (used for alpha factor) */ /** Pressure of input device (from 0 to 1) at this point. */
float time; /* seconds since start of stroke */ float pressure;
int flag; /* additional options */ /** Color strength (used for alpha factor). */
float strength;
/** Seconds since start of stroke. */
float time;
/** Additional options. */
int flag;
float uv_fac; /* factor of uv along the stroke */ /** Factor of uv along the stroke. */
float uv_rot; /* uv rotation for dot mode */ float uv_fac;
/** Uv rotation for dot mode. */
float uv_rot;
} bGPDspoint; } bGPDspoint;
/* bGPDspoint->flag */ /* bGPDspoint->flag */
@@ -104,11 +114,15 @@ typedef struct bGPDtriangle {
/* color of palettes */ /* color of palettes */
typedef struct bGPDpalettecolor { typedef struct bGPDpalettecolor {
struct bGPDpalettecolor *next, *prev; struct bGPDpalettecolor *next, *prev;
char info[64]; /* Color name. Must be unique. */ /** Color name. Must be unique. */
char info[64];
float color[4]; float color[4];
float fill[4]; /* color that should be used for drawing "fills" for strokes */ /** Color that should be used for drawing "fills" for strokes. */
short flag; /* settings for palette color */ float fill[4];
char _pad[6]; /* padding for compiler alignment error */ /** Settings for palette color. */
short flag;
/** Padding for compiler alignment error. */
char _pad[6];
} bGPDpalettecolor; } bGPDpalettecolor;
/* bGPDpalettecolor->flag */ /* bGPDpalettecolor->flag */
@@ -129,12 +143,13 @@ typedef enum eGPDpalettecolor_Flag {
typedef struct bGPDpalette { typedef struct bGPDpalette {
struct bGPDpalette *next, *prev; struct bGPDpalette *next, *prev;
/* pointer to individual colours */ /** Pointer to individual colours. */
ListBase colors; ListBase colors;
char info[64]; /* Palette name. Must be unique. */ /** Palette name. Must be unique. */
char info[64];
short flag; short flag;
char _pad[6]; /* padding for compiler alignment error */ char _pad[6];
} bGPDpalette; } bGPDpalette;
/* bGPDpalette->flag */ /* bGPDpalette->flag */
@@ -155,7 +170,8 @@ typedef struct bGPDstroke_Runtime {
/* temporary layer name only used during copy/paste to put the stroke in the original layer */ /* temporary layer name only used during copy/paste to put the stroke in the original layer */
char tmp_layerinfo[128]; char tmp_layerinfo[128];
float multi_frame_falloff; /* runtime falloff factor (only for transform) */ /** Runtime falloff factor (only for transform). */
float multi_frame_falloff;
} bGPDstroke_Runtime; } bGPDstroke_Runtime;
/* Grease-Pencil Annotations - 'Stroke' /* Grease-Pencil Annotations - 'Stroke'
@@ -165,22 +181,32 @@ typedef struct bGPDstroke_Runtime {
typedef struct bGPDstroke { typedef struct bGPDstroke {
struct bGPDstroke *next, *prev; struct bGPDstroke *next, *prev;
bGPDspoint *points; /* array of data-points for stroke */ /** Array of data-points for stroke. */
bGPDtriangle *triangles;/* tessellated triangles for GP Fill */ bGPDspoint *points;
int totpoints; /* number of data-points in array */ /** Tessellated triangles for GP Fill. */
int tot_triangles; /* number of triangles in array */ bGPDtriangle *triangles;
/** Number of data-points in array. */
int totpoints;
/** Number of triangles in array. */
int tot_triangles;
short thickness; /* thickness of stroke */ /** Thickness of stroke. */
short flag, _pad[2]; /* various settings about this stroke */ short thickness;
/** Various settings about this stroke. */
short flag, _pad[2];
double inittime; /* Init time of stroke */ /** Init time of stroke. */
double inittime;
char colorname[128] DNA_DEPRECATED; /* color name */ /** Color name. */
char colorname[128] DNA_DEPRECATED;
int mat_nr; /* material index */ /** Material index. */
int mat_nr;
char _pad1[4]; char _pad1[4];
struct MDeformVert *dvert; /* vertex weight data */ /** Vertex weight data. */
struct MDeformVert *dvert;
bGPDstroke_Runtime runtime; bGPDstroke_Runtime runtime;
char _pad2[4]; char _pad2[4];
@@ -211,7 +237,8 @@ typedef enum eGPDstroke_Flag {
/* Runtime temp data for bGPDframe */ /* Runtime temp data for bGPDframe */
typedef struct bGPDframe_Runtime { typedef struct bGPDframe_Runtime {
float viewmatrix[4][4]; /* parent matrix for drawing */ /** Parent matrix for drawing. */
float viewmatrix[4][4];
} bGPDframe_Runtime; } bGPDframe_Runtime;
/* Grease-Pencil Annotations - 'Frame' /* Grease-Pencil Annotations - 'Frame'
@@ -220,12 +247,16 @@ typedef struct bGPDframe_Runtime {
typedef struct bGPDframe { typedef struct bGPDframe {
struct bGPDframe *next, *prev; struct bGPDframe *next, *prev;
ListBase strokes; /* list of the simplified 'strokes' that make up the frame's data */ /** List of the simplified 'strokes' that make up the frame's data. */
ListBase strokes;
int framenum; /* frame number of this frame */ /** Frame number of this frame. */
int framenum;
short flag; /* temp settings */ /** Temp settings. */
short key_type; /* keyframe type (eBezTriple_KeyframeType) */ short flag;
/** Keyframe type (eBezTriple_KeyframeType). */
short key_type;
bGPDframe_Runtime runtime; bGPDframe_Runtime runtime;
} bGPDframe; } bGPDframe;
@@ -243,7 +274,8 @@ typedef enum eGPDframe_Flag {
/* Runtime temp data for bGPDlayer */ /* Runtime temp data for bGPDlayer */
typedef struct bGPDlayer_Runtime { typedef struct bGPDlayer_Runtime {
int icon_id; /* id for dynamic icon used to show annotation color preview for layer */ /** Id for dynamic icon used to show annotation color preview for layer. */
int icon_id;
char _pad[4]; char _pad[4];
} bGPDlayer_Runtime; } bGPDlayer_Runtime;
@@ -251,40 +283,67 @@ typedef struct bGPDlayer_Runtime {
typedef struct bGPDlayer { typedef struct bGPDlayer {
struct bGPDlayer *next, *prev; struct bGPDlayer *next, *prev;
ListBase frames; /* list of annotations to display for frames (bGPDframe list) */ /** List of annotations to display for frames (bGPDframe list). */
bGPDframe *actframe; /* active frame (should be the frame that is currently being displayed) */ ListBase frames;
/** Active frame (should be the frame that is currently being displayed). */
bGPDframe *actframe;
short flag; /* settings for layer */ /** Settings for layer. */
short onion_flag; /* Per-layer onion-skinning flags (eGPDlayer_OnionFlag) */ short flag;
/** Per-layer onion-skinning flags (eGPDlayer_OnionFlag). */
short onion_flag;
float color[4]; /* Color for strokes in layers. Used for annotations, and for ruler (which uses GPencil internally) */ /** Color for strokes in layers. Used for annotations, and for ruler (which uses GPencil internally). */
float fill[4]; /* Fill color for strokes in layers. Not used anymore (was only for) */ float color[4];
/** Fill color for strokes in layers. Not used anymore (was only for). */
float fill[4];
char info[128]; /* name/reference info for this layer (i.e. "director's comments, 12/3") /** Name/reference info for this layer (i.e. "director's comments, 12/.3")
* needs to be kept unique, as it's used as the layer identifier */ * needs to be kept unique, as it's used as the layer identifier */
char info[128];
short thickness; /* thickness to apply to strokes (Annotations) */ /** Thickness to apply to strokes (Annotations). */
short pass_index; /* used to filter groups of layers in modifiers */ short thickness;
/** Used to filter groups of layers in modifiers. */
short pass_index;
struct Object *parent; /* parent object */ /** Parent object. */
float inverse[4][4]; /* inverse matrix (only used if parented) */ struct Object *parent;
char parsubstr[64]; /* String describing subobject info, MAX_ID_NAME-2 */ /** Inverse matrix (only used if parented). */
float inverse[4][4];
/** String describing subobject info, MAX_ID_NAME-2. */
char parsubstr[64];
short partype; short partype;
short line_change; /* Thickness adjustment */ /** Thickness adjustment. */
float tintcolor[4]; /* Color used to tint layer, alpha value is used as factor */ short line_change;
float opacity; /* Opacity of the layer */ /** Color used to tint layer, alpha value is used as factor. */
char viewlayername[64]; /* Name of the layer used to filter render output */ float tintcolor[4];
/** Opacity of the layer. */
float opacity;
/** Name of the layer used to filter render output. */
char viewlayername[64];
int blend_mode; /* blend modes */ /** Blend modes. */
int blend_mode;
char _pad[4]; char _pad[4];
/* annotation onion skin */ /* annotation onion skin */
short gstep; /* Ghosts Before: max number of ghost frames to show between active frame and the one before it (0 = only the ghost itself) */ /**
short gstep_next; /* Ghosts After: max number of ghost frames to show after active frame and the following it (0 = only the ghost itself) */ * Ghosts Before: max number of ghost frames to show between
* active frame and the one before it (0 = only the ghost itself).
*/
short gstep;
/**
* Ghosts After: max number of ghost frames to show after
* active frame and the following it (0 = only the ghost itself).
*/
short gstep_next;
float gcolor_prev[3]; /* color for ghosts before the active frame */ /** Color for ghosts before the active frame. */
float gcolor_next[3]; /* color for ghosts after the active frame */ float gcolor_prev[3];
/** Color for ghosts after the active frame. */
float gcolor_next[3];
char _pad1[4]; char _pad1[4];
bGPDlayer_Runtime runtime; bGPDlayer_Runtime runtime;
@@ -335,27 +394,38 @@ typedef enum eGPLayerBlendModes {
/* Runtime temp data for bGPdata */ /* Runtime temp data for bGPdata */
typedef struct bGPdata_Runtime { typedef struct bGPdata_Runtime {
struct ARegion *ar; /* last region where drawing was originated */ /** Last region where drawing was originated. */
void *sbuffer; /* stroke buffer (can hold GP_STROKE_BUFFER_MAX) */ struct ARegion *ar;
/** Stroke buffer (can hold GP_STROKE_BUFFER_MAX). */
void *sbuffer;
/* GP Object drawing */ /* GP Object drawing */
float scolor[4]; /* buffer stroke color */ /** Buffer stroke color. */
float sfill[4]; /* buffer fill color */ float scolor[4];
short mode; /* settings for color */ /** Buffer fill color. */
short bstroke_style; /* buffer style for drawing strokes (used to select shader type) */ float sfill[4];
short bfill_style; /* buffer style for filling areas (used to select shader type) */ /** Settings for color. */
short mode;
/** Buffer style for drawing strokes (used to select shader type). */
short bstroke_style;
/** Buffer style for filling areas (used to select shader type). */
short bfill_style;
/* Stroke Buffer data (only used during paint-session) /* Stroke Buffer data (only used during paint-session)
* - buffer must be initialized before use, but freed after * - buffer must be initialized before use, but freed after
* whole paint operation is over * whole paint operation is over
*/ */
short sbuffer_size; /* number of elements currently in cache */ /** Number of elements currently in cache. */
short sbuffer_sflag; /* flags for stroke that cache represents */ short sbuffer_size;
/** Flags for stroke that cache represents. */
short sbuffer_sflag;
char _pad[6]; char _pad[6];
int tot_cp_points; /* number of control-points for stroke */ /** Number of control-points for stroke. */
int tot_cp_points;
char _pad1_[4]; char _pad1_[4];
bGPDcontrolpoint *cp_points; /* array of control-points for stroke */ /** Array of control-points for stroke. */
bGPDcontrolpoint *cp_points;
} bGPdata_Runtime; } bGPdata_Runtime;
/* grid configuration */ /* grid configuration */
@@ -371,36 +441,59 @@ typedef struct bGPgrid {
/* Grease-Pencil Annotations - 'DataBlock' */ /* Grease-Pencil Annotations - 'DataBlock' */
typedef struct bGPdata { typedef struct bGPdata {
ID id; /* Grease Pencil data is a datablock */ /** Grease Pencil data is a datablock. */
struct AnimData *adt; /* animation data - for animating draw settings */ ID id;
/** Animation data - for animating draw settings. */
struct AnimData *adt;
/* Grease-Pencil data */ /* Grease-Pencil data */
ListBase layers; /* bGPDlayers */ /** BGPDlayers. */
int flag; /* settings for this datablock */ ListBase layers;
/** Settings for this datablock. */
int flag;
short xray_mode; /* xray mode for strokes (eGP_DepthOrdering) */ /** Xray mode for strokes (eGP_DepthOrdering). */
short xray_mode;
char _pad1[2]; char _pad1[2];
/* Palettes */ /* Palettes */
ListBase palettes DNA_DEPRECATED; /* list of bGPDpalette's - Deprecated (2.78 - 2.79 only) */ /** List of bGPDpalette's - Deprecated (2.78 - 2.79 only). */
ListBase palettes DNA_DEPRECATED;
/* 3D Viewport/Appearance Settings */ /* 3D Viewport/Appearance Settings */
float pixfactor; /* factor to define pixel size conversion */ /** Factor to define pixel size conversion. */
float line_color[4]; /* color for edit line */ float pixfactor;
/** Color for edit line. */
float line_color[4];
/* Onion skinning */ /* Onion skinning */
float onion_factor; /* onion alpha factor change */ /** Onion alpha factor change. */
int onion_mode; /* onion skinning range (eGP_OnionModes) */ float onion_factor;
int onion_flag; /* onion skinning flags (eGPD_OnionFlag) */ /** Onion skinning range (eGP_OnionModes). */
short gstep; /* Ghosts Before: max number of ghost frames to show between active frame and the one before it (0 = only the ghost itself) */ int onion_mode;
short gstep_next; /* Ghosts After: max number of ghost frames to show after active frame and the following it (0 = only the ghost itself) */ /** Onion skinning flags (eGPD_OnionFlag). */
int onion_flag;
/**
* Ghosts Before: max number of ghost frames to show between
* active frame and the one before it (0 = only the ghost itself).
*/
short gstep;
/** Ghosts After: max number of ghost frames to show after
* active frame and the following it (0 = only the ghost itself).
*/
short gstep_next;
float gcolor_prev[3]; /* optional color for ghosts before the active frame */ /** Optional color for ghosts before the active frame. */
float gcolor_next[3]; /* optional color for ghosts after the active frame */ float gcolor_prev[3];
/** Optional color for ghosts after the active frame. */
float gcolor_next[3];
float zdepth_offset; /* offset for drawing over surfaces to keep strokes on top */ /** Offset for drawing over surfaces to keep strokes on top. */
struct Material **mat; /* materials array */ float zdepth_offset;
short totcol; /* total materials */ /** Materials array. */
struct Material **mat;
/** Total materials. */
short totcol;
/* stats */ /* stats */
short totlayer; short totlayer;

View File

@@ -32,9 +32,10 @@
#ifndef __DNA_GPU_TYPES_H__ #ifndef __DNA_GPU_TYPES_H__
#define __DNA_GPU_TYPES_H__ #define __DNA_GPU_TYPES_H__
/* properties for dof effect */ /** Properties for dof effect. */
typedef struct GPUDOFSettings { typedef struct GPUDOFSettings {
float focus_distance; /* focal distance for depth of field */ /** Focal distance for depth of field. */
float focus_distance;
float fstop; float fstop;
float focal_length; float focal_length;
float sensor; float sensor;
@@ -44,20 +45,22 @@ typedef struct GPUDOFSettings {
int high_quality; int high_quality;
} GPUDOFSettings; } GPUDOFSettings;
/* properties for SSAO effect */ /** Properties for SSAO effect. */
typedef struct GPUSSAOSettings { typedef struct GPUSSAOSettings {
float factor; float factor;
float color[3]; float color[3];
float distance_max; float distance_max;
float attenuation; float attenuation;
int samples; /* ray samples, we use presets here for easy control instead of */ /** Ray samples, we use presets here for easy control instead of. */
int samples;
int pad; int pad;
} GPUSSAOSettings; } GPUSSAOSettings;
typedef struct GPUFXSettings { typedef struct GPUFXSettings {
GPUDOFSettings *dof; GPUDOFSettings *dof;
GPUSSAOSettings *ssao; GPUSSAOSettings *ssao;
char fx_flag; /* eGPUFXFlags */ /** EGPUFXFlags. */
char fx_flag;
char pad[7]; char pad[7];
} GPUFXSettings; } GPUFXSettings;

View File

@@ -46,19 +46,26 @@ struct GPUTexture;
/* ImageUser is in Texture, in Nodes, Background Image, Image Window, .... */ /* ImageUser is in Texture, in Nodes, Background Image, Image Window, .... */
/* should be used in conjunction with an ID * to Image. */ /* should be used in conjunction with an ID * to Image. */
typedef struct ImageUser { typedef struct ImageUser {
struct Scene *scene; /* to retrieve render result */ /** To retrieve render result. */
struct Scene *scene;
int framenr; /* movies, sequences: current to display */ /** Movies, sequences: current to display. */
int frames; /* total amount of frames to use */ int framenr;
int offset, sfra; /* offset within movie, start frame in global time */ /** Total amount of frames to use. */
char _pad, cycl; /* cyclic flag */ int frames;
/** Offset within movie, start frame in global time. */
int offset, sfra;
/** Cyclic flag. */
char _pad, cycl;
char ok; char ok;
char multiview_eye; /* multiview current eye - for internal use of drawing routines */ /** Multiview current eye - for internal use of drawing routines. */
char multiview_eye;
short pass; short pass;
short pad; short pad;
short multi_index, view, layer; /* listbase indices, for menu browsing or retrieve buffer */ /** Listbase indices, for menu browsing or retrieve buffer. */
short multi_index, view, layer;
short flag; short flag;
} ImageUser; } ImageUser;
@@ -69,19 +76,23 @@ typedef struct ImageAnim {
typedef struct ImageView { typedef struct ImageView {
struct ImageView *next, *prev; struct ImageView *next, *prev;
char name[64]; /* MAX_NAME */ /** MAX_NAME. */
char filepath[1024]; /* 1024 = FILE_MAX */ char name[64];
/** 1024 = FILE_MAX. */
char filepath[1024];
} ImageView; } ImageView;
typedef struct ImagePackedFile { typedef struct ImagePackedFile {
struct ImagePackedFile *next, *prev; struct ImagePackedFile *next, *prev;
struct PackedFile *packedfile; struct PackedFile *packedfile;
char filepath[1024]; /* 1024 = FILE_MAX */ /** 1024 = FILE_MAX. */
char filepath[1024];
} ImagePackedFile; } ImagePackedFile;
typedef struct RenderSlot { typedef struct RenderSlot {
struct RenderSlot *next, *prev; struct RenderSlot *next, *prev;
char name[64]; /* 64 = MAX_NAME */ /** 64 = MAX_NAME. */
char name[64];
struct RenderResult *render; struct RenderResult *render;
} RenderSlot; } RenderSlot;
@@ -101,10 +112,13 @@ enum {
typedef struct Image { typedef struct Image {
ID id; ID id;
char name[1024]; /* file path, 1024 = FILE_MAX */ /** File path, 1024 = FILE_MAX. */
char name[1024];
struct MovieCache *cache; /* not written in file */ /** Not written in file. */
struct GPUTexture *gputexture[2]; /* not written in file 2 = TEXTARGET_COUNT */ struct MovieCache *cache;
/** Not written in file 2 = TEXTARGET_COUNT. */
struct GPUTexture *gputexture[2];
/* sources from: */ /* sources from: */
ListBase anims; ListBase anims;
@@ -122,7 +136,8 @@ typedef struct Image {
short pad2; short pad2;
unsigned int pad3; unsigned int pad3;
struct PackedFile *packedfile DNA_DEPRECATED; /* deprecated */ /** Deprecated. */
struct PackedFile *packedfile DNA_DEPRECATED;
struct ListBase packedfiles; struct ListBase packedfiles;
struct PreviewImage *preview; struct PreviewImage *preview;
@@ -146,9 +161,11 @@ typedef struct Image {
char pad[5]; char pad[5];
/* Multiview */ /* Multiview */
char eye; /* for viewer node stereoscopy */ /** For viewer node stereoscopy. */
char eye;
char views_format; char views_format;
ListBase views; /* ImageView */ /** ImageView. */
ListBase views;
struct Stereo3dFormat *stereo3d_format; struct Stereo3dFormat *stereo3d_format;
} Image; } Image;

View File

@@ -51,11 +51,15 @@
/* IPO Curve Driver */ /* IPO Curve Driver */
typedef struct IpoDriver { typedef struct IpoDriver {
struct Object *ob; /* target/driver ob */ /** Target/driver ob. */
short blocktype, adrcode; /* sub-channel to use */ struct Object *ob;
/** Sub-channel to use. */
short blocktype, adrcode;
short type, flag; /* driver settings */ /** Driver settings. */
char name[128]; /* bone, or python expression here */ short type, flag;
/** Bone, or python expression here. */
char name[128];
} IpoDriver; } IpoDriver;
/* --- IPO Curve --- */ /* --- IPO Curve --- */
@@ -64,22 +68,34 @@ typedef struct IpoDriver {
typedef struct IpoCurve { typedef struct IpoCurve {
struct IpoCurve *next, *prev; struct IpoCurve *next, *prev;
struct BPoint *bp; /* array of BPoints (sizeof(BPoint) * totvert) - i.e. baked/imported data */ /** Array of BPoints (sizeof(BPoint) * totvert) - i.e. baked/imported data. */
struct BezTriple *bezt; /* array of BezTriples (sizeof(BezTriple) * totvert) - i.e. user-editable keyframes */ struct BPoint *bp;
/** Array of BezTriples (sizeof(BezTriple) * totvert) - i.e. user-editable keyframes . */
struct BezTriple *bezt;
rctf maxrct, totrct; /* bounding boxes */ /** Bounding boxes. */
rctf maxrct, totrct;
short blocktype, adrcode, vartype; /* blocktype= ipo-blocktype; adrcode= type of ipo-curve; vartype= 'format' of data */ /** Blocktype= ipo-blocktype; adrcode= type of ipo-curve; vartype= 'format' of data. */
short totvert; /* total number of BezTriples (i.e. keyframes) on curve */ short blocktype, adrcode, vartype;
short ipo, extrap; /* interpolation and extrapolation modes */ /** Total number of BezTriples (i.e. keyframes) on curve. */
short flag, rt; /* flag= settings; rt= ??? */ short totvert;
float ymin, ymax; /* minimum/maximum y-extents for curve */ /** Interpolation and extrapolation modes . */
unsigned int bitmask; /* ??? */ short ipo, extrap;
/** Flag= settings; rt= ???. */
short flag, rt;
/** Minimum/maximum y-extents for curve. */
float ymin, ymax;
/** ???. */
unsigned int bitmask;
float slide_min, slide_max; /* minimum/maximum values for sliders (in action editor) */ /** Minimum/maximum values for sliders (in action editor). */
float curval; /* value of ipo-curve for current frame */ float slide_min, slide_max;
/** Value of ipo-curve for current frame. */
float curval;
IpoDriver *driver; /* pointer to ipo-driver for this curve */ /** Pointer to ipo-driver for this curve. */
IpoDriver *driver;
} IpoCurve; } IpoCurve;
/* --- ID-Datablock --- */ /* --- ID-Datablock --- */
@@ -88,11 +104,15 @@ typedef struct IpoCurve {
typedef struct Ipo { typedef struct Ipo {
ID id; ID id;
ListBase curve; /* A list of IpoCurve structs in a linked list. */ /** A list of IpoCurve structs in a linked list. */
rctf cur; /* Rect defining extents of keyframes? */ ListBase curve;
/** Rect defining extents of keyframes?. */
rctf cur;
short blocktype, showkey; /* blocktype: self-explanatory; showkey: either 0 or 1 (show vertical yellow lines for editing) */ /** Blocktype: self-explanatory; showkey: either 0 or 1 (show vertical yellow lines for editing). */
short muteipo, pad; /* muteipo: either 0 or 1 (whether ipo block is muted) */ short blocktype, showkey;
/** Muteipo: either 0 or 1 (whether ipo block is muted). */
short muteipo, pad;
} Ipo; } Ipo;
/* ----------- adrcodes (for matching ipo-curves to data) ------------- */ /* ----------- adrcodes (for matching ipo-curves to data) ------------- */

View File

@@ -45,25 +45,36 @@ struct Ipo;
typedef struct KeyBlock { typedef struct KeyBlock {
struct KeyBlock *next, *prev; struct KeyBlock *next, *prev;
float pos; /* point in time (Key->type == KEY_NORMAL) only, /**
* point in time (Key->type == KEY_NORMAL) only,
* for historic reasons this is relative to (Key->ctime / 100), * for historic reasons this is relative to (Key->ctime / 100),
* so this value increments by 0.1f per frame. */ * so this value increments by 0.1f per frame.
float curval; /* influence (typically [0 - 1] but can be more), (Key->type == KEY_RELATIVE) only.*/ */
float pos;
/** influence (typically [0 - 1] but can be more), (Key->type == KEY_RELATIVE) only.*/
float curval;
short type; /* interpolation type (Key->type == KEY_NORMAL) only. */ /** interpolation type (Key->type == KEY_NORMAL) only. */
short type;
short pad1; short pad1;
short relative; /* relative == 0 means first key is reference, otherwise the index of Key->blocks */ /** relative == 0 means first key is reference, otherwise the index of Key->blocks */
short relative;
short flag; short flag;
int totelem; /* total number if items in the keyblock (compare with mesh/curve verts to check we match) */ /** total number if items in the keyblock (compare with mesh/curve verts to check we match) */
int uid; /* for meshes only, match the unique number with the customdata layer */ int totelem;
/** for meshes only, match the unique number with the customdata layer */
int uid;
void *data; /* array of shape key values, size is (Key->elemsize * KeyBlock->totelem) */ /** array of shape key values, size is (Key->elemsize * KeyBlock->totelem) */
char name[64]; /* MAX_NAME (unique name, user assigned) */ void *data;
char vgroup[64]; /* MAX_VGROUP_NAME (optional vertex group), array gets allocated into 'weights' when set */ /** MAX_NAME (unique name, user assigned) */
char name[64];
/** MAX_VGROUP_NAME (optional vertex group), array gets allocated into 'weights' when set */
char vgroup[64];
/* ranges, for RNA and UI only to clamp 'curval' */ /** ranges, for RNA and UI only to clamp 'curval' */
float slidermin; float slidermin;
float slidermax; float slidermax;
@@ -72,36 +83,48 @@ typedef struct KeyBlock {
typedef struct Key { typedef struct Key {
ID id; ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ /** Animation data (must be immediately after id for utilities to use it). */
struct AnimData *adt;
/* commonly called 'Basis', (Key->type == KEY_RELATIVE) only. /**
* commonly called 'Basis', (Key->type == KEY_RELATIVE) only.
* Looks like this is _always_ 'key->block.first', * Looks like this is _always_ 'key->block.first',
* perhaps later on it could be defined as some other KeyBlock - campbell */ * perhaps later on it could be defined as some other KeyBlock - campbell
*/
KeyBlock *refkey; KeyBlock *refkey;
/* this is not a regular string, although it is \0 terminated /**
* This is not a regular string, although it is \0 terminated
* this is an array of (element_array_size, element_type) pairs * this is an array of (element_array_size, element_type) pairs
* (each one char) used for calculating shape key-blocks */ * (each one char) used for calculating shape key-blocks. */
char elemstr[32]; char elemstr[32];
int elemsize; /* size of each element in #KeyBlock.data, use for allocation and stride */ /** Size of each element in #KeyBlock.data, use for allocation and stride. */
int elemsize;
int pad; int pad;
ListBase block; /* list of KeyBlock's */ /** list of KeyBlock's */
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ ListBase block;
/** old animation system, deprecated for 2.5 */
struct Ipo *ipo DNA_DEPRECATED;
ID *from; ID *from;
int totkey; /* (totkey == BLI_listbase_count(&key->block)) */ /** (totkey == BLI_listbase_count(&key->block)) */
int totkey;
short flag; short flag;
char type; /* absolute or relative shape key */ /** absolute or relative shape key */
char type;
char pad2; char pad2;
/* only used when (Key->type == KEY_NORMAL), this value is used as a time slider, /** Only used when (Key->type == KEY_NORMAL), this value is used as a time slider,
* rather then using the scenes time, this value can be animated to give greater control */ * rather then using the scenes time, this value can be animated to give greater control */
float ctime; float ctime;
/* can never be 0, this is used for detecting old data */ /**
int uidgen; /* current free uid for keyblocks */ * Can never be 0, this is used for detecting old data.
* current free uid for keyblocks
*/
int uidgen;
} Key; } Key;
/* **************** KEY ********************* */ /* **************** KEY ********************* */

View File

@@ -47,7 +47,8 @@ struct MTex;
typedef struct Lamp { typedef struct Lamp {
ID id; ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ /** Animation data (must be immediately after id for utilities to use it). */
struct AnimData *adt;
short type, flag; short type, flag;
int mode; int mode;
@@ -57,7 +58,8 @@ typedef struct Lamp {
float energy, dist, spotsize, spotblend; float energy, dist, spotsize, spotblend;
float att1, att2; /* Quad1 and Quad2 attenuation */ /** Quad1 and Quad2 attenuation. */
float att1, att2;
float coeff_const, coeff_lin, coeff_quad, coeff_pad; float coeff_const, coeff_lin, coeff_quad, coeff_pad;
struct CurveMapping *curfalloff; struct CurveMapping *curfalloff;
short falloff_type; short falloff_type;
@@ -74,7 +76,8 @@ typedef struct Lamp {
/* texact is for buttons */ /* texact is for buttons */
short texact, shadhalostep; short texact, shadhalostep;
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ /** Old animation system, deprecated for 2.5. */
struct Ipo *ipo DNA_DEPRECATED;
short pr_texture, use_nodes; short pr_texture, use_nodes;
char pad6[4]; char pad6[4];

View File

@@ -56,17 +56,20 @@ typedef struct Lattice {
short pntsu, pntsv, pntsw, flag; short pntsu, pntsv, pntsw, flag;
short opntsu, opntsv, opntsw, pad2; short opntsu, opntsv, opntsw, pad2;
char typeu, typev, typew, pad3; char typeu, typev, typew, pad3;
int actbp; /* active element index, unset with LT_ACTBP_NONE */ /** Active element index, unset with LT_ACTBP_NONE. */
int actbp;
float fu, fv, fw, du, dv, dw; float fu, fv, fw, du, dv, dw;
struct BPoint *def; struct BPoint *def;
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ /** Old animation system, deprecated for 2.5. */
struct Ipo *ipo DNA_DEPRECATED;
struct Key *key; struct Key *key;
struct MDeformVert *dvert; struct MDeformVert *dvert;
char vgroup[64]; /* multiply the influence, MAX_VGROUP_NAME */ /** Multiply the influence, MAX_VGROUP_NAME. */
char vgroup[64];
struct EditLatt *editlatt; struct EditLatt *editlatt;
void *batch_cache; void *batch_cache;

View File

@@ -58,34 +58,42 @@ typedef struct LayerCollection {
short flag; short flag;
short runtime_flag; short runtime_flag;
short pad[2]; short pad[2];
ListBase layer_collections; /* synced with collection->children */ /** Synced with collection->children. */
ListBase layer_collections;
} LayerCollection; } LayerCollection;
typedef struct ViewLayer { typedef struct ViewLayer {
struct ViewLayer *next, *prev; struct ViewLayer *next, *prev;
char name[64]; /* MAX_NAME */ /** MAX_NAME. */
char name[64];
short flag; short flag;
short runtime_flag; short runtime_flag;
short pad[2]; short pad[2];
ListBase object_bases; /* ObjectBase */ /** ObjectBase. */
struct SceneStats *stats; /* default allocated now */ ListBase object_bases;
/** Default allocated now. */
struct SceneStats *stats;
struct Base *basact; struct Base *basact;
ListBase layer_collections; /* LayerCollection */ /** LayerCollection. */
ListBase layer_collections;
LayerCollection *active_collection; LayerCollection *active_collection;
/* Old SceneRenderLayer data. */ /* Old SceneRenderLayer data. */
int layflag; int layflag;
int passflag; /* pass_xor has to be after passflag */ /** Pass_xor has to be after passflag. */
int passflag;
float pass_alpha_threshold; float pass_alpha_threshold;
int samples; int samples;
struct Material *mat_override; struct Material *mat_override;
struct IDProperty *id_properties; /* Equivalent to datablocks ID properties. */ /** Equivalent to datablocks ID properties. */
struct IDProperty *id_properties;
struct FreestyleConfig freestyle_config; struct FreestyleConfig freestyle_config;
/* Runtime data */ /* Runtime data */
ListBase drawdata; /* ViewLayerEngineData */ /** ViewLayerEngineData. */
ListBase drawdata;
struct Base **object_bases_array; struct Base **object_bases_array;
struct GHash *object_bases_hash; struct GHash *object_bases_hash;
} ViewLayer; } ViewLayer;
@@ -148,13 +156,17 @@ enum {
typedef struct SceneCollection { typedef struct SceneCollection {
struct SceneCollection *next, *prev; struct SceneCollection *next, *prev;
char name[64]; /* MAX_NAME */ /** MAX_NAME. */
int active_object_index; /* for UI */ char name[64];
/** For UI. */
int active_object_index;
short flag; short flag;
char type; char type;
char pad; char pad;
ListBase objects; /* (Object *)LinkData->data */ /** (Object *)LinkData->data. */
ListBase scene_collections; /* nested collections */ ListBase objects;
/** Nested collections. */
ListBase scene_collections;
} SceneCollection; } SceneCollection;
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -41,32 +41,46 @@ struct AnimData;
typedef struct LightProbe { typedef struct LightProbe {
ID id; ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ /** Animation data (must be immediately after id for utilities to use it). */
struct AnimData *adt;
char type; /* For realtime probe objects */ /** For realtime probe objects. */
char flag; /* General purpose flags for probes */ char type;
char attenuation_type; /* Attenuation type */ /** General purpose flags for probes. */
char parallax_type; /* Parallax type */ char flag;
/** Attenuation type. */
char attenuation_type;
/** Parallax type. */
char parallax_type;
float distinf; /* Influence Radius */ /** Influence Radius. */
float distpar; /* Parallax Radius */ float distinf;
float falloff; /* Influence falloff */ /** Parallax Radius. */
float distpar;
/** Influence falloff. */
float falloff;
float clipsta, clipend; float clipsta, clipend;
float vis_bias, vis_bleedbias; /* VSM visibility biases */ /** VSM visibility biases. */
float vis_bias, vis_bleedbias;
float vis_blur; float vis_blur;
float intensity; /* Intensity multiplier */ /** Intensity multiplier. */
float intensity;
int grid_resolution_x; /* Irradiance grid resolution */ /** Irradiance grid resolution. */
int grid_resolution_x;
int grid_resolution_y; int grid_resolution_y;
int grid_resolution_z; int grid_resolution_z;
int pad1; int pad1;
struct Object *parallax_ob; /* Object to use as a parallax origin */ /** Object to use as a parallax origin. */
struct Image *image; /* Image to use on as lighting data */ struct Object *parallax_ob;
struct Collection *visibility_grp; /* Object visibility group, inclusive or exclusive */ /** Image to use on as lighting data. */
struct Image *image;
/** Object visibility group, inclusive or exclusive. */
struct Collection *visibility_grp;
/* Runtime display data */ /* Runtime display data */
float distfalloff, distgridinf; float distfalloff, distgridinf;
@@ -119,9 +133,11 @@ typedef struct LightProbeCache {
typedef struct LightGridCache { typedef struct LightGridCache {
float mat[4][4]; float mat[4][4];
int resolution[3], offset; /* offset to the first irradiance sample in the pool. */ /** Offset to the first irradiance sample in the pool. */
int resolution[3], offset;
float corner[3], attenuation_scale; float corner[3], attenuation_scale;
float increment_x[3], attenuation_bias; /* world space vector between 2 opposite cells */ /** World space vector between 2 opposite cells. */
float increment_x[3], attenuation_bias;
float increment_y[3], level_bias; float increment_y[3], level_bias;
float increment_z[3], pad4; float increment_z[3], pad4;
float visibility_bias, visibility_bleed, visibility_range, pad5; float visibility_bias, visibility_bleed, visibility_range, pad5;
@@ -142,16 +158,21 @@ typedef struct LightCacheTexture {
typedef struct LightCache { typedef struct LightCache {
int flag; int flag;
/* only a single cache for now */ /* only a single cache for now */
int cube_len, grid_len; /* Number of probes to use for rendering. */ /** Number of probes to use for rendering. */
int mips_len; /* Number of mipmap level to use. */ int cube_len, grid_len;
int vis_res, ref_res; /* Size of a visibility/reflection sample. */ /** Number of mipmap level to use. */
int mips_len;
/** Size of a visibility/reflection sample. */
int vis_res, ref_res;
int pad[2]; int pad[2];
/* In the future, we could create a bigger texture containing /* In the future, we could create a bigger texture containing
* multiple caches (for animation) and interpolate between the * multiple caches (for animation) and interpolate between the
* caches overtime to another texture. */ * caches overtime to another texture. */
LightCacheTexture grid_tx; LightCacheTexture grid_tx;
LightCacheTexture cube_tx; /* Contains data for mipmap level 0. */ /** Contains data for mipmap level 0. */
LightCacheTexture *cube_mips; /* Does not contains valid GPUTexture, only data. */ LightCacheTexture cube_tx;
/** Does not contains valid GPUTexture, only data. */
LightCacheTexture *cube_mips;
/* All lightprobes data contained in the cache. */ /* All lightprobes data contained in the cache. */
LightProbeCache *cube_data; LightProbeCache *cube_data;
LightGridCache *grid_data; LightGridCache *grid_data;

View File

@@ -52,7 +52,8 @@ struct bNodeTree;
typedef struct LineStyleModifier { typedef struct LineStyleModifier {
struct LineStyleModifier *next, *prev; struct LineStyleModifier *next, *prev;
char name[64]; /* MAX_NAME */ /** MAX_NAME. */
char name[64];
int type; int type;
float influence; float influence;
int flags; int flags;
@@ -383,7 +384,8 @@ typedef struct LineStyleGeometryModifier_PerlinNoise1D {
struct LineStyleModifier modifier; struct LineStyleModifier modifier;
float frequency, amplitude; float frequency, amplitude;
float angle; /* in radians! */ /** In radians!. */
float angle;
unsigned int octaves; unsigned int octaves;
int seed; int seed;
int pad1; int pad1;
@@ -393,7 +395,8 @@ typedef struct LineStyleGeometryModifier_PerlinNoise2D {
struct LineStyleModifier modifier; struct LineStyleModifier modifier;
float frequency, amplitude; float frequency, amplitude;
float angle; /* in radians! */ /** In radians!. */
float angle;
unsigned int octaves; unsigned int octaves;
int seed; int seed;
int pad1; int pad1;
@@ -462,7 +465,8 @@ typedef struct LineStyleGeometryModifier_2DTransform {
int pivot; int pivot;
float scale_x, scale_y; float scale_x, scale_y;
float angle; /* in radians! */ /** In radians!. */
float angle;
float pivot_u; float pivot_u;
float pivot_x, pivot_y; float pivot_x, pivot_y;
int pad; int pad;
@@ -481,7 +485,8 @@ typedef struct LineStyleThicknessModifier_Calligraphy {
struct LineStyleModifier modifier; struct LineStyleModifier modifier;
float min_thickness, max_thickness; float min_thickness, max_thickness;
float orientation; /* in radians! */ /** In radians!. */
float orientation;
int pad; int pad;
} LineStyleThicknessModifier_Calligraphy; } LineStyleThicknessModifier_Calligraphy;
@@ -551,7 +556,8 @@ typedef struct FreestyleLineStyle {
int chaining; int chaining;
unsigned int rounds; unsigned int rounds;
float split_length; float split_length;
float min_angle, max_angle; /* in radians, for splitting */ /** In radians, for splitting. */
float min_angle, max_angle;
float min_length, max_length; float min_length, max_length;
unsigned int chain_count; unsigned int chain_count;
unsigned short split_dash1, split_gap1; unsigned short split_dash1, split_gap1;
@@ -562,8 +568,10 @@ typedef struct FreestyleLineStyle {
short texact, pr_texture; short texact, pr_texture;
short use_nodes, pad[3]; short use_nodes, pad[3];
unsigned short dash1, gap1, dash2, gap2, dash3, gap3; unsigned short dash1, gap1, dash2, gap2, dash3, gap3;
int panel; /* for UI */ /** For UI. */
struct MTex *mtex[18]; /* MAX_MTEX */ int panel;
/** MAX_MTEX. */
struct MTex *mtex[18];
/* nodes */ /* nodes */
struct bNodeTree *nodetree; struct bNodeTree *nodetree;

View File

@@ -46,67 +46,105 @@
typedef struct Mask { typedef struct Mask {
ID id; ID id;
struct AnimData *adt; struct AnimData *adt;
ListBase masklayers; /* mask layers */ /** Mask layers. */
int masklay_act; /* index of active mask layer (-1 == None) */ ListBase masklayers;
int masklay_tot; /* total number of mask layers */ /** Index of active mask layer (-1 == None). */
int masklay_act;
/** Total number of mask layers. */
int masklay_tot;
int sfra, efra; /* frames, used by the sequencer */ /** Frames, used by the sequencer. */
int sfra, efra;
int flag; /* for anim info */ /** For anim info. */
int flag;
int pad; int pad;
} Mask; } Mask;
typedef struct MaskParent { typedef struct MaskParent {
// int flag; /* parenting flags */ /* not used */ //* /* Parenting flags */ /* not used. */
int id_type; /* type of parenting */ // int flag;
int type; /* type of parenting */ /** Type of parenting. */
ID *id; /* ID block of entity to which mask/spline is parented to int id_type;
* in case of parenting to movie tracking data set to MovieClip datablock */ /** Type of parenting. */
char parent[64]; /* entity of parent to which parenting happened int type;
* in case of parenting to movie tracking data contains name of layer */ /**
char sub_parent[64]; /* sub-entity of parent to which parenting happened * ID block of entity to which mask/spline is parented to
* in case of parenting to movie tracking data contains name of track */ * in case of parenting to movie tracking data set to MovieClip datablock.
float parent_orig[2]; /* track location at the moment of parenting, */
* stored in mask space*/ ID *id;
/**
* Entity of parent to which parenting happened
* in case of parenting to movie tracking data contains name of layer.
*/
char parent[64];
/**
* Sub-entity of parent to which parenting happened
* in case of parenting to movie tracking data contains name of track.
*/
char sub_parent[64];
/**
* Track location at the moment of parenting,
* stored in mask space.
*/
float parent_orig[2];
float parent_corners_orig[4][2]; /* Original corners of plane track at the moment of parenting */ /** Original corners of plane track at the moment of parenting. */
float parent_corners_orig[4][2];
} MaskParent; } MaskParent;
typedef struct MaskSplinePointUW { typedef struct MaskSplinePointUW {
float u, w; /* u coordinate along spline segment and weight of this point */ /** U coordinate along spline segment and weight of this point. */
int flag; /* different flags of this point */ float u, w;
/** Different flags of this point. */
int flag;
} MaskSplinePointUW; } MaskSplinePointUW;
typedef struct MaskSplinePoint { typedef struct MaskSplinePoint {
BezTriple bezt; /* actual point coordinates and it's handles */ /** Actual point coordinates and it's handles . */
BezTriple bezt;
int pad; int pad;
int tot_uw; /* number of uv feather values */ /** Number of uv feather values. */
MaskSplinePointUW *uw; /* feather UV values */ int tot_uw;
MaskParent parent; /* parenting information of particular spline point */ /** Feather UV values. */
MaskSplinePointUW *uw;
/** Parenting information of particular spline point. */
MaskParent parent;
} MaskSplinePoint; } MaskSplinePoint;
typedef struct MaskSpline { typedef struct MaskSpline {
struct MaskSpline *next, *prev; struct MaskSpline *next, *prev;
short flag; /* different spline flag (closed, ...) */ /** Different spline flag (closed, ...). */
char offset_mode; /* feather offset method */ short flag;
char weight_interp; /* weight interpolation */ /** Feather offset method. */
char offset_mode;
/** Weight interpolation. */
char weight_interp;
int tot_point; /* total number of points */ /** Total number of points. */
MaskSplinePoint *points; /* points which defines spline itself */ int tot_point;
MaskParent parent; /* parenting information of the whole spline */ /** Points which defines spline itself. */
MaskSplinePoint *points;
/** Parenting information of the whole spline. */
MaskParent parent;
MaskSplinePoint *points_deform; /* deformed copy of 'points' BezTriple data - not saved */ /** Deformed copy of 'points' BezTriple data - not saved. */
MaskSplinePoint *points_deform;
} MaskSpline; } MaskSpline;
/* one per frame */ /* one per frame */
typedef struct MaskLayerShape { typedef struct MaskLayerShape {
struct MaskLayerShape *next, *prev; struct MaskLayerShape *next, *prev;
float *data; /* u coordinate along spline segment and weight of this point */ /** 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) */ float *data;
int frame; /* different flags of this point */ /** To ensure no buffer overruns's: alloc size is (tot_vert * MASK_OBJECT_SHAPE_ELEM_SIZE). */
char flag; /* animation flag */ int tot_vert;
/** Different flags of this point. */
int frame;
/** Animation flag. */
char flag;
char pad[7]; char pad[7];
} MaskLayerShape; } MaskLayerShape;
@@ -122,13 +160,17 @@ typedef struct MaskLayerShapeElem {
typedef struct MaskLayer { typedef struct MaskLayer {
struct MaskLayer *next, *prev; struct MaskLayer *next, *prev;
char name[64]; /* name of the mask layer (64 = MAD_ID_NAME - 2) */ /** Name of the mask layer (64 = MAD_ID_NAME - 2). */
char name[64];
ListBase splines; /* list of splines which defines this mask layer */ /** List of splines which defines this mask layer. */
ListBase splines;
ListBase splines_shapes; ListBase splines_shapes;
struct MaskSpline *act_spline; /* active spline */ /** Active spline. */
struct MaskSplinePoint *act_point; /* active point */ struct MaskSpline *act_spline;
/** Active point. */
struct MaskSplinePoint *act_point;
/* blending options */ /* blending options */
float alpha; float alpha;
@@ -137,8 +179,10 @@ typedef struct MaskLayer {
char falloff; char falloff;
char pad[7]; char pad[7];
char flag; /* for animation */ /** For animation. */
char restrictflag; /* matching 'Object' flag of the same name - eventually use in the outliner */ char flag;
/** Matching 'Object' flag of the same name - eventually use in the outliner . */
char restrictflag;
} MaskLayer; } MaskLayer;
/* MaskParent->flag */ /* MaskParent->flag */

View File

@@ -48,36 +48,61 @@ struct Ipo;
/* WATCH IT: change type? also make changes in ipo.h */ /* WATCH IT: change type? also make changes in ipo.h */
typedef struct TexPaintSlot { typedef struct TexPaintSlot {
struct Image *ima; /* image to be painted on */ /** Image to be painted on. */
char *uvname; /* customdata index for uv layer, MAX_NAME*/ struct Image *ima;
int valid; /* do we have a valid image and UV map */ /** Customdata index for uv layer, MAX_NAM.E*/
char *uvname;
/** Do we have a valid image and UV map. */
int valid;
int pad; int pad;
} TexPaintSlot; } TexPaintSlot;
typedef struct MaterialGPencilStyle { typedef struct MaterialGPencilStyle {
struct Image *sima; /* Texture image for strokes */ /** Texture image for strokes. */
struct Image *ima; /* Texture image for filling */ struct Image *sima;
float stroke_rgba[4]; /* color for paint and strokes (alpha included) */ /** Texture image for filling. */
float fill_rgba[4]; /* color that should be used for drawing "fills" for strokes (alpha included) */ struct Image *ima;
float mix_rgba[4]; /* secondary color used for gradients and other stuff */ /** Color for paint and strokes (alpha included). */
short flag; /* settings */ float stroke_rgba[4];
short index; /* custom index for passes */ /** Color that should be used for drawing "fills" for strokes (alpha included). */
short stroke_style; /* style for drawing strokes (used to select shader type) */ float fill_rgba[4];
short fill_style; /* style for filling areas (used to select shader type) */ /** Secondary color used for gradients and other stuff. */
float mix_factor; /* factor used to define shader behavior (several uses) */ float mix_rgba[4];
float gradient_angle; /* angle used for gradients orientation */ /** Settings. */
float gradient_radius; /* radius for radial gradients */ short flag;
float pattern_gridsize; /* cheesboard size */ /** Custom index for passes. */
float gradient_scale[2]; /* uv coordinates scale */ short index;
float gradient_shift[2]; /* factor to shift filling in 2d space */ /** Style for drawing strokes (used to select shader type). */
float texture_angle; /* angle used for texture orientation */ short stroke_style;
float texture_scale[2]; /* texture scale (separated of uv scale) */ /** Style for filling areas (used to select shader type). */
float texture_offset[2]; /* factor to shift texture in 2d space */ short fill_style;
float texture_opacity; /* texture opacity */ /** Factor used to define shader behavior (several uses). */
float texture_pixsize; /* pixel size for uv along the stroke */ float mix_factor;
int mode; /* drawing mode (line or dots) */ /** Angle used for gradients orientation. */
float gradient_angle;
/** Radius for radial gradients. */
float gradient_radius;
/** Cheesboard size. */
float pattern_gridsize;
/** Uv coordinates scale. */
float gradient_scale[2];
/** Factor to shift filling in 2d space. */
float gradient_shift[2];
/** Angle used for texture orientation. */
float texture_angle;
/** Texture scale (separated of uv scale). */
float texture_scale[2];
/** Factor to shift texture in 2d space. */
float texture_offset[2];
/** Texture opacity. */
float texture_opacity;
/** Pixel size for uv along the stroke. */
float texture_pixsize;
/** Drawing mode (line or dots). */
int mode;
int gradient_type; /* type of gradient */ /** Type of gradient. */
int gradient_type;
char pad[4]; char pad[4];
} MaterialGPencilStyle; } MaterialGPencilStyle;
@@ -113,7 +138,8 @@ typedef enum eMaterialGPencilStyle_Mode {
typedef struct Material { typedef struct Material {
ID id; ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ /** Animation data (must be immediately after id for utilities to use it). */
struct AnimData *adt;
short flag, pad1[7]; short flag, pad1[7];
@@ -123,7 +149,8 @@ typedef struct Material {
float alpha DNA_DEPRECATED; float alpha DNA_DEPRECATED;
float ray_mirror DNA_DEPRECATED; float ray_mirror DNA_DEPRECATED;
float spec; float spec;
float gloss_mir DNA_DEPRECATED; /* renamed and inversed to roughness */ /** Renamed and inversed to roughness. */
float gloss_mir DNA_DEPRECATED;
float roughness; float roughness;
float metallic; float metallic;
float pad4[2]; float pad4[2];
@@ -136,7 +163,8 @@ typedef struct Material {
short index; short index;
struct bNodeTree *nodetree; struct bNodeTree *nodetree;
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ /** Old animation system, deprecated for 2.5. */
struct Ipo *ipo DNA_DEPRECATED;
struct PreviewImage *preview; struct PreviewImage *preview;
/* Freestyle line settings. */ /* Freestyle line settings. */
@@ -158,14 +186,16 @@ typedef struct Material {
char blend_flag; char blend_flag;
char pad3[5]; char pad3[5];
/* Cached slots for texture painting, must be refreshed in /**
* refresh_texpaint_image_cache before using. */ * Cached slots for texture painting, must be refreshed in
* refresh_texpaint_image_cache before using.
*/
struct TexPaintSlot *texpaintslot; struct TexPaintSlot *texpaintslot;
/* Runtime cache for GLSL materials. */ /** Runtime cache for GLSL materials. */
ListBase gpumaterial; ListBase gpumaterial;
/* grease pencil color */ /** Grease pencil color. */
struct MaterialGPencilStyle *gp_style; struct MaterialGPencilStyle *gp_style;
} Material; } Material;

View File

@@ -115,11 +115,13 @@ typedef struct Mesh_Runtime {
typedef struct Mesh { typedef struct Mesh {
ID id; ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ /** Animation data (must be immediately after id for utilities to use it). */
struct AnimData *adt;
struct BoundBox *bb; struct BoundBox *bb;
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ /** Old animation system, deprecated for 2.5. */
struct Ipo *ipo DNA_DEPRECATED;
struct Key *key; struct Key *key;
struct Material **mat; struct Material **mat;
struct MSelect *mselect; struct MSelect *mselect;
@@ -134,12 +136,18 @@ typedef struct Mesh {
/* mface stores the tessellation (triangulation) of the mesh, /* mface stores the tessellation (triangulation) of the mesh,
* real faces are now stored in nface.*/ * real faces are now stored in nface.*/
struct MFace *mface; /* array of mesh object mode faces for tessellation */ /** Array of mesh object mode faces for tessellation. */
struct MTFace *mtface; /* store tessellation face UV's and texture here */ struct MFace *mface;
struct TFace *tface DNA_DEPRECATED; /* deprecated, use mtface */ /** Store tessellation face UV's and texture here. */
struct MVert *mvert; /* array of verts */ struct MTFace *mtface;
struct MEdge *medge; /* array of edges */ /** Deprecated, use mtface. */
struct MDeformVert *dvert; /* deformgroup vertices */ struct TFace *tface DNA_DEPRECATED;
/** Array of verts. */
struct MVert *mvert;
/** Array of edges. */
struct MEdge *medge;
/** Deformgroup vertices. */
struct MDeformVert *dvert;
/* array of colors for the tessellated faces, must be number of tessellated /* array of colors for the tessellated faces, must be number of tessellated
* faces * 4 in length */ * faces * 4 in length */
@@ -147,7 +155,8 @@ typedef struct Mesh {
struct Mesh *texcomesh; struct Mesh *texcomesh;
/* When the object is available, the preferred access method is: BKE_editmesh_from_object(ob) */ /* When the object is available, the preferred access method is: BKE_editmesh_from_object(ob) */
struct BMEditMesh *edit_btmesh; /* not saved in file! */ /** Not saved in file!. */
struct BMEditMesh *edit_btmesh;
struct CustomData vdata, edata, fdata; struct CustomData vdata, edata, fdata;
@@ -179,12 +188,14 @@ typedef struct Mesh {
char cd_flag, pad; char cd_flag, pad;
char subdiv DNA_DEPRECATED, subdivr DNA_DEPRECATED; char subdiv DNA_DEPRECATED, subdivr DNA_DEPRECATED;
char subsurftype DNA_DEPRECATED; /* only kept for backwards compat, not used anymore */ /** Only kept for backwards compat, not used anymore. */
char subsurftype DNA_DEPRECATED;
char editflag; char editflag;
short totcol; short totcol;
struct Multires *mr DNA_DEPRECATED; /* deprecated multiresolution modeling data, only keep for loading old files */ /** Deprecated multiresolution modeling data, only keep for loading old files. */
struct Multires *mr DNA_DEPRECATED;
Mesh_Runtime runtime; Mesh_Runtime runtime;
} Mesh; } Mesh;
@@ -192,7 +203,8 @@ typedef struct Mesh {
/* deprecated by MTFace, only here for file reading */ /* deprecated by MTFace, only here for file reading */
#ifdef DNA_DEPRECATED #ifdef DNA_DEPRECATED
typedef struct TFace { typedef struct TFace {
void *tpage; /* the faces image for the active UVLayer */ /** The faces image for the active UVLayer. */
void *tpage;
float uv[4][2]; float uv[4][2];
unsigned int col[4]; unsigned int col[4];
char flag, transp; char flag, transp;

View File

@@ -41,7 +41,8 @@ struct Image;
typedef struct MFace { typedef struct MFace {
unsigned int v1, v2, v3, v4; unsigned int v1, v2, v3, v4;
short mat_nr; short mat_nr;
char edcode, flag; /* we keep edcode, for conversion to edges draw flags in old files */ /** We keep edcode, for conversion to edges draw flags in old files. */
char edcode, flag;
} MFace; } MFace;
typedef struct MEdge { typedef struct MEdge {
@@ -58,7 +59,8 @@ typedef struct MDeformWeight {
typedef struct MDeformVert { typedef struct MDeformVert {
struct MDeformWeight *dw; struct MDeformWeight *dw;
int totweight; int totweight;
int flag; /* flag only in use for weightpaint now */ /** Flag only in use for weightpaint now. */
int flag;
} MDeformVert; } MDeformVert;
typedef struct MVert { typedef struct MVert {
@@ -78,15 +80,18 @@ typedef struct MCol {
typedef struct MPoly { typedef struct MPoly {
/* offset into loop array and number of loops in the face */ /* offset into loop array and number of loops in the face */
int loopstart; int loopstart;
int totloop; /* keep signed since we need to subtract when getting the previous loop */ /** Keep signed since we need to subtract when getting the previous loop. */
int totloop;
short mat_nr; short mat_nr;
char flag, pad; char flag, pad;
} MPoly; } MPoly;
/* the e here is because we want to move away from relying on edge hashes.*/ /* the e here is because we want to move away from relying on edge hashes.*/
typedef struct MLoop { typedef struct MLoop {
unsigned int v; /* vertex index */ /** Vertex index. */
unsigned int e; /* edge index */ unsigned int v;
/** Edge index. */
unsigned int e;
} MLoop; } MLoop;
/** /**
@@ -237,7 +242,8 @@ typedef struct MLoopCol {
typedef struct MSelect { typedef struct MSelect {
int index; int index;
int type; /* ME_VSEL/ME_ESEL/ME_FSEL */ /** ME_VSEL/ME_ESEL/ME_FSEL. */
int type;
} MSelect; } MSelect;
/*tessellation uv face data*/ /*tessellation uv face data*/

View File

@@ -45,21 +45,30 @@ struct Material;
typedef struct MetaElem { typedef struct MetaElem {
struct MetaElem *next, *prev; struct MetaElem *next, *prev;
struct BoundBox *bb; /* Bound Box of MetaElem */ /** Bound Box of MetaElem. */
struct BoundBox *bb;
short type, flag; short type, flag;
short pad[2]; short pad[2];
float x, y, z; /* Position of center of MetaElem */ /** Position of center of MetaElem. */
float quat[4]; /* Rotation of MetaElem (MUST be kept normalized) */ float x, y, z;
float expx; /* dimension parameters, used for some types like cubes */ /** Rotation of MetaElem (MUST be kept normalized). */
float quat[4];
/** Dimension parameters, used for some types like cubes. */
float expx;
float expy; float expy;
float expz; float expz;
float rad; /* radius of the meta element */ /** Radius of the meta element. */
float rad2; /* temp field, used only while processing */ float rad;
float s; /* stiffness, how much of the element to fill */ /** Temp field, used only while processing. */
float len; /* old, only used for backwards compat. use dimensions now */ float rad2;
/** Stiffness, how much of the element to fill. */
float s;
/** Old, only used for backwards compat. use dimensions now. */
float len;
float *mat, *imat; /* matrix and inverted matrix */ /** Matrix and inverted matrix. */
float *mat, *imat;
} MetaElem; } MetaElem;
typedef struct MetaBall { typedef struct MetaBall {
@@ -68,22 +77,27 @@ typedef struct MetaBall {
ListBase elems; ListBase elems;
ListBase disp; ListBase disp;
ListBase *editelems; /* not saved in files, note we use pointer for editmode check */ /** Not saved in files, note we use pointer for editmode check. */
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ ListBase *editelems;
/** Old animation system, deprecated for 2.5. */
struct Ipo *ipo DNA_DEPRECATED;
/* material of the mother ball will define the material used of all others */ /* material of the mother ball will define the material used of all others */
struct Material **mat; struct Material **mat;
char flag, flag2; /* flag is enum for updates, flag2 is bitflags for settings */ /** Flag is enum for updates, flag2 is bitflags for settings. */
char flag, flag2;
short totcol; short totcol;
short texflag, pad; /* used to store MB_AUTOSPACE */ /** Used to store MB_AUTOSPACE. */
short texflag, pad;
/* texture space, copied as one block in editobject.c */ /* texture space, copied as one block in editobject.c */
float loc[3]; float loc[3];
float size[3]; float size[3];
float rot[3]; float rot[3];
float wiresize, rendersize; /* display and render res */ /** Display and render res. */
float wiresize, rendersize;
/* bias elements to have an offset volume. /* bias elements to have an offset volume.
* mother ball changes will effect other objects thresholds, * mother ball changes will effect other objects thresholds,

View File

@@ -112,7 +112,8 @@ typedef struct ModifierData {
int stackindex; int stackindex;
short flag; short flag;
short pad; short pad;
char name[64]; /* MAX_NAME */ /** MAX_NAME. */
char name[64];
char *error; char *error;
} ModifierData; } ModifierData;
@@ -130,7 +131,8 @@ typedef struct MappingInfoModifierData {
struct Tex *texture; struct Tex *texture;
struct Object *map_object; struct Object *map_object;
char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ /** MAX_CUSTOMDATA_LAYER_NAME. */
char uvlayer_name[64];
int uvlayer_tmp; int uvlayer_tmp;
int texmapping; int texmapping;
} MappingInfoModifierData; } MappingInfoModifierData;
@@ -172,7 +174,8 @@ typedef struct LatticeModifierData {
ModifierData modifier; ModifierData modifier;
struct Object *object; struct Object *object;
char name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ /** Optional vertexgroup name, MAX_VGROUP_NAME. */
char name[64];
float strength; float strength;
char pad[4]; char pad[4];
} LatticeModifierData; } LatticeModifierData;
@@ -181,8 +184,10 @@ typedef struct CurveModifierData {
ModifierData modifier; ModifierData modifier;
struct Object *object; struct Object *object;
char name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ /** Optional vertexgroup name, MAX_VGROUP_NAME. */
short defaxis; /* axis along which curve deforms */ char name[64];
/** Axis along which curve deforms. */
short defaxis;
char pad[6]; char pad[6];
} CurveModifierData; } CurveModifierData;
@@ -202,8 +207,10 @@ typedef struct BuildModifierData {
float start, length; float start, length;
short flag; short flag;
short randomize; /* (bool) whether order of vertices is randomized - legacy files (for readfile conversion) */ /** (bool) whether order of vertices is randomized - legacy files (for readfile conversion). */
int seed; /* (int) random seed */ short randomize;
/** (int) random seed. */
int seed;
} BuildModifierData; } BuildModifierData;
/* Build Modifier -> flag */ /* Build Modifier -> flag */
@@ -216,11 +223,15 @@ enum {
typedef struct MaskModifierData { typedef struct MaskModifierData {
ModifierData modifier; ModifierData modifier;
struct Object *ob_arm; /* armature to use to in place of hardcoded vgroup */ /** Armature to use to in place of hardcoded vgroup. */
char vgroup[64]; /* name of vertex group to use to mask, MAX_VGROUP_NAME */ struct Object *ob_arm;
/** Name of vertex group to use to mask, MAX_VGROUP_NAME. */
char vgroup[64];
short mode; /* using armature or hardcoded vgroup */ /** Using armature or hardcoded vgroup. */
short flag; /* flags for various things */ short mode;
/** Flags for various things. */
short flag;
float threshold; float threshold;
} MaskModifierData; } MaskModifierData;
@@ -303,7 +314,8 @@ enum {
typedef struct MirrorModifierData { typedef struct MirrorModifierData {
ModifierData modifier; ModifierData modifier;
short axis DNA_DEPRECATED; /* deprecated, use flag instead */ /** Deprecated, use flag instead. */
short axis DNA_DEPRECATED;
short flag; short flag;
float tolerance; float tolerance;
float uv_offset[2]; float uv_offset[2];
@@ -332,7 +344,8 @@ enum {
typedef struct EdgeSplitModifierData { typedef struct EdgeSplitModifierData {
ModifierData modifier; ModifierData modifier;
float split_angle; /* angle above which edges should be split */ /** Angle above which edges should be split. */
float split_angle;
int flags; int flags;
} EdgeSplitModifierData; } EdgeSplitModifierData;
@@ -349,17 +362,25 @@ typedef struct BevelModNorEditData {
typedef struct BevelModifierData { typedef struct BevelModifierData {
ModifierData modifier; ModifierData modifier;
float value; /* the "raw" bevel value (distance/amount to bevel) */ /** The "raw" bevel value (distance/amount to bevel). */
int res; /* the resolution (as originally coded, it is the number of recursive bevels) */ float value;
short flags; /* general option flags */ /** The resolution (as originally coded, it is the number of recursive bevels). */
short val_flags; /* used to interpret the bevel value */ int res;
short lim_flags; /* flags to tell the tool how to limit the bevel */ /** General option flags. */
short e_flags; /* flags to direct how edge weights are applied to verts */ short flags;
short mat; /* material index if >= 0, else material inherited from surrounding faces */ /** Used to interpret the bevel value. */
short val_flags;
/** Flags to tell the tool how to limit the bevel. */
short lim_flags;
/** Flags to direct how edge weights are applied to verts. */
short e_flags;
/** Material index if >= 0, else material inherited from surrounding faces. */
short mat;
short edge_flags; short edge_flags;
short face_str_mode; short face_str_mode;
short pad2; short pad2;
float profile; /* controls profile shape (0->1, .5 is round) */ /** Controls profile shape (0->1, .5 is round). */
float profile;
/* if the MOD_BEVEL_ANGLE is set, this will be how "sharp" an edge must be before it gets beveled */ /* if the MOD_BEVEL_ANGLE is set, this will be how "sharp" an edge must be before it gets beveled */
float bevel_angle; float bevel_angle;
/* if the MOD_BEVEL_VWEIGHT option is set, this will be the name of the vert group, MAX_VGROUP_NAME */ /* if the MOD_BEVEL_VWEIGHT option is set, this will be the name of the vert group, MAX_VGROUP_NAME */
@@ -414,10 +435,13 @@ typedef struct SmokeModifierData {
ModifierData modifier; ModifierData modifier;
struct SmokeDomainSettings *domain; struct SmokeDomainSettings *domain;
struct SmokeFlowSettings *flow; /* inflow, outflow, smoke objects */ /** Inflow, outflow, smoke objects. */
struct SmokeCollSettings *coll; /* collision objects */ struct SmokeFlowSettings *flow;
/** Collision objects. */
struct SmokeCollSettings *coll;
float time; float time;
int type; /* domain, inflow, outflow, ... */ /** Domain, inflow, outflow, .... */
int type;
} SmokeModifierData; } SmokeModifierData;
/* Smoke modifier flags */ /* Smoke modifier flags */
@@ -433,14 +457,16 @@ typedef struct DisplaceModifierData {
/* keep in sync with MappingInfoModifierData */ /* keep in sync with MappingInfoModifierData */
struct Tex *texture; struct Tex *texture;
struct Object *map_object; struct Object *map_object;
char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ /** MAX_CUSTOMDATA_LAYER_NAME. */
char uvlayer_name[64];
int uvlayer_tmp; int uvlayer_tmp;
int texmapping; int texmapping;
/* end MappingInfoModifierData */ /* end MappingInfoModifierData */
float strength; float strength;
int direction; int direction;
char defgrp_name[64]; /* MAX_VGROUP_NAME */ /** MAX_VGROUP_NAME. */
char defgrp_name[64];
float midlevel; float midlevel;
int space; int space;
} DisplaceModifierData; } DisplaceModifierData;
@@ -473,12 +499,14 @@ typedef struct UVProjectModifierData {
ModifierData modifier; ModifierData modifier;
/* the objects which do the projecting */ /* the objects which do the projecting */
struct Object *projectors[10]; /* MOD_UVPROJECT_MAXPROJECTORS */ /** MOD_UVPROJECT_MAXPROJECTORS. */
struct Object *projectors[10];
int pad2; int pad2;
int num_projectors; int num_projectors;
float aspectx, aspecty; float aspectx, aspecty;
float scalex, scaley; float scalex, scaley;
char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ /** MAX_CUSTOMDATA_LAYER_NAME. */
char uvlayer_name[64];
int uvlayer_tmp, pad; int uvlayer_tmp, pad;
} UVProjectModifierData; } UVProjectModifierData;
@@ -492,13 +520,19 @@ enum {
typedef struct DecimateModifierData { typedef struct DecimateModifierData {
ModifierData modifier; ModifierData modifier;
float percent; /* (mode == MOD_DECIM_MODE_COLLAPSE) */ /** (mode == MOD_DECIM_MODE_COLLAPSE). */
short iter; /* (mode == MOD_DECIM_MODE_UNSUBDIV) */ float percent;
char delimit; /* (mode == MOD_DECIM_MODE_DISSOLVE) */ /** (mode == MOD_DECIM_MODE_UNSUBDIV). */
char symmetry_axis; /* (mode == MOD_DECIM_MODE_COLLAPSE) */ short iter;
float angle; /* (mode == MOD_DECIM_MODE_DISSOLVE) */ /** (mode == MOD_DECIM_MODE_DISSOLVE). */
char delimit;
/** (mode == MOD_DECIM_MODE_COLLAPSE). */
char symmetry_axis;
/** (mode == MOD_DECIM_MODE_DISSOLVE). */
float angle;
char defgrp_name[64]; /* MAX_VGROUP_NAME */ /** MAX_VGROUP_NAME. */
char defgrp_name[64];
float defgrp_factor; float defgrp_factor;
short flag, mode; short flag, mode;
@@ -522,7 +556,8 @@ enum {
typedef struct SmoothModifierData { typedef struct SmoothModifierData {
ModifierData modifier; ModifierData modifier;
float fac; float fac;
char defgrp_name[64]; /* MAX_VGROUP_NAME */ /** MAX_VGROUP_NAME. */
char defgrp_name[64];
short flag, repeat; short flag, repeat;
} SmoothModifierData; } SmoothModifierData;
@@ -541,7 +576,8 @@ typedef struct CastModifierData {
float fac; float fac;
float radius; float radius;
float size; float size;
char defgrp_name[64]; /* MAX_VGROUP_NAME */ /** MAX_VGROUP_NAME. */
char defgrp_name[64];
short flag, type; short flag, type;
} CastModifierData; } CastModifierData;
@@ -568,13 +604,15 @@ typedef struct WaveModifierData {
/* keep in sync with MappingInfoModifierData */ /* keep in sync with MappingInfoModifierData */
struct Tex *texture; struct Tex *texture;
struct Object *map_object; struct Object *map_object;
char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ /** MAX_CUSTOMDATA_LAYER_NAME. */
char uvlayer_name[64];
int uvlayer_tmp; int uvlayer_tmp;
int texmapping; int texmapping;
/* end MappingInfoModifierData */ /* end MappingInfoModifierData */
struct Object *objectcenter; struct Object *objectcenter;
char defgrp_name[64]; /* MAX_VGROUP_NAME */ /** MAX_VGROUP_NAME. */
char defgrp_name[64];
short flag, pad; short flag, pad;
@@ -600,11 +638,14 @@ enum {
typedef struct ArmatureModifierData { typedef struct ArmatureModifierData {
ModifierData modifier; ModifierData modifier;
short deformflag, multi; /* deformflag replaces armature->deformflag */ /** Deformflag replaces armature->deformflag. */
short deformflag, multi;
int pad2; int pad2;
struct Object *object; struct Object *object;
float *prevCos; /* stored input of previous modifier, for vertexgroup blending */ /** Stored input of previous modifier, for vertexgroup blending. */
char defgrp_name[64]; /* MAX_VGROUP_NAME */ float *prevCos;
/** MAX_VGROUP_NAME. */
char defgrp_name[64];
} ArmatureModifierData; } ArmatureModifierData;
enum { enum {
@@ -629,21 +670,28 @@ typedef struct HookModifierData {
ModifierData modifier; ModifierData modifier;
struct Object *object; struct Object *object;
char subtarget[64]; /* optional name of bone target, MAX_ID_NAME-2 */ /** Optional name of bone target, MAX_ID_NAME-2. */
char subtarget[64];
char flag; char flag;
char falloff_type; /* use enums from WarpModifier (exact same functionality) */ /** Use enums from WarpModifier (exact same functionality). */
char falloff_type;
char pad[6]; char pad[6];
float parentinv[4][4]; /* matrix making current transform unmodified */ /** Matrix making current transform unmodified. */
float cent[3]; /* visualization of hook */ float parentinv[4][4];
float falloff; /* if not zero, falloff is distance where influence zero */ /** Visualization of hook. */
float cent[3];
/** If not zero, falloff is distance where influence zero. */
float falloff;
struct CurveMapping *curfalloff; struct CurveMapping *curfalloff;
int *indexar; /* if NULL, it's using vertexgroup */ /** If NULL, it's using vertexgroup. */
int *indexar;
int totindex; int totindex;
float force; float force;
char name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ /** Optional vertexgroup name, MAX_VGROUP_NAME. */
char name[64];
} HookModifierData; } HookModifierData;
typedef struct SoftbodyModifierData { typedef struct SoftbodyModifierData {
@@ -653,13 +701,17 @@ typedef struct SoftbodyModifierData {
typedef struct ClothModifierData { typedef struct ClothModifierData {
ModifierData modifier; ModifierData modifier;
struct Cloth *clothObject; /* The internal data structure for cloth. */ /** The internal data structure for cloth. */
struct ClothSimSettings *sim_parms; /* definition is in DNA_cloth_types.h */ struct Cloth *clothObject;
struct ClothCollSettings *coll_parms; /* definition is in DNA_cloth_types.h */ /** Definition is in DNA_cloth_types.h. */
struct ClothSimSettings *sim_parms;
/** Definition is in DNA_cloth_types.h. */
struct ClothCollSettings *coll_parms;
/* PointCache can be shared with other instances of ClothModifierData. /* PointCache can be shared with other instances of ClothModifierData.
* Inspect (modifier.flag & eModifierFlag_SharedCaches) to find out. */ * Inspect (modifier.flag & eModifierFlag_SharedCaches) to find out. */
struct PointCache *point_cache; /* definition is in DNA_object_force_types.h */ /** Definition is in DNA_object_force_types.h. */
struct PointCache *point_cache;
struct ListBase ptcaches; struct ListBase ptcaches;
/* XXX nasty hack, remove once hair can be separated from cloth modifier data */ /* XXX nasty hack, remove once hair can be separated from cloth modifier data */
@@ -676,33 +728,45 @@ typedef struct ClothModifierData {
typedef struct CollisionModifierData { typedef struct CollisionModifierData {
ModifierData modifier; ModifierData modifier;
struct MVert *x; /* position at the beginning of the frame */ /** Position at the beginning of the frame. */
struct MVert *xnew; /* position at the end of the frame */ struct MVert *x;
struct MVert *xold; /* unused atm, but was discussed during sprint */ /** Position at the end of the frame. */
struct MVert *current_xnew; /* new position at the actual inter-frame step */ struct MVert *xnew;
struct MVert *current_x; /* position at the actual inter-frame step */ /** Unused atm, but was discussed during sprint. */
struct MVert *current_v; /* (xnew - x) at the actual inter-frame step */ struct MVert *xold;
/** New position at the actual inter-frame step. */
struct MVert *current_xnew;
/** Position at the actual inter-frame step. */
struct MVert *current_x;
/** (xnew - x) at the actual inter-frame step. */
struct MVert *current_v;
struct MVertTri *tri; struct MVertTri *tri;
unsigned int mvert_num; unsigned int mvert_num;
unsigned int tri_num; unsigned int tri_num;
float time_x, time_xnew; /* cfra time of modifier */ /** Cfra time of modifier. */
char is_static; /* collider doesn't move this frame, i.e. x[].co==xnew[].co */ float time_x, time_xnew;
/** Collider doesn't move this frame, i.e. x[].co==xnew[].co. */
char is_static;
char pad[7]; char pad[7];
struct BVHTree *bvhtree; /* bounding volume hierarchy for this cloth object */ /** Bounding volume hierarchy for this cloth object. */
struct BVHTree *bvhtree;
} CollisionModifierData; } CollisionModifierData;
typedef struct SurfaceModifierData { typedef struct SurfaceModifierData {
ModifierData modifier; ModifierData modifier;
struct MVert *x; /* old position */ /** Old position. */
struct MVert *v; /* velocity */ struct MVert *x;
/** Velocity. */
struct MVert *v;
struct Mesh *mesh; struct Mesh *mesh;
struct BVHTreeFromMesh *bvhtree; /* bounding volume hierarchy of the mesh faces */ /** Bounding volume hierarchy of the mesh faces. */
struct BVHTreeFromMesh *bvhtree;
int cfra, numverts; int cfra, numverts;
} SurfaceModifierData; } SurfaceModifierData;
@@ -743,30 +807,46 @@ typedef struct MDefCell {
typedef struct MeshDeformModifierData { typedef struct MeshDeformModifierData {
ModifierData modifier; ModifierData modifier;
struct Object *object; /* mesh object */ /** Mesh object. */
char defgrp_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ struct Object *object;
/** Optional vertexgroup name, MAX_VGROUP_NAME. */
char defgrp_name[64];
short gridsize, flag, pad[2]; short gridsize, flag, pad[2];
/* result of static binding */ /* result of static binding */
MDefInfluence *bindinfluences; /* influences */ /** Influences. */
int *bindoffsets; /* offsets into influences array */ MDefInfluence *bindinfluences;
float *bindcagecos; /* coordinates that cage was bound with */ /** Offsets into influences array. */
int totvert, totcagevert; /* total vertices in mesh and cage */ int *bindoffsets;
/** Coordinates that cage was bound with. */
float *bindcagecos;
/** Total vertices in mesh and cage. */
int totvert, totcagevert;
/* result of dynamic binding */ /* result of dynamic binding */
MDefCell *dyngrid; /* grid with dynamic binding cell points */ /** Grid with dynamic binding cell points. */
MDefInfluence *dyninfluences; /* dynamic binding vertex influences */ MDefCell *dyngrid;
int *dynverts; /* is this vertex bound or not? */ /** Dynamic binding vertex influences. */
int dyngridsize; /* size of the dynamic bind grid */ MDefInfluence *dyninfluences;
int totinfluence; /* total number of vertex influences */ /** Is this vertex bound or not?. */
float dyncellmin[3]; /* offset of the dynamic bind grid */ int *dynverts;
float dyncellwidth; /* width of dynamic bind cell */ /** Size of the dynamic bind grid. */
float bindmat[4][4]; /* matrix of cage at binding time */ int dyngridsize;
/** Total number of vertex influences. */
int totinfluence;
/** Offset of the dynamic bind grid. */
float dyncellmin[3];
/** Width of dynamic bind cell. */
float dyncellwidth;
/** Matrix of cage at binding time. */
float bindmat[4][4];
/* deprecated storage */ /* deprecated storage */
float *bindweights; /* deprecated inefficient storage */ /** Deprecated inefficient storage. */
float *bindcos; /* deprecated storage of cage coords */ float *bindweights;
/** Deprecated storage of cage coords. */
float *bindcos;
/* runtime */ /* runtime */
void (*bindfunc)(struct MeshDeformModifierData *mmd, struct Mesh *cagemesh, void (*bindfunc)(struct MeshDeformModifierData *mmd, struct Mesh *cagemesh,
@@ -787,8 +867,10 @@ typedef struct ParticleSystemModifierData {
ModifierData modifier; ModifierData modifier;
struct ParticleSystem *psys; struct ParticleSystem *psys;
struct Mesh *mesh_final; /* Final Mesh - its topology may differ from orig mesh. */ /** Final Mesh - its topology may differ from orig mesh. */
struct Mesh *mesh_original; /* Original mesh that particles are attached to. */ struct Mesh *mesh_final;
/** Original mesh that particles are attached to. */
struct Mesh *mesh_original;
int totdmvert, totdmedge, totdmface; int totdmvert, totdmedge, totdmface;
short flag, pad; short flag, pad;
} ParticleSystemModifierData; } ParticleSystemModifierData;
@@ -823,8 +905,10 @@ typedef struct ParticleInstanceModifierData {
float position, random_position; float position, random_position;
float rotation, random_rotation; float rotation, random_rotation;
float particle_amount, particle_offset; float particle_amount, particle_offset;
char index_layer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ /** MAX_CUSTOMDATA_LAYER_NAME. */
char value_layer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ char index_layer_name[64];
/** MAX_CUSTOMDATA_LAYER_NAME. */
char value_layer_name[64];
} ParticleInstanceModifierData; } ParticleInstanceModifierData;
typedef enum { typedef enum {
@@ -842,7 +926,8 @@ typedef struct ExplodeModifierData {
int *facepa; int *facepa;
short flag, vgroup; short flag, vgroup;
float protect; float protect;
char uvname[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ /** MAX_CUSTOMDATA_LAYER_NAME. */
char uvname[64];
} ExplodeModifierData; } ExplodeModifierData;
typedef struct MultiresModifierData { typedef struct MultiresModifierData {
@@ -864,21 +949,31 @@ typedef enum {
typedef struct FluidsimModifierData { typedef struct FluidsimModifierData {
ModifierData modifier; ModifierData modifier;
struct FluidsimSettings *fss; /* definition is in DNA_object_fluidsim_types.h */ /** Definition is in DNA_object_fluidsim_types.h. */
struct FluidsimSettings *fss;
} FluidsimModifierData; } FluidsimModifierData;
typedef struct ShrinkwrapModifierData { typedef struct ShrinkwrapModifierData {
ModifierData modifier; ModifierData modifier;
struct Object *target; /* shrink target */ /** Shrink target. */
struct Object *auxTarget; /* additional shrink target */ struct Object *target;
char vgroup_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ /** Additional shrink target. */
float keepDist; /* distance offset to keep from mesh/projection point */ struct Object *auxTarget;
short shrinkType; /* shrink type projection */ /** Optional vertexgroup name, MAX_VGROUP_NAME. */
char shrinkOpts; /* shrink options */ char vgroup_name[64];
char shrinkMode; /* shrink to surface mode */ /** Distance offset to keep from mesh/projection point. */
float projLimit; /* limit the projection ray cast */ float keepDist;
char projAxis; /* axis to project over */ /** Shrink type projection. */
short shrinkType;
/** Shrink options. */
char shrinkOpts;
/** Shrink to surface mode. */
char shrinkMode;
/** Limit the projection ray cast. */
float projLimit;
/** Axis to project over. */
char projAxis;
/* If using projection over vertex normal this controls the level of subsurface that must be done /* If using projection over vertex normal this controls the level of subsurface that must be done
* before getting the vertex coordinates and normal * before getting the vertex coordinates and normal
@@ -944,14 +1039,21 @@ enum {
typedef struct SimpleDeformModifierData { typedef struct SimpleDeformModifierData {
ModifierData modifier; ModifierData modifier;
struct Object *origin; /* object to control the origin of modifier space coordinates */ /** Object to control the origin of modifier space coordinates. */
char vgroup_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ struct Object *origin;
float factor; /* factors to control simple deforms */ /** Optional vertexgroup name, MAX_VGROUP_NAME. */
float limit[2]; /* lower and upper limit */ char vgroup_name[64];
/** Factors to control simple deforms. */
float factor;
/** Lower and upper limit. */
float limit[2];
char mode; /* deform function */ /** Deform function. */
char axis; /* lock axis (for taper and stretch) */ char mode;
char deform_axis; /* axis to perform the deform on (default is X, but can be overridden by origin */ /** Lock axis (for taper and stretch). */
char axis;
/** Axis to perform the deform on (default is X, but can be overridden by origin. */
char deform_axis;
char flag; char flag;
} SimpleDeformModifierData; } SimpleDeformModifierData;
@@ -982,12 +1084,16 @@ typedef struct ShapeKeyModifierData {
typedef struct SolidifyModifierData { typedef struct SolidifyModifierData {
ModifierData modifier; ModifierData modifier;
char defgrp_name[64]; /* name of vertex group to use, MAX_VGROUP_NAME */ /** Name of vertex group to use, MAX_VGROUP_NAME. */
float offset; /* new surface offset level*/ char defgrp_name[64];
float offset_fac; /* midpoint of the offset */ /** New surface offset leve.l*/
float offset;
/** Midpoint of the offset . */
float offset_fac;
/* factor for the minimum weight to use when vgroups are used, avoids 0.0 weights giving duplicate geometry */ /* factor for the minimum weight to use when vgroups are used, avoids 0.0 weights giving duplicate geometry */
float offset_fac_vg; float offset_fac_vg;
float offset_clamp; /* clamp offset based on surrounding geometry */ /** Clamp offset based on surrounding geometry. */
float offset_clamp;
float pad; float pad;
float crease_inner; float crease_inner;
float crease_outer; float crease_outer;
@@ -1061,8 +1167,10 @@ typedef struct OceanModifierData {
int bakestart; int bakestart;
int bakeend; int bakeend;
char cachepath[1024]; /* FILE_MAX */ /** FILE_MAX. */
char foamlayername[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ char cachepath[1024];
/** MAX_CUSTOMDATA_LAYER_NAME. */
char foamlayername[64];
char cached; char cached;
char geometry_mode; char geometry_mode;
@@ -1098,7 +1206,8 @@ typedef struct WarpModifierData {
/* keep in sync with MappingInfoModifierData */ /* keep in sync with MappingInfoModifierData */
struct Tex *texture; struct Tex *texture;
struct Object *map_object; struct Object *map_object;
char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ /** MAX_CUSTOMDATA_LAYER_NAME. */
char uvlayer_name[64];
int uvlayer_tmp; int uvlayer_tmp;
int texmapping; int texmapping;
/* end MappingInfoModifierData */ /* end MappingInfoModifierData */
@@ -1106,10 +1215,12 @@ typedef struct WarpModifierData {
struct Object *object_from; struct Object *object_from;
struct Object *object_to; struct Object *object_to;
struct CurveMapping *curfalloff; struct CurveMapping *curfalloff;
char defgrp_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ /** Optional vertexgroup name, MAX_VGROUP_NAME. */
char defgrp_name[64];
float strength; float strength;
float falloff_radius; float falloff_radius;
char flag; /* not used yet */ /** Not used yet. */
char flag;
char falloff_type; char falloff_type;
char pad[6]; char pad[6];
} WarpModifierData; } WarpModifierData;
@@ -1132,28 +1243,40 @@ typedef enum {
typedef struct WeightVGEditModifierData { typedef struct WeightVGEditModifierData {
ModifierData modifier; ModifierData modifier;
char defgrp_name[64]; /* Name of vertex group to edit. MAX_VGROUP_NAME. */ /** Name of vertex group to edit. MAX_VGROUP_NAME. */
char defgrp_name[64];
short edit_flags; /* Using MOD_WVG_EDIT_* flags. */ /** Using MOD_WVG_EDIT_* flags. */
short falloff_type; /* Using MOD_WVG_MAPPING_* defines. */ short edit_flags;
float default_weight; /* Weight for vertices not in vgroup. */ /** Using MOD_WVG_MAPPING_* defines. */
short falloff_type;
/** Weight for vertices not in vgroup. */
float default_weight;
/* Mapping stuff. */ /* Mapping stuff. */
struct CurveMapping *cmap_curve; /* The custom mapping curve! */ /** The custom mapping curve!. */
struct CurveMapping *cmap_curve;
/* The add/remove vertices weight thresholds. */ /* The add/remove vertices weight thresholds. */
float add_threshold, rem_threshold; float add_threshold, rem_threshold;
/* Masking options. */ /* Masking options. */
float mask_constant; /* The global "influence", if no vgroup nor tex is used as mask. */ /** The global "influence", if no vgroup nor tex is used as mask. */
char mask_defgrp_name[64]; /* Name of mask vertex group from which to get weight factors. MAX_VGROUP_NAME */ float mask_constant;
/** Name of mask vertex group from which to get weight factors. MAX_VGROUP_NAME. */
char mask_defgrp_name[64];
/* Texture masking. */ /* Texture masking. */
int mask_tex_use_channel; /* Which channel to use as weightf. */ /** Which channel to use as weightf. */
struct Tex *mask_texture; /* The texture. */ int mask_tex_use_channel;
struct Object *mask_tex_map_obj; /* Name of the map object. */ /** The texture. */
int mask_tex_mapping; /* How to map the texture (using MOD_DISP_MAP_* enums). */ struct Tex *mask_texture;
char mask_tex_uvlayer_name[64]; /* Name of the UV map. MAX_CUSTOMDATA_LAYER_NAME */ /** Name of the map object. */
struct Object *mask_tex_map_obj;
/** How to map the texture (using MOD_DISP_MAP_* enums). */
int mask_tex_mapping;
/** Name of the UV map. MAX_CUSTOMDATA_LAYER_NAME. */
char mask_tex_uvlayer_name[64];
/* Padding... */ /* Padding... */
int pad_i1; int pad_i1;
@@ -1169,25 +1292,38 @@ enum {
typedef struct WeightVGMixModifierData { typedef struct WeightVGMixModifierData {
ModifierData modifier; ModifierData modifier;
char defgrp_name_a[64]; /* Name of vertex group to modify/weight. MAX_VGROUP_NAME. */ /** Name of vertex group to modify/weight. MAX_VGROUP_NAME. */
char defgrp_name_b[64]; /* Name of other vertex group to mix in. MAX_VGROUP_NAME. */ char defgrp_name_a[64];
float default_weight_a; /* Default weight value for first vgroup. */ /** Name of other vertex group to mix in. MAX_VGROUP_NAME. */
float default_weight_b; /* Default weight value to mix in. */ char defgrp_name_b[64];
char mix_mode; /* How second vgroups weights affect first ones */ /** Default weight value for first vgroup. */
char mix_set; /* What vertices to affect. */ float default_weight_a;
/** Default weight value to mix in. */
float default_weight_b;
/** How second vgroups weights affect first ones. */
char mix_mode;
/** What vertices to affect. */
char mix_set;
char pad_c1[6]; char pad_c1[6];
/* Masking options. */ /* Masking options. */
float mask_constant; /* The global "influence", if no vgroup nor tex is used as mask. */ /** The global "influence", if no vgroup nor tex is used as mask. */
char mask_defgrp_name[64]; /* Name of mask vertex group from which to get weight factors. MAX_VGROUP_NAME */ float mask_constant;
/** Name of mask vertex group from which to get weight factors. MAX_VGROUP_NAME. */
char mask_defgrp_name[64];
/* Texture masking. */ /* Texture masking. */
int mask_tex_use_channel; /* Which channel to use as weightf. */ /** Which channel to use as weightf. */
struct Tex *mask_texture; /* The texture. */ int mask_tex_use_channel;
struct Object *mask_tex_map_obj; /* Name of the map object. */ /** The texture. */
int mask_tex_mapping; /* How to map the texture! */ struct Tex *mask_texture;
char mask_tex_uvlayer_name[64]; /* Name of the UV map. MAX_CUSTOMDATA_LAYER_NAME. */ /** Name of the map object. */
struct Object *mask_tex_map_obj;
/** How to map the texture!. */
int mask_tex_mapping;
/** Name of the UV map. MAX_CUSTOMDATA_LAYER_NAME. */
char mask_tex_uvlayer_name[64];
/* Padding... */ /* Padding... */
int pad_i1; int pad_i1;
@@ -1216,7 +1352,8 @@ enum {
typedef struct WeightVGProximityModifierData { typedef struct WeightVGProximityModifierData {
ModifierData modifier; ModifierData modifier;
char defgrp_name[64]; /* Name of vertex group to modify/weight. MAX_VGROUP_NAME. */ /** Name of vertex group to modify/weight. MAX_VGROUP_NAME. */
char defgrp_name[64];
/* Proximity modes. */ /* Proximity modes. */
int proximity_mode; int proximity_mode;
@@ -1226,20 +1363,29 @@ typedef struct WeightVGProximityModifierData {
struct Object *proximity_ob_target; struct Object *proximity_ob_target;
/* Masking options. */ /* Masking options. */
float mask_constant; /* The global "influence", if no vgroup nor tex is used as mask. */ /** The global "influence", if no vgroup nor tex is used as mask. */
char mask_defgrp_name[64]; /* Name of mask vertex group from which to get weight factors. MAX_VGROUP_NAME */ float mask_constant;
/** Name of mask vertex group from which to get weight factors. MAX_VGROUP_NAME. */
char mask_defgrp_name[64];
/* Texture masking. */ /* Texture masking. */
int mask_tex_use_channel; /* Which channel to use as weightf. */ /** Which channel to use as weightf. */
struct Tex *mask_texture; /* The texture. */ int mask_tex_use_channel;
struct Object *mask_tex_map_obj; /* Name of the map object. */ /** The texture. */
int mask_tex_mapping; /* How to map the texture! */ struct Tex *mask_texture;
char mask_tex_uvlayer_name[64]; /* Name of the UV Map. MAX_CUSTOMDATA_LAYER_NAME. */ /** Name of the map object. */
struct Object *mask_tex_map_obj;
/** How to map the texture!. */
int mask_tex_mapping;
/** Name of the UV Map. MAX_CUSTOMDATA_LAYER_NAME. */
char mask_tex_uvlayer_name[64];
float min_dist, max_dist; /* Distances mapping to 0.0/1.0 weights. */ /** Distances mapping to 0.0/1.0 weights. */
float min_dist, max_dist;
/* Put here to avoid breaking existing struct... */ /* Put here to avoid breaking existing struct... */
short falloff_type; /* Using MOD_WVG_MAPPING_* enums. */ /** Using MOD_WVG_MAPPING_* enums. */
short falloff_type;
/* Padding... */ /* Padding... */
short pad_s1; short pad_s1;
@@ -1293,7 +1439,8 @@ typedef struct DynamicPaintModifierData {
struct DynamicPaintCanvasSettings *canvas; struct DynamicPaintCanvasSettings *canvas;
struct DynamicPaintBrushSettings *brush; struct DynamicPaintBrushSettings *brush;
int type; /* ui display: canvas / brush */ /** Ui display: canvas / brush. */
int type;
int pad; int pad;
} DynamicPaintModifierData; } DynamicPaintModifierData;
@@ -1396,7 +1543,8 @@ typedef struct LaplacianSmoothModifierData {
ModifierData modifier; ModifierData modifier;
float lambda, lambda_border, pad1; float lambda, lambda_border, pad1;
char defgrp_name[64]; /* MAX_VGROUP_NAME */ /** MAX_VGROUP_NAME. */
char defgrp_name[64];
short flag, repeat; short flag, repeat;
} LaplacianSmoothModifierData; } LaplacianSmoothModifierData;
@@ -1425,7 +1573,8 @@ typedef struct CorrectiveSmoothModifierData {
char smooth_type, rest_source; char smooth_type, rest_source;
char pad[2]; char pad[2];
char defgrp_name[64]; /* MAX_VGROUP_NAME */ /** MAX_VGROUP_NAME. */
char defgrp_name[64];
/* runtime-only cache (delta's between), /* runtime-only cache (delta's between),
* delta's between the original positions and the smoothed positions */ * delta's between the original positions and the smoothed positions */
@@ -1456,15 +1605,22 @@ typedef struct UVWarpModifierData {
char axis_u, axis_v; char axis_u, axis_v;
char pad[6]; char pad[6];
float center[2]; /* used for rotate/scale */ /** Used for rotate/scale. */
float center[2];
struct Object *object_src; /* source */ /** Source. */
char bone_src[64]; /* optional name of bone target, MAX_ID_NAME-2 */ struct Object *object_src;
struct Object *object_dst; /* target */ /** Optional name of bone target, MAX_ID_NAME-2. */
char bone_dst[64]; /* optional name of bone target, MAX_ID_NAME-2 */ char bone_src[64];
/** Target. */
struct Object *object_dst;
/** Optional name of bone target, MAX_ID_NAME-2. */
char bone_dst[64];
char vgroup_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ /** Optional vertexgroup name, MAX_VGROUP_NAME. */
char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ char vgroup_name[64];
/** MAX_CUSTOMDATA_LAYER_NAME. */
char uvlayer_name[64];
} UVWarpModifierData; } UVWarpModifierData;
/* cache modifier */ /* cache modifier */
@@ -1472,7 +1628,8 @@ typedef struct MeshCacheModifierData {
ModifierData modifier; ModifierData modifier;
char flag; char flag;
char type; /* file format */ /** File format. */
char type;
char time_mode; char time_mode;
char play_mode; char play_mode;
@@ -1497,7 +1654,8 @@ typedef struct MeshCacheModifierData {
float eval_time; float eval_time;
float eval_factor; float eval_factor;
char filepath[1024]; /* FILE_MAX */ /** FILE_MAX. */
char filepath[1024];
} MeshCacheModifierData; } MeshCacheModifierData;
enum { enum {
@@ -1530,10 +1688,12 @@ enum {
typedef struct LaplacianDeformModifierData { typedef struct LaplacianDeformModifierData {
ModifierData modifier; ModifierData modifier;
char anchor_grp_name[64]; /* MAX_VGROUP_NAME */ /** MAX_VGROUP_NAME. */
char anchor_grp_name[64];
int total_verts, repeat; int total_verts, repeat;
float *vertexco; float *vertexco;
void *cache_system; /* runtime only */ /** Runtime only. */
void *cache_system;
short flag, pad[3]; short flag, pad[3];
} LaplacianDeformModifierData; } LaplacianDeformModifierData;
@@ -1546,7 +1706,8 @@ enum {
/* many of these options match 'solidify' */ /* many of these options match 'solidify' */
typedef struct WireframeModifierData { typedef struct WireframeModifierData {
ModifierData modifier; ModifierData modifier;
char defgrp_name[64]; /* MAX_VGROUP_NAME */ /** MAX_VGROUP_NAME. */
char defgrp_name[64];
float offset; float offset;
float offset_fac; float offset_fac;
float offset_fac_vg; float offset_fac_vg;
@@ -1570,7 +1731,8 @@ typedef struct DataTransferModifierData {
struct Object *ob_source; struct Object *ob_source;
int data_types; /* See DT_TYPE_ enum in ED_object.h */ /** See DT_TYPE_ enum in ED_object.h. */
int data_types;
/* See MREMAP_MODE_ enum in BKE_mesh_mapping.h */ /* See MREMAP_MODE_ enum in BKE_mesh_mapping.h */
int vmap_mode; int vmap_mode;
@@ -1584,12 +1746,16 @@ typedef struct DataTransferModifierData {
int pad_i1; int pad_i1;
int layers_select_src[4]; /* DT_MULTILAYER_INDEX_MAX; See DT_FROMLAYERS_ enum in ED_object.h */ /** DT_MULTILAYER_INDEX_MAX; See DT_FROMLAYERS_ enum in ED_object.h. */
int layers_select_dst[4]; /* DT_MULTILAYER_INDEX_MAX; See DT_TOLAYERS_ enum in ED_object.h */ int layers_select_src[4];
/** DT_MULTILAYER_INDEX_MAX; See DT_TOLAYERS_ enum in ED_object.h. */
int layers_select_dst[4];
int mix_mode; /* See CDT_MIX_ enum in BKE_customdata.h */ /** See CDT_MIX_ enum in BKE_customdata.h. */
int mix_mode;
float mix_factor; float mix_factor;
char defgrp_name[64]; /* MAX_VGROUP_NAME */ /** MAX_VGROUP_NAME. */
char defgrp_name[64];
int flags; int flags;
} DataTransferModifierData; } DataTransferModifierData;
@@ -1610,8 +1776,10 @@ enum {
/* Set Split Normals modifier */ /* Set Split Normals modifier */
typedef struct NormalEditModifierData { typedef struct NormalEditModifierData {
ModifierData modifier; ModifierData modifier;
char defgrp_name[64]; /* MAX_VGROUP_NAME */ /** MAX_VGROUP_NAME. */
struct Object *target; /* Source of normals, or center of ellipsoid. */ char defgrp_name[64];
/** Source of normals, or center of ellipsoid. */
struct Object *target;
short mode; short mode;
short flag; short flag;
short mix_mode; short mix_mode;
@@ -1648,7 +1816,8 @@ typedef struct MeshSeqCacheModifierData {
struct CacheFile *cache_file; struct CacheFile *cache_file;
struct CacheReader *reader; struct CacheReader *reader;
char object_path[1024]; /* 1024 = FILE_MAX */ /** 1024 = FILE_MAX. */
char object_path[1024];
char read_flag; char read_flag;
char pad[7]; char pad[7];
@@ -1681,8 +1850,10 @@ typedef struct SurfaceDeformModifierData {
ModifierData modifier; ModifierData modifier;
struct Depsgraph *depsgraph; struct Depsgraph *depsgraph;
struct Object *target; /* bind target object */ /** Bind target object. */
SDefVert *verts; /* vertex bind data */ struct Object *target;
/** Vertex bind data. */
SDefVert *verts;
float falloff; float falloff;
unsigned int numverts, numpoly; unsigned int numverts, numpoly;
int flags; int flags;
@@ -1708,7 +1879,8 @@ enum {
typedef struct WeightedNormalModifierData { typedef struct WeightedNormalModifierData {
ModifierData modifier; ModifierData modifier;
char defgrp_name[64]; /* MAX_VGROUP_NAME */ /** MAX_VGROUP_NAME. */
char defgrp_name[64];
char mode, flag; char mode, flag;
short weight; short weight;
float thresh; float thresh;

View File

@@ -48,73 +48,111 @@ struct MovieTrackingTrack;
struct MovieTrackingMarker; struct MovieTrackingMarker;
typedef struct MovieClipUser { typedef struct MovieClipUser {
int framenr; /* current frame number */ /** Current frame number. */
short render_size, render_flag; /* proxy render size */ int framenr;
/** Proxy render size. */
short render_size, render_flag;
} MovieClipUser; } MovieClipUser;
typedef struct MovieClipProxy { typedef struct MovieClipProxy {
char dir[768]; /* 768=FILE_MAXDIR custom directory for index and proxy files (defaults to BL_proxy) */ /** 768=FILE_MAXDIR custom directory for index and proxy files (defaults to BL_proxy). */
char dir[768];
short tc; /* time code in use */ /** Time code in use. */
short quality; /* proxy build quality */ short tc;
short build_size_flag; /* size flags (see below) of all proxies to build */ /** Proxy build quality. */
short build_tc_flag; /* time code flags (see below) of all tc indices to build */ short quality;
/** Size flags (see below) of all proxies to build. */
short build_size_flag;
/** Time code flags (see below) of all tc indices to build. */
short build_tc_flag;
} MovieClipProxy; } MovieClipProxy;
typedef struct MovieClip { typedef struct MovieClip {
ID id; ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ /** Animation data (must be immediately after id for utilities to use it). */
struct AnimData *adt;
char name[1024]; /* file path, 1024 = FILE_MAX */ /** File path, 1024 = FILE_MAX. */
char name[1024];
int source; /* sequence or movie */ /** Sequence or movie. */
int lastframe; /* last accessed frame number */ int source;
int lastsize[2]; /* size of last accessed frame */ /** Last accessed frame number. */
int lastframe;
/** Size of last accessed frame. */
int lastsize[2];
float aspx, aspy; /* display aspect */ /** Display aspect. */
float aspx, aspy;
struct anim *anim; /* movie source data */ /** Movie source data. */
struct MovieClipCache *cache; /* cache for different stuff, not in file */ struct anim *anim;
struct bGPdata *gpd; /* grease pencil data */ /** Cache for different stuff, not in file. */
struct MovieClipCache *cache;
/** Grease pencil data. */
struct bGPdata *gpd;
struct MovieTracking tracking; /* data for SfM tracking */ /** Data for SfM tracking. */
void *tracking_context; /* context of tracking job struct MovieTracking tracking;
* used to synchronize data like framenumber /**
* in SpaceClip clip user */ * Context of tracking job used to synchronize data
* like framenumber in SpaceClip clip user.
*/
void *tracking_context;
struct MovieClipProxy proxy; /* proxy to clip data */ /** Proxy to clip data. */
struct MovieClipProxy proxy;
int flag; int flag;
int len; /* length of movie */ /** Length of movie. */
int len;
int start_frame; /* scene frame number footage starts playing at */ /**
/* affects all data which is associated with a clip */ * Scene frame number footage starts playing at affects all data
/* such as motion tracking, camera reconstruciton and so */ * which is associated with a clip such as motion tracking,
* camera reconstruciton and so.
int frame_offset; /* offset which is adding to a file number when reading frame */ */
/* from a file. affects only a way how scene frame is mapping */ int start_frame;
/* to a file name and not touches other data associated with */ /**
/* a clip */ * Offset which is adding to a file number when reading frame from a file.
* affects only a way how scene frame is mapping to a file name and not
* touches other data associated with a clip. */
int frame_offset;
/* color management */ /* color management */
ColorManagedColorspaceSettings colorspace_settings; ColorManagedColorspaceSettings colorspace_settings;
} MovieClip; } MovieClip;
typedef struct MovieClipScopes { typedef struct MovieClipScopes {
short ok; /* 1 means scopes are ok and recalculation is unneeded */ /** 1 means scopes are ok and recalculation is unneeded. */
short use_track_mask; /* whether track's mask should be applied on preview */ short ok;
int track_preview_height; /* height of track preview widget */ /** Whether track's mask should be applied on preview. */
int frame_width, frame_height; /* width and height of frame for which scopes are calculated */ short use_track_mask;
struct MovieTrackingMarker undist_marker; /* undistorted position of marker used for pattern sampling */ /** Height of track preview widget. */
struct ImBuf *track_search; /* search area of a track */ int track_preview_height;
struct ImBuf *track_preview; /* ImBuf displayed in track preview */ /** Width and height of frame for which scopes are calculated. */
float track_pos[2]; /* sub-pizel position of marker in track ImBuf */ int frame_width, frame_height;
short track_disabled; /* active track is disabled, special notifier should be drawn */ /** Undistorted position of marker used for pattern sampling. */
short track_locked; /* active track is locked, no transformation should be allowed */ struct MovieTrackingMarker undist_marker;
int framenr; /* frame number scopes are created for */ /** Search area of a track. */
struct MovieTrackingTrack *track; /* track scopes are created for */ struct ImBuf *track_search;
struct MovieTrackingMarker *marker; /* marker scopes are created for */ /** ImBuf displayed in track preview. */
float slide_scale[2]; /* scale used for sliding from previewe area */ struct ImBuf *track_preview;
/** Sub-pizel position of marker in track ImBuf. */
float track_pos[2];
/** Active track is disabled, special notifier should be drawn. */
short track_disabled;
/** Active track is locked, no transformation should be allowed. */
short track_locked;
/** Frame number scopes are created for. */
int framenr;
/** Track scopes are created for. */
struct MovieTrackingTrack *track;
/** Marker scopes are created for. */
struct MovieTrackingMarker *marker;
/** Scale used for sliding from previewe area. */
float slide_scale[2];
} MovieClipScopes; } MovieClipScopes;
/* MovieClipProxy->build_size_flag */ /* MovieClipProxy->build_size_flag */

View File

@@ -60,25 +60,40 @@ typedef struct bActionModifier {
typedef struct bActionStrip { typedef struct bActionStrip {
struct bActionStrip *next, *prev; struct bActionStrip *next, *prev;
short flag, mode; short flag, mode;
short stride_axis; /* axis 0=x, 1=y, 2=z */ /** Axis 0=x, 1=y, 2=z. */
short curmod; /* current modifier for buttons */ short stride_axis;
/** Current modifier for buttons. */
short curmod;
struct Ipo *ipo; /* Blending ipo - was used for some old NAN era experiments. Non-functional currently. */ /** Blending ipo - was used for some old NAN era experiments. Non-functional currently. */
struct bAction *act; /* The action referenced by this strip */ struct Ipo *ipo;
struct Object *object; /* For groups, the actual object being nla'ed */ /** The action referenced by this strip. */
float start, end; /* The range of frames covered by this strip */ struct bAction *act;
float actstart, actend; /* The range of frames taken from the action */ /** For groups, the actual object being nla'ed. */
float actoffs; /* Offset within action, for cycles and striding */ struct Object *object;
float stridelen; /* The stridelength (considered when flag & ACT_USESTRIDE) */ /** The range of frames covered by this strip. */
float repeat; /* The number of times to repeat the action range */ float start, end;
float scale; /* The amount the action range is scaled by */ /** The range of frames taken from the action. */
float actstart, actend;
/** Offset within action, for cycles and striding. */
float actoffs;
/** The stridelength (considered when flag & ACT_USESTRIDE). */
float stridelen;
/** The number of times to repeat the action range. */
float repeat;
/** The amount the action range is scaled by. */
float scale;
float blendin, blendout; /* The number of frames on either end of the strip's length to fade in/out */ /** The number of frames on either end of the strip's length to fade in/out. */
float blendin, blendout;
char stridechannel[32]; /* Instead of stridelen, it uses an action channel */ /** Instead of stridelen, it uses an action channel. */
char offs_bone[32]; /* if repeat, use this bone/channel for defining offset */ char stridechannel[32];
/** If repeat, use this bone/channel for defining offset. */
char offs_bone[32];
ListBase modifiers; /* modifier stack */ /** Modifier stack. */
ListBase modifiers;
} bActionStrip; } bActionStrip;
/* strip->mode (these defines aren't really used, but are here for reference) */ /* strip->mode (these defines aren't really used, but are here for reference) */
@@ -89,12 +104,14 @@ typedef struct bActionStrip {
typedef enum eActStrip_Flag { typedef enum eActStrip_Flag {
ACTSTRIP_SELECT = (1<<0), ACTSTRIP_SELECT = (1<<0),
ACTSTRIP_USESTRIDE = (1<<1), ACTSTRIP_USESTRIDE = (1<<1),
ACTSTRIP_BLENDTONEXT = (1<<2), /* Not implemented. Is not used anywhere */ /* Not implemented. Is not used anywhere */
ACTSTRIP_BLENDTONEXT = (1<<2),
ACTSTRIP_HOLDLASTFRAME = (1<<3), ACTSTRIP_HOLDLASTFRAME = (1<<3),
ACTSTRIP_ACTIVE = (1<<4), ACTSTRIP_ACTIVE = (1<<4),
ACTSTRIP_LOCK_ACTION = (1<<5), ACTSTRIP_LOCK_ACTION = (1<<5),
ACTSTRIP_MUTE = (1<<6), ACTSTRIP_MUTE = (1<<6),
ACTSTRIP_REVERSE = (1<<7), /* This has yet to be implemented. To indicate that a strip should be played backwards */ /* This has yet to be implemented. To indicate that a strip should be played backwards */
ACTSTRIP_REVERSE = (1<<7),
ACTSTRIP_CYCLIC_USEX = (1<<8), ACTSTRIP_CYCLIC_USEX = (1<<8),
ACTSTRIP_CYCLIC_USEY = (1<<9), ACTSTRIP_CYCLIC_USEY = (1<<9),
ACTSTRIP_CYCLIC_USEZ = (1<<10), ACTSTRIP_CYCLIC_USEZ = (1<<10),

View File

@@ -62,12 +62,18 @@ typedef struct bNodeStack {
float vec[4]; float vec[4];
float min, max; float min, max;
void *data; void *data;
short hasinput; /* when input has link, tagged before executing */ /** When input has link, tagged before executing. */
short hasoutput; /* when output is linked, tagged before executing */ short hasinput;
short datatype; /* type of data pointer */ /** When output is linked, tagged before executing. */
short sockettype; /* type of socket stack comes from, to remap linking different sockets */ short hasoutput;
short is_copy; /* data is a copy of external data (no freeing) */ /** Type of data pointer. */
short external; /* data is used by external nodes (no freeing) */ short datatype;
/** Type of socket stack comes from, to remap linking different sockets. */
short sockettype;
/** Data is a copy of external data (no freeing). */
short is_copy;
/** Data is used by external nodes (no freeing). */
short external;
short pad[2]; short pad[2];
} bNodeStack; } bNodeStack;
@@ -86,48 +92,62 @@ typedef struct bNodeStack {
typedef struct bNodeSocket { typedef struct bNodeSocket {
struct bNodeSocket *next, *prev, *new_sock; struct bNodeSocket *next, *prev, *new_sock;
IDProperty *prop; /* user-defined properties */ /** User-defined properties. */
IDProperty *prop;
char identifier[64]; /* unique identifier for mapping */ /** Unique identifier for mapping. */
char identifier[64];
char name[64]; /* MAX_NAME */ /** MAX_NAME. */
char name[64];
/* XXX deprecated, only used for the Image and OutputFile nodes, /* XXX deprecated, only used for the Image and OutputFile nodes,
* should be removed at some point. * should be removed at some point.
*/ */
void *storage; /* custom storage */ /** Custom storage. */
void *storage;
short type, flag; short type, flag;
short limit; /* max. number of links */ /** Max. number of links. */
short in_out; /* input/output type */ short limit;
struct bNodeSocketType *typeinfo; /* runtime type information */ /** Input/output type. */
char idname[64]; /* runtime type identifier */ short in_out;
/** Runtime type information. */
struct bNodeSocketType *typeinfo;
/** Runtime type identifier. */
char idname[64];
float locx, locy; float locx, locy;
void *default_value; /* default input value used for unlinked sockets */ /** Default input value used for unlinked sockets. */
void *default_value;
/* execution data */ /* execution data */
short stack_index; /* local stack index */ /** Local stack index. */
short stack_index;
/* XXX deprecated, kept for forward compatibility */ /* XXX deprecated, kept for forward compatibility */
short stack_type DNA_DEPRECATED; short stack_type DNA_DEPRECATED;
char draw_shape, pad[3]; char draw_shape, pad[3];
void *cache; /* cached data from execution */ /** Cached data from execution. */
void *cache;
/* internal data to retrieve relations and groups /* internal data to retrieve relations and groups
* DEPRECATED, now uses the generic identifier string instead * DEPRECATED, now uses the generic identifier string instead
*/ */
int own_index DNA_DEPRECATED; /* group socket identifiers, to find matching pairs after reading files */ /** Group socket identifiers, to find matching pairs after reading files. */
int own_index DNA_DEPRECATED;
/* XXX deprecated, only used for restoring old group node links */ /* XXX deprecated, only used for restoring old group node links */
int to_index DNA_DEPRECATED; int to_index DNA_DEPRECATED;
/* XXX deprecated, still forward compatible since verification restores pointer from matching own_index. */ /* XXX deprecated, still forward compatible since verification restores pointer from matching own_index. */
struct bNodeSocket *groupsock DNA_DEPRECATED; struct bNodeSocket *groupsock DNA_DEPRECATED;
struct bNodeLink *link; /* a link pointer, set in ntreeUpdateTree */ /** A link pointer, set in ntreeUpdateTree. */
struct bNodeLink *link;
/* XXX deprecated, socket input values are stored in default_value now. kept for forward compatibility */ /* XXX deprecated, socket input values are stored in default_value now. kept for forward compatibility */
bNodeStack ns DNA_DEPRECATED; /* custom data for inputs, only UI writes in this */ /** Custom data for inputs, only UI writes in this. */
bNodeStack ns DNA_DEPRECATED;
} bNodeSocket; } bNodeSocket;
/* sock->type */ /* sock->type */
@@ -173,45 +193,73 @@ typedef enum eNodeSocketFlag {
typedef struct bNode { typedef struct bNode {
struct bNode *next, *prev, *new_node; struct bNode *next, *prev, *new_node;
IDProperty *prop; /* user-defined properties */ /** User-defined properties. */
IDProperty *prop;
struct bNodeType *typeinfo; /* runtime type information */ /** Runtime type information. */
char idname[64]; /* runtime type identifier */ struct bNodeType *typeinfo;
/** Runtime type identifier. */
char idname[64];
char name[64]; /* MAX_NAME */ /** MAX_NAME. */
char name[64];
int flag; int flag;
short type, pad; short type, pad;
short done, level; /* both for dependency and sorting */ /** Both for dependency and sorting. */
short lasty, menunr; /* lasty: check preview render status, menunr: browse ID blocks */ short done, level;
short stack_index; /* for groupnode, offset in global caller stack */ /** Lasty: check preview render status, menunr: browse ID blocks. */
short nr; /* number of this node in list, used for UI exec events */ short lasty, menunr;
float color[3]; /* custom user-defined color */ /** For groupnode, offset in global caller stack. */
short stack_index;
/** Number of this node in list, used for UI exec events. */
short nr;
/** Custom user-defined color. */
float color[3];
ListBase inputs, outputs; ListBase inputs, outputs;
struct bNode *parent; /* parent node */ /** Parent node. */
struct ID *id; /* optional link to libdata */ struct bNode *parent;
void *storage; /* custom data, must be struct, for storage in file */ /** Optional link to libdata. */
struct bNode *original; /* the original node in the tree (for localized tree) */ struct ID *id;
ListBase internal_links; /* list of cached internal links (input to output), for muted nodes and operators */ /** Custom data, must be struct, for storage in file. */
void *storage;
/** The original node in the tree (for localized tree). */
struct bNode *original;
/** List of cached internal links (input to output), for muted nodes and operators. */
ListBase internal_links;
float locx, locy; /* root offset for drawing (parent space) */ /** Root offset for drawing (parent space). */
float width, height; /* node custom width and height */ float locx, locy;
float miniwidth; /* node width if hidden */ /** Node custom width and height. */
float offsetx, offsety; /* additional offset from loc */ float width, height;
float anim_init_locx; /* initial locx for insert offset animation */ /** Node width if hidden. */
float anim_ofsx; /* offset that will be added to locx for insert offset animation */ float miniwidth;
/** Additional offset from loc. */
float offsetx, offsety;
/** Initial locx for insert offset animation. */
float anim_init_locx;
/** Offset that will be added to locx for insert offset animation. */
float anim_ofsx;
int update; /* update flags */ /** Update flags. */
int update;
char label[64]; /* custom user-defined label, MAX_NAME */ /** Custom user-defined label, MAX_NAME. */
short custom1, custom2; /* to be abused for buttons */ char label[64];
/** To be abused for buttons. */
short custom1, custom2;
float custom3, custom4; float custom3, custom4;
short need_exec, exec; /* need_exec is set as UI execution event, exec is flag during exec */ /** Need_exec is set as UI execution event, exec is flag during exec. */
void *threaddata; /* optional extra storage for use in thread (read only then!) */ short need_exec, exec;
rctf totr; /* entire boundbox (worldspace) */ /** Optional extra storage for use in thread (read only then!). */
rctf butr; /* optional buttons area */ void *threaddata;
rctf prvr; /* optional preview area */ /** Entire boundbox (worldspace). */
rctf totr;
/** Optional buttons area. */
rctf butr;
/** Optional preview area. */
rctf prvr;
/* XXX TODO /* XXX TODO
* Node totr size depends on the prvr size, which in turn is determined from preview size. * Node totr size depends on the prvr size, which in turn is determined from preview size.
* In earlier versions bNodePreview was stored directly in nodes, but since now there can be * In earlier versions bNodePreview was stored directly in nodes, but since now there can be
@@ -220,12 +268,23 @@ typedef struct bNode {
* could be replaced by more accurate node instance drawing, but that requires removing totr from DNA * could be replaced by more accurate node instance drawing, but that requires removing totr from DNA
* and replacing all uses with per-instance data. * and replacing all uses with per-instance data.
*/ */
short preview_xsize, preview_ysize; /* reserved size of the preview rect */ /** Reserved size of the preview rect. */
short tmp_flag, pad2; /* Used at runtime when going through the tree. Initialize before use. */ short preview_xsize, preview_ysize;
struct uiBlock *block; /* runtime during drawing */ /** Used at runtime when going through the tree. Initialize before use. */
short tmp_flag, pad2;
/** Runtime during drawing. */
struct uiBlock *block;
float ssr_id; /* XXX: eevee only, id of screen space reflection layer, needs to be a float to feed GPU_uniform. */ /**
float sss_id; /* XXX: eevee only, id of screen subsurface scatter layer, needs to be a float to feed GPU_uniform. */ * XXX: eevee only, id of screen space reflection layer,
* needs to be a float to feed GPU_uniform.
*/
float ssr_id;
/**
* XXX: eevee only, id of screen subsurface scatter layer,
* needs to be a float to feed GPU_uniform.
*/
float sss_id;
} bNode; } bNode;
/* node->flag */ /* node->flag */
@@ -298,7 +357,8 @@ typedef struct bNodeInstanceHashEntry {
typedef struct bNodePreview { typedef struct bNodePreview {
bNodeInstanceHashEntry hash_entry; /* must be first */ /** Must be first. */
bNodeInstanceHashEntry hash_entry;
unsigned char *rect; unsigned char *rect;
short xsize, ysize; short xsize, ysize;
@@ -338,32 +398,49 @@ typedef struct bNodeLink {
/* only re-usable node trees are in the library though, materials and textures allocate own tree struct */ /* only re-usable node trees are in the library though, materials and textures allocate own tree struct */
typedef struct bNodeTree { typedef struct bNodeTree {
ID id; ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ /** Animation data (must be immediately after id for utilities to use it). */
struct AnimData *adt;
struct bNodeTreeType *typeinfo; /* runtime type information */ /** Runtime type information. */
char idname[64]; /* runtime type identifier */ struct bNodeTreeType *typeinfo;
/** Runtime type identifier. */
char idname[64];
struct StructRNA *interface_type; /* runtime RNA type of the group interface */ /** Runtime RNA type of the group interface. */
struct StructRNA *interface_type;
struct bGPdata *gpd; /* grease pencil data */ /** Grease pencil data. */
float view_center[2]; /* node tree stores own offset for consistent editor view */ struct bGPdata *gpd;
/** Node tree stores own offset for consistent editor view. */
float view_center[2];
ListBase nodes, links; ListBase nodes, links;
int type, init; /* set init on fileread */ /** Set init on fileread. */
int cur_index; /* sockets in groups have unique identifiers, adding new sockets always int type, init;
* will increase this counter */ /**
* Sockets in groups have unique identifiers, adding new sockets always
* will increase this counter.
*/
int cur_index;
int flag; int flag;
int update; /* update flags */ /** Update flags. */
short is_updating; /* flag to prevent reentrant update calls */ int update;
short done; /* generic temporary flag for recursion check (DFS/BFS) */ /** Flag to prevent reentrant update calls. */
short is_updating;
/** Generic temporary flag for recursion check (DFS/BFS). */
short done;
int pad2; int pad2;
int nodetype DNA_DEPRECATED; /* specific node type this tree is used for */ /** Specific node type this tree is used for. */
int nodetype DNA_DEPRECATED;
short edit_quality; /* Quality setting when editing */ /** Quality setting when editing. */
short render_quality; /* Quality setting when rendering */ short edit_quality;
int chunksize; /* tile size for compositor engine */ /** Quality setting when rendering. */
short render_quality;
/** Tile size for compositor engine. */
int chunksize;
rctf viewer_border; rctf viewer_border;
@@ -450,13 +527,15 @@ typedef enum eNodeTreeUpdate {
*/ */
typedef struct bNodeSocketValueInt { typedef struct bNodeSocketValueInt {
int subtype; /* RNA subtype */ /** RNA subtype. */
int subtype;
int value; int value;
int min, max; int min, max;
} bNodeSocketValueInt; } bNodeSocketValueInt;
typedef struct bNodeSocketValueFloat { typedef struct bNodeSocketValueFloat {
int subtype; /* RNA subtype */ /** RNA subtype. */
int subtype;
float value; float value;
float min, max; float min, max;
} bNodeSocketValueFloat; } bNodeSocketValueFloat;
@@ -467,7 +546,8 @@ typedef struct bNodeSocketValueBoolean {
} bNodeSocketValueBoolean; } bNodeSocketValueBoolean;
typedef struct bNodeSocketValueVector { typedef struct bNodeSocketValueVector {
int subtype; /* RNA subtype */ /** RNA subtype. */
int subtype;
float value[3]; float value[3];
float min, max; float min, max;
} bNodeSocketValueVector; } bNodeSocketValueVector;
@@ -479,7 +559,8 @@ typedef struct bNodeSocketValueRGBA {
typedef struct bNodeSocketValueString { typedef struct bNodeSocketValueString {
int subtype; int subtype;
int pad; int pad;
char value[1024]; /* 1024 = FILEMAX */ /** 1024 = FILEMAX. */
char value[1024];
} bNodeSocketValueString; } bNodeSocketValueString;
/* data structs, for node->storage */ /* data structs, for node->storage */
@@ -587,7 +668,8 @@ typedef struct NodeImageLayer {
/* index in the Image->layers->passes lists */ /* index in the Image->layers->passes lists */
int pass_index DNA_DEPRECATED; int pass_index DNA_DEPRECATED;
/* render pass name */ /* render pass name */
char pass_name[64]; /* amount defined in openexr_multi.h */ /** Amount defined in openexr_multi.h. */
char pass_name[64];
} NodeImageLayer; } NodeImageLayer;
typedef struct NodeBlurData { typedef struct NodeBlurData {
@@ -597,7 +679,8 @@ typedef struct NodeBlurData {
float fac, percentx, percenty; float fac, percentx, percenty;
short filtertype; short filtertype;
char bokeh, gamma; char bokeh, gamma;
int image_in_width, image_in_height; /* needed for absolute/relative conversions */ /** Needed for absolute/relative conversions. */
int image_in_width, image_in_height;
} NodeBlurData; } NodeBlurData;
typedef struct NodeDBlurData { typedef struct NodeDBlurData {
@@ -617,29 +700,36 @@ typedef struct NodeHueSat {
} NodeHueSat; } NodeHueSat;
typedef struct NodeImageFile { typedef struct NodeImageFile {
char name[1024]; /* 1024 = FILE_MAX */ /** 1024 = FILE_MAX. */
char name[1024];
struct ImageFormatData im_format; struct ImageFormatData im_format;
int sfra, efra; int sfra, efra;
} NodeImageFile; } NodeImageFile;
/* XXX first struct fields should match NodeImageFile to ensure forward compatibility */ /* XXX first struct fields should match NodeImageFile to ensure forward compatibility */
typedef struct NodeImageMultiFile { typedef struct NodeImageMultiFile {
char base_path[1024]; /* 1024 = FILE_MAX */ /** 1024 = FILE_MAX. */
char base_path[1024];
ImageFormatData format; ImageFormatData format;
int sfra DNA_DEPRECATED, efra DNA_DEPRECATED; /* XXX old frame rand values from NodeImageFile for forward compatibility */ /** XXX old frame rand values from NodeImageFile for forward compatibility. */
int active_input; /* selected input in details view list */ int sfra DNA_DEPRECATED, efra DNA_DEPRECATED;
/** Selected input in details view list. */
int active_input;
int pad; int pad;
} NodeImageMultiFile; } NodeImageMultiFile;
typedef struct NodeImageMultiFileSocket { typedef struct NodeImageMultiFileSocket {
/* single layer file output */ /* single layer file output */
short use_render_format DNA_DEPRECATED; short use_render_format DNA_DEPRECATED;
short use_node_format; /* use overall node image format */ /** Use overall node image format. */
short use_node_format;
int pad1; int pad1;
char path[1024]; /* 1024 = FILE_MAX */ /** 1024 = FILE_MAX. */
char path[1024];
ImageFormatData format; ImageFormatData format;
/* multilayer output */ /* multilayer output */
char layer[30]; /* EXR_TOT_MAXNAME-2 ('.' and channel char are appended) */ /** EXR_TOT_MAXNAME-2 ('.' and channel char are appended). */
char layer[30];
char pad2[2]; char pad2[2];
} NodeImageMultiFileSocket; } NodeImageMultiFileSocket;
@@ -672,8 +762,10 @@ typedef struct NodeDefocus {
} NodeDefocus; } NodeDefocus;
typedef struct NodeScriptDict { typedef struct NodeScriptDict {
void *dict; /* for PyObject *dict */ /** For PyObject *dict. */
void *node; /* for BPy_Node *node */ void *dict;
/** For BPy_Node *node. */
void *node;
} NodeScriptDict; } NodeScriptDict;
/* qdn: glare node */ /* qdn: glare node */
@@ -825,7 +917,8 @@ typedef struct NodeShaderTexPointDensity {
short interpolation; short interpolation;
short color_source; short color_source;
short ob_color_source; short ob_color_source;
char vertex_attribute_name[64]; /* vertex attribute layer for color source, MAX_CUSTOMDATA_LAYER_NAME */ /** Vertex attribute layer for color source, MAX_CUSTOMDATA_LAYER_NAME. */
char vertex_attribute_name[64];
/* Used at runtime only by sampling RNA API. */ /* Used at runtime only by sampling RNA API. */
PointDensity pd; PointDensity pd;
int cached_resolution; int cached_resolution;
@@ -878,7 +971,8 @@ typedef struct NodeShaderScript {
int mode; int mode;
int flag; int flag;
char filepath[1024]; /* 1024 = FILE_MAX */ /** 1024 = FILE_MAX. */
char filepath[1024];
char bytecode_hash[64]; char bytecode_hash[64];
char *bytecode; char *bytecode;
@@ -902,7 +996,8 @@ typedef struct NodeShaderUVMap {
typedef struct NodeShaderTexIES { typedef struct NodeShaderTexIES {
int mode; int mode;
char filepath[1024]; /* 1024 = FILE_MAX */ /** 1024 = FILE_MAX. */
char filepath[1024];
} NodeShaderTexIES; } NodeShaderTexIES;
typedef struct NodeSunBeams { typedef struct NodeSunBeams {

View File

@@ -47,7 +47,8 @@ typedef struct FluidVertexVelocity {
} FluidVertexVelocity; } FluidVertexVelocity;
typedef struct FluidsimSettings { typedef struct FluidsimSettings {
struct FluidsimModifierData *fmd; /* for fast RNA access */ /** For fast RNA access. */
struct FluidsimModifierData *fmd;
/* threadcont the calculation is done with */ /* threadcont the calculation is done with */
int threads; int threads;
int pad1; int pad1;
@@ -102,7 +103,10 @@ typedef struct FluidsimSettings {
/* additional flags depending on the type, lower short contains flags /* additional flags depending on the type, lower short contains flags
* to check validity, higher short additional flags */ * to check validity, higher short additional flags */
short typeFlags; short typeFlags;
/* switch off velocity generation, volume init type for fluid/obstacles (volume=1, shell=2, both=3) */ /**
* Switch off velocity generation,
* volume init type for fluid/obstacles (volume=1, shell=2, both=3).
*/
char domainNovecgen, volumeInitType; char domainNovecgen, volumeInitType;
/* boundary "stickiness" for part slip values */ /* boundary "stickiness" for part slip values */
@@ -114,18 +118,19 @@ typedef struct FluidsimSettings {
float generateParticles; float generateParticles;
/* smooth fluid surface? */ /* smooth fluid surface? */
float surfaceSmoothing; float surfaceSmoothing;
/* number of surface subdivisions*/ /** Number of surface subdivisions. */
int surfaceSubdivs; int surfaceSubdivs;
int flag; /* GUI flags */ /** GUI flags. */
int flag;
/* particle display - size scaling, and alpha influence */ /** Particle display - size scaling, and alpha influence. */
float particleInfSize, particleInfAlpha; float particleInfSize, particleInfAlpha;
/* testing vars */ /* testing vars */
float farFieldSize; float farFieldSize;
/* vertex velocities of simulated fluid mesh */ /** Vertex velocities of simulated fluid mesh. */
struct FluidVertexVelocity *meshVelocities; struct FluidVertexVelocity *meshVelocities;
/* number of vertices in simulated fluid mesh */ /** Number of vertices in simulated fluid mesh. */
int totvert; int totvert;
/* Fluid control settings */ /* Fluid control settings */
@@ -140,7 +145,7 @@ typedef struct FluidsimSettings {
int lastgoodframe; int lastgoodframe;
/* Simulation/flow rate control (i.e. old "Fac-Time") */ /** Simulation/flow rate control (i.e. old "Fac-Time"). */
float animRate; float animRate;
} FluidsimSettings; } FluidsimSettings;

View File

@@ -60,75 +60,114 @@ typedef enum ePFieldType {
} ePFieldType; } ePFieldType;
typedef struct PartDeflect { typedef struct PartDeflect {
int flag; /* general settings flag */ /** General settings flag . */
short deflect; /* Deflection flag - does mesh deflect particles */ int flag;
short forcefield; /* Force field type, do the vertices attract / repel particles? */ /** Deflection flag - does mesh deflect particles . */
short falloff; /* fall-off type */ short deflect;
short shape; /* point, plane or surface */ /** Force field type, do the vertices attract / repel particles?. */
short tex_mode; /* texture effector */ short forcefield;
short kink, kink_axis; /* for curve guide */ /** Fall-off type . */
short falloff;
/** Point, plane or surface . */
short shape;
/** Texture effector . */
short tex_mode;
/** For curve guide . */
short kink, kink_axis;
short zdir; short zdir;
/* Main effector values */ /* Main effector values */
float f_strength; /* The strength of the force (+ or - ) */ /** The strength of the force (+ or - ) . */
float f_damp; /* Damping ratio of the harmonic effector. */ float f_strength;
float f_flow; /* How much force is converted into "air flow", i.e. */ /** Damping ratio of the harmonic effector. . */
float f_damp;
/** How much force is converted into "air flow", i.e.. */
float f_flow;
/* force used as the velocity of surrounding medium. */ /* force used as the velocity of surrounding medium. */
float f_size; /* Noise size for noise effector, restlength for harmonic effector */ /** Noise size for noise effector, restlength for harmonic effector. */
float f_size;
/* fall-off */ /* fall-off */
float f_power; /* The power law - real gravitation is 2 (square) */ /** The power law - real gravitation is 2 (square). */
float maxdist; /* if indicated, use this maximum */ float f_power;
float mindist; /* if indicated, use this minimum */ /** If indicated, use this maximum . */
float f_power_r; /* radial fall-off power */ float maxdist;
float maxrad; /* radial versions of above */ /** If indicated, use this minimum . */
float mindist;
/** Radial fall-off power . */
float f_power_r;
/** Radial versions of above . */
float maxrad;
float minrad; float minrad;
/* particle collisions */ /* particle collisions */
float pdef_damp; /* Damping factor for particle deflection */ /** Damping factor for particle deflection . */
float pdef_rdamp; /* Random element of damping for deflection */ float pdef_damp;
float pdef_perm; /* Chance of particle passing through mesh */ /** Random element of damping for deflection . */
float pdef_frict; /* Friction factor for particle deflection */ float pdef_rdamp;
float pdef_rfrict; /* Random element of friction for deflection */ /** Chance of particle passing through mesh . */
float pdef_stickness;/* surface particle stickiness */ float pdef_perm;
/** Friction factor for particle deflection . */
float pdef_frict;
/** Random element of friction for deflection. */
float pdef_rfrict;
/** Surface particle stickiness . */
float pdef_stickness;
float absorption; /* used for forces */ /** Used for forces. */
float absorption;
/* softbody collisions */ /* softbody collisions */
float pdef_sbdamp; /* Damping factor for softbody deflection */ /** Damping factor for softbody deflection . */
float pdef_sbift; /* inner face thickness for softbody deflection */ float pdef_sbdamp;
float pdef_sboft; /* outer face thickness for softbody deflection */ /** Inner face thickness for softbody deflection. */
float pdef_sbift;
/** Outer face thickness for softbody deflection. */
float pdef_sboft;
/* guide curve, same as for particle child effects */ /* guide curve, same as for particle child effects */
float clump_fac, clump_pow; float clump_fac, clump_pow;
float kink_freq, kink_shape, kink_amp, free_end; float kink_freq, kink_shape, kink_amp, free_end;
/* texture effector */ /* texture effector */
float tex_nabla; /* Used for calculating partial derivatives */ /** Used for calculating partial derivatives. */
struct Tex *tex; /* Texture of the texture effector */ float tex_nabla;
/** Texture of the texture effector . */
struct Tex *tex;
/* effector noise */ /* effector noise */
struct RNG *rng; /* random noise generator for e.g. wind */ /** Random noise generator for e.g. wind. */
float f_noise; /* noise of force */ struct RNG *rng;
int seed; /* noise random seed */ /** Noise of force . */
float f_noise;
/** Noise random seed . */
int seed;
/* Display Size */ /* Display Size */
float drawvec1[4]; /* Runtime only : start of the curve or draw scale */ /** Runtime only : start of the curve or draw scale. */
float drawvec2[4]; /* Runtime only : end of the curve */ float drawvec1[4];
float drawvec_falloff_min[3], pad1; /* Runtime only */ /** Runtime only : end of the curve. */
float drawvec_falloff_max[3], pad2; /* Runtime only */ float drawvec2[4];
/** Runtime only. */
float drawvec_falloff_min[3], pad1;
/** Runtime only. */
float drawvec_falloff_max[3], pad2;
struct Object *f_source; /* force source object */ /** Force source object. */
struct Object *f_source;
float pdef_cfrict; /* Friction of cloth collisions. */ /** Friction of cloth collisions. */
float pdef_cfrict;
float pad; float pad;
} PartDeflect; } PartDeflect;
typedef struct EffectorWeights { typedef struct EffectorWeights {
struct Collection *group; /* only use effectors from this group of objects */ /** Only use effectors from this group of objects. */
struct Collection *group;
float weight[14]; /* effector type specific weights */ /** Effector type specific weights. */
float weight[14];
float global_gravity; float global_gravity;
short flag, rt[3]; short flag, rt[3];
int pad; int pad;
@@ -171,17 +210,21 @@ typedef struct PTCacheMem {
unsigned int frame, totpoint; unsigned int frame, totpoint;
unsigned int data_types, flag; unsigned int data_types, flag;
void *data[8]; /* BPHYS_TOT_DATA */ /** BPHYS_TOT_DATA. */
void *cur[8]; /* BPHYS_TOT_DATA */ void *data[8];
/** BPHYS_TOT_DATA. */
void *cur[8];
struct ListBase extradata; struct ListBase extradata;
} PTCacheMem; } PTCacheMem;
typedef struct PointCache { typedef struct PointCache {
struct PointCache *next, *prev; struct PointCache *next, *prev;
int flag; /* generic flag */ /** Generic flag. */
int flag;
int step; /* The number of frames between cached frames. /**
* The number of frames between cached frames.
* This should probably be an upper bound for a per point adaptive step in the future, * 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 * 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 * simulation quite a bit though. If for example particles are colliding with a horizontal
@@ -192,30 +235,44 @@ typedef struct PointCache {
* frames. The result will look like the point is oscillating around the collision location. So for * 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. * now cache step should be set to 1 for accurate reproduction of collisions.
*/ */
int step;
int simframe; /* current frame of simulation (only if SIMULATION_VALID) */ /** Current frame of simulation (only if SIMULATION_VALID). */
int startframe; /* simulation start frame */ int simframe;
int endframe; /* simulation end frame */ /** Simulation start frame. */
int editframe; /* frame being edited (runtime only) */ int startframe;
int last_exact; /* last exact frame that's cached */ /** Simulation end frame. */
int last_valid; /* used for editing cache - what is the last baked frame */ int endframe;
/** Frame being edited (runtime only). */
int editframe;
/** Last exact frame that's cached. */
int last_exact;
/** Used for editing cache - what is the last baked frame. */
int last_valid;
int pad; int pad;
/* for external cache files */ /* for external cache files */
int totpoint; /* number of cached points */ /** Number of cached points. */
int index; /* modifier stack index */ int totpoint;
/** Modifier stack index. */
int index;
short compression, rt; short compression, rt;
char name[64]; char name[64];
char prev_name[64]; char prev_name[64];
char info[64]; char info[64];
char path[1024]; /* file path, 1024 = FILE_MAX */ /** File path, 1024 = FILE_MAX. */
char *cached_frames; /* array of length endframe-startframe+1 with flags to indicate cached frames */ char path[1024];
/* can be later used for other per frame flags too if needed */ /**
* Array of length endframe-startframe+1 with flags to indicate cached frames.
* Can be later used for other per frame flags too if needed.
*/
char *cached_frames;
struct ListBase mem_cache; struct ListBase mem_cache;
struct PTCacheEdit *edit; struct PTCacheEdit *edit;
void (*free_edit)(struct PTCacheEdit *edit); /* free callback */ /** Free callback. */
void (*free_edit)(struct PTCacheEdit *edit);
} PointCache; } PointCache;
typedef struct SBVertex { typedef struct SBVertex {
@@ -234,8 +291,10 @@ typedef struct SoftBody_Shared {
typedef struct SoftBody { typedef struct SoftBody {
/* dynamic data */ /* dynamic data */
int totpoint, totspring; int totpoint, totspring;
struct BodyPoint *bpoint; /* not saved in file */ /** Not saved in file. */
struct BodySpring *bspring; /* not saved in file */ struct BodyPoint *bpoint;
/** Not saved in file. */
struct BodySpring *bspring;
char pad; char pad;
char msg_lock; char msg_lock;
short msg_value; short msg_value;
@@ -243,52 +302,77 @@ typedef struct SoftBody {
/* part of UI: */ /* part of UI: */
/* general options */ /* general options */
float nodemass; /* softbody mass of *vertex* */ /** Softbody mass of *vertex*. */
char namedVG_Mass[64]; /* MAX_VGROUP_NAME */ float nodemass;
/* along with it introduce mass painting /**
* Along with it introduce mass painting
* starting to fix old bug .. nastiness that VG are indexes * starting to fix old bug .. nastiness that VG are indexes
* rather find them by name tag to find it -> jow20090613 */ * rather find them by name tag to find it -> jow20090613.
float grav; /* softbody amount of gravitaion to apply */ * MAX_VGROUP_NAME */
float mediafrict; /* friction to env */ char namedVG_Mass[64];
float rklimit; /* error limit for ODE solver */ /** Softbody amount of gravitaion to apply. */
float physics_speed;/* user control over simulation speed */ float grav;
/** Friction to env. */
float mediafrict;
/** Error limit for ODE solver. */
float rklimit;
/** User control over simulation speed. */
float physics_speed;
/* goal */ /* goal */
float goalspring; /* softbody goal springs */ /** Softbody goal springs. */
float goalfrict; /* softbody goal springs friction */ float goalspring;
float mingoal; /* quick limits for goal */ /** Softbody goal springs friction. */
float goalfrict;
/** Quick limits for goal. */
float mingoal;
float maxgoal; float maxgoal;
float defgoal; /* default goal for vertices without vgroup */ /** Default goal for vertices without vgroup. */
short vertgroup; /* index starting at 1 */ float defgoal;
char namedVG_Softgoal[64]; /* MAX_VGROUP_NAME */ /** Index starting at 1. */
/* starting to fix old bug .. nastiness that VG are indexes short vertgroup;
* rather find them by name tag to find it -> jow20090613 */ /**
* Starting to fix old bug .. nastiness that VG are indexes
* rather find them by name tag to find it -> jow20090613.
* MAX_VGROUP_NAME */
char namedVG_Softgoal[64];
short fuzzyness; /* */ short fuzzyness;
/* springs */ /* springs */
float inspring; /* softbody inner springs */ /** Softbody inner springs. */
float infrict; /* softbody inner springs friction */ float inspring;
char namedVG_Spring_K[64]; /* MAX_VGROUP_NAME */ /** Softbody inner springs friction. */
/* along with it introduce Spring_K painting float infrict;
/**
* Along with it introduce Spring_K painting
* starting to fix old bug .. nastiness that VG are indexes * starting to fix old bug .. nastiness that VG are indexes
* rather find them by name tag to find it -> jow20090613 */ * rather find them by name tag to find it -> jow20090613.
* MAX_VGROUP_NAME
*/
char namedVG_Spring_K[64];
/* baking */ /* baking */
int sfra, efra; int sfra, efra;
int interval; int interval;
short local, solverflags; /* local==1: use local coords for baking */ /** Local==1: use local coords for baking. */
short local, solverflags;
/* -- these must be kept for backwards compatibility -- */ /* -- these must be kept for backwards compatibility -- */
SBVertex **keys; /* array of size totpointkey */ /** Array of size totpointkey. */
int totpointkey, totkey; /* if totpointkey != totpoint or totkey!- (efra-sfra)/interval -> free keys */ SBVertex **keys;
/** If totpointkey != totpoint or totkey!- (efra-sfra)/interval -> free keys. */
int totpointkey, totkey;
/* ---------------------------------------------------- */ /* ---------------------------------------------------- */
float secondspring; float secondspring;
/* self collision*/ /* self collision*/
float colball; /* fixed collision ball size if > 0 */ /** Fixed collision ball size if > 0. */
float balldamp; /* cooling down collision response */ float colball;
float ballstiff; /* pressure the ball is loaded with */ /** Cooling down collision response . */
float balldamp;
/** Pressure the ball is loaded with . */
float ballstiff;
short sbc_mode; short sbc_mode;
short aeroedge, short aeroedge,
minloops, minloops,
@@ -298,13 +382,16 @@ typedef struct SoftBody {
plastic, springpreload plastic, springpreload
; ;
struct SBScratch *scratch; /* scratch pad/cache on live time not saved in file */ /** Scratch pad/cache on live time not saved in file. */
struct SBScratch *scratch;
float shearstiff; float shearstiff;
float inpush; float inpush;
struct SoftBody_Shared *shared; struct SoftBody_Shared *shared;
struct PointCache *pointcache DNA_DEPRECATED; /* Moved to SoftBody_Shared */ /** Moved to SoftBody_Shared. */
struct ListBase ptcaches DNA_DEPRECATED; /* Moved to SoftBody_Shared */ struct PointCache *pointcache DNA_DEPRECATED;
/** Moved to SoftBody_Shared. */
struct ListBase ptcaches DNA_DEPRECATED;
struct Collection *collision_group; struct Collection *collision_group;

View File

@@ -63,7 +63,8 @@ struct GpencilBatchCache;
/* Vertex Groups - Name Info */ /* Vertex Groups - Name Info */
typedef struct bDeformGroup { typedef struct bDeformGroup {
struct bDeformGroup *next, *prev; struct bDeformGroup *next, *prev;
char name[64]; /* MAX_VGROUP_NAME */ /** MAX_VGROUP_NAME. */
char name[64];
/* need this flag for locking weights */ /* need this flag for locking weights */
char flag, pad[7]; char flag, pad[7];
} bDeformGroup; } bDeformGroup;
@@ -71,7 +72,8 @@ typedef struct bDeformGroup {
/* Face Maps*/ /* Face Maps*/
typedef struct bFaceMap { typedef struct bFaceMap {
struct bFaceMap *next, *prev; struct bFaceMap *next, *prev;
char name[64]; /* MAX_VGROUP_NAME */ /** MAX_VGROUP_NAME. */
char name[64];
char flag; char flag;
char pad[7]; char pad[7];
} bFaceMap; } bFaceMap;
@@ -134,98 +136,139 @@ struct ObjectBBoneDeform;
/* Not saved in file! */ /* Not saved in file! */
typedef struct Object_Runtime { typedef struct Object_Runtime {
/* Original mesh pointer, before object->data was changed to point /**
* Original mesh pointer, before object->data was changed to point
* to mesh_eval. * to mesh_eval.
* Is assigned by dependency graph's copy-on-write evaluation. * Is assigned by dependency graph's copy-on-write evaluation.
*/ */
struct Mesh *mesh_orig; struct Mesh *mesh_orig;
/* Mesh structure created during object evaluation. /**
* Mesh structure created during object evaluation.
* It has all modifiers applied. * It has all modifiers applied.
*/ */
struct Mesh *mesh_eval; struct Mesh *mesh_eval;
/* Mesh structure created during object evaluation. /**
* Mesh structure created during object evaluation.
* It has deforemation only modifiers applied on it. * It has deforemation only modifiers applied on it.
*/ */
struct Mesh *mesh_deform_eval; struct Mesh *mesh_deform_eval;
/* Runtime evaluated curve-specific data, not stored in the file. */ /** Runtime evaluated curve-specific data, not stored in the file. */
struct CurveCache *curve_cache; struct CurveCache *curve_cache;
/* Runtime grease pencil drawing data */ /** Runtime grease pencil drawing data */
struct GpencilBatchCache *gpencil_cache; struct GpencilBatchCache *gpencil_cache;
struct ObjectBBoneDeform *cached_bbone_deformation; struct ObjectBBoneDeform *cached_bbone_deformation;
/* The custom data layer mask that was last used to calculate mesh_eval and mesh_deform_eval. */ /**
* The custom data layer mask that was last used
* to calculate mesh_eval and mesh_deform_eval.
*/
uint64_t last_data_mask; uint64_t last_data_mask;
/* Did last modifier stack generation need mapping support? */ /** Did last modifier stack generation need mapping support? */
char last_need_mapping; char last_need_mapping;
char pad[7]; char pad[7];
} Object_Runtime; } Object_Runtime;
typedef struct Object { typedef struct Object {
ID id; ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ /** Animation data (must be immediately after id for utilities to use it). */
struct DrawDataList drawdata; /* runtime (must be immediately after id for utilities to use it). */ struct AnimData *adt;
/** Runtime (must be immediately after id for utilities to use it). */
struct DrawDataList drawdata;
struct SculptSession *sculpt; struct SculptSession *sculpt;
short type, partype; short type, partype;
int par1, par2, par3; /* can be vertexnrs */ /** Can be vertexnrs. */
char parsubstr[64]; /* String describing subobject info, MAX_ID_NAME-2 */ int par1, par2, par3;
/** String describing subobject info, MAX_ID_NAME-2. */
char parsubstr[64];
struct Object *parent, *track; struct Object *parent, *track;
/* if ob->proxy (or proxy_group), this object is proxy for object ob->proxy */ /* if ob->proxy (or proxy_group), this object is proxy for object ob->proxy */
/* proxy_from is set in target back to the proxy. */ /* proxy_from is set in target back to the proxy. */
struct Object *proxy, *proxy_group, *proxy_from; struct Object *proxy, *proxy_group, *proxy_from;
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ /** Old animation system, deprecated for 2.5. */
struct Ipo *ipo DNA_DEPRECATED;
/* struct Path *path; */ /* struct Path *path; */
struct BoundBox *bb; /* axis aligned boundbox (in localspace) */ /** Axis aligned boundbox (in localspace). */
struct BoundBox *bb;
struct bAction *action DNA_DEPRECATED; // XXX deprecated... old animation system struct bAction *action DNA_DEPRECATED; // XXX deprecated... old animation system
struct bAction *poselib; struct bAction *poselib;
struct bPose *pose; /* pose data, armature objects only */ /** Pose data, armature objects only. */
void *data; /* pointer to objects data - an 'ID' or NULL */ struct bPose *pose;
/** Pointer to objects data - an 'ID' or NULL. */
void *data;
struct bGPdata *gpd; /* Grease Pencil data */ /** Grease Pencil data. */
struct bGPdata *gpd;
bAnimVizSettings avs; /* settings for visualization of object-transform animation */ /** Settings for visualization of object-transform animation. */
bMotionPath *mpath; /* motion path cache for this object */ bAnimVizSettings avs;
/** Motion path cache for this object. */
bMotionPath *mpath;
void *pad1; void *pad1;
ListBase constraintChannels DNA_DEPRECATED; // XXX deprecated... old animation system ListBase constraintChannels DNA_DEPRECATED; // XXX deprecated... old animation system
ListBase effect DNA_DEPRECATED; // XXX deprecated... keep for readfile ListBase effect DNA_DEPRECATED; // XXX deprecated... keep for readfile
ListBase defbase; /* list of bDeformGroup (vertex groups) names and flag only */ /** List of bDeformGroup (vertex groups) names and flag only. */
ListBase modifiers; /* list of ModifierData structures */ ListBase defbase;
ListBase greasepencil_modifiers; /* list of GpencilModifierData structures */ /** List of ModifierData structures. */
ListBase fmaps; /* list of facemaps */ ListBase modifiers;
ListBase shader_fx; /* list of viewport effects. Actually only used by grease pencil */ /** List of GpencilModifierData structures. */
ListBase greasepencil_modifiers;
/** List of facemaps. */
ListBase fmaps;
/** List of viewport effects. Actually only used by grease pencil. */
ListBase shader_fx;
int mode; /* Local object mode */ /** Local object mode. */
int mode;
int restore_mode; int restore_mode;
/* materials */ /* materials */
struct Material **mat; /* material slots */ /** Material slots. */
char *matbits; /* a boolean field, with each byte 1 if corresponding material is linked to object */ struct Material **mat;
int totcol; /* copy of mesh, curve & meta struct member of same name (keep in sync) */ /** A boolean field, with each byte 1 if corresponding material is linked to object. */
int actcol; /* currently selected material in the UI */ char *matbits;
/** Copy of mesh, curve & meta struct member of same name (keep in sync). */
int totcol;
/** Currently selected material in the UI. */
int actcol;
/* rot en drot have to be together! (transform('r' en 's')) */ /* rot en drot have to be together! (transform('r' en 's')) */
float loc[3], dloc[3], orig[3]; float loc[3], dloc[3], orig[3];
float size[3]; /* scale in fact */ /** Scale in fact. */
float dsize[3] DNA_DEPRECATED ; /* DEPRECATED, 2.60 and older only */ float size[3];
float dscale[3]; /* ack!, changing */ /** DEPRECATED, 2.60 and older only. */
float rot[3], drot[3]; /* euler rotation */ float dsize[3] DNA_DEPRECATED ;
float quat[4], dquat[4]; /* quaternion rotation */ /** Ack!, changing. */
float rotAxis[3], drotAxis[3]; /* axis angle rotation - axis part */ float dscale[3];
float rotAngle, drotAngle; /* axis angle rotation - angle part */ /** Euler rotation. */
float obmat[4][4]; /* final worldspace matrix with constraints & animsys applied */ float rot[3], drot[3];
float parentinv[4][4]; /* inverse result of parent, so that object doesn't 'stick' to parent */ /** Quaternion rotation. */
float constinv[4][4]; /* inverse result of constraints. doesn't include effect of parent or object local transform */ float quat[4], dquat[4];
float imat[4][4]; /* inverse matrix of 'obmat' for any other use than rendering! */ /** Axis angle rotation - axis part. */
/* note: this isn't assured to be valid as with 'obmat', float rotAxis[3], drotAxis[3];
/** Axis angle rotation - angle part. */
float rotAngle, drotAngle;
/** Final worldspace matrix with constraints & animsys applied. */
float obmat[4][4];
/** Inverse result of parent, so that object doesn't 'stick' to parent. */
float parentinv[4][4];
/** Inverse result of constraints. doesn't include effect of parent or object local transform. */
float constinv[4][4];
/**
* Inverse matrix of 'obmat' for any other use than rendering!
*
* \note this isn't assured to be valid as with 'obmat',
* before using this value you should do... * before using this value you should do...
* invert_m4_m4(ob->imat, ob->obmat); */ * invert_m4_m4(ob->imat, ob->obmat);
*/
float imat[4][4];
/* Previously 'imat' was used at render time, but as other places use it too /* Previously 'imat' was used at render time, but as other places use it too
* the interactive ui of 2.5 creates problems. So now only 'imat_ren' should * the interactive ui of 2.5 creates problems. So now only 'imat_ren' should
@@ -233,14 +276,19 @@ typedef struct Object {
*/ */
float imat_ren[4][4]; float imat_ren[4][4];
unsigned int lay DNA_DEPRECATED; /* copy of Base's layer in the scene */ /** Copy of Base's layer in the scene. */
unsigned int lay DNA_DEPRECATED;
short flag; /* copy of Base */ /** Copy of Base. */
short colbits DNA_DEPRECATED; /* deprecated, use 'matbits' */ short flag;
/** Deprecated, use 'matbits'. */
short colbits DNA_DEPRECATED;
short transflag, protectflag; /* transformation settings and transform locks */ /** Transformation settings and transform locks . */
short transflag, protectflag;
short trackflag, upflag; short trackflag, upflag;
short nlaflag; /* used for DopeSheet filtering settings (expanded/collapsed) */ /** Used for DopeSheet filtering settings (expanded/collapsed). */
short nlaflag;
short pad[2]; short pad[2];
char pad12; char pad12;
@@ -250,68 +298,97 @@ typedef struct Object {
int dupon, dupoff, dupsta, dupend; int dupon, dupoff, dupsta, dupend;
/* Depsgraph */ /* Depsgraph */
short base_flag; /* used by depsgraph, flushed from base */ /** Used by depsgraph, flushed from base. */
unsigned short base_local_view_bits; /* used by viewport, synced from base */ short base_flag;
/** Used by viewport, synced from base. */
unsigned short base_local_view_bits;
/** Collision mask settings */ /** Collision mask settings */
unsigned short col_group, col_mask; unsigned short col_group, col_mask;
short rotmode; /* rotation mode - uses defines set out in DNA_action_types.h for PoseChannel rotations... */ /** Rotation mode - uses defines set out in DNA_action_types.h for PoseChannel rotations.... */
short rotmode;
char boundtype; /* bounding box use for drawing */ /** Bounding box use for drawing. */
char collision_boundtype; /* bounding box type used for collision */ char boundtype;
/** Bounding box type used for collision. */
char collision_boundtype;
short dtx; /* viewport draw extra settings */ /** Viewport draw extra settings. */
char dt; /* viewport draw type */ short dtx;
/** Viewport draw type. */
char dt;
char empty_drawtype; char empty_drawtype;
float empty_drawsize; float empty_drawsize;
float dupfacesca; /* dupliface scale */ /** Dupliface scale. */
float dupfacesca;
float sf; /* sf is time-offset */ /** Sf is time-offset. */
float sf;
short index; /* custom index, for renderpasses */ /** Custom index, for renderpasses. */
unsigned short actdef; /* current deformation group, note: index starts at 1 */ short index;
unsigned short actfmap; /* current face map, note: index starts at 1 */ /** Current deformation group, note: index starts at 1. */
unsigned short actdef;
/** Current face map, note: index starts at 1. */
unsigned short actfmap;
unsigned char pad5[6]; unsigned char pad5[6];
float col[4]; /* object color */ /** Object color. */
float col[4];
char restrictflag; /* for restricting view, select, render etc. accessible in outliner */ /** For restricting view, select, render etc. accessible in outliner. */
char restrictflag;
char pad3; char pad3;
short softflag; /* softbody settings */ /** Softbody settings. */
short softflag;
int pad2; int pad2;
ListBase constraints; /* object constraints */ /** Object constraints. */
ListBase constraints;
ListBase nlastrips DNA_DEPRECATED; // XXX deprecated... old animation system ListBase nlastrips DNA_DEPRECATED; // XXX deprecated... old animation system
ListBase hooks DNA_DEPRECATED; // XXX deprecated... old animation system ListBase hooks DNA_DEPRECATED; // XXX deprecated... old animation system
ListBase particlesystem; /* particle systems */ /** Particle systems. */
ListBase particlesystem;
struct PartDeflect *pd; /* particle deflector/attractor/collision data */ /** Particle deflector/attractor/collision data. */
struct SoftBody *soft; /* if exists, saved in file */ struct PartDeflect *pd;
struct Collection *dup_group; /* object duplicator for group */ /** If exists, saved in file. */
struct SoftBody *soft;
/** Object duplicator for group. */
struct Collection *dup_group;
void *pad10; void *pad10;
char pad4; char pad4;
char shapeflag; /* flag for pinning */ /** Flag for pinning. */
short shapenr; /* current shape key for menu or pinned */ char shapeflag;
float smoothresh; /* smoothresh is phong interpolation ray_shadow correction in render */ /** Current shape key for menu or pinned. */
short shapenr;
/** Smoothresh is phong interpolation ray_shadow correction in render. */
float smoothresh;
struct FluidsimSettings *fluidsimSettings; /* if fluidsim enabled, store additional settings */ /** If fluidsim enabled, store additional settings. */
struct FluidsimSettings *fluidsimSettings;
struct DerivedMesh *derivedDeform, *derivedFinal; struct DerivedMesh *derivedDeform, *derivedFinal;
void *pad7; void *pad7;
ListBase pc_ids; ListBase pc_ids;
struct RigidBodyOb *rigidbody_object; /* settings for Bullet rigid body */ /** Settings for Bullet rigid body. */
struct RigidBodyCon *rigidbody_constraint; /* settings for Bullet constraint */ struct RigidBodyOb *rigidbody_object;
/** Settings for Bullet constraint. */
struct RigidBodyCon *rigidbody_constraint;
float ima_ofs[2]; /* offset for image empties */ /** Offset for image empties. */
ImageUser *iuser; /* must be non-null when object is an empty image */ float ima_ofs[2];
/** Must be non-null when object is an empty image. */
ImageUser *iuser;
char empty_image_visibility_flag; char empty_image_visibility_flag;
char empty_image_depth; char empty_image_depth;
char pad11[6]; char pad11[6];
ListBase lodlevels; /* contains data for levels of detail */ /** Contains data for levels of detail. */
ListBase lodlevels;
LodLevel *currentlod; LodLevel *currentlod;
struct PreviewImage *preview; struct PreviewImage *preview;
@@ -332,16 +409,23 @@ typedef struct ObHook {
struct ObHook *next, *prev; struct ObHook *next, *prev;
struct Object *parent; struct Object *parent;
float parentinv[4][4]; /* matrix making current transform unmodified */ /** Matrix making current transform unmodified. */
float mat[4][4]; /* temp matrix while hooking */ float parentinv[4][4];
float cent[3]; /* visualization of hook */ /** Temp matrix while hooking. */
float falloff; /* if not zero, falloff is distance where influence zero */ float mat[4][4];
/** Visualization of hook. */
float cent[3];
/** If not zero, falloff is distance where influence zero. */
float falloff;
char name[64]; /* MAX_NAME */ /** MAX_NAME. */
char name[64];
int *indexar; int *indexar;
int totindex, curindex; /* curindex is cache for fast lookup */ /** Curindex is cache for fast lookup. */
short type, active; /* active is only first hook, for button menu */ int totindex, curindex;
/** Active is only first hook, for button menu. */
short type, active;
float force; float force;
} ObHook; } ObHook;
@@ -416,7 +500,7 @@ enum {
PARVERT3 = 6, PARVERT3 = 6,
PARBONE = 7, PARBONE = 7,
/* slow parenting - is not threadsafe and/or may give errors after jumping */ /** Slow parenting - is not threadsafe and/or may give errors after jumping. */
PARSLOW = 16, PARSLOW = 16,
}; };
@@ -429,14 +513,17 @@ enum {
OB_DUPLIVERTS = 1 << 4, OB_DUPLIVERTS = 1 << 4,
OB_DUPLIROT = 1 << 5, OB_DUPLIROT = 1 << 5,
OB_DUPLINOSPEED = 1 << 6, OB_DUPLINOSPEED = 1 << 6,
OB_DUPLICALCDERIVED = 1 << 7, /* runtime, calculate derivedmesh for dupli before it's used */ /* runtime, calculate derivedmesh for dupli before it's used */
OB_DUPLICALCDERIVED = 1 << 7,
OB_DUPLICOLLECTION = 1 << 8, OB_DUPLICOLLECTION = 1 << 8,
OB_DUPLIFACES = 1 << 9, OB_DUPLIFACES = 1 << 9,
OB_DUPLIFACES_SCALE = 1 << 10, OB_DUPLIFACES_SCALE = 1 << 10,
OB_DUPLIPARTS = 1 << 11, OB_DUPLIPARTS = 1 << 11,
OB_TRANSLFAG_DEPRECATED_2 = 1 << 12, OB_TRANSLFAG_DEPRECATED_2 = 1 << 12,
OB_NO_CONSTRAINTS = 1 << 13, /* runtime constraints disable */ /* runtime constraints disable */
OB_NO_PSYS_UPDATE = 1 << 14, /* hack to work around particle issue */ OB_NO_CONSTRAINTS = 1 << 13,
/* hack to work around particle issue */
OB_NO_PSYS_UPDATE = 1 << 14,
OB_DUPLI = OB_DUPLIFRAMES | OB_DUPLIVERTS | OB_DUPLICOLLECTION | OB_DUPLIFACES | OB_DUPLIPARTS, OB_DUPLI = OB_DUPLIFRAMES | OB_DUPLIVERTS | OB_DUPLICOLLECTION | OB_DUPLIFACES | OB_DUPLIPARTS,
}; };

View File

@@ -46,10 +46,15 @@ typedef struct TreeStoreElem {
/* used only to store data in in blend files */ /* used only to store data in in blend files */
typedef struct TreeStore { typedef struct TreeStore {
int totelem DNA_DEPRECATED; /* was previously used for memory preallocation */ /** Was previously used for memory preallocation. */
int usedelem; /* number of elements in data array */ int totelem DNA_DEPRECATED;
TreeStoreElem *data; /* elements to be packed from mempool in writefile.c /** Number of elements in data array. */
* or extracted to mempool in readfile.c */ int usedelem;
/**
* Elements to be packed from mempool in writefile.c
* or extracted to mempool in readfile.c
*/
TreeStoreElem *data;
} TreeStore; } TreeStore;
/* TreeStoreElem->flag */ /* TreeStoreElem->flag */

View File

@@ -39,20 +39,29 @@
struct AnimData; struct AnimData;
typedef struct HairKey { typedef struct HairKey {
float co[3]; /* location of hair vertex */ /** Location of hair vertex. */
float time; /* time along hair, default 0-100 */ float co[3];
float weight; /* softbody weight */ /** Time along hair, default 0-100. */
short editflag; /* saved particled edit mode flags */ float time;
/** Softbody weight. */
float weight;
/** Saved particled edit mode flags. */
short editflag;
short pad; short pad;
float world_co[3]; float world_co[3];
} HairKey; } HairKey;
typedef struct ParticleKey { /* when changed update size of struct to copy_particleKey()!! */ typedef struct ParticleKey { /* when changed update size of struct to copy_particleKey()!! */
float co[3]; /* location */ /** Location. */
float vel[3]; /* velocity */ float co[3];
float rot[4]; /* rotation quaternion */ /** Velocity. */
float ave[3]; /* angular velocity */ float vel[3];
float time; /* when this key happens */ /** Rotation quaternion. */
float rot[4];
/** Angular velocity. */
float ave[3];
/** When this key happens. */
float time;
} ParticleKey; } ParticleKey;
typedef struct BoidParticle { typedef struct BoidParticle {
@@ -70,10 +79,14 @@ typedef struct ParticleSpring {
/* Child particles are created around or between parent particles */ /* Child particles are created around or between parent particles */
typedef struct ChildParticle { typedef struct ChildParticle {
int num, parent; /* num is face index on the final derived mesh */ /** Num is face index on the final derived mesh. */
int pa[4]; /* nearest particles to the child, used for the interpolation */ int num, parent;
float w[4]; /* interpolation weights for the above particles */ /** Nearest particles to the child, used for the interpolation. */
float fuv[4], foffset; /* face vertex weights and offset */ int pa[4];
/** Interpolation weights for the above particles. */
float w[4];
/** Face vertex weights and offset. */
float fuv[4], foffset;
float rt; float rt;
} ChildParticle; } ChildParticle;
@@ -90,40 +103,58 @@ typedef struct ParticleDupliWeight {
struct Object *ob; struct Object *ob;
short count; short count;
short flag; short flag;
short index, rt; /* only updated on file save and used on file load */ /** Only updated on file save and used on file load. */
short index, rt;
} ParticleDupliWeight; } ParticleDupliWeight;
typedef struct ParticleData { typedef struct ParticleData {
ParticleKey state; /* current global coordinates */ /** Current global coordinates. */
ParticleKey state;
ParticleKey prev_state; /* previous state */ /** Previous state. */
ParticleKey prev_state;
HairKey *hair; /* hair vertices */ /** Hair vertices. */
HairKey *hair;
ParticleKey *keys; /* keyed keys */ /** Keyed keys. */
ParticleKey *keys;
BoidParticle *boid; /* boids data */ /** Boids data. */
BoidParticle *boid;
int totkey; /* amount of hair or keyed keys*/ /** Amount of hair or keyed key.s*/
int totkey;
float time, lifetime; /* dietime is not necessarily time+lifetime as */ /** Dietime is not necessarily time+lifetime as. */
float dietime; /* particles can die unnaturally (collision). */ float time, lifetime;
/** Particles can die unnaturally (collision). */
float dietime;
/* WARNING! Those two indices, when not affected to vertices, are for !!! TESSELLATED FACES !!!, not POLYGONS! */ /**
int num; /* index to vert/edge/face */ * WARNING! Those two indices,
int num_dmcache; /* index to derived mesh data (face) to avoid slow lookups */ * when not affected to vertices, are for !!! TESSELLATED FACES !!!, not POLYGONS!
*/
/** Index to vert/edge/face. */
int num;
/** Index to derived mesh data (face) to avoid slow lookups. */
int num_dmcache;
float fuv[4], foffset; /* coordinates on face/edge number "num" and depth along*/ /** Coordinates on face/edge number "num" and depth alon.g*/
float fuv[4], foffset;
/* face normal for volume emission. */ /* face normal for volume emission. */
float size; /* size and multiplier so that we can update size when ever */ /** Size and multiplier so that we can update size when ever. */
float size;
float sphdensity; /* density of sph particle */ /** Density of sph particle. */
float sphdensity;
int pad; int pad;
int hair_index; int hair_index;
short flag; short flag;
short alive; /* the life state of a particle */ /** The life state of a particle. */
short alive;
} ParticleData; } ParticleData;
typedef struct SPHFluidSettings { typedef struct SPHFluidSettings {
@@ -242,14 +273,16 @@ typedef struct ParticleSettings {
/* hair dynamics */ /* hair dynamics */
float bending_random; float bending_random;
struct MTex *mtex[18]; /* MAX_MTEX */ /** MAX_MTEX. */
struct MTex *mtex[18];
struct Collection *dup_group; struct Collection *dup_group;
struct ListBase dupliweights; struct ListBase dupliweights;
struct Collection *eff_group DNA_DEPRECATED; // deprecated struct Collection *eff_group DNA_DEPRECATED; // deprecated
struct Object *dup_ob; struct Object *dup_ob;
struct Object *bb_ob; struct Object *bb_ob;
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ /** Old animation system, deprecated for 2.5. */
struct Ipo *ipo DNA_DEPRECATED;
struct PartDeflect *pd; struct PartDeflect *pd;
struct PartDeflect *pd2; struct PartDeflect *pd2;
@@ -277,32 +310,47 @@ typedef struct ParticleSystem {
struct ParticleSystem *next, *prev; struct ParticleSystem *next, *prev;
ParticleSettings *part; /* particle settings */ /** Particle settings. */
ParticleSettings *part;
ParticleData *particles; /* (parent) particles */ /** (parent) particles. */
ChildParticle *child; /* child particles */ ParticleData *particles;
/** Child particles. */
ChildParticle *child;
struct PTCacheEdit *edit; /* particle editmode (runtime) */ /** Particle editmode (runtime). */
void (*free_edit)(struct PTCacheEdit *edit); /* free callback */ struct PTCacheEdit *edit;
/** Free callback. */
void (*free_edit)(struct PTCacheEdit *edit);
struct ParticleCacheKey **pathcache; /* path cache (runtime) */ /** Path cache (runtime). */
struct ParticleCacheKey **childcache; /* child cache (runtime) */ struct ParticleCacheKey **pathcache;
ListBase pathcachebufs, childcachebufs; /* buffers for the above */ /** Child cache (runtime). */
struct ParticleCacheKey **childcache;
/** Buffers for the above. */
ListBase pathcachebufs, childcachebufs;
struct ClothModifierData *clmd; /* cloth simulation for hair */ /** Cloth simulation for hair. */
struct Mesh *hair_in_mesh, *hair_out_mesh; /* input/output for cloth simulation */ struct ClothModifierData *clmd;
/** Input/output for cloth simulation. */
struct Mesh *hair_in_mesh, *hair_out_mesh;
struct Object *target_ob; struct Object *target_ob;
struct LatticeDeformData *lattice_deform_data; /* run-time only lattice deformation data */ /** Run-time only lattice deformation data. */
struct LatticeDeformData *lattice_deform_data;
struct Object *parent; /* particles from global space -> parent space */ /** Particles from global space -> parent space. */
struct Object *parent;
struct ListBase targets; /* used for keyed and boid physics */ /** Used for keyed and boid physics. */
struct ListBase targets;
char name[64]; /* particle system name, MAX_NAME */ /** Particle system name, MAX_NAME. */
char name[64];
float imat[4][4]; /* used for duplicators */ /** Used for duplicators. */
float imat[4][4];
float cfra, tree_frame, bvhtree_frame; float cfra, tree_frame, bvhtree_frame;
int seed, child_seed; int seed, child_seed;
int flag, totpart, totunexist, totchild, totcached, totchildcache; int flag, totpart, totunexist, totchild, totcached, totchildcache;
@@ -315,10 +363,12 @@ typedef struct ParticleSystem {
short target_psys, totkeyed, bakespace; short target_psys, totkeyed, bakespace;
short pad2; short pad2;
char bb_uvname[3][64]; /* billboard uv name, MAX_CUSTOMDATA_LAYER_NAME */ /** Billboard uv name, MAX_CUSTOMDATA_LAYER_NAME. */
char bb_uvname[3][64];
/* if you change these remember to update array lengths to PSYS_TOT_VG! */ /* if you change these remember to update array lengths to PSYS_TOT_VG! */
short vgroup[13], vg_neg, rt3; /* vertex groups, 0==disable, 1==starting index */ /** Vertex groups, 0==disable, 1==starting index. */
short vgroup[13], vg_neg, rt3;
char pad[6]; char pad[6];
/* point cache */ /* point cache */
@@ -330,13 +380,17 @@ typedef struct ParticleSystem {
ParticleSpring *fluid_springs; ParticleSpring *fluid_springs;
int tot_fluidsprings, alloc_fluidsprings; int tot_fluidsprings, alloc_fluidsprings;
struct KDTree *tree; /* used for interactions with self and other systems */ /** Used for interactions with self and other systems. */
struct BVHTree *bvhtree; /* used for interactions with self and other systems */ struct KDTree *tree;
/** Used for interactions with self and other systems. */
struct BVHTree *bvhtree;
struct ParticleDrawData *pdd; struct ParticleDrawData *pdd;
float dt_frac; /* current time step, as a fraction of a frame */ /** Current time step, as a fraction of a frame. */
float lattice_strength; /* influence of the lattice modifier */ float dt_frac;
/** Influence of the lattice modifier. */
float lattice_strength;
void *batch_cache; void *batch_cache;

View File

@@ -49,7 +49,8 @@ typedef struct RigidBodyWorld_Shared {
struct ListBase ptcaches; struct ListBase ptcaches;
/* References to Physics Sim objects. Exist at runtime only ---------------------- */ /* References to Physics Sim objects. Exist at runtime only ---------------------- */
void *physics_world; /* Physics sim world (i.e. btDiscreteDynamicsWorld) */ /** Physics sim world (i.e. btDiscreteDynamicsWorld). */
void *physics_world;
} RigidBodyWorld_Shared; } RigidBodyWorld_Shared;
/* RigidBodyWorld (rbw) /* RigidBodyWorld (rbw)
@@ -58,26 +59,39 @@ typedef struct RigidBodyWorld_Shared {
*/ */
typedef struct RigidBodyWorld { typedef struct RigidBodyWorld {
/* Sim World Settings ------------------------------------------------------------- */ /* Sim World Settings ------------------------------------------------------------- */
struct EffectorWeights *effector_weights; /* effectors info */ /** Effectors info. */
struct EffectorWeights *effector_weights;
struct Collection *group; /* Group containing objects to use for Rigid Bodies */ /** Group containing objects to use for Rigid Bodies. */
struct Object **objects; /* Array to access group objects by index, only used at runtime */ struct Collection *group;
/** Array to access group objects by index, only used at runtime. */
struct Object **objects;
struct Collection *constraints; /* Group containing objects to use for Rigid Body Constraints*/ /** Group containing objects to use for Rigid Body Constraint.s*/
struct Collection *constraints;
int pad; int pad;
float ltime; /* last frame world was evaluated for (internal) */ /** Last frame world was evaluated for (internal). */
float ltime;
struct RigidBodyWorld_Shared *shared; /* This pointer is shared between all evaluated copies */ /** This pointer is shared between all evaluated copies. */
struct PointCache *pointcache DNA_DEPRECATED; /* Moved to shared->pointcache */ struct RigidBodyWorld_Shared *shared;
struct ListBase ptcaches DNA_DEPRECATED; /* Moved to shared->ptcaches */ /** Moved to shared->pointcache. */
int numbodies; /* number of objects in rigid body group */ struct PointCache *pointcache DNA_DEPRECATED;
/** Moved to shared->ptcaches. */
struct ListBase ptcaches DNA_DEPRECATED;
/** Number of objects in rigid body group. */
int numbodies;
short steps_per_second; /* number of simulation steps thaken per second */ /** Number of simulation steps thaken per second. */
short num_solver_iterations;/* number of constraint solver iterations made per simulation step */ short steps_per_second;
/** Number of constraint solver iterations made per simulation step. */
short num_solver_iterations;
int flag; /* (eRigidBodyWorld_Flag) settings for this RigidBodyWorld */ /** (eRigidBodyWorld_Flag) settings for this RigidBodyWorld. */
float time_scale; /* used to speed up or slow down the simulation */ int flag;
/** Used to speed up or slow down the simulation. */
float time_scale;
} RigidBodyWorld; } RigidBodyWorld;
/* Flags for RigidBodyWorld */ /* Flags for RigidBodyWorld */
@@ -101,8 +115,10 @@ typedef enum eRigidBodyWorld_Flag {
# #
typedef struct RigidBodyOb_Shared { typedef struct RigidBodyOb_Shared {
/* References to Physics Sim objects. Exist at runtime only */ /* References to Physics Sim objects. Exist at runtime only */
void *physics_object; /* Physics object representation (i.e. btRigidBody) */ /** Physics object representation (i.e. btRigidBody). */
void *physics_shape; /* Collision shape used by physics sim (i.e. btCollisionShape) */ void *physics_object;
/** Collision shape used by physics sim (i.e. btCollisionShape). */
void *physics_shape;
} RigidBodyOb_Shared; } RigidBodyOb_Shared;
/* RigidBodyObject (rbo) /* RigidBodyObject (rbo)
@@ -113,33 +129,49 @@ typedef struct RigidBodyOb_Shared {
*/ */
typedef struct RigidBodyOb { typedef struct RigidBodyOb {
/* General Settings for this RigidBodyOb */ /* General Settings for this RigidBodyOb */
short type; /* (eRigidBodyOb_Type) role of RigidBody in sim */ /** (eRigidBodyOb_Type) role of RigidBody in sim . */
short shape; /* (eRigidBody_Shape) collision shape to use */ short type;
/** (eRigidBody_Shape) collision shape to use. */
short shape;
int flag; /* (eRigidBodyOb_Flag) */ /** (eRigidBodyOb_Flag). */
int col_groups; /* Collision groups that determines which rigid bodies can collide with each other */ int flag;
short mesh_source; /* (eRigidBody_MeshSource) mesh source for mesh based collision shapes */ /** Collision groups that determines which rigid bodies can collide with each other. */
int col_groups;
/** (eRigidBody_MeshSource) mesh source for mesh based collision shapes. */
short mesh_source;
short pad; short pad;
/* Physics Parameters */ /* Physics Parameters */
float mass; /* how much object 'weighs' (i.e. absolute 'amount of stuff' it holds) */ /** How much object 'weighs' (i.e. absolute 'amount of stuff' it holds). */
float mass;
float friction; /* resistance of object to movement */ /** Resistance of object to movement. */
float restitution; /* how 'bouncy' object is when it collides */ float friction;
/** How 'bouncy' object is when it collides. */
float restitution;
float margin; /* tolerance for detecting collisions */ /** Tolerance for detecting collisions. */
float margin;
float lin_damping; /* damping for linear velocities */ /** Damping for linear velocities. */
float ang_damping; /* damping for angular velocities */ float lin_damping;
/** Damping for angular velocities. */
float ang_damping;
float lin_sleep_thresh; /* deactivation threshold for linear velocities */ /** Deactivation threshold for linear velocities. */
float ang_sleep_thresh; /* deactivation threshold for angular velocities */ float lin_sleep_thresh;
/** Deactivation threshold for angular velocities. */
float ang_sleep_thresh;
float orn[4]; /* rigid body orientation */ /** Rigid body orientation. */
float pos[3]; /* rigid body position */ float orn[4];
/** Rigid body position. */
float pos[3];
float pad1; float pad1;
struct RigidBodyOb_Shared *shared; /* This pointer is shared between all evaluated copies */ /** This pointer is shared between all evaluated copies. */
struct RigidBodyOb_Shared *shared;
} RigidBodyOb; } RigidBodyOb;
@@ -210,17 +242,24 @@ typedef enum eRigidBody_MeshSource {
* Represents an constraint connecting two rigid bodies. * Represents an constraint connecting two rigid bodies.
*/ */
typedef struct RigidBodyCon { typedef struct RigidBodyCon {
struct Object *ob1; /* First object influenced by the constraint */ /** First object influenced by the constraint. */
struct Object *ob2; /* Second object influenced by the constraint */ struct Object *ob1;
/** Second object influenced by the constraint. */
struct Object *ob2;
/* General Settings for this RigidBodyCon */ /* General Settings for this RigidBodyCon */
short type; /* (eRigidBodyCon_Type) role of RigidBody in sim */ /** (eRigidBodyCon_Type) role of RigidBody in sim . */
short num_solver_iterations;/* number of constraint solver iterations made per simulation step */ short type;
/** Number of constraint solver iterations made per simulation step. */
short num_solver_iterations;
int flag; /* (eRigidBodyCon_Flag) */ /** (eRigidBodyCon_Flag). */
int flag;
float breaking_threshold; /* breaking impulse threshold */ /** Breaking impulse threshold. */
char spring_type; /* spring implementation to use */ float breaking_threshold;
/** Spring implementation to use. */
char spring_type;
char pad[3]; char pad[3];
/* limits */ /* limits */
@@ -256,13 +295,18 @@ typedef struct RigidBodyCon {
float spring_damping_ang_z; float spring_damping_ang_z;
/* motor settings */ /* motor settings */
float motor_lin_target_velocity; /* linear velocity the motor tries to hold */ /** Linear velocity the motor tries to hold. */
float motor_ang_target_velocity; /* angular velocity the motor tries to hold */ float motor_lin_target_velocity;
float motor_lin_max_impulse; /* maximum force used to reach linear target velocity */ /** Angular velocity the motor tries to hold. */
float motor_ang_max_impulse; /* maximum force used to reach angular target velocity */ float motor_ang_target_velocity;
/** Maximum force used to reach linear target velocity. */
float motor_lin_max_impulse;
/** Maximum force used to reach angular target velocity. */
float motor_ang_max_impulse;
/* References to Physics Sim object. Exist at runtime only */ /* References to Physics Sim object. Exist at runtime only */
void *physics_constraint; /* Physics object representation (i.e. btTypedConstraint) */ /** Physics object representation (i.e. btTypedConstraint). */
void *physics_constraint;
} RigidBodyCon; } RigidBodyCon;

View File

@@ -77,18 +77,29 @@ struct SceneCollection;
/* Output Format Data */ /* Output Format Data */
typedef struct AviCodecData { typedef struct AviCodecData {
void *lpFormat; /* save format */ /** Save format. */
void *lpParms; /* compressor options */ void *lpFormat;
unsigned int cbFormat; /* size of lpFormat buffer */ /** Compressor options. */
unsigned int cbParms; /* size of lpParms buffer */ void *lpParms;
/** Size of lpFormat buffer. */
unsigned int cbFormat;
/** Size of lpParms buffer. */
unsigned int cbParms;
unsigned int fccType; /* stream type, for consistency */ /** Stream type, for consistency. */
unsigned int fccHandler; /* compressor */ unsigned int fccType;
unsigned int dwKeyFrameEvery; /* keyframe rate */ /** Compressor. */
unsigned int dwQuality; /* compress quality 0-10,000 */ unsigned int fccHandler;
unsigned int dwBytesPerSecond; /* bytes per second */ /** Keyframe rate. */
unsigned int dwFlags; /* flags... see below */ unsigned int dwKeyFrameEvery;
unsigned int dwInterleaveEvery; /* for non-video streams only */ /** Compress quality 0-10,000. */
unsigned int dwQuality;
/** Bytes per second. */
unsigned int dwBytesPerSecond;
/** Flags... see below. */
unsigned int dwFlags;
/** For non-video streams only. */
unsigned int dwInterleaveEvery;
unsigned int pad; unsigned int pad;
char avicodecname[128]; char avicodecname[128];
@@ -155,10 +166,12 @@ typedef struct FFMpegCodecData {
int audio_pad; int audio_pad;
float audio_volume; float audio_volume;
int gop_size; int gop_size;
int max_b_frames; /* only used if FFMPEG_USE_MAX_B_FRAMES flag is set. */ /** Only used if FFMPEG_USE_MAX_B_FRAMES flag is set. */
int max_b_frames;
int flags; int flags;
int constant_rate_factor; int constant_rate_factor;
int ffmpeg_preset; /* see eFFMpegPreset */ /** See eFFMpegPreset. */
int ffmpeg_preset;
int rc_min_rate; int rc_min_rate;
int rc_max_rate; int rc_max_rate;
@@ -192,25 +205,36 @@ typedef struct AudioData {
typedef struct SceneRenderLayer { typedef struct SceneRenderLayer {
struct SceneRenderLayer *next, *prev; struct SceneRenderLayer *next, *prev;
char name[64] DNA_DEPRECATED; /* MAX_NAME */ /** MAX_NAME. */
char name[64] DNA_DEPRECATED;
struct Material *mat_override DNA_DEPRECATED; /* Converted to ViewLayer setting. */ /** Converted to ViewLayer setting. */
struct Material *mat_override DNA_DEPRECATED;
unsigned int lay DNA_DEPRECATED; /* Converted to LayerCollection cycles camera visibility override. */ /** Converted to LayerCollection cycles camera visibility override. */
unsigned int lay_zmask DNA_DEPRECATED; /* Converted to LayerCollection cycles holdout override. */ unsigned int lay DNA_DEPRECATED;
/** Converted to LayerCollection cycles holdout override. */
unsigned int lay_zmask DNA_DEPRECATED;
unsigned int lay_exclude DNA_DEPRECATED; unsigned int lay_exclude DNA_DEPRECATED;
int layflag DNA_DEPRECATED; /* Converted to ViewLayer layflag and flag. */ /** Converted to ViewLayer layflag and flag. */
int layflag DNA_DEPRECATED;
/* pass_xor has to be after passflag */ /* pass_xor has to be after passflag */
int passflag DNA_DEPRECATED; /* pass_xor has to be after passflag */ /** Pass_xor has to be after passflag. */
int pass_xor DNA_DEPRECATED; /* Converted to ViewLayer passflag and flag. */ int passflag DNA_DEPRECATED;
/** Converted to ViewLayer passflag and flag. */
int pass_xor DNA_DEPRECATED;
int samples DNA_DEPRECATED; /* Converted to ViewLayer setting. */ /** Converted to ViewLayer setting. */
float pass_alpha_threshold DNA_DEPRECATED; /* Converted to ViewLayer pass_alpha_threshold. */ int samples DNA_DEPRECATED;
/** Converted to ViewLayer pass_alpha_threshold. */
float pass_alpha_threshold DNA_DEPRECATED;
IDProperty *prop DNA_DEPRECATED; /* Converted to ViewLayer id_properties. */ /** Converted to ViewLayer id_properties. */
IDProperty *prop DNA_DEPRECATED;
struct FreestyleConfig freestyleConfig DNA_DEPRECATED; /* Converted to ViewLayer freestyleConfig. */ /** Converted to ViewLayer freestyleConfig. */
struct FreestyleConfig freestyleConfig DNA_DEPRECATED;
} SceneRenderLayer; } SceneRenderLayer;
/* SceneRenderLayer.layflag */ /* SceneRenderLayer.layflag */
@@ -302,8 +326,10 @@ typedef enum eScenePassType {
typedef struct SceneRenderView { typedef struct SceneRenderView {
struct SceneRenderView *next, *prev; struct SceneRenderView *next, *prev;
char name[64]; /* MAX_NAME */ /** MAX_NAME. */
char suffix[64]; /* MAX_NAME */ char name[64];
/** MAX_NAME. */
char suffix[64];
int viewflag; int viewflag;
int pad[2]; int pad[2];
@@ -329,9 +355,12 @@ enum {
typedef struct Stereo3dFormat { typedef struct Stereo3dFormat {
short flag; short flag;
char display_mode; /* encoding mode */ /** Encoding mode. */
char anaglyph_type; /* anaglyph scheme for the user display */ char display_mode;
char interlace_type; /* interlace type for the user display */ /** Anaglyph scheme for the user display. */
char anaglyph_type;
/** Interlace type for the user display. */
char interlace_type;
char pad[3]; char pad[3];
} Stereo3dFormat; } Stereo3dFormat;
@@ -375,17 +404,25 @@ typedef enum eStereo3dInterlaceType {
* RNA ensures these enum's are only selectable for render output. * RNA ensures these enum's are only selectable for render output.
*/ */
typedef struct ImageFormatData { typedef struct ImageFormatData {
char imtype; /* R_IMF_IMTYPE_PNG, R_... */ /**
/* note, video types should only ever be set from this * R_IMF_IMTYPE_PNG, R_...
* structure when used from RenderData */ * \note, video types should only ever be set from this structure when used from RenderData.
char depth; /* bits per channel, R_IMF_CHAN_DEPTH_8 -> 32, */
* not a flag, only set 1 at a time */ char imtype;
/**
* bits per channel, R_IMF_CHAN_DEPTH_8 -> 32,
* not a flag, only set 1 at a time. */
char depth;
char planes; /* - R_IMF_PLANES_BW, R_IMF_PLANES_RGB, R_IMF_PLANES_RGBA */ /** R_IMF_PLANES_BW, R_IMF_PLANES_RGB, R_IMF_PLANES_RGBA. */
char flag; /* generic options for all image types, alpha zbuffer */ char planes;
/** Generic options for all image types, alpha zbuffer. */
char flag;
char quality; /* (0 - 100), eg: jpeg quality */ /** (0 - 100), eg: jpeg quality. */
char compress; /* (0 - 100), eg: png compression */ char quality;
/** (0 - 100), eg: png compression. */
char compress;
/* --- format specific --- */ /* --- format specific --- */
@@ -503,7 +540,8 @@ enum {
typedef struct BakeData { typedef struct BakeData {
struct ImageFormatData im_format; struct ImageFormatData im_format;
char filepath[1024]; /* FILE_MAX */ /** FILE_MAX. */
char filepath[1024];
short width, height; short width, height;
short margin, flag; short margin, flag;
@@ -567,22 +605,29 @@ typedef struct RenderData {
struct AviCodecData *avicodecdata; struct AviCodecData *avicodecdata;
struct FFMpegCodecData ffcodecdata; struct FFMpegCodecData ffcodecdata;
int cfra, sfra, efra; /* frames as in 'images' */ /** Frames as in 'images'. */
float subframe; /* subframe offset from cfra, in 0.0-1.0 */ int cfra, sfra, efra;
int psfra, pefra; /* start+end frames of preview range */ /** Subframe offset from cfra, in 0.0-1.0. */
float subframe;
/** Start+end frames of preview range. */
int psfra, pefra;
int images, framapto; int images, framapto;
short flag, threads; short flag, threads;
float framelen, blurfac; float framelen, blurfac;
int frame_step; /* frames to jump during render/playback */ /** Frames to jump during render/playback. */
int frame_step;
short stereomode DNA_DEPRECATED; /* standalone player stereo settings */ // XXX deprecated since 2.5 /** Standalone player stereo settings */ // XXX deprecated since .2.5
short stereomode DNA_DEPRECATED;
short dimensionspreset; /* for the dimensions presets menu */ /** For the dimensions presets menu. */
short dimensionspreset;
short size; /* size in % */ /** Size in %. */
short size;
short pad6; short pad6;
@@ -601,7 +646,10 @@ typedef struct RenderData {
*/ */
int tilex, tiley; int tilex, tiley;
short planes DNA_DEPRECATED, imtype DNA_DEPRECATED, subimtype DNA_DEPRECATED, quality DNA_DEPRECATED; /*deprecated!*/ short planes DNA_DEPRECATED;
short imtype DNA_DEPRECATED;
short subimtype DNA_DEPRECATED;
short quality DNA_DEPRECATED;
/** /**
* Render to image editor, fullscreen or to new window. * Render to image editor, fullscreen or to new window.
@@ -639,8 +687,10 @@ typedef struct RenderData {
rcti disprect; rcti disprect;
/* information on different layers to be rendered */ /* information on different layers to be rendered */
ListBase layers DNA_DEPRECATED; /* Converted to Scene->view_layers. */ /** Converted to Scene->view_layers. */
short actlay DNA_DEPRECATED; /* Converted to Scene->active_layer. */ ListBase layers DNA_DEPRECATED;
/** Converted to Scene->active_layer. */
short actlay DNA_DEPRECATED;
short pad1; short pad1;
/** /**
@@ -667,11 +717,13 @@ typedef struct RenderData {
float bake_biasdist, bake_user_scale; float bake_biasdist, bake_user_scale;
/* path to render output */ /* path to render output */
char pic[1024]; /* 1024 = FILE_MAX */ /** 1024 = FILE_MAX. */
char pic[1024];
/* stamps flags. */ /* stamps flags. */
int stamp; int stamp;
short stamp_font_id, pad3; /* select one of blenders bitmap fonts */ /** Select one of blenders bitmap fonts. */
short stamp_font_id, pad3;
/* stamp info user data. */ /* stamp info user data. */
char stamp_udata[768]; char stamp_udata[768];
@@ -682,8 +734,10 @@ typedef struct RenderData {
/* sequencer options */ /* sequencer options */
char seq_prev_type; char seq_prev_type;
char seq_rend_type; /* UNUSED! */ /** UNUSED!. */
char seq_flag; /* flag use for sequence render/draw */ char seq_rend_type;
/** Flag use for sequence render/draw. */
char seq_flag;
char pad5[5]; char pad5[5];
/* render simplify */ /* render simplify */
@@ -696,7 +750,8 @@ typedef struct RenderData {
/* Freestyle line thickness options */ /* Freestyle line thickness options */
int line_thickness_mode; int line_thickness_mode;
float unit_line_thickness; /* in pixels */ /** In pixels. */
float unit_line_thickness;
/* render engine */ /* render engine */
char engine[32]; char engine[32];
@@ -714,7 +769,8 @@ typedef struct RenderData {
short debug_pass_type; short debug_pass_type;
/* MultiView */ /* MultiView */
ListBase views; /* SceneRenderView */ /** SceneRenderView. */
ListBase views;
short actview; short actview;
short views_format; short views_format;
@@ -816,7 +872,8 @@ typedef struct Paint {
char _pad1[4]; char _pad1[4];
struct Palette *palette; struct Palette *palette;
struct CurveMapping *cavity_curve; /* cavity curve */ /** Cavity curve. */
struct CurveMapping *cavity_curve;
/* WM Paint cursor */ /* WM Paint cursor */
void *paint_cursor; void *paint_cursor;
@@ -849,16 +906,23 @@ typedef struct ImagePaintSettings {
/* for projection painting only */ /* for projection painting only */
short seam_bleed, normal_angle; short seam_bleed, normal_angle;
short screen_grab_size[2]; /* capture size for re-projection */ /** Capture size for re-projection. */
short screen_grab_size[2];
int mode; /* mode used for texture painting */ /** Mode used for texture painting. */
int mode;
void *paintcursor; /* wm handle */ /** Wm handle. */
struct Image *stencil; /* workaround until we support true layer masks */ void *paintcursor;
struct Image *clone; /* clone layer for image mode for projective texture painting */ /** Workaround until we support true layer masks. */
struct Image *canvas; /* canvas when the explicit system is used for painting */ struct Image *stencil;
/** Clone layer for image mode for projective texture painting. */
struct Image *clone;
/** Canvas when the explicit system is used for painting. */
struct Image *canvas;
float stencil_col[3]; float stencil_col[3];
float dither; /* dither amount used when painting on byte images */ /** Dither amount used when painting on byte images. */
float dither;
} ImagePaintSettings; } ImagePaintSettings;
/* ------------------------------------------- */ /* ------------------------------------------- */
@@ -866,8 +930,10 @@ typedef struct ImagePaintSettings {
/* Settings for a Particle Editing Brush */ /* Settings for a Particle Editing Brush */
typedef struct ParticleBrushData { typedef struct ParticleBrushData {
short size; /* common setting */ /** Common setting. */
short step, invert, count; /* for specific brushes only */ short size;
/** For specific brushes only. */
short step, invert, count;
int flag; int flag;
float strength; float strength;
} ParticleBrushData; } ParticleBrushData;
@@ -880,7 +946,8 @@ typedef struct ParticleEditSettings {
short brushtype; short brushtype;
ParticleBrushData brush[7]; ParticleBrushData brush[7];
void *paintcursor; /* runtime */ /** Runtime. */
void *paintcursor;
float emitterdist, rt; float emitterdist, rt;
@@ -919,7 +986,8 @@ typedef struct Sculpt {
float gravity_factor; float gravity_factor;
/* scale for constant detail size */ /* scale for constant detail size */
float constant_detail; /* Constant detail resolution (Blender unit / constant_detail) */ /** Constant detail resolution (Blender unit / constant_detail). */
float constant_detail;
float detail_percent; float detail_percent;
float pad; float pad;
@@ -943,7 +1011,8 @@ typedef struct VPaint {
Paint paint; Paint paint;
char flag; char flag;
char pad[3]; char pad[3];
int radial_symm[3]; /* For mirrored painting */ /** For mirrored painting. */
int radial_symm[3];
} VPaint; } VPaint;
/* VPaint.flag */ /* VPaint.flag */
@@ -986,12 +1055,18 @@ typedef enum eGP_Lockaxis_Types {
/* Settings for a GPencil Stroke Sculpting Brush */ /* Settings for a GPencil Stroke Sculpting Brush */
typedef struct GP_Sculpt_Data { typedef struct GP_Sculpt_Data {
short size; /* radius of brush */ /** Radius of brush. */
short flag; /* eGP_Sculpt_Flag */ short size;
float strength; /* strength of effect */ /** EGP_Sculpt_Flag. */
float curcolor_add[3]; /* cursor color for add */ short flag;
float curcolor_sub[3]; /* cursor color for sub */ /** Strength of effect. */
float weight; /* target weight */ float strength;
/** Cursor color for add. */
float curcolor_add[3];
/** Cursor color for sub. */
float curcolor_sub[3];
/** Target weight. */
float weight;
char _pad[4]; char _pad[4];
} GP_Sculpt_Data; } GP_Sculpt_Data;
@@ -1017,21 +1092,29 @@ typedef enum eGP_Sculpt_Flag {
/* GPencil Stroke Sculpting Settings */ /* GPencil Stroke Sculpting Settings */
typedef struct GP_Sculpt_Settings { typedef struct GP_Sculpt_Settings {
GP_Sculpt_Data brush[12]; /* GP_SCULPT_TYPE_MAX */ /** GP_SCULPT_TYPE_MAX. */
void *paintcursor; /* runtime */ GP_Sculpt_Data brush[12];
/** Runtime. */
void *paintcursor;
int brushtype; /* eGP_Sculpt_Types (sculpt) */ /** EGP_Sculpt_Types (sculpt). */
int flag; /* eGP_Sculpt_SettingsFlag */ int brushtype;
int lock_axis; /* eGP_Lockaxis_Types lock drawing to one axis */ /** EGP_Sculpt_SettingsFlag. */
int flag;
/** EGP_Lockaxis_Types lock drawing to one axis. */
int lock_axis;
char pad1[4]; char pad1[4];
/* weight paint is a submode of sculpt but use its own index. All weight paint /* weight paint is a submode of sculpt but use its own index. All weight paint
* brushes must be defined at the end of the brush array. * brushes must be defined at the end of the brush array.
*/ */
int weighttype; /* eGP_Sculpt_Types (weight paint) */ /** EGP_Sculpt_Types (weight paint). */
int weighttype;
char pad[4]; char pad[4];
struct CurveMapping *cur_falloff; /* multiframe edit falloff effect by frame */ /** Multiframe edit falloff effect by frame. */
struct CurveMapping *cur_primitive; /* Curve used for primitve tools */ struct CurveMapping *cur_falloff;
/** Curve used for primitve tools. */
struct CurveMapping *cur_primitive;
} GP_Sculpt_Settings; } GP_Sculpt_Settings;
/* GP_Sculpt_Settings.flag */ /* GP_Sculpt_Settings.flag */
@@ -1056,15 +1139,21 @@ typedef enum eGP_Sculpt_SettingsFlag {
/* Settings for GP Interpolation Operators */ /* Settings for GP Interpolation Operators */
typedef struct GP_Interpolate_Settings { typedef struct GP_Interpolate_Settings {
short flag; /* eGP_Interpolate_SettingsFlag */ /** EGP_Interpolate_SettingsFlag. */
short flag;
char type; /* eGP_Interpolate_Type - Interpolation Mode */ /** EGP_Interpolate_Type - Interpolation Mode. */
char easing; /* eBezTriple_Easing - Easing mode (if easing equation used) */ char type;
/** EBezTriple_Easing - Easing mode (if easing equation used). */
char easing;
float back; /* BEZT_IPO_BACK */ /** BEZT_IPO_BACK. */
float amplitude, period; /* BEZT_IPO_ELASTIC */ float back;
/** BEZT_IPO_ELASTIC. */
float amplitude, period;
struct CurveMapping *custom_ipo; /* custom interpolation curve (for use with GP_IPO_CURVEMAP) */ /** Custom interpolation curve (for use with GP_IPO_CURVEMAP). */
struct CurveMapping *custom_ipo;
} GP_Interpolate_Settings; } GP_Interpolate_Settings;
/* GP_Interpolate_Settings.flag */ /* GP_Interpolate_Settings.flag */
@@ -1143,9 +1232,12 @@ typedef struct UnifiedPaintSettings {
*******************************************************************************/ *******************************************************************************/
int anchored_size; int anchored_size;
float overlap_factor; /* normalization factor due to accumulated value of curve along spacing. /**
* Normalization factor due to accumulated value of curve along spacing.
* Calculated when brush spacing changes to dampen strength of stroke * Calculated when brush spacing changes to dampen strength of stroke
* if space attenuation is used*/ * if space attenuation is used.
*/
float overlap_factor;
char draw_inverted; char draw_inverted;
/* check is there an ongoing stroke right now */ /* check is there an ongoing stroke right now */
char stroke_active; char stroke_active;
@@ -1265,17 +1357,22 @@ typedef struct MeshStatVis {
/* Tool Settings */ /* Tool Settings */
typedef struct ToolSettings { typedef struct ToolSettings {
VPaint *vpaint; /* vertex paint */ /** Vertex paint. */
VPaint *wpaint; /* weight paint */ VPaint *vpaint;
/** Weight paint. */
VPaint *wpaint;
Sculpt *sculpt; Sculpt *sculpt;
UvSculpt *uvsculpt; /* uv smooth */ /** Uv smooth. */
GpPaint *gp_paint; /* gpencil paint */ UvSculpt *uvsculpt;
/** Gpencil paint. */
GpPaint *gp_paint;
/* Vertex group weight - used only for editmode, not weight /* Vertex group weight - used only for editmode, not weight
* paint */ * paint */
float vgroup_weight; float vgroup_weight;
float doublimit; /* remove doubles limit */ /** Remove doubles limit. */
float doublimit;
char automerge; char automerge;
char object_flag; char object_flag;
@@ -1291,21 +1388,30 @@ typedef struct ToolSettings {
float uvcalc_margin; float uvcalc_margin;
/* Auto-IK */ /* Auto-IK */
short autoik_chainlen; /* runtime only */ /** Runtime only. */
short autoik_chainlen;
/* Grease Pencil */ /* Grease Pencil */
char gpencil_flags; /* flags/options for how the tool works */ /** Flags/options for how the tool works. */
char gpencil_flags;
char gpencil_v3d_align; /* stroke placement settings: 3D View */ /** Stroke placement settings: 3D View. */
char gpencil_v2d_align; /* : General 2D Editor */ char gpencil_v3d_align;
char gpencil_seq_align; /* : Sequencer Preview */ /** General 2D Editor. */
char gpencil_ima_align; /* : Image Editor */ char gpencil_v2d_align;
/** Sequencer Preview. */
char gpencil_seq_align;
/** Image Editor. */
char gpencil_ima_align;
/* Annotations */ /* Annotations */
char annotate_v3d_align; /* stroke placement settings - 3D View */ /** Stroke placement settings - 3D View. */
char annotate_v3d_align;
short annotate_thickness; /* default stroke thickness for annotation strokes */ /** Default stroke thickness for annotation strokes. */
short gpencil_selectmode; /* stroke selection mode */ short annotate_thickness;
/** Stroke selection mode. */
short gpencil_selectmode;
/* Grease Pencil Sculpt */ /* Grease Pencil Sculpt */
struct GP_Sculpt_Settings gp_sculpt; struct GP_Sculpt_Settings gp_sculpt;
@@ -1326,9 +1432,11 @@ typedef struct ToolSettings {
float select_thresh; float select_thresh;
/* Auto-Keying Mode */ /* Auto-Keying Mode */
short autokey_flag; /* defines in DNA_userdef_types.h */ /** Defines in DNA_userdef_types.h. */
short autokey_flag;
char autokey_mode; char autokey_mode;
char keyframe_type; /* keyframe type (see DNA_curve_types.h) */ /** Keyframe type (see DNA_curve_types.h). */
char keyframe_type;
/* Multires */ /* Multires */
char multires_subdiv_type; char multires_subdiv_type;
@@ -1351,16 +1459,24 @@ typedef struct ToolSettings {
char proportional, prop_mode; char proportional, prop_mode;
char proportional_objects; /* proportional edit, object mode */ /** Proportional edit, object mode. */
char proportional_mask; /* proportional edit, mask editing */ char proportional_objects;
char proportional_action; /* proportional edit, action editor */ /** Proportional edit, mask editing. */
char proportional_fcurve; /* proportional edit, graph editor */ char proportional_mask;
char lock_markers; /* lock marker editing */ /** Proportional edit, action editor. */
char proportional_action;
/** Proportional edit, graph editor. */
char proportional_fcurve;
/** Lock marker editing. */
char lock_markers;
char auto_normalize; /*auto normalizing mode in wpaint*/ /**aUto normalizing mode in wpain.t*/
char multipaint; /* paint multiple bones in wpaint */ char auto_normalize;
/** Paint multiple bones in wpaint. */
char multipaint;
char weightuser; char weightuser;
char vgroupsubset; /* subset selection filter in wpaint */ /** Subset selection filter in wpaint. */
char vgroupsubset;
/* UV painting */ /* UV painting */
char _pad2[1]; char _pad2[1];
@@ -1404,9 +1520,12 @@ typedef struct bStats {
typedef struct UnitSettings { typedef struct UnitSettings {
/* Display/Editing unit options for each scene */ /* Display/Editing unit options for each scene */
float scale_length; /* maybe have other unit conversions? */ /** Maybe have other unit conversions?. */
char system; /* imperial, metric etc */ float scale_length;
char system_rotation; /* not implemented as a proper unit system yet */ /** Imperial, metric etc. */
char system;
/** Not implemented as a proper unit system yet. */
char system_rotation;
short flag; short flag;
char length_unit; char length_unit;
@@ -1431,8 +1550,10 @@ typedef struct DisplaySafeAreas {
/* each value represents the (x,y) margins as a multiplier. /* each value represents the (x,y) margins as a multiplier.
* 'center' in this context is just the name for a different kind of safe-area */ * 'center' in this context is just the name for a different kind of safe-area */
float title[2]; /* Title Safe */ /** Title Safe. */
float action[2]; /* Image/Graphics Safe */ float title[2];
/** Image/Graphics Safe. */
float action[2];
/* use for alternate aspect ratio */ /* use for alternate aspect ratio */
float title_center[2]; float title_center[2];
@@ -1442,15 +1563,16 @@ typedef struct DisplaySafeAreas {
/* ------------------------------------------- */ /* ------------------------------------------- */
/* Scene Display - used for store scene specific display settings for the 3d view */ /* Scene Display - used for store scene specific display settings for the 3d view */
typedef struct SceneDisplay { typedef struct SceneDisplay {
float light_direction[3]; /* light direction for shadows/highlight */ /** Light direction for shadows/highlight. */
float light_direction[3];
float shadow_shift, shadow_focus; float shadow_shift, shadow_focus;
/* Settings for Cavity Shader */ /** Settings for Cavity Shader. */
float matcap_ssao_distance; float matcap_ssao_distance;
float matcap_ssao_attenuation; float matcap_ssao_attenuation;
int matcap_ssao_samples; int matcap_ssao_samples;
/* OpenGL render engine settings. */ /** OpenGL render engine settings. */
View3DShading shading; View3DShading shading;
} SceneDisplay; } SceneDisplay;
@@ -1534,7 +1656,8 @@ enum {
typedef struct Scene { typedef struct Scene {
ID id; ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ /** Animation data (must be immediately after id for utilities to use it). */
struct AnimData *adt;
struct Object *camera; struct Object *camera;
struct World *world; struct World *world;
@@ -1542,25 +1665,32 @@ typedef struct Scene {
struct Scene *set; struct Scene *set;
ListBase base DNA_DEPRECATED; ListBase base DNA_DEPRECATED;
struct Base *basact DNA_DEPRECATED; /* active base */ /** Active base. */
struct Base *basact DNA_DEPRECATED;
void *_pad1; void *_pad1;
View3DCursor cursor; /* 3d cursor location */ /** 3d cursor location. */
View3DCursor cursor;
unsigned int lay DNA_DEPRECATED; /* bitflags for layer visibility */ /** Bitflags for layer visibility (deprecated). */
int layact DNA_DEPRECATED; /* active layer */ unsigned int lay DNA_DEPRECATED;
/** Active layer (deprecated) */
int layact DNA_DEPRECATED;
unsigned int pad1; unsigned int pad1;
short flag; /* various settings */ /** Various settings. */
short flag;
char use_nodes; char use_nodes;
char pad[1]; char pad[1];
struct bNodeTree *nodetree; struct bNodeTree *nodetree;
struct Editing *ed; /* sequence editor data is allocated here */ /** Sequence editor data is allocated here. */
struct Editing *ed;
struct ToolSettings *toolsettings; /* default allocated now */ /** Default allocated now. */
struct ToolSettings *toolsettings;
void *pad2; void *pad2;
struct DisplaySafeAreas safe_areas; struct DisplaySafeAreas safe_areas;
@@ -1572,7 +1702,7 @@ typedef struct Scene {
ListBase markers; ListBase markers;
ListBase transform_spaces; ListBase transform_spaces;
/* First is the [scene, translate, rotate, scale]. */ /** First is the [scene, translate, rotate, scale]. */
TransformOrientationSlot orientation_slots[4]; TransformOrientationSlot orientation_slots[4];
void *sound_scene; void *sound_scene;
@@ -1580,15 +1710,21 @@ typedef struct Scene {
void *sound_scrub_handle; void *sound_scrub_handle;
void *speaker_handles; void *speaker_handles;
void *fps_info; /* (runtime) info/cache used for presenting playback framerate info to the user */ /** (runtime) info/cache used for presenting playback framerate info to the user. */
void *fps_info;
/* none of the dependency graph vars is mean to be saved */ /* none of the dependency graph vars is mean to be saved */
struct GHash *depsgraph_hash; struct GHash *depsgraph_hash;
int pad7; int pad7;
/* User-Defined KeyingSets */ /* User-Defined KeyingSets */
int active_keyingset; /* index of the active KeyingSet. first KeyingSet has index 1, 'none' active is 0, 'add new' is -1 */ /**
ListBase keyingsets; /* KeyingSets for this scene */ * Index of the active KeyingSet.
* first KeyingSet has index 1, 'none' active is 0, 'add new' is -1
*/
int active_keyingset;
/** KeyingSets for this scene */
ListBase keyingsets;
/* Units */ /* Units */
struct UnitSettings unit; struct UnitSettings unit;
@@ -1597,14 +1733,18 @@ typedef struct Scene {
struct bGPdata *gpd; struct bGPdata *gpd;
/* Movie Tracking */ /* Movie Tracking */
struct MovieClip *clip; /* active movie clip */ /** Active movie clip. */
struct MovieClip *clip;
/* Physics simulation settings */ /* Physics simulation settings */
struct PhysicsSettings physics_settings; struct PhysicsSettings physics_settings;
void *pad8; void *pad8;
uint64_t customdata_mask; /* XXX. runtime flag for drawing, actually belongs in the window, only used by BKE_object_handle_update() */ /* XXX. runtime flag for drawing, actually belongs in the window,
uint64_t customdata_mask_modal; /* XXX. same as above but for temp operator use (gl renders) */ * only used by BKE_object_handle_update() */
uint64_t customdata_mask;
/* XXX. same as above but for temp operator use (gl renders) */
uint64_t customdata_mask_modal;
/* Color Management */ /* Color Management */
@@ -1622,7 +1762,8 @@ typedef struct Scene {
Collection *master_collection; Collection *master_collection;
struct SceneCollection *collection DNA_DEPRECATED; struct SceneCollection *collection DNA_DEPRECATED;
IDProperty *layer_properties; /* settings to be override by workspaces */ /** Settings to be override by workspaces. */
IDProperty *layer_properties;
struct SceneDisplay display; struct SceneDisplay display;
struct SceneEEVEE eevee; struct SceneEEVEE eevee;

View File

@@ -58,35 +58,56 @@ typedef struct bScreen {
/* TODO Should become ScrAreaMap now. /* TODO Should become ScrAreaMap now.
* ** NOTE: KEEP ORDER IN SYNC WITH ScrAreaMap! (see AREAMAP_FROM_SCREEN macro above) ** */ * ** NOTE: KEEP ORDER IN SYNC WITH ScrAreaMap! (see AREAMAP_FROM_SCREEN macro above) ** */
ListBase vertbase; /* screens have vertices/edges to define areas */ /** Screens have vertices/edges to define areas. */
ListBase vertbase;
ListBase edgebase; ListBase edgebase;
ListBase areabase; ListBase areabase;
ListBase regionbase; /* screen level regions (menus), runtime only */ /** Screen level regions (menus), runtime only. */
ListBase regionbase;
struct Scene *scene DNA_DEPRECATED; struct Scene *scene DNA_DEPRECATED;
short flag; /* general flags */ /** General flags. */
short winid; /* winid from WM, starts with 1 */ short flag;
short redraws_flag; /* user-setting for which editors get redrawn during anim playback (used to be time->redraws) */ /** Winid from WM, starts with 1. */
short winid;
/**
* User-setting for which editors get redrawn during anim playback
* (used to be time->redraws).
*/
short redraws_flag;
char temp; /* temp screen in a temp window, don't save (like user prefs) */ /** Temp screen in a temp window, don't save (like user prefs). */
char state; /* temp screen for image render display or fileselect */ char temp;
char do_draw; /* notifier for drawing edges */ /** Temp screen for image render display or fileselect. */
char do_refresh; /* notifier for scale screen, changed screen, etc */ char state;
char do_draw_gesture; /* notifier for gesture draw. */ /** Notifier for drawing edges. */
char do_draw_paintcursor; /* notifier for paint cursor draw. */ char do_draw;
char do_draw_drag; /* notifier for dragging draw. */ /** Notifier for scale screen, changed screen, etc. */
char skip_handling; /* set to delay screen handling after switching back from maximized area */ char do_refresh;
char scrubbing; /* set when scrubbing to avoid some costly updates */ /** Notifier for gesture draw. */
char do_draw_gesture;
/** Notifier for paint cursor draw. */
char do_draw_paintcursor;
/** Notifier for dragging draw. */
char do_draw_drag;
/** Set to delay screen handling after switching back from maximized area. */
char skip_handling;
/** Set when scrubbing to avoid some costly updates. */
char scrubbing;
char pad[1]; char pad[1];
struct ARegion *active_region; /* active region that has mouse focus */ /** Active region that has mouse focus. */
struct ARegion *active_region;
struct wmTimer *animtimer; /* if set, screen has timer handler added in window */ /** If set, screen has timer handler added in window. */
void *context; /* context callback */ struct wmTimer *animtimer;
/** Context callback. */
void *context;
struct wmTooltipState *tool_tip; /* runtime */ /** Runtime. */
struct wmTooltipState *tool_tip;
PreviewImage *preview; PreviewImage *preview;
} bScreen; } bScreen;
@@ -101,7 +122,8 @@ typedef struct ScrVert {
typedef struct ScrEdge { typedef struct ScrEdge {
struct ScrEdge *next, *prev; struct ScrEdge *next, *prev;
ScrVert *v1, *v2; ScrVert *v1, *v2;
short border; /* 1 when at edge of screen */ /** 1 when at edge of screen. */
short border;
short flag; short flag;
int pad; int pad;
} ScrEdge; } ScrEdge;
@@ -109,30 +131,45 @@ typedef struct ScrEdge {
typedef struct ScrAreaMap { typedef struct ScrAreaMap {
/* ** NOTE: KEEP ORDER IN SYNC WITH LISTBASES IN bScreen! ** */ /* ** NOTE: KEEP ORDER IN SYNC WITH LISTBASES IN bScreen! ** */
ListBase vertbase; /* ScrVert - screens have vertices/edges to define areas */ /** ScrVert - screens have vertices/edges to define areas. */
ListBase edgebase; /* ScrEdge */ ListBase vertbase;
ListBase areabase; /* ScrArea */ /** ScrEdge. */
ListBase edgebase;
/** ScrArea. */
ListBase areabase;
} ScrAreaMap; } ScrAreaMap;
typedef struct Panel { /* the part from uiBlock that needs saved in file */ /** The part from uiBlock that needs saved in file. */
typedef struct Panel {
struct Panel *next, *prev; struct Panel *next, *prev;
struct PanelType *type; /* runtime */ /** Runtime. */
struct uiLayout *layout; /* runtime for drawing */ struct PanelType *type;
/** Runtime for drawing. */
struct uiLayout *layout;
char panelname[64], tabname[64]; /* defined as UI_MAX_NAME_STR */ /** Defined as UI_MAX_NAME_STR. */
char drawname[64]; /* panelname is identifier for restoring location */ char panelname[64], tabname[64];
int ofsx, ofsy; /* offset within the region */ /** Panelname is identifier for restoring location. */
int sizex, sizey; /* panel size including children */ char drawname[64];
int blocksizex, blocksizey; /* panel size excluding children */ /** Offset within the region. */
int ofsx, ofsy;
/** Panel size including children. */
int sizex, sizey;
/** Panel size excluding children. */
int blocksizex, blocksizey;
short labelofs, pad; short labelofs, pad;
short flag, runtime_flag; short flag, runtime_flag;
short control; short control;
short snap; short snap;
int sortorder; /* panels are aligned according to increasing sortorder */ /** Panels are aligned according to increasing sortorder. */
struct Panel *paneltab; /* this panel is tabbed in *paneltab */ int sortorder;
void *activedata; /* runtime for panel manipulation */ /** This panel is tabbed in *paneltab. */
ListBase children; /* sub panels */ struct Panel *paneltab;
/** Runtime for panel manipulation. */
void *activedata;
/** Sub panels. */
ListBase children;
} Panel; } Panel;
@@ -170,32 +207,43 @@ typedef struct PanelCategoryStack {
# #
# #
typedef struct uiListDyn { typedef struct uiListDyn {
int height; /* Number of rows needed to draw all elements. */ /** Number of rows needed to draw all elements. */
int visual_height; /* Actual visual height of the list (in rows). */ int height;
int visual_height_min; /* Minimal visual height of the list (in rows). */ /** Actual visual height of the list (in rows). */
int visual_height;
/** Minimal visual height of the list (in rows). */
int visual_height_min;
int items_len; /* Number of items in collection. */ /** Number of items in collection. */
int items_shown; /* Number of items actually visible after filtering. */ int items_len;
/** Number of items actually visible after filtering. */
int items_shown;
/* Those are temp data used during drag-resize with GRIP button (they are in pixels, the meaningful data is the /* Those are temp data used during drag-resize with GRIP button
* (they are in pixels, the meaningful data is the
* difference between resize_prev and resize)... * difference between resize_prev and resize)...
*/ */
int resize; int resize;
int resize_prev; int resize_prev;
/* Filtering data. */ /* Filtering data. */
int *items_filter_flags; /* items_len length. */ /** Items_len length. */
int *items_filter_neworder; /* org_idx -> new_idx, items_len length. */ int *items_filter_flags;
/** Org_idx -> new_idx, items_len length. */
int *items_filter_neworder;
} uiListDyn; } uiListDyn;
typedef struct uiList { /* some list UI data need to be saved in file */ typedef struct uiList { /* some list UI data need to be saved in file */
struct uiList *next, *prev; struct uiList *next, *prev;
struct uiListType *type; /* runtime */ /** Runtime. */
struct uiListType *type;
char list_id[64]; /* defined as UI_MAX_NAME_STR */ /** Defined as UI_MAX_NAME_STR. */
char list_id[64];
int layout_type; /* How items are layedout in the list */ /** How items are layedout in the list. */
int layout_type;
int flag; int flag;
int list_scroll; int list_scroll;
@@ -204,7 +252,8 @@ typedef struct uiList { /* some list UI data need to be saved in file
int list_last_activei; int list_last_activei;
/* Filtering data. */ /* Filtering data. */
char filter_byname[64]; /* defined as UI_MAX_NAME_STR */ /** Defined as UI_MAX_NAME_STR. */
char filter_byname[64];
int filter_flag; int filter_flag;
int filter_sort_flag; int filter_sort_flag;
@@ -217,7 +266,8 @@ typedef struct uiList { /* some list UI data need to be saved in file
typedef struct TransformOrientation { typedef struct TransformOrientation {
struct TransformOrientation *next, *prev; struct TransformOrientation *next, *prev;
char name[64]; /* MAX_NAME */ /** MAX_NAME. */
char name[64];
float mat[3][3]; float mat[3][3];
int pad; int pad;
} TransformOrientation; } TransformOrientation;
@@ -225,7 +275,8 @@ typedef struct TransformOrientation {
typedef struct uiPreview { /* some preview UI data need to be saved in file */ typedef struct uiPreview { /* some preview UI data need to be saved in file */
struct uiPreview *next, *prev; struct uiPreview *next, *prev;
char preview_id[64]; /* defined as UI_MAX_NAME_STR */ /** Defined as UI_MAX_NAME_STR. */
char preview_id[64];
short height; short height;
short pad1[3]; short pad1[3];
} uiPreview; } uiPreview;
@@ -244,9 +295,11 @@ typedef struct ScrGlobalAreaData {
* if they are 'collapsed' or not. Value is set on area creation and not * if they are 'collapsed' or not. Value is set on area creation and not
* touched afterwards. */ * touched afterwards. */
short size_min, size_max; short size_min, size_max;
short align; /* GlobalAreaAlign */ /** GlobalAreaAlign. */
short align;
short flag; /* GlobalAreaFlag */ /** GlobalAreaFlag. */
short flag;
short pad; short pad;
} ScrGlobalAreaData; } ScrGlobalAreaData;
@@ -268,28 +321,43 @@ typedef struct ScrArea_Runtime {
typedef struct ScrArea { typedef struct ScrArea {
struct ScrArea *next, *prev; struct ScrArea *next, *prev;
ScrVert *v1, *v2, *v3, *v4; /* ordered (bl, tl, tr, br) */ /** Ordered (bl, tl, tr, br). */
bScreen *full; /* if area==full, this is the parent */ ScrVert *v1, *v2, *v3, *v4;
/** If area==full, this is the parent. */
bScreen *full;
rcti totrct; /* rect bound by v1 v2 v3 v4 */ /** Rect bound by v1 v2 v3 v4. */
rcti totrct;
char spacetype; /* eSpace_Type (SPACE_FOO) */ /**
/* Temporarily used while switching area type, otherwise this should be * eSpace_Type (SPACE_FOO).
* SPACE_EMPTY. Also, versioning uses it to nicely replace deprecated *
* editors. It's been there for ages, name doesn't fit any more... */ * Temporarily used while switching area type, otherwise this should be SPACE_EMPTY.
char butspacetype; /* eSpace_Type (SPACE_FOO) */ * Also, versioning uses it to nicely replace deprecated * editors.
* It's been there for ages, name doesn't fit any more.
*/
char spacetype;
/** ESpace_Type (SPACE_FOO). */
char butspacetype;
short butspacetype_subtype; short butspacetype_subtype;
short winx, winy; /* size */ /** Size. */
short winx, winy;
char headertype DNA_DEPRECATED;/* OLD! 0=no header, 1= down, 2= up */ /** OLD! 0=no header, 1= down, 2= up. */
char do_refresh; /* private, for spacetype refresh callback */ char headertype DNA_DEPRECATED;
/** Private, for spacetype refresh callback. */
char do_refresh;
short flag; short flag;
short region_active_win; /* index of last used region of 'RGN_TYPE_WINDOW' /**
* runtime variable, updated by executing operators */ * Index of last used region of 'RGN_TYPE_WINDOW'
* runtime variable, updated by executing operators.
*/
short region_active_win;
char temp, pad; char temp, pad;
struct SpaceType *type; /* callbacks for this space type */ /** Callbacks for this space type. */
struct SpaceType *type;
/* Non-NULL if this area is global. */ /* Non-NULL if this area is global. */
ScrGlobalAreaData *global; ScrGlobalAreaData *global;
@@ -298,14 +366,18 @@ typedef struct ScrArea {
* changing the editor type, we try to reuse old editor data from this list. * changing the editor type, we try to reuse old editor data from this list.
* The first item is the active/visible one. * The first item is the active/visible one.
*/ */
ListBase spacedata; /* SpaceLink */ /** SpaceLink. */
ListBase spacedata;
/* NOTE: This region list is the one from the active/visible editor (first item in /* NOTE: This region list is the one from the active/visible editor (first item in
* spacedata list). Use SpaceLink.regionbase if it's inactive (but only then)! * spacedata list). Use SpaceLink.regionbase if it's inactive (but only then)!
*/ */
ListBase regionbase; /* ARegion */ /** ARegion. */
ListBase handlers; /* wmEventHandler */ ListBase regionbase;
/** WmEventHandler. */
ListBase handlers;
ListBase actionzones; /* AZone */ /** AZone. */
ListBase actionzones;
ScrArea_Runtime runtime; ScrArea_Runtime runtime;
} ScrArea; } ScrArea;
@@ -319,41 +391,67 @@ typedef struct ARegion_Runtime {
typedef struct ARegion { typedef struct ARegion {
struct ARegion *next, *prev; struct ARegion *next, *prev;
View2D v2d; /* 2D-View scrolling/zoom info (most regions are 2d anyways) */ /** 2D-View scrolling/zoom info (most regions are 2d anyways). */
rcti winrct; /* coordinates of region */ View2D v2d;
rcti drawrct; /* runtime for partial redraw, same or smaller than winrct */ /** Coordinates of region. */
short winx, winy; /* size */ rcti winrct;
/** Runtime for partial redraw, same or smaller than winrct. */
rcti drawrct;
/** Size. */
short winx, winy;
short visible; /* region is currently visible on screen */ /** Region is currently visible on screen. */
short regiontype; /* window, header, etc. identifier for drawing */ short visible;
short alignment; /* how it should split */ /** Window, header, etc. identifier for drawing. */
short flag; /* hide, ... */ short regiontype;
/** How it should split. */
short alignment;
/** Hide, .... */
short flag;
float fsize; /* current split size in float (unused) */ /** Current split size in float (unused). */
short sizex, sizey; /* current split size in pixels (if zero it uses regiontype) */ float fsize;
/** Current split size in pixels (if zero it uses regiontype). */
short sizex, sizey;
short do_draw; /* private, cached notifier events */ /** Private, cached notifier events. */
short do_draw_overlay; /* private, cached notifier events */ short do_draw;
short overlap; /* private, set for indicate drawing overlapped */ /** Private, cached notifier events. */
short flagfullscreen; /* temporary copy of flag settings for clean fullscreen */ short do_draw_overlay;
/** Private, set for indicate drawing overlapped. */
short overlap;
/** Temporary copy of flag settings for clean fullscreen. */
short flagfullscreen;
short pad1, pad2; short pad1, pad2;
struct ARegionType *type; /* callbacks for this region type */ /** Callbacks for this region type. */
struct ARegionType *type;
ListBase uiblocks; /* uiBlock */ /** UiBlock. */
ListBase panels; /* Panel */ ListBase uiblocks;
ListBase panels_category_active; /* Stack of panel categories */ /** Panel. */
ListBase ui_lists; /* uiList */ ListBase panels;
ListBase ui_previews; /* uiPreview */ /** Stack of panel categories. */
ListBase handlers; /* wmEventHandler */ ListBase panels_category_active;
ListBase panels_category; /* Panel categories runtime */ /** UiList. */
ListBase ui_lists;
/** UiPreview. */
ListBase ui_previews;
/** WmEventHandler. */
ListBase handlers;
/** Panel categories runtime. */
ListBase panels_category;
struct wmGizmoMap *gizmo_map; /* gizmo-map of this region */ /** Gizmo-map of this region. */
struct wmTimer *regiontimer; /* blend in/out */ struct wmGizmoMap *gizmo_map;
/** Blend in/out. */
struct wmTimer *regiontimer;
struct wmDrawBuffer *draw_buffer; struct wmDrawBuffer *draw_buffer;
char *headerstr; /* use this string to draw info */ /** Use this string to draw info. */
void *regiondata; /* XXX 2.50, need spacedata equivalent? */ char *headerstr;
/** XXX 2.50, need spacedata equivalent?. */
void *regiondata;
ARegion_Runtime runtime; ARegion_Runtime runtime;
} ARegion; } ARegion;

View File

@@ -35,28 +35,40 @@
# #
# #
typedef struct SDNA { typedef struct SDNA {
const char *data; /* full copy of 'encoded' data (when data_alloc is set, otherwise borrowed). */ /** Full copy of 'encoded' data (when data_alloc is set, otherwise borrowed). */
int datalen; /* length of data */ const char *data;
/** Length of data. */
int datalen;
bool data_alloc; bool data_alloc;
int nr_names; /* total number of struct members */ /** Total number of struct members. */
const char **names; /* struct member names */ int nr_names;
/** Struct member names. */
const char **names;
int pointerlen; /* size of a pointer in bytes */ /** Size of a pointer in bytes. */
int pointerlen;
int nr_types; /* number of basic types + struct types */ /** Number of basic types + struct types. */
const char **types; /* type names */ int nr_types;
short *typelens; /* type lengths */ /** Type names. */
const char **types;
/** Type lengths. */
short *typelens;
int nr_structs; /* number of struct types */ /** Number of struct types. */
short **structs; /* sp = structs[a] is the address of a struct definition int nr_structs;
/**
* sp = structs[a] is the address of a struct definition
* sp[0] is struct type number, sp[1] amount of members * sp[0] is struct type number, sp[1] amount of members
* *
* (sp[2], sp[3]), (sp[4], sp[5]), .. are the member * (sp[2], sp[3]), (sp[4], sp[5]), .. are the member
* type and name numbers respectively */ * type and name numbers respectively.
*/
short **structs;
struct GHash *structs_map; /* ghash for faster lookups, /** #GHash for faster lookups, requires WITH_DNA_GHASH to be used for now. */
* requires WITH_DNA_GHASH to be used for now */ struct GHash *structs_map;
} SDNA; } SDNA;
# #

View File

@@ -108,9 +108,12 @@ typedef struct Strip {
struct Strip *next, *prev; struct Strip *next, *prev;
int us, done; int us, done;
int startstill, endstill; int startstill, endstill;
StripElem *stripdata; /* only used as an array in IMAGE sequences(!), /**
* Only used as an array in IMAGE sequences(!),
* and as a 1-element array in MOVIE sequences, * and as a 1-element array in MOVIE sequences,
* NULL for all other strip-types */ * NULL for all other strip-types.
*/
StripElem *stripdata;
char dir[768]; char dir[768];
StripProxy *proxy; StripProxy *proxy;
StripCrop *crop; StripCrop *crop;
@@ -133,35 +136,62 @@ typedef struct Strip {
*/ */
typedef struct Sequence { typedef struct Sequence {
struct Sequence *next, *prev; struct Sequence *next, *prev;
void *tmp; /* tmp var for copying, and tagging for linked selection */ /** Tmp var for copying, and tagging for linked selection. */
void *lib; /* needed (to be like ipo), else it will raise libdata warnings, this should never be used */ void *tmp;
char name[64]; /* SEQ_NAME_MAXSTR - name, set by default and needs to be unique, for RNA paths */ /** Needed (to be like ipo), else it will raise libdata warnings, this should never be used. */
void *lib;
/** SEQ_NAME_MAXSTR - name, set by default and needs to be unique, for RNA paths. */
char name[64];
int flag, type; /*flags bitmap (see below) and the type of sequence*/ /**fLags bitmap (see below) and the type of sequenc.e*/
int len; /* the length of the contents of this strip - before handles are applied */ int flag, type;
int start; /* start frame of contents of strip in absolute frame coordinates. For metastrips start of first strip startdisp */ /** The length of the contents of this strip - before handles are applied. */
int startofs, endofs; /* frames after the first frame where display starts, frames before the last frame where display ends */ int len;
int startstill, endstill; /* frames that use the first frame before data begins, frames that use the last frame after data ends */ /**
int machine, depth; /*machine - the strip channel, depth - the depth in the sequence when dealing with metastrips */ * Start frame of contents of strip in absolute frame coordinates.
int startdisp, enddisp; /* starting and ending points of the strip in the sequence*/ * For metastrips start of first strip startdisp.
*/
int start;
/**
* Frames after the first frame where display starts,
* frames before the last frame where display ends.
*/
int startofs, endofs;
/**
* Frames that use the first frame before data begins,
* frames that use the last frame after data ends.
*/
int startstill, endstill;
/** Machine: the strip channel, depth the depth in the sequence when dealing with metastrips. */
int machine, depth;
/** Starting and ending points of the strip in the sequenc.e*/
int startdisp, enddisp;
float sat; float sat;
float mul, handsize; float mul, handsize;
short anim_preseek; short anim_preseek;
short streamindex; /* streamindex for movie or sound files with several streams */ /** Streamindex for movie or sound files with several streams. */
int multicam_source; /* for multicam source selection */ short streamindex;
int clip_flag; /* MOVIECLIP render flags */ /** For multicam source selection. */
int multicam_source;
/** MOVIECLIP render flags. */
int clip_flag;
Strip *strip; Strip *strip;
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ /** Old animation system, deprecated for 2.5. */
struct Ipo *ipo DNA_DEPRECATED;
/* these ID vars should never be NULL but can be when linked libs fail to load, so check on access */ /* these ID vars should never be NULL but can be when linked libs fail to load, so check on access */
struct Scene *scene; struct Scene *scene;
struct Object *scene_camera; /* override scene camera */ /** Override scene camera. */
struct MovieClip *clip; /* for MOVIECLIP strips */ struct Object *scene_camera;
struct Mask *mask; /* for MASK strips */ /** For MOVIECLIP strips. */
ListBase anims; /* for MOVIE strips */ struct MovieClip *clip;
/** For MASK strips. */
struct Mask *mask;
/** For MOVIE strips. */
ListBase anims;
float effect_fader; float effect_fader;
float speed_fader; float speed_fader;
@@ -169,26 +199,33 @@ typedef struct Sequence {
/* pointers for effects: */ /* pointers for effects: */
struct Sequence *seq1, *seq2, *seq3; struct Sequence *seq1, *seq2, *seq3;
ListBase seqbase; /* list of strips for metastrips */ /** List of strips for metastrips. */
ListBase seqbase;
struct bSound *sound; /* the linked "bSound" object */ /** The linked "bSound" object. */
struct bSound *sound;
void *scene_sound; void *scene_sound;
float volume; float volume;
float pitch, pan; /* pitch (-0.1..10), pan -2..2 */ /** Pitch (-0.1..10), pan -2..2. */
float pitch, pan;
float strobe; float strobe;
void *effectdata; /* Struct pointer for effect settings */ /** Struct pointer for effect settings. */
void *effectdata;
int anim_startofs; /* only use part of animation file */ /** Only use part of animation file. */
int anim_endofs; /* is subtle different to startofs / endofs */ int anim_startofs;
/** Is subtle different to startofs / endofs. */
int anim_endofs;
int blend_mode; int blend_mode;
float blend_opacity; float blend_opacity;
/* is sfra needed anymore? - it looks like its only used in one place */ /* is sfra needed anymore? - it looks like its only used in one place */
int sfra; /* starting frame according to the timeline of the scene. */ /** Starting frame according to the timeline of the scene. */
int sfra;
char alpha_mode; char alpha_mode;
char pad[2]; char pad[2];
@@ -212,15 +249,20 @@ typedef struct MetaStack {
} MetaStack; } MetaStack;
typedef struct Editing { typedef struct Editing {
ListBase *seqbasep; /* pointer to the current list of seq's being edited (can be within a meta strip) */ /** 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 *seqbasep;
/** Pointer to the top-most seq's. */
ListBase seqbase;
ListBase metastack; ListBase metastack;
/* Context vars, used to be static */ /* Context vars, used to be static */
Sequence *act_seq; Sequence *act_seq;
char act_imagedir[1024]; /* 1024 = FILE_MAX */ /** 1024 = FILE_MAX. */
char act_sounddir[1024]; /* 1024 = FILE_MAX */ char act_imagedir[1024];
char proxy_dir[1024]; /* 1024 = FILE_MAX */ /** 1024 = FILE_MAX. */
char act_sounddir[1024];
/** 1024 = FILE_MAX. */
char proxy_dir[1024];
int over_ofs, over_cfra; int over_ofs, over_cfra;
int over_flag, proxy_storage; int over_flag, proxy_storage;
@@ -234,12 +276,16 @@ typedef struct WipeVars {
} WipeVars; } WipeVars;
typedef struct GlowVars { typedef struct GlowVars {
float fMini; /* Minimum intensity to trigger a glow */ /** Minimum intensity to trigger a glow. */
float fMini;
float fClamp; float fClamp;
float fBoost; /* Amount to multiply glow intensity */ /** Amount to multiply glow intensity. */
float dDist; /* Radius of glow blurring */ float fBoost;
/** Radius of glow blurring. */
float dDist;
int dQuality; int dQuality;
int bNoComp; /* SHOW/HIDE glow buffer */ /** SHOW/HIDE glow buffer. */
int bNoComp;
} GlowVars; } GlowVars;
typedef struct TransformVars { typedef struct TransformVars {
@@ -250,7 +296,8 @@ typedef struct TransformVars {
float rotIni; float rotIni;
int percent; int percent;
int interpolation; int interpolation;
int uniform_scale; /* preserve aspect/ratio when scaling */ /** Preserve aspect/ratio when scaling. */
int uniform_scale;
} TransformVars; } TransformVars;
typedef struct SolidColorVars { typedef struct SolidColorVars {
@@ -302,8 +349,10 @@ enum {
}; };
typedef struct ColorMixVars { typedef struct ColorMixVars {
int blend_effect; /* value from SEQ_TYPE_XXX enumeration */ /** Value from SEQ_TYPE_XXX enumeration. */
float factor; /* blend factor [0.0f, 1.0f] */ int blend_effect;
/** Blend factor [0.0f, 1.0f]. */
float factor;
} ColorMixVars; } ColorMixVars;
/* ***************** Sequence modifiers ****************** */ /* ***************** Sequence modifiers ****************** */
@@ -311,7 +360,8 @@ typedef struct ColorMixVars {
typedef struct SequenceModifierData { typedef struct SequenceModifierData {
struct SequenceModifierData *next, *prev; struct SequenceModifierData *next, *prev;
int type, flag; int type, flag;
char name[64]; /* MAX_NAME */ /** MAX_NAME. */
char name[64];
/* mask input, either sequence or mask ID */ /* mask input, either sequence or mask ID */
int mask_input_type; int mask_input_type;

View File

@@ -68,7 +68,8 @@ typedef struct ShaderFxData {
int stackindex; int stackindex;
short flag; short flag;
short pad; short pad;
char name[64]; /* MAX_NAME */ /** MAX_NAME. */
char name[64];
char *error; char *error;
} ShaderFxData; } ShaderFxData;
@@ -83,10 +84,14 @@ typedef struct ShaderFxData_Runtime {
typedef struct BlurShaderFxData { typedef struct BlurShaderFxData {
ShaderFxData shaderfx; ShaderFxData shaderfx;
int radius[2]; int radius[2];
int flag; /* flags */ /** Flags. */
int samples; /* number of samples */ int flag;
float coc; /* circle of confusion */ /** Number of samples. */
int blur[2]; /* not visible in rna */ int samples;
/** Circle of confusion. */
float coc;
/** Not visible in rna. */
int blur[2];
char pad[4]; char pad[4];
ShaderFxData_Runtime runtime; ShaderFxData_Runtime runtime;
@@ -102,7 +107,8 @@ typedef struct ColorizeShaderFxData {
float low_color[4]; float low_color[4];
float high_color[4]; float high_color[4];
float factor; float factor;
int flag; /* flags */ /** Flags. */
int flag;
char pad[4]; char pad[4];
ShaderFxData_Runtime runtime; ShaderFxData_Runtime runtime;
@@ -118,8 +124,10 @@ typedef enum ColorizeShaderFxModes {
typedef struct FlipShaderFxData { typedef struct FlipShaderFxData {
ShaderFxData shaderfx; ShaderFxData shaderfx;
int flag; /* flags */ /** Flags. */
int flipmode; /* internal, not visible in rna */ int flag;
/** Internal, not visible in rna. */
int flipmode;
ShaderFxData_Runtime runtime; ShaderFxData_Runtime runtime;
} FlipShaderFxData; } FlipShaderFxData;
@@ -133,7 +141,8 @@ typedef struct GlowShaderFxData {
float glow_color[3]; float glow_color[3];
float select_color[3]; float select_color[3];
float threshold; float threshold;
int flag; /* flags */ /** Flags. */
int flag;
int mode; int mode;
int blur[2]; int blur[2];
int samples; int samples;
@@ -152,18 +161,22 @@ typedef enum eGlowShaderFx_Flag {
typedef struct LightShaderFxData { typedef struct LightShaderFxData {
ShaderFxData shaderfx; ShaderFxData shaderfx;
struct Object *object; struct Object *object;
int flag; /* flags */ /** Flags. */
int flag;
float energy; float energy;
float ambient; float ambient;
float loc[4]; /* internal, not visible in rna */ /** Internal, not visible in rna. */
float loc[4];
char pad[4]; char pad[4];
ShaderFxData_Runtime runtime; ShaderFxData_Runtime runtime;
} LightShaderFxData; } LightShaderFxData;
typedef struct PixelShaderFxData { typedef struct PixelShaderFxData {
ShaderFxData shaderfx; ShaderFxData shaderfx;
int size[3]; /* last element used for shader only */ /** Last element used for shader only. */
int flag; /* flags */ int size[3];
/** Flags. */
int flag;
float rgba[4]; float rgba[4];
ShaderFxData_Runtime runtime; ShaderFxData_Runtime runtime;
} PixelShaderFxData; } PixelShaderFxData;
@@ -175,7 +188,8 @@ typedef enum ePixelShaderFx_Flag {
typedef struct RimShaderFxData { typedef struct RimShaderFxData {
ShaderFxData shaderfx; ShaderFxData shaderfx;
int offset[2]; int offset[2];
int flag; /* flags */ /** Flags. */
int flag;
float rim_rgb[3]; float rim_rgb[3];
float mask_rgb[3]; float mask_rgb[3];
int mode; int mode;
@@ -198,7 +212,8 @@ typedef struct ShadowShaderFxData {
ShaderFxData shaderfx; ShaderFxData shaderfx;
struct Object *object; struct Object *object;
int offset[2]; int offset[2];
int flag; /* flags */ /** Flags. */
int flag;
float shadow_rgba[4]; float shadow_rgba[4];
float amplitude; float amplitude;
float period; float period;
@@ -220,10 +235,12 @@ typedef enum eShadowShaderFx_Flag {
typedef struct SwirlShaderFxData { typedef struct SwirlShaderFxData {
ShaderFxData shaderfx; ShaderFxData shaderfx;
struct Object *object; struct Object *object;
int flag; /* flags */ /** Flags. */
int flag;
int radius; int radius;
float angle; float angle;
int transparent; /* not visible in rna */ /** Not visible in rna. */
int transparent;
ShaderFxData_Runtime runtime; ShaderFxData_Runtime runtime;
} SwirlShaderFxData; } SwirlShaderFxData;
@@ -237,7 +254,8 @@ typedef struct WaveShaderFxData {
float period; float period;
float phase; float phase;
int orientation; int orientation;
int flag; /* flags */ /** Flags. */
int flag;
char pad[4]; char pad[4];
ShaderFxData_Runtime runtime; ShaderFxData_Runtime runtime;
} WaveShaderFxData; } WaveShaderFxData;

View File

@@ -132,7 +132,8 @@ enum {
}; };
typedef struct SmokeDomainSettings { typedef struct SmokeDomainSettings {
struct SmokeModifierData *smd; /* for fast RNA access */ /** For fast RNA access. */
struct SmokeModifierData *smd;
struct FLUID_3D *fluid; struct FLUID_3D *fluid;
void *fluid_mutex; void *fluid_mutex;
struct Collection *fluid_group; struct Collection *fluid_group;
@@ -152,27 +153,48 @@ typedef struct SmokeDomainSettings {
float *shadow; float *shadow;
/* simulation data */ /* simulation data */
float p0[3]; /* start point of BB in local space (includes sub-cell shift for adaptive domain)*/ /** Start point of BB in local space (includes sub-cell shift for adaptive domain.)*/
float p1[3]; /* end point of BB in local space */ float p0[3];
float dp0[3]; /* difference from object center to grid start point */ /** End point of BB in local space. */
float cell_size[3]; /* size of simulation cell in local space */ float p1[3];
float global_size[3]; /* global size of domain axises */ /** Difference from object center to grid start point. */
float dp0[3];
/** Size of simulation cell in local space. */
float cell_size[3];
/** Global size of domain axises. */
float global_size[3];
float prev_loc[3]; float prev_loc[3];
int shift[3]; /* current domain shift in simulation cells */ /** Current domain shift in simulation cells. */
float shift_f[3]; /* exact domain shift */ int shift[3];
float obj_shift_f[3]; /* how much object has shifted since previous smoke frame (used to "lock" domain while drawing) */ /** Exact domain shift. */
float imat[4][4]; /* domain object imat */ float shift_f[3];
float obmat[4][4]; /* domain obmat */ /**
float fluidmat[4][4]; /* low res fluid matrix */ * How much object has shifted since previous smoke frame
float fluidmat_wt[4][4]; /* high res fluid matrix */ * (used to "lock" domain while drawing).
*/
float obj_shift_f[3];
/** Domain object imat. */
float imat[4][4];
/** Domain obmat. */
float obmat[4][4];
/** Low res fluid matrix. */
float fluidmat[4][4];
/** High res fluid matrix. */
float fluidmat_wt[4][4];
int base_res[3]; /* initial "non-adapted" resolution */ /** Initial "non-adapted" resolution. */
int res_min[3]; /* cell min */ int base_res[3];
int res_max[3]; /* cell max */ /** Cell min. */
int res[3]; /* data resolution (res_max-res_min) */ int res_min[3];
/** Cell max. */
int res_max[3];
/** Data resolution (res_max-res_min). */
int res[3];
int total_cells; int total_cells;
float dx; /* 1.0f / res */ /** 1.0f / res. */
float scale; /* largest domain size */ float dx;
/** Largest domain size. */
float scale;
/* user settings */ /* user settings */
int adapt_margin; int adapt_margin;
@@ -181,13 +203,18 @@ typedef struct SmokeDomainSettings {
float alpha; float alpha;
float beta; float beta;
int amplify; /* wavelet amplification */ /** Wavelet amplification. */
int maxres; /* longest axis on the BB gets this resolution assigned */ int amplify;
int flags; /* show up-res or low res, etc */ /** Longest axis on the BB gets this resolution assigned. */
int maxres;
/** Show up-res or low res, etc. */
int flags;
int viewsettings; int viewsettings;
short noise; /* noise type: wave, curl, anisotropic */ /** Noise type: wave, curl, anisotropic. */
short noise;
short diss_percent; short diss_percent;
int diss_speed;/* in frames */ /** In frames. */
int diss_speed;
float strength; float strength;
int res_wt[3]; int res_wt[3];
float dx_wt; float dx_wt;
@@ -201,14 +228,17 @@ typedef struct SmokeDomainSettings {
char pad[2]; char pad[2];
/* Smoke uses only one cache from now on (index [0]), but keeping the array for now for reading old files. */ /* 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_types.h */ /** Definition is in DNA_object_force_types.h. */
struct PointCache *point_cache[2];
struct ListBase ptcaches[2]; struct ListBase ptcaches[2];
struct EffectorWeights *effector_weights; struct EffectorWeights *effector_weights;
int border_collisions; /* How domain border collisions are handled */ /** How domain border collisions are handled. */
int border_collisions;
float time_scale; float time_scale;
float vorticity; float vorticity;
int active_fields; int active_fields;
float active_color[3]; /* monitor color situation of simulation */ /** Monitor color situation of simulation. */
float active_color[3];
int highres_sampling; int highres_sampling;
/* flame parameters */ /* flame parameters */
@@ -227,7 +257,8 @@ typedef struct SmokeDomainSettings {
float vector_scale; float vector_scale;
char vector_draw_type; char vector_draw_type;
char use_coba; char use_coba;
char coba_field; /* simulation field used for the color mapping */ /** Simulation field used for the color mapping. */
char coba_field;
char interp_method; char interp_method;
float clipping; float clipping;
@@ -258,13 +289,15 @@ typedef struct SmokeDomainSettings {
#define MOD_SMOKE_FLOW_USE_PART_SIZE (1<<4) /* use specific size for particles instead of closest cell */ #define MOD_SMOKE_FLOW_USE_PART_SIZE (1<<4) /* use specific size for particles instead of closest cell */
typedef struct SmokeFlowSettings { typedef struct SmokeFlowSettings {
struct SmokeModifierData *smd; /* for fast RNA access */ /** For fast RNA access. */
struct SmokeModifierData *smd;
struct Mesh *mesh; struct Mesh *mesh;
struct ParticleSystem *psys; struct ParticleSystem *psys;
struct Tex *noise_texture; struct Tex *noise_texture;
/* initial velocity */ /* initial velocity */
float *verts_old; /* previous vertex positions in domain space */ /** Previous vertex positions in domain space. */
float *verts_old;
int numverts; int numverts;
float vel_multi; // Multiplier for inherited velocity float vel_multi; // Multiplier for inherited velocity
float vel_normal; float vel_normal;
@@ -273,22 +306,28 @@ typedef struct SmokeFlowSettings {
float density; float density;
float color[3]; float color[3];
float fuel_amount; float fuel_amount;
float temp; /* delta temperature (temp - ambient temp) */ /** Delta temperature (temp - ambient temp). */
float volume_density; /* density emitted within mesh volume */ float temp;
float surface_distance; /* maximum emission distance from mesh surface */ /** Density emitted within mesh volume. */
float volume_density;
/** Maximum emission distance from mesh surface. */
float surface_distance;
float particle_size; float particle_size;
int subframes; int subframes;
/* texture control */ /* texture control */
float texture_size; float texture_size;
float texture_offset; float texture_offset;
int pad; int pad;
char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ /** MAX_CUSTOMDATA_LAYER_NAME. */
char uvlayer_name[64];
short vgroup_density; short vgroup_density;
short type; /* smoke, flames, both, outflow */ /** Smoke, flames, both, outflow. */
short type;
short source; short source;
short texture_type; short texture_type;
int flags; /* absolute emission etc*/ /** Absolute emission et.c*/
int flags;
} SmokeFlowSettings; } SmokeFlowSettings;
@@ -298,7 +337,8 @@ typedef struct SmokeFlowSettings {
/* collision objects (filled with smoke) */ /* collision objects (filled with smoke) */
typedef struct SmokeCollSettings { typedef struct SmokeCollSettings {
struct SmokeModifierData *smd; /* for fast RNA access */ /** For fast RNA access. */
struct SmokeModifierData *smd;
struct Mesh *mesh; struct Mesh *mesh;
float *verts_old; float *verts_old;
int numverts; int numverts;

View File

@@ -48,7 +48,8 @@ typedef struct bSound {
/** /**
* The path to the sound file. * The path to the sound file.
*/ */
char name[1024]; /* 1024 = FILE_MAX */ /** 1024 = FILE_MAX. */
char name[1024];
/** /**
* The packed file. * The packed file.
@@ -73,7 +74,8 @@ typedef struct bSound {
float max_gain; float max_gain;
float distance; float distance;
short flags; short flags;
short tags; /* Runtime only, always reset in readfile. */ /** Runtime only, always reset in readfile. */
short tags;
int pad; int pad;
/* unused currently /* unused currently
@@ -96,7 +98,7 @@ typedef struct bSound {
*/ */
void *playback_handle; void *playback_handle;
/* spinlock for asynchronous loading of sounds */ /** Spinlock for asynchronous loading of sounds. */
void *spinlock; void *spinlock;
/* XXX unused currently (SOUND_TYPE_LIMITER) */ /* XXX unused currently (SOUND_TYPE_LIMITER) */
/* float start, end; */ /* float start, end; */
@@ -121,7 +123,8 @@ enum {
/* bSound->flags */ /* bSound->flags */
enum { enum {
#ifdef DNA_DEPRECATED #ifdef DNA_DEPRECATED
SOUND_FLAGS_3D = (1 << 3), /* deprecated! used for sound actuator loading */ /* deprecated! used for sound actuator loading */
SOUND_FLAGS_3D = (1 << 3),
#endif #endif
SOUND_FLAGS_CACHING = (1 << 4), SOUND_FLAGS_CACHING = (1 << 4),
SOUND_FLAGS_MONO = (1 << 5), SOUND_FLAGS_MONO = (1 << 5),
@@ -129,7 +132,8 @@ enum {
/* bSound->tags */ /* bSound->tags */
enum { enum {
SOUND_TAGS_WAVEFORM_NO_RELOAD = 1 << 0, /* Do not free/reset waveform on sound load, only used by undo code. */ /* Do not free/reset waveform on sound load, only used by undo code. */
SOUND_TAGS_WAVEFORM_NO_RELOAD = 1 << 0,
SOUND_TAGS_WAVEFORM_LOADING = (1 << 6), SOUND_TAGS_WAVEFORM_LOADING = (1 << 6),
}; };

View File

@@ -83,7 +83,8 @@ struct BLI_mempool;
*/ */
typedef struct SpaceLink { typedef struct SpaceLink {
struct SpaceLink *next, *prev; struct SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */ /** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype; char spacetype;
char link_flag; char link_flag;
char _pad0[6]; char _pad0[6];
@@ -98,7 +99,8 @@ typedef struct SpaceLink {
/* Info Header */ /* Info Header */
typedef struct SpaceInfo { typedef struct SpaceInfo {
SpaceLink *next, *prev; SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */ /** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype; char spacetype;
char link_flag; char link_flag;
char _pad0[6]; char _pad0[6];
@@ -126,25 +128,31 @@ typedef enum eSpaceInfo_RptMask {
/* Properties Editor */ /* Properties Editor */
typedef struct SpaceButs { typedef struct SpaceButs {
SpaceLink *next, *prev; SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */ /** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype; char spacetype;
char link_flag; char link_flag;
char _pad0[6]; char _pad0[6];
/* End 'SpaceLink' header. */ /* End 'SpaceLink' header. */
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ /** Deprecated, copied to region. */
View2D v2d DNA_DEPRECATED;
/* For different kinds of property editors (exposed in the space type selector). */ /* For different kinds of property editors (exposed in the space type selector). */
short space_subtype; short space_subtype;
short mainb, mainbo, mainbuser; /* context tabs */ /** Context tabs. */
short preview; /* preview is signal to refresh */ short mainb, mainbo, mainbuser;
/** Preview is signal to refresh. */
short preview;
short pad[2]; short pad[2];
char flag; char flag;
char collection_context; char collection_context;
void *path; /* runtime */ /** Runtime. */
int pathflag, dataicon; /* runtime */ void *path;
/** Runtime. */
int pathflag, dataicon;
ID *pinid; ID *pinid;
void *texuser; void *texuser;
@@ -223,13 +231,15 @@ typedef enum eSpaceButtons_Flag {
/* Outliner */ /* Outliner */
typedef struct SpaceOops { typedef struct SpaceOops {
SpaceLink *next, *prev; SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */ /** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype; char spacetype;
char link_flag; char link_flag;
char _pad0[6]; char _pad0[6];
/* End 'SpaceLink' header. */ /* End 'SpaceLink' header. */
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ /** Deprecated, copied to region. */
View2D v2d DNA_DEPRECATED;
ListBase tree; ListBase tree;
@@ -369,23 +379,35 @@ typedef struct SpaceIpo_Runtime {
/* 'Graph' Editor (formerly known as the IPO Editor) */ /* 'Graph' Editor (formerly known as the IPO Editor) */
typedef struct SpaceIpo { typedef struct SpaceIpo {
SpaceLink *next, *prev; SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */ /** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype; char spacetype;
char link_flag; char link_flag;
char _pad0[6]; char _pad0[6];
/* End 'SpaceLink' header. */ /* End 'SpaceLink' header. */
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ /** Deprecated, copied to region. */
View2D v2d DNA_DEPRECATED;
struct bDopeSheet *ads; /* settings for filtering animation data (NOTE: we use a pointer due to code-linking issues) */ /** Settings for filtering animation data (NOTE: we use a pointer due to code-linking issues). */
struct bDopeSheet *ads;
short mode; /* mode for the Graph editor (eGraphEdit_Mode) */ /** Mode for the Graph editor (eGraphEdit_Mode). */
short autosnap; /* time-transform autosnapping settings for Graph editor (eAnimEdit_AutoSnap in DNA_action_types.h) */ short mode;
int flag; /* settings for Graph editor (eGraphEdit_Flag) */ /**
* Time-transform autosnapping settings for Graph editor
* (eAnimEdit_AutoSnap in DNA_action_types.h).
*/
short autosnap;
/** Settings for Graph editor (eGraphEdit_Flag). */
int flag;
float cursorTime; /* time value for cursor (when in drivers mode; animation uses current frame) */ /** Time value for cursor (when in drivers mode; animation uses current frame). */
float cursorVal; /* cursor value (y-value, x-value is current frame) */ float cursorTime;
int around; /* pivot point for transforms */ /** Cursor value (y-value, x-value is current frame). */
float cursorVal;
/** Pivot point for transforms. */
int around;
int pad; int pad;
SpaceIpo_Runtime runtime; SpaceIpo_Runtime runtime;
@@ -451,18 +473,21 @@ typedef enum eGraphEdit_Runtime_Flag {
/* NLA Editor */ /* NLA Editor */
typedef struct SpaceNla { typedef struct SpaceNla {
struct SpaceLink *next, *prev; struct SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */ /** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype; char spacetype;
char link_flag; char link_flag;
char _pad0[6]; char _pad0[6];
/* End 'SpaceLink' header. */ /* End 'SpaceLink' header. */
short autosnap; /* this uses the same settings as autosnap for Action Editor */ /** This uses the same settings as autosnap for Action Editor. */
short autosnap;
short flag; short flag;
int pad; int pad;
struct bDopeSheet *ads; struct bDopeSheet *ads;
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ /** Deprecated, copied to region. */
View2D v2d DNA_DEPRECATED;
} SpaceNla; } SpaceNla;
/* SpaceNla.flag */ /* SpaceNla.flag */
@@ -513,31 +538,42 @@ typedef enum eScreen_Redraws_Flag {
/* Sequencer */ /* Sequencer */
typedef struct SpaceSeq { typedef struct SpaceSeq {
SpaceLink *next, *prev; SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */ /** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype; char spacetype;
char link_flag; char link_flag;
char _pad0[6]; char _pad0[6];
/* End 'SpaceLink' header. */ /* End 'SpaceLink' header. */
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ /** Deprecated, copied to region. */
View2D v2d DNA_DEPRECATED;
float xof DNA_DEPRECATED, yof DNA_DEPRECATED; /* deprecated: offset for drawing the image preview */ /** Deprecated: offset for drawing the image preview. */
short mainb; /* weird name for the sequencer subtype (seq, image, luma... etc) */ float xof DNA_DEPRECATED, yof DNA_DEPRECATED;
short render_size; /* eSpaceSeq_Proxy_RenderSize */ /** Weird name for the sequencer subtype (seq, image, luma... etc). */
short mainb;
/** ESpaceSeq_Proxy_RenderSize. */
short render_size;
short chanshown; short chanshown;
short zebra; short zebra;
int flag; int flag;
float zoom DNA_DEPRECATED; /* deprecated, handled by View2D now */ /** Deprecated, handled by View2D now. */
int view; /* see SEQ_VIEW_* below */ float zoom DNA_DEPRECATED;
/** See SEQ_VIEW_* below. */
int view;
int overlay_type; int overlay_type;
int draw_flag; /* overlay an image of the editing on below the strips */ /** Overlay an image of the editing on below the strips. */
int draw_flag;
int pad; int pad;
struct bGPdata *gpd; /* grease-pencil data */ /** Grease-pencil data. */
struct bGPdata *gpd;
struct SequencerScopes scopes; /* different scoped displayed in space */ /** Different scoped displayed in space. */
struct SequencerScopes scopes;
char multiview_eye; /* multiview current eye - for internal use */ /** Multiview current eye - for internal use. */
char multiview_eye;
char pad2[7]; char pad2[7];
struct GPUFX *compositor; struct GPUFX *compositor;
@@ -619,38 +655,56 @@ typedef enum eSpaceSeq_OverlayType {
/* Config and Input for File Selector */ /* Config and Input for File Selector */
typedef struct FileSelectParams { typedef struct FileSelectParams {
char title[96]; /* title, also used for the text of the execute button */ /** Title, also used for the text of the execute button. */
char dir[1090]; /* directory, FILE_MAX_LIBEXTRA, 1024 + 66, this is for extreme case when 1023 length path char title[96];
* needs to be linked in, where foo.blend/Armature need adding */ /**
* Directory, FILE_MAX_LIBEXTRA, 1024 + 66, this is for extreme case when 1023 length path
* needs to be linked in, where foo.blend/Armature need adding
*/
char dir[1090];
char pad_c1[2]; char pad_c1[2];
char file[256]; /* file */ char file[256];
char renamefile[256]; char renamefile[256];
char renameedit[256]; /* annoying but the first is only used for initialization */ /** Annoying but the first is only used for initialization. */
char renameedit[256];
char filter_glob[256]; /* FILE_MAXFILE */ /* list of filetypes to filter */ /** List of filetypes to filter (FILE_MAXFILE). */
char filter_glob[256];
char filter_search[64]; /* text items' name must match to be shown. */ /** Text items name must match to be shown. */
int filter_id; /* same as filter, but for ID types (aka library groups). */ char filter_search[64];
/** Same as filter, but for ID types (aka library groups). */
int filter_id;
int active_file; /* active file used for keyboard navigation */ /** Active file used for keyboard navigation. */
int highlight_file; /* file under cursor */ int active_file;
/** File under cursor. */
int highlight_file;
int sel_first; int sel_first;
int sel_last; int sel_last;
unsigned short thumbnail_size; unsigned short thumbnail_size;
short pad; short pad;
/* short */ /* short */
short type; /* XXXXX for now store type here, should be moved to the operator */ /** XXXXX for now store type here, should be moved to the operator. */
short flag; /* settings for filter, hiding dots files,... */ short type;
short sort; /* sort order */ /** Settings for filter, hiding dots files. */
short display; /* display mode flag */ short flag;
int filter; /* filter when (flags & FILE_FILTER) is true */ /** Sort order. */
short sort;
/** Display mode flag. */
short display;
/** Filter when (flags & FILE_FILTER) is true. */
int filter;
short recursion_level; /* max number of levels in dirtree to show at once, 0 to disable recursion. */ /** Max number of levels in dirtree to show at once, 0 to disable recursion. */
short recursion_level;
/* XXX --- still unused -- */ /* XXX --- still unused -- */
short f_fp; /* show font preview */ /** Show font preview. */
char fp_str[8]; /* string to use for font preview */ short f_fp;
/** String to use for font preview. */
char fp_str[8];
/* XXX --- end unused -- */ /* XXX --- end unused -- */
} FileSelectParams; } FileSelectParams;
@@ -658,7 +712,8 @@ typedef struct FileSelectParams {
/* File Browser */ /* File Browser */
typedef struct SpaceFile { typedef struct SpaceFile {
SpaceLink *next, *prev; SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */ /** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype; char spacetype;
char link_flag; char link_flag;
char _pad0[6]; char _pad0[6];
@@ -667,12 +722,16 @@ typedef struct SpaceFile {
char _pad1[4]; char _pad1[4];
int scroll_offset; int scroll_offset;
struct FileSelectParams *params; /* config and input for file select */ /** Config and input for file select. */
struct FileSelectParams *params;
struct FileList *files; /* holds the list of files to show */ /** Holds the list of files to show. */
struct FileList *files;
ListBase *folders_prev; /* holds the list of previous directories to show */ /** Holds the list of previous directories to show. */
ListBase *folders_next; /* holds the list of next directories (pushed from previous) to show */ ListBase *folders_prev;
/** Holds the list of next directories (pushed from previous) to show. */
ListBase *folders_next;
/* operator that is invoking fileselect /* operator that is invoking fileselect
* op->exec() will be called on the 'Load' button. * op->exec() will be called on the 'Load' button.
@@ -846,12 +905,15 @@ typedef struct FileDirEntry {
/* Either point to active variant/revision if available, or own entry (in mere filebrowser case). */ /* Either point to active variant/revision if available, or own entry (in mere filebrowser case). */
FileDirEntryRevision *entry; FileDirEntryRevision *entry;
int typeflag; /* eFileSel_File_Types */ /** EFileSel_File_Types. */
int blentype; /* ID type, in case typeflag has FILE_TYPE_BLENDERLIB set. */ int typeflag;
/** ID type, in case typeflag has FILE_TYPE_BLENDERLIB set. */
int blentype;
char *relpath; char *relpath;
void *poin; /* TODO: make this a real ID pointer? */ /** TODO: make this a real ID pointer? */
void *poin;
struct ImBuf *image; struct ImBuf *image;
/* Tags are for info only, most of filtering is done in asset engine. */ /* Tags are for info only, most of filtering is done in asset engine. */
@@ -879,7 +941,8 @@ typedef struct FileDirEntryArr {
int nbr_entries_filtered; int nbr_entries_filtered;
int entry_idx_start, entry_idx_end; int entry_idx_start, entry_idx_end;
char root[1024]; /* FILE_MAX */ /** FILE_MAX. */
char root[1024];
} FileDirEntryArr; } FileDirEntryArr;
/* FileDirEntry.status */ /* FileDirEntry.status */
@@ -902,7 +965,8 @@ enum {
/* Image/UV Editor */ /* Image/UV Editor */
typedef struct SpaceImage { typedef struct SpaceImage {
SpaceLink *next, *prev; SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */ /** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype; char spacetype;
char link_flag; char link_flag;
char _pad0[6]; char _pad0[6];
@@ -911,26 +975,40 @@ typedef struct SpaceImage {
struct Image *image; struct Image *image;
struct ImageUser iuser; struct ImageUser iuser;
struct Scopes scopes; /* histogram waveform and vectorscope */ /** Histogram waveform and vectorscope. */
struct Histogram sample_line_hist; /* sample line histogram */ struct Scopes scopes;
/** Sample line histogram. */
struct Histogram sample_line_hist;
struct bGPdata *gpd; /* grease pencil data */ /** Grease pencil data. */
struct bGPdata *gpd;
float cursor[2]; /* UV editor 2d cursor */ /** UV editor 2d cursor. */
float xof, yof; /* user defined offset, image is centered */ float cursor[2];
float zoom; /* user defined zoom level */ /** User defined offset, image is centered. */
float centx, centy; /* storage for offset while render drawing */ float xof, yof;
/** User defined zoom level. */
float zoom;
/** Storage for offset while render drawing. */
float centx, centy;
char mode; /* view/paint/mask */ /** View/paint/mask. */
char mode;
/* Storage for sub-space types. */ /* Storage for sub-space types. */
char mode_prev; char mode_prev;
char pin; char pin;
char _pad; char _pad;
short curtile; /* the currently active tile of the image when tile is enabled, is kept in sync with the active faces tile */ /**
* The currently active tile of the image when tile is enabled,
* is kept in sync with the active faces tile.
*/
short curtile;
short lock; short lock;
char dt_uv; /* UV draw type */ /** UV draw type. */
char sticky; /* sticky selection type */ char dt_uv;
/** Sticky selection type. */
char sticky;
char dt_uvstretch; char dt_uvstretch;
char around; char around;
@@ -1034,7 +1112,8 @@ typedef enum eSpaceImage_OtherUVFilter {
/* Text Editor */ /* Text Editor */
typedef struct SpaceText { typedef struct SpaceText {
SpaceLink *next, *prev; SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */ /** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype; char spacetype;
char link_flag; char link_flag;
char _pad0[6]; char _pad0[6];
@@ -1045,8 +1124,13 @@ typedef struct SpaceText {
int top, viewlines; int top, viewlines;
short flags, menunr; short flags, menunr;
short lheight; /* user preference, is font_size! */ /** User preference, is font_size! */
char cwidth, linenrs_tot; /* runtime computed, character width and the number of chars to use when showing line numbers */ short lheight;
/**
* Runtime computed, character width
* and the number of chars to use when showing line numbers.
*/
char cwidth, linenrs_tot;
int left; int left;
int showlinenrs; int showlinenrs;
int tabnumber; int tabnumber;
@@ -1054,23 +1138,30 @@ typedef struct SpaceText {
short showsyntax; short showsyntax;
short line_hlight; short line_hlight;
short overwrite; short overwrite;
short live_edit; /* run python while editing, evil */ /** Run python while editing, evil. */
short live_edit;
float pix_per_line; float pix_per_line;
struct rcti txtscroll, txtbar; struct rcti txtscroll, txtbar;
int wordwrap, doplugins; int wordwrap, doplugins;
char findstr[256]; /* ST_MAX_FIND_STR */ /** ST_MAX_FIND_STR. */
char replacestr[256]; /* ST_MAX_FIND_STR */ char findstr[256];
/** ST_MAX_FIND_STR. */
char replacestr[256];
short margin_column; /* column number to show right margin at */ /** Column number to show right margin at. */
short lheight_dpi; /* actual lineheight, dpi controlled */ short margin_column;
/** Actual lineheight, dpi controlled. */
short lheight_dpi;
char pad[4]; char pad[4];
void *drawcache; /* cache for faster drawing */ /** Cache for faster drawing. */
void *drawcache;
float scroll_accum[2]; /* runtime, for scroll increments smaller than a line */ /** Runtime, for scroll increments smaller than a line. */
float scroll_accum[2];
} SpaceText; } SpaceText;
@@ -1109,16 +1200,22 @@ typedef struct Script {
void *py_globaldict; void *py_globaldict;
int flags, lastspace; int flags, lastspace;
/* store the script file here so we can re-run it on loading blender, if "Enable Scripts" is on */ /**
char scriptname[1024]; /* 1024 = FILE_MAX */ * Store the script file here so we can re-run it on loading blender,
char scriptarg[256]; /* 1024 = FILE_MAX */ * if "Enable Scripts" is on
*/
/** 1024 = FILE_MAX. */
char scriptname[1024];
/** 1024 = FILE_MAX. */
char scriptarg[256];
} Script; } 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_SET_NULL(_script) _script->py_draw = _script->py_event = _script->py_button = _script->py_browsercallback = _script->py_globaldict = NULL; _script->flags = 0
/* Script View - Obsolete (pre 2.5) */ /* Script View - Obsolete (pre 2.5) */
typedef struct SpaceScript { typedef struct SpaceScript {
SpaceLink *next, *prev; SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */ /** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype; char spacetype;
char link_flag; char link_flag;
char _pad0[6]; char _pad0[6];
@@ -1142,30 +1239,41 @@ typedef struct bNodeTreePath {
struct bNodeTreePath *next, *prev; struct bNodeTreePath *next, *prev;
struct bNodeTree *nodetree; struct bNodeTree *nodetree;
bNodeInstanceKey parent_key; /* base key for nodes in this tree instance */ /** Base key for nodes in this tree instance. */
bNodeInstanceKey parent_key;
int pad; int pad;
float view_center[2]; /* v2d center point, so node trees can have different offsets in editors */ /** V2d center point, so node trees can have different offsets in editors. */
float view_center[2];
char node_name[64]; /* MAX_NAME */ /** MAX_NAME. */
char node_name[64];
} bNodeTreePath; } bNodeTreePath;
typedef struct SpaceNode { typedef struct SpaceNode {
SpaceLink *next, *prev; SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */ /** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype; char spacetype;
char link_flag; char link_flag;
char _pad0[6]; char _pad0[6];
/* End 'SpaceLink' header. */ /* End 'SpaceLink' header. */
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ /** Deprecated, copied to region. */
View2D v2d DNA_DEPRECATED;
struct ID *id, *from; /* context, no need to save in file? well... pinning... */ /** Context, no need to save in file? well... pinning... */
short flag, pad1; /* menunr: browse id block in header */ struct ID *id, *from;
float aspect, pad2; /* internal state variables */ /** Menunr: browse id block in header. */
short flag, pad1;
/** Internal state variables. */
float aspect, pad2;
float xof, yof; /* offset for drawing the backdrop */ /** Offset for drawing the backdrop. */
float zoom; /* zoom for backdrop */ float xof, yof;
float cursor[2]; /* mouse pos for drawing socketless link and adding nodes */ /** Zoom for backdrop. */
float zoom;
/** Mouse pos for drawing socketless link and adding nodes. */
float cursor[2];
/* XXX nodetree pointer info is all in the path stack now, /* XXX nodetree pointer info is all in the path stack now,
* remove later on and use bNodeTreePath instead. For now these variables are set when pushing/popping * remove later on and use bNodeTreePath instead. For now these variables are set when pushing/popping
@@ -1178,21 +1286,29 @@ typedef struct SpaceNode {
/* tree type for the current node tree */ /* tree type for the current node tree */
char tree_idname[64]; char tree_idname[64];
int treetype DNA_DEPRECATED; /* treetype: as same nodetree->type */ /** Treetype: as same nodetree->type. */
int treetype DNA_DEPRECATED;
int pad3; int pad3;
short texfrom; /* texfrom object, world or brush */ /** Texfrom object, world or brush. */
short shaderfrom; /* shader from object or world */ short texfrom;
short recalc; /* currently on 0/1, for auto compo */ /** Shader from object or world. */
short shaderfrom;
/** Currently on 0/1, for auto compo. */
short recalc;
char insert_ofs_dir; /* direction for offsetting nodes on insertion */ /** Direction for offsetting nodes on insertion. */
char insert_ofs_dir;
char pad4; char pad4;
ListBase linkdrag; /* temporary data for modal linking operator */ /** Temporary data for modal linking operator. */
ListBase linkdrag;
/* XXX hack for translate_attach op-macros to pass data from transform op to insert_offset op */ /* XXX hack for translate_attach op-macros to pass data from transform op to insert_offset op */
struct NodeInsertOfsData *iofsd; /* temporary data for node insert offset (in UI called Auto-offset) */ /** Temporary data for node insert offset (in UI called Auto-offset). */
struct NodeInsertOfsData *iofsd;
struct bGPdata *gpd; /* grease-pencil data */ /** Grease-pencil data. */
struct bGPdata *gpd;
} SpaceNode; } SpaceNode;
/* SpaceNode.flag */ /* SpaceNode.flag */
@@ -1244,12 +1360,15 @@ typedef struct ConsoleLine {
struct ConsoleLine *next, *prev; struct ConsoleLine *next, *prev;
/* keep these 3 vars so as to share free, realloc funcs */ /* keep these 3 vars so as to share free, realloc funcs */
int len_alloc; /* allocated length */ /** Allocated length. */
int len; /* real len - strlen() */ int len_alloc;
/** Real len - strlen(). */
int len;
char *line; char *line;
int cursor; int cursor;
int type; /* only for use when in the 'scrollback' listbase */ /** Only for use when in the 'scrollback' listbase. */
int type;
} ConsoleLine; } ConsoleLine;
/* ConsoleLine.type */ /* ConsoleLine.type */
@@ -1264,7 +1383,8 @@ typedef enum eConsoleLine_Type {
/* Console View */ /* Console View */
typedef struct SpaceConsole { typedef struct SpaceConsole {
SpaceLink *next, *prev; SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */ /** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype; char spacetype;
char link_flag; char link_flag;
char _pad0[6]; char _pad0[6];
@@ -1273,10 +1393,13 @@ typedef struct SpaceConsole {
/* space vars */ /* space vars */
int lheight, pad; int lheight, pad;
ListBase scrollback; /* ConsoleLine; output */ /** ConsoleLine; output. */
ListBase history; /* ConsoleLine; command history, current edited line is the first */ ListBase scrollback;
/** ConsoleLine; command history, current edited line is the first. */
ListBase history;
char prompt[256]; char prompt[256];
char language[32]; /* multiple consoles are possible, not just python */ /** Multiple consoles are possible, not just python. */
char language[32];
int sel_start; int sel_start;
int sel_end; int sel_end;
@@ -1290,7 +1413,8 @@ typedef struct SpaceConsole {
typedef struct SpaceUserPref { typedef struct SpaceUserPref {
SpaceLink *next, *prev; SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */ /** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype; char spacetype;
char link_flag; char link_flag;
char _pad0[6]; char _pad0[6];
@@ -1298,7 +1422,8 @@ typedef struct SpaceUserPref {
char _pad1[7]; char _pad1[7];
char filter_type; char filter_type;
char filter[64]; /* search term for filtering in the UI */ /** Search term for filtering in the UI. */
char filter[64];
} SpaceUserPref; } SpaceUserPref;
/** \} */ /** \} */
@@ -1310,7 +1435,8 @@ typedef struct SpaceUserPref {
/* Clip Editor */ /* Clip Editor */
typedef struct SpaceClip { typedef struct SpaceClip {
SpaceLink *next, *prev; SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */ /** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype; char spacetype;
char link_flag; char link_flag;
char _pad0[6]; char _pad0[6];
@@ -1318,25 +1444,39 @@ typedef struct SpaceClip {
char _pad1[4]; char _pad1[4];
float xof, yof; /* user defined offset, image is centered */ /** User defined offset, image is centered. */
float xlockof, ylockof; /* user defined offset from locked position */ float xof, yof;
float zoom; /* user defined zoom level */ /** User defined offset from locked position. */
float xlockof, ylockof;
/** User defined zoom level. */
float zoom;
struct MovieClipUser user; /* user of clip */ /** User of clip. */
struct MovieClip *clip; /* clip data */ struct MovieClipUser user;
struct MovieClipScopes scopes; /* different scoped displayed in space panels */ /** Clip data. */
struct MovieClip *clip;
/** Different scoped displayed in space panels. */
struct MovieClipScopes scopes;
int flag; /* flags */ /** Flags. */
short mode; /* editor mode (editing context being displayed) */ int flag;
short view; /* type of the clip editor view */ /** Editor mode (editing context being displayed). */
short mode;
/** Type of the clip editor view. */
short view;
int path_length; /* length of displaying path, in frames */ /** Length of displaying path, in frames. */
int path_length;
/* current stabilization data */ /* current stabilization data */
float loc[2], scale, angle; /* pre-composed stabilization data */ /** Pre-composed stabilization data. */
float loc[2], scale, angle;
int pad; int pad;
float stabmat[4][4], unistabmat[4][4]; /* current stabilization matrix and the same matrix in unified space, /**
* defined when drawing and used for mouse position calculation */ * Current stabilization matrix and the same matrix in unified space,
* defined when drawing and used for mouse position calculation.
*/
float stabmat[4][4], unistabmat[4][4];
/* movie postprocessing */ /* movie postprocessing */
int postproc_flag; int postproc_flag;
@@ -1344,9 +1484,11 @@ typedef struct SpaceClip {
/* grease pencil */ /* grease pencil */
short gpencil_src, pad2; short gpencil_src, pad2;
int around, pad4; /* pivot point for transforms */ /** Pivot point for transforms. */
int around, pad4;
float cursor[2]; /* Mask editor 2d cursor */ /** Mask editor 2d cursor. */
float cursor[2];
MaskSpaceInfo mask_info; MaskSpaceInfo mask_info;
} SpaceClip; } SpaceClip;
@@ -1412,7 +1554,8 @@ typedef enum eSpaceClip_GPencil_Source {
# #
typedef struct SpaceTopBar { typedef struct SpaceTopBar {
SpaceLink *next, *prev; SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */ /** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype; char spacetype;
char link_flag; char link_flag;
char _pad0[6]; char _pad0[6];
@@ -1431,7 +1574,8 @@ typedef struct SpaceTopBar {
# #
typedef struct SpaceStatusBar { typedef struct SpaceStatusBar {
SpaceLink *next, *prev; SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */ /** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype; char spacetype;
char link_flag; char link_flag;
char _pad0[6]; char _pad0[6];

View File

@@ -34,11 +34,12 @@ struct bSound;
typedef struct Speaker { typedef struct Speaker {
ID id; ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ /** Animation data (must be immediately after id for utilities to use it). */
struct AnimData *adt;
struct bSound *sound; struct bSound *sound;
// not animatable properties /* not animatable properties */
float volume_max; float volume_max;
float volume_min; float volume_min;
float distance_max; float distance_max;
@@ -48,13 +49,13 @@ typedef struct Speaker {
float cone_angle_inner; float cone_angle_inner;
float cone_volume_outer; float cone_volume_outer;
// animatable properties /* animatable properties */
float volume; float volume;
float pitch; float pitch;
// flag /* flag */
short flag; short flag;
short pad1[3]; char _pad1[6];
} Speaker; } Speaker;
/* **************** SPEAKER ********************* */ /* **************** SPEAKER ********************* */

View File

@@ -43,8 +43,10 @@ typedef struct TextLine {
struct TextLine *next, *prev; struct TextLine *next, *prev;
char *line; char *line;
char *format; /* may be NULL if syntax is off or not yet formatted */ /** May be NULL if syntax is off or not yet formatted. */
int len, blen; /* blen unused */ char *format;
/** Blen unused. */
int len, blen;
} TextLine; } TextLine;
typedef struct Text { typedef struct Text {

View File

@@ -57,7 +57,8 @@ typedef struct MTex {
short texco, mapto, maptoneg, blendtype; short texco, mapto, maptoneg, blendtype;
struct Object *object; struct Object *object;
struct Tex *tex; struct Tex *tex;
char uvname[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ /** MAX_CUSTOMDATA_LAYER_NAME. */
char uvname[64];
char projx, projy, projz, mapping; char projx, projy, projz, mapping;
char brush_map_mode, brush_angle_mode; char brush_map_mode, brush_angle_mode;
@@ -128,19 +129,27 @@ typedef struct PointDensity {
short source; short source;
short pad0; short pad0;
short color_source; /* psys_color_source */ /** psys_color_source */
short color_source;
short ob_color_source; short ob_color_source;
int totpoints; int totpoints;
struct Object *object; /* for 'Object' or 'Particle system' type - source object */ /** for 'Object' or 'Particle system' type - source object */
int psys; /* index+1 in ob.particlesystem, non-ID pointer not allowed */ struct Object *object;
short psys_cache_space; /* cache points in worldspace, object space, ... ? */ /** index+1 in ob.particlesystem, non-ID pointer not allowed */
short ob_cache_space; /* cache points in worldspace, object space, ... ? */ int psys;
char vertex_attribute_name[64]; /* vertex attribute layer for color source, MAX_CUSTOMDATA_LAYER_NAME */ /** cache points in worldspace, object space, ... ? */
short psys_cache_space;
/** cache points in worldspace, object space, ... ? */
short ob_cache_space;
/** vertex attribute layer for color source, MAX_CUSTOMDATA_LAYER_NAME */
char vertex_attribute_name[64];
void *point_tree; /* the acceleration tree containing points */ /** The acceleration tree containing points. */
float *point_data; /* dynamically allocated extra for extra information, like particle age */ void *point_tree;
/** Dynamically allocated extra for extra information, like particle age. */
float *point_data;
float noise_size; float noise_size;
short noise_depth; short noise_depth;
@@ -150,14 +159,17 @@ typedef struct PointDensity {
float noise_fac; float noise_fac;
float speed_scale, falloff_speed_scale, pad2; float speed_scale, falloff_speed_scale, pad2;
struct ColorBand *coba; /* for time -> color */ /** For time -> color */
struct ColorBand *coba;
struct CurveMapping *falloff_curve; /* falloff density curve */ /** Falloff density curve. */
struct CurveMapping *falloff_curve;
} PointDensity; } PointDensity;
typedef struct Tex { typedef struct Tex {
ID id; ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ /** Animation data (must be immediately after id for utilities to use it). */
struct AnimData *adt;
float noisesize, turbul; float noisesize, turbul;
float bright, contrast, saturation, rfac, gfac, bfac; float bright, contrast, saturation, rfac, gfac, bfac;
@@ -177,7 +189,8 @@ typedef struct Tex {
float vn_mexp; float vn_mexp;
short vn_distm, vn_coltype; short vn_distm, vn_coltype;
short noisedepth, noisetype; /* noisedepth MUST be <= 30 else we get floating point exceptions */ /* noisedepth MUST be <= 30 else we get floating point exceptions */
short noisedepth, noisetype;
/* newnoise: noisebasis type for clouds/marble/etc, noisebasis2 only used for distorted noise */ /* newnoise: noisebasis type for clouds/marble/etc, noisebasis2 only used for distorted noise */
short noisebasis, noisebasis2; short noisebasis, noisebasis2;
@@ -202,7 +215,8 @@ typedef struct Tex {
struct ImageUser iuser; struct ImageUser iuser;
struct bNodeTree *nodetree; struct bNodeTree *nodetree;
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ /* old animation system, deprecated for 2.5 */
struct Ipo *ipo DNA_DEPRECATED;
struct Image *ima; struct Image *ima;
struct ColorBand *coba; struct ColorBand *coba;
struct PreviewImage *preview; struct PreviewImage *preview;

View File

@@ -57,27 +57,35 @@ typedef struct MovieReconstructedCamera {
} MovieReconstructedCamera; } MovieReconstructedCamera;
typedef struct MovieTrackingCamera { typedef struct MovieTrackingCamera {
void *intrinsics; /* intrinsics handle */ /** Intrinsics handle. */
void *intrinsics;
short distortion_model; short distortion_model;
short pad; short pad;
float sensor_width; /* width of CCD sensor */ /** Width of CCD sensor. */
float pixel_aspect; /* pixel aspect ratio */ float sensor_width;
float focal; /* focal length */ /** Pixel aspect ratio. */
short units; /* units of focal length user is working with */ float pixel_aspect;
/** Focal length. */
float focal;
/** Units of focal length user is working with. */
short units;
short pad1; short pad1;
float principal[2]; /* principal point */ /** Principal point. */
float principal[2];
/* Polynomial distortion */ /* Polynomial distortion */
float k1, k2, k3; /* polynomial radial distortion */ /** Polynomial radial distortion. */
float k1, k2, k3;
/* Division distortion model coefficients */ /* Division distortion model coefficients */
float division_k1, division_k2; float division_k1, division_k2;
} MovieTrackingCamera; } MovieTrackingCamera;
typedef struct MovieTrackingMarker { typedef struct MovieTrackingMarker {
float pos[2]; /* 2d position of marker on frame (in unified 0..1 space) */ /** 2d position of marker on frame (in unified 0..1 space). */
float pos[2];
/* corners of pattern in the following order: /* corners of pattern in the following order:
* *
@@ -99,14 +107,17 @@ typedef struct MovieTrackingMarker {
*/ */
float search_min[2], search_max[2]; float search_min[2], search_max[2];
int framenr; /* number of frame marker is associated with */ /** Number of frame marker is associated with. */
int flag; /* Marker's flag (alive, ...) */ int framenr;
/** Marker's flag (alive, ...). */
int flag;
} MovieTrackingMarker; } MovieTrackingMarker;
typedef struct MovieTrackingTrack { typedef struct MovieTrackingTrack {
struct MovieTrackingTrack *next, *prev; struct MovieTrackingTrack *next, *prev;
char name[64]; /* MAX_NAME */ /** MAX_NAME. */
char name[64];
/* ** settings ** */ /* ** settings ** */
@@ -122,32 +133,50 @@ typedef struct MovieTrackingTrack {
*/ */
float search_min[2] DNA_DEPRECATED, search_max[2] DNA_DEPRECATED; float search_min[2] DNA_DEPRECATED, search_max[2] DNA_DEPRECATED;
float offset[2]; /* offset to "parenting" point */ /** Offset to "parenting" point. */
float offset[2];
/* ** track ** */ /* ** track ** */
int markersnr; /* count of markers in track */ /** Count of markers in track. */
int last_marker; /* most recently used marker */ int markersnr;
MovieTrackingMarker *markers; /* markers in track */ /** Most recently used marker. */
int last_marker;
/** Markers in track. */
MovieTrackingMarker *markers;
/* ** reconstruction data ** */ /* ** reconstruction data ** */
float bundle_pos[3]; /* reconstructed position */ /** Reconstructed position. */
float error; /* average track reprojection error */ float bundle_pos[3];
/** Average track reprojection error. */
float error;
/* ** UI editing ** */ /* ** UI editing ** */
int flag, pat_flag, search_flag; /* flags (selection, ...) */ /** Flags (selection, ...). */
float color[3]; /* custom color for track */ int flag, pat_flag, search_flag;
/** Custom color for track. */
float color[3];
/* ** control how tracking happens */ /* ** 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 */ * Number of frames to be tarcked during single tracking session
short pattern_match; /* re-adjust every N frames */ * (if TRACKING_FRAMES_LIMIT is set).
*/
short frames_limit;
/** Margin from frame boundaries. */
short margin;
/** Re-adjust every N frames. */
short pattern_match;
/* tracking parameters */ /* tracking parameters */
short motion_model; /* model of the motion for this track */ /** Model of the motion for this track. */
int algorithm_flag; /* flags for the tracking algorithm (use brute, use esm, use pyramid, etc */ short motion_model;
float minimum_correlation; /* minimal correlation which is still treated as successful tracking */ /** Flags for the tracking algorithm (use brute, use esm, use pyramid, etc. */
int algorithm_flag;
/** Minimal correlation which is still treated as successful tracking. */
float minimum_correlation;
struct bGPdata *gpd; /* grease-pencil data */ /** Grease-pencil data. */
struct bGPdata *gpd;
/* Weight of this track. /* Weight of this track.
* *
@@ -180,56 +209,82 @@ typedef struct MovieTrackingPlaneMarker {
*/ */
float corners[4][2]; float corners[4][2];
int framenr; /* Number of frame plane marker is associated with */ /** Number of frame plane marker is associated with. */
int flag; /* Marker's flag (alive, ...) */ int framenr;
/** Marker's flag (alive, ...). */
int flag;
} MovieTrackingPlaneMarker; } MovieTrackingPlaneMarker;
typedef struct MovieTrackingPlaneTrack { typedef struct MovieTrackingPlaneTrack {
struct MovieTrackingPlaneTrack *next, *prev; struct MovieTrackingPlaneTrack *next, *prev;
char name[64]; /* MAX_NAME */ /** MAX_NAME. */
char name[64];
MovieTrackingTrack **point_tracks; /* Array of point tracks used to define this plane. /**
* Each element is a pointer to MovieTrackingTrack. */ * Array of point tracks used to define this pla.ne.
int point_tracksnr, pad; /* Number of tracks in point_tracks array. */ * Each element is a pointer to MovieTrackingTrack.
*/
MovieTrackingTrack **point_tracks;
/** Number of tracks in point_tracks array. */
int point_tracksnr, pad;
MovieTrackingPlaneMarker *markers; /* Markers in the plane track */ /** Markers in the plane track. */
int markersnr; /* Count of markers in track (size of markers array) */ MovieTrackingPlaneMarker *markers;
/** Count of markers in track (size of markers array). */
int markersnr;
int flag; /* flags (selection, ...) */ /** Flags (selection, ...). */
int flag;
struct Image *image; /* Image displaying during editing */ /** Image displaying during editing. */
float image_opacity; /* Opacity of the image */ struct Image *image;
/** Opacity of the image. */
float image_opacity;
/* Runtime data */ /* Runtime data */
int last_marker; /* Most recently used marker */ /** Most recently used marker. */
int last_marker;
} MovieTrackingPlaneTrack; } MovieTrackingPlaneTrack;
typedef struct MovieTrackingSettings { typedef struct MovieTrackingSettings {
int flag; int flag;
/* ** default tracker settings */ /* ** default tracker settings */
short default_motion_model; /* model of the motion for this track */ /** Model of the motion for this track. */
short default_algorithm_flag; /* flags for the tracking algorithm (use brute, use esm, use pyramid, etc */ short default_motion_model;
float default_minimum_correlation; /* minimal correlation which is still treated as successful tracking */ /** Flags for the tracking algorithm (use brute, use esm, use pyramid, etc. */
short default_pattern_size; /* size of pattern area for new tracks */ short default_algorithm_flag;
short default_search_size; /* size of search area for new tracks */ /** Minimal correlation which is still treated as successful tracking. */
short default_frames_limit; /* number of frames to be tarcked during single tracking session (if TRACKING_FRAMES_LIMIT is set) */ float default_minimum_correlation;
short default_margin; /* margin from frame boundaries */ /** Size of pattern area for new tracks. */
short default_pattern_match; /* re-adjust every N frames */ short default_pattern_size;
short default_flag; /* default flags like color channels used by default */ /** Size of search area for new tracks. */
float default_weight; /* default weight of the track */ short default_search_size;
/** Number of frames to be tarcked during single tracking session (if TRACKING_FRAMES_LIMIT is set). */
short default_frames_limit;
/** Margin from frame boundaries. */
short default_margin;
/** Re-adjust every N frames. */
short default_pattern_match;
/** Default flags like color channels used by default. */
short default_flag;
/** Default weight of the track. */
float default_weight;
short motion_flag; /* flags describes motion type */ /** Flags describes motion type. */
short motion_flag;
/* ** common tracker settings ** */ /* ** common tracker settings ** */
short speed; /* speed of tracking */ /** Speed of tracking. */
short speed;
/* ** reconstruction settings ** */ /* ** reconstruction settings ** */
int keyframe1 DNA_DEPRECATED, /* two keyframes for reconstruction initialization
keyframe2 DNA_DEPRECATED; /* two keyframes for reconstruction initialization
* were moved to per-tracking object settings * were moved to per-tracking object settings
*/ */
int keyframe1 DNA_DEPRECATED,
keyframe2 DNA_DEPRECATED;
int reconstruction_flag; int reconstruction_flag;
@@ -239,63 +294,86 @@ typedef struct MovieTrackingSettings {
/* ** tool settings ** */ /* ** tool settings ** */
/* set scale */ /* set scale */
float dist; /* distance between two bundles used for scene scaling */ /** Distance between two bundles used for scene scaling. */
float dist;
/* cleanup */ /* cleanup */
int clean_frames, clean_action; int clean_frames, clean_action;
float clean_error; float clean_error;
/* set object scale */ /* set object scale */
float object_distance; /* distance between two bundles used for object scaling */ /** Distance between two bundles used for object scaling. */
float object_distance;
int pad3; int pad3;
} MovieTrackingSettings; } MovieTrackingSettings;
typedef struct MovieTrackingStabilization { typedef struct MovieTrackingStabilization {
int flag; int flag;
int tot_track, act_track; /* total number of translation tracks and index of active track in list */ /** Total number of translation tracks and index of active track in list. */
int tot_rot_track, act_rot_track; /* total number of rotation tracks and index of active track in list */ int tot_track, act_track;
/** Total number of rotation tracks and index of active track in list. */
int tot_rot_track, act_rot_track;
/* 2d stabilization */ /* 2d stabilization */
float maxscale; /* max auto-scale factor */ /** Max auto-scale factor. */
MovieTrackingTrack *rot_track DNA_DEPRECATED; /* use TRACK_USE_2D_STAB_ROT on individual tracks instead */ float maxscale;
/** Use TRACK_USE_2D_STAB_ROT on individual tracks instead. */
MovieTrackingTrack *rot_track DNA_DEPRECATED;
int anchor_frame; /* reference point to anchor stabilization offset */ /** Reference point to anchor stabilization offset. */
float target_pos[2]; /* expected target position of frame after raw stabilization, will be subtracted */ int anchor_frame;
float target_rot; /* expected target rotation of frame after raw stabilization, will be compensated */ /** Expected target position of frame after raw stabilization, will be subtracted. */
float scale; /* zoom factor known to be present on original footage. Also used for autoscale */ float target_pos[2];
/** Expected target rotation of frame after raw stabilization, will be compensated. */
float target_rot;
/** Zoom factor known to be present on original footage. Also used for autoscale. */
float scale;
float locinf, scaleinf, rotinf; /* influence on location, scale and rotation */ /** Influence on location, scale and rotation. */
float locinf, scaleinf, rotinf;
int filter; /* filter used for pixel interpolation */ /** Filter used for pixel interpolation. */
int filter;
/* initialization and run-time data */ /* initialization and run-time data */
int ok DNA_DEPRECATED; /* Without effect now, we initialize on every frame. Formerly used for caching of init values */ /** Without effect now, we initialize on every frame. Formerly used for caching of init values. */
int ok DNA_DEPRECATED;
} MovieTrackingStabilization; } MovieTrackingStabilization;
typedef struct MovieTrackingReconstruction { typedef struct MovieTrackingReconstruction {
int flag; int flag;
float error; /* average error of reconstruction */ /** Average error of reconstruction. */
float error;
int last_camera; /* most recently used camera */ /** Most recently used camera. */
int camnr; /* number of reconstructed cameras */ int last_camera;
struct MovieReconstructedCamera *cameras; /* reconstructed cameras */ /** Number of reconstructed cameras. */
int camnr;
/** Reconstructed cameras. */
struct MovieReconstructedCamera *cameras;
} MovieTrackingReconstruction; } MovieTrackingReconstruction;
typedef struct MovieTrackingObject { typedef struct MovieTrackingObject {
struct MovieTrackingObject *next, *prev; struct MovieTrackingObject *next, *prev;
char name[64]; /* Name of tracking object, MAX_NAME */ /** Name of tracking object, MAX_NAME. */
char name[64];
int flag; int flag;
float scale; /* scale of object solution in amera space */ /** Scale of object solution in amera space. */
float scale;
ListBase tracks; /* list of tracks use to tracking this object */ /** List of tracks use to tracking this object. */
ListBase plane_tracks; /* list of plane tracks used by this object */ ListBase tracks;
MovieTrackingReconstruction reconstruction; /* reconstruction data for this object */ /** List of plane tracks used by this object. */
ListBase plane_tracks;
/** Reconstruction data for this object. */
MovieTrackingReconstruction reconstruction;
/* reconstruction options */ /* reconstruction options */
int keyframe1, keyframe2; /* two keyframes for reconstruction initialization */ /** Two keyframes for reconstruction initialization. */
int keyframe1, keyframe2;
} MovieTrackingObject; } MovieTrackingObject;
typedef struct MovieTrackingStats { typedef struct MovieTrackingStats {
@@ -305,14 +383,19 @@ typedef struct MovieTrackingStats {
typedef struct MovieTrackingDopesheetChannel { typedef struct MovieTrackingDopesheetChannel {
struct MovieTrackingDopesheetChannel *next, *prev; struct MovieTrackingDopesheetChannel *next, *prev;
MovieTrackingTrack *track; /* motion track for which channel is created */ /** Motion track for which channel is created. */
MovieTrackingTrack *track;
int pad; int pad;
char name[64]; /* name of channel */ /** Name of channel. */
char name[64];
int tot_segment; /* total number of segments */ /** Total number of segments. */
int *segments; /* tracked segments */ int tot_segment;
int max_segment, total_frames; /* longest segment length and total number of tracked frames */ /** Tracked segments. */
int *segments;
/** Longest segment length and total number of tracked frames. */
int max_segment, total_frames;
} MovieTrackingDopesheetChannel; } MovieTrackingDopesheetChannel;
typedef struct MovieTrackingDopesheetCoverageSegment { typedef struct MovieTrackingDopesheetCoverageSegment {
@@ -326,10 +409,13 @@ typedef struct MovieTrackingDopesheetCoverageSegment {
} MovieTrackingDopesheetCoverageSegment; } MovieTrackingDopesheetCoverageSegment;
typedef struct MovieTrackingDopesheet { typedef struct MovieTrackingDopesheet {
int ok; /* flag if dopesheet information is still relevant */ /** Flag if dopesheet information is still relevant. */
int ok;
short sort_method; /* method to be used to sort tracks */ /** Method to be used to sort tracks. */
short flag; /* dopesheet building flag such as inverted order of sort */ short sort_method;
/** Dopesheet building flag such as inverted order of sort. */
short flag;
/* ** runtime stuff ** */ /* ** runtime stuff ** */
@@ -344,21 +430,32 @@ typedef struct MovieTrackingDopesheet {
} MovieTrackingDopesheet; } MovieTrackingDopesheet;
typedef struct MovieTracking { typedef struct MovieTracking {
MovieTrackingSettings settings; /* different tracking-related settings */ /** Different tracking-related settings. */
MovieTrackingCamera camera; /* camera intrinsics */ MovieTrackingSettings settings;
ListBase tracks; /* list of tracks used for camera object */ /** Camera intrinsics. */
ListBase plane_tracks; /* list of plane tracks used by camera object */ MovieTrackingCamera camera;
MovieTrackingReconstruction reconstruction; /* reconstruction data for camera object */ /** List of tracks used for camera object. */
MovieTrackingStabilization stabilization; /* stabilization data */ ListBase tracks;
MovieTrackingTrack *act_track; /* active track */ /** List of plane tracks used by camera object. */
MovieTrackingPlaneTrack *act_plane_track; /* active plane track */ ListBase plane_tracks;
/** Reconstruction data for camera object. */
MovieTrackingReconstruction reconstruction;
/** Stabilization data. */
MovieTrackingStabilization stabilization;
/** Active track. */
MovieTrackingTrack *act_track;
/** Active plane track. */
MovieTrackingPlaneTrack *act_plane_track;
ListBase objects; ListBase objects;
int objectnr, tot_object; /* index of active object and total number of objects */ /** Index of active object and total number of objects. */
int objectnr, tot_object;
MovieTrackingStats *stats; /* statistics displaying in clip editor */ /** Statistics displaying in clip editor. */
MovieTrackingStats *stats;
MovieTrackingDopesheet dopesheet; /* dopesheet data */ /** Dopesheet data. */
MovieTrackingDopesheet dopesheet;
} MovieTracking; } MovieTracking;
/* MovieTrackingCamera->distortion_model */ /* MovieTrackingCamera->distortion_model */

View File

@@ -68,23 +68,35 @@ typedef enum eUIFont_ID {
/* first font is the default (index 0), others optional */ /* first font is the default (index 0), others optional */
typedef struct uiFont { typedef struct uiFont {
struct uiFont *next, *prev; struct uiFont *next, *prev;
char filename[1024];/* 1024 = FILE_MAX */ /** 1024 = FILE_MAX. */
short blf_id; /* from blfont lib */ char filename[1024];
short uifont_id; /* own id (eUIFont_ID) */ /** From blfont lib. */
short r_to_l; /* fonts that read from left to right */ short blf_id;
/** Own id (eUIFont_ID). */
short uifont_id;
/** Fonts that read from left to right. */
short r_to_l;
short pad; short pad;
} uiFont; } uiFont;
/* this state defines appearance of text */ /* this state defines appearance of text */
typedef struct uiFontStyle { typedef struct uiFontStyle {
short uifont_id; /* saved in file, 0 is default */ /** Saved in file, 0 is default. */
short points; /* actual size depends on 'global' dpi */ short uifont_id;
short kerning; /* unfitted or default kerning value. */ /** Actual size depends on 'global' dpi. */
short italic, bold; /* style hint */ short points;
short shadow; /* value is amount of pixels blur */ /** Unfitted or default kerning value. */
short shadx, shady; /* shadow offset in pixels */ short kerning;
float shadowalpha; /* total alpha */ /** Style hint. */
float shadowcolor; /* 1 value, typically white or black anyway */ short italic, bold;
/** Value is amount of pixels blur. */
short shadow;
/** Shadow offset in pixels. */
short shadx, shady;
/** Total alpha. */
float shadowalpha;
/** 1 value, typically white or black anyway. */
float shadowcolor;
} uiFontStyle; } uiFontStyle;
/* this is fed to the layout engine and widget code */ /* this is fed to the layout engine and widget code */
@@ -92,7 +104,8 @@ typedef struct uiFontStyle {
typedef struct uiStyle { typedef struct uiStyle {
struct uiStyle *next, *prev; struct uiStyle *next, *prev;
char name[64]; /* MAX_STYLE_NAME */ /** MAX_STYLE_NAME. */
char name[64];
uiFontStyle paneltitle; uiFontStyle paneltitle;
uiFontStyle grouplabel; uiFontStyle grouplabel;
@@ -101,8 +114,10 @@ typedef struct uiStyle {
float panelzoom; float panelzoom;
short minlabelchars; /* in characters */ /** In characters. */
short minwidgetchars; /* in characters */ short minlabelchars;
/** In characters. */
short minwidgetchars;
short columnspace; short columnspace;
short templatespace; short templatespace;
@@ -166,7 +181,8 @@ typedef struct ThemeUI {
uiWidgetStateColors wcol_state; uiWidgetStateColors wcol_state;
uiPanelColors panel; /* deprecated, but we keep it for do_versions (2.66.1) */ /** Deprecated, but we keep it for do_versions (2.66.1). */
uiPanelColors panel;
char widget_emboss[4]; char widget_emboss[4];
@@ -193,11 +209,16 @@ typedef struct ThemeUI {
char gizmo_b[4]; char gizmo_b[4];
/* Icon Colors. */ /* Icon Colors. */
char icon_collection[4]; /* Collection items */ /** Collection items. */
char icon_object[4]; /* Object items */ char icon_collection[4];
char icon_object_data[4]; /* Object data items */ /** Object items. */
char icon_modifier[4]; /* Modifier and constraint items */ char icon_object[4];
char icon_shading[4]; /* Shading related items */ /** Object data items. */
char icon_object_data[4];
/** Modifier and constraint items. */
char icon_modifier[4];
/** Shading related items. */
char icon_shading[4];
} ThemeUI; } ThemeUI;
/* try to put them all in one, if needed a special struct can be created as well /* try to put them all in one, if needed a special struct can be created as well
@@ -206,13 +227,16 @@ typedef struct ThemeUI {
typedef struct ThemeSpace { typedef struct ThemeSpace {
/* main window colors */ /* main window colors */
char back[4]; char back[4];
char title[4]; /* panel title */ /** Panel title. */
char title[4];
char text[4]; char text[4];
char text_hi[4]; char text_hi[4];
/* header colors */ /* header colors */
char header[4]; /* region background */ /** Region background. */
char header_title[4]; /* unused */ char header[4];
/** Unused. */
char header_title[4];
char header_text[4]; char header_text[4];
char header_text_hi[4]; char header_text_hi[4];
@@ -223,20 +247,26 @@ typedef struct ThemeSpace {
char tab_outline[4]; char tab_outline[4];
/* button/tool regions */ /* button/tool regions */
char button[4]; /* region background */ /** Region background. */
char button_title[4]; /* panel title */ char button[4];
/** Panel title. */
char button_title[4];
char button_text[4]; char button_text[4];
char button_text_hi[4]; char button_text_hi[4];
/* listview regions */ /* listview regions */
char list[4]; /* region background */ /** Region background. */
char list_title[4]; /* panel title */ char list[4];
/** Panel title. */
char list_title[4];
char list_text[4]; char list_text[4];
char list_text_hi[4]; char list_text_hi[4];
/* navigation bar regions */ /* navigation bar regions */
char navigation_bar[4]; /* region background */ /** Region background. */
char execution_buts[4]; /* region background */ char navigation_bar[4];
/** Region background. */
char execution_buts[4];
/* float panel */ /* float panel */
/* char panel[4]; unused */ /* char panel[4]; unused */
@@ -263,8 +293,10 @@ typedef struct ThemeSpace {
char vertex[4], vertex_select[4], vertex_bevel[4], vertex_unreferenced[4]; char vertex[4], vertex_select[4], vertex_bevel[4], vertex_unreferenced[4];
char edge[4], edge_select[4]; char edge[4], edge_select[4];
char edge_seam[4], edge_sharp[4], edge_facesel[4], edge_crease[4], edge_bevel[4]; char edge_seam[4], edge_sharp[4], edge_facesel[4], edge_crease[4], edge_bevel[4];
char face[4], face_select[4]; /* solid faces */ /** Solid faces. */
char face_dot[4]; /* selected color */ char face[4], face_select[4];
/** selected color. */
char face_dot[4];
char extra_edge_len[4], extra_edge_angle[4], extra_face_angle[4], extra_face_area[4]; char extra_edge_len[4], extra_edge_angle[4], extra_face_angle[4], extra_face_area[4];
char normal[4]; char normal[4];
char vertex_normal[4]; char vertex_normal[4];
@@ -281,9 +313,12 @@ typedef struct ThemeSpace {
char handle_free[4], handle_auto[4], handle_vect[4], handle_align[4], handle_auto_clamped[4]; char handle_free[4], handle_auto[4], handle_vect[4], handle_align[4], handle_auto_clamped[4];
char handle_sel_free[4], handle_sel_auto[4], handle_sel_vect[4], handle_sel_align[4], handle_sel_auto_clamped[4]; char handle_sel_free[4], handle_sel_auto[4], handle_sel_vect[4], handle_sel_align[4], handle_sel_auto_clamped[4];
char ds_channel[4], ds_subchannel[4], ds_ipoline[4]; /* dopesheet */ /** Dopesheet. */
char keytype_keyframe[4], keytype_extreme[4], keytype_breakdown[4], keytype_jitter[4], keytype_movehold[4]; /* keytypes */ char ds_channel[4], ds_subchannel[4], ds_ipoline[4];
char keytype_keyframe_select[4], keytype_extreme_select[4], keytype_breakdown_select[4], keytype_jitter_select[4], keytype_movehold_select[4]; /* keytypes */ /** Keytypes. */
char keytype_keyframe[4], keytype_extreme[4], keytype_breakdown[4], keytype_jitter[4], keytype_movehold[4];
/** Keytypes. */
char keytype_keyframe_select[4], keytype_extreme_select[4], keytype_breakdown_select[4], keytype_jitter_select[4], keytype_movehold_select[4];
char keyborder[4], keyborder_select[4]; char keyborder[4], keyborder_select[4];
char pad[4]; char pad[4];
@@ -304,10 +339,12 @@ typedef struct ThemeSpace {
char nodeclass_shader[4], nodeclass_script[4]; char nodeclass_shader[4], nodeclass_script[4];
char nodeclass_pattern[4], nodeclass_layout[4]; char nodeclass_pattern[4], nodeclass_layout[4];
char movie[4], movieclip[4], mask[4], image[4], scene[4], audio[4]; /* for sequence editor */ /** For sequence editor. */
char movie[4], movieclip[4], mask[4], image[4], scene[4], audio[4];
char effect[4], transition[4], meta[4], text_strip[4]; char effect[4], transition[4], meta[4], text_strip[4];
float keyframe_scale_fac; /* for dopesheet - scale factor for size of keyframes (i.e. height of channels) */ /** For dopesheet - scale factor for size of keyframes (i.e. height of channels). */
float keyframe_scale_fac;
char editmesh_active[4]; char editmesh_active[4];
@@ -335,26 +372,39 @@ typedef struct ThemeSpace {
char preview_stitch_unstitchable[4]; char preview_stitch_unstitchable[4];
char preview_stitch_active[4]; char preview_stitch_active[4];
char uv_shadow[4]; /* two uses, for uvs with modifier applied on mesh and uvs during painting */ /** Two uses, for uvs with modifier applied on mesh and uvs during painting. */
char uv_others[4]; /* uvs of other objects */ char uv_shadow[4];
/** Uvs of other objects. */
char uv_others[4];
char match[4]; /* outliner - filter match */ /** Outliner - filter match. */
char selected_highlight[4]; /* outliner - selected item */ char match[4];
/** Outliner - selected item. */
char selected_highlight[4];
char skin_root[4]; /* Skin modifier root color */ /** Skin modifier root color. */
char skin_root[4];
/* NLA */ /* NLA */
char anim_active[4]; /* Active Action + Summary Channel */ /** Active Action + Summary Channel. */
char anim_non_active[4]; /* Active Action = NULL */ char anim_active[4];
char anim_preview_range[4]; /* Preview range overlay */ /** Active Action = NULL. */
char anim_non_active[4];
/** Preview range overlay. */
char anim_preview_range[4];
char anim_pad[4]; char anim_pad[4];
char nla_tweaking[4]; /* NLA 'Tweaking' action/strip */ /** NLA 'Tweaking' action/strip. */
char nla_tweakdupli[4]; /* NLA - warning color for duplicate instances of tweaking strip */ char nla_tweaking[4];
/** NLA - warning color for duplicate instances of tweaking strip. */
char nla_tweakdupli[4];
char nla_transition[4], nla_transition_sel[4]; /* NLA "Transition" strips */ /** NLA "Transition" strips. */
char nla_meta[4], nla_meta_sel[4]; /* NLA "Meta" strips */ char nla_transition[4], nla_transition_sel[4];
char nla_sound[4], nla_sound_sel[4]; /* NLA "Sound" strips */ /** NLA "Meta" strips. */
char nla_meta[4], nla_meta_sel[4];
/** NLA "Sound" strips. */
char nla_sound[4], nla_sound_sel[4];
/* info */ /* info */
char info_selected[4], info_selected_text[4]; char info_selected[4], info_selected_text[4];
@@ -377,7 +427,8 @@ typedef struct ThemeWireColor {
char select[4]; char select[4];
char active[4]; char active[4];
short flag; /* eWireColor_Flags */ /** EWireColor_Flags. */
short flag;
short pad; short pad;
} ThemeWireColor; } ThemeWireColor;
@@ -428,12 +479,14 @@ typedef struct bTheme {
typedef struct bAddon { typedef struct bAddon {
struct bAddon *next, *prev; struct bAddon *next, *prev;
char module[64]; char module[64];
IDProperty *prop; /* User-Defined Properties on this Addon (for storing preferences) */ /** User-Defined Properties on this Addon (for storing preferences). */
IDProperty *prop;
} bAddon; } bAddon;
typedef struct bPathCompare { typedef struct bPathCompare {
struct bPathCompare *next, *prev; struct bPathCompare *next, *prev;
char path[768]; /* FILE_MAXDIR */ /** FILE_MAXDIR. */
char path[768];
char flag, pad[7]; char flag, pad[7];
} bPathCompare; } bPathCompare;
@@ -490,12 +543,14 @@ typedef struct SolidLight {
} SolidLight; } SolidLight;
typedef struct WalkNavigation { typedef struct WalkNavigation {
float mouse_speed; /* speed factor for look around */ /** Speed factor for look around. */
float mouse_speed;
float walk_speed; float walk_speed;
float walk_speed_factor; float walk_speed_factor;
float view_height; float view_height;
float jump_height; float jump_height;
float teleport_time; /* duration to use for teleporting */ /** Duration to use for teleporting. */
float teleport_time;
short flag; short flag;
short pad[3]; short pad[3];
} WalkNavigation; } WalkNavigation;
@@ -504,32 +559,43 @@ typedef struct UserDef {
/* UserDef has separate do-version handling, and can be read from other files */ /* UserDef has separate do-version handling, and can be read from other files */
int versionfile, subversionfile; int versionfile, subversionfile;
int flag; /* eUserPref_Flag */ /** EUserPref_Flag. */
int dupflag; /* eDupli_ID_Flags */ int flag;
/** EDupli_ID_Flags. */
int dupflag;
int savetime; int savetime;
char tempdir[768]; /* FILE_MAXDIR length */ /** FILE_MAXDIR length. */
char tempdir[768];
char fontdir[768]; char fontdir[768];
char renderdir[1024]; /* FILE_MAX length */ /** FILE_MAX length. */
char renderdir[1024];
/* EXR cache path */ /* EXR cache path */
char render_cachedir[768]; /* 768 = FILE_MAXDIR */ /** 768 = FILE_MAXDIR. */
char render_cachedir[768];
char textudir[768]; char textudir[768];
char pythondir[768]; char pythondir[768];
char sounddir[768]; char sounddir[768];
char i18ndir[768]; char i18ndir[768];
char image_editor[1024]; /* 1024 = FILE_MAX */ /** 1024 = FILE_MAX. */
char anim_player[1024]; /* 1024 = FILE_MAX */ char image_editor[1024];
/** 1024 = FILE_MAX. */
char anim_player[1024];
int anim_player_preset; int anim_player_preset;
short v2d_min_gridsize; /* minimum spacing between gridlines in View2D grids */ /** Minimum spacing between gridlines in View2D grids. */
short timecode_style; /* eTimecodeStyles, style of timecode display */ short v2d_min_gridsize;
/** ETimecodeStyles, style of timecode display. */
short timecode_style;
short versions; short versions;
short dbl_click_time; short dbl_click_time;
short pad; short pad;
short wheellinescroll; short wheellinescroll;
int uiflag; /* eUserpref_UI_Flag */ /** EUserpref_UI_Flag. */
int uiflag2; /* eUserpref_UI_Flag2 */ int uiflag;
/** EUserpref_UI_Flag2. */
int uiflag2;
/* Experimental flag for app-templates to make changes to behavior /* Experimental flag for app-templates to make changes to behavior
* which are outside the scope of typical preferences. */ * which are outside the scope of typical preferences. */
short app_flag; short app_flag;
@@ -544,17 +610,26 @@ typedef struct UserDef {
int audioformat; int audioformat;
int audiochannels; int audiochannels;
float ui_scale; /* setting for UI scale */ /** Setting for UI scale. */
int ui_line_width; /* setting for UI line width */ float ui_scale;
int dpi; /* runtime, full DPI divided by pixelsize */ /** Setting for UI line width. */
float dpi_fac; /* runtime, multiplier to scale UI elements based on DPI */ int ui_line_width;
float pixelsize; /* runtime, line width and point size based on DPI */ /** Runtime, full DPI divided by pixelsize. */
int virtual_pixel; /* deprecated, for forward compatibility */ int dpi;
/** Runtime, multiplier to scale UI elements based on DPI. */
float dpi_fac;
/** Runtime, line width and point size based on DPI. */
float pixelsize;
/** Deprecated, for forward compatibility. */
int virtual_pixel;
int scrollback; /* console scrollback limit */ /** Console scrollback limit. */
char node_margin; /* node insert offset (aka auto-offset) margin, but might be useful for later stuff as well */ int scrollback;
/** Node insert offset (aka auto-offset) margin, but might be useful for later stuff as well. */
char node_margin;
char pad2[5]; char pad2[5];
short transopts; /* eUserpref_Translation_Flags */ /** EUserpref_Translation_Flags. */
short transopts;
short menuthreshold1, menuthreshold2; short menuthreshold1, menuthreshold2;
/* startup template */ /* startup template */
@@ -564,10 +639,12 @@ typedef struct UserDef {
struct ListBase uifonts; struct ListBase uifonts;
struct ListBase uistyles; struct ListBase uistyles;
struct ListBase user_keymaps; struct ListBase user_keymaps;
struct ListBase user_keyconfig_prefs; /* wmKeyConfigPref. */ /** #wmKeyConfigPref. */
struct ListBase user_keyconfig_prefs;
struct ListBase addons; struct ListBase addons;
struct ListBase autoexec_paths; struct ListBase autoexec_paths;
struct ListBase user_menus; /* bUserMenu */ /** #bUserMenu. */
struct ListBase user_menus;
char keyconfigstr[64]; char keyconfigstr[64];
@@ -576,9 +653,11 @@ typedef struct UserDef {
int undomemory; int undomemory;
float gpu_viewport_quality; float gpu_viewport_quality;
short gp_manhattendist, gp_euclideandist, gp_eraser; short gp_manhattendist, gp_euclideandist, gp_eraser;
short gp_settings; /* eGP_UserdefSettings */ /** #eGP_UserdefSettings. */
short gp_settings;
short tb_leftmouse, tb_rightmouse; short tb_leftmouse, tb_rightmouse;
/* struct SolidLight light[3] DNA_DEPRECATED; */ /* Was using non-aligned struct! */ /* Was using non-aligned struct! */
/* struct SolidLight light[3] DNA_DEPRECATED; */
struct SolidLight light_param[4]; struct SolidLight light_param[4];
float light_ambient[3], pad7; float light_ambient[3], pad7;
short gizmo_flag, gizmo_size; short gizmo_flag, gizmo_size;
@@ -588,61 +667,85 @@ typedef struct UserDef {
short dragthreshold; short dragthreshold;
int memcachelimit; int memcachelimit;
int prefetchframes; int prefetchframes;
float pad_rot_angle; /* control the rotation step of the view when PAD2, PAD4, PAD6&PAD8 is use */ /** Control the rotation step of the view when PAD2, PAD4, PAD6&PAD8 is use. */
float pad_rot_angle;
short _pad0; short _pad0;
short obcenter_dia; short obcenter_dia;
short rvisize; /* rotating view icon size */ /** Rotating view icon size. */
short rvibright; /* rotating view icon brightness */ short rvisize;
short recent_files; /* maximum number of recently used files to remember */ /** Rotating view icon brightness. */
short smooth_viewtx; /* milliseconds to spend spinning the view */ short rvibright;
/** Maximum number of recently used files to remember . */
short recent_files;
/** Milliseconds to spend spinning the view. */
short smooth_viewtx;
short glreslimit; short glreslimit;
short curssize; short curssize;
short color_picker_type; /* eColorPicker_Types */ /** #eColorPicker_Types. */
char ipo_new; /* interpolation mode for newly added F-Curves */ short color_picker_type;
char keyhandles_new; /* handle types for newly added keyframes */ /** Interpolation mode for newly added F-Curves. */
char ipo_new;
/** Handle types for newly added keyframes. */
char keyhandles_new;
char gpu_select_method; char gpu_select_method;
char gpu_select_pick_deph; char gpu_select_pick_deph;
char pad0; char pad0;
char view_frame_type; /* eZoomFrame_Mode */ /** #eZoomFrame_Mode. */
char view_frame_type;
int view_frame_keyframes; /* number of keyframes to zoom around current frame */ /** Number of keyframes to zoom around current frame. */
float view_frame_seconds; /* seconds to zoom around current frame */ int view_frame_keyframes;
/** Seconds to zoom around current frame. */
float view_frame_seconds;
char _pad1[4]; char _pad1[4];
short widget_unit; /* private, defaults to 20 for 72 DPI setting */ /** Private, defaults to 20 for 72 DPI setting. */
short widget_unit;
short anisotropic_filter; short anisotropic_filter;
short use_16bit_textures, use_gpu_mipmap; short use_16bit_textures, use_gpu_mipmap;
float pressure_threshold_max; /* raw tablet pressure that maps to 100% */ /** Raw tablet pressure that maps to 100%. */
float pressure_softness; /* curve non-linearity parameter */ float pressure_threshold_max;
/** Curve non-linearity parameter. */
float pressure_softness;
float ndof_sensitivity; /* overall sensitivity of 3D mouse */ /** Overall sensitivity of 3D mouse. */
float ndof_sensitivity;
float ndof_orbit_sensitivity; float ndof_orbit_sensitivity;
float ndof_deadzone; /* deadzone of 3D mouse */ /** Deadzone of 3D mouse. */
int ndof_flag; /* eNdof_Flag, flags for 3D mouse */ float ndof_deadzone;
/** #eNdof_Flag, flags for 3D mouse. */
int ndof_flag;
short ogl_multisamples; /* eMultiSample_Type, amount of samples for OpenGL FSA, if zero no FSA */ /** #eMultiSample_Type, amount of samples for OpenGL FSA, if zero no FSA. */
short ogl_multisamples;
/* eImageDrawMethod, Method to be used to draw the images (AUTO, GLSL, Textures or DrawPixels) */ /* eImageDrawMethod, Method to be used to draw the images (AUTO, GLSL, Textures or DrawPixels) */
short image_draw_method; short image_draw_method;
float glalphaclip; float glalphaclip;
short autokey_mode; /* eAutokey_Mode, autokeying mode */ /** #eAutokey_Mode, autokeying mode. */
short autokey_flag; /* flags for autokeying */ short autokey_mode;
/** Flags for autokeying. */
short autokey_flag;
short text_render, pad9; /* options for text rendering */ /** Options for text rendering. */
short text_render, pad9;
struct ColorBand coba_weight; /* from texture.h */ /** From texture.h. */
struct ColorBand coba_weight;
float sculpt_paint_overlay_col[3]; float sculpt_paint_overlay_col[3];
float gpencil_new_layer_col[4]; /* default color for newly created Grease Pencil layers */ /** Default color for newly created Grease Pencil layers. */
float gpencil_new_layer_col[4];
short tweak_threshold; short tweak_threshold;
char navigation_mode, pad10; char navigation_mode, pad10;
char author[80]; /* author name for file formats supporting it */ /** Author name for file formats supporting it. */
char author[80];
char font_path_ui[1024]; char font_path_ui[1024];
char font_path_ui_mono[1024]; char font_path_ui_mono[1024];
@@ -650,26 +753,37 @@ typedef struct UserDef {
int compute_device_type; int compute_device_type;
int compute_device_id; int compute_device_id;
float fcu_inactive_alpha; /* opacity of inactive F-Curves in F-Curve Editor */ /** Opacity of inactive F-Curves in F-Curve Editor. */
float fcu_inactive_alpha;
short pie_interaction_type; /* if keeping a pie menu spawn button pressed after this time, it turns into /**
* a drag/release pie menu */ * If keeping a pie menu spawn button pressed after this time,
short pie_initial_timeout; /* direction in the pie menu will always be calculated from the initial position * it turns into a drag/release pie menu.
* within this time limit */ */
short pie_interaction_type;
/**
* Direction in the pie menu will always be calculated from the
* initial position within this time limit.
*/
short pie_initial_timeout;
short pie_animation_timeout; short pie_animation_timeout;
short pie_menu_confirm; short pie_menu_confirm;
short pie_menu_radius; /* pie menu radius */ /** Pie menu radius. */
short pie_menu_threshold; /* pie menu distance from center before a direction is set */ short pie_menu_radius;
/** Pie menu distance from center before a direction is set. */
short pie_menu_threshold;
struct WalkNavigation walk_navigation; struct WalkNavigation walk_navigation;
short opensubdiv_compute_type; short opensubdiv_compute_type;
short gpencil_multisamples; /* eMultiSample_Type, amount of samples for Grease Pencil */ /** #eMultiSample_Type, amount of samples for Grease Pencil. */
short gpencil_multisamples;
char pad5[4]; char pad5[4];
} UserDef; } UserDef;
extern UserDef U; /* from blenkernel blender.c */ /* from blenkernel blender.c */
extern UserDef U;
/* ***************** USERDEF ****************** */ /* ***************** USERDEF ****************** */

View File

@@ -45,7 +45,8 @@ struct VFontData;
typedef struct VFont { typedef struct VFont {
ID id; ID id;
char name[1024]; /* 1024 = FILE_MAX */ /** 1024 = FILE_MAX. */
char name[1024];
struct VFontData *data; struct VFontData *data;
struct PackedFile *packedfile; struct PackedFile *packedfile;

View File

@@ -38,34 +38,53 @@
/* View 2D data - stored per region */ /* View 2D data - stored per region */
typedef struct View2D { typedef struct View2D {
rctf tot, cur; /* tot - area that data can be drawn in; cur - region of tot that is visible in viewport */ /** Tot - area that data can be drawn in; cur - region of tot that is visible in viewport. */
rcti vert, hor; /* vert - vertical scrollbar region; hor - horizontal scrollbar region */ rctf tot, cur;
rcti mask; /* mask - region (in screenspace) within which 'cur' can be viewed */ /** Vert - vertical scrollbar region; hor - horizontal scrollbar region. */
rcti vert, hor;
/** Mask - region (in screenspace) within which 'cur' can be viewed. */
rcti mask;
float min[2], max[2]; /* min/max sizes of 'cur' rect (only when keepzoom not set) */ /** Min/max sizes of 'cur' rect (only when keepzoom not set). */
float minzoom, maxzoom; /* allowable zoom factor range (only when (keepzoom & V2D_LIMITZOOM)) is set */ float min[2], max[2];
/** Allowable zoom factor range (only when (keepzoom & V2D_LIMITZOOM)) is set. */
float minzoom, maxzoom;
short scroll; /* scroll - scrollbars to display (bitflag) */ /** Scroll - scrollbars to display (bitflag). */
short scroll_ui; /* scroll_ui - temp settings used for UI drawing of scrollers */ short scroll;
/** Scroll_ui - temp settings used for UI drawing of scrollers. */
short scroll_ui;
short keeptot; /* keeptot - 'cur' rect cannot move outside the 'tot' rect? */ /** Keeptot - 'cur' rect cannot move outside the 'tot' rect?. */
short keepzoom; /* keepzoom - axes that zooming cannot occur on, and also clamp within zoom-limits */ short keeptot;
short keepofs; /* keepofs - axes that translation is not allowed to occur on */ /** Keepzoom - axes that zooming cannot occur on, and also clamp within zoom-limits. */
short keepzoom;
/** Keepofs - axes that translation is not allowed to occur on. */
short keepofs;
short flag; /* settings */ /** Settings. */
short align; /* alignment of content in totrect */ short flag;
/** Alignment of content in totrect. */
short align;
short winx, winy; /* storage of current winx/winy values, set in UI_view2d_size_update */ /** Storage of current winx/winy values, set in UI_view2d_size_update. */
short oldwinx, oldwiny; /* storage of previous winx/winy values encountered by UI_view2d_curRect_validate(), for keepaspect */ short winx, winy;
/** Storage of previous winx/winy values encountered by UI_view2d_curRect_validate(), for keepaspect. */
short oldwinx, oldwiny;
short around; /* pivot point for transforms (rotate and scale) */ /** Pivot point for transforms (rotate and scale). */
short around;
float *tab_offset; /* different offset per tab, for buttons */ /** Different offset per tab, for buttons. */
int tab_num; /* number of tabs stored */ float *tab_offset;
int tab_cur; /* current tab */ /** Number of tabs stored. */
int tab_num;
/** Current tab. */
int tab_cur;
/* Usually set externally (as in, not in view2d files). */ /* Usually set externally (as in, not in view2d files). */
char alpha_vert, alpha_hor; /* alpha of vertical and horizontal scrollbars (range is [0, 255]) */ /** Alpha of vertical and horizontal scrollbars (range is [0, 255]). */
char alpha_vert, alpha_hor;
short pad[3]; short pad[3];
/* animated smooth view */ /* animated smooth view */

View File

@@ -64,65 +64,88 @@ struct GPUViewport;
typedef struct RegionView3D { typedef struct RegionView3D {
float winmat[4][4]; /* GL_PROJECTION matrix */ /** GL_PROJECTION matrix. */
float viewmat[4][4]; /* GL_MODELVIEW matrix */ float winmat[4][4];
float viewinv[4][4]; /* inverse of viewmat */ /** GL_MODELVIEW matrix. */
float persmat[4][4]; /* viewmat*winmat */ float viewmat[4][4];
float persinv[4][4]; /* inverse of persmat */ /** Inverse of viewmat. */
float viewcamtexcofac[4]; /* offset/scale for camera glsl texcoords */ float viewinv[4][4];
/** Viewmat*winmat. */
float persmat[4][4];
/** Inverse of persmat. */
float persinv[4][4];
/** Offset/scale for camera glsl texcoords. */
float viewcamtexcofac[4];
/* viewmat/persmat multiplied with object matrix, while drawing and selection */ /** viewmat/persmat multiplied with object matrix, while drawing and selection. */
float viewmatob[4][4]; float viewmatob[4][4];
float persmatob[4][4]; float persmatob[4][4];
/* user defined clipping planes */ /** User defined clipping planes. */
float clip[6][4]; float clip[6][4];
float clip_local[6][4]; /* clip in object space, means we can test for clipping in editmode without first going into worldspace */ /** Clip in object space, means we can test for clipping in editmode without first going into worldspace. */
float clip_local[6][4];
struct BoundBox *clipbb; struct BoundBox *clipbb;
struct RegionView3D *localvd; /* allocated backup of its self while in localview */ /** Allocated backup of its self while in localview. */
struct RegionView3D *localvd;
struct RenderEngine *render_engine; struct RenderEngine *render_engine;
struct ViewDepths *depths; struct ViewDepths *depths;
void *gpuoffscreen; void *gpuoffscreen;
/* animated smooth view */ /** Animated smooth view. */
struct SmoothView3DStore *sms; struct SmoothView3DStore *sms;
struct wmTimer *smooth_timer; struct wmTimer *smooth_timer;
/* transform gizmo matrix */ /** Transform gizmo matrix. */
float twmat[4][4]; float twmat[4][4];
/* min/max dot product on twmat xyz axis. */ /** min/max dot product on twmat xyz axis. */
float tw_axis_min[3], tw_axis_max[3]; float tw_axis_min[3], tw_axis_max[3];
float tw_axis_matrix[3][3]; float tw_axis_matrix[3][3];
float gridview DNA_DEPRECATED; float gridview DNA_DEPRECATED;
float viewquat[4]; /* view rotation, must be kept normalized */ /** View rotation, must be kept normalized. */
float dist; /* distance from 'ofs' along -viewinv[2] vector, where result is negative as is 'ofs' */ float viewquat[4];
float camdx, camdy; /* camera view offsets, 1.0 = viewplane moves entire width/height */ /** Distance from 'ofs' along -viewinv[2] vector, where result is negative as is 'ofs'. */
float pixsize; /* runtime only */ float dist;
float ofs[3]; /* view center & orbit pivot, negative of worldspace location, /** Camera view offsets, 1.0 = viewplane moves entire width/height. */
* also matches -viewinv[3][0:3] in ortho mode.*/ float camdx, camdy;
float camzoom; /* viewport zoom on the camera frame, see BKE_screen_view3d_zoom_to_fac */ /** Runtime only. */
char is_persp; /* check if persp/ortho view, since 'persp' cant be used for this since float pixsize;
* it can have cameras assigned as well. (only set in view3d_winmatrix_set) */ /**
* View center & orbit pivot, negative of worldspace location,
* also matches -viewinv[3][0:3] in ortho mode.
*/
float ofs[3];
/** Viewport zoom on the camera frame, see BKE_screen_view3d_zoom_to_fac. */
float camzoom;
/**
* Check if persp/ortho view, since 'persp' cant be used for this since
* it can have cameras assigned as well. (only set in #view3d_winmatrix_set)
*/
char is_persp;
char persp; char persp;
char view; char view;
char viewlock; char viewlock;
char viewlock_quad; /* options for quadview (store while out of quad view) */ /** Options for quadview (store while out of quad view). */
char viewlock_quad;
char pad[3]; char pad[3];
float ofs_lock[2]; /* normalized offset for locked view: (-1, -1) bottom left, (1, 1) upper right */ /** Normalized offset for locked view: (-1, -1) bottom left, (1, 1) upper right. */
float ofs_lock[2];
short twdrawflag; /* XXX can easily get rid of this (Julian) */ /** XXX can easily get rid of this (Julian). */
short twdrawflag;
short rflag; short rflag;
/* last view (use when switching out of camera view) */ /** Last view (use when switching out of camera view). */
float lviewquat[4]; float lviewquat[4];
short lpersp, lview; /* lpersp can never be set to 'RV3D_CAMOB' */ /** Lpersp can never be set to 'RV3D_CAMOB'. */
short lpersp, lview;
/* active rotation from NDOF or elsewhere */ /** Active rotation from NDOF or elsewhere. */
float rot_angle; float rot_angle;
float rot_axis[3]; float rot_axis[3];
} RegionView3D; } RegionView3D;
@@ -135,8 +158,10 @@ typedef struct View3DCursor {
/* 3D Viewport Shading settings */ /* 3D Viewport Shading settings */
typedef struct View3DShading { typedef struct View3DShading {
char type; /* Shading type (VIEW3D_SHADE_SOLID, ..) */ /** Shading type (VIEW3D_SHADE_SOLID, ..). */
char prev_type; /* Runtime, for toggle between rendered viewport. */ char type;
/** Runtime, for toggle between rendered viewport. */
char prev_type;
char prev_type_wire; char prev_type_wire;
char color_type; char color_type;
@@ -147,9 +172,12 @@ typedef struct View3DShading {
char cavity_type; char cavity_type;
char pad[7]; char pad[7];
char studio_light[256]; /* FILE_MAXFILE */ /** FILE_MAXFILE. */
char lookdev_light[256]; /* FILE_MAXFILE */ char studio_light[256];
char matcap[256]; /* FILE_MAXFILE */ /** FILE_MAXFILE. */
char lookdev_light[256];
/** FILE_MAXFILE. */
char matcap[256];
float shadow_intensity; float shadow_intensity;
float single_color[3]; float single_color[3];
@@ -209,7 +237,8 @@ typedef struct View3DOverlay {
/* 3D ViewPort Struct */ /* 3D ViewPort Struct */
typedef struct View3D { typedef struct View3D {
struct SpaceLink *next, *prev; struct SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */ /** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype; char spacetype;
char link_flag; char link_flag;
char _pad0[6]; char _pad0[6];
@@ -218,12 +247,16 @@ typedef struct View3D {
float viewquat[4] DNA_DEPRECATED; float viewquat[4] DNA_DEPRECATED;
float dist DNA_DEPRECATED; float dist DNA_DEPRECATED;
float bundle_size; /* size of bundles in reconstructed data */ /** Size of bundles in reconstructed data. */
char bundle_drawtype; /* display style for bundle */ float bundle_size;
/** Display style for bundle. */
char bundle_drawtype;
char pad[3]; char pad[3];
unsigned int lay_prev DNA_DEPRECATED; /* for active layer toggle */ /** For active layer toggle. */
unsigned int lay_used DNA_DEPRECATED; /* used while drawing */ unsigned int lay_prev DNA_DEPRECATED;
/** Used while drawing. */
unsigned int lay_used DNA_DEPRECATED;
int object_type_exclude_viewport; int object_type_exclude_viewport;
int object_type_exclude_select; int object_type_exclude_select;
@@ -234,15 +267,18 @@ typedef struct View3D {
struct Object *camera, *ob_centre; struct Object *camera, *ob_centre;
rctf render_border; rctf render_border;
struct View3D *localvd; /* allocated backup of its self while in localview */ /** Allocated backup of its self while in localview. */
struct View3D *localvd;
char ob_centre_bone[64]; /* optional string for armature bone to define center, MAXBONENAME */ /** Optional string for armature bone to define center, MAXBONENAME. */
char ob_centre_bone[64];
unsigned short local_view_uuid; unsigned short local_view_uuid;
short _pad6; short _pad6;
int layact DNA_DEPRECATED; int layact DNA_DEPRECATED;
short ob_centre_cursor; /* optional bool for 3d cursor to define center */ /** Optional bool for 3d cursor to define center. */
short ob_centre_cursor;
short scenelock; short scenelock;
short gp_flag; short gp_flag;
short flag; short flag;
@@ -250,14 +286,16 @@ typedef struct View3D {
float lens, grid; float lens, grid;
float near, far; float near, far;
float ofs[3] DNA_DEPRECATED; /* XXX deprecated */ float ofs[3] DNA_DEPRECATED;
char _pad[4]; char _pad[4];
short matcap_icon; /* icon id */ /** Icon id. */
short matcap_icon;
short gridlines; short gridlines;
short gridsubdiv; /* Number of subdivisions in the grid between each highlighted grid line */ /** Number of subdivisions in the grid between each highlighted grid line. */
short gridsubdiv;
char gridflag; char gridflag;
/* transform gizmo info */ /* transform gizmo info */
@@ -269,7 +307,8 @@ typedef struct View3D {
char _pad3; char _pad3;
char transp, xray; char transp, xray;
char multiview_eye; /* multiview current eye - for internal use */ /** Multiview current eye - for internal use. */
char multiview_eye;
/* actually only used to define the opacity of the grease pencil vertex in edit mode */ /* actually only used to define the opacity of the grease pencil vertex in edit mode */
float vertex_opacity; float vertex_opacity;
@@ -278,10 +317,12 @@ typedef struct View3D {
* instead set (temporarily) from camera */ * instead set (temporarily) from camera */
struct GPUFXSettings fx_settings; struct GPUFXSettings fx_settings;
void *properties_storage; /* Nkey panel stores stuff here (runtime only!) */ /** Nkey panel stores stuff here (runtime only!). */
void *properties_storage;
/* XXX deprecated? */ /* XXX deprecated? */
struct bGPdata *gpd DNA_DEPRECATED; /* Grease-Pencil Data (annotation layers) */ /** Grease-Pencil Data (annotation layers). */
struct bGPdata *gpd DNA_DEPRECATED;
/* Stereoscopy settings */ /* Stereoscopy settings */
short stereo3d_flag; short stereo3d_flag;

View File

@@ -97,9 +97,11 @@ enum ReportListFlags {
# #
typedef struct Report { typedef struct Report {
struct Report *next, *prev; struct Report *next, *prev;
short type; /* ReportType */ /** ReportType. */
short type;
short flag; short flag;
int len; /* strlen(message), saves some time calculating the word wrap */ /** `strlen(message)`, saves some time calculating the word wrap . */
int len;
const char *typestr; const char *typestr;
const char *message; const char *message;
} Report; } Report;
@@ -107,8 +109,10 @@ typedef struct Report {
/* saved in the wm, don't remove */ /* saved in the wm, don't remove */
typedef struct ReportList { typedef struct ReportList {
ListBase list; ListBase list;
int printlevel; /* ReportType */ /** ReportType. */
int storelevel; /* ReportType */ int printlevel;
/** ReportType. */
int storelevel;
int flag, pad; int flag, pad;
struct wmTimer *reporttimer; struct wmTimer *reporttimer;
} ReportList; } ReportList;
@@ -129,36 +133,54 @@ typedef struct ReportTimerInfo {
typedef struct wmWindowManager { typedef struct wmWindowManager {
ID id; ID id;
struct wmWindow *windrawable, *winactive; /* separate active from drawable */ /** Separate active from drawable. */
struct wmWindow *windrawable, *winactive;
ListBase windows; ListBase windows;
int initialized; /* set on file read */ /** Set on file read. */
short file_saved; /* indicator whether data was saved */ int initialized;
short op_undo_depth; /* operator stack depth to avoid nested undo pushes */ /** Indicator whether data was saved. */
short file_saved;
/** Operator stack depth to avoid nested undo pushes. */
short op_undo_depth;
ListBase operators; /* operator registry */ /** Operator registry. */
ListBase operators;
ListBase queue; /* refresh/redraw wmNotifier structs */ /** Refresh/redraw wmNotifier structs. */
ListBase queue;
struct ReportList reports; /* information and error reports */ /** Information and error reports. */
struct ReportList reports;
ListBase jobs; /* threaded jobs manager */ /** Threaded jobs manager. */
ListBase jobs;
ListBase paintcursors; /* extra overlay cursors to draw, like circles */ /** Extra overlay cursors to draw, like circles. */
ListBase paintcursors;
ListBase drags; /* active dragged items */ /** Active dragged items. */
ListBase drags;
ListBase keyconfigs; /* known key configurations */ /** Known key configurations. */
struct wmKeyConfig *defaultconf; /* default configuration */ ListBase keyconfigs;
struct wmKeyConfig *addonconf; /* addon configuration */ /** Default configuration. */
struct wmKeyConfig *userconf; /* user configuration */ struct wmKeyConfig *defaultconf;
/** Addon configuration. */
struct wmKeyConfig *addonconf;
/** User configuration. */
struct wmKeyConfig *userconf;
ListBase timers; /* active timers */ /** Active timers. */
struct wmTimer *autosavetimer; /* timer for auto save */ ListBase timers;
/** Timer for auto save. */
struct wmTimer *autosavetimer;
struct UndoStack *undo_stack; /* all undo history (runtime only). */ /** All undo history (runtime only). */
struct UndoStack *undo_stack;
char is_interface_locked; /* indicates whether interface is locked for user interaction */ /** Indicates whether interface is locked for user interaction. */
char is_interface_locked;
char par[7]; char par[7];
struct wmMsgBus *message_bus; struct wmMsgBus *message_bus;
@@ -184,14 +206,20 @@ enum {
typedef struct wmWindow { typedef struct wmWindow {
struct wmWindow *next, *prev; struct wmWindow *next, *prev;
void *ghostwin; /* don't want to include ghost.h stuff */ /** Don't want to include ghost.h stuff. */
void *gpuctx; /* don't want to include gpu stuff */ void *ghostwin;
/** Don't want to include gpu stuff. */
void *gpuctx;
struct wmWindow *parent; /* Parent window */ /** Parent window. */
struct wmWindow *parent;
struct Scene *scene; /* Active scene displayed in this window. */ /** Active scene displayed in this window. */
struct Scene *new_scene; /* temporary when switching */ struct Scene *scene;
char view_layer_name[64]; /* Active view layer displayed in this window. */ /** Temporary when switching. */
struct Scene *new_scene;
/** Active view layer displayed in this window. */
char view_layer_name[64];
struct WorkSpaceInstanceHook *workspace_hook; struct WorkSpaceInstanceHook *workspace_hook;
@@ -201,38 +229,59 @@ typedef struct wmWindow {
struct bScreen *screen DNA_DEPRECATED; struct bScreen *screen DNA_DEPRECATED;
short posx, posy, sizex, sizey; /* window coords */ /** Window coords. */
short windowstate; /* borderless, full */ short posx, posy, sizex, sizey;
short monitor; /* multiscreen... no idea how to store yet */ /** Borderless, full. */
short active; /* set to 1 if an active window, for quick rejects */ short windowstate;
short cursor; /* current mouse cursor type */ /** Multiscreen... no idea how to store yet. */
short lastcursor; /* previous cursor when setting modal one */ short monitor;
short modalcursor; /* the current modal cursor */ /** Set to 1 if an active window, for quick rejects. */
short grabcursor; /* cursor grab mode */ short active;
short addmousemove; /* internal: tag this for extra mousemove event, makes cursors/buttons active on UI switching */ /** Current mouse cursor type. */
short cursor;
/** Previous cursor when setting modal one. */
short lastcursor;
/** The current modal cursor. */
short modalcursor;
/** Cursor grab mode. */
short grabcursor;
/** Internal: tag this for extra mousemove event, makes cursors/buttons active on UI switching. */
short addmousemove;
short pad[4]; short pad[4];
int winid; /* winid also in screens, is for retrieving this window after read */ /** Winid also in screens, is for retrieving this window after read. */
int winid;
short lock_pie_event; /* internal, lock pie creation from this event until released */ /** Internal, lock pie creation from this event until released. */
short last_pie_event; /* exception to the above rule for nested pies, store last pie event for operators short lock_pie_event;
* that spawn a new pie right after destruction of last pie */ /**
* Exception to the above rule for nested pies, store last pie event for operators
* that spawn a new pie right after destruction of last pie.
*/
short last_pie_event;
struct wmEvent *eventstate; /* storage for event system */ /** Storage for event system. */
struct wmEvent *eventstate;
struct wmGesture *tweak; /* internal for wm_operators.c */ /** Internal for wm_operators.c. */
struct wmGesture *tweak;
/* Input Method Editor data - complex character input (esp. for asian character input) /* Input Method Editor data - complex character input (esp. for asian character input)
* Currently WIN32, runtime-only data */ * Currently WIN32, runtime-only data */
struct wmIMEData *ime_data; struct wmIMEData *ime_data;
ListBase queue; /* all events (ghost level events were handled) */ /** All events (ghost level events were handled). */
ListBase handlers; /* window+screen handlers, handled last */ ListBase queue;
ListBase modalhandlers; /* priority handlers, handled first */ /** Window+screen handlers, handled last. */
ListBase handlers;
/** Priority handlers, handled first. */
ListBase modalhandlers;
ListBase gesture; /* gesture stuff */ /** Gesture stuff. */
ListBase gesture;
struct Stereo3dFormat *stereo3d_format; /* properties for stereoscopic displays */ /** Properties for stereoscopic displays. */
struct Stereo3dFormat *stereo3d_format;
/* custom drawing callbacks */ /* custom drawing callbacks */
ListBase drawcalls; ListBase drawcalls;
@@ -256,7 +305,8 @@ typedef struct wmOperatorTypeMacro {
/* operator id */ /* operator id */
char idname[64]; char idname[64];
/* rna pointer to access properties, like keymap */ /* rna pointer to access properties, like keymap */
struct IDProperty *properties; /* operator properties, assigned to ptr->data and can be written to a file */ /** Operator properties, assigned to ptr->data and can be written to a file. */
struct IDProperty *properties;
struct PointerRNA *ptr; struct PointerRNA *ptr;
} wmOperatorTypeMacro; } wmOperatorTypeMacro;
@@ -265,27 +315,38 @@ typedef struct wmKeyMapItem {
struct wmKeyMapItem *next, *prev; struct wmKeyMapItem *next, *prev;
/* operator */ /* operator */
char idname[64]; /* used to retrieve operator type pointer */ /** Used to retrieve operator type pointer. */
IDProperty *properties; /* operator properties, assigned to ptr->data and can be written to a file */ char idname[64];
/** Operator properties, assigned to ptr->data and can be written to a file. */
IDProperty *properties;
/* modal */ /* modal */
char propvalue_str[64]; /* runtime temporary storage for loading */ /** Runtime temporary storage for loading. */
short propvalue; /* if used, the item is from modal map */ char propvalue_str[64];
/** If used, the item is from modal map. */
short propvalue;
/* event */ /* event */
short type; /* event code itself */ /** Event code itself. */
short val; /* KM_ANY, KM_PRESS, KM_NOTHING etc */ short type;
short shift, ctrl, alt, oskey; /* oskey is apple or windowskey, value denotes order of pressed */ /** KM_ANY, KM_PRESS, KM_NOTHING etc. */
short keymodifier; /* rawkey modifier */ short val;
/** Oskey is apple or windowskey, value denotes order of pressed. */
short shift, ctrl, alt, oskey;
/** Rawkey modifier. */
short keymodifier;
/* flag: inactive, expanded */ /* flag: inactive, expanded */
short flag; short flag;
/* runtime */ /* runtime */
short maptype; /* keymap editor */ /** Keymap editor. */
short id; /* unique identifier. Positive for kmi that override builtins, negative otherwise */ short maptype;
/** Unique identifier. Positive for kmi that override builtins, negative otherwise. */
short id;
short pad; short pad;
struct PointerRNA *ptr; /* rna pointer to access properties */ /** Rna pointer to access properties. */
struct PointerRNA *ptr;
} wmKeyMapItem; } wmKeyMapItem;
/* used instead of wmKeyMapItem for diff keymaps */ /* used instead of wmKeyMapItem for diff keymaps */
@@ -321,13 +382,19 @@ typedef struct wmKeyMap {
ListBase items; ListBase items;
ListBase diff_items; ListBase diff_items;
char idname[64]; /* global editor keymaps, or for more per space/region */ /** Global editor keymaps, or for more per space/region. */
short spaceid; /* same IDs as in DNA_space_types.h */ char idname[64];
short regionid; /* see above */ /** Same IDs as in DNA_space_types.h. */
char owner_id[64]; /* optional, see: #wmOwnerID */ short spaceid;
/** See above. */
short regionid;
/** Optional, see: #wmOwnerID. */
char owner_id[64];
short flag; /* general flags */ /** General flags. */
short kmi_id; /* last kmi id */ short flag;
/** Last kmi id. */
short kmi_id;
/* runtime */ /* runtime */
/** Verify if enabled in the current context, use #WM_keymap_poll instead of direct calls. */ /** Verify if enabled in the current context, use #WM_keymap_poll instead of direct calls. */
@@ -359,15 +426,18 @@ enum {
*/ */
typedef struct wmKeyConfigPref { typedef struct wmKeyConfigPref {
struct wmKeyConfigPref *next, *prev; struct wmKeyConfigPref *next, *prev;
char idname[64]; /* unique name */ /** Unique name. */
char idname[64];
IDProperty *prop; IDProperty *prop;
} wmKeyConfigPref; } wmKeyConfigPref;
typedef struct wmKeyConfig { typedef struct wmKeyConfig {
struct wmKeyConfig *next, *prev; struct wmKeyConfig *next, *prev;
char idname[64]; /* unique name */ /** Unique name. */
char basename[64]; /* idname of configuration this is derives from, "" if none */ char idname[64];
/** Idname of configuration this is derives from, "" if none. */
char basename[64];
ListBase keymaps; ListBase keymaps;
int actkeymap; int actkeymap;
@@ -387,20 +457,30 @@ typedef struct wmOperator {
struct wmOperator *next, *prev; struct wmOperator *next, *prev;
/* saved */ /* saved */
char idname[64]; /* used to retrieve type pointer */ /** Used to retrieve type pointer. */
IDProperty *properties; /* saved, user-settable properties */ char idname[64];
/** Saved, user-settable properties. */
IDProperty *properties;
/* runtime */ /* runtime */
struct wmOperatorType *type; /* operator type definition from idname */ /** Operator type definition from idname. */
void *customdata; /* custom storage, only while operator runs */ struct wmOperatorType *type;
void *py_instance; /* python stores the class instance here */ /** Custom storage, only while operator runs. */
void *customdata;
/** Python stores the class instance here. */
void *py_instance;
struct PointerRNA *ptr; /* rna pointer to access properties */ /** Rna pointer to access properties. */
struct ReportList *reports; /* errors and warnings storage */ struct PointerRNA *ptr;
/** Errors and warnings storage. */
struct ReportList *reports;
ListBase macro; /* list of operators, can be a tree */ /** List of operators, can be a tree. */
struct wmOperator *opm; /* current running macro, not saved */ ListBase macro;
struct uiLayout *layout; /* runtime for drawing */ /** Current running macro, not saved. */
struct wmOperator *opm;
/** Runtime for drawing. */
struct uiLayout *layout;
short flag, pad[3]; short flag, pad[3];
} wmOperator; } wmOperator;

View File

@@ -113,25 +113,30 @@ typedef struct WorkSpaceLayout {
struct bScreen *screen; struct bScreen *screen;
/* The name of this layout, we override the RNA name of the screen with this (but not ID name itself) */ /* The name of this layout, we override the RNA name of the screen with this (but not ID name itself) */
char name[64] DNA_PRIVATE_WORKSPACE; /* MAX_NAME */ /** MAX_NAME. */
char name[64] DNA_PRIVATE_WORKSPACE;
} WorkSpaceLayout; } WorkSpaceLayout;
/** Optional tags, which features to use, aligned with #bAddon names by convention. */ /** Optional tags, which features to use, aligned with #bAddon names by convention. */
typedef struct wmOwnerID { typedef struct wmOwnerID {
struct wmOwnerID *next, *prev; struct wmOwnerID *next, *prev;
char name[64] DNA_PRIVATE_WORKSPACE; /* MAX_NAME */ /** MAX_NAME. */
char name[64] DNA_PRIVATE_WORKSPACE;
} wmOwnerID; } wmOwnerID;
typedef struct WorkSpace { typedef struct WorkSpace {
ID id; ID id;
ListBase layouts DNA_PRIVATE_WORKSPACE; /* WorkSpaceLayout */ /** WorkSpaceLayout. */
ListBase layouts DNA_PRIVATE_WORKSPACE;
/* Store for each hook (so for each window) which layout has /* Store for each hook (so for each window) which layout has
* been activated the last time this workspace was visible. */ * been activated the last time this workspace was visible. */
ListBase hook_layout_relations DNA_PRIVATE_WORKSPACE_READ_WRITE; /* WorkSpaceDataRelation */ /** WorkSpaceDataRelation. */
ListBase hook_layout_relations DNA_PRIVATE_WORKSPACE_READ_WRITE;
/* Feature tagging (use for addons) */ /* Feature tagging (use for addons) */
ListBase owner_ids DNA_PRIVATE_WORKSPACE_READ_WRITE; /* wmOwnerID */ /** WmOwnerID. */
ListBase owner_ids DNA_PRIVATE_WORKSPACE_READ_WRITE;
/* should be: '#ifdef USE_WORKSPACE_TOOL'. */ /* should be: '#ifdef USE_WORKSPACE_TOOL'. */
@@ -148,7 +153,8 @@ typedef struct WorkSpace {
int object_mode; int object_mode;
int flags DNA_PRIVATE_WORKSPACE; /* enum eWorkSpaceFlags */ /** Enum eWorkSpaceFlags. */
int flags DNA_PRIVATE_WORKSPACE;
/* Number for workspace tab reordering in the UI. */ /* Number for workspace tab reordering in the UI. */
int order; int order;

View File

@@ -50,8 +50,10 @@ struct MTex;
* gravity, color model etc. It mixes rendering data and modeling data. */ * gravity, color model etc. It mixes rendering data and modeling data. */
typedef struct World { typedef struct World {
ID id; ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ /** Animation data (must be immediately after id for utilities to use it). */
DrawDataList drawdata; /* runtime (must be immediately after id for utilities to use it). */ struct AnimData *adt;
/* runtime (must be immediately after id for utilities to use it). */
DrawDataList drawdata;
char _pad0[4]; char _pad0[4];
short texact, mistype; short texact, mistype;
@@ -70,18 +72,19 @@ typedef struct World {
* Some world modes * Some world modes
* bit 0: Do mist * bit 0: Do mist
*/ */
short mode; // partially moved to scene->gamedata in 2.5 short mode;
short pad2[3]; short pad2[3];
float misi, miststa, mistdist, misthi; float misi, miststa, mistdist, misthi;
/* ambient occlusion */ /** Ambient occlusion. */
float aodist, aoenergy; float aodist, aoenergy;
/* assorted settings */ /** Assorted settings. */
short flag, pad3[3]; short flag, pad3[3];
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ /** Old animation system, deprecated for 2.5. */
struct Ipo *ipo DNA_DEPRECATED;
short pr_texture, use_nodes, pad[2]; short pr_texture, use_nodes, pad[2];
/* previews */ /* previews */
@@ -90,8 +93,10 @@ typedef struct World {
/* nodes */ /* nodes */
struct bNodeTree *nodetree; struct bNodeTree *nodetree;
float mistend, pad1; /* runtime : miststa + mistdist, used for drawing camera */ /** Runtime : miststa + mistdist, used for drawing camera. */
ListBase gpumaterial; /* runtime */ float mistend, pad1;
/** Runtime. */
ListBase gpumaterial;
} World; } World;
/* **************** WORLD ********************* */ /* **************** WORLD ********************* */