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>2012-06-24 03:22:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-24 03:22:19 +0400
commit74c9c24d273863319a55c18234e03b7d27a43a87 (patch)
treed2649f0552ecb573c7831567bdf921fbf516995c
parent8ef4c4762be16d9e2f4f3fc274009f294893cd2e (diff)
style cleanyp
-rw-r--r--intern/container/CTR_UHeap.h174
-rw-r--r--intern/ghost/intern/GHOST_SystemPathsX11.cpp6
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf.c4
-rw-r--r--source/blender/blenkernel/intern/cloth.c5
-rw-r--r--source/blender/blenkernel/intern/collision.c6
-rw-r--r--source/blender/blenkernel/intern/image.c330
-rw-r--r--source/blender/blenkernel/intern/object.c2
-rw-r--r--source/blender/blenkernel/intern/ocean.c2
-rw-r--r--source/blender/blenkernel/intern/pointcache.c2
-rw-r--r--source/blender/blenlib/intern/BLI_kdtree.c2
-rw-r--r--source/blender/blenlib/intern/boxpack2d.c52
-rw-r--r--source/blender/blenlib/intern/freetypefont.c2
-rw-r--r--source/blender/blenlib/intern/voxel.c6
-rw-r--r--source/blender/bmesh/intern/bmesh_core.c2
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh_conv.c2
-rw-r--r--source/blender/bmesh/intern/bmesh_walkers_impl.c2
-rw-r--r--source/blender/collada/AnimationImporter.cpp4
-rw-r--r--source/blender/collada/ArmatureImporter.cpp2
-rw-r--r--source/blender/collada/ImageExporter.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_GroupNode.cpp2
-rw-r--r--source/blender/compositor/operations/COM_CompositorOperation.cpp2
-rw-r--r--source/blender/editors/interface/interface_handlers.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c4
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c2
-rw-r--r--source/blender/editors/space_file/filelist.c20
-rw-r--r--source/blender/imbuf/intern/anim_movie.c4
-rw-r--r--source/blender/makesdna/DNA_object_types.h2
-rw-r--r--source/blender/modifiers/intern/MOD_screw.c8
-rw-r--r--source/blender/render/intern/source/rendercore.c2
-rw-r--r--source/blenderplayer/bad_level_call_stubs/stubs.c2
30 files changed, 332 insertions, 327 deletions
diff --git a/intern/container/CTR_UHeap.h b/intern/container/CTR_UHeap.h
index 8711d4375cb..8330faa2f54 100644
--- a/intern/container/CTR_UHeap.h
+++ b/intern/container/CTR_UHeap.h
@@ -53,47 +53,47 @@
class CTR_UHeapable {
-public :
- int &
+public:
+ int &
HeapPos(
- ) {
+ ) {
return m_ind;
};
- float &
+ float &
HeapKey(
- ) {
+ ) {
return m_key;
};
const
- float &
+ float &
HeapKey(
- ) const {
+ ) const {
return m_key;
};
const
- int &
+ int &
HeapPos(
- ) const {
+ ) const {
return m_ind;
};
-private :
+private:
float m_key;
int m_ind;
-protected :
+protected:
CTR_UHeapable(
- ) : m_key (0),
- m_ind (0)
+ ) : m_key(0),
+ m_ind(0)
{
};
~CTR_UHeapable(
- ) {
+ ) {
};
};
@@ -104,50 +104,50 @@ class CTR_UHeap : public MEM_NonCopyable
public:
static
- CTR_UHeap *
+ CTR_UHeap *
New(
- ) {
+ ) {
return new CTR_UHeap();
}
- void
+ void
MakeHeap(
- HeapType *base
- ) {
+ HeapType *base
+ ) {
int i;
- int start = Parent(m_vector.size()-1);
- for (i = start; i >=0; --i) {
- DownHeap(base,i);
+ int start = Parent(m_vector.size() - 1);
+ for (i = start; i >= 0; --i) {
+ DownHeap(base, i);
}
};
- void
+ void
Insert(
- HeapType *base,
- int elem
- ) {
+ HeapType *base,
+ int elem
+ ) {
// add element to vector
m_vector.push_back(elem);
- base[elem].HeapPos() = m_vector.size()-1;
+ base[elem].HeapPos() = m_vector.size() - 1;
// push the element up the heap
- UpHeap(base,m_vector.size()-1);
+ UpHeap(base, m_vector.size() - 1);
}
// access to the vector for initial loading of elements
- std::vector<int> &
+ std::vector<int> &
HeapVector(
- ) {
+ ) {
return m_vector;
};
- void
+ void
Remove(
- HeapType *base,
- int i
- ) {
+ HeapType *base,
+ int i
+ ) {
// exchange with last element - pop last
// element and move up or down the heap as appropriate
@@ -155,37 +155,38 @@ public:
assert(false);
}
- if (i != int(m_vector.size())-1) {
+ if (i != int(m_vector.size()) - 1) {
- Swap(base,i,m_vector.size() - 1);
+ Swap(base, i, m_vector.size() - 1);
m_vector.pop_back();
if (!m_vector.empty()) {
- UpHeap(base,i);
- DownHeap(base,i);
+ UpHeap(base, i);
+ DownHeap(base, i);
}
- } else {
+ }
+ else {
m_vector.pop_back();
}
}
- int
+ int
Top(
- ) const {
+ ) const {
if (m_vector.empty()) return -1;
return m_vector[0];
}
- void
+ void
SC_Heap(
- HeapType *base
- ) {
+ HeapType *base
+ ) {
int i;
- for (i = 1; i < int(m_vector.size()) ; i++) {
+ for (i = 1; i < int(m_vector.size()); i++) {
- CTR_UHeapable * elem = base + m_vector[i];
- CTR_UHeapable * p_elem = base + m_vector[Parent(i)];
+ CTR_UHeapable *elem = base + m_vector[i];
+ CTR_UHeapable *p_elem = base + m_vector[Parent(i)];
assert(p_elem->HeapKey() >= elem->HeapKey());
assert(elem->HeapPos() == i);
@@ -195,27 +196,27 @@ public:
~CTR_UHeap(
- ) {
+ ) {
};
private:
CTR_UHeap(
- ) {
+ ) {
};
std::vector<int> m_vector;
private:
- void
+ void
Swap(
- HeapType *base,
- int i,
- int j
- ) {
- std::swap(m_vector[i],m_vector[j]);
+ HeapType *base,
+ int i,
+ int j
+ ) {
+ std::swap(m_vector[i], m_vector[j]);
CTR_UHeapable *heap_i = base + m_vector[i];
CTR_UHeapable *heap_j = base + m_vector[j];
@@ -225,77 +226,78 @@ private:
heap_j->HeapPos() = j;
}
- int
+ int
Parent(
- unsigned int i
- ) {
- return (i-1) >> 1;
+ unsigned int i
+ ) {
+ return (i - 1) >> 1;
}
- int
+ int
Left(
- int i
- ) {
- return (i<<1)+1;
+ int i
+ ) {
+ return (i << 1) + 1;
}
- int
+ int
Right(
- int i
- ) {
- return (i<<1)+2;
+ int i
+ ) {
+ return (i << 1) + 2;
}
- float
+ float
HeapVal(
- HeapType *base,
- int i
- ) {
+ HeapType *base,
+ int i
+ ) {
return base[m_vector[i]].HeapKey();
}
- void
+ void
DownHeap(
- HeapType *base,
- int i
- ) {
+ HeapType *base,
+ int i
+ ) {
int heap_size = m_vector.size();
int l = Left(i);
int r = Right(i);
int largest;
- if (l < heap_size && HeapVal(base,l) > HeapVal(base,i)) {
+ if (l < heap_size && HeapVal(base, l) > HeapVal(base, i)) {
largest = l;
- } else {
+ }
+ else {
largest = i;
}
- if (r < heap_size && HeapVal(base,r) > HeapVal(base,largest)) {
+ if (r < heap_size && HeapVal(base, r) > HeapVal(base, largest)) {
largest = r;
}
if (largest != i) {
// exchange i and largest
- Swap(base,i,largest);
- DownHeap(base,largest);
+ Swap(base, i, largest);
+ DownHeap(base, largest);
}
}
- void
+ void
UpHeap(
- HeapType *base,
- int i
- ) {
+ HeapType *base,
+ int i
+ ) {
// swap parents untill it's found a place in the heap < it's parent or
// top of heap
while (i > 0) {
int p = Parent(i);
- if (HeapVal(base,i) < HeapVal(base,p)) {
+ if (HeapVal(base, i) < HeapVal(base, p)) {
break;
}
- Swap(base,p,i);
+ Swap(base, p, i);
i = p;
}
}
diff --git a/intern/ghost/intern/GHOST_SystemPathsX11.cpp b/intern/ghost/intern/GHOST_SystemPathsX11.cpp
index 95f82fe0e60..cb2e351ab7a 100644
--- a/intern/ghost/intern/GHOST_SystemPathsX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemPathsX11.cpp
@@ -61,7 +61,7 @@ GHOST_SystemPathsX11::~GHOST_SystemPathsX11()
const GHOST_TUns8 *GHOST_SystemPathsX11::getSystemDir(int, const char *versionstr) const
{
/* no prefix assumes a portable build which only uses bundled scripts */
- if(static_path) {
+ if (static_path) {
static char system_path[PATH_MAX];
snprintf(system_path, sizeof(system_path), "%s/blender/%s", static_path, versionstr);
return (GHOST_TUns8*)system_path;
@@ -76,10 +76,10 @@ const GHOST_TUns8 *GHOST_SystemPathsX11::getUserDir(int version, const char *ver
/* in blender 2.64, we migrate to XDG. to ensure the copy previous settings
* operator works we give a different path depending on the requested version */
- if(version < 264) {
+ if (version < 264) {
const char *home = getenv("HOME");
- if(home) {
+ if (home) {
snprintf(user_path, sizeof(user_path), "%s/.blender/%s", home, versionstr);
return (GHOST_TUns8*)user_path;
}
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c
index 575c721bd54..35bf4c0961f 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf.c
@@ -1882,7 +1882,7 @@ static void ccgSubSurf__calcSubdivLevel(CCGSubSurf *ss,
VertDataMulN(q, 0.25f, ss);
VertDataAdd(r, q, ss);
- /* nCo = nCo + (r - nCo) * avgSharpness */
+ /* nCo = nCo + (r - nCo) * avgSharpness */
VertDataSub(r, nCo, ss);
VertDataMulN(r, avgSharpness, ss);
VertDataAdd(nCo, r, ss);
@@ -2331,7 +2331,7 @@ static void ccgSubSurf__sync(CCGSubSurf *ss)
VertDataMulN(q, 0.25f, ss);
VertDataAdd(r, q, ss);
- /* nCo = nCo + (r - nCo) * avgSharpness */
+ /* nCo = nCo + (r - nCo) * avgSharpness */
VertDataSub(r, nCo, ss);
VertDataMulN(r, avgSharpness, ss);
VertDataAdd(nCo, r, ss);
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index a0cca25a841..f9e72be4fc1 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -106,7 +106,7 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm );
*
******************************************************************************/
/**
- * cloth_init - creates a new cloth simulation.
+ * cloth_init - creates a new cloth simulation.
*
* 1. create object
* 2. fill object with standard values or with the GUI settings if given
@@ -821,8 +821,9 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm )
if (clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_SELF ) {
if ( dvert->dw[j].def_nr == (clmd->coll_parms->vgroup_selfcol-1)) {
- if( dvert->dw [j].weight > 0.0)
+ if (dvert->dw [j].weight > 0.0f) {
verts->flags |= CLOTH_VERT_FLAG_NOSELFCOLL;
+ }
}
}
/*
diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c
index 71b2f6952d5..1bd650ef568 100644
--- a/source/blender/blenkernel/intern/collision.c
+++ b/source/blender/blenkernel/intern/collision.c
@@ -841,9 +841,11 @@ int cloth_bvh_objcollision(Object *ob, ClothModifierData * clmd, float step, flo
}
}
- if( ( cloth->verts[i].flags & CLOTH_VERT_FLAG_NOSELFCOLL ) ||
- ( cloth->verts[j].flags & CLOTH_VERT_FLAG_NOSELFCOLL ) )
+ if ((cloth->verts[i].flags & CLOTH_VERT_FLAG_NOSELFCOLL) ||
+ (cloth->verts[j].flags & CLOTH_VERT_FLAG_NOSELFCOLL))
+ {
continue;
+ }
sub_v3_v3v3(temp, verts[i].tx, verts[j].tx);
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 8676a5fb271..ea396b6d88c 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -32,7 +32,7 @@
#include <string.h>
#include <fcntl.h>
#include <math.h>
-#ifndef WIN32
+#ifndef WIN32
#include <unistd.h>
#else
#include <io.h>
@@ -112,25 +112,25 @@
static void de_interlace_ng(struct ImBuf *ibuf) /* neogeo fields */
{
struct ImBuf *tbuf1, *tbuf2;
-
+
if (ibuf == NULL) return;
if (ibuf->flags & IB_fields) return;
ibuf->flags |= IB_fields;
-
+
if (ibuf->rect) {
/* make copies */
tbuf1 = IMB_allocImBuf(ibuf->x, (ibuf->y >> 1), (unsigned char)32, (int)IB_rect);
tbuf2 = IMB_allocImBuf(ibuf->x, (ibuf->y >> 1), (unsigned char)32, (int)IB_rect);
-
+
ibuf->x *= 2;
-
+
IMB_rectcpy(tbuf1, ibuf, 0, 0, 0, 0, ibuf->x, ibuf->y);
IMB_rectcpy(tbuf2, ibuf, 0, 0, tbuf2->x, 0, ibuf->x, ibuf->y);
-
+
ibuf->x /= 2;
IMB_rectcpy(ibuf, tbuf1, 0, 0, 0, 0, tbuf1->x, tbuf1->y);
IMB_rectcpy(ibuf, tbuf2, 0, tbuf2->y, 0, 0, tbuf2->x, tbuf2->y);
-
+
IMB_freeImBuf(tbuf1);
IMB_freeImBuf(tbuf2);
}
@@ -140,25 +140,25 @@ static void de_interlace_ng(struct ImBuf *ibuf) /* neogeo fields */
static void de_interlace_st(struct ImBuf *ibuf) /* standard fields */
{
struct ImBuf *tbuf1, *tbuf2;
-
+
if (ibuf == NULL) return;
if (ibuf->flags & IB_fields) return;
ibuf->flags |= IB_fields;
-
+
if (ibuf->rect) {
/* make copies */
tbuf1 = IMB_allocImBuf(ibuf->x, (ibuf->y >> 1), (unsigned char)32, IB_rect);
tbuf2 = IMB_allocImBuf(ibuf->x, (ibuf->y >> 1), (unsigned char)32, IB_rect);
-
+
ibuf->x *= 2;
-
+
IMB_rectcpy(tbuf1, ibuf, 0, 0, 0, 0, ibuf->x, ibuf->y);
IMB_rectcpy(tbuf2, ibuf, 0, 0, tbuf2->x, 0, ibuf->x, ibuf->y);
-
+
ibuf->x /= 2;
IMB_rectcpy(ibuf, tbuf2, 0, 0, 0, 0, tbuf2->x, tbuf2->y);
IMB_rectcpy(ibuf, tbuf1, 0, tbuf2->y, 0, 0, tbuf1->x, tbuf1->y);
-
+
IMB_freeImBuf(tbuf1);
IMB_freeImBuf(tbuf2);
}
@@ -181,27 +181,27 @@ void BKE_image_de_interlace(Image *ima, int odd)
static void image_free_buffers(Image *ima)
{
ImBuf *ibuf;
-
+
while ((ibuf = ima->ibufs.first)) {
BLI_remlink(&ima->ibufs, ibuf);
-
+
if (ibuf->userdata) {
MEM_freeN(ibuf->userdata);
ibuf->userdata = NULL;
}
IMB_freeImBuf(ibuf);
}
-
+
if (ima->anim) IMB_free_anim(ima->anim);
ima->anim = NULL;
if (ima->rr) {
RE_FreeRenderResult(ima->rr);
ima->rr = NULL;
- }
-
+ }
+
GPU_free_image(ima);
-
+
ima->ok = IMA_OK;
}
@@ -232,16 +232,16 @@ void BKE_image_free(Image *ima)
static Image *image_alloc(const char *name, short source, short type)
{
Image *ima;
-
+
ima = BKE_libblock_alloc(&G.main->image, ID_IM, name);
if (ima) {
ima->ok = IMA_OK;
-
+
ima->xrep = ima->yrep = 1;
ima->aspx = ima->aspy = 1.0;
ima->gen_x = 1024; ima->gen_y = 1024;
ima->gen_type = 1; /* no defines yet? */
-
+
ima->source = source;
ima->type = type;
}
@@ -283,10 +283,10 @@ static void image_assign_ibuf(Image *ima, ImBuf *ibuf, int index, int frame)
{
if (ibuf) {
ImBuf *link;
-
+
if (index != IMA_NO_INDEX)
index = IMA_MAKE_INDEX(frame, index);
-
+
/* insert based on index */
for (link = ima->ibufs.first; link; link = link->next)
if (link->index >= index)
@@ -316,7 +316,7 @@ Image *BKE_image_copy(Image *ima)
nima->flag = ima->flag;
nima->tpageflag = ima->tpageflag;
-
+
nima->gen_x = ima->gen_x;
nima->gen_y = ima->gen_y;
nima->gen_type = ima->gen_type;
@@ -500,15 +500,15 @@ void BKE_image_make_local(struct Image *ima)
void BKE_image_merge(Image *dest, Image *source)
{
ImBuf *ibuf;
-
+
/* sanity check */
if (dest && source && dest != source) {
-
+
while ((ibuf = source->ibufs.first)) {
BLI_remlink(&source->ibufs, ibuf);
image_assign_ibuf(dest, ibuf, IMA_INDEX_PASS(ibuf->index), IMA_INDEX_FRAME(ibuf->index));
}
-
+
BKE_libblock_free(&G.main->image, source);
}
}
@@ -565,7 +565,7 @@ Image *BKE_image_load_exists(const char *filepath)
{
Image *ima;
char str[FILE_MAX], strtest[FILE_MAX];
-
+
BLI_strncpy(str, filepath, sizeof(str));
BLI_path_abs(str, G.main->name);
@@ -574,7 +574,7 @@ Image *BKE_image_load_exists(const char *filepath)
if (ima->source != IMA_SRC_VIEWER && ima->source != IMA_SRC_GENERATED) {
BLI_strncpy(strtest, ima->name, sizeof(ima->name));
BLI_path_abs(strtest, G.main->name);
-
+
if (BLI_path_cmp(strtest, str) == 0) {
if (ima->anim == NULL || ima->id.us == 0) {
BLI_strncpy(ima->name, filepath, sizeof(ima->name)); /* for stringcode */
@@ -596,7 +596,7 @@ static ImBuf *add_ibuf_size(unsigned int width, unsigned int height, const char
ImBuf *ibuf;
unsigned char *rect = NULL;
float *rect_float = NULL;
-
+
if (floatbuf) {
ibuf = IMB_allocImBuf(width, height, depth, IB_rectfloat);
rect_float = (float *)ibuf->rect_float;
@@ -607,10 +607,10 @@ static ImBuf *add_ibuf_size(unsigned int width, unsigned int height, const char
rect = (unsigned char *)ibuf->rect;
ibuf->profile = IB_PROFILE_SRGB;
}
-
+
BLI_strncpy(ibuf->name, name, sizeof(ibuf->name));
ibuf->userflags |= IB_BITMAPDIRTY;
-
+
switch (uvtestgrid) {
case 1:
BKE_image_buf_fill_checker(rect, rect_float, width, height);
@@ -630,19 +630,19 @@ Image *BKE_image_add_generated(unsigned int width, unsigned int height, const ch
{
/* on save, type is changed to FILE in editsima.c */
Image *ima = image_alloc(name, IMA_SRC_GENERATED, IMA_TYPE_UV_TEST);
-
+
if (ima) {
ImBuf *ibuf;
-
+
/* BLI_strncpy(ima->name, name, FILE_MAX); */ /* don't do this, this writes in ain invalid filepath! */
ima->gen_x = width;
ima->gen_y = height;
ima->gen_type = uvtestgrid;
ima->gen_flag |= (floatbuf ? IMA_GEN_FLOAT : 0);
-
+
ibuf = add_ibuf_size(width, height, ima->name, depth, floatbuf, uvtestgrid, color);
image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0);
-
+
ima->ok = IMA_OK_LOADED;
}
@@ -670,31 +670,31 @@ Image *BKE_image_add_from_imbuf(ImBuf *ibuf)
void BKE_image_memorypack(Image *ima)
{
ImBuf *ibuf = image_get_ibuf(ima, IMA_NO_INDEX, 0);
-
+
if (ibuf == NULL)
return;
if (ima->packedfile) {
freePackedFile(ima->packedfile);
ima->packedfile = NULL;
}
-
+
ibuf->ftype = PNG;
ibuf->planes = R_IMF_PLANES_RGBA;
-
+
IMB_saveiff(ibuf, ibuf->name, IB_rect | IB_mem);
if (ibuf->encodedbuffer == NULL) {
printf("memory save for pack error\n");
}
else {
PackedFile *pf = MEM_callocN(sizeof(*pf), "PackedFile");
-
+
pf->data = ibuf->encodedbuffer;
pf->size = ibuf->encodedsize;
ima->packedfile = pf;
ibuf->encodedbuffer = NULL;
ibuf->encodedsize = 0;
ibuf->userflags &= ~IB_BITMAPDIRTY;
-
+
if (ima->source == IMA_SRC_GENERATED) {
ima->source = IMA_SRC_FILE;
ima->type = IMA_TYPE_IMAGE;
@@ -709,7 +709,7 @@ void BKE_image_tag_time(Image *ima)
}
#if 0
-static void tag_all_images_time()
+static void tag_all_images_time()
{
Image *ima;
int ctime = (int)PIL_check_seconds_timer();
@@ -728,9 +728,9 @@ void free_old_images(void)
Image *ima;
static int lasttime = 0;
int ctime = (int)PIL_check_seconds_timer();
-
- /*
- * Run garbage collector once for every collecting period of time
+
+ /*
+ * Run garbage collector once for every collecting period of time
* if textimeout is 0, that's the option to NOT run the collector
*/
if (U.textimeout == 0 || ctime % U.texcollectrate || ctime == lasttime)
@@ -739,7 +739,7 @@ void free_old_images(void)
/* of course not! */
if (G.rendering)
return;
-
+
lasttime = ctime;
ima = G.main->image.first;
@@ -767,11 +767,11 @@ static uintptr_t image_mem_size(Image *ima)
uintptr_t size = 0;
size = 0;
-
+
/* viewers have memory depending on other rules, has no valid rect pointer */
if (ima->source == IMA_SRC_VIEWER)
return 0;
-
+
for (ibuf = ima->ibufs.first; ibuf; ibuf = ibuf->next) {
if (ibuf->rect) size += MEM_allocN_len(ibuf->rect);
else if (ibuf->rect_float) size += MEM_allocN_len(ibuf->rect_float);
@@ -811,25 +811,25 @@ void BKE_image_free_all_textures(void)
Tex *tex;
Image *ima;
/* unsigned int totsize = 0; */
-
+
for (ima = G.main->image.first; ima; ima = ima->id.next)
ima->id.flag &= ~LIB_DOIT;
-
+
for (tex = G.main->tex.first; tex; tex = tex->id.next)
if (tex->ima)
tex->ima->id.flag |= LIB_DOIT;
-
+
for (ima = G.main->image.first; ima; ima = ima->id.next) {
if (ima->ibufs.first && (ima->id.flag & LIB_DOIT)) {
ImBuf *ibuf;
-
+
for (ibuf = ima->ibufs.first; ibuf; ibuf = ibuf->next) {
/* escape when image is painted on */
if (ibuf->userflags & IB_BITMAPDIRTY)
break;
-
+
#if 0
- if (ibuf->mipmap[0])
+ if (ibuf->mipmap[0])
totsize += 1.33 * ibuf->x * ibuf->y * 4;
else
totsize += ibuf->x * ibuf->y * 4;
@@ -855,20 +855,20 @@ void BKE_image_free_anim_ibufs(Image *ima, int except_frame)
continue;
if (except_frame != IMA_INDEX_FRAME(ibuf->index)) {
BLI_remlink(&ima->ibufs, ibuf);
-
+
if (ibuf->userdata) {
MEM_freeN(ibuf->userdata);
ibuf->userdata = NULL;
}
IMB_freeImBuf(ibuf);
- }
+ }
}
}
void BKE_image_all_free_anim_ibufs(int cfra)
{
Image *ima;
-
+
for (ima = G.main->image.first; ima; ima = ima->id.next)
if (ELEM(ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE))
BKE_image_free_anim_ibufs(ima, cfra);
@@ -921,7 +921,7 @@ char BKE_ftype_to_imtype(const int ftype)
{
if (ftype == 0)
return R_IMF_IMTYPE_TARGA;
- else if (ftype == IMAGIC)
+ else if (ftype == IMAGIC)
return R_IMF_IMTYPE_IRIS;
#ifdef WITH_HDR
else if (ftype & RADHDR)
@@ -1108,7 +1108,7 @@ char BKE_imtype_from_arg(const char *imtype_arg)
int BKE_add_image_extension(char *string, const char imtype)
{
const char *extension = NULL;
-
+
if (imtype == R_IMF_IMTYPE_IRIS) {
if (!BLI_testextensie(string, ".rgb"))
extension = ".rgb";
@@ -1192,7 +1192,7 @@ int BKE_add_image_extension(char *string, const char imtype)
else {
return BLI_ensure_extension(string, FILE_MAX, extension);
}
-
+
}
else {
return FALSE;
@@ -1243,11 +1243,11 @@ void BKE_imbuf_to_image_format(struct ImageFormatData *im_format, const ImBuf *i
#ifdef WITH_OPENEXR
else if (imbuf->ftype & OPENEXR) {
- im_format->imtype = R_IMF_IMTYPE_OPENEXR;
+ im_format->imtype = R_IMF_IMTYPE_OPENEXR;
if (imbuf->ftype & OPENEXR_HALF)
im_format->depth = R_IMF_CHAN_DEPTH_16;
if (imbuf->ftype & OPENEXR_COMPRESS)
- im_format->exr_codec = R_IMF_EXR_CODEC_ZIP; // Can't determine compression
+ im_format->exr_codec = R_IMF_EXR_CODEC_ZIP; // Can't determine compression
if (imbuf->zbuf_float)
im_format->flag |= R_IMF_FLAG_ZBUF;
}
@@ -1277,10 +1277,10 @@ void BKE_imbuf_to_image_format(struct ImageFormatData *im_format, const ImBuf *i
else if (imbuf->ftype & JP2_12BIT)
im_format->depth = R_IMF_CHAN_DEPTH_12;
- if(imbuf->ftype & JP2_YCC)
+ if (imbuf->ftype & JP2_YCC)
im_format->jp2_flag |= R_IMF_JP2_FLAG_YCC;
- if(imbuf->ftype & JP2_CINE) {
+ if (imbuf->ftype & JP2_CINE) {
im_format->jp2_flag |= R_IMF_JP2_FLAG_CINE_PRESET;
if (imbuf->ftype & JP2_CINE_48FPS)
im_format->jp2_flag |= R_IMF_JP2_FLAG_CINE_48;
@@ -1297,13 +1297,13 @@ void BKE_imbuf_to_image_format(struct ImageFormatData *im_format, const ImBuf *i
switch (imbuf->channels) {
case 0:
case 4: im_format->planes = R_IMF_PLANES_RGBA;
- break;
+ break;
case 3: im_format->planes = R_IMF_PLANES_RGB;
- break;
+ break;
case 1: im_format->planes = R_IMF_PLANES_BW;
- break;
- default:im_format->planes = R_IMF_PLANES_RGB;
- break;
+ break;
+ default: im_format->planes = R_IMF_PLANES_RGB;
+ break;
}
}
@@ -1335,7 +1335,7 @@ static void stampdata(Scene *scene, Object *camera, StampData *stamp_data, int d
else {
stamp_data->file[0] = '\0';
}
-
+
if (scene->r.stamp & R_STAMP_NOTE) {
/* Never do prefix for Note */
BLI_snprintf(stamp_data->note, sizeof(stamp_data->note), "%s", scene->r.stamp_udata);
@@ -1343,7 +1343,7 @@ static void stampdata(Scene *scene, Object *camera, StampData *stamp_data, int d
else {
stamp_data->note[0] = '\0';
}
-
+
if (scene->r.stamp & R_STAMP_DATE) {
t = time(NULL);
tl = localtime(&t);
@@ -1353,7 +1353,7 @@ static void stampdata(Scene *scene, Object *camera, StampData *stamp_data, int d
else {
stamp_data->date[0] = '\0';
}
-
+
if (scene->r.stamp & R_STAMP_MARKER) {
char *name = BKE_scene_find_last_marker_name(scene, CFRA);
@@ -1365,7 +1365,7 @@ static void stampdata(Scene *scene, Object *camera, StampData *stamp_data, int d
else {
stamp_data->marker[0] = '\0';
}
-
+
if (scene->r.stamp & R_STAMP_TIME) {
int f = (int)(scene->r.cfra % scene->r.frs_sec);
int s = (int)(scene->r.cfra / scene->r.frs_sec);
@@ -1392,11 +1392,11 @@ static void stampdata(Scene *scene, Object *camera, StampData *stamp_data, int d
else {
stamp_data->time[0] = '\0';
}
-
+
if (scene->r.stamp & R_STAMP_FRAME) {
char fmtstr[32];
int digits = 1;
-
+
if (scene->r.efra > 9)
digits = 1 + (int) log10(scene->r.efra);
@@ -1432,10 +1432,10 @@ static void stampdata(Scene *scene, Object *camera, StampData *stamp_data, int d
else {
stamp_data->scene[0] = '\0';
}
-
+
if (scene->r.stamp & R_STAMP_SEQSTRIP) {
Sequence *seq = seq_foreground_frame_get(scene, scene->r.cfra);
-
+
if (seq) BLI_strncpy(text, seq->name + 2, sizeof(text));
else BLI_strncpy(text, "<none>", sizeof(text));
@@ -1473,7 +1473,7 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec
if (!rect && !rectf)
return;
-
+
stampdata(scene, camera, &stamp_data, 1);
/* TODO, do_versions */
@@ -1482,7 +1482,7 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec
/* set before return */
BLF_size(mono, scene->r.stamp_font_id, 72);
-
+
BLF_buffer(mono, rectf, rect, width, height, channels);
BLF_buffer_col(mono, scene->r.fg_stamp[0], scene->r.fg_stamp[1], scene->r.fg_stamp[2], 1.0);
pad = BLF_width_max(mono);
@@ -1524,7 +1524,7 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec
/* the extra pixel for background. */
y -= BUFF_MARGIN_Y * 2;
}
-
+
/* Top left corner, below File (or Note) */
if (stamp_data.date[0]) {
BLF_width_and_height(mono, stamp_data.date, &w, &h); h = h_fixed;
@@ -1569,7 +1569,7 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec
/* space width. */
x += w + pad;
}
-
+
/* Left bottom corner */
if (stamp_data.time[0]) {
BLF_width_and_height(mono, stamp_data.time, &w, &h); h = h_fixed;
@@ -1584,7 +1584,7 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec
/* space width. */
x += w + pad;
}
-
+
if (stamp_data.frame[0]) {
BLF_width_and_height(mono, stamp_data.frame, &w, &h); h = h_fixed;
@@ -1619,7 +1619,7 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec
BLF_position(mono, x, y + y_ofs, 0.0);
BLF_draw_buffer(mono, stamp_data.cameralens);
}
-
+
if (stamp_data.scene[0]) {
BLF_width_and_height(mono, stamp_data.scene, &w, &h); h = h_fixed;
@@ -1633,7 +1633,7 @@ void BKE_stamp_buf(Scene *scene, Object *camera, unsigned char *rect, float *rec
BLF_position(mono, x, y + y_ofs, 0.0);
BLF_draw_buffer(mono, stamp_data.scene);
}
-
+
if (stamp_data.strip[0]) {
BLF_width_and_height(mono, stamp_data.strip, &w, &h); h = h_fixed;
@@ -1660,10 +1660,10 @@ void BKE_imbuf_stamp_info(Scene *scene, Object *camera, struct ImBuf *ibuf)
struct StampData stamp_data;
if (!ibuf) return;
-
+
/* fill all the data values, no prefix */
stampdata(scene, camera, &stamp_data, 0);
-
+
if (stamp_data.file[0]) IMB_metadata_change_field(ibuf, "File", stamp_data.file);
if (stamp_data.note[0]) IMB_metadata_change_field(ibuf, "Note", stamp_data.note);
if (stamp_data.date[0]) IMB_metadata_change_field(ibuf, "Date", stamp_data.date);
@@ -1747,10 +1747,10 @@ int BKE_imbuf_write(ImBuf *ibuf, const char *name, ImageFormatData *imf)
if (imf->depth == R_IMF_CHAN_DEPTH_16)
ibuf->ftype |= OPENEXR_HALF;
ibuf->ftype |= (imf->exr_codec & OPENEXR_COMPRESS);
-
+
if (!(imf->flag & R_IMF_FLAG_ZBUF))
ibuf->zbuf_float = NULL; /* signal for exr saving */
-
+
}
#endif
#ifdef WITH_CINEON
@@ -1771,14 +1771,14 @@ int BKE_imbuf_write(ImBuf *ibuf, const char *name, ImageFormatData *imf)
else if (imtype == R_IMF_IMTYPE_JP2) {
if (quality < 10) quality = 90;
ibuf->ftype = JP2 | quality;
-
+
if (imf->depth == R_IMF_CHAN_DEPTH_16) {
ibuf->ftype |= JP2_16BIT;
}
else if (imf->depth == R_IMF_CHAN_DEPTH_12) {
ibuf->ftype |= JP2_12BIT;
}
-
+
if (imf->jp2_flag & R_IMF_JP2_FLAG_YCC) {
ibuf->ftype |= JP2_YCC;
}
@@ -1795,14 +1795,14 @@ int BKE_imbuf_write(ImBuf *ibuf, const char *name, ImageFormatData *imf)
if (quality < 10) quality = 90;
ibuf->ftype = JPG | quality;
}
-
+
BLI_make_existing_file(name);
-
+
ok = IMB_saveiff(ibuf, name, IB_rect | IB_zbuf | IB_zbuffloat);
if (ok == 0) {
perror(name);
}
-
+
return(ok);
}
@@ -1849,7 +1849,7 @@ void BKE_makepicstring(char *string, const char *base, const char *relbase, int
if (use_ext)
BKE_add_image_extension(string, imtype);
-
+
}
/* used by sequencer too */
@@ -1857,7 +1857,7 @@ struct anim *openanim(const char *name, int flags, int streamindex)
{
struct anim *anim;
struct ImBuf *ibuf;
-
+
anim = IMB_open_anim(name, flags, streamindex);
if (anim == NULL) return NULL;
@@ -1871,14 +1871,14 @@ struct anim *openanim(const char *name, int flags, int streamindex)
return NULL;
}
IMB_freeImBuf(ibuf);
-
+
return(anim);
}
/* ************************* New Image API *************** */
-/* Notes about Image storage
+/* Notes about Image storage
* - packedfile
* -> written in .blend
* - filename
@@ -1901,15 +1901,15 @@ struct anim *openanim(const char *name, int flags, int streamindex)
Image *BKE_image_verify_viewer(int type, const char *name)
{
Image *ima;
-
+
for (ima = G.main->image.first; ima; ima = ima->id.next)
if (ima->source == IMA_SRC_VIEWER)
if (ima->type == type)
break;
-
+
if (ima == NULL)
ima = image_alloc(name, IMA_SRC_VIEWER, type);
-
+
/* happens on reload, imagewindow cannot be image user when hidden*/
if (ima->id.us == 0)
id_us_plus(&ima->id);
@@ -1985,7 +1985,7 @@ void BKE_image_signal(Image *ima, ImageUser *iuser, int signal)
{
if (ima == NULL)
return;
-
+
switch (signal) {
case IMA_SIGNAL_FREE:
image_free_buffers(ima);
@@ -2035,10 +2035,10 @@ void BKE_image_signal(Image *ima, ImageUser *iuser, int signal)
}
else
image_free_buffers(ima);
-
+
if (iuser)
iuser->ok = 1;
-
+
break;
case IMA_SIGNAL_USER_NEW_IMAGE:
if (iuser) {
@@ -2052,7 +2052,7 @@ void BKE_image_signal(Image *ima, ImageUser *iuser, int signal)
}
break;
}
-
+
/* don't use notifiers because they are not 100% sure to succeeded
* this also makes sure all scenes are accounted for. */
{
@@ -2072,13 +2072,13 @@ RenderPass *BKE_image_multilayer_index(RenderResult *rr, ImageUser *iuser)
{
RenderLayer *rl;
RenderPass *rpass = NULL;
-
+
if (rr == NULL)
return NULL;
-
+
if (iuser) {
short index = 0, rl_index = 0, rp_index;
-
+
for (rl = rr->layers.first; rl; rl = rl->next, rl_index++) {
rp_index = 0;
for (rpass = rl->passes.first; rpass; rpass = rpass->next, index++, rp_index++)
@@ -2087,10 +2087,10 @@ RenderPass *BKE_image_multilayer_index(RenderResult *rr, ImageUser *iuser)
if (rpass)
break;
}
-
+
if (rpass)
iuser->multi_index = index;
- else
+ else
iuser->multi_index = 0;
}
if (rpass == NULL) {
@@ -2098,7 +2098,7 @@ RenderPass *BKE_image_multilayer_index(RenderResult *rr, ImageUser *iuser)
if (rl)
rpass = rl->passes.first;
}
-
+
return rpass;
}
@@ -2150,7 +2150,7 @@ void BKE_image_backup_render(Scene *scene, Image *ima)
/* in that case we have to build a render-result */
static void image_create_multilayer(Image *ima, ImBuf *ibuf, int framenr)
{
-
+
ima->rr = RE_MultilayerConvert(ibuf->userdata, ibuf->x, ibuf->y);
#ifdef WITH_OPENEXR
@@ -2176,9 +2176,9 @@ static void image_initialize_after_load(Image *ima, ImBuf *ibuf)
}
/* timer */
ima->lastused = clock() / CLOCKS_PER_SEC;
-
+
ima->ok = IMA_OK_LOADED;
-
+
}
static ImBuf *image_load_sequence_file(Image *ima, ImageUser *iuser, int frame)
@@ -2186,14 +2186,14 @@ static ImBuf *image_load_sequence_file(Image *ima, ImageUser *iuser, int frame)
struct ImBuf *ibuf;
char name[FILE_MAX];
int flag;
-
+
/* XXX temp stuff? */
if (ima->lastframe != frame)
ima->tpageflag |= IMA_TPAGE_REFRESH;
ima->lastframe = frame;
BKE_image_user_file_path(iuser, ima, name);
-
+
flag = IB_rect | IB_multilayer;
if (ima->flag & IMA_DO_PREMUL)
flag |= IB_premul;
@@ -2214,7 +2214,7 @@ static ImBuf *image_load_sequence_file(Image *ima, ImageUser *iuser, int frame)
#ifdef WITH_OPENEXR
/* handle multilayer case, don't assign ibuf. will be handled in BKE_image_get_ibuf */
if (ibuf->ftype == OPENEXR && ibuf->userdata) {
- image_create_multilayer(ima, ibuf, frame);
+ image_create_multilayer(ima, ibuf, frame);
ima->type = IMA_TYPE_MULTILAYER;
IMB_freeImBuf(ibuf);
ibuf = NULL;
@@ -2230,27 +2230,27 @@ static ImBuf *image_load_sequence_file(Image *ima, ImageUser *iuser, int frame)
}
else
ima->ok = 0;
-
+
if (iuser)
iuser->ok = ima->ok;
-
+
return ibuf;
}
static ImBuf *image_load_sequence_multilayer(Image *ima, ImageUser *iuser, int frame)
{
struct ImBuf *ibuf = NULL;
-
+
/* either we load from RenderResult, or we have to load a new one */
-
+
/* check for new RenderResult */
if (ima->rr == NULL || frame != ima->rr->framenr) {
/* copy to survive not found multilayer image */
RenderResult *oldrr = ima->rr;
-
+
ima->rr = NULL;
ibuf = image_load_sequence_file(ima, iuser, frame);
-
+
if (ibuf) { /* actually an error */
ima->type = IMA_TYPE_IMAGE;
printf("error, multi is normal image\n");
@@ -2268,7 +2268,7 @@ static ImBuf *image_load_sequence_multilayer(Image *ima, ImageUser *iuser, int f
}
if (ima->rr) {
RenderPass *rpass = BKE_image_multilayer_index(ima->rr, iuser);
-
+
if (rpass) {
// printf("load from pass %s\n", rpass->name);
/* since we free render results, we copy the rect */
@@ -2278,19 +2278,19 @@ static ImBuf *image_load_sequence_multilayer(Image *ima, ImageUser *iuser, int f
ibuf->mall = IB_rectfloat;
ibuf->channels = rpass->channels;
ibuf->profile = IB_PROFILE_LINEAR_RGB;
-
+
image_initialize_after_load(ima, ibuf);
image_assign_ibuf(ima, ibuf, iuser ? iuser->multi_index : 0, frame);
-
+
}
// else printf("pass not found\n");
}
else
ima->ok = 0;
-
+
if (iuser)
iuser->ok = ima->ok;
-
+
return ibuf;
}
@@ -2298,35 +2298,35 @@ static ImBuf *image_load_sequence_multilayer(Image *ima, ImageUser *iuser, int f
static ImBuf *image_load_movie_file(Image *ima, ImageUser *iuser, int frame)
{
struct ImBuf *ibuf = NULL;
-
+
ima->lastframe = frame;
-
+
if (ima->anim == NULL) {
char str[FILE_MAX];
-
+
BKE_image_user_file_path(iuser, ima, str);
/* FIXME: make several stream accessible in image editor, too*/
ima->anim = openanim(str, IB_rect, 0);
-
+
/* let's initialize this user */
if (ima->anim && iuser && iuser->frames == 0)
iuser->frames = IMB_anim_get_duration(ima->anim,
IMB_TC_RECORD_RUN);
}
-
+
if (ima->anim) {
int dur = IMB_anim_get_duration(ima->anim,
IMB_TC_RECORD_RUN);
int fra = frame - 1;
-
+
if (fra < 0) fra = 0;
if (fra > (dur - 1)) fra = dur - 1;
ibuf = IMB_makeSingleUser(
IMB_anim_absolute(ima->anim, fra,
IMB_TC_RECORD_RUN,
IMB_PROXY_NONE));
-
+
if (ibuf) {
image_initialize_after_load(ima, ibuf);
image_assign_ibuf(ima, ibuf, 0, frame);
@@ -2336,10 +2336,10 @@ static ImBuf *image_load_movie_file(Image *ima, ImageUser *iuser, int frame)
}
else
ima->ok = 0;
-
+
if (iuser)
iuser->ok = ima->ok;
-
+
return ibuf;
}
@@ -2349,35 +2349,35 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra)
struct ImBuf *ibuf;
char str[FILE_MAX];
int assign = 0, flag;
-
+
/* always ensure clean ima */
image_free_buffers(ima);
-
+
/* is there a PackedFile with this image ? */
if (ima->packedfile) {
flag = IB_rect | IB_multilayer;
if (ima->flag & IMA_DO_PREMUL) flag |= IB_premul;
-
+
ibuf = IMB_ibImageFromMemory((unsigned char *)ima->packedfile->data,
ima->packedfile->size, flag, "<packed data>");
- }
+ }
else {
flag = IB_rect | IB_multilayer | IB_metadata;
if (ima->flag & IMA_DO_PREMUL)
flag |= IB_premul;
-
+
/* get the right string */
BKE_image_user_frame_calc(iuser, cfra, 0);
BKE_image_user_file_path(iuser, ima, str);
-
+
/* read ibuf */
ibuf = IMB_loadiffname(str, flag);
}
-
+
if (ibuf) {
/* handle multilayer case, don't assign ibuf. will be handled in BKE_image_get_ibuf */
if (ibuf->ftype == OPENEXR && ibuf->userdata) {
- image_create_multilayer(ima, ibuf, cfra);
+ image_create_multilayer(ima, ibuf, cfra);
ima->type = IMA_TYPE_MULTILAYER;
IMB_freeImBuf(ibuf);
ibuf = NULL;
@@ -2388,7 +2388,7 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra)
/* check if the image is a font image... */
detectBitmapFont(ibuf);
-
+
/* make packed file for autopack */
if ((ima->packedfile == NULL) && (G.fileflags & G_AUTOPACK))
ima->packedfile = newPackedFile(NULL, str, ID_BLEND_PATH(G.main, &ima->id));
@@ -2396,20 +2396,20 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra)
}
else
ima->ok = 0;
-
+
if (assign)
image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0);
if (iuser)
iuser->ok = ima->ok;
-
+
return ibuf;
}
static ImBuf *image_get_ibuf_multilayer(Image *ima, ImageUser *iuser)
{
ImBuf *ibuf = NULL;
-
+
if (ima->rr == NULL) {
ibuf = image_load_image_file(ima, iuser, 0);
if (ibuf) { /* actually an error */
@@ -2422,9 +2422,9 @@ static ImBuf *image_get_ibuf_multilayer(Image *ima, ImageUser *iuser)
if (rpass) {
ibuf = IMB_allocImBuf(ima->rr->rectx, ima->rr->recty, 32, 0);
-
+
image_initialize_after_load(ima, ibuf);
-
+
ibuf->rect_float = rpass->rect;
ibuf->flags |= IB_rectfloat;
ibuf->channels = rpass->channels;
@@ -2433,12 +2433,12 @@ static ImBuf *image_get_ibuf_multilayer(Image *ima, ImageUser *iuser)
image_assign_ibuf(ima, ibuf, iuser ? iuser->multi_index : IMA_NO_INDEX, 0);
}
}
-
+
if (ibuf == NULL)
ima->ok = 0;
if (iuser)
iuser->ok = ima->ok;
-
+
return ibuf;
}
@@ -2479,7 +2479,7 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **lock_
}
else
memset(&rres, 0, sizeof(RenderResult));
-
+
if (!(rres.rectx > 0 && rres.recty > 0)) {
if (from_render)
RE_ReleaseResultImage(re);
@@ -2534,7 +2534,7 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **lock_
ibuf->x = rres.rectx;
ibuf->y = rres.recty;
-
+
/* free rect buffer if float buffer changes, so it can be recreated with
* the updated result, and also in case we got byte buffer from sequencer,
* so we don't keep reference to freed buffer */
@@ -2543,7 +2543,7 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **lock_
if (rect)
ibuf->rect = rect;
-
+
if (rectf) {
ibuf->rect_float = rectf;
ibuf->flags |= IB_rectfloat;
@@ -2599,13 +2599,13 @@ static ImBuf *image_get_ibuf_threadsafe(Image *ima, ImageUser *iuser, int *frame
if (ima->type == IMA_TYPE_IMAGE) {
frame = iuser ? iuser->framenr : ima->lastframe;
ibuf = image_get_ibuf(ima, 0, frame);
-
+
/* XXX temp stuff? */
if (ima->lastframe != frame) {
ima->tpageflag |= IMA_TPAGE_REFRESH;
}
ima->lastframe = frame;
- }
+ }
else if (ima->type == IMA_TYPE_MULTILAYER) {
frame = iuser ? iuser->framenr : ima->lastframe;
index = iuser ? iuser->multi_index : IMA_NO_INDEX;
@@ -2652,7 +2652,7 @@ ImBuf *BKE_image_acquire_ibuf(Image *ima, ImageUser *iuser, void **lock_r)
* things in a threadsafe way for image_get_ibuf_threadsafe to work correct.
* That means, the last two steps must be, 1) add the ibuf to the list and
* 2) set ima/iuser->ok to 0 to IMA_OK_LOADED */
-
+
if (lock_r)
*lock_r = NULL;
@@ -2665,7 +2665,7 @@ ImBuf *BKE_image_acquire_ibuf(Image *ima, ImageUser *iuser, void **lock_r)
}
else if (ima->ok == 0)
return NULL;
-
+
/* try to get the ibuf without locking */
ibuf = image_get_ibuf_threadsafe(ima, iuser, &frame, &index);
@@ -2707,14 +2707,14 @@ ImBuf *BKE_image_acquire_ibuf(Image *ima, ImageUser *iuser, void **lock_r)
}
}
else if (ima->source == IMA_SRC_FILE) {
-
+
if (ima->type == IMA_TYPE_IMAGE)
ibuf = image_load_image_file(ima, iuser, frame); /* cfra only for '#', this global is OK */
/* no else; on load the ima type can change */
if (ima->type == IMA_TYPE_MULTILAYER)
/* keeps render result, stores ibufs in listbase, allows saving */
ibuf = image_get_ibuf_multilayer(ima, iuser);
-
+
}
else if (ima->source == IMA_SRC_GENERATED) {
/* generated is: ibuf is allocated dynamically */
@@ -2824,12 +2824,12 @@ void BKE_image_user_frame_calc(ImageUser *iuser, int cfra, int fieldnr)
{
if (iuser) {
const int framenr = BKE_image_user_frame_get(iuser, cfra, fieldnr);
-
+
/* allows image users to handle redraws */
if (iuser->flag & IMA_ANIM_ALWAYS)
if (framenr != iuser->framenr)
iuser->flag |= IMA_ANIM_REFRESHED;
-
+
iuser->framenr = framenr;
if (iuser->ok == 0) iuser->ok = 1;
}
@@ -2865,7 +2865,7 @@ int BKE_image_has_alpha(struct Image *image)
ImBuf *ibuf;
void *lock;
int planes;
-
+
ibuf = BKE_image_acquire_ibuf(image, NULL, &lock);
planes = (ibuf ? ibuf->planes : 0);
BKE_image_release_ibuf(image, lock);
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 5c48b35c85a..8fb8d863a8c 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1455,7 +1455,7 @@ void BKE_object_rot_to_mat3(Object *ob, float mat[][3])
eulO_to_mat3(dmat, ob->drot, ob->rotmode);
}
else if (ob->rotmode == ROT_MODE_AXISANGLE) {
- /* axis-angle - not really that great for 3D-changing orientations */
+ /* axis-angle - not really that great for 3D-changing orientations */
axis_angle_to_mat3(rmat, ob->rotAxis, ob->rotAngle);
axis_angle_to_mat3(dmat, ob->drotAxis, ob->drotAngle);
}
diff --git a/source/blender/blenkernel/intern/ocean.c b/source/blender/blenkernel/intern/ocean.c
index 3d3a5ed7556..13ea70d652d 100644
--- a/source/blender/blenkernel/intern/ocean.c
+++ b/source/blender/blenkernel/intern/ocean.c
@@ -199,7 +199,7 @@ static float Ph(struct Ocean *o, float kx, float kz)
}
// damp out the waves going in the direction opposite the wind
- tmp = (o->_wx * kx + o->_wz * kz) / sqrtf(k2);
+ tmp = (o->_wx * kx + o->_wz * kz) / sqrtf(k2);
if (tmp < 0) {
tmp *= o->_damp_reflections;
}
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 91023513d4d..a3fa8f8be89 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -842,7 +842,7 @@ void BKE_ptcache_id_from_particles(PTCacheID *pid, Object *ob, ParticleSystem *p
if (psys->part->rotmode != PART_ROT_VEL ||
psys->part->avemode == PART_AVE_RAND ||
- psys->part->avefac != 0.0f)
+ psys->part->avefac != 0.0f)
{
pid->data_types |= (1 << BPHYS_DATA_AVELOCITY);
}
diff --git a/source/blender/blenlib/intern/BLI_kdtree.c b/source/blender/blenlib/intern/BLI_kdtree.c
index a265505cc8f..19985c56b84 100644
--- a/source/blender/blenlib/intern/BLI_kdtree.c
+++ b/source/blender/blenlib/intern/BLI_kdtree.c
@@ -399,7 +399,7 @@ int BLI_kdtree_range_search(KDTree *tree, float range, const float co[3], const
}
else {
dist2 = squared_distance(root->co, co, root->nor, nor);
- if (dist2 <= range2)
+ if (dist2 <= range2)
add_in_range(&foundstack, found++, &totfoundstack, root->index, dist2, root->co);
if (root->left)
diff --git a/source/blender/blenlib/intern/boxpack2d.c b/source/blender/blenlib/intern/boxpack2d.c
index feaa60b40b2..5da719cd500 100644
--- a/source/blender/blenlib/intern/boxpack2d.c
+++ b/source/blender/blenlib/intern/boxpack2d.c
@@ -63,35 +63,35 @@ typedef struct BoxVert {
#define TL 2
#define BR 3
-#define BOXLEFT(b) ((b)->v[BL]->x)
-#define BOXRIGHT(b) ((b)->v[TR]->x)
-#define BOXBOTTOM(b) ((b)->v[BL]->y)
-#define BOXTOP(b) ((b)->v[TR]->y)
-#define BOXAREA(b) ((b)->w * (b)->h)
-
-#define UPDATE_V34X(b) ((b)->v[TL]->x = (b)->v[BL]->x); \
- ((b)->v[BR]->x = (b)->v[TR]->x)
-#define UPDATE_V34Y(b) ((b)->v[TL]->y = (b)->v[TR]->y); \
- ((b)->v[BR]->y = (b)->v[BL]->y)
+#define BOXLEFT(b) ((b)->v[BL]->x)
+#define BOXRIGHT(b) ((b)->v[TR]->x)
+#define BOXBOTTOM(b) ((b)->v[BL]->y)
+#define BOXTOP(b) ((b)->v[TR]->y)
+#define BOXAREA(b) ((b)->w * (b)->h)
+
+#define UPDATE_V34X(b) ((b)->v[TL]->x = (b)->v[BL]->x); \
+ ((b)->v[BR]->x = (b)->v[TR]->x)
+#define UPDATE_V34Y(b) ((b)->v[TL]->y = (b)->v[TR]->y); \
+ ((b)->v[BR]->y = (b)->v[BL]->y)
#define UPDATE_V34(b) UPDATE_V34X(b); UPDATE_V34Y(b)
-#define SET_BOXLEFT(b, f) (b)->v[TR]->x = f + (b)->w; \
- (b)->v[BL]->x = f; \
- UPDATE_V34X(b)
-#define SET_BOXRIGHT(b, f) (b)->v[BL]->x = f - (b)->w; \
- (b)->v[TR]->x = f; \
- UPDATE_V34X(b)
-#define SET_BOXBOTTOM(b, f) (b)->v[TR]->y = f + (b)->h; \
- (b)->v[BL]->y = f; \
- UPDATE_V34Y(b)
-#define SET_BOXTOP(b, f) (b)->v[BL]->y = f - (b)->h; \
- (b)->v[TR]->y = f; \
- UPDATE_V34Y(b)
+#define SET_BOXLEFT(b, f) (b)->v[TR]->x = f + (b)->w; \
+ (b)->v[BL]->x = f; \
+ UPDATE_V34X(b)
+#define SET_BOXRIGHT(b, f) (b)->v[BL]->x = f - (b)->w; \
+ (b)->v[TR]->x = f; \
+ UPDATE_V34X(b)
+#define SET_BOXBOTTOM(b, f) (b)->v[TR]->y = f + (b)->h; \
+ (b)->v[BL]->y = f; \
+ UPDATE_V34Y(b)
+#define SET_BOXTOP(b, f) (b)->v[BL]->y = f - (b)->h; \
+ (b)->v[TR]->y = f; \
+ UPDATE_V34Y(b)
#define BOXINTERSECT(b1, b2) \
- !(BOXLEFT(b1) + EPSILON >= BOXRIGHT(b2) || \
- BOXBOTTOM(b1) + EPSILON >= BOXTOP(b2) || \
- BOXRIGHT(b1) - EPSILON <= BOXLEFT(b2) || \
- BOXTOP(b1) - EPSILON <= BOXBOTTOM(b2))
+ !(BOXLEFT(b1) + EPSILON >= BOXRIGHT(b2) || \
+ BOXBOTTOM(b1) + EPSILON >= BOXTOP(b2) || \
+ BOXRIGHT(b1) - EPSILON <= BOXLEFT(b2) || \
+ BOXTOP(b1) - EPSILON <= BOXBOTTOM(b2))
#define MIN2(x, y) ((x) < (y) ? (x) : (y))
#define MAX2(x, y) ((x) > (y) ? (x) : (y))
diff --git a/source/blender/blenlib/intern/freetypefont.c b/source/blender/blenlib/intern/freetypefont.c
index ef2eb25a891..a0e72af8131 100644
--- a/source/blender/blenlib/intern/freetypefont.c
+++ b/source/blender/blenlib/intern/freetypefont.c
@@ -136,7 +136,7 @@ static void freetypechar_to_vchar(FT_Face face, FT_ULong charcode, VFontData *vf
onpoints[j]++;
if (k < npoints[j] - 1) {
- if (ftoutline.tags[l] == FT_Curve_Tag_Conic &&
+ if (ftoutline.tags[l] == FT_Curve_Tag_Conic &&
ftoutline.tags[l + 1] == FT_Curve_Tag_Conic)
{
onpoints[j]++;
diff --git a/source/blender/blenlib/intern/voxel.c b/source/blender/blenlib/intern/voxel.c
index 10eb4e82912..3a8705bbbba 100644
--- a/source/blender/blenlib/intern/voxel.c
+++ b/source/blender/blenlib/intern/voxel.c
@@ -93,9 +93,9 @@ float BLI_voxel_sample_trilinear(float *data, const int res[3], const float co[3
const float w[2] = {1.f - dz, dz};
return w[0] * ( v[0] * ( u[0] * data[xc[0] + yc[0] + zc[0]] + u[1] * data[xc[1] + yc[0] + zc[0]] )
- + v[1] * ( u[0] * data[xc[0] + yc[1] + zc[0]] + u[1] * data[xc[1] + yc[1] + zc[0]] ) )
- + w[1] * ( v[0] * ( u[0] * data[xc[0] + yc[0] + zc[1]] + u[1] * data[xc[1] + yc[0] + zc[1]] )
- + v[1] * ( u[0] * data[xc[0] + yc[1] + zc[1]] + u[1] * data[xc[1] + yc[1] + zc[1]] ) );
+ + v[1] * ( u[0] * data[xc[0] + yc[1] + zc[0]] + u[1] * data[xc[1] + yc[1] + zc[0]] ) )
+ + w[1] * ( v[0] * ( u[0] * data[xc[0] + yc[0] + zc[1]] + u[1] * data[xc[1] + yc[0] + zc[1]] )
+ + v[1] * ( u[0] * data[xc[0] + yc[1] + zc[1]] + u[1] * data[xc[1] + yc[1] + zc[1]] ) );
}
return 0.f;
diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c
index a14d602c586..a51d6bd2940 100644
--- a/source/blender/bmesh/intern/bmesh_core.c
+++ b/source/blender/bmesh/intern/bmesh_core.c
@@ -384,7 +384,7 @@ int bmesh_elem_check(void *element, const char htype)
err |= 256;
if (l->e->head.htype != BM_EDGE)
err |= 512;
- if (l->v->head.htype != BM_VERT)
+ if (l->v->head.htype != BM_VERT)
err |= 1024;
if (!BM_vert_in_edge(l->e, l->v)) {
fprintf(stderr, "%s: fatal bmesh error (vert not in edge)! (bmesh internal error)\n", __func__);
diff --git a/source/blender/bmesh/intern/bmesh_mesh_conv.c b/source/blender/bmesh/intern/bmesh_mesh_conv.c
index a8c27e0a761..123eb6829a3 100644
--- a/source/blender/bmesh/intern/bmesh_mesh_conv.c
+++ b/source/blender/bmesh/intern/bmesh_mesh_conv.c
@@ -768,7 +768,7 @@ void BM_mesh_bm_to_me(BMesh *bm, Mesh *me, int dotess)
/* editing the base key should update others */
if ((me->key->type == KEY_RELATIVE) && /* only need offsets for relative shape keys */
- (actkey != NULL) && /* unlikely, but the active key may not be valid if the
+ (actkey != NULL) && /* unlikely, but the active key may not be valid if the
* bmesh and the mesh are out of sync */
(oldverts != NULL)) /* not used here, but 'oldverts' is used later for applying 'ofs' */
{
diff --git a/source/blender/bmesh/intern/bmesh_walkers_impl.c b/source/blender/bmesh/intern/bmesh_walkers_impl.c
index 4ae7b6cc350..a72bfe47127 100644
--- a/source/blender/bmesh/intern/bmesh_walkers_impl.c
+++ b/source/blender/bmesh/intern/bmesh_walkers_impl.c
@@ -547,7 +547,7 @@ static void *bmw_LoopWalker_step(BMWalker *walker)
((vert_edge_tot == 4 || vert_edge_tot == 2) && owalk.is_boundary == FALSE) ||
/* walk over boundary of faces but stop at corners */
- (owalk.is_boundary == TRUE && owalk.is_single == FALSE && vert_edge_tot > 2) ||
+ (owalk.is_boundary == TRUE && owalk.is_single == FALSE && vert_edge_tot > 2) ||
/* initial edge was a boundary, so is this edge and vertex is only apart of this face
* this lets us walk over the the boundary of an ngon which is handy */
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp
index 625804e4ecd..4182a9c4c93 100644
--- a/source/blender/collada/AnimationImporter.cpp
+++ b/source/blender/collada/AnimationImporter.cpp
@@ -473,10 +473,10 @@ void AnimationImporter:: Assign_transform_animations(COLLADAFW::Transformation *
{
COLLADAFW::Transformation::TransformationType tm_type = transform->getTransformationType();
bool is_matrix = tm_type == COLLADAFW::Transformation::MATRIX;
- bool is_rotation = tm_type == COLLADAFW::Transformation::ROTATE;
+ bool is_rotation = tm_type == COLLADAFW::Transformation::ROTATE;
//to check if the no of curves are valid
- bool xyz = ((tm_type == COLLADAFW::Transformation::TRANSLATE || tm_type == COLLADAFW::Transformation::SCALE) && binding->animationClass == COLLADAFW::AnimationList::POSITION_XYZ);
+ bool xyz = ((tm_type == COLLADAFW::Transformation::TRANSLATE || tm_type == COLLADAFW::Transformation::SCALE) && binding->animationClass == COLLADAFW::AnimationList::POSITION_XYZ);
if (!((!xyz && curves->size() == 1) || (xyz && curves->size() == 3) || is_matrix)) {
diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp
index 115f129cb88..cd2574d055e 100644
--- a/source/blender/collada/ArmatureImporter.cpp
+++ b/source/blender/collada/ArmatureImporter.cpp
@@ -279,7 +279,7 @@ void ArmatureImporter::add_leaf_bone(float mat[][4], EditBone *bone, COLLADAFW:
TagsMap::iterator etit;
ExtraTags *et = 0;
etit = uid_tags_map.find(node->getUniqueId().toAscii());
- if (etit != uid_tags_map.end()) {
+ if (etit != uid_tags_map.end()) {
et = etit->second;
//else return;
diff --git a/source/blender/collada/ImageExporter.cpp b/source/blender/collada/ImageExporter.cpp
index fbe7111bb58..f789cfe3660 100644
--- a/source/blender/collada/ImageExporter.cpp
+++ b/source/blender/collada/ImageExporter.cpp
@@ -201,7 +201,7 @@ bool ImagesExporter::hasImages(Scene *sce)
for (int a = 0; a < num_layers; a++) {
MTFace *tface = (MTFace *)CustomData_get_layer_n(&me->fdata, CD_MTFACE, a);
Image *img = tface->tpage;
- if(img) return true;
+ if (img) return true;
}
}
}
diff --git a/source/blender/compositor/nodes/COM_GroupNode.cpp b/source/blender/compositor/nodes/COM_GroupNode.cpp
index 43dcb7be87f..6ad58caf17b 100644
--- a/source/blender/compositor/nodes/COM_GroupNode.cpp
+++ b/source/blender/compositor/nodes/COM_GroupNode.cpp
@@ -46,7 +46,7 @@ void GroupNode::ungroup(ExecutionSystem &system)
int nodes_start = system.getNodes().size();
/* missing node group datablock can happen with library linking */
- if(!subtree)
+ if (!subtree)
return;
for (index = 0; index < inputsockets.size(); index++) {
diff --git a/source/blender/compositor/operations/COM_CompositorOperation.cpp b/source/blender/compositor/operations/COM_CompositorOperation.cpp
index 622cd50f349..936cbaadd84 100644
--- a/source/blender/compositor/operations/COM_CompositorOperation.cpp
+++ b/source/blender/compositor/operations/COM_CompositorOperation.cpp
@@ -64,7 +64,7 @@ void CompositorOperation::deinitExecution()
Render *re = RE_GetRender_FromData(rd);
RenderResult *rr = RE_AcquireResultWrite(re);
if (rr) {
- if (rr->rectf != NULL) {
+ if (rr->rectf != NULL) {
MEM_freeN(rr->rectf);
}
rr->rectf = outputBuffer;
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index a8a7a55c653..b82e7c3a1e2 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -6244,9 +6244,9 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
case YKEY:
case ZKEY:
{
- if ((event->val == KM_PRESS) &&
+ if ((event->val == KM_PRESS) &&
(event->shift == FALSE) &&
- (event->ctrl == FALSE) &&
+ (event->ctrl == FALSE) &&
(event->oskey == FALSE))
{
for (but = block->buttons.first; but; but = but->next) {
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index b0867608840..a1ade77d068 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -2344,8 +2344,8 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
/* Use tf_uv_pxoffset instead of tf->uv so we can offset the UV half a pixel
* this is done so we can avoid offsetting all the pixels by 0.5 which causes
* problems when wrapping negative coords */
- xhalfpx = (0.5f + (PROJ_GEOM_TOLERANCE / 3.0f) ) / ibuf_xf;
- yhalfpx = (0.5f + (PROJ_GEOM_TOLERANCE / 4.0f) ) / ibuf_yf;
+ xhalfpx = (0.5f + (PROJ_GEOM_TOLERANCE / 3.0f)) / ibuf_xf;
+ yhalfpx = (0.5f + (PROJ_GEOM_TOLERANCE / 4.0f)) / ibuf_yf;
/* Note about (PROJ_GEOM_TOLERANCE/x) above...
* Needed to add this offset since UV coords are often quads aligned to pixels.
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 89dbe14f62a..e6c061a06ec 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -592,7 +592,7 @@ static float calc_overlap(StrokeCache *cache, const char symm, const char axis,
distsq = len_squared_v3v3(mirror, cache->true_location);
if (distsq <= 4.0f * (cache->radius_squared))
- return (2.0f * (cache->radius) - sqrtf(distsq)) / (2.0f * (cache->radius));
+ return (2.0f * (cache->radius) - sqrtf(distsq)) / (2.0f * (cache->radius));
else
return 0;
}
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index a4cf447686c..fb12ea8417a 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -805,19 +805,19 @@ int ED_file_extension_icon(const char *relname)
if (type == BLENDERFILE || type == BLENDERFILE_BACKUP)
return ICON_FILE_BLEND;
- else if (type == IMAGEFILE)
+ else if (type == IMAGEFILE)
return ICON_FILE_IMAGE;
- else if (type == MOVIEFILE)
+ else if (type == MOVIEFILE)
return ICON_FILE_MOVIE;
- else if (type == PYSCRIPTFILE)
+ else if (type == PYSCRIPTFILE)
return ICON_FILE_SCRIPT;
- else if (type == SOUNDFILE)
+ else if (type == SOUNDFILE)
return ICON_FILE_SOUND;
- else if (type == FTFONTFILE)
+ else if (type == FTFONTFILE)
return ICON_FILE_FONT;
- else if (type == BTXFILE)
+ else if (type == BTXFILE)
return ICON_FILE_BLANK;
- else if (type == COLLADAFILE)
+ else if (type == COLLADAFILE)
return ICON_FILE_BLANK;
return ICON_FILE_BLANK;
@@ -831,7 +831,7 @@ static void filelist_setfiletypes(struct FileList *filelist)
file = filelist->filelist;
for (num = 0; num < filelist->numfiles; num++, file++) {
- file->type = file->s.st_mode; /* restore the mess below */
+ file->type = file->s.st_mode; /* restore the mess below */
/* Don't check extensions for directories */
if (file->type & S_IFDIR) {
@@ -856,7 +856,7 @@ static void filelist_read_dir(struct FileList *filelist)
filelist->fidx = NULL;
filelist->filelist = NULL;
- BLI_current_working_dir(wdir, sizeof(wdir)); /* backup cwd to restore after */
+ BLI_current_working_dir(wdir, sizeof(wdir)); /* backup cwd to restore after */
BLI_cleanup_dir(G.main->name, filelist->dir);
filelist->numfiles = BLI_dir_contents(filelist->dir, &(filelist->filelist));
@@ -1108,7 +1108,7 @@ void filelist_from_library(struct FileList *filelist)
filelist_sort(filelist, FILE_SORT_ALPHA);
- BLI_strncpy(G.main->name, filename, sizeof(filename)); // prevent G.main->name to change
+ BLI_strncpy(G.main->name, filename, sizeof(filename)); /* prevent G.main->name to change */
filelist->filter = 0;
filelist_filter(filelist);
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
index f777d40dca9..a908d4aa3b8 100644
--- a/source/blender/imbuf/intern/anim_movie.c
+++ b/source/blender/imbuf/intern/anim_movie.c
@@ -551,8 +551,8 @@ static int startffmpeg(struct anim *anim)
anim->pFrameDeinterlaced = avcodec_alloc_frame();
anim->pFrameRGB = avcodec_alloc_frame();
- if (avpicture_get_size(PIX_FMT_RGBA, anim->x, anim->y)
- != anim->x * anim->y * 4)
+ if (avpicture_get_size(PIX_FMT_RGBA, anim->x, anim->y) !=
+ anim->x * anim->y * 4)
{
fprintf(stderr,
"ffmpeg has changed alloc scheme ... ARGHHH!\n");
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index 2e774e4ea84..1b42d889c1d 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -337,7 +337,7 @@ typedef struct DupliObject {
/* check if the object type supports materials */
#define OB_TYPE_SUPPORT_MATERIAL(_type) \
- ((_type) >= OB_MESH && (_type) <= OB_MBALL)
+ ((_type) >= OB_MESH && (_type) <= OB_MBALL)
#define OB_TYPE_SUPPORT_VGROUP(_type) \
(ELEM(_type, OB_MESH, OB_LATTICE))
#define OB_TYPE_SUPPORT_EDITMODE(_type) \
diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c
index ce95f9bec6e..aed8a70a805 100644
--- a/source/blender/modifiers/intern/MOD_screw.c
+++ b/source/blender/modifiers/intern/MOD_screw.c
@@ -282,10 +282,10 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
step_tot--;
if (step_tot < 3) step_tot = 3;
- maxVerts = totvert * step_tot; /* -1 because we're joining back up */
- maxEdges = (totvert * step_tot) + /* these are the edges between new verts */
- (totedge * step_tot); /* -1 because vert edges join */
- maxPolys = totedge * step_tot;
+ maxVerts = totvert * step_tot; /* -1 because we're joining back up */
+ maxEdges = (totvert * step_tot) + /* these are the edges between new verts */
+ (totedge * step_tot); /* -1 because vert edges join */
+ maxPolys = totedge * step_tot;
screw_ofs = 0.0f;
}
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c
index 931a81f2543..03bea0122cf 100644
--- a/source/blender/render/intern/source/rendercore.c
+++ b/source/blender/render/intern/source/rendercore.c
@@ -1866,7 +1866,7 @@ static void renderflare(RenderResult *rr, float *rectf, HaloRen *har)
alfa= har->alfa;
visifac= R.ycor*(har->pixels);
- /* all radials added / r^3 == 1.0f! */
+ /* all radials added / r^3 == 1.0f! */
visifac /= (har->rad*har->rad*har->rad);
visifac*= visifac;
diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c
index cbe34538bcd..b82f2f7f270 100644
--- a/source/blenderplayer/bad_level_call_stubs/stubs.c
+++ b/source/blenderplayer/bad_level_call_stubs/stubs.c
@@ -228,7 +228,7 @@ void ED_space_image_uv_sculpt_update(struct wmWindowManager *wm, struct ToolSett
void ED_screen_set_scene(struct bContext *C, struct Scene *scene) {}
void ED_space_clip_set_clip(struct bContext *C, struct SpaceClip *sc, struct MovieClip *clip) {}
-void ED_space_clip_set_mask(struct bContext *C, struct SpaceClip *sc, struct Mask *mask){}
+void ED_space_clip_set_mask(struct bContext *C, struct SpaceClip *sc, struct Mask *mask) {}
void ED_area_tag_redraw_regiontype(struct ScrArea *sa, int regiontype) {}
void ED_render_engine_changed(struct Main *bmain) {}