Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-07-18 18:15:02 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-07-18 18:15:02 +0400
commitb8fc3030b531702b6d1ac8af442e593e4f3ce9fa (patch)
tree31c0a25691cce25b55eadaa358e03e666e6b73b0 /source/blender/blenkernel/intern
parent882e29650582f46efde115c1d45c1faec7a169fc (diff)
parente1b060486f0a315cc60c60be07783ab89056229d (diff)
svn merge -r37793:37865 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Merge info was /trunk/blender:36835-37793,37865-38157 so this should merge in missing files.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/blender.c10
-rw-r--r--source/blender/blenkernel/intern/brush.c2
-rw-r--r--source/blender/blenkernel/intern/paint.c14
-rw-r--r--source/blender/blenkernel/intern/sound.c3
4 files changed, 20 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 0f545ad3ff9..8b4bbbd3c83 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -64,6 +64,7 @@
#include "BLI_dynstr.h"
#include "BLI_path_util.h"
#include "BLI_utildefines.h"
+#include "BLI_callbacks.h"
#include "IMB_imbuf.h"
@@ -96,7 +97,7 @@ UserDef U;
/* ListBase = {NULL, NULL}; */
short ENDIAN_ORDER;
-static char versionstr[48]= "";
+char versionstr[48]= "";
/* ********** free ********** */
@@ -110,6 +111,9 @@ void free_blender(void)
BKE_spacetypes_free(); /* after free main, it uses space callbacks */
IMB_exit();
+
+ BLI_cb_finalize();
+
seq_stripelem_cache_destruct();
free_nodesystem();
@@ -129,9 +133,9 @@ void initglobals(void)
ENDIAN_ORDER= (((char*)&ENDIAN_ORDER)[0])? L_ENDIAN: B_ENDIAN;
if(BLENDER_SUBVERSION)
- BLI_snprintf(versionstr, sizeof(versionstr), "www.blender.org %d.%d", BLENDER_VERSION, BLENDER_SUBVERSION);
+ BLI_snprintf(versionstr, sizeof(versionstr), "blender.org %d.%d", BLENDER_VERSION, BLENDER_SUBVERSION);
else
- BLI_snprintf(versionstr, sizeof(versionstr), "www.blender.org %d", BLENDER_VERSION);
+ BLI_snprintf(versionstr, sizeof(versionstr), "blender.org %d", BLENDER_VERSION);
#ifdef _WIN32 // FULLSCREEN
G.windowstate = G_WINDOWSTATE_USERDEF;
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index a4ceb62ab55..c497cd2813a 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -235,8 +235,6 @@ void make_local_brush(Brush *brush)
if(paint_brush(&scene->toolsettings->imapaint.paint)==brush) {
if(scene->id.lib==NULL) {
paint_brush_set(&scene->toolsettings->imapaint.paint, brushn);
- brushn->id.us++;
- brush->id.us--;
}
}
}
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index fa6ecb09f48..9a0fc541bce 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -85,8 +85,11 @@ Brush *paint_brush(Paint *p)
void paint_brush_set(Paint *p, Brush *br)
{
- if(p)
+ if(p) {
+ id_us_min((ID *)p->brush);
+ id_us_plus((ID *)br);
p->brush= br;
+ }
}
int paint_facesel_test(Object *ob)
@@ -114,12 +117,17 @@ void paint_init(Paint *p, const char col[3])
p->flags |= PAINT_SHOW_BRUSH;
}
-void free_paint(Paint *UNUSED(paint))
+void free_paint(Paint *paint)
{
- /* nothing */
+ id_us_min((ID *)paint->brush);
}
+/* called when copying scene settings, so even if 'src' and 'tar' are the same
+ * still do a id_us_plus(), rather then if we were copying betweem 2 existing
+ * scenes where a matching value should decrease the existing user count as
+ * with paint_brush_set() */
void copy_paint(Paint *src, Paint *tar)
{
tar->brush= src->brush;
+ id_us_plus((ID *)tar->brush);
}
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index 0eb2392b012..f2e3537762f 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -498,8 +498,9 @@ int sound_scene_playing(struct Scene *scene)
int sound_read_sound_buffer(struct bSound* sound, float* buffer, int length, float start, float end)
{
AUD_Sound* limiter = AUD_limitSound(sound->cache, start, end);
- return AUD_readSound(limiter, buffer, length);
+ int ret= AUD_readSound(limiter, buffer, length);
AUD_unload(limiter);
+ return ret;
}
int sound_get_channels(struct bSound* sound)