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 {
void *pointer;
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;
typedef struct IDProperty {
struct IDProperty *next, *prev;
char type, subtype;
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.
* seemed like a good idea as a pad var was needed anyway :) */
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.
* 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. */
};
/* A single overridden property, contain all operations on this one. */
/** A single overridden property, contain all operations on this one. */
typedef struct IDOverrideStaticProperty {
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;
ListBase operations; /* List of overriding operations (IDOverridePropertyOperation) applied to this property. */
/** List of overriding operations (IDOverridePropertyOperation) applied to this property. */
ListBase operations;
} IDOverrideStaticProperty;
/* Main container for all overriding data info of a data-block. */
typedef struct IDOverrideStatic {
struct ID *reference; /* Reference linked ID which this one overrides. */
ListBase properties; /* List of IDOverrideProperty structs. */
/** Reference linked ID which this one overrides. */
struct ID *reference;
/** List of IDOverrideProperty structs. */
ListBase properties;
short flag;
short pad[3];
@@ -230,9 +239,11 @@ typedef struct ID {
void *next, *prev;
struct ID *newid;
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;
/**
@@ -245,9 +256,11 @@ typedef struct ID {
int pad;
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.
*/
struct ID *orig_id;
@@ -262,21 +275,27 @@ typedef struct ID {
typedef struct Library {
ID id;
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.
* 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];
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;
/* Temp data needed by read/write code. */
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;
enum eIconSizes {
@@ -309,9 +328,11 @@ typedef struct PreviewImage {
/* Runtime-only data. */
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];
} PreviewImage;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -77,10 +77,13 @@ typedef struct CameraBGImage {
typedef struct Camera {
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 */
char dtx; /* draw type extra */
/** CAM_PERSP, CAM_ORTHO or CAM_PANO. */
char type;
/** Draw type extra. */
char dtx;
short flag;
float passepartalpha;
float clipsta, clipend;
@@ -93,7 +96,8 @@ typedef struct Camera {
* The name was not changed so that no other files need to be modified */
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 GPUDOFSettings gpu_dof;

View File

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

View File

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

View File

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

View File

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

View File

@@ -53,7 +53,8 @@ struct GHash;
#
#
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 radius, weight;
} PathPoint;
@@ -72,8 +73,10 @@ typedef struct Path {
#
typedef struct BevPoint {
float vec[3], alfa, radius, weight, offset;
float sina, cosa; /* 2D Only */
float dir[3], tan[3], quat[4]; /* 3D Only */
/** 2D Only. */
float sina, cosa;
/** 3D Only. */
float dir[3], tan[3], quat[4];
short split_tag, dupe_tag;
} BevPoint;
@@ -109,29 +112,41 @@ typedef struct BevList {
*/
typedef struct BezTriple {
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 */
char f1, f2, f3; /* f1, f2, f3: used for selection status */
/** H1, h2: the handle type of the two handles. */
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) */
float back; /* BEZT_IPO_BACK */
float amplitude, period; /* BEZT_IPO_ELASTIC */
/** Easing: easing type for interpolation mode (eBezTriple_Easing). */
char easing;
/** 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];
} BezTriple;
/* note; alfa location in struct is abused by Key system */
typedef struct BPoint {
float vec[4];
float alfa, 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 radius, pad; /* user-set radius per point for beveling etc */
/** Alfa: tilt in 3D View, weight: used for softbody goal weight. */
float alfa, weight;
/** F1: selection status, hide: is point hidden or not. */
short f1, hide;
/** User-set radius per point for beveling etc. */
float radius, pad;
} BPoint;
/**
@@ -139,13 +154,17 @@ typedef struct BPoint {
* also, it should be NURBS (Nurb isn't the singular of Nurbs).
*/
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 mat_nr; /* index into material list */
/** Index into material list. */
short mat_nr;
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 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 flagu, flagv;
@@ -153,7 +172,8 @@ typedef struct Nurb {
BPoint *bp;
BezTriple *bezt;
short tilt_interp; /* KEY_LINEAR, KEY_CARDINAL, KEY_BSPLINE */
/** KEY_LINEAR, KEY_CARDINAL, KEY_BSPLINE. */
short tilt_interp;
short radius_interp;
/* only used for dynamically generated Nurbs created from OB_FONT's */
@@ -162,7 +182,8 @@ typedef struct Nurb {
typedef struct CharInfo {
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 pad;
short pad2;
@@ -187,16 +208,20 @@ typedef struct EditNurb {
typedef struct Curve {
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;
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 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 Material **mat;
@@ -205,9 +230,11 @@ typedef struct Curve {
float size[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;
float twist_smooth, smallcaps_scale;
@@ -241,8 +268,10 @@ typedef struct Curve {
int selstart, selend;
/* text data */
int len_wchar; /* number of characters (strinfo) */
int len; /* number of bytes (str - utf8) */
/** Number of characters (strinfo). */
int len_wchar;
/** Number of bytes (str - utf8). */
int len;
char *str;
struct EditFont *editfont;
@@ -260,7 +289,8 @@ typedef struct Curve {
/* 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;
char bevfac1_mapping, bevfac2_mapping;

View File

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

View File

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

View File

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

View File

@@ -37,7 +37,8 @@
* the moment of saving, and the file-specific settings.
*/
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 minversion, minsubversion;
char pad[6];
@@ -48,10 +49,12 @@ typedef struct FileGlobal {
int fileflags;
int globalf;
uint64_t build_commit_timestamp; /* commit timestamp from buildinfo */
char build_hash[16]; /* hash from buildinfo */
/* file path where this was saved, for recover */
char filename[1024]; /* 1024 = FILE_MAX */
/** Commit timestamp from buildinfo. */
uint64_t build_commit_timestamp;
/** Hash from buildinfo. */
char build_hash[16];
/** File path where this was saved, for recover (1024 = FILE_MAX). */
char filename[1024];
} FileGlobal;

View File

@@ -116,16 +116,21 @@ enum {
typedef struct FreestyleLineSet {
struct FreestyleLineSet *next, *prev;
char name[64]; /* line set name, MAX_NAME */
/** Line set name, MAX_NAME. */
char name[64];
int flags;
int selection; /* selection criteria */
short qi; /* quantitative invisibility */
/** Selection criteria. */
int selection;
/** Quantitative invisibility. */
short qi;
short pad1;
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;
struct Collection *group; /* group of target objects */
/** Group of target objects. */
struct Collection *group;
struct FreestyleLineStyle *linestyle;
} FreestyleLineSet;
@@ -141,12 +146,15 @@ typedef struct FreestyleModuleConfig {
typedef struct FreestyleConfig {
ListBase modules;
int mode; /* scripting, editor */
/** Scripting, editor. */
int mode;
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 dkr_epsilon;
float crease_angle; /* in radians! */
/** In radians!. */
float crease_angle;
ListBase linesets;
} FreestyleConfig;

View File

@@ -35,11 +35,14 @@
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
* 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 int DNAlen; /* length of DNAstr */
/** Length of DNAstr. */
extern const int DNAlen;
/**
* Primitive (non-struct, non-pointer/function/array) types,

View File

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

View File

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

View File

@@ -32,9 +32,10 @@
#ifndef __DNA_GPU_TYPES_H__
#define __DNA_GPU_TYPES_H__
/* properties for dof effect */
/** Properties for dof effect. */
typedef struct GPUDOFSettings {
float focus_distance; /* focal distance for depth of field */
/** Focal distance for depth of field. */
float focus_distance;
float fstop;
float focal_length;
float sensor;
@@ -44,20 +45,22 @@ typedef struct GPUDOFSettings {
int high_quality;
} GPUDOFSettings;
/* properties for SSAO effect */
/** Properties for SSAO effect. */
typedef struct GPUSSAOSettings {
float factor;
float color[3];
float distance_max;
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;
} GPUSSAOSettings;
typedef struct GPUFXSettings {
GPUDOFSettings *dof;
GPUSSAOSettings *ssao;
char fx_flag; /* eGPUFXFlags */
/** EGPUFXFlags. */
char fx_flag;
char pad[7];
} GPUFXSettings;

View File

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

View File

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

View File

@@ -45,25 +45,36 @@ struct Ipo;
typedef struct KeyBlock {
struct KeyBlock *next, *prev;
float pos; /* point in time (Key->type == KEY_NORMAL) only,
* for historic reasons this is relative to (Key->ctime / 100),
* so this value increments by 0.1f per frame. */
float curval; /* influence (typically [0 - 1] but can be more), (Key->type == KEY_RELATIVE) only.*/
/**
* point in time (Key->type == KEY_NORMAL) only,
* for historic reasons this is relative to (Key->ctime / 100),
* so this value increments by 0.1f per frame.
*/
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 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;
int totelem; /* 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 */
/** total number if items in the keyblock (compare with mesh/curve verts to check we match) */
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) */
char name[64]; /* MAX_NAME (unique name, user assigned) */
char vgroup[64]; /* MAX_VGROUP_NAME (optional vertex group), array gets allocated into 'weights' when set */
/** array of shape key values, size is (Key->elemsize * KeyBlock->totelem) */
void *data;
/** 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 slidermax;
@@ -72,36 +83,48 @@ typedef struct KeyBlock {
typedef struct Key {
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',
* 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;
/* 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
* (each one char) used for calculating shape key-blocks */
* (each one char) used for calculating shape key-blocks. */
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;
ListBase block; /* list of KeyBlock's */
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
/** list of KeyBlock's */
ListBase block;
/** old animation system, deprecated for 2.5 */
struct Ipo *ipo DNA_DEPRECATED;
ID *from;
int totkey; /* (totkey == BLI_listbase_count(&key->block)) */
/** (totkey == BLI_listbase_count(&key->block)) */
int totkey;
short flag;
char type; /* absolute or relative shape key */
/** absolute or relative shape key */
char type;
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 */
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 ********************* */

View File

@@ -47,7 +47,8 @@ struct MTex;
typedef struct Lamp {
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;
int mode;
@@ -57,7 +58,8 @@ typedef struct Lamp {
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;
struct CurveMapping *curfalloff;
short falloff_type;
@@ -74,7 +76,8 @@ typedef struct Lamp {
/* texact is for buttons */
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;
char pad6[4];

View File

@@ -56,17 +56,20 @@ typedef struct Lattice {
short pntsu, pntsv, pntsw, flag;
short opntsu, opntsv, opntsw, pad2;
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;
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 MDeformVert *dvert;
char vgroup[64]; /* multiply the influence, MAX_VGROUP_NAME */
/** Multiply the influence, MAX_VGROUP_NAME. */
char vgroup[64];
struct EditLatt *editlatt;
void *batch_cache;

View File

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

View File

@@ -41,32 +41,46 @@ struct AnimData;
typedef struct LightProbe {
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 */
char flag; /* General purpose flags for probes */
char attenuation_type; /* Attenuation type */
char parallax_type; /* Parallax type */
/** For realtime probe objects. */
char type;
/** General purpose flags for probes. */
char flag;
/** Attenuation type. */
char attenuation_type;
/** Parallax type. */
char parallax_type;
float distinf; /* Influence Radius */
float distpar; /* Parallax Radius */
float falloff; /* Influence falloff */
/** Influence Radius. */
float distinf;
/** Parallax Radius. */
float distpar;
/** Influence falloff. */
float falloff;
float clipsta, clipend;
float vis_bias, vis_bleedbias; /* VSM visibility biases */
/** VSM visibility biases. */
float vis_bias, vis_bleedbias;
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_z;
int pad1;
struct Object *parallax_ob; /* Object to use as a parallax origin */
struct Image *image; /* Image to use on as lighting data */
struct Collection *visibility_grp; /* Object visibility group, inclusive or exclusive */
/** Object to use as a parallax origin. */
struct Object *parallax_ob;
/** Image to use on as lighting data. */
struct Image *image;
/** Object visibility group, inclusive or exclusive. */
struct Collection *visibility_grp;
/* Runtime display data */
float distfalloff, distgridinf;
@@ -119,9 +133,11 @@ typedef struct LightProbeCache {
typedef struct LightGridCache {
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 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_z[3], pad4;
float visibility_bias, visibility_bleed, visibility_range, pad5;
@@ -142,16 +158,21 @@ typedef struct LightCacheTexture {
typedef struct LightCache {
int flag;
/* only a single cache for now */
int cube_len, grid_len; /* Number of probes to use for rendering. */
int mips_len; /* Number of mipmap level to use. */
int vis_res, ref_res; /* Size of a visibility/reflection sample. */
/** Number of probes to use for rendering. */
int cube_len, grid_len;
/** Number of mipmap level to use. */
int mips_len;
/** Size of a visibility/reflection sample. */
int vis_res, ref_res;
int pad[2];
/* In the future, we could create a bigger texture containing
* multiple caches (for animation) and interpolate between the
* caches overtime to another texture. */
LightCacheTexture grid_tx;
LightCacheTexture cube_tx; /* Contains data for mipmap level 0. */
LightCacheTexture *cube_mips; /* Does not contains valid GPUTexture, only data. */
/** Contains data for mipmap level 0. */
LightCacheTexture cube_tx;
/** Does not contains valid GPUTexture, only data. */
LightCacheTexture *cube_mips;
/* All lightprobes data contained in the cache. */
LightProbeCache *cube_data;
LightGridCache *grid_data;

View File

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

View File

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

View File

@@ -48,36 +48,61 @@ struct Ipo;
/* WATCH IT: change type? also make changes in ipo.h */
typedef struct TexPaintSlot {
struct Image *ima; /* image to be painted on */
char *uvname; /* customdata index for uv layer, MAX_NAME*/
int valid; /* do we have a valid image and UV map */
/** Image to be painted on. */
struct Image *ima;
/** Customdata index for uv layer, MAX_NAM.E*/
char *uvname;
/** Do we have a valid image and UV map. */
int valid;
int pad;
} TexPaintSlot;
typedef struct MaterialGPencilStyle {
struct Image *sima; /* Texture image for strokes */
struct Image *ima; /* Texture image for filling */
float stroke_rgba[4]; /* color for paint and strokes (alpha included) */
float fill_rgba[4]; /* color that should be used for drawing "fills" for strokes (alpha included) */
float mix_rgba[4]; /* secondary color used for gradients and other stuff */
short flag; /* settings */
short index; /* custom index for passes */
short stroke_style; /* style for drawing strokes (used to select shader type) */
short fill_style; /* style for filling areas (used to select shader type) */
float mix_factor; /* factor used to define shader behavior (several uses) */
float gradient_angle; /* angle used for gradients orientation */
float gradient_radius; /* radius for radial gradients */
float pattern_gridsize; /* cheesboard size */
float gradient_scale[2]; /* uv coordinates scale */
float gradient_shift[2]; /* factor to shift filling in 2d space */
float texture_angle; /* angle used for texture orientation */
float texture_scale[2]; /* texture scale (separated of uv scale) */
float texture_offset[2]; /* factor to shift texture in 2d space */
float texture_opacity; /* texture opacity */
float texture_pixsize; /* pixel size for uv along the stroke */
int mode; /* drawing mode (line or dots) */
/** Texture image for strokes. */
struct Image *sima;
/** Texture image for filling. */
struct Image *ima;
/** Color for paint and strokes (alpha included). */
float stroke_rgba[4];
/** Color that should be used for drawing "fills" for strokes (alpha included). */
float fill_rgba[4];
/** Secondary color used for gradients and other stuff. */
float mix_rgba[4];
/** Settings. */
short flag;
/** Custom index for passes. */
short index;
/** Style for drawing strokes (used to select shader type). */
short stroke_style;
/** Style for filling areas (used to select shader type). */
short fill_style;
/** Factor used to define shader behavior (several uses). */
float mix_factor;
/** 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];
} MaterialGPencilStyle;
@@ -113,7 +138,8 @@ typedef enum eMaterialGPencilStyle_Mode {
typedef struct Material {
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];
@@ -123,7 +149,8 @@ typedef struct Material {
float alpha DNA_DEPRECATED;
float ray_mirror DNA_DEPRECATED;
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 metallic;
float pad4[2];
@@ -136,7 +163,8 @@ typedef struct Material {
short index;
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;
/* Freestyle line settings. */
@@ -158,14 +186,16 @@ typedef struct Material {
char blend_flag;
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;
/* Runtime cache for GLSL materials. */
/** Runtime cache for GLSL materials. */
ListBase gpumaterial;
/* grease pencil color */
/** Grease pencil color. */
struct MaterialGPencilStyle *gp_style;
} Material;

View File

@@ -115,11 +115,13 @@ typedef struct Mesh_Runtime {
typedef struct Mesh {
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 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 Material **mat;
struct MSelect *mselect;
@@ -134,12 +136,18 @@ typedef struct Mesh {
/* mface stores the tessellation (triangulation) of the mesh,
* real faces are now stored in nface.*/
struct MFace *mface; /* array of mesh object mode faces for tessellation */
struct MTFace *mtface; /* store tessellation face UV's and texture here */
struct TFace *tface DNA_DEPRECATED; /* deprecated, use mtface */
struct MVert *mvert; /* array of verts */
struct MEdge *medge; /* array of edges */
struct MDeformVert *dvert; /* deformgroup vertices */
/** Array of mesh object mode faces for tessellation. */
struct MFace *mface;
/** Store tessellation face UV's and texture here. */
struct MTFace *mtface;
/** Deprecated, use mtface. */
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
* faces * 4 in length */
@@ -147,7 +155,8 @@ typedef struct Mesh {
struct Mesh *texcomesh;
/* 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;
@@ -179,12 +188,14 @@ typedef struct Mesh {
char cd_flag, pad;
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;
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;
@@ -192,7 +203,8 @@ typedef struct Mesh {
/* deprecated by MTFace, only here for file reading */
#ifdef DNA_DEPRECATED
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];
unsigned int col[4];
char flag, transp;

View File

@@ -41,7 +41,8 @@ struct Image;
typedef struct MFace {
unsigned int v1, v2, v3, v4;
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;
typedef struct MEdge {
@@ -58,7 +59,8 @@ typedef struct MDeformWeight {
typedef struct MDeformVert {
struct MDeformWeight *dw;
int totweight;
int flag; /* flag only in use for weightpaint now */
/** Flag only in use for weightpaint now. */
int flag;
} MDeformVert;
typedef struct MVert {
@@ -78,15 +80,18 @@ typedef struct MCol {
typedef struct MPoly {
/* offset into loop array and number of loops in the face */
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;
char flag, pad;
} MPoly;
/* the e here is because we want to move away from relying on edge hashes.*/
typedef struct MLoop {
unsigned int v; /* vertex index */
unsigned int e; /* edge index */
/** Vertex index. */
unsigned int v;
/** Edge index. */
unsigned int e;
} MLoop;
/**
@@ -237,7 +242,8 @@ typedef struct MLoopCol {
typedef struct MSelect {
int index;
int type; /* ME_VSEL/ME_ESEL/ME_FSEL */
/** ME_VSEL/ME_ESEL/ME_FSEL. */
int type;
} MSelect;
/*tessellation uv face data*/

View File

@@ -45,21 +45,30 @@ struct Material;
typedef struct MetaElem {
struct MetaElem *next, *prev;
struct BoundBox *bb; /* Bound Box of MetaElem */
/** Bound Box of MetaElem. */
struct BoundBox *bb;
short type, flag;
short pad[2];
float x, y, z; /* Position of center of MetaElem */
float quat[4]; /* Rotation of MetaElem (MUST be kept normalized) */
float expx; /* dimension parameters, used for some types like cubes */
/** Position of center of MetaElem. */
float x, y, z;
/** Rotation of MetaElem (MUST be kept normalized). */
float quat[4];
/** Dimension parameters, used for some types like cubes. */
float expx;
float expy;
float expz;
float rad; /* radius of the meta element */
float rad2; /* temp field, used only while processing */
float s; /* stiffness, how much of the element to fill */
float len; /* old, only used for backwards compat. use dimensions now */
/** Radius of the meta element. */
float rad;
/** Temp field, used only while processing. */
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;
typedef struct MetaBall {
@@ -68,22 +77,27 @@ typedef struct MetaBall {
ListBase elems;
ListBase disp;
ListBase *editelems; /* not saved in files, note we use pointer for editmode check */
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
/** Not saved in files, note we use pointer for editmode check. */
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 */
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 texflag, pad; /* used to store MB_AUTOSPACE */
/** Used to store MB_AUTOSPACE. */
short texflag, pad;
/* texture space, copied as one block in editobject.c */
float loc[3];
float size[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.
* mother ball changes will effect other objects thresholds,

View File

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

View File

@@ -48,73 +48,111 @@ struct MovieTrackingTrack;
struct MovieTrackingMarker;
typedef struct MovieClipUser {
int framenr; /* current frame number */
short render_size, render_flag; /* proxy render size */
/** Current frame number. */
int framenr;
/** Proxy render size. */
short render_size, render_flag;
} MovieClipUser;
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 */
short quality; /* proxy build quality */
short build_size_flag; /* size flags (see below) of all proxies to build */
short build_tc_flag; /* time code flags (see below) of all tc indices to build */
/** Time code in use. */
short tc;
/** Proxy build quality. */
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;
typedef struct MovieClip {
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 */
int lastframe; /* last accessed frame number */
int lastsize[2]; /* size of last accessed frame */
/** Sequence or movie. */
int source;
/** 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 */
struct MovieClipCache *cache; /* cache for different stuff, not in file */
struct bGPdata *gpd; /* grease pencil data */
/** Movie source data. */
struct anim *anim;
/** Cache for different stuff, not in file. */
struct MovieClipCache *cache;
/** Grease pencil data. */
struct bGPdata *gpd;
struct MovieTracking tracking; /* data for SfM tracking */
void *tracking_context; /* context of tracking job
* used to synchronize data like framenumber
* in SpaceClip clip user */
/** Data for SfM tracking. */
struct MovieTracking tracking;
/**
* 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 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 */
/* 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 */
/* to a file name and not touches other data associated with */
/* a clip */
/**
* Scene frame number footage starts playing at affects all data
* which is associated with a clip such as motion tracking,
* camera reconstruciton and so.
*/
int start_frame;
/**
* 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 */
ColorManagedColorspaceSettings colorspace_settings;
} MovieClip;
typedef struct MovieClipScopes {
short ok; /* 1 means scopes are ok and recalculation is unneeded */
short use_track_mask; /* whether track's mask should be applied on preview */
int track_preview_height; /* height of track preview widget */
int frame_width, frame_height; /* width and height of frame for which scopes are calculated */
struct MovieTrackingMarker undist_marker; /* undistorted position of marker used for pattern sampling */
struct ImBuf *track_search; /* search area of a track */
struct ImBuf *track_preview; /* ImBuf displayed in track preview */
float track_pos[2]; /* sub-pizel position of marker in track ImBuf */
short track_disabled; /* active track is disabled, special notifier should be drawn */
short track_locked; /* active track is locked, no transformation should be allowed */
int framenr; /* frame number scopes are created for */
struct MovieTrackingTrack *track; /* track scopes are created for */
struct MovieTrackingMarker *marker; /* marker scopes are created for */
float slide_scale[2]; /* scale used for sliding from previewe area */
/** 1 means scopes are ok and recalculation is unneeded. */
short ok;
/** Whether track's mask should be applied on preview. */
short use_track_mask;
/** Height of track preview widget. */
int track_preview_height;
/** Width and height of frame for which scopes are calculated. */
int frame_width, frame_height;
/** Undistorted position of marker used for pattern sampling. */
struct MovieTrackingMarker undist_marker;
/** Search area of a track. */
struct ImBuf *track_search;
/** ImBuf displayed in track preview. */
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;
/* MovieClipProxy->build_size_flag */

View File

@@ -60,25 +60,40 @@ typedef struct bActionModifier {
typedef struct bActionStrip {
struct bActionStrip *next, *prev;
short flag, mode;
short stride_axis; /* axis 0=x, 1=y, 2=z */
short curmod; /* current modifier for buttons */
/** Axis 0=x, 1=y, 2=z. */
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. */
struct bAction *act; /* The action referenced by this strip */
struct Object *object; /* For groups, the actual object being nla'ed */
float start, end; /* The range of frames covered by this strip */
float actstart, actend; /* The range of frames taken from the action */
float actoffs; /* Offset within action, for cycles and striding */
float stridelen; /* The stridelength (considered when flag & ACT_USESTRIDE) */
float repeat; /* The number of times to repeat the action range */
float scale; /* The amount the action range is scaled by */
/** Blending ipo - was used for some old NAN era experiments. Non-functional currently. */
struct Ipo *ipo;
/** The action referenced by this strip. */
struct bAction *act;
/** For groups, the actual object being nla'ed. */
struct Object *object;
/** The range of frames covered by this strip. */
float start, end;
/** 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 */
char offs_bone[32]; /* if repeat, use this bone/channel for defining offset */
/** Instead of stridelen, it uses an action channel. */
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;
/* strip->mode (these defines aren't really used, but are here for reference) */
@@ -89,12 +104,14 @@ typedef struct bActionStrip {
typedef enum eActStrip_Flag {
ACTSTRIP_SELECT = (1<<0),
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_ACTIVE = (1<<4),
ACTSTRIP_LOCK_ACTION = (1<<5),
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_USEY = (1<<9),
ACTSTRIP_CYCLIC_USEZ = (1<<10),

View File

@@ -62,12 +62,18 @@ typedef struct bNodeStack {
float vec[4];
float min, max;
void *data;
short hasinput; /* when input has link, tagged before executing */
short hasoutput; /* when output is linked, tagged before executing */
short datatype; /* type of data pointer */
short sockettype; /* type of socket stack comes from, to remap linking different sockets */
short is_copy; /* data is a copy of external data (no freeing) */
short external; /* data is used by external nodes (no freeing) */
/** When input has link, tagged before executing. */
short hasinput;
/** When output is linked, tagged before executing. */
short hasoutput;
/** Type of data pointer. */
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];
} bNodeStack;
@@ -86,48 +92,62 @@ typedef struct bNodeStack {
typedef struct bNodeSocket {
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,
* should be removed at some point.
*/
void *storage; /* custom storage */
/** Custom storage. */
void *storage;
short type, flag;
short limit; /* max. number of links */
short in_out; /* input/output type */
struct bNodeSocketType *typeinfo; /* runtime type information */
char idname[64]; /* runtime type identifier */
/** Max. number of links. */
short limit;
/** Input/output type. */
short in_out;
/** Runtime type information. */
struct bNodeSocketType *typeinfo;
/** Runtime type identifier. */
char idname[64];
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 */
short stack_index; /* local stack index */
/** Local stack index. */
short stack_index;
/* XXX deprecated, kept for forward compatibility */
short stack_type DNA_DEPRECATED;
char draw_shape, pad[3];
void *cache; /* cached data from execution */
/** Cached data from execution. */
void *cache;
/* internal data to retrieve relations and groups
* 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 */
int to_index DNA_DEPRECATED;
/* XXX deprecated, still forward compatible since verification restores pointer from matching own_index. */
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 */
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;
/* sock->type */
@@ -173,45 +193,73 @@ typedef enum eNodeSocketFlag {
typedef struct bNode {
struct bNode *next, *prev, *new_node;
IDProperty *prop; /* user-defined properties */
/** User-defined properties. */
IDProperty *prop;
struct bNodeType *typeinfo; /* runtime type information */
char idname[64]; /* runtime type identifier */
/** Runtime type information. */
struct bNodeType *typeinfo;
/** Runtime type identifier. */
char idname[64];
char name[64]; /* MAX_NAME */
/** MAX_NAME. */
char name[64];
int flag;
short type, pad;
short done, level; /* both for dependency and sorting */
short lasty, menunr; /* lasty: check preview render status, menunr: browse ID blocks */
short stack_index; /* for groupnode, offset in global caller stack */
short nr; /* number of this node in list, used for UI exec events */
float color[3]; /* custom user-defined color */
/** Both for dependency and sorting. */
short done, level;
/** Lasty: check preview render status, menunr: browse ID blocks. */
short lasty, menunr;
/** 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;
struct bNode *parent; /* parent node */
struct ID *id; /* optional link to libdata */
void *storage; /* custom data, must be struct, for storage in file */
struct bNode *original; /* the original node in the tree (for localized tree) */
ListBase internal_links; /* list of cached internal links (input to output), for muted nodes and operators */
/** Parent node. */
struct bNode *parent;
/** Optional link to libdata. */
struct ID *id;
/** 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) */
float width, height; /* node custom width and height */
float miniwidth; /* node width if hidden */
float offsetx, offsety; /* additional offset from loc */
float anim_init_locx; /* initial locx for insert offset animation */
float anim_ofsx; /* offset that will be added to locx for insert offset animation */
/** Root offset for drawing (parent space). */
float locx, locy;
/** Node custom width and height. */
float width, height;
/** Node width if hidden. */
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 */
short custom1, custom2; /* to be abused for buttons */
/** Custom user-defined label, MAX_NAME. */
char label[64];
/** To be abused for buttons. */
short custom1, custom2;
float custom3, custom4;
short need_exec, 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!) */
rctf totr; /* entire boundbox (worldspace) */
rctf butr; /* optional buttons area */
rctf prvr; /* optional preview area */
/** Need_exec is set as UI execution event, exec is flag during exec. */
short need_exec, exec;
/** Optional extra storage for use in thread (read only then!). */
void *threaddata;
/** Entire boundbox (worldspace). */
rctf totr;
/** Optional buttons area. */
rctf butr;
/** Optional preview area. */
rctf prvr;
/* XXX TODO
* 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
@@ -220,12 +268,23 @@ typedef struct bNode {
* could be replaced by more accurate node instance drawing, but that requires removing totr from DNA
* and replacing all uses with per-instance data.
*/
short preview_xsize, preview_ysize; /* reserved size of the preview rect */
short tmp_flag, pad2; /* Used at runtime when going through the tree. Initialize before use. */
struct uiBlock *block; /* runtime during drawing */
/** Reserved size of the preview rect. */
short preview_xsize, preview_ysize;
/** 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;
/* node->flag */
@@ -298,7 +357,8 @@ typedef struct bNodeInstanceHashEntry {
typedef struct bNodePreview {
bNodeInstanceHashEntry hash_entry; /* must be first */
/** Must be first. */
bNodeInstanceHashEntry hash_entry;
unsigned char *rect;
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 */
typedef struct bNodeTree {
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 */
char idname[64]; /* runtime type identifier */
/** Runtime type information. */
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 */
float view_center[2]; /* node tree stores own offset for consistent editor view */
/** Grease pencil data. */
struct bGPdata *gpd;
/** Node tree stores own offset for consistent editor view. */
float view_center[2];
ListBase nodes, links;
int type, init; /* set init on fileread */
int cur_index; /* sockets in groups have unique identifiers, adding new sockets always
* will increase this counter */
/** Set init on fileread. */
int type, init;
/**
* Sockets in groups have unique identifiers, adding new sockets always
* will increase this counter.
*/
int cur_index;
int flag;
int update; /* update flags */
short is_updating; /* flag to prevent reentrant update calls */
short done; /* generic temporary flag for recursion check (DFS/BFS) */
/** Update flags. */
int update;
/** Flag to prevent reentrant update calls. */
short is_updating;
/** Generic temporary flag for recursion check (DFS/BFS). */
short done;
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 */
short render_quality; /* Quality setting when rendering */
int chunksize; /* tile size for compositor engine */
/** Quality setting when editing. */
short edit_quality;
/** Quality setting when rendering. */
short render_quality;
/** Tile size for compositor engine. */
int chunksize;
rctf viewer_border;
@@ -450,13 +527,15 @@ typedef enum eNodeTreeUpdate {
*/
typedef struct bNodeSocketValueInt {
int subtype; /* RNA subtype */
/** RNA subtype. */
int subtype;
int value;
int min, max;
} bNodeSocketValueInt;
typedef struct bNodeSocketValueFloat {
int subtype; /* RNA subtype */
/** RNA subtype. */
int subtype;
float value;
float min, max;
} bNodeSocketValueFloat;
@@ -467,7 +546,8 @@ typedef struct bNodeSocketValueBoolean {
} bNodeSocketValueBoolean;
typedef struct bNodeSocketValueVector {
int subtype; /* RNA subtype */
/** RNA subtype. */
int subtype;
float value[3];
float min, max;
} bNodeSocketValueVector;
@@ -479,7 +559,8 @@ typedef struct bNodeSocketValueRGBA {
typedef struct bNodeSocketValueString {
int subtype;
int pad;
char value[1024]; /* 1024 = FILEMAX */
/** 1024 = FILEMAX. */
char value[1024];
} bNodeSocketValueString;
/* data structs, for node->storage */
@@ -587,7 +668,8 @@ typedef struct NodeImageLayer {
/* index in the Image->layers->passes lists */
int pass_index DNA_DEPRECATED;
/* render pass name */
char pass_name[64]; /* amount defined in openexr_multi.h */
/** Amount defined in openexr_multi.h. */
char pass_name[64];
} NodeImageLayer;
typedef struct NodeBlurData {
@@ -597,7 +679,8 @@ typedef struct NodeBlurData {
float fac, percentx, percenty;
short filtertype;
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;
typedef struct NodeDBlurData {
@@ -617,29 +700,36 @@ typedef struct NodeHueSat {
} NodeHueSat;
typedef struct NodeImageFile {
char name[1024]; /* 1024 = FILE_MAX */
/** 1024 = FILE_MAX. */
char name[1024];
struct ImageFormatData im_format;
int sfra, efra;
} NodeImageFile;
/* XXX first struct fields should match NodeImageFile to ensure forward compatibility */
typedef struct NodeImageMultiFile {
char base_path[1024]; /* 1024 = FILE_MAX */
/** 1024 = FILE_MAX. */
char base_path[1024];
ImageFormatData format;
int sfra DNA_DEPRECATED, efra DNA_DEPRECATED; /* XXX old frame rand values from NodeImageFile for forward compatibility */
int active_input; /* selected input in details view list */
/** XXX old frame rand values from NodeImageFile for forward compatibility. */
int sfra DNA_DEPRECATED, efra DNA_DEPRECATED;
/** Selected input in details view list. */
int active_input;
int pad;
} NodeImageMultiFile;
typedef struct NodeImageMultiFileSocket {
/* single layer file output */
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;
char path[1024]; /* 1024 = FILE_MAX */
/** 1024 = FILE_MAX. */
char path[1024];
ImageFormatData format;
/* 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];
} NodeImageMultiFileSocket;
@@ -672,8 +762,10 @@ typedef struct NodeDefocus {
} NodeDefocus;
typedef struct NodeScriptDict {
void *dict; /* for PyObject *dict */
void *node; /* for BPy_Node *node */
/** For PyObject *dict. */
void *dict;
/** For BPy_Node *node. */
void *node;
} NodeScriptDict;
/* qdn: glare node */
@@ -825,7 +917,8 @@ typedef struct NodeShaderTexPointDensity {
short interpolation;
short 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. */
PointDensity pd;
int cached_resolution;
@@ -878,7 +971,8 @@ typedef struct NodeShaderScript {
int mode;
int flag;
char filepath[1024]; /* 1024 = FILE_MAX */
/** 1024 = FILE_MAX. */
char filepath[1024];
char bytecode_hash[64];
char *bytecode;
@@ -902,7 +996,8 @@ typedef struct NodeShaderUVMap {
typedef struct NodeShaderTexIES {
int mode;
char filepath[1024]; /* 1024 = FILE_MAX */
/** 1024 = FILE_MAX. */
char filepath[1024];
} NodeShaderTexIES;
typedef struct NodeSunBeams {

View File

@@ -47,7 +47,8 @@ typedef struct FluidVertexVelocity {
} FluidVertexVelocity;
typedef struct FluidsimSettings {
struct FluidsimModifierData *fmd; /* for fast RNA access */
/** For fast RNA access. */
struct FluidsimModifierData *fmd;
/* threadcont the calculation is done with */
int threads;
int pad1;
@@ -102,7 +103,10 @@ typedef struct FluidsimSettings {
/* additional flags depending on the type, lower short contains flags
* to check validity, higher short additional flags */
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;
/* boundary "stickiness" for part slip values */
@@ -114,18 +118,19 @@ typedef struct FluidsimSettings {
float generateParticles;
/* smooth fluid surface? */
float surfaceSmoothing;
/* number of surface subdivisions*/
/** Number of surface subdivisions. */
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;
/* testing vars */
float farFieldSize;
/* vertex velocities of simulated fluid mesh */
/** Vertex velocities of simulated fluid mesh. */
struct FluidVertexVelocity *meshVelocities;
/* number of vertices in simulated fluid mesh */
/** Number of vertices in simulated fluid mesh. */
int totvert;
/* Fluid control settings */
@@ -140,7 +145,7 @@ typedef struct FluidsimSettings {
int lastgoodframe;
/* Simulation/flow rate control (i.e. old "Fac-Time") */
/** Simulation/flow rate control (i.e. old "Fac-Time"). */
float animRate;
} FluidsimSettings;

View File

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

View File

@@ -63,7 +63,8 @@ struct GpencilBatchCache;
/* Vertex Groups - Name Info */
typedef struct bDeformGroup {
struct bDeformGroup *next, *prev;
char name[64]; /* MAX_VGROUP_NAME */
/** MAX_VGROUP_NAME. */
char name[64];
/* need this flag for locking weights */
char flag, pad[7];
} bDeformGroup;
@@ -71,7 +72,8 @@ typedef struct bDeformGroup {
/* Face Maps*/
typedef struct bFaceMap {
struct bFaceMap *next, *prev;
char name[64]; /* MAX_VGROUP_NAME */
/** MAX_VGROUP_NAME. */
char name[64];
char flag;
char pad[7];
} bFaceMap;
@@ -134,98 +136,139 @@ struct ObjectBBoneDeform;
/* Not saved in file! */
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.
* Is assigned by dependency graph's copy-on-write evaluation.
*/
struct Mesh *mesh_orig;
/* Mesh structure created during object evaluation.
/**
* Mesh structure created during object evaluation.
* It has all modifiers applied.
*/
struct Mesh *mesh_eval;
/* Mesh structure created during object evaluation.
/**
* Mesh structure created during object evaluation.
* It has deforemation only modifiers applied on it.
*/
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;
/* Runtime grease pencil drawing data */
/** Runtime grease pencil drawing data */
struct GpencilBatchCache *gpencil_cache;
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;
/* Did last modifier stack generation need mapping support? */
/** Did last modifier stack generation need mapping support? */
char last_need_mapping;
char pad[7];
} Object_Runtime;
typedef struct Object {
ID id;
struct AnimData *adt; /* 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). */
/** Animation data (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;
short type, partype;
int par1, par2, par3; /* can be vertexnrs */
char parsubstr[64]; /* String describing subobject info, MAX_ID_NAME-2 */
/** Can be vertexnrs. */
int par1, par2, par3;
/** String describing subobject info, MAX_ID_NAME-2. */
char parsubstr[64];
struct Object *parent, *track;
/* if ob->proxy (or proxy_group), this object is proxy for object ob->proxy */
/* proxy_from is set in target back to the proxy. */
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 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 *poselib;
struct bPose *pose; /* pose data, armature objects only */
void *data; /* pointer to objects data - an 'ID' or NULL */
/** Pose data, armature objects only. */
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 */
bMotionPath *mpath; /* motion path cache for this object */
/** Settings for visualization of object-transform animation. */
bAnimVizSettings avs;
/** Motion path cache for this object. */
bMotionPath *mpath;
void *pad1;
ListBase constraintChannels DNA_DEPRECATED; // XXX deprecated... old animation system
ListBase effect DNA_DEPRECATED; // XXX deprecated... keep for readfile
ListBase defbase; /* list of bDeformGroup (vertex groups) names and flag only */
ListBase modifiers; /* list of ModifierData structures */
ListBase greasepencil_modifiers; /* list of GpencilModifierData structures */
ListBase fmaps; /* list of facemaps */
ListBase shader_fx; /* list of viewport effects. Actually only used by grease pencil */
/** List of bDeformGroup (vertex groups) names and flag only. */
ListBase defbase;
/** List of ModifierData structures. */
ListBase modifiers;
/** 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;
/* materials */
struct Material **mat; /* material slots */
char *matbits; /* a boolean field, with each byte 1 if corresponding material is linked to object */
int totcol; /* copy of mesh, curve & meta struct member of same name (keep in sync) */
int actcol; /* currently selected material in the UI */
/** Material slots. */
struct Material **mat;
/** A boolean field, with each byte 1 if corresponding material is linked to object. */
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')) */
float loc[3], dloc[3], orig[3];
float size[3]; /* scale in fact */
float dsize[3] DNA_DEPRECATED ; /* DEPRECATED, 2.60 and older only */
float dscale[3]; /* ack!, changing */
float rot[3], drot[3]; /* euler rotation */
float quat[4], dquat[4]; /* quaternion rotation */
float rotAxis[3], drotAxis[3]; /* axis angle rotation - axis part */
float rotAngle, drotAngle; /* axis angle rotation - angle part */
float obmat[4][4]; /* final worldspace matrix with constraints & animsys applied */
float parentinv[4][4]; /* inverse result of parent, so that object doesn't 'stick' to parent */
float constinv[4][4]; /* inverse result of constraints. doesn't include effect of parent or object local transform */
float imat[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...
* invert_m4_m4(ob->imat, ob->obmat); */
/** Scale in fact. */
float size[3];
/** DEPRECATED, 2.60 and older only. */
float dsize[3] DNA_DEPRECATED ;
/** Ack!, changing. */
float dscale[3];
/** Euler rotation. */
float rot[3], drot[3];
/** Quaternion rotation. */
float quat[4], dquat[4];
/** Axis angle rotation - axis part. */
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...
* 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
* 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];
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 */
short colbits DNA_DEPRECATED; /* deprecated, use 'matbits' */
/** Copy of Base. */
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 nlaflag; /* used for DopeSheet filtering settings (expanded/collapsed) */
/** Used for DopeSheet filtering settings (expanded/collapsed). */
short nlaflag;
short pad[2];
char pad12;
@@ -250,68 +298,97 @@ typedef struct Object {
int dupon, dupoff, dupsta, dupend;
/* Depsgraph */
short base_flag; /* used by depsgraph, flushed from base */
unsigned short base_local_view_bits; /* used by viewport, synced from base */
/** Used by depsgraph, flushed from base. */
short base_flag;
/** Used by viewport, synced from base. */
unsigned short base_local_view_bits;
/** Collision mask settings */
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 */
char collision_boundtype; /* bounding box type used for collision */
/** Bounding box use for drawing. */
char boundtype;
/** Bounding box type used for collision. */
char collision_boundtype;
short dtx; /* viewport draw extra settings */
char dt; /* viewport draw type */
/** Viewport draw extra settings. */
short dtx;
/** Viewport draw type. */
char dt;
char empty_drawtype;
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 */
unsigned short actdef; /* current deformation group, note: index starts at 1 */
unsigned short actfmap; /* current face map, note: index starts at 1 */
/** Custom index, for renderpasses. */
short index;
/** 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];
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;
short softflag; /* softbody settings */
/** Softbody settings. */
short softflag;
int pad2;
ListBase constraints; /* object constraints */
/** Object constraints. */
ListBase constraints;
ListBase nlastrips 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 */
struct SoftBody *soft; /* if exists, saved in file */
struct Collection *dup_group; /* object duplicator for group */
/** Particle deflector/attractor/collision data. */
struct PartDeflect *pd;
/** If exists, saved in file. */
struct SoftBody *soft;
/** Object duplicator for group. */
struct Collection *dup_group;
void *pad10;
char pad4;
char shapeflag; /* flag for pinning */
short shapenr; /* current shape key for menu or pinned */
float smoothresh; /* smoothresh is phong interpolation ray_shadow correction in render */
/** Flag for pinning. */
char shapeflag;
/** 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;
void *pad7;
ListBase pc_ids;
struct RigidBodyOb *rigidbody_object; /* settings for Bullet rigid body */
struct RigidBodyCon *rigidbody_constraint; /* settings for Bullet constraint */
/** Settings for Bullet rigid body. */
struct RigidBodyOb *rigidbody_object;
/** Settings for Bullet constraint. */
struct RigidBodyCon *rigidbody_constraint;
float ima_ofs[2]; /* offset for image empties */
ImageUser *iuser; /* must be non-null when object is an empty image */
/** Offset for image empties. */
float ima_ofs[2];
/** Must be non-null when object is an empty image. */
ImageUser *iuser;
char empty_image_visibility_flag;
char empty_image_depth;
char pad11[6];
ListBase lodlevels; /* contains data for levels of detail */
/** Contains data for levels of detail. */
ListBase lodlevels;
LodLevel *currentlod;
struct PreviewImage *preview;
@@ -332,16 +409,23 @@ typedef struct ObHook {
struct ObHook *next, *prev;
struct Object *parent;
float parentinv[4][4]; /* matrix making current transform unmodified */
float mat[4][4]; /* temp matrix while hooking */
float cent[3]; /* visualization of hook */
float falloff; /* if not zero, falloff is distance where influence zero */
/** Matrix making current transform unmodified. */
float parentinv[4][4];
/** Temp matrix while hooking. */
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 totindex, curindex; /* curindex is cache for fast lookup */
short type, active; /* active is only first hook, for button menu */
/** Curindex is cache for fast lookup. */
int totindex, curindex;
/** Active is only first hook, for button menu. */
short type, active;
float force;
} ObHook;
@@ -416,7 +500,7 @@ enum {
PARVERT3 = 6,
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,
};
@@ -429,16 +513,19 @@ enum {
OB_DUPLIVERTS = 1 << 4,
OB_DUPLIROT = 1 << 5,
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_DUPLIFACES = 1 << 9,
OB_DUPLIFACES_SCALE = 1 << 10,
OB_DUPLIPARTS = 1 << 11,
OB_TRANSLFAG_DEPRECATED_2 = 1 << 12,
OB_NO_CONSTRAINTS = 1 << 13, /* runtime constraints disable */
OB_NO_PSYS_UPDATE = 1 << 14, /* hack to work around particle issue */
/* runtime constraints disable */
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,
};
/* (short) trackflag / upflag */

View File

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

View File

@@ -39,20 +39,29 @@
struct AnimData;
typedef struct HairKey {
float co[3]; /* location of hair vertex */
float time; /* time along hair, default 0-100 */
float weight; /* softbody weight */
short editflag; /* saved particled edit mode flags */
/** Location of hair vertex. */
float co[3];
/** Time along hair, default 0-100. */
float time;
/** Softbody weight. */
float weight;
/** Saved particled edit mode flags. */
short editflag;
short pad;
float world_co[3];
} HairKey;
typedef struct ParticleKey { /* when changed update size of struct to copy_particleKey()!! */
float co[3]; /* location */
float vel[3]; /* velocity */
float rot[4]; /* rotation quaternion */
float ave[3]; /* angular velocity */
float time; /* when this key happens */
/** Location. */
float co[3];
/** Velocity. */
float vel[3];
/** Rotation quaternion. */
float rot[4];
/** Angular velocity. */
float ave[3];
/** When this key happens. */
float time;
} ParticleKey;
typedef struct BoidParticle {
@@ -70,10 +79,14 @@ typedef struct ParticleSpring {
/* Child particles are created around or between parent particles */
typedef struct ChildParticle {
int num, parent; /* num is face index on the final derived mesh */
int pa[4]; /* nearest particles to the child, used for the interpolation */
float w[4]; /* interpolation weights for the above particles */
float fuv[4], foffset; /* face vertex weights and offset */
/** Num is face index on the final derived mesh. */
int num, parent;
/** Nearest particles to the child, used for the interpolation. */
int pa[4];
/** Interpolation weights for the above particles. */
float w[4];
/** Face vertex weights and offset. */
float fuv[4], foffset;
float rt;
} ChildParticle;
@@ -90,40 +103,58 @@ typedef struct ParticleDupliWeight {
struct Object *ob;
short count;
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;
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 */
float dietime; /* particles can die unnaturally (collision). */
/** Dietime is not necessarily time+lifetime as. */
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 */
int num_dmcache; /* index to derived mesh data (face) to avoid slow lookups */
/**
* WARNING! Those two indices,
* 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. */
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 hair_index;
short flag;
short alive; /* the life state of a particle */
/** The life state of a particle. */
short alive;
} ParticleData;
typedef struct SPHFluidSettings {
@@ -242,14 +273,16 @@ typedef struct ParticleSettings {
/* hair dynamics */
float bending_random;
struct MTex *mtex[18]; /* MAX_MTEX */
/** MAX_MTEX. */
struct MTex *mtex[18];
struct Collection *dup_group;
struct ListBase dupliweights;
struct Collection *eff_group DNA_DEPRECATED; // deprecated
struct Object *dup_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 *pd2;
@@ -277,32 +310,47 @@ typedef struct ParticleSystem {
struct ParticleSystem *next, *prev;
ParticleSettings *part; /* particle settings */
/** Particle settings. */
ParticleSettings *part;
ParticleData *particles; /* (parent) particles */
ChildParticle *child; /* child particles */
/** (parent) particles. */
ParticleData *particles;
/** Child particles. */
ChildParticle *child;
struct PTCacheEdit *edit; /* particle editmode (runtime) */
void (*free_edit)(struct PTCacheEdit *edit); /* free callback */
/** Particle editmode (runtime). */
struct PTCacheEdit *edit;
/** Free callback. */
void (*free_edit)(struct PTCacheEdit *edit);
struct ParticleCacheKey **pathcache; /* path cache (runtime) */
struct ParticleCacheKey **childcache; /* child cache (runtime) */
ListBase pathcachebufs, childcachebufs; /* buffers for the above */
/** Path cache (runtime). */
struct ParticleCacheKey **pathcache;
/** Child cache (runtime). */
struct ParticleCacheKey **childcache;
/** Buffers for the above. */
ListBase pathcachebufs, childcachebufs;
struct ClothModifierData *clmd; /* cloth simulation for hair */
struct Mesh *hair_in_mesh, *hair_out_mesh; /* input/output for cloth simulation */
/** Cloth simulation for hair. */
struct ClothModifierData *clmd;
/** Input/output for cloth simulation. */
struct Mesh *hair_in_mesh, *hair_out_mesh;
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;
int seed, child_seed;
int flag, totpart, totunexist, totchild, totcached, totchildcache;
@@ -315,10 +363,12 @@ typedef struct ParticleSystem {
short target_psys, totkeyed, bakespace;
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! */
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];
/* point cache */
@@ -330,13 +380,17 @@ typedef struct ParticleSystem {
ParticleSpring *fluid_springs;
int tot_fluidsprings, alloc_fluidsprings;
struct KDTree *tree; /* used for interactions with self and other systems */
struct BVHTree *bvhtree; /* used for interactions with self and other systems */
/** 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;
float dt_frac; /* current time step, as a fraction of a frame */
float lattice_strength; /* influence of the lattice modifier */
/** Current time step, as a fraction of a frame. */
float dt_frac;
/** Influence of the lattice modifier. */
float lattice_strength;
void *batch_cache;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -48,7 +48,8 @@ typedef struct bSound {
/**
* The path to the sound file.
*/
char name[1024]; /* 1024 = FILE_MAX */
/** 1024 = FILE_MAX. */
char name[1024];
/**
* The packed file.
@@ -73,7 +74,8 @@ typedef struct bSound {
float max_gain;
float distance;
short flags;
short tags; /* Runtime only, always reset in readfile. */
/** Runtime only, always reset in readfile. */
short tags;
int pad;
/* unused currently
@@ -96,7 +98,7 @@ typedef struct bSound {
*/
void *playback_handle;
/* spinlock for asynchronous loading of sounds */
/** Spinlock for asynchronous loading of sounds. */
void *spinlock;
/* XXX unused currently (SOUND_TYPE_LIMITER) */
/* float start, end; */
@@ -121,7 +123,8 @@ enum {
/* bSound->flags */
enum {
#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
SOUND_FLAGS_CACHING = (1 << 4),
SOUND_FLAGS_MONO = (1 << 5),
@@ -129,7 +132,8 @@ enum {
/* bSound->tags */
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),
};

View File

@@ -83,7 +83,8 @@ struct BLI_mempool;
*/
typedef struct SpaceLink {
struct SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
/** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype;
char link_flag;
char _pad0[6];
@@ -98,7 +99,8 @@ typedef struct SpaceLink {
/* Info Header */
typedef struct SpaceInfo {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
/** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype;
char link_flag;
char _pad0[6];
@@ -126,25 +128,31 @@ typedef enum eSpaceInfo_RptMask {
/* Properties Editor */
typedef struct SpaceButs {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
/** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype;
char link_flag;
char _pad0[6];
/* 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). */
short space_subtype;
short mainb, mainbo, mainbuser; /* context tabs */
short preview; /* preview is signal to refresh */
/** Context tabs. */
short mainb, mainbo, mainbuser;
/** Preview is signal to refresh. */
short preview;
short pad[2];
char flag;
char collection_context;
void *path; /* runtime */
int pathflag, dataicon; /* runtime */
/** Runtime. */
void *path;
/** Runtime. */
int pathflag, dataicon;
ID *pinid;
void *texuser;
@@ -223,13 +231,15 @@ typedef enum eSpaceButtons_Flag {
/* Outliner */
typedef struct SpaceOops {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
/** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype;
char link_flag;
char _pad0[6];
/* End 'SpaceLink' header. */
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
/** Deprecated, copied to region. */
View2D v2d DNA_DEPRECATED;
ListBase tree;
@@ -369,23 +379,35 @@ typedef struct SpaceIpo_Runtime {
/* 'Graph' Editor (formerly known as the IPO Editor) */
typedef struct SpaceIpo {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
/** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype;
char link_flag;
char _pad0[6];
/* 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) */
short autosnap; /* time-transform autosnapping settings for Graph editor (eAnimEdit_AutoSnap in DNA_action_types.h) */
int flag; /* settings for Graph editor (eGraphEdit_Flag) */
/** Mode for the Graph editor (eGraphEdit_Mode). */
short mode;
/**
* 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) */
float cursorVal; /* cursor value (y-value, x-value is current frame) */
int around; /* pivot point for transforms */
/** Time value for cursor (when in drivers mode; animation uses current frame). */
float cursorTime;
/** Cursor value (y-value, x-value is current frame). */
float cursorVal;
/** Pivot point for transforms. */
int around;
int pad;
SpaceIpo_Runtime runtime;
@@ -451,18 +473,21 @@ typedef enum eGraphEdit_Runtime_Flag {
/* NLA Editor */
typedef struct SpaceNla {
struct SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
/** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype;
char link_flag;
char _pad0[6];
/* 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;
int pad;
struct bDopeSheet *ads;
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
/** Deprecated, copied to region. */
View2D v2d DNA_DEPRECATED;
} SpaceNla;
/* SpaceNla.flag */
@@ -513,31 +538,42 @@ typedef enum eScreen_Redraws_Flag {
/* Sequencer */
typedef struct SpaceSeq {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
/** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype;
char link_flag;
char _pad0[6];
/* 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 */
short mainb; /* weird name for the sequencer subtype (seq, image, luma... etc) */
short render_size; /* eSpaceSeq_Proxy_RenderSize */
/** Deprecated: offset for drawing the image preview. */
float xof DNA_DEPRECATED, yof DNA_DEPRECATED;
/** Weird name for the sequencer subtype (seq, image, luma... etc). */
short mainb;
/** ESpaceSeq_Proxy_RenderSize. */
short render_size;
short chanshown;
short zebra;
int flag;
float zoom DNA_DEPRECATED; /* deprecated, handled by View2D now */
int view; /* see SEQ_VIEW_* below */
/** Deprecated, handled by View2D now. */
float zoom DNA_DEPRECATED;
/** See SEQ_VIEW_* below. */
int view;
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;
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];
struct GPUFX *compositor;
@@ -619,38 +655,56 @@ typedef enum eSpaceSeq_OverlayType {
/* Config and Input for File Selector */
typedef struct FileSelectParams {
char title[96]; /* 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
* needs to be linked in, where foo.blend/Armature need adding */
/** Title, also used for the text of the execute button. */
char title[96];
/**
* 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 file[256]; /* file */
char file[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. */
int filter_id; /* same as filter, but for ID types (aka library groups). */
/** Text items name must match to be shown. */
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 */
int highlight_file; /* file under cursor */
/** Active file used for keyboard navigation. */
int active_file;
/** File under cursor. */
int highlight_file;
int sel_first;
int sel_last;
unsigned short thumbnail_size;
short pad;
/* short */
short type; /* XXXXX for now store type here, should be moved to the operator */
short flag; /* settings for filter, hiding dots files,... */
short sort; /* sort order */
short display; /* display mode flag */
int filter; /* filter when (flags & FILE_FILTER) is true */
/** XXXXX for now store type here, should be moved to the operator. */
short type;
/** Settings for filter, hiding dots files. */
short flag;
/** 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 -- */
short f_fp; /* show font preview */
char fp_str[8]; /* string to use for font preview */
/** Show font preview. */
short f_fp;
/** String to use for font preview. */
char fp_str[8];
/* XXX --- end unused -- */
} FileSelectParams;
@@ -658,7 +712,8 @@ typedef struct FileSelectParams {
/* File Browser */
typedef struct SpaceFile {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
/** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype;
char link_flag;
char _pad0[6];
@@ -667,12 +722,16 @@ typedef struct SpaceFile {
char _pad1[4];
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 */
ListBase *folders_next; /* holds the list of next directories (pushed from previous) to show */
/** Holds the list of previous directories to show. */
ListBase *folders_prev;
/** Holds the list of next directories (pushed from previous) to show. */
ListBase *folders_next;
/* operator that is invoking fileselect
* 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). */
FileDirEntryRevision *entry;
int typeflag; /* eFileSel_File_Types */
int blentype; /* ID type, in case typeflag has FILE_TYPE_BLENDERLIB set. */
/** EFileSel_File_Types. */
int typeflag;
/** ID type, in case typeflag has FILE_TYPE_BLENDERLIB set. */
int blentype;
char *relpath;
void *poin; /* TODO: make this a real ID pointer? */
/** TODO: make this a real ID pointer? */
void *poin;
struct ImBuf *image;
/* 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 entry_idx_start, entry_idx_end;
char root[1024]; /* FILE_MAX */
/** FILE_MAX. */
char root[1024];
} FileDirEntryArr;
/* FileDirEntry.status */
@@ -902,7 +965,8 @@ enum {
/* Image/UV Editor */
typedef struct SpaceImage {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
/** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype;
char link_flag;
char _pad0[6];
@@ -911,26 +975,40 @@ typedef struct SpaceImage {
struct Image *image;
struct ImageUser iuser;
struct Scopes scopes; /* histogram waveform and vectorscope */
struct Histogram sample_line_hist; /* sample line histogram */
/** Histogram waveform and vectorscope. */
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 */
float xof, yof; /* user defined offset, image is centered */
float zoom; /* user defined zoom level */
float centx, centy; /* storage for offset while render drawing */
/** UV editor 2d cursor. */
float cursor[2];
/** User defined offset, image is centered. */
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. */
char mode_prev;
char pin;
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;
char dt_uv; /* UV draw type */
char sticky; /* sticky selection type */
/** UV draw type. */
char dt_uv;
/** Sticky selection type. */
char sticky;
char dt_uvstretch;
char around;
@@ -1034,7 +1112,8 @@ typedef enum eSpaceImage_OtherUVFilter {
/* Text Editor */
typedef struct SpaceText {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
/** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype;
char link_flag;
char _pad0[6];
@@ -1045,8 +1124,13 @@ typedef struct SpaceText {
int top, viewlines;
short flags, menunr;
short lheight; /* user preference, is font_size! */
char cwidth, linenrs_tot; /* runtime computed, character width and the number of chars to use when showing line numbers */
/** User preference, is font_size! */
short lheight;
/**
* Runtime computed, character width
* and the number of chars to use when showing line numbers.
*/
char cwidth, linenrs_tot;
int left;
int showlinenrs;
int tabnumber;
@@ -1054,23 +1138,30 @@ typedef struct SpaceText {
short showsyntax;
short line_hlight;
short overwrite;
short live_edit; /* run python while editing, evil */
/** Run python while editing, evil. */
short live_edit;
float pix_per_line;
struct rcti txtscroll, txtbar;
int wordwrap, doplugins;
char findstr[256]; /* ST_MAX_FIND_STR */
char replacestr[256]; /* ST_MAX_FIND_STR */
/** ST_MAX_FIND_STR. */
char findstr[256];
/** ST_MAX_FIND_STR. */
char replacestr[256];
short margin_column; /* column number to show right margin at */
short lheight_dpi; /* actual lineheight, dpi controlled */
/** Column number to show right margin at. */
short margin_column;
/** Actual lineheight, dpi controlled. */
short lheight_dpi;
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;
@@ -1109,16 +1200,22 @@ typedef struct Script {
void *py_globaldict;
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 */
char scriptarg[256]; /* 1024 = FILE_MAX */
/**
* Store the script file here so we can re-run it on loading blender,
* if "Enable Scripts" is on
*/
/** 1024 = FILE_MAX. */
char scriptname[1024];
/** 1024 = FILE_MAX. */
char scriptarg[256];
} Script;
#define SCRIPT_SET_NULL(_script) _script->py_draw = _script->py_event = _script->py_button = _script->py_browsercallback = _script->py_globaldict = NULL; _script->flags = 0
/* Script View - Obsolete (pre 2.5) */
typedef struct SpaceScript {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
/** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype;
char link_flag;
char _pad0[6];
@@ -1142,30 +1239,41 @@ typedef struct bNodeTreePath {
struct bNodeTreePath *next, *prev;
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;
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;
typedef struct SpaceNode {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
/** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype;
char link_flag;
char _pad0[6];
/* 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... */
short flag, pad1; /* menunr: browse id block in header */
float aspect, pad2; /* internal state variables */
/** Context, no need to save in file? well... pinning... */
struct ID *id, *from;
/** Menunr: browse id block in header. */
short flag, pad1;
/** Internal state variables. */
float aspect, pad2;
float xof, yof; /* offset for drawing the backdrop */
float zoom; /* zoom for backdrop */
float cursor[2]; /* mouse pos for drawing socketless link and adding nodes */
/** Offset for drawing the backdrop. */
float xof, yof;
/** 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,
* 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 */
char tree_idname[64];
int treetype DNA_DEPRECATED; /* treetype: as same nodetree->type */
/** Treetype: as same nodetree->type. */
int treetype DNA_DEPRECATED;
int pad3;
short texfrom; /* texfrom object, world or brush */
short shaderfrom; /* shader from object or world */
short recalc; /* currently on 0/1, for auto compo */
/** Texfrom object, world or brush. */
short texfrom;
/** 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;
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 */
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.flag */
@@ -1244,12 +1360,15 @@ typedef struct ConsoleLine {
struct ConsoleLine *next, *prev;
/* keep these 3 vars so as to share free, realloc funcs */
int len_alloc; /* allocated length */
int len; /* real len - strlen() */
/** Allocated length. */
int len_alloc;
/** Real len - strlen(). */
int len;
char *line;
int cursor;
int type; /* only for use when in the 'scrollback' listbase */
/** Only for use when in the 'scrollback' listbase. */
int type;
} ConsoleLine;
/* ConsoleLine.type */
@@ -1264,7 +1383,8 @@ typedef enum eConsoleLine_Type {
/* Console View */
typedef struct SpaceConsole {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
/** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype;
char link_flag;
char _pad0[6];
@@ -1273,10 +1393,13 @@ typedef struct SpaceConsole {
/* space vars */
int lheight, pad;
ListBase scrollback; /* ConsoleLine; output */
ListBase history; /* ConsoleLine; command history, current edited line is the first */
/** ConsoleLine; output. */
ListBase scrollback;
/** ConsoleLine; command history, current edited line is the first. */
ListBase history;
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_end;
@@ -1290,7 +1413,8 @@ typedef struct SpaceConsole {
typedef struct SpaceUserPref {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
/** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype;
char link_flag;
char _pad0[6];
@@ -1298,7 +1422,8 @@ typedef struct SpaceUserPref {
char _pad1[7];
char filter_type;
char filter[64]; /* search term for filtering in the UI */
/** Search term for filtering in the UI. */
char filter[64];
} SpaceUserPref;
/** \} */
@@ -1310,7 +1435,8 @@ typedef struct SpaceUserPref {
/* Clip Editor */
typedef struct SpaceClip {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
/** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype;
char link_flag;
char _pad0[6];
@@ -1318,25 +1444,39 @@ typedef struct SpaceClip {
char _pad1[4];
float xof, yof; /* user defined offset, image is centered */
float xlockof, ylockof; /* user defined offset from locked position */
float zoom; /* user defined zoom level */
/** User defined offset, image is centered. */
float xof, yof;
/** User defined offset from locked position. */
float xlockof, ylockof;
/** User defined zoom level. */
float zoom;
struct MovieClipUser user; /* user of clip */
struct MovieClip *clip; /* clip data */
struct MovieClipScopes scopes; /* different scoped displayed in space panels */
/** User of clip. */
struct MovieClipUser user;
/** Clip data. */
struct MovieClip *clip;
/** Different scoped displayed in space panels. */
struct MovieClipScopes scopes;
int flag; /* flags */
short mode; /* editor mode (editing context being displayed) */
short view; /* type of the clip editor view */
/** Flags. */
int flag;
/** 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 */
float loc[2], scale, angle; /* pre-composed stabilization data */
/** Pre-composed stabilization data. */
float loc[2], scale, angle;
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 */
int postproc_flag;
@@ -1344,9 +1484,11 @@ typedef struct SpaceClip {
/* grease pencil */
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;
} SpaceClip;
@@ -1412,7 +1554,8 @@ typedef enum eSpaceClip_GPencil_Source {
#
typedef struct SpaceTopBar {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
/** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype;
char link_flag;
char _pad0[6];
@@ -1431,7 +1574,8 @@ typedef struct SpaceTopBar {
#
typedef struct SpaceStatusBar {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
/** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype;
char link_flag;
char _pad0[6];

View File

@@ -34,11 +34,12 @@ struct bSound;
typedef struct Speaker {
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;
// not animatable properties
/* not animatable properties */
float volume_max;
float volume_min;
float distance_max;
@@ -48,13 +49,13 @@ typedef struct Speaker {
float cone_angle_inner;
float cone_volume_outer;
// animatable properties
/* animatable properties */
float volume;
float pitch;
// flag
/* flag */
short flag;
short pad1[3];
char _pad1[6];
} Speaker;
/* **************** SPEAKER ********************* */

View File

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

View File

@@ -57,7 +57,8 @@ typedef struct MTex {
short texco, mapto, maptoneg, blendtype;
struct Object *object;
struct Tex *tex;
char uvname[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
/** MAX_CUSTOMDATA_LAYER_NAME. */
char uvname[64];
char projx, projy, projz, mapping;
char brush_map_mode, brush_angle_mode;
@@ -128,19 +129,27 @@ typedef struct PointDensity {
short source;
short pad0;
short color_source; /* psys_color_source */
/** psys_color_source */
short color_source;
short ob_color_source;
int totpoints;
struct Object *object; /* for 'Object' or 'Particle system' type - source object */
int psys; /* index+1 in ob.particlesystem, non-ID pointer not allowed */
short psys_cache_space; /* cache points in worldspace, object space, ... ? */
short ob_cache_space; /* cache points in worldspace, object space, ... ? */
char vertex_attribute_name[64]; /* vertex attribute layer for color source, MAX_CUSTOMDATA_LAYER_NAME */
/** for 'Object' or 'Particle system' type - source object */
struct Object *object;
/** index+1 in ob.particlesystem, non-ID pointer not allowed */
int psys;
/** 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 */
float *point_data; /* dynamically allocated extra for extra information, like particle age */
/** The acceleration tree containing points. */
void *point_tree;
/** Dynamically allocated extra for extra information, like particle age. */
float *point_data;
float noise_size;
short noise_depth;
@@ -150,14 +159,17 @@ typedef struct PointDensity {
float noise_fac;
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;
typedef struct Tex {
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 bright, contrast, saturation, rfac, gfac, bfac;
@@ -177,7 +189,8 @@ typedef struct Tex {
float vn_mexp;
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 */
short noisebasis, noisebasis2;
@@ -202,7 +215,8 @@ typedef struct Tex {
struct ImageUser iuser;
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 ColorBand *coba;
struct PreviewImage *preview;

View File

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

View File

@@ -68,23 +68,35 @@ typedef enum eUIFont_ID {
/* first font is the default (index 0), others optional */
typedef struct uiFont {
struct uiFont *next, *prev;
char filename[1024];/* 1024 = FILE_MAX */
short blf_id; /* from blfont lib */
short uifont_id; /* own id (eUIFont_ID) */
short r_to_l; /* fonts that read from left to right */
/** 1024 = FILE_MAX. */
char filename[1024];
/** From blfont lib. */
short blf_id;
/** Own id (eUIFont_ID). */
short uifont_id;
/** Fonts that read from left to right. */
short r_to_l;
short pad;
} uiFont;
/* this state defines appearance of text */
typedef struct uiFontStyle {
short uifont_id; /* saved in file, 0 is default */
short points; /* actual size depends on 'global' dpi */
short kerning; /* unfitted or default kerning value. */
short italic, bold; /* style hint */
short shadow; /* value is amount of pixels blur */
short shadx, shady; /* shadow offset in pixels */
float shadowalpha; /* total alpha */
float shadowcolor; /* 1 value, typically white or black anyway */
/** Saved in file, 0 is default. */
short uifont_id;
/** Actual size depends on 'global' dpi. */
short points;
/** Unfitted or default kerning value. */
short kerning;
/** Style hint. */
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;
/* this is fed to the layout engine and widget code */
@@ -92,7 +104,8 @@ typedef struct uiFontStyle {
typedef struct uiStyle {
struct uiStyle *next, *prev;
char name[64]; /* MAX_STYLE_NAME */
/** MAX_STYLE_NAME. */
char name[64];
uiFontStyle paneltitle;
uiFontStyle grouplabel;
@@ -101,8 +114,10 @@ typedef struct uiStyle {
float panelzoom;
short minlabelchars; /* in characters */
short minwidgetchars; /* in characters */
/** In characters. */
short minlabelchars;
/** In characters. */
short minwidgetchars;
short columnspace;
short templatespace;
@@ -166,7 +181,8 @@ typedef struct ThemeUI {
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];
@@ -193,11 +209,16 @@ typedef struct ThemeUI {
char gizmo_b[4];
/* Icon Colors. */
char icon_collection[4]; /* Collection items */
char icon_object[4]; /* Object items */
char icon_object_data[4]; /* Object data items */
char icon_modifier[4]; /* Modifier and constraint items */
char icon_shading[4]; /* Shading related items */
/** Collection items. */
char icon_collection[4];
/** Object items. */
char icon_object[4];
/** Object data items. */
char icon_object_data[4];
/** Modifier and constraint items. */
char icon_modifier[4];
/** Shading related items. */
char icon_shading[4];
} ThemeUI;
/* 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 {
/* main window colors */
char back[4];
char title[4]; /* panel title */
/** Panel title. */
char title[4];
char text[4];
char text_hi[4];
/* header colors */
char header[4]; /* region background */
char header_title[4]; /* unused */
/** Region background. */
char header[4];
/** Unused. */
char header_title[4];
char header_text[4];
char header_text_hi[4];
@@ -223,20 +247,26 @@ typedef struct ThemeSpace {
char tab_outline[4];
/* button/tool regions */
char button[4]; /* region background */
char button_title[4]; /* panel title */
/** Region background. */
char button[4];
/** Panel title. */
char button_title[4];
char button_text[4];
char button_text_hi[4];
/* listview regions */
char list[4]; /* region background */
char list_title[4]; /* panel title */
/** Region background. */
char list[4];
/** Panel title. */
char list_title[4];
char list_text[4];
char list_text_hi[4];
/* navigation bar regions */
char navigation_bar[4]; /* region background */
char execution_buts[4]; /* region background */
/** Region background. */
char navigation_bar[4];
/** Region background. */
char execution_buts[4];
/* float panel */
/* char panel[4]; unused */
@@ -263,8 +293,10 @@ typedef struct ThemeSpace {
char vertex[4], vertex_select[4], vertex_bevel[4], vertex_unreferenced[4];
char edge[4], edge_select[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 */
char face_dot[4]; /* selected color */
/** Solid faces. */
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 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_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 */
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]; /* keytypes */
/** Dopesheet. */
char ds_channel[4], ds_subchannel[4], ds_ipoline[4];
/** 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 pad[4];
@@ -304,10 +339,12 @@ typedef struct ThemeSpace {
char nodeclass_shader[4], nodeclass_script[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];
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];
@@ -335,26 +372,39 @@ typedef struct ThemeSpace {
char preview_stitch_unstitchable[4];
char preview_stitch_active[4];
char uv_shadow[4]; /* two uses, for uvs with modifier applied on mesh and uvs during painting */
char uv_others[4]; /* uvs of other objects */
/** Two uses, for uvs with modifier applied on mesh and uvs during painting. */
char uv_shadow[4];
/** Uvs of other objects. */
char uv_others[4];
char match[4]; /* outliner - filter match */
char selected_highlight[4]; /* outliner - selected item */
/** Outliner - filter match. */
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 */
char anim_active[4]; /* Active Action + Summary Channel */
char anim_non_active[4]; /* Active Action = NULL */
char anim_preview_range[4]; /* Preview range overlay */
/** Active Action + Summary Channel. */
char anim_active[4];
/** Active Action = NULL. */
char anim_non_active[4];
/** Preview range overlay. */
char anim_preview_range[4];
char anim_pad[4];
char nla_tweaking[4]; /* NLA 'Tweaking' action/strip */
char nla_tweakdupli[4]; /* NLA - warning color for duplicate instances of tweaking strip */
/** NLA 'Tweaking' action/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 */
char nla_meta[4], nla_meta_sel[4]; /* NLA "Meta" strips */
char nla_sound[4], nla_sound_sel[4]; /* NLA "Sound" strips */
/** NLA "Transition" strips. */
char nla_transition[4], nla_transition_sel[4];
/** NLA "Meta" strips. */
char nla_meta[4], nla_meta_sel[4];
/** NLA "Sound" strips. */
char nla_sound[4], nla_sound_sel[4];
/* info */
char info_selected[4], info_selected_text[4];
@@ -377,7 +427,8 @@ typedef struct ThemeWireColor {
char select[4];
char active[4];
short flag; /* eWireColor_Flags */
/** EWireColor_Flags. */
short flag;
short pad;
} ThemeWireColor;
@@ -428,12 +479,14 @@ typedef struct bTheme {
typedef struct bAddon {
struct bAddon *next, *prev;
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;
typedef struct bPathCompare {
struct bPathCompare *next, *prev;
char path[768]; /* FILE_MAXDIR */
/** FILE_MAXDIR. */
char path[768];
char flag, pad[7];
} bPathCompare;
@@ -490,12 +543,14 @@ typedef struct SolidLight {
} SolidLight;
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_factor;
float view_height;
float jump_height;
float teleport_time; /* duration to use for teleporting */
/** Duration to use for teleporting. */
float teleport_time;
short flag;
short pad[3];
} WalkNavigation;
@@ -504,32 +559,43 @@ typedef struct UserDef {
/* UserDef has separate do-version handling, and can be read from other files */
int versionfile, subversionfile;
int flag; /* eUserPref_Flag */
int dupflag; /* eDupli_ID_Flags */
/** EUserPref_Flag. */
int flag;
/** EDupli_ID_Flags. */
int dupflag;
int savetime;
char tempdir[768]; /* FILE_MAXDIR length */
/** FILE_MAXDIR length. */
char tempdir[768];
char fontdir[768];
char renderdir[1024]; /* FILE_MAX length */
/** FILE_MAX length. */
char renderdir[1024];
/* EXR cache path */
char render_cachedir[768]; /* 768 = FILE_MAXDIR */
/** 768 = FILE_MAXDIR. */
char render_cachedir[768];
char textudir[768];
char pythondir[768];
char sounddir[768];
char i18ndir[768];
char image_editor[1024]; /* 1024 = FILE_MAX */
char anim_player[1024]; /* 1024 = FILE_MAX */
/** 1024 = FILE_MAX. */
char image_editor[1024];
/** 1024 = FILE_MAX. */
char anim_player[1024];
int anim_player_preset;
short v2d_min_gridsize; /* minimum spacing between gridlines in View2D grids */
short timecode_style; /* eTimecodeStyles, style of timecode display */
/** Minimum spacing between gridlines in View2D grids. */
short v2d_min_gridsize;
/** ETimecodeStyles, style of timecode display. */
short timecode_style;
short versions;
short dbl_click_time;
short pad;
short wheellinescroll;
int uiflag; /* eUserpref_UI_Flag */
int uiflag2; /* eUserpref_UI_Flag2 */
/** EUserpref_UI_Flag. */
int uiflag;
/** EUserpref_UI_Flag2. */
int uiflag2;
/* Experimental flag for app-templates to make changes to behavior
* which are outside the scope of typical preferences. */
short app_flag;
@@ -544,17 +610,26 @@ typedef struct UserDef {
int audioformat;
int audiochannels;
float ui_scale; /* setting for UI scale */
int ui_line_width; /* setting for UI line width */
int dpi; /* runtime, full DPI divided by pixelsize */
float dpi_fac; /* runtime, multiplier to scale UI elements based on DPI */
float pixelsize; /* runtime, line width and point size based on DPI */
int virtual_pixel; /* deprecated, for forward compatibility */
/** Setting for UI scale. */
float ui_scale;
/** Setting for UI line width. */
int ui_line_width;
/** Runtime, full DPI divided by pixelsize. */
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 */
char node_margin; /* node insert offset (aka auto-offset) margin, but might be useful for later stuff as well */
/** Console scrollback limit. */
int scrollback;
/** Node insert offset (aka auto-offset) margin, but might be useful for later stuff as well. */
char node_margin;
char pad2[5];
short transopts; /* eUserpref_Translation_Flags */
/** EUserpref_Translation_Flags. */
short transopts;
short menuthreshold1, menuthreshold2;
/* startup template */
@@ -564,10 +639,12 @@ typedef struct UserDef {
struct ListBase uifonts;
struct ListBase uistyles;
struct ListBase user_keymaps;
struct ListBase user_keyconfig_prefs; /* wmKeyConfigPref. */
/** #wmKeyConfigPref. */
struct ListBase user_keyconfig_prefs;
struct ListBase addons;
struct ListBase autoexec_paths;
struct ListBase user_menus; /* bUserMenu */
/** #bUserMenu. */
struct ListBase user_menus;
char keyconfigstr[64];
@@ -576,9 +653,11 @@ typedef struct UserDef {
int undomemory;
float gpu_viewport_quality;
short gp_manhattendist, gp_euclideandist, gp_eraser;
short gp_settings; /* eGP_UserdefSettings */
/** #eGP_UserdefSettings. */
short gp_settings;
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];
float light_ambient[3], pad7;
short gizmo_flag, gizmo_size;
@@ -588,61 +667,85 @@ typedef struct UserDef {
short dragthreshold;
int memcachelimit;
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 obcenter_dia;
short rvisize; /* rotating view icon size */
short rvibright; /* rotating view icon brightness */
short recent_files; /* maximum number of recently used files to remember */
short smooth_viewtx; /* milliseconds to spend spinning the view */
/** Rotating view icon size. */
short rvisize;
/** Rotating view icon brightness. */
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 curssize;
short color_picker_type; /* eColorPicker_Types */
char ipo_new; /* interpolation mode for newly added F-Curves */
char keyhandles_new; /* handle types for newly added keyframes */
/** #eColorPicker_Types. */
short color_picker_type;
/** 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_pick_deph;
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 */
float view_frame_seconds; /* seconds to zoom around current frame */
/** Number of keyframes to zoom around current frame. */
int view_frame_keyframes;
/** Seconds to zoom around current frame. */
float view_frame_seconds;
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 use_16bit_textures, use_gpu_mipmap;
float pressure_threshold_max; /* raw tablet pressure that maps to 100% */
float pressure_softness; /* curve non-linearity parameter */
/** Raw tablet pressure that maps to 100%. */
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_deadzone; /* deadzone of 3D mouse */
int ndof_flag; /* eNdof_Flag, flags for 3D mouse */
/** Deadzone of 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) */
short image_draw_method;
float glalphaclip;
short autokey_mode; /* eAutokey_Mode, autokeying mode */
short autokey_flag; /* flags for autokeying */
/** #eAutokey_Mode, autokeying mode. */
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 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;
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_mono[1024];
@@ -650,26 +753,37 @@ typedef struct UserDef {
int compute_device_type;
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 */
short pie_initial_timeout; /* direction in the pie menu will always be calculated from the initial position
* within this time limit */
/**
* If keeping a pie menu spawn button pressed after this time,
* it turns into a drag/release pie menu.
*/
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_menu_confirm;
short pie_menu_radius; /* pie menu radius */
short pie_menu_threshold; /* pie menu distance from center before a direction is set */
/** Pie menu radius. */
short pie_menu_radius;
/** Pie menu distance from center before a direction is set. */
short pie_menu_threshold;
struct WalkNavigation walk_navigation;
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];
} UserDef;
extern UserDef U; /* from blenkernel blender.c */
/* from blenkernel blender.c */
extern UserDef U;
/* ***************** USERDEF ****************** */

View File

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

View File

@@ -38,34 +38,53 @@
/* View 2D data - stored per region */
typedef struct View2D {
rctf tot, cur; /* 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 */
rcti mask; /* mask - region (in screenspace) within which 'cur' can be viewed */
/** Tot - area that data can be drawn in; cur - region of tot that is visible in viewport. */
rctf tot, cur;
/** 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) */
float minzoom, maxzoom; /* allowable zoom factor range (only when (keepzoom & V2D_LIMITZOOM)) is set */
/** Min/max sizes of 'cur' rect (only when keepzoom not 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) */
short scroll_ui; /* scroll_ui - temp settings used for UI drawing of scrollers */
/** Scroll - scrollbars to display (bitflag). */
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? */
short keepzoom; /* keepzoom - axes that zooming cannot occur on, and also clamp within zoom-limits */
short keepofs; /* keepofs - axes that translation is not allowed to occur on */
/** Keeptot - 'cur' rect cannot move outside the 'tot' rect?. */
short keeptot;
/** 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 */
short align; /* alignment of content in totrect */
/** Settings. */
short flag;
/** Alignment of content in totrect. */
short align;
short winx, winy; /* 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 */
/** Storage of current winx/winy values, set in UI_view2d_size_update. */
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 */
int tab_num; /* number of tabs stored */
int tab_cur; /* current tab */
/** Different offset per tab, for buttons. */
float *tab_offset;
/** Number of tabs stored. */
int tab_num;
/** Current tab. */
int tab_cur;
/* 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];
/* animated smooth view */

View File

@@ -64,65 +64,88 @@ struct GPUViewport;
typedef struct RegionView3D {
float winmat[4][4]; /* GL_PROJECTION matrix */
float viewmat[4][4]; /* GL_MODELVIEW matrix */
float viewinv[4][4]; /* inverse of viewmat */
float persmat[4][4]; /* viewmat*winmat */
float persinv[4][4]; /* inverse of persmat */
float viewcamtexcofac[4]; /* offset/scale for camera glsl texcoords */
/** GL_PROJECTION matrix. */
float winmat[4][4];
/** GL_MODELVIEW matrix. */
float viewmat[4][4];
/** Inverse of viewmat. */
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 persmatob[4][4];
/* user defined clipping planes */
/** User defined clipping planes. */
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 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 ViewDepths *depths;
void *gpuoffscreen;
/* animated smooth view */
/** Animated smooth view. */
struct SmoothView3DStore *sms;
struct wmTimer *smooth_timer;
/* transform gizmo matrix */
/** Transform gizmo matrix. */
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_matrix[3][3];
float gridview DNA_DEPRECATED;
float viewquat[4]; /* view rotation, must be kept normalized */
float dist; /* distance from 'ofs' along -viewinv[2] vector, where result is negative as is 'ofs' */
float camdx, camdy; /* camera view offsets, 1.0 = viewplane moves entire width/height */
float pixsize; /* runtime only */
float ofs[3]; /* view center & orbit pivot, negative of worldspace location,
* also matches -viewinv[3][0:3] in ortho mode.*/
float camzoom; /* viewport zoom on the camera frame, see BKE_screen_view3d_zoom_to_fac */
char is_persp; /* 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) */
/** View rotation, must be kept normalized. */
float viewquat[4];
/** Distance from 'ofs' along -viewinv[2] vector, where result is negative as is 'ofs'. */
float dist;
/** Camera view offsets, 1.0 = viewplane moves entire width/height. */
float camdx, camdy;
/** Runtime only. */
float pixsize;
/**
* 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 view;
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];
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;
/* last view (use when switching out of camera view) */
/** Last view (use when switching out of camera view). */
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_axis[3];
} RegionView3D;
@@ -135,8 +158,10 @@ typedef struct View3DCursor {
/* 3D Viewport Shading settings */
typedef struct View3DShading {
char type; /* Shading type (VIEW3D_SHADE_SOLID, ..) */
char prev_type; /* Runtime, for toggle between rendered viewport. */
/** Shading type (VIEW3D_SHADE_SOLID, ..). */
char type;
/** Runtime, for toggle between rendered viewport. */
char prev_type;
char prev_type_wire;
char color_type;
@@ -147,9 +172,12 @@ typedef struct View3DShading {
char cavity_type;
char pad[7];
char studio_light[256]; /* FILE_MAXFILE */
char lookdev_light[256]; /* FILE_MAXFILE */
char matcap[256]; /* FILE_MAXFILE */
/** FILE_MAXFILE. */
char studio_light[256];
/** FILE_MAXFILE. */
char lookdev_light[256];
/** FILE_MAXFILE. */
char matcap[256];
float shadow_intensity;
float single_color[3];
@@ -209,7 +237,8 @@ typedef struct View3DOverlay {
/* 3D ViewPort Struct */
typedef struct View3D {
struct SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
/** Storage of regions for inactive spaces. */
ListBase regionbase;
char spacetype;
char link_flag;
char _pad0[6];
@@ -218,12 +247,16 @@ typedef struct View3D {
float viewquat[4] DNA_DEPRECATED;
float dist DNA_DEPRECATED;
float bundle_size; /* size of bundles in reconstructed data */
char bundle_drawtype; /* display style for bundle */
/** Size of bundles in reconstructed data. */
float bundle_size;
/** Display style for bundle. */
char bundle_drawtype;
char pad[3];
unsigned int lay_prev DNA_DEPRECATED; /* for active layer toggle */
unsigned int lay_used DNA_DEPRECATED; /* used while drawing */
/** For active layer toggle. */
unsigned int lay_prev DNA_DEPRECATED;
/** Used while drawing. */
unsigned int lay_used DNA_DEPRECATED;
int object_type_exclude_viewport;
int object_type_exclude_select;
@@ -234,15 +267,18 @@ typedef struct View3D {
struct Object *camera, *ob_centre;
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;
short _pad6;
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 gp_flag;
short flag;
@@ -250,14 +286,16 @@ typedef struct View3D {
float lens, grid;
float near, far;
float ofs[3] DNA_DEPRECATED; /* XXX deprecated */
float ofs[3] DNA_DEPRECATED;
char _pad[4];
short matcap_icon; /* icon id */
/** Icon id. */
short matcap_icon;
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;
/* transform gizmo info */
@@ -269,7 +307,8 @@ typedef struct View3D {
char _pad3;
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 */
float vertex_opacity;
@@ -278,10 +317,12 @@ typedef struct View3D {
* instead set (temporarily) from camera */
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? */
struct bGPdata *gpd DNA_DEPRECATED; /* Grease-Pencil Data (annotation layers) */
/** Grease-Pencil Data (annotation layers). */
struct bGPdata *gpd DNA_DEPRECATED;
/* Stereoscopy settings */
short stereo3d_flag;

View File

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

View File

@@ -113,25 +113,30 @@ typedef struct WorkSpaceLayout {
struct bScreen *screen;
/* 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;
/** Optional tags, which features to use, aligned with #bAddon names by convention. */
typedef struct wmOwnerID {
struct wmOwnerID *next, *prev;
char name[64] DNA_PRIVATE_WORKSPACE; /* MAX_NAME */
/** MAX_NAME. */
char name[64] DNA_PRIVATE_WORKSPACE;
} wmOwnerID;
typedef struct WorkSpace {
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
* 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) */
ListBase owner_ids DNA_PRIVATE_WORKSPACE_READ_WRITE; /* wmOwnerID */
/** WmOwnerID. */
ListBase owner_ids DNA_PRIVATE_WORKSPACE_READ_WRITE;
/* should be: '#ifdef USE_WORKSPACE_TOOL'. */
@@ -148,7 +153,8 @@ typedef struct WorkSpace {
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. */
int order;

View File

@@ -50,8 +50,10 @@ struct MTex;
* gravity, color model etc. It mixes rendering data and modeling data. */
typedef struct World {
ID id;
struct AnimData *adt; /* 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). */
/** Animation data (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];
short texact, mistype;
@@ -70,18 +72,19 @@ typedef struct World {
* Some world modes
* bit 0: Do mist
*/
short mode; // partially moved to scene->gamedata in 2.5
short mode;
short pad2[3];
float misi, miststa, mistdist, misthi;
/* ambient occlusion */
/** Ambient occlusion. */
float aodist, aoenergy;
/* assorted settings */
/** Assorted settings. */
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];
/* previews */
@@ -90,8 +93,10 @@ typedef struct World {
/* nodes */
struct bNodeTree *nodetree;
float mistend, pad1; /* runtime : miststa + mistdist, used for drawing camera */
ListBase gpumaterial; /* runtime */
/** Runtime : miststa + mistdist, used for drawing camera. */
float mistend, pad1;
/** Runtime. */
ListBase gpumaterial;
} World;
/* **************** WORLD ********************* */