diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-13 10:39:17 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-13 10:39:17 +0400 |
commit | b310a76a1b8964fd776620f8444c1c1a7a308a8e (patch) | |
tree | dcf2b80af79403c2b5fb81c85e337f4adc3eba2f /source/blender/makesdna | |
parent | c58fb76f1a043124debf2a71e6c56f2a478a0dde (diff) | |
parent | 047e8224b14aa7836db3b067824258e49e8602db (diff) |
svn merge -r39558:39800 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'source/blender/makesdna')
25 files changed, 283 insertions, 79 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 4cf9f47041b..8fd9f49cd0a 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -178,6 +178,7 @@ typedef struct PreviewImage { #define ID_SCRN MAKE_ID2('S', 'N') /* (depreciated?) */ #define ID_VF MAKE_ID2('V', 'F') /* VectorFont */ #define ID_TXT MAKE_ID2('T', 'X') /* Text */ +#define ID_SPK MAKE_ID2('S', 'K') /* Speaker */ #define ID_SO MAKE_ID2('S', 'O') /* Sound */ #define ID_GR MAKE_ID2('G', 'R') /* Group */ #define ID_ID MAKE_ID2('I', 'D') /* (internal use only) */ diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index 0716d1ddbf2..a820e59779f 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -1,6 +1,4 @@ -/* - * $Id$ - * +/* * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -519,6 +517,9 @@ typedef struct bDopeSheet { int filterflag; /* flags to use for filtering data */ int flag; /* standard flags */ + + int renameIndex; /* index+1 of channel to rename - only gets set by renaming operator */ + int pad; } bDopeSheet; @@ -552,6 +553,7 @@ typedef enum eDopeSheet_FilterFlag { ADS_FILTER_NOARM = (1<<18), ADS_FILTER_NONTREE = (1<<19), ADS_FILTER_NOTEX = (1<<20), + ADS_FILTER_NOSPK = (1<<21), /* NLA-specific filters */ ADS_FILTER_NLA_NOACT = (1<<25), /* if the AnimData block has no NLA data, don't include to just show Action-line */ @@ -561,12 +563,13 @@ typedef enum eDopeSheet_FilterFlag { ADS_FILTER_BY_FCU_NAME = (1<<27), /* for F-Curves, filter by the displayed name (i.e. to isolate all Location curves only) */ /* combination filters (some only used at runtime) */ - ADS_FILTER_NOOBDATA = (ADS_FILTER_NOCAM|ADS_FILTER_NOMAT|ADS_FILTER_NOLAM|ADS_FILTER_NOCUR|ADS_FILTER_NOPART|ADS_FILTER_NOARM) + ADS_FILTER_NOOBDATA = (ADS_FILTER_NOCAM|ADS_FILTER_NOMAT|ADS_FILTER_NOLAM|ADS_FILTER_NOCUR|ADS_FILTER_NOPART|ADS_FILTER_NOARM|ADS_FILTER_NOSPK) } eDopeSheet_FilterFlag; /* DopeSheet general flags */ typedef enum eDopeSheet_Flag { - ADS_FLAG_SUMMARY_COLLAPSED = (1<<0) /* when summary is shown, it is collapsed, so all other channels get hidden */ + ADS_FLAG_SUMMARY_COLLAPSED = (1<<0), /* when summary is shown, it is collapsed, so all other channels get hidden */ + ADS_FLAG_SHOW_DBFILTERS = (1<<1) /* show filters for datablocks */ } eDopeSheet_Flag; diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 887a0300ee2..93db8340aac 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -56,9 +56,12 @@ typedef struct bActionActuator { char frameProp[32]; /* Set this property to the actions current frame */ short blendin; /* Number of frames of blending */ short priority; /* Execution priority */ + short layer; /* Animation layer */ short end_reset; /* Ending the actuator (negative pulse) wont reset the the action to its starting frame */ short strideaxis; /* Displacement axis */ + short pad; float stridelength; /* Displacement incurred by cycle */ // not in use + float layer_weight; /* How much of the previous layer to use for blending. (<0 = disable, 0 = add mode) */ } bActionActuator; typedef struct Sound3D @@ -120,6 +123,7 @@ typedef struct bObjectActuator { struct Object *reference; } bObjectActuator; +/* deprecated, handled by bActionActuator now */ typedef struct bIpoActuator { short flag, type; float sta, end; diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index 4b649031f97..e1dfd652900 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -62,6 +60,11 @@ typedef struct FModifier { short flag; /* settings for the modifier */ float influence; /* the amount that the modifier should influence the value */ + + 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 */ } FModifier; /* Types of F-Curve modifier @@ -86,13 +89,17 @@ typedef enum eFModifier_Types { /* F-Curve Modifier Settings */ typedef enum eFModifier_Flags { /* modifier is not able to be evaluated for some reason, and should be skipped (internal) */ - FMODIFIER_FLAG_DISABLED = (1<<0), + FMODIFIER_FLAG_DISABLED = (1<<0), /* modifier's data is expanded (in UI) */ - FMODIFIER_FLAG_EXPANDED = (1<<1), + FMODIFIER_FLAG_EXPANDED = (1<<1), /* modifier is active one (in UI) for editing purposes */ - FMODIFIER_FLAG_ACTIVE = (1<<2), + FMODIFIER_FLAG_ACTIVE = (1<<2), /* user wants modifier to be skipped */ - FMODIFIER_FLAG_MUTED = (1<<3) + FMODIFIER_FLAG_MUTED = (1<<3), + /* restrict range that F-Modifier can be considered over */ + FMODIFIER_FLAG_RANGERESTRICT = (1<<4), + /* use influence control */ + FMODIFIER_FLAG_USEINFLUENCE = (1<<5) } eFModifier_Flags; /* --- */ @@ -280,8 +287,12 @@ typedef enum eDriverTarget_Flag { DTAR_FLAG_STRUCT_REF = (1<<0), /* idtype can only be 'Object' */ DTAR_FLAG_ID_OB_ONLY = (1<<1), - /* toggles localspace (where transforms are manually obtained) */ + + /* "localspace" flags */ + /* base flag - basically "pre parent+constraints" */ DTAR_FLAG_LOCALSPACE = (1<<2), + /* include constraints transformed to space including parents */ + DTAR_FLAG_LOCAL_CONSTS = (1<<3), } eDriverTarget_Flag; /* Transform Channels for Driver Targets */ @@ -460,7 +471,9 @@ typedef enum eFCurve_Flags { FCURVE_PROTECTED = (1<<3), /* fcurve will not be evaluated for the next round */ FCURVE_MUTED = (1<<4), + /* fcurve uses 'auto-handles', which stay horizontal... */ + // DEPRECATED FCURVE_AUTO_HANDLES = (1<<5), /* skip evaluation, as RNA-path cannot be resolved (similar to muting, but cannot be set by user) */ @@ -570,6 +583,8 @@ typedef struct NlaStrip { short type; /* type of NLA strip */ + void *speaker_handle; /* handle for speaker objects */ + int flag; /* settings */ int pad2; } NlaStrip; @@ -636,7 +651,10 @@ typedef enum eNlaStrip_Type { /* 'transition' - blends between the adjacent strips */ NLASTRIP_TYPE_TRANSITION, /* 'meta' - a strip which acts as a container for a few others */ - NLASTRIP_TYPE_META + NLASTRIP_TYPE_META, + + /* 'emit sound' - a strip which is used for timing when speaker emits sounds */ + NLASTRIP_TYPE_SOUND } eNlaStrip_Type; /* NLA Tracks ------------------------------------- */ diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index 3547101612f..442fc3ddcce 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -96,7 +94,9 @@ typedef struct bArmature { void *sketch; /* sketch struct for etch-a-ton */ int flag; - int drawtype; + int drawtype; + int gevertdeformer; /* how vertex deformation is handled in the ge */ + int pad; short deformflag; short pathflag; @@ -136,9 +136,16 @@ typedef enum eArmature_Drawtype { ARM_OCTA = 0, ARM_LINE, ARM_B_BONE, - ARM_ENVELOPE + ARM_ENVELOPE, + ARM_WIRE } eArmature_Drawtype; +/* armature->gevertdeformer */ +typedef enum eArmature_VertDeformer { + ARM_VDEF_BLENDER, + ARM_VDEF_BGE_CPU +} eArmature_VertDeformer; + /* armature->deformflag */ typedef enum eArmature_DeformFlag { ARM_DEF_VGROUP = (1<<0), diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index 1d752fce4ef..1be2c811a1b 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -677,7 +675,10 @@ typedef enum eRotLimit_Flags { /* distance limit constraint */ /* bDistLimitConstraint->flag */ typedef enum eDistLimit_Flag { - LIMITDIST_USESOFT = (1<<0) + /* "soft" cushion effect when reaching the limit sphere */ // NOT IMPLEMENTED! + LIMITDIST_USESOFT = (1<<0), + /* as for all Limit constraints - allow to be used during transform? */ + LIMITDIST_TRANSFORM = (1<<1) } eDistLimit_Flag; /* bDistLimitConstraint->mode */ diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index b51612037fc..a38b33e6640 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -314,7 +314,7 @@ typedef enum eBezTriple_Handle { HD_AUTO, HD_VECT, HD_ALIGN, - HD_AUTO_ANIM /* not real handle type, but is just used as dummy item for anim code */ + HD_AUTO_ANIM /* auto-clamped handles for animation */ } eBezTriple_Handle; /* interpolation modes (used only for BezTriple->ipo) */ diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h index 6eb5f64ffc3..b259d592864 100644 --- a/source/blender/makesdna/DNA_gpencil_types.h +++ b/source/blender/makesdna/DNA_gpencil_types.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h index 5dba9154a3a..43a4b99bc33 100644 --- a/source/blender/makesdna/DNA_ipo_types.h +++ b/source/blender/makesdna/DNA_ipo_types.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/makesdna/DNA_nla_types.h b/source/blender/makesdna/DNA_nla_types.h index c64dda2afd0..b92cf5c67e4 100644 --- a/source/blender/makesdna/DNA_nla_types.h +++ b/source/blender/makesdna/DNA_nla_types.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index b1b3e779824..820b244ca6c 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -308,6 +308,8 @@ typedef struct DupliObject { #define OB_LAMP 10 #define OB_CAMERA 11 +#define OB_SPEAKER 12 + // #define OB_WAVE 21 #define OB_LATTICE 22 diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index dcf646532c4..bc50c710d76 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -126,6 +126,8 @@ typedef struct FFMpegCodecData { int video_bitrate; int audio_bitrate; int audio_mixrate; + int audio_channels; + int audio_pad; float audio_volume; int gop_size; int flags; @@ -147,6 +149,8 @@ typedef struct AudioData { int distance_model; short flag; short pad; + float volume; + float pad2; } AudioData; typedef struct SceneRenderLayer { @@ -475,6 +479,7 @@ typedef struct GameData { #define WOPHY_BULLET 5 /* GameData.flag */ +#define GAME_RESTRICT_ANIM_UPDATES (1 << 0) #define GAME_ENABLE_ALL_FRAMES (1 << 1) #define GAME_SHOW_DEBUG_PROPS (1 << 2) #define GAME_SHOW_FRAMERATE (1 << 3) @@ -490,6 +495,7 @@ typedef struct GameData { #define GAME_ENABLE_ANIMATION_RECORD (1 << 13) #define GAME_SHOW_MOUSE (1 << 14) #define GAME_GLSL_NO_COLOR_MANAGEMENT (1 << 15) +/* Note: GameData.flag is a short (max 16 flags). To add more flags, GameData.flag needs to be an int */ /* GameData.matmode */ #define GAME_MAT_TEXFACE 0 @@ -805,6 +811,7 @@ typedef struct Scene { void *sound_scene; void *sound_scene_handle; void *sound_scrub_handle; + void *speaker_handles; void *fps_info; /* (runtime) info/cache used for presenting playback framerate info to the user */ @@ -1132,9 +1139,10 @@ typedef struct Scene { #define F_DUPLI 3 /* audio->flag */ -#define AUDIO_MUTE 1 -#define AUDIO_SYNC 2 -#define AUDIO_SCRUB 4 +#define AUDIO_MUTE (1<<0) +#define AUDIO_SYNC (1<<1) +#define AUDIO_SCRUB (1<<2) +#define AUDIO_VOLUME_ANIMATED (1<<3) #define FFMPEG_MULTIPLEX_AUDIO 1 /* deprecated, you can choose none as audiocodec now */ #define FFMPEG_AUTOSPLIT_OUTPUT 2 diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h index e5f924b5fa6..829d1eee03b 100644 --- a/source/blender/makesdna/DNA_sdna_types.h +++ b/source/blender/makesdna/DNA_sdna_types.h @@ -54,7 +54,10 @@ typedef struct SDNA { (sp[2], sp[3]), (sp[4], sp[5]), .. are the member type and name numbers respectively */ - + + struct GHash *structs_map; /* ghash for faster lookups, + requires WITH_DNA_GHASH to be used for now */ + /* wrong place for this really, its a simple * cache for findstruct_nr. */ diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index 3e7654bcf47..588e8458de1 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -71,12 +71,19 @@ typedef struct StripColorBalance { } StripColorBalance; typedef struct StripProxy { - char dir[160]; - char file[80]; - struct anim *anim; - short size; - short quality; - int pad; + char dir[160]; // custom directory for index and proxy files + // (defaults to BL_proxy) + + char file[80]; // custom file + struct anim *anim; // custom proxy anim file + + short tc; // time code in use + + short quality; // proxy build quality + short build_size_flags;// size flags (see below) of all proxies + // to build + short build_tc_flags; // time code flags (see below) of all tc indices + // to build } StripProxy; typedef struct Strip { @@ -128,11 +135,12 @@ typedef struct Sequence { int startstill, endstill; int machine, depth; /*machine - the strip channel, depth - the depth in the sequence when dealing with metastrips */ int startdisp, enddisp; /*starting and ending points in the sequence*/ - float sat, pad; + float sat; float mul, handsize; /* is sfra needed anymore? - it looks like its only used in one place */ int sfra; /* starting frame according to the timeline of the scene. */ int anim_preseek; + int streamindex; /* streamindex for movie or sound files with several streams */ Strip *strip; @@ -155,7 +163,7 @@ typedef struct Sequence { void *scene_sound; float volume; - float level, pan; /* level in dB (0=full), pan -1..1 */ + float pitch, pan; /* pitch (-0.1..10), pan -2..2 */ int scenenr; /* for scene selection */ int multicam_source; /* for multicam source selection */ float strobe; @@ -209,14 +217,9 @@ typedef struct GlowVars { typedef struct TransformVars { float ScalexIni; float ScaleyIni; - float ScalexFin; /* deprecated - old transform strip */ - float ScaleyFin; /* deprecated - old transform strip */ float xIni; - float xFin; /* deprecated - old transform strip */ float yIni; - float yFin; /* deprecated - old transform strip */ float rotIni; - float rotFin; /* deprecated - old transform strip */ int percent; int interpolation; int uniform_scale; /* preserve aspect/ratio when scaling */ @@ -276,6 +279,12 @@ typedef struct SpeedControlVars { #define SEQ_USE_PROXY_CUSTOM_FILE (1<<21) #define SEQ_USE_EFFECT_DEFAULT_FADE (1<<22) +// flags for whether those properties are animated or not +#define SEQ_AUDIO_VOLUME_ANIMATED (1<<24) +#define SEQ_AUDIO_PITCH_ANIMATED (1<<25) +#define SEQ_AUDIO_PAN_ANIMATED (1<<26) +#define SEQ_AUDIO_DRAW_WAVEFORM (1<<27) + #define SEQ_INVALID_EFFECT (1<<31) /* convenience define for all selection flags */ @@ -288,6 +297,19 @@ typedef struct SpeedControlVars { #define SEQ_COLOR_BALANCE_INVERSE_GAMMA 2 #define SEQ_COLOR_BALANCE_INVERSE_LIFT 4 +/* !!! has to be same as IMB_imbuf.h IMB_PROXY_... and IMB_TC_... */ + +#define SEQ_PROXY_IMAGE_SIZE_25 1 +#define SEQ_PROXY_IMAGE_SIZE_50 2 +#define SEQ_PROXY_IMAGE_SIZE_75 4 +#define SEQ_PROXY_IMAGE_SIZE_100 8 + +#define SEQ_PROXY_TC_NONE 0 +#define SEQ_PROXY_TC_RECORD_RUN 1 +#define SEQ_PROXY_TC_FREE_RUN 2 +#define SEQ_PROXY_TC_INTERP_REC_DATE_FREE_RUN 4 +#define SEQ_PROXY_TC_ALL 7 + /* seq->type WATCH IT: SEQ_EFFECT BIT is used to determine if this is an effect strip!!! */ #define SEQ_IMAGE 0 #define SEQ_META 1 diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h index 3e5f82a8052..4f727b3586b 100644 --- a/source/blender/makesdna/DNA_sound_types.h +++ b/source/blender/makesdna/DNA_sound_types.h @@ -85,6 +85,11 @@ typedef struct bSound { void *cache; /** + * Waveform display data. + */ + void *waveform; + + /** * The audaspace handle that should actually be played back. * Should be cache if cache != NULL; otherwise it's handle */ @@ -106,7 +111,9 @@ typedef enum eSound_Type { #define SND_DRAWFRAMES 1 #define SND_CFRA_NUM 2 -#define SOUND_FLAGS_3D (1 << 3) +#define SOUND_FLAGS_3D (1 << 3) /* deprecated! used for sound actuator loading */ +#define SOUND_FLAGS_CACHING (1 << 4) +#define SOUND_FLAGS_MONO (1 << 5) /* to DNA_sound_types.h*/ diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 1549bd71748..66b10bcbf21 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -267,7 +267,7 @@ typedef struct SpaceImage { float centx, centy; /* storage for offset while render drawing */ short curtile; /* the currently active tile of the image when tile is enabled, is kept in sync with the active faces tile */ - short imtypenr; + short pad; short lock; short pin; char dt_uv; /* UV draw type */ @@ -930,6 +930,7 @@ enum { #define SEQ_PROXY_RENDER_SIZE_25 25 #define SEQ_PROXY_RENDER_SIZE_50 50 #define SEQ_PROXY_RENDER_SIZE_75 75 +#define SEQ_PROXY_RENDER_SIZE_100 99 #define SEQ_PROXY_RENDER_SIZE_FULL 100 diff --git a/source/blender/makesdna/DNA_speaker_types.h b/source/blender/makesdna/DNA_speaker_types.h new file mode 100644 index 00000000000..fecc65885c5 --- /dev/null +++ b/source/blender/makesdna/DNA_speaker_types.h @@ -0,0 +1,69 @@ +/* + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributor(s): Jörg Müller. + * + * ***** END GPL LICENSE BLOCK ***** + */ +#ifndef DNA_SPEAKER_TYPES_H +#define DNA_SPEAKER_TYPES_H + +/** \file DNA_speaker_types.h + * \ingroup DNA + */ + +#include "DNA_ID.h" + +struct AnimData; +struct bSound; + +typedef struct Speaker { + ID id; + struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ + + struct bSound *sound; + + // not animatable properties + float volume_max; + float volume_min; + float distance_max; + float distance_reference; + float attenuation; + float cone_angle_outer; + float cone_angle_inner; + float cone_volume_outer; + + // animatable properties + float volume; + float pitch; + + // flag + short flag; + short pad1[3]; +} Speaker; + +/* **************** SPEAKER ********************* */ + +/* flag */ +#define SPK_DS_EXPAND (1<<0) +#define SPK_MUTED (1<<1) +#define SPK_RELATIVE (1<<2) + +#endif /* DNA_SPEAKER_TYPES_H */ + diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h index e81a9979c12..6e850a07d94 100644 --- a/source/blender/makesdna/DNA_texture_types.h +++ b/source/blender/makesdna/DNA_texture_types.h @@ -342,6 +342,7 @@ typedef struct TexMapping { #define TEX_NORMALMAP 2048 #define TEX_GAUSS_MIP 4096 #define TEX_FILTER_MIN 8192 +#define TEX_DERIVATIVEMAP 16384 /* texfilter */ // TXF_BOX -> blender's old texture filtering method diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 556f554eb98..43dc532d4f6 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -197,7 +197,7 @@ typedef struct ThemeSpace { char grid[4]; char wire[4], select[4]; - char lamp[4]; + char lamp[4], speaker[4], pad2[4]; char active[4], group[4], group_active[4], transform[4]; char vertex[4], vertex_select[4]; char edge[4], edge_select[4]; @@ -210,10 +210,13 @@ typedef struct ThemeSpace { char bone_solid[4], bone_pose[4]; char strip[4], strip_select[4]; char cframe[4]; + char nurb_uline[4], nurb_vline[4]; char act_spline[4], nurb_sel_uline[4], nurb_sel_vline[4], lastsel_point[4]; - char handle_free[4], handle_auto[4], handle_vect[4], handle_align[4]; - char handle_sel_free[4], handle_sel_auto[4], handle_sel_vect[4], handle_sel_align[4]; + + char handle_free[4], handle_auto[4], handle_vect[4], handle_align[4], handle_auto_clamped[4]; + char handle_sel_free[4], handle_sel_auto[4], handle_sel_vect[4], handle_sel_align[4], handle_sel_auto_clamped[4]; + char ds_channel[4], ds_subchannel[4]; // dopesheet char console_output[4], console_input[4], console_info[4], console_error[4]; diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 89b8bad2806..3c8d20a6f16 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -247,6 +247,7 @@ typedef struct View3D { #define V3D_SOLID_TEX 8 #define V3D_DISPGP 16 #define V3D_LOCK_CAMERA 32 +#define V3D_RENDER_SHADOW 64 /* This is a runtime only flag that's used to tell draw_mesh_object() that we're doing a shadow pass instead of a regular draw */ /* View3D->around */ #define V3D_CENTER 0 diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 1f0ae28a00d..47ebf111eba 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -320,14 +320,20 @@ typedef struct wmOperator { } wmOperator; -/* operator type exec(), invoke() modal(), return values */ -#define OPERATOR_RUNNING_MODAL 1 -#define OPERATOR_CANCELLED 2 -#define OPERATOR_FINISHED 4 + +/* operator type return flags: exec(), invoke() modal(), return values */ +#define OPERATOR_RUNNING_MODAL (1<<0) +#define OPERATOR_CANCELLED (1<<1) +#define OPERATOR_FINISHED (1<<2) /* add this flag if the event should pass through */ -#define OPERATOR_PASS_THROUGH 8 +#define OPERATOR_PASS_THROUGH (1<<3) /* in case operator got executed outside WM code... like via fileselect */ -#define OPERATOR_HANDLED 16 +#define OPERATOR_HANDLED (1<<4) + +#define OPERATOR_FLAGS_ALL ((1<<5)-1) + +/* sanity checks for debug mode only */ +#define OPERATOR_RETVAL_CHECK(ret) BLI_assert(ret != 0 && (ret & OPERATOR_FLAGS_ALL) == ret) /* wmOperator flag */ #define OP_GRAB_POINTER 1 diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt index 429db63b526..5edebfe3903 100644 --- a/source/blender/makesdna/intern/CMakeLists.txt +++ b/source/blender/makesdna/intern/CMakeLists.txt @@ -27,12 +27,17 @@ # message(STATUS "Configuring makesdna") +# add_definitions(-DWITH_DNA_GHASH) + blender_include_dirs( ../../../../intern/guardedalloc ../../blenloader + ../../blenlib .. ) + +# ----------------------------------------------------------------------------- # Build makesdna executable set(SRC makesdna.c @@ -56,6 +61,8 @@ add_custom_command( DEPENDS makesdna ) + +# ----------------------------------------------------------------------------- # Build bf_dna library set(INC @@ -72,3 +79,22 @@ set(SRC ) blender_add_lib(bf_dna "${SRC}" "${INC}" "${INC_SYS}") + + +# ----------------------------------------------------------------------------- +# Build bf_dna_blenlib library +set(INC + +) + +set(INC_SYS + +) + +set(SRC + ../../blenlib/intern/BLI_mempool.c + ../../blenlib/intern/listbase.c + ../../blenlib/intern/BLI_ghash.c +) + +blender_add_lib(bf_dna_blenlib "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/makesdna/intern/SConscript b/source/blender/makesdna/intern/SConscript index e51ee53e078..8185676cbfc 100644 --- a/source/blender/makesdna/intern/SConscript +++ b/source/blender/makesdna/intern/SConscript @@ -67,5 +67,6 @@ else: else: dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna.exe $TARGET") +# TODO, get WITH_DNA_GHASH working, see CMake's 'WITH_DNA_GHASH' obj = ['intern/dna.c', 'intern/dna_genfile.c'] Return ('obj') diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index 4e9b023b326..ebcfce84e37 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -42,6 +42,10 @@ #include "MEM_guardedalloc.h" // for MEM_freeN MEM_mallocN MEM_callocN +#ifdef WITH_DNA_GHASH +# include "BLI_ghash.h" +#endif + #include "DNA_genfile.h" #include "DNA_sdna_types.h" // for SDNA ;-) @@ -197,7 +201,11 @@ void DNA_sdna_free(SDNA *sdna) MEM_freeN((void *)sdna->names); MEM_freeN(sdna->types); MEM_freeN(sdna->structs); - + +#ifdef WITH_DNA_GHASH + BLI_ghash_free(sdna->structs_map, NULL, NULL); +#endif + MEM_freeN(sdna); } @@ -275,24 +283,30 @@ static short *findstruct_name(SDNA *sdna, const char *str) int DNA_struct_find_nr(SDNA *sdna, const char *str) { short *sp= NULL; - int a; if(sdna->lastfind<sdna->nr_structs) { sp= sdna->structs[sdna->lastfind]; if(strcmp( sdna->types[ sp[0] ], str )==0) return sdna->lastfind; } - for(a=0; a<sdna->nr_structs; a++) { +#ifdef WITH_DNA_GHASH + return (intptr_t)BLI_ghash_lookup(sdna->structs_map, str) - 1; +#else + { + int a; - sp= sdna->structs[a]; - - if(strcmp( sdna->types[ sp[0] ], str )==0) { - sdna->lastfind= a; - return a; + for(a=0; a<sdna->nr_structs; a++) { + + sp= sdna->structs[a]; + + if(strcmp( sdna->types[ sp[0] ], str )==0) { + sdna->lastfind= a; + return a; + } } } - return -1; +#endif } /* ************************* END DIV ********************** */ @@ -481,6 +495,16 @@ static void init_structDNA(SDNA *sdna, int do_endian_swap) sp[10]= 9; } } + +#ifdef WITH_DNA_GHASH + /* create a ghash lookup to speed up */ + sdna->structs_map= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "init_structDNA gh"); + + for(nr = 0; nr < sdna->nr_structs; nr++) { + sp= sdna->structs[nr]; + BLI_ghash_insert(sdna->structs_map, (void *)sdna->types[sp[0]], (void *)(nr + 1)); + } +#endif } } diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 80299d44a78..694b403c7c5 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -132,23 +132,24 @@ const char *includefiles[] = { "DNA_anim_types.h", "DNA_boid_types.h", "DNA_smoke_types.h", + "DNA_speaker_types.h", // empty string to indicate end of includefiles "" }; -int maxdata= 500000, maxnr= 50000; -int nr_names=0; -int nr_types=0; -int nr_structs=0; -char **names, *namedata; /* at address names[a] is string a */ -char **types, *typedata; /* at address types[a] is string a */ -short *typelens; /* at typelens[a] is de length of type a */ -short *alphalens; /* contains sizes as they are calculated on the DEC Alpha (64 bits) */ -short **structs, *structdata; /* at sp= structs[a] is the first address of a struct definition - sp[0] is type number - sp[1] is amount of elements - sp[2] sp[3] is typenr, namenr (etc) */ +static int maxdata= 500000, maxnr= 50000; +static int nr_names=0; +static int nr_types=0; +static int nr_structs=0; +static char **names, *namedata; /* at address names[a] is string a */ +static char **types, *typedata; /* at address types[a] is string a */ +static short *typelens; /* at typelens[a] is de length of type a */ +static short *alphalens; /* contains sizes as they are calculated on the DEC Alpha (64 bits), infact any 64bit system */ +static short **structs, *structdata;/* at sp= structs[a] is the first address of a struct definition + sp[0] is type number + sp[1] is amount of elements + sp[2] sp[3] is typenr, namenr (etc) */ /** * Variable to control debug output of makesdna. * debugSDNA: @@ -157,8 +158,8 @@ short **structs, *structdata; /* at sp= structs[a] is the first address of a str * - 2 = full trace, tell which names and types were found * - 4 = full trace, plus all gritty details */ -int debugSDNA = 0; -int additional_slen_offset; +static int debugSDNA = 0; +static int additional_slen_offset; /* ************************************************************************** */ /* Functions */ @@ -889,7 +890,7 @@ void printStructLenghts(void) } -int make_structDNA(char *baseDirectory, FILE *file) +static int make_structDNA(char *baseDirectory, FILE *file) { int len, i; short *sp; @@ -1196,4 +1197,5 @@ int main(int argc, char ** argv) #include "DNA_anim_types.h" #include "DNA_boid_types.h" #include "DNA_smoke_types.h" +#include "DNA_speaker_types.h" /* end of list */ |