diff options
author | Joerg Mueller <nexyon@gmail.com> | 2011-08-01 15:44:20 +0400 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2011-08-01 15:44:20 +0400 |
commit | 3e85ec432ef050563d75488eca3049b77497153d (patch) | |
tree | 147c765f8b099b0d525c5e55ccc6a70995632509 /source/blender/makesdna | |
parent | f3c867c3dbde6919653e7cc712099e48b7508715 (diff) |
3D Audio GSoC:
Adds new speaker object type.
Notes:
* Needs some nice icons
* Quickily review by Joshua Leung (5 mins)
* Properties UI updated (with help of Thomans Dinges)
* Speakers have their own theme color
* No real audio functionality yet.
* Minor bug regarding lamps/lattices fixed in interface_templates.c
I personality tested:
* Creation, Deletion, Duplication
* Saving, Loading
* Library linking (incl. make local)
* Tracking
* Dope Sheet, Outliner
* Animation
* Drawing (incl. Theme)
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_ID.h | 1 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_action_types.h | 3 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_object_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_speaker_types.h | 68 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/intern/makesdna.c | 2 |
6 files changed, 76 insertions, 2 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 3ead485e10a..88e67864456 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -552,6 +552,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,7 +562,7 @@ 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 */ diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index dfc7d42793d..ffa82092ef1 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -306,6 +306,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_speaker_types.h b/source/blender/makesdna/DNA_speaker_types.h new file mode 100644 index 00000000000..50cb62c79e5 --- /dev/null +++ b/source/blender/makesdna/DNA_speaker_types.h @@ -0,0 +1,68 @@ +/* + * $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; + + short flag; + short pad1[3]; + + // 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; +} 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_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 4757c112b09..4cf744a7878 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]; diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 80299d44a78..16d59356d25 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -132,6 +132,7 @@ 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 "" @@ -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 */ |