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/editors/space_buttons | |
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/editors/space_buttons')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 8e1a4b2d16c..35500ac9518 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -44,6 +44,7 @@ #include "DNA_node_types.h" #include "DNA_scene_types.h" #include "DNA_world_types.h" +#include "DNA_speaker_types.h" #include "DNA_brush_types.h" #include "BKE_context.h" @@ -188,6 +189,7 @@ static int buttons_context_path_data(ButsContextPath *path, int type) else if(RNA_struct_is_a(ptr->type, &RNA_Lattice) && (type == -1 || type == OB_LATTICE)) return 1; else if(RNA_struct_is_a(ptr->type, &RNA_Camera) && (type == -1 || type == OB_CAMERA)) return 1; else if(RNA_struct_is_a(ptr->type, &RNA_Lamp) && (type == -1 || type == OB_LAMP)) return 1; + else if(RNA_struct_is_a(ptr->type, &RNA_Speaker) && (type == -1 || type == OB_SPEAKER)) return 1; /* try to get an object in the path, no pinning supported here */ else if(buttons_context_path_object(path)) { ob= path->ptr[path->len-1].data; @@ -648,7 +650,7 @@ void buttons_context_compute(const bContext *C, SpaceButs *sbuts) const char *buttons_context_dir[] = { "world", "object", "mesh", "armature", "lattice", "curve", - "meta_ball", "lamp", "camera", "material", "material_slot", + "meta_ball", "lamp", "speaker", "camera", "material", "material_slot", "texture", "texture_slot", "bone", "edit_bone", "pose_bone", "particle_system", "particle_system_editable", "cloth", "soft_body", "fluid", "smoke", "collision", "brush", NULL}; @@ -701,6 +703,10 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r set_pointer_type(path, result, &RNA_Camera); return 1; } + else if(CTX_data_equals(member, "speaker")) { + set_pointer_type(path, result, &RNA_Speaker); + return 1; + } else if(CTX_data_equals(member, "material")) { set_pointer_type(path, result, &RNA_Material); return 1; |