diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-01-01 01:09:26 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-01-01 01:09:26 +0400 |
commit | cc3adc2202ce0208b1c95bc3fe3f0290b3b511f9 (patch) | |
tree | 503d6bc4376b27a6efe73739609e9bbb1f1188cb /source/blender/makesdna | |
parent | 0896a227232f741b6028219a208ae60e78515406 (diff) | |
parent | b5595298d36a5023cc33ed41463fd6c032f2ec7b (diff) |
Merged changes in the trunk up to revision 43038.
Conflicts resolved:
source/blender/makesdna/DNA_material_types.h
source/blenderplayer/bad_level_call_stubs/stubs.c
Diffstat (limited to 'source/blender/makesdna')
60 files changed, 460 insertions, 211 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 234dc125c6e..a33aabab36d 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -24,14 +24,15 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_ID_H -#define DNA_ID_H /** \file DNA_ID.h * \ingroup DNA * \brief ID and Library types, which are fundamental for sdna. */ +#ifndef DNA_ID_H +#define DNA_ID_H + #include "DNA_listBase.h" #ifdef __cplusplus @@ -57,7 +58,7 @@ typedef struct IDProperty { seemed like a good idea as a pad var was needed anyway :)*/ IDPropertyData data; /* note, alignment for 64 bits */ int len; /* array length, also (this is important!) string length + 1. - the idea is to be able to reuse array realloc functions on strings.*/ + * the idea is to be able to reuse array realloc functions on strings.*/ /* totallen is total length of allocated array/string, including a buffer. * Note that the buffering is mild; the code comes from python's list implementation.*/ int totallen; /*strings and arrays are both buffered, though the buffer isn't @@ -74,7 +75,7 @@ typedef struct IDProperty { #define IDP_ARRAY 5 #define IDP_GROUP 6 /* the ID link property type hasn't been implemented yet, this will require - some cleanup of blenkernel, most likely.*/ + * some cleanup of blenkernel, most likely.*/ #define IDP_ID 7 #define IDP_DOUBLE 8 #define IDP_IDPARRAY 9 diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index 48a013e06ec..97cd8a9fcc9 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -1,4 +1,4 @@ -/* +/* * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -29,7 +29,6 @@ * \ingroup DNA */ - #ifndef DNA_ACTION_TYPES_H #define DNA_ACTION_TYPES_H @@ -204,7 +203,9 @@ typedef struct bPoseChannel { 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 */ + struct bPoseChannel *custom_tx; /* odd feature, display with another bones transform. + * needed in rare cases for advanced rigs, + * since the alternative is highly complicated - campbell */ /* transforms - written in by actions or transform */ float loc[3]; @@ -219,7 +220,8 @@ typedef struct bPoseChannel { float chan_mat[4][4]; /* matrix result of loc/quat/size , and where we put deform in, see next line */ float pose_mat[4][4]; /* constraints accumulate here. in the end, pose_mat = bone->arm_mat * chan_mat */ - float constinv[4][4]; /* inverse result of constraints. doesn't include effect of restposition, parent, and local transform*/ + float constinv[4][4]; /* inverse result of constraints. + * doesn't include effect of restposition, parent, and local transform*/ float pose_head[3]; /* actually pose_mat[3] */ float pose_tail[3]; /* also used for drawing help lines... */ diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 20a2c36166f..a4280a6e463 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -194,7 +194,7 @@ typedef struct bVisibilityActuator { int flag; } bVisibilityActuator; -typedef struct bTwoDFilterActuator{ +typedef struct bTwoDFilterActuator { char pad[4]; /* Tells what type of 2D Filter */ short type; @@ -205,7 +205,7 @@ typedef struct bTwoDFilterActuator{ /* a float argument */ float float_arg; struct Text *text; -}bTwoDFilterActuator; +} bTwoDFilterActuator; typedef struct bParentActuator { char pad[2]; diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index e1dfd652900..2233da86385 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -23,13 +23,13 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_ANIM_TYPES_H -#define DNA_ANIM_TYPES_H - /** \file DNA_anim_types.h * \ingroup DNA */ +#ifndef DNA_ANIM_TYPES_H +#define DNA_ANIM_TYPES_H + #ifdef __cplusplus extern "C" { #endif diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index 442fc3ddcce..45c30315575 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -23,13 +23,13 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_ARMATURE_TYPES_H -#define DNA_ARMATURE_TYPES_H - /** \file DNA_armature_types.h * \ingroup DNA */ +#ifndef DNA_ARMATURE_TYPES_H +#define DNA_ARMATURE_TYPES_H + #include "DNA_listBase.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_boid_types.h b/source/blender/makesdna/DNA_boid_types.h index 4de03f55077..53ff5179049 100644 --- a/source/blender/makesdna/DNA_boid_types.h +++ b/source/blender/makesdna/DNA_boid_types.h @@ -26,13 +26,13 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_BOID_TYPES_H -#define DNA_BOID_TYPES_H - /** \file DNA_boid_types.h * \ingroup DNA */ +#ifndef DNA_BOID_TYPES_H +#define DNA_BOID_TYPES_H + #include "DNA_listBase.h" typedef enum BoidRuleType { diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h index e9290a92493..e5c500f1fea 100644 --- a/source/blender/makesdna/DNA_brush_types.h +++ b/source/blender/makesdna/DNA_brush_types.h @@ -25,13 +25,13 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_BRUSH_TYPES_H -#define DNA_BRUSH_TYPES_H - /** \file DNA_brush_types.h * \ingroup DNA */ +#ifndef DNA_BRUSH_TYPES_H +#define DNA_BRUSH_TYPES_H + #include "DNA_ID.h" #include "DNA_texture_types.h" /* for MTex */ @@ -132,7 +132,7 @@ typedef struct Brush { #define BRUSH_CUSTOM_ICON (1<<28) /* temporary flag which sets up autmatically for correct - brush drawing when inverted modal operator is running */ + * brush drawing when inverted modal operator is running */ #define BRUSH_INVERTED (1<<29) /* Brush.sculpt_tool */ diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h index ff04a7fd366..a46be730d6c 100644 --- a/source/blender/makesdna/DNA_camera_types.h +++ b/source/blender/makesdna/DNA_camera_types.h @@ -24,13 +24,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_CAMERA_TYPES_H -#define DNA_CAMERA_TYPES_H /** \file DNA_camera_types.h * \ingroup DNA */ +#ifndef DNA_CAMERA_TYPES_H +#define DNA_CAMERA_TYPES_H + #include "DNA_defs.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index 7b2fb292d27..5c333c3fc1f 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -24,13 +24,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_CLOTH_TYPES_H -#define DNA_CLOTH_TYPES_H /** \file DNA_cloth_types.h * \ingroup DNA */ +#ifndef DNA_CLOTH_TYPES_H +#define DNA_CLOTH_TYPES_H + /** * This struct contains all the global data required to run a simulation. * At the time of this writing, this structure contains data appropriate diff --git a/source/blender/makesdna/DNA_color_types.h b/source/blender/makesdna/DNA_color_types.h index f3cfab4503b..f5762f8b49f 100644 --- a/source/blender/makesdna/DNA_color_types.h +++ b/source/blender/makesdna/DNA_color_types.h @@ -24,13 +24,14 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ -#ifndef DNA_COLOR_TYPES_H -#define DNA_COLOR_TYPES_H /** \file DNA_color_types.h * \ingroup DNA */ +#ifndef DNA_COLOR_TYPES_H +#define DNA_COLOR_TYPES_H + #include "DNA_vec_types.h" /* general defines for kernel functions */ diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index 4aff540a948..8fdbde60bab 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -26,13 +26,13 @@ * Constraint DNA data */ -#ifndef DNA_CONSTRAINT_TYPES_H -#define DNA_CONSTRAINT_TYPES_H - /** \file DNA_constraint_types.h * \ingroup DNA */ +#ifndef DNA_CONSTRAINT_TYPES_H +#define DNA_CONSTRAINT_TYPES_H + #include "DNA_defs.h" #include "DNA_ID.h" #include "DNA_listBase.h" @@ -126,10 +126,10 @@ typedef struct bPythonConstraint { /* Inverse-Kinematics (IK) constraint - This constraint supports a variety of mode determine by the type field - according to B_CONSTRAINT_IK_TYPE. - Some fields are used by all types, some are specific to some types - This is indicated in the comments for each field + * This constraint supports a variety of mode determine by the type field + * according to B_CONSTRAINT_IK_TYPE. + * Some fields are used by all types, some are specific to some types + * This is indicated in the comments for each field */ typedef struct bKinematicConstraint { struct Object *tar; /* All: target object in case constraint needs a target */ @@ -180,7 +180,10 @@ typedef struct bSplineIKConstraint { /* 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 intented for anyway. Not sure either if it would create backward incompatibility if I were to rename them. - theeth*/ + int reserved1; /* I'll be using reserved1 and reserved2 as Track and Up flags, + * not sure if that's what they were intented for anyway. + * Not sure either if it would create backward incompatibility if I were to rename them. + * - theeth*/ int reserved2; int flags; int pad; @@ -412,6 +415,8 @@ typedef struct bFollowTrackConstraint { struct MovieClip *clip; char track[24]; int flag, pad; + char object[24]; + struct Object *camera; } bFollowTrackConstraint; /* Camera Solver constraints */ @@ -420,6 +425,15 @@ typedef struct bCameraSolverConstraint { int flag, pad; } bCameraSolverConstraint; +/* Camera Solver constraints */ +typedef struct bObjectSolverConstraint { + struct MovieClip *clip; + int flag, pad; + char object[24]; + float invmat[4][4]; /* parent-inverse matrix to use */ + struct Object *camera; +} bObjectSolverConstraint; + /* ------------------------------------------ */ /* bConstraint->type @@ -455,6 +469,7 @@ typedef enum eBConstraint_Types { CONSTRAINT_TYPE_PIVOT, /* Pivot Constraint */ CONSTRAINT_TYPE_FOLLOWTRACK, /* Follow Track Constraint */ CONSTRAINT_TYPE_CAMERASOLVER, /* Camera Solver Constraint */ + CONSTRAINT_TYPE_OBJECTSOLVER, /* Object Solver Constraint */ /* NOTE: no constraints are allowed to be added after this */ NUM_CONSTRAINT_TYPES @@ -762,6 +777,11 @@ typedef enum eCameraSolver_Flags { CAMERASOLVER_ACTIVECLIP = (1<<0) } eCameraSolver_Flags; +/* ObjectSolver Constraint -> flag */ +typedef enum eObjectSolver_Flags { + OBJECTSOLVER_ACTIVECLIP = (1<<0) +} eObjectSolver_Flags; + /* Rigid-Body Constraint */ #define CONSTRAINT_DRAW_PIVOT 0x40 #define CONSTRAINT_DISABLE_LINKED_COLLISION 0x80 diff --git a/source/blender/makesdna/DNA_controller_types.h b/source/blender/makesdna/DNA_controller_types.h index 049e7bd4886..c8f4325d717 100644 --- a/source/blender/makesdna/DNA_controller_types.h +++ b/source/blender/makesdna/DNA_controller_types.h @@ -24,13 +24,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_CONTROLLER_TYPES_H -#define DNA_CONTROLLER_TYPES_H /** \file DNA_controller_types.h * \ingroup DNA */ +#ifndef DNA_CONTROLLER_TYPES_H +#define DNA_CONTROLLER_TYPES_H + struct bActuator; struct Text; struct bSensor; diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index 545829911e5..ffcc516f393 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -24,13 +24,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_CURVE_TYPES_H -#define DNA_CURVE_TYPES_H /** \file DNA_curve_types.h * \ingroup DNA */ +#ifndef DNA_CURVE_TYPES_H +#define DNA_CURVE_TYPES_H + #include "DNA_defs.h" #include "DNA_listBase.h" #include "DNA_vec_types.h" diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index d98e5200d21..8259eea42ce 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -36,6 +36,8 @@ extern "C" { #endif +#include "DNA_defs.h" /* USE_BMESH_FORWARD_COMPAT */ + /** descriptor and storage for a custom data layer */ typedef struct CustomDataLayer { int type; /* type of data in layer */ @@ -59,6 +61,9 @@ typedef struct CustomDataExternal { * layers, each with a data type (e.g. MTFace, MDeformVert, etc.). */ typedef struct CustomData { CustomDataLayer *layers; /* CustomDataLayers, ordered by type */ + int typemap[32]; /* 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 totlayer, maxlayer; /* number of layers, size of layers array */ int totsize, pad; /* in editmode, total size of all data layers */ void *pool; /* Bmesh: Memory pool for allocation of blocks */ @@ -75,7 +80,7 @@ typedef struct CustomData { #define CD_MCOL 6 #define CD_ORIGINDEX 7 #define CD_NORMAL 8 -#define CD_FLAGS 9 +#define CD_POLYINDEX 9 #define CD_PROP_FLT 10 #define CD_PROP_INT 11 #define CD_PROP_STR 12 @@ -91,8 +96,27 @@ typedef struct CustomData { #define CD_TEXTURE_MCOL 22 #define CD_CLOTH_ORCO 23 #define CD_RECAST 24 + +#ifdef USE_BMESH_FORWARD_COMPAT + +/* BMESH ONLY START */ +#define CD_MPOLY 25 +#define CD_MLOOP 26 +#define CD_SHAPE_KEYINDEX 27 +#define CD_SHAPEKEY 28 +#define CD_BWEIGHT 29 +#define CD_CREASE 30 +#define CD_WEIGHT_MLOOPCOL 31 +/* BMESH ONLY END */ + +#define CD_NUMTYPES 32 + +#else + #define CD_NUMTYPES 25 +#endif + /* Bits for CustomDataMask */ #define CD_MASK_MVERT (1 << CD_MVERT) #define CD_MASK_MSTICKY (1 << CD_MSTICKY) @@ -103,7 +127,7 @@ typedef struct CustomData { #define CD_MASK_MCOL (1 << CD_MCOL) #define CD_MASK_ORIGINDEX (1 << CD_ORIGINDEX) #define CD_MASK_NORMAL (1 << CD_NORMAL) -#define CD_MASK_FLAGS (1 << CD_FLAGS) +#define CD_MASK_POLYINDEX (1 << CD_POLYINDEX) #define CD_MASK_PROP_FLT (1 << CD_PROP_FLT) #define CD_MASK_PROP_INT (1 << CD_PROP_INT) #define CD_MASK_PROP_STR (1 << CD_PROP_STR) @@ -118,6 +142,20 @@ typedef struct CustomData { #define CD_MASK_CLOTH_ORCO (1 << CD_CLOTH_ORCO) #define CD_MASK_RECAST (1 << CD_RECAST) +#ifdef USE_BMESH_FORWARD_COMPAT + +/* BMESH ONLY START */ +#define CD_MASK_MPOLY (1 << CD_MPOLY) +#define CD_MASK_MLOOP (1 << CD_MLOOP) +#define CD_MASK_SHAPE_KEYINDEX (1 << CD_SHAPE_KEYINDEX) +#define CD_MASK_SHAPEKEY (1 << CD_SHAPEKEY) +#define CD_MASK_BWEIGHT (1 << CD_BWEIGHT) +#define CD_MASK_CREASE (1 << CD_CREASE) +#define CD_MASK_WEIGHT_MLOOPCOL (1 << CD_WEIGHT_MLOOPCOL) +/* BMESH ONLY END */ + +#endif + /* CustomData.flag */ /* indicates layer should not be copied by CustomData_from_template or diff --git a/source/blender/makesdna/DNA_defs.h b/source/blender/makesdna/DNA_defs.h index 25d95419605..575938da653 100644 --- a/source/blender/makesdna/DNA_defs.h +++ b/source/blender/makesdna/DNA_defs.h @@ -20,13 +20,13 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_DEFS_H -#define DNA_DEFS_H - /** \file DNA_defs.h * \ingroup DNA */ +#ifndef DNA_DEFS_H +#define DNA_DEFS_H + /* makesdna ignores */ #ifdef DNA_DEPRECATED_ALLOW /* allow use of deprecated items */ @@ -45,4 +45,6 @@ /* hrmf, we need a better include then this */ #include "../blenloader/BLO_sys_types.h" /* needed for int64_t only! */ +#define USE_BMESH_FORWARD_COMPAT + #endif /* DNA_DEFS_H */ diff --git a/source/blender/makesdna/DNA_documentation.h b/source/blender/makesdna/DNA_documentation.h index 206a45fad5d..c1d6ee4aec3 100644 --- a/source/blender/makesdna/DNA_documentation.h +++ b/source/blender/makesdna/DNA_documentation.h @@ -63,14 +63,12 @@ * \section dnanote NOTE - PLEASE READ INSTRUCTIONS ABOUT ADDING VARIABLES IN 'DNA' STRUCTS IN - - intern/dna_genfile.c - (ton) + * PLEASE READ INSTRUCTIONS ABOUT ADDING VARIABLES IN 'DNA' STRUCTS IN + * + * intern/dna_genfile.c + * (ton) */ - /* This file has intentionally no definitions or implementation. */ - diff --git a/source/blender/makesdna/DNA_dynamicpaint_types.h b/source/blender/makesdna/DNA_dynamicpaint_types.h index fdfd1e2b754..d58e11d9640 100644 --- a/source/blender/makesdna/DNA_dynamicpaint_types.h +++ b/source/blender/makesdna/DNA_dynamicpaint_types.h @@ -1,15 +1,30 @@ -/** -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* Contributor(s): Miika Hämäläinen -* -* ***** END GPL LICENSE BLOCK ***** -*/ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributor(s): Miika Hämäläinen + * + * ***** END GPL LICENSE BLOCK ***** + * + */ + +/** \file DNA_dynamicpaint_types.h + * \ingroup DNA + */ + #ifndef DNA_DYNAMICPAINT_TYPES_H #define DNA_DYNAMICPAINT_TYPES_H diff --git a/source/blender/makesdna/DNA_effect_types.h b/source/blender/makesdna/DNA_effect_types.h index 237360f003e..b7437b5e973 100644 --- a/source/blender/makesdna/DNA_effect_types.h +++ b/source/blender/makesdna/DNA_effect_types.h @@ -24,13 +24,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_EFFECT_TYPES_H -#define DNA_EFFECT_TYPES_H /** \file DNA_effect_types.h * \ingroup DNA */ +#ifndef DNA_EFFECT_TYPES_H +#define DNA_EFFECT_TYPES_H + /* don't forget, new effects also in writefile.c for dna!!! */ #define PAF_MAXMULT 4 diff --git a/source/blender/makesdna/DNA_fileglobal_types.h b/source/blender/makesdna/DNA_fileglobal_types.h index c606e5132d2..31ad628d630 100644 --- a/source/blender/makesdna/DNA_fileglobal_types.h +++ b/source/blender/makesdna/DNA_fileglobal_types.h @@ -24,13 +24,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_FILEGLOBAL_TYPES_H -#define DNA_FILEGLOBAL_TYPES_H /** \file DNA_fileglobal_types.h * \ingroup DNA */ +#ifndef DNA_FILEGLOBAL_TYPES_H +#define DNA_FILEGLOBAL_TYPES_H + struct bScreen; struct Scene; diff --git a/source/blender/makesdna/DNA_genfile.h b/source/blender/makesdna/DNA_genfile.h index be13c8bba4f..6516b50402d 100644 --- a/source/blender/makesdna/DNA_genfile.h +++ b/source/blender/makesdna/DNA_genfile.h @@ -25,14 +25,14 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef GENFILE_H -#define GENFILE_H - /** \file DNA_genfile.h * \ingroup DNA * \brief blenloader genfile private function prototypes */ +#ifndef DNA_GENFILE_H +#define DNA_GENFILE_H + struct SDNA; extern unsigned char DNAstr[]; /* DNA.c */ diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h index a4d0b3685e3..71f0dbb60b1 100644 --- a/source/blender/makesdna/DNA_gpencil_types.h +++ b/source/blender/makesdna/DNA_gpencil_types.h @@ -22,13 +22,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_GPENCIL_TYPES_H -#define DNA_GPENCIL_TYPES_H /** \file DNA_gpencil_types.h * \ingroup DNA */ +#ifndef DNA_GPENCIL_TYPES_H +#define DNA_GPENCIL_TYPES_H + #include "DNA_listBase.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_group_types.h b/source/blender/makesdna/DNA_group_types.h index e174900aa8d..ab42086d6d0 100644 --- a/source/blender/makesdna/DNA_group_types.h +++ b/source/blender/makesdna/DNA_group_types.h @@ -27,13 +27,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_GROUP_TYPES_H -#define DNA_GROUP_TYPES_H /** \file DNA_group_types.h * \ingroup DNA */ +#ifndef DNA_GROUP_TYPES_H +#define DNA_GROUP_TYPES_H + #include "DNA_listBase.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h index 4c3cc0ac0eb..a1b0ab06ecd 100644 --- a/source/blender/makesdna/DNA_image_types.h +++ b/source/blender/makesdna/DNA_image_types.h @@ -24,13 +24,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_IMAGE_TYPES_H -#define DNA_IMAGE_TYPES_H /** \file DNA_image_types.h * \ingroup DNA */ +#ifndef DNA_IMAGE_TYPES_H +#define DNA_IMAGE_TYPES_H + #include "DNA_ID.h" struct PackedFile; @@ -111,14 +112,14 @@ typedef struct Image { /* **************** IMAGE ********************* */ /* Image.flag */ -#define IMA_FIELDS 1 -#define IMA_STD_FIELD 2 -#define IMA_DO_PREMUL 4 - -#define IMA_REFLECT 16 -#define IMA_NOCOLLECT 32 -#define IMA_DEPRECATED 64 -#define IMA_OLD_PREMUL 128 +#define IMA_FIELDS 1 +#define IMA_STD_FIELD 2 +#define IMA_DO_PREMUL 4 +#define IMA_REFLECT 16 +#define IMA_NOCOLLECT 32 +#define IMA_DEPRECATED 64 +#define IMA_OLD_PREMUL 128 +#define IMA_CM_PREDIVIDE 256 /* Image.tpageflag */ #define IMA_TILES 1 diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h index 1c22583b82c..18fbde8a3c3 100644 --- a/source/blender/makesdna/DNA_lamp_types.h +++ b/source/blender/makesdna/DNA_lamp_types.h @@ -24,13 +24,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_LAMP_TYPES_H -#define DNA_LAMP_TYPES_H /** \file DNA_lamp_types.h * \ingroup DNA */ +#ifndef DNA_LAMP_TYPES_H +#define DNA_LAMP_TYPES_H + #include "DNA_defs.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_lattice_types.h b/source/blender/makesdna/DNA_lattice_types.h index baa2f5f911a..2a67afb5708 100644 --- a/source/blender/makesdna/DNA_lattice_types.h +++ b/source/blender/makesdna/DNA_lattice_types.h @@ -24,13 +24,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_LATTICE_TYPES_H -#define DNA_LATTICE_TYPES_H /** \file DNA_lattice_types.h * \ingroup DNA */ +#ifndef DNA_LATTICE_TYPES_H +#define DNA_LATTICE_TYPES_H + #include "DNA_defs.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_listBase.h b/source/blender/makesdna/DNA_listBase.h index 6a472272382..99ad6f41e96 100644 --- a/source/blender/makesdna/DNA_listBase.h +++ b/source/blender/makesdna/DNA_listBase.h @@ -27,15 +27,15 @@ * */ -#ifndef DNA_LISTBASE_H -#define DNA_LISTBASE_H - /** \file DNA_listBase.h * \ingroup DNA * \brief These structs are the foundation for all linked lists in the * library system. */ +#ifndef DNA_LISTBASE_H +#define DNA_LISTBASE_H + #ifdef __cplusplus extern "C" { #endif diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index a693e946cc4..82939d96ca0 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -24,13 +24,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_MATERIAL_TYPES_H -#define DNA_MATERIAL_TYPES_H /** \file DNA_material_types.h * \ingroup DNA */ +#ifndef DNA_MATERIAL_TYPES_H +#define DNA_MATERIAL_TYPES_H + #include "DNA_defs.h" #include "DNA_ID.h" #include "DNA_listBase.h" @@ -168,8 +169,8 @@ typedef struct Material { short sss_flag, sss_preset; int mapto_textured; /* render-time cache to optimise texture lookups */ - short shadowonly_flag; /* "shadowsonly" type */ - short index; /* custom index for render passes */ + short shadowonly_flag; /* "shadowsonly" type */ + short index; /* custom index for render passes */ short vcol_alpha; short pad[3]; diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index 8db24a91d41..a68cac301d2 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -24,18 +24,21 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_MESH_TYPES_H -#define DNA_MESH_TYPES_H /** \file DNA_mesh_types.h * \ingroup DNA */ +#ifndef DNA_MESH_TYPES_H +#define DNA_MESH_TYPES_H + #include "DNA_defs.h" #include "DNA_listBase.h" #include "DNA_ID.h" #include "DNA_customdata_types.h" +#include "DNA_defs.h" /* USE_BMESH_FORWARD_COMPAT */ + struct DerivedMesh; struct Ipo; struct Key; @@ -47,6 +50,11 @@ struct MCol; struct MSticky; struct Mesh; struct OcInfo; +struct MPoly; +struct MTexPoly; +struct MLoop; +struct MLoopUV; +struct MLoopCol; struct Multires; struct EditMesh; struct AnimData; @@ -61,6 +69,17 @@ typedef struct Mesh { struct Key *key; struct Material **mat; +/*#ifdef USE_BMESH_FORWARD_COMPAT*/ /* XXX - ifdefs dont work here! */ +/* BMESH ONLY */ + /*new face structures*/ + struct MPoly *mpoly; + struct MTexPoly *mtpoly; + struct MLoop *mloop; + struct MLoopUV *mloopuv; + struct MLoopCol *mloopcol; +/* END BMESH ONLY */ +/*#endif*/ + struct MFace *mface; /* array of mesh object mode faces */ struct MTFace *mtface; /* store face UV's and texture here */ struct TFace *tface; /* depecrated, use mtface */ @@ -76,8 +95,20 @@ typedef struct Mesh { struct CustomData vdata, edata, fdata; +/*#ifdef USE_BMESH_FORWARD_COMPAT*/ /* XXX - ifdefs dont work here! */ +/* BMESH ONLY */ + struct CustomData pdata, ldata; +/* END BMESH ONLY */ +/*#endif*/ + int totvert, totedge, totface, totselect; - + +/*#ifdef USE_BMESH_FORWARD_COMPAT*/ +/* BMESH ONLY */ + int totpoly, totloop; +/* END BMESH ONLY */ +/*#endif*/ /* XXX - ifdefs dont work here! */ + /* the last selected vertex/edge/face are used for the active face however * this means the active face must always be selected, this is to keep track * of the last selected face and is similar to the old active face flag where @@ -199,7 +230,7 @@ typedef struct TFace { * will eventually be removed */ #if 0 /* enable in bmesh branch only for now */ -#define USE_MESH_FORWARDS_COMAT +#define USE_BMESH_SAVE_AS_COMPAT #endif diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index 7ebf2fe0948..8a5cc8b8d9b 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -24,13 +24,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_MESHDATA_TYPES_H -#define DNA_MESHDATA_TYPES_H /** \file DNA_meshdata_types.h * \ingroup DNA */ +#ifndef DNA_MESHDATA_TYPES_H +#define DNA_MESHDATA_TYPES_H + #include "DNA_customdata_types.h" #include "DNA_listBase.h" @@ -72,21 +73,41 @@ typedef struct MCol { char a, r, g, b; } MCol; +#ifdef USE_BMESH_FORWARD_COMPAT + +/*new face structure, replaces MFace, which is now + only used for storing tesselations.*/ +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 */ + 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*/ +} MLoop; + +#endif /* USE_BMESH_FORWARD_COMPAT */ + /*bmesh custom data stuff*/ -typedef struct MTexPoly{ +typedef struct MTexPoly { struct Image *tpage; char flag, transp; short mode,tile,unwrap; -}MTexPoly; +} MTexPoly; -typedef struct MLoopUV{ +typedef struct MLoopUV { float uv[2]; -}MLoopUV; +} MLoopUV; -typedef struct MLoopCol{ +typedef struct MLoopCol { char a, r, g, b; - int pad; /*waste!*/ -}MLoopCol; +} MLoopCol; typedef struct MSticky { float co[2]; @@ -105,13 +126,13 @@ typedef struct MTFace { } MTFace; /*Custom Data Properties*/ -typedef struct MFloatProperty{ +typedef struct MFloatProperty { float f; } MFloatProperty; -typedef struct MIntProperty{ +typedef struct MIntProperty { int i; } MIntProperty; -typedef struct MStringProperty{ +typedef struct MStringProperty { char s[256]; } MStringProperty; @@ -174,7 +195,7 @@ typedef struct Multires { /** End Multires **/ -typedef struct MRecast{ +typedef struct MRecast { int i; } MRecast; diff --git a/source/blender/makesdna/DNA_meta_types.h b/source/blender/makesdna/DNA_meta_types.h index 1ce90e7d526..ae658cee8f5 100644 --- a/source/blender/makesdna/DNA_meta_types.h +++ b/source/blender/makesdna/DNA_meta_types.h @@ -24,13 +24,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_META_TYPES_H -#define DNA_META_TYPES_H /** \file DNA_meta_types.h * \ingroup DNA */ +#ifndef DNA_META_TYPES_H +#define DNA_META_TYPES_H + #include "DNA_listBase.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 5edc0869d9b..5fe9851738a 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -18,13 +18,13 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_MODIFIER_TYPES_H -#define DNA_MODIFIER_TYPES_H - /** \file DNA_modifier_types.h * \ingroup DNA */ +#ifndef DNA_MODIFIER_TYPES_H +#define DNA_MODIFIER_TYPES_H + #include "DNA_defs.h" #include "DNA_listBase.h" @@ -76,6 +76,7 @@ typedef enum ModifierType { eModifierType_WeightVGProximity, eModifierType_Ocean, eModifierType_DynamicPaint, + eModifierType_Remesh, NUM_MODIFIER_TYPES } ModifierType; @@ -704,7 +705,7 @@ typedef struct SimpleDeformModifierData { #define MOD_SIMPLEDEFORM_LOCK_AXIS_Y (1<<1) /* indicates whether simple deform should use the local - coordinates or global coordinates of origin */ + * coordinates or global coordinates of origin */ #define MOD_SIMPLEDEFORM_ORIGIN_LOCAL (1<<0) #define MOD_UVPROJECT_MAX 10 @@ -1032,4 +1033,39 @@ typedef struct DynamicPaintModifierData { int pad; } DynamicPaintModifierData; +/* Remesh modifier */ + +typedef enum RemeshModifierFlags { + MOD_REMESH_FLOOD_FILL = 1, +} RemeshModifierFlags; + +typedef enum RemeshModifierMode { + /* blocky */ + MOD_REMESH_CENTROID = 0, + /* smooth */ + MOD_REMESH_MASS_POINT = 1, + /* keeps sharp edges */ + MOD_REMESH_SHARP_FEATURES = 2, +} RemeshModifierMode; + +typedef struct RemeshModifierData { + ModifierData modifier; + + /* floodfill option, controls how small components can be + before they are removed */ + float threshold; + + /* ratio between size of model and grid */ + float scale; + + float hermite_num; + + /* octree depth */ + char depth; + + char flag; + char mode; + char pad; +} RemeshModifierData; + #endif diff --git a/source/blender/makesdna/DNA_movieclip_types.h b/source/blender/makesdna/DNA_movieclip_types.h index 1a065741121..5d2f2f5978f 100644 --- a/source/blender/makesdna/DNA_movieclip_types.h +++ b/source/blender/makesdna/DNA_movieclip_types.h @@ -26,15 +26,15 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_MOVIECLIP_TYPES_H -#define DNA_MOVIECLIP_TYPES_H - /** \file DNA_movieclip_types.h * \ingroup DNA * \since may-2011 * \author Sergey Sharybin */ +#ifndef DNA_MOVIECLIP_TYPES_H +#define DNA_MOVIECLIP_TYPES_H + #include "DNA_ID.h" #include "DNA_tracking_types.h" diff --git a/source/blender/makesdna/DNA_nla_types.h b/source/blender/makesdna/DNA_nla_types.h index b92cf5c67e4..a28097e8449 100644 --- a/source/blender/makesdna/DNA_nla_types.h +++ b/source/blender/makesdna/DNA_nla_types.h @@ -25,13 +25,13 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_NLA_TYPES_H -#define DNA_NLA_TYPES_H - /** \file DNA_nla_types.h * \ingroup DNA */ +#ifndef DNA_NLA_TYPES_H +#define DNA_NLA_TYPES_H + #include "DNA_listBase.h" struct bAction; diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 845d8a87c5b..aa9b43584fd 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -25,13 +25,13 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_NODE_TYPES_H -#define DNA_NODE_TYPES_H - /** \file DNA_node_types.h * \ingroup DNA */ +#ifndef DNA_NODE_TYPES_H +#define DNA_NODE_TYPES_H + #include "DNA_ID.h" #include "DNA_vec_types.h" #include "DNA_listBase.h" @@ -354,12 +354,12 @@ typedef struct NodeChroma { float t1,t2,t3; float fsize,fstrength,falpha; float key[4]; - short algorithm, channel; + short algorithm, channel; } NodeChroma; typedef struct NodeTwoXYs { short x1, x2, y1, y2; - float fac_x1, fac_x2, fac_y1, fac_y2; + float fac_x1, fac_x2, fac_y1, fac_y2; } NodeTwoXYs; typedef struct NodeTwoFloats { @@ -428,7 +428,7 @@ typedef struct NodeColorspill { short limchan, unspill; float limscale; float uspillr, uspillg, uspillb; -}NodeColorspill; +} NodeColorspill; typedef struct NodeTexBase { TexMapping tex_mapping; diff --git a/source/blender/makesdna/DNA_object_fluidsim.h b/source/blender/makesdna/DNA_object_fluidsim.h index fd6f4afd593..022dc53848f 100644 --- a/source/blender/makesdna/DNA_object_fluidsim.h +++ b/source/blender/makesdna/DNA_object_fluidsim.h @@ -26,13 +26,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_OBJECT_FLUIDSIM_H -#define DNA_OBJECT_FLUIDSIM_H /** \file DNA_object_fluidsim.h * \ingroup DNA */ +#ifndef DNA_OBJECT_FLUIDSIM_H +#define DNA_OBJECT_FLUIDSIM_H + #include "DNA_ID.h" #ifdef __cplusplus diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h index 61fc44d94ff..5875ff30bcc 100644 --- a/source/blender/makesdna/DNA_object_force.h +++ b/source/blender/makesdna/DNA_object_force.h @@ -26,13 +26,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_OBJECT_FORCE_H -#define DNA_OBJECT_FORCE_H /** \file DNA_object_force.h * \ingroup DNA */ +#ifndef DNA_OBJECT_FORCE_H +#define DNA_OBJECT_FORCE_H + #ifdef __cplusplus extern "C" { #endif diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 46b971e8e0d..7f1239195ec 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -24,14 +24,15 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_OBJECT_TYPES_H -#define DNA_OBJECT_TYPES_H /** \file DNA_object_types.h * \ingroup DNA * \brief Object is a sort of wrapper for general info. */ +#ifndef DNA_OBJECT_TYPES_H +#define DNA_OBJECT_TYPES_H + #include "DNA_defs.h" #include "DNA_listBase.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_outliner_types.h b/source/blender/makesdna/DNA_outliner_types.h index ec8f85ea91f..ee3903c3b40 100644 --- a/source/blender/makesdna/DNA_outliner_types.h +++ b/source/blender/makesdna/DNA_outliner_types.h @@ -24,13 +24,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_OUTLINER_TYPES_H -#define DNA_OUTLINER_TYPES_H /** \file DNA_outliner_types.h * \ingroup DNA */ +#ifndef DNA_OUTLINER_TYPES_H +#define DNA_OUTLINER_TYPES_H + #include "DNA_listBase.h" struct ID; diff --git a/source/blender/makesdna/DNA_packedFile_types.h b/source/blender/makesdna/DNA_packedFile_types.h index bbbbf39619b..91134c2c575 100644 --- a/source/blender/makesdna/DNA_packedFile_types.h +++ b/source/blender/makesdna/DNA_packedFile_types.h @@ -25,15 +25,15 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_PACKEDFILE_TYPES_H -#define DNA_PACKEDFILE_TYPES_H - /** \file DNA_packedFile_types.h * \ingroup DNA * \author nzc * \since 12-oct-2000 nzc */ +#ifndef DNA_PACKEDFILE_TYPES_H +#define DNA_PACKEDFILE_TYPES_H + typedef struct PackedFile { int size; int seek; diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h index c56d771d3b3..07efd17df7f 100644 --- a/source/blender/makesdna/DNA_particle_types.h +++ b/source/blender/makesdna/DNA_particle_types.h @@ -25,13 +25,13 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_PARTICLE_TYPES_H -#define DNA_PARTICLE_TYPES_H - /** \file DNA_particle_types.h * \ingroup DNA */ +#ifndef DNA_PARTICLE_TYPES_H +#define DNA_PARTICLE_TYPES_H + #include "DNA_defs.h" #include "DNA_ID.h" #include "DNA_boid_types.h" @@ -65,7 +65,7 @@ typedef struct BoidParticle { typedef struct ParticleSpring { float rest_length; unsigned int particle_index[2], delete_flag; -}ParticleSpring; +} ParticleSpring; /* Child particles are created around or between parent particles */ typedef struct ChildParticle { @@ -295,7 +295,7 @@ typedef struct ParticleSystem float dt_frac; /* current time step, as a fraction of a frame */ float _pad; /* spare capacity */ -}ParticleSystem; +} ParticleSystem; /* part->type */ /* hair is allways baked static in object/geometry space */ diff --git a/source/blender/makesdna/DNA_property_types.h b/source/blender/makesdna/DNA_property_types.h index 004016606a5..e74ae41a421 100644 --- a/source/blender/makesdna/DNA_property_types.h +++ b/source/blender/makesdna/DNA_property_types.h @@ -27,8 +27,6 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_PROPERTY_TYPES_H -#define DNA_PROPERTY_TYPES_H /** \file DNA_property_types.h * \ingroup DNA @@ -38,6 +36,9 @@ * hierarchy here is a bit strange, and not desirable. */ +#ifndef DNA_PROPERTY_TYPES_H +#define DNA_PROPERTY_TYPES_H + /* ********************* PROPERTY ************************ */ typedef struct bProperty { diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 01d3feb2135..4d74089972b 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -24,13 +24,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_SCENE_TYPES_H -#define DNA_SCENE_TYPES_H /** \file DNA_scene_types.h * \ingroup DNA */ +#ifndef DNA_SCENE_TYPES_H +#define DNA_SCENE_TYPES_H + #include "DNA_defs.h" // XXX, temp feature - campbell @@ -337,9 +338,15 @@ typedef struct RenderData { /** For UR edge rendering: give the edges this color */ float edgeR, edgeG, edgeB; - - short fullscreen DNA_DEPRECATED, xplay DNA_DEPRECATED, yplay DNA_DEPRECATED, freqplay DNA_DEPRECATED; /* standalone player */ // XXX deprecated since 2.5 - short depth DNA_DEPRECATED, attrib DNA_DEPRECATED; /* standalone player */ // XXX deprecated since 2.5 + + + /* standalone player */ // XXX deprecated since 2.5 + short fullscreen DNA_DEPRECATED, xplay DNA_DEPRECATED, yplay DNA_DEPRECATED; + short freqplay DNA_DEPRECATED; + /* standalone player */ // XXX deprecated since 2.5 + short depth DNA_DEPRECATED, attrib DNA_DEPRECATED; + + int frame_step; /* frames to jump during render/playback */ short stereomode DNA_DEPRECATED; /* standalone player stereo settings */ // XXX deprecated since 2.5 @@ -1089,7 +1096,9 @@ typedef struct Scene { #define R_STAMP_SEQSTRIP 0x0200 #define R_STAMP_RENDERTIME 0x0400 #define R_STAMP_CAMERALENS 0x0800 -#define R_STAMP_ALL (R_STAMP_TIME|R_STAMP_FRAME|R_STAMP_DATE|R_STAMP_CAMERA|R_STAMP_SCENE|R_STAMP_NOTE|R_STAMP_MARKER|R_STAMP_FILENAME|R_STAMP_SEQSTRIP|R_STAMP_RENDERTIME|R_STAMP_CAMERALENS) +#define R_STAMP_ALL (R_STAMP_TIME|R_STAMP_FRAME|R_STAMP_DATE|R_STAMP_CAMERA|R_STAMP_SCENE| \ + R_STAMP_NOTE|R_STAMP_MARKER|R_STAMP_FILENAME|R_STAMP_SEQSTRIP| \ + R_STAMP_RENDERTIME|R_STAMP_CAMERALENS) /* alphamode */ #define R_ADDSKY 0 @@ -1097,7 +1106,8 @@ typedef struct Scene { #define R_ALPHAKEY 2 /* color_mgt_flag */ -#define R_COLOR_MANAGEMENT 1 +#define R_COLOR_MANAGEMENT (1 << 0) +#define R_COLOR_MANAGEMENT_PREDIVIDE (1 << 1) /* subimtype, flag options for imtype */ #define R_OPENEXR_HALF 1 /*deprecated*/ @@ -1147,12 +1157,31 @@ typedef struct Scene { #define MINAFRAMEF -300000.0f /* depricate this! */ -#define TESTBASE(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) ) -#define TESTBASELIB(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && ((base)->object->id.lib==NULL) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0)) -#define TESTBASELIB_BGMODE(v3d, scene, base) ( ((base)->flag & SELECT) && ((base)->lay & (v3d ? v3d->lay : scene->lay)) && ((base)->object->id.lib==NULL) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0)) -#define BASE_EDITABLE_BGMODE(v3d, scene, base) (((base)->lay & (v3d ? v3d->lay : scene->lay)) && ((base)->object->id.lib==NULL) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0)) -#define BASE_SELECTABLE(v3d, base) ((base->lay & v3d->lay) && (base->object->restrictflag & (OB_RESTRICT_SELECT|OB_RESTRICT_VIEW))==0) -#define BASE_VISIBLE(v3d, base) ((base->lay & v3d->lay) && (base->object->restrictflag & OB_RESTRICT_VIEW)==0) +#define TESTBASE(v3d, base) ( \ + ((base)->flag & SELECT) && \ + ((base)->lay & v3d->lay) && \ + (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) ) +#define TESTBASELIB(v3d, base) ( \ + ((base)->flag & SELECT) && \ + ((base)->lay & v3d->lay) && \ + ((base)->object->id.lib==NULL) && \ + (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) ) +#define TESTBASELIB_BGMODE(v3d, scene, base) ( \ + ((base)->flag & SELECT) && \ + ((base)->lay & (v3d ? v3d->lay : scene->lay)) && \ + ((base)->object->id.lib==NULL) && \ + (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) ) +#define BASE_EDITABLE_BGMODE(v3d, scene, base) ( \ + ((base)->lay & (v3d ? v3d->lay : scene->lay)) && \ + ((base)->object->id.lib==NULL) && \ + (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0)) +#define BASE_SELECTABLE(v3d, base) ( \ + (base->lay & v3d->lay) && \ + (base->object->restrictflag & (OB_RESTRICT_SELECT|OB_RESTRICT_VIEW))==0 ) +#define BASE_VISIBLE(v3d, base) ( \ + (base->lay & v3d->lay) && \ + (base->object->restrictflag & OB_RESTRICT_VIEW)==0 ) + #define FIRSTBASE scene->base.first #define LASTBASE scene->base.last #define BASACT (scene->basact) diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index c90a0acc273..504c8da7612 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -22,13 +22,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_SCREEN_TYPES_H -#define DNA_SCREEN_TYPES_H /** \file DNA_screen_types.h * \ingroup DNA */ +#ifndef DNA_SCREEN_TYPES_H +#define DNA_SCREEN_TYPES_H + #include "DNA_listBase.h" #include "DNA_view2d_types.h" #include "DNA_vec_types.h" diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h index b3419a77aab..462ff8ce045 100644 --- a/source/blender/makesdna/DNA_sdna_types.h +++ b/source/blender/makesdna/DNA_sdna_types.h @@ -24,13 +24,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_SDNA_H -#define DNA_SDNA_H /** * \file DNA_sdna_types.h * \ingroup DNA */ +#ifndef DNA_SDNA_H +#define DNA_SDNA_H + # # typedef struct SDNA { diff --git a/source/blender/makesdna/DNA_sensor_types.h b/source/blender/makesdna/DNA_sensor_types.h index 451774b1abb..e7444b06898 100644 --- a/source/blender/makesdna/DNA_sensor_types.h +++ b/source/blender/makesdna/DNA_sensor_types.h @@ -24,15 +24,16 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_SENSOR_TYPES_H -#define DNA_SENSOR_TYPES_H + /** \file DNA_sensor_types.h * \ingroup DNA * \since mar-2001 * \author nzc - * */ +#ifndef DNA_SENSOR_TYPES_H +#define DNA_SENSOR_TYPES_H + struct Object; struct Material; diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index ca2b7e0b2a9..aab20dbeee1 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -24,14 +24,15 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_SEQUENCE_TYPES_H -#define DNA_SEQUENCE_TYPES_H /** \file DNA_sequence_types.h * \ingroup DNA * \since mar-2001 * \author nzc */ +#ifndef DNA_SEQUENCE_TYPES_H +#define DNA_SEQUENCE_TYPES_H + #include "DNA_defs.h" #include "DNA_listBase.h" #include "DNA_vec_types.h" @@ -347,9 +348,9 @@ typedef struct SpeedControlVars { #define SEQ_BLEND_REPLACE 0 /* all other BLEND_MODEs are simple SEQ_EFFECT ids and therefore identical - to the table above. (Only those effects that handle _exactly_ two inputs, - otherwise, you can't really blend, right :) !) -*/ + * to the table above. (Only those effects that handle _exactly_ two inputs, + * otherwise, you can't really blend, right :) !) + */ #define SEQ_HAS_PATH(_seq) (ELEM5((_seq)->type, SEQ_MOVIE, SEQ_IMAGE, SEQ_SOUND, SEQ_RAM_SOUND, SEQ_HD_SOUND)) diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h index 5b3aae6e4a8..ed764c4f644 100644 --- a/source/blender/makesdna/DNA_smoke_types.h +++ b/source/blender/makesdna/DNA_smoke_types.h @@ -24,13 +24,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_SMOKE_TYPES_H -#define DNA_SMOKE_TYPES_H /** \file DNA_smoke_types.h * \ingroup DNA */ +#ifndef DNA_SMOKE_TYPES_H +#define DNA_SMOKE_TYPES_H + /* flags */ #define MOD_SMOKE_HIGHRES (1<<1) /* enable high resolution */ #define MOD_SMOKE_DISSOLVE (1<<2) /* let smoke dissolve */ diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h index b83ab0f9f75..f530730a544 100644 --- a/source/blender/makesdna/DNA_sound_types.h +++ b/source/blender/makesdna/DNA_sound_types.h @@ -24,14 +24,15 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_SOUND_TYPES_H -#define DNA_SOUND_TYPES_H /** \file DNA_sound_types.h * \ingroup DNA * \since mar-2001 * \author nzc */ +#ifndef DNA_SOUND_TYPES_H +#define DNA_SOUND_TYPES_H + #include "DNA_listBase.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 29967dfc1bd..d502e56bf10 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -24,14 +24,15 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_SPACE_TYPES_H -#define DNA_SPACE_TYPES_H /** \file DNA_space_types.h * \ingroup DNA * \since mar-2001 * \author nzc */ +#ifndef DNA_SPACE_TYPES_H +#define DNA_SPACE_TYPES_H + #include "DNA_defs.h" #include "DNA_listBase.h" #include "DNA_color_types.h" /* for Histogram */ diff --git a/source/blender/makesdna/DNA_speaker_types.h b/source/blender/makesdna/DNA_speaker_types.h index 02106fa45ad..2e8227f4f92 100644 --- a/source/blender/makesdna/DNA_speaker_types.h +++ b/source/blender/makesdna/DNA_speaker_types.h @@ -19,13 +19,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_SPEAKER_TYPES_H -#define DNA_SPEAKER_TYPES_H /** \file DNA_speaker_types.h * \ingroup DNA */ +#ifndef DNA_SPEAKER_TYPES_H +#define DNA_SPEAKER_TYPES_H + #include "DNA_ID.h" struct AnimData; diff --git a/source/blender/makesdna/DNA_text_types.h b/source/blender/makesdna/DNA_text_types.h index 18622cfe75f..67f3c5288f6 100644 --- a/source/blender/makesdna/DNA_text_types.h +++ b/source/blender/makesdna/DNA_text_types.h @@ -24,14 +24,15 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_TEXT_TYPES_H -#define DNA_TEXT_TYPES_H /** \file DNA_text_types.h * \ingroup DNA * \since mar-2001 * \author nzc */ +#ifndef DNA_TEXT_TYPES_H +#define DNA_TEXT_TYPES_H + #include "DNA_listBase.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h index 5d060f152aa..82ffa82cf60 100644 --- a/source/blender/makesdna/DNA_texture_types.h +++ b/source/blender/makesdna/DNA_texture_types.h @@ -24,8 +24,6 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_TEXTURE_TYPES_H -#define DNA_TEXTURE_TYPES_H /** \file DNA_texture_types.h * \ingroup DNA @@ -33,6 +31,9 @@ * \author nzc */ +#ifndef DNA_TEXTURE_TYPES_H +#define DNA_TEXTURE_TYPES_H + #include "DNA_defs.h" #include "DNA_ID.h" #include "DNA_image_types.h" /* ImageUser */ diff --git a/source/blender/makesdna/DNA_tracking_types.h b/source/blender/makesdna/DNA_tracking_types.h index 82ccbf87c0b..131c540ac47 100644 --- a/source/blender/makesdna/DNA_tracking_types.h +++ b/source/blender/makesdna/DNA_tracking_types.h @@ -26,15 +26,15 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_TRACKING_TYPES_H -#define DNA_TRACKING_TYPES_H - /** \file DNA_tracking_types.h * \ingroup DNA * \since may-2011 * \author Sergey Sharybin */ +#ifndef DNA_TRACKING_TYPES_H +#define DNA_TRACKING_TYPES_H + #include "DNA_listBase.h" /* match-moving data */ @@ -142,7 +142,10 @@ typedef struct MovieTrackingSettings { /* cleanup */ int clean_frames, clean_action; - float clean_error, pad; + float clean_error; + + /* set object scale */ + float object_distance; /* distance between two bundles used for object scaling */ } MovieTrackingSettings; typedef struct MovieTrackingStabilization { @@ -172,6 +175,17 @@ typedef struct MovieTrackingReconstruction { struct MovieReconstructedCamera *cameras; /* reconstructed cameras */ } MovieTrackingReconstruction; +typedef struct MovieTrackingObject { + struct MovieTrackingObject *next, *prev; + + char name[24]; /* Name of tracking object */ + int flag; + float scale; /* scale of object solution in amera space */ + + ListBase tracks; /* list of tracks use to tracking this object */ + MovieTrackingReconstruction reconstruction; /* reconstruction data for this object */ +} MovieTrackingObject; + typedef struct MovieTrackingStats { char message[256]; } MovieTrackingStats; @@ -179,11 +193,14 @@ typedef struct MovieTrackingStats { typedef struct MovieTracking { MovieTrackingSettings settings; /* different tracking-related settings */ MovieTrackingCamera camera; /* camera intrinsics */ - ListBase tracks; /* all tracks */ - MovieTrackingReconstruction reconstruction; /* reconstruction data */ + ListBase tracks; /* list of tracks used for camera object */ + MovieTrackingReconstruction reconstruction; /* reconstruction data for camera object */ MovieTrackingStabilization stabilization; /* stabilization data */ MovieTrackingTrack *act_track; /* active track */ + ListBase objects; + int objectnr, tot_object; /* index of active object and total number of objects */ + MovieTrackingStats *stats; /* statistics displaying in clip editor */ } MovieTracking; @@ -207,6 +224,7 @@ enum { #define TRACK_LOCKED (1<<6) #define TRACK_CUSTOMCOLOR (1<<7) #define TRACK_USE_2D_STAB (1<<8) +#define TRACK_PREVIEW_GRAYSCALE (1<<9) /* MovieTrackingTrack->tracker */ #define TRACKER_KLT 0 @@ -241,6 +259,9 @@ enum { /* MovieTrackingReconstruction->flag */ #define TRACKING_RECONSTRUCTED (1<<0) +/* MovieTrackingObject->flag */ +#define TRACKING_OBJECT_CAMERA (1<<0) + #define TRACKING_CLEAN_SELECT 0 #define TRACKING_CLEAN_DELETE_TRACK 1 #define TRACKING_CLEAN_DELETE_SEGMENT 2 diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index ade85cc6b25..4dce922b56d 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -25,15 +25,15 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_USERDEF_TYPES_H -#define DNA_USERDEF_TYPES_H /** \file DNA_userdef_types.h * \ingroup DNA * \since mar-2001 * \author nzc - * */ +#ifndef DNA_USERDEF_TYPES_H +#define DNA_USERDEF_TYPES_H + #include "DNA_listBase.h" #include "DNA_texture_types.h" /* ColorBand */ @@ -604,20 +604,20 @@ extern UserDef U; /* from blenkernel blender.c */ #define NDOF_FLY_HELICOPTER (1 << 1) #define NDOF_LOCK_HORIZON (1 << 2) /* the following might not need to be saved between sessions, - but they do need to live somewhere accessible... */ + * but they do need to live somewhere accessible... */ #define NDOF_SHOULD_PAN (1 << 3) #define NDOF_SHOULD_ZOOM (1 << 4) #define NDOF_SHOULD_ROTATE (1 << 5) /* orbit navigation modes - only two options, so it's sort of a hyrbrid bool/enum - if ((U.ndof_flag & NDOF_ORBIT_MODE) == NDOF_OM_OBJECT)... */ + * only two options, so it's sort of a hyrbrid bool/enum + * if ((U.ndof_flag & NDOF_ORBIT_MODE) == NDOF_OM_OBJECT)... */ /* #define NDOF_ORBIT_MODE (1 << 6) #define NDOF_OM_TARGETCAMERA 0 #define NDOF_OM_OBJECT NDOF_ORBIT_MODE */ /* actually... users probably don't care about what the mode - is called, just that it feels right */ + * is called, just that it feels right */ /* zoom is up/down if this flag is set (otherwise forward/backward) */ #define NDOF_ZOOM_UPDOWN (1 << 7) #define NDOF_ZOOM_INVERT (1 << 8) diff --git a/source/blender/makesdna/DNA_vec_types.h b/source/blender/makesdna/DNA_vec_types.h index 75ac69cb379..10135ba85e9 100644 --- a/source/blender/makesdna/DNA_vec_types.h +++ b/source/blender/makesdna/DNA_vec_types.h @@ -26,14 +26,15 @@ * */ -#ifndef DNA_VEC_TYPES_H -#define DNA_VEC_TYPES_H /** \file DNA_vec_types.h * \ingroup DNA * \since dec-2000 * \author nzc */ +#ifndef DNA_VEC_TYPES_H +#define DNA_VEC_TYPES_H + /* types */ /** vector of two shorts. */ diff --git a/source/blender/makesdna/DNA_vfont_types.h b/source/blender/makesdna/DNA_vfont_types.h index d51b59b966e..7132751848d 100644 --- a/source/blender/makesdna/DNA_vfont_types.h +++ b/source/blender/makesdna/DNA_vfont_types.h @@ -24,8 +24,6 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_VFONT_TYPES_H -#define DNA_VFONT_TYPES_H /** \file DNA_vfont_types.h * \ingroup DNA @@ -33,6 +31,9 @@ * \author nzc */ +#ifndef DNA_VFONT_TYPES_H +#define DNA_VFONT_TYPES_H + #include "DNA_ID.h" struct PackedFile; diff --git a/source/blender/makesdna/DNA_view2d_types.h b/source/blender/makesdna/DNA_view2d_types.h index 8f64246db31..0581cad4170 100644 --- a/source/blender/makesdna/DNA_view2d_types.h +++ b/source/blender/makesdna/DNA_view2d_types.h @@ -24,13 +24,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_VIEW2D_TYPES_H -#define DNA_VIEW2D_TYPES_H /** \file DNA_view2d_types.h * \ingroup DNA */ +#ifndef DNA_VIEW2D_TYPES_H +#define DNA_VIEW2D_TYPES_H + #include "DNA_vec_types.h" /* ---------------------------------- */ diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 51ee8f63df5..ae026b0bcc9 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -24,13 +24,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_VIEW3D_TYPES_H -#define DNA_VIEW3D_TYPES_H /** \file DNA_view3d_types.h * \ingroup DNA */ +#ifndef DNA_VIEW3D_TYPES_H +#define DNA_VIEW3D_TYPES_H + struct ViewDepths; struct Object; struct Image; diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 0065fc110c3..57989424d4a 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -23,13 +23,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_WINDOWMANAGER_TYPES_H -#define DNA_WINDOWMANAGER_TYPES_H /** \file DNA_windowmanager_types.h * \ingroup DNA */ +#ifndef DNA_WINDOWMANAGER_TYPES_H +#define DNA_WINDOWMANAGER_TYPES_H + #include "DNA_listBase.h" #include "DNA_vec_types.h" diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h index 149393b6723..a04ea89a291 100644 --- a/source/blender/makesdna/DNA_world_types.h +++ b/source/blender/makesdna/DNA_world_types.h @@ -24,13 +24,14 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_WORLD_TYPES_H -#define DNA_WORLD_TYPES_H /** \file DNA_world_types.h * \ingroup DNA */ +#ifndef DNA_WORLD_TYPES_H +#define DNA_WORLD_TYPES_H + #include "DNA_defs.h" #include "DNA_ID.h" |