[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39790] branches/soc-2011-pepper: Last bunch of minor fixes before merge.
Joerg Mueller
nexyon at gmail.com
Tue Aug 30 09:57:56 CEST 2011
Revision: 39790
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39790
Author: nexyon
Date: 2011-08-30 07:57:55 +0000 (Tue, 30 Aug 2011)
Log Message:
-----------
Last bunch of minor fixes before merge.
* Use NULL in AUD_Reference.h
* Use SETLOOPER in sound.c
* Move flags to the end of Speaker struct.
Modified Paths:
--------------
branches/soc-2011-pepper/intern/audaspace/intern/AUD_Reference.h
branches/soc-2011-pepper/source/blender/blenkernel/intern/sound.c
branches/soc-2011-pepper/source/blender/editors/sound/sound_ops.c
branches/soc-2011-pepper/source/blender/makesdna/DNA_speaker_types.h
Modified: branches/soc-2011-pepper/intern/audaspace/intern/AUD_Reference.h
===================================================================
--- branches/soc-2011-pepper/intern/audaspace/intern/AUD_Reference.h 2011-08-30 04:13:48 UTC (rev 39789)
+++ branches/soc-2011-pepper/intern/audaspace/intern/AUD_Reference.h 2011-08-30 07:57:55 UTC (rev 39790)
@@ -32,6 +32,7 @@
#define AUD_REFERENCE
#include <map>
+#include <cstddef>
// #define MEM_DEBUG
@@ -113,15 +114,15 @@
m_reference = dynamic_cast<T*>(reference);
AUD_ReferenceHandler::incref(m_original);
#ifdef MEM_DEBUG
- if(m_reference != 0)
+ if(m_reference != NULL)
std::cerr << "+" << typeid(*m_reference).name() << std::endl;
#endif
}
AUD_Reference()
{
- m_original = 0;
- m_reference = 0;
+ m_original = NULL;
+ m_reference = NULL;
}
/**
@@ -134,7 +135,7 @@
m_reference = ref.m_reference;
AUD_ReferenceHandler::incref(m_original);
#ifdef MEM_DEBUG
- if(m_reference != 0)
+ if(m_reference != NULL)
std::cerr << "+" << typeid(*m_reference).name() << std::endl;
#endif
}
@@ -146,7 +147,7 @@
m_reference = dynamic_cast<T*>(ref.get());
AUD_ReferenceHandler::incref(m_original);
#ifdef MEM_DEBUG
- if(m_reference != 0)
+ if(m_reference != NULL)
std::cerr << "+" << typeid(*m_reference).name() << std::endl;
#endif
}
@@ -158,7 +159,7 @@
~AUD_Reference()
{
#ifdef MEM_DEBUG
- if(m_reference != 0)
+ if(m_reference != NULL)
std::cerr << "-" << typeid(*m_reference).name() << std::endl;
#endif
if(AUD_ReferenceHandler::decref(m_original))
@@ -175,7 +176,7 @@
return *this;
#ifdef MEM_DEBUG
- if(m_reference != 0)
+ if(m_reference != NULL)
std::cerr << "-" << typeid(*m_reference).name() << std::endl;
#endif
if(AUD_ReferenceHandler::decref(m_original))
@@ -185,7 +186,7 @@
m_reference = ref.m_reference;
AUD_ReferenceHandler::incref(m_original);
#ifdef MEM_DEBUG
- if(m_reference != 0)
+ if(m_reference != NULL)
std::cerr << "+" << typeid(*m_reference).name() << std::endl;
#endif
@@ -197,7 +198,7 @@
*/
inline bool isNull() const
{
- return m_reference == 0;
+ return m_reference == NULL;
}
/**
Modified: branches/soc-2011-pepper/source/blender/blenkernel/intern/sound.c
===================================================================
--- branches/soc-2011-pepper/source/blender/blenkernel/intern/sound.c 2011-08-30 04:13:48 UTC (rev 39789)
+++ branches/soc-2011-pepper/source/blender/blenkernel/intern/sound.c 2011-08-30 07:57:55 UTC (rev 39790)
@@ -37,6 +37,7 @@
#include "BKE_packedFile.h"
#include "BKE_animsys.h"
#include "BKE_sequencer.h"
+#include "BKE_scene.h"
// evil global ;-)
static int sound_cfra;
@@ -656,12 +657,13 @@
NlaTrack* track;
NlaStrip* strip;
Speaker* speaker;
+ Scene* sce_it;
void* new_set = AUD_createSet();
void* handle;
float quat[4];
- for(base = FIRSTBASE; base; base=base->next)
+ for(SETLOOPER(scene, sce_it, base))
{
ob = base->object;
if(ob->type == OB_SPEAKER)
Modified: branches/soc-2011-pepper/source/blender/editors/sound/sound_ops.c
===================================================================
--- branches/soc-2011-pepper/source/blender/editors/sound/sound_ops.c 2011-08-30 04:13:48 UTC (rev 39789)
+++ branches/soc-2011-pepper/source/blender/editors/sound/sound_ops.c 2011-08-30 07:57:55 UTC (rev 39790)
@@ -648,6 +648,13 @@
void SOUND_OT_update_animation_flags(wmOperatorType *ot)
{
+ /*
+ This operator is needed to set a correct state of the sound animation
+ System. Unfortunately there's no really correct place to call the exec
+ function, that's why I made it an operator that's only visible in the
+ search menu. Apart from that the bake animation operator calls it too.
+ */
+
/* identifiers */
ot->name= "Update animation";
ot->description= "Update animation flags";
Modified: branches/soc-2011-pepper/source/blender/makesdna/DNA_speaker_types.h
===================================================================
--- branches/soc-2011-pepper/source/blender/makesdna/DNA_speaker_types.h 2011-08-30 04:13:48 UTC (rev 39789)
+++ branches/soc-2011-pepper/source/blender/makesdna/DNA_speaker_types.h 2011-08-30 07:57:55 UTC (rev 39790)
@@ -39,9 +39,6 @@
struct bSound *sound;
- short flag;
- short pad1[3];
-
// not animatable properties
float volume_max;
float volume_min;
@@ -55,6 +52,10 @@
// animatable properties
float volume;
float pitch;
+
+ // flag
+ short flag;
+ short pad1[3];
} Speaker;
/* **************** SPEAKER ********************* */
More information about the Bf-blender-cvs
mailing list