diff options
Diffstat (limited to 'source/blender/editors/space_logic/logic_window.c')
-rw-r--r-- | source/blender/editors/space_logic/logic_window.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index ae2cee64a23..723227a36e4 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -40,6 +40,7 @@ #include "DNA_sensor_types.h" #include "DNA_constraint_types.h" #include "DNA_windowmanager_types.h" +#include "DNA_object_types.h" #include "MEM_guardedalloc.h" @@ -49,10 +50,7 @@ #include "BKE_global.h" #include "BKE_library.h" #include "BKE_main.h" -#include "BKE_property.h" -#include "BKE_screen.h" #include "BKE_sca.h" -#include "BKE_utildefines.h" #include "ED_util.h" @@ -556,7 +554,7 @@ void do_logic_buts(bContext *C, void *arg, int event) bSoundActuator *sa= act->data; if(sa->sndnr) { - bSound *sound= bmain->sound.first; + ID *sound= bmain->sound.first; int nr= 1; if(sa->sndnr == -2) { @@ -570,16 +568,16 @@ void do_logic_buts(bContext *C, void *arg, int event) if(nr==sa->sndnr) break; nr++; - sound= sound->id.next; + sound= sound->next; } if(sa->sound) - sa->sound->id.us--; + ((ID *)sa->sound)->us--; - sa->sound= sound; + sa->sound= (struct bSound *)sound; if(sound) - sound->id.us++; + sound->us++; sa->sndnr= 0; didit= 1; @@ -2153,7 +2151,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo if(sa->sound) { char dummy_str[] = "Sound mode %t|Play Stop %x0|Play End %x1|Loop Stop %x2|Loop End %x3|Loop Ping Pong Stop %x5|Loop Ping Pong %x4"; - uiDefBut(block, TEX, B_IDNAME, "SO:",xco+30,yco-22,wval-20,19, sa->sound->id.name+2, 0.0, 21.0, 0, 0, ""); + uiDefBut(block, TEX, B_IDNAME, "SO:",xco+30,yco-22,wval-20,19, ((ID *)sa->sound)->name+2, 0.0, 21.0, 0, 0, ""); uiDefButS(block, MENU, 1, dummy_str,xco+10,yco-44,width-20, 19, &sa->type, 0.0, 0.0, 0, 0, ""); uiDefButF(block, NUM, 0, "Volume:", xco+10,yco-66,wval, 19, &sa->volume, 0.0, 1.0, 0, 0, "Sets the volume of this sound"); uiDefButF(block, NUM, 0, "Pitch:",xco+wval+10,yco-66,wval, 19, &sa->pitch,-12.0, 12.0, 0, 0, "Sets the pitch of this sound"); @@ -4274,7 +4272,7 @@ static void draw_actuator_sound(uiLayout *layout, PointerRNA *ptr, bContext *C) { uiLayout *row, *col; - uiTemplateID(layout, C, ptr, "sound", NULL, "SOUND_OT_open", NULL, NULL); + uiTemplateID(layout, C, ptr, "sound", NULL, "SOUND_OT_open", NULL); if (!RNA_pointer_get(ptr, "sound").data) { uiItemL(layout, "Select a sound from the list or load a new one", 0); |