code cleanup:
authorCampbell Barton <ideasman42@gmail.com>
Mon, 25 Mar 2013 02:41:30 +0000 (02:41 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 25 Mar 2013 02:41:30 +0000 (02:41 +0000)
- remove unused defines.
- quiet some shadow warnings.
- bevel, ifdef out some asserts that are too common.
- style

34 files changed:
intern/ghost/intern/GHOST_WindowX11.cpp
source/blender/blenkernel/BKE_brush.h
source/blender/blenkernel/intern/brush.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/bmesh/tools/bmesh_bevel.c
source/blender/collada/collada_utils.cpp
source/blender/compositor/operations/COM_CompositorOperation.cpp
source/blender/editors/sculpt_paint/paint_image_2d.c
source/blender/editors/sculpt_paint/paint_stroke.c
source/blender/editors/space_file/file_ops.c
source/blender/editors/uvedit/uvedit_smart_stitch.c
source/blender/imbuf/intern/anim_movie.c
source/blender/imbuf/intern/colormanagement.c
source/blender/python/intern/bpy_app_ffmpeg.c
source/blender/python/intern/bpy_library.c
source/gameengine/Converter/BL_ActionActuator.cpp
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Converter/BL_ShapeActionActuator.cpp
source/gameengine/Expressions/Value.cpp
source/gameengine/GameLogic/SCA_LogicManager.cpp
source/gameengine/Ketsji/KX_FontObject.cpp
source/gameengine/VideoTexture/Exception.cpp
source/gameengine/VideoTexture/FilterBase.cpp
source/gameengine/VideoTexture/FilterBlueScreen.cpp
source/gameengine/VideoTexture/FilterColor.cpp
source/gameengine/VideoTexture/FilterNormal.cpp
source/gameengine/VideoTexture/ImageBase.cpp
source/gameengine/VideoTexture/ImageBuff.cpp
source/gameengine/VideoTexture/ImageMix.cpp
source/gameengine/VideoTexture/ImageRender.cpp
source/gameengine/VideoTexture/ImageViewport.cpp
source/gameengine/VideoTexture/Texture.cpp
source/gameengine/VideoTexture/VideoBase.cpp
source/gameengine/VideoTexture/VideoFFmpeg.cpp

index 6c17e9e715950da99cb4e9d9ab05ec603944cbba..20855a126a8cae04cac61c5c72c16d767d83de15 100644 (file)
@@ -94,8 +94,6 @@ typedef struct {
  */
 
 /* See the python script above to regenerate the 48x48 icon within blender */
-#define BLENDER_ICON_WIDTH 48
-#define BLENDER_ICON_HEIGHT 48
 static long BLENDER_ICON_48x48x32[] = {
        48,48,
        4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303, 4671303,
index e123a0a94c06ade01f0ebb603dca8be382dece0d..23e96732386163392084ca2245988a881db66712 100644 (file)
@@ -78,8 +78,8 @@ float BKE_brush_sample_tex_3D(const Scene *scene, struct Brush *br, const float
                               float rgba[4], const int thread, struct ImagePool *pool);
 float BKE_brush_sample_tex_2D(const struct Scene *scene, struct Brush *brush, const float xy[2],
                               float rgba[4]);
-float BKE_brush_sample_masktex (const Scene *scene, struct Brush *br,const float point[3],
-                              const int thread, struct ImagePool *pool);
+float BKE_brush_sample_masktex(const Scene *scene, struct Brush *br, const float point[3],
+                               const int thread, struct ImagePool *pool);
 void BKE_brush_imbuf_new(const struct Scene *scene, struct Brush *brush, short flt, short texfalloff, int size,
                          struct ImBuf **imbuf, int use_color_correction);
 
index 7700538af28ec555fe2e6e43b203ed3dacedd607..18edb6e3500afff46599162f9c8470c0b2341be4 100644 (file)
@@ -585,10 +585,11 @@ float BKE_brush_sample_tex_3D(const Scene *scene, Brush *br,
        return intensity;
 }
 
-float BKE_brush_sample_masktex (const Scene *scene, Brush *br,
-                              const float point[3],
-                              const int thread,
-                              struct ImagePool *pool) {
+float BKE_brush_sample_masktex(const Scene *scene, Brush *br,
+                               const float point[3],
+                               const int thread,
+                               struct ImagePool *pool)
+{
        UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings;
        MTex *mtex = &br->mask_mtex;
 
index 4e05595b93ab0be86bca5b8f8e2735cfab2b5fa8..5dfaba2ea93af74ef34b981ecc1bb4308c3f764e 100644 (file)
@@ -520,7 +520,7 @@ static int subframe_updateObject(Scene *scene, Object *ob, int flags, int parent
 
        /* if object has parents, update them too */
        if (parent_recursion) {
-               int recursion = parent_recursion-1;
+               int recursion = parent_recursion - 1;
                int is_canvas = 0;
                if (ob->parent) is_canvas += subframe_updateObject(scene, ob->parent, 0, recursion, frame);
                if (ob->track) is_canvas += subframe_updateObject(scene, ob->track, 0, recursion, frame);
index f685b7411760de19b35c31b831ea0b7643eb09e1..525bf3a2da783a05509d077fc98ac7d152a517d2 100644 (file)
 #include "bmesh.h"
 #include "./intern/bmesh_private.h"
 
-
-
 #define BEVEL_EPSILON_D  1e-6
 #define BEVEL_EPSILON    1e-6f
 
+/* happens far too often, uncomment for development */
+// #define BEVEL_ASSERT_PROJECT
+
 /* for testing */
 // #pragma GCC diagnostic error "-Wpadded"
 
@@ -369,7 +370,9 @@ static void offset_meet(EdgeHalf *e1, EdgeHalf *e2, BMVert *v, BMFace *f,
 
                /* intersect the lines; by construction they should be on the same plane and not parallel */
                if (!isect_line_line_v3(off1a, off1b, off2a, off2b, meetco, isect2)) {
+#ifdef BEVEL_ASSERT_PROJECT
                        BLI_assert(!"offset_meet failure");
+#endif
                        copy_v3_v3(meetco, off1a);  /* just to do something */
                }
        }
@@ -485,7 +488,9 @@ static void project_to_edge(BMEdge *e, const float co_a[3], const float co_b[3],
        float otherco[3];
 
        if (!isect_line_line_v3(e->v1->co, e->v2->co, co_a, co_b, projco, otherco)) {
+#ifdef BEVEL_ASSERT_PROJECT
                BLI_assert(!"project meet failure");
+#endif
                copy_v3_v3(projco, e->v1->co);
        }
 }
index 84b81f4d332a6b3d233678b84f90a8413ddd266c..9aa1f7b97147cad689adc1958c3abf3a1e08d6b1 100644 (file)
@@ -327,8 +327,8 @@ std::string bc_replace_string(std::string data, const std::string& pattern,
  */
 void bc_match_scale(std::vector<Object *> *objects_done, 
                     Scene &sce,
-                    UnitConverter &bc_unit) {
-
+                    UnitConverter &bc_unit)
+{
        Object *ob = NULL;
 
        PointerRNA scene_ptr, unit_settings;
index 56527da47bc89c8002ab79e181dbcefc824e560d..f46aae9e455f2763682a0097f9d5d517525b7a0e 100644 (file)
@@ -175,8 +175,8 @@ void CompositorOperation::executeRegion(rcti *rect, unsigned int tileNumber)
                                        Full frame
                 */
 
-               int full_width = rd->xsch * rd->size / 100;
-               int full_height =rd->ysch * rd->size / 100;
+               int full_width  = rd->xsch * rd->size / 100;
+               int full_height = rd->ysch * rd->size / 100;
 
                dx = rd->border.xmin * full_width - (full_width - this->getWidth()) / 2.0f;
                dy = rd->border.ymin * full_height - (full_height - this->getHeight()) / 2.0f;
index 90a2c8037c4fea4709cfef13754a3a2b18ad188a..9bc232c6a61d347f0a294cae9b80972069deb78a 100644 (file)
@@ -793,7 +793,7 @@ void *paint_2d_new_stroke(bContext *C, wmOperator *op)
        return s;
 }
 
-void paint_2d_redraw (const bContext *C, void *ps, int final)
+void paint_2d_redraw(const bContext *C, void *ps, int final)
 {
        ImagePaintState *s = ps;
 
index 859d8d76f15534aad810268d3b9e205e8bd88f4f..d7e2d010f033b3c0ddf128d9ae9167e3e80f56fb 100644 (file)
@@ -179,7 +179,7 @@ static void paint_brush_update(bContext *C, Brush *brush, PaintMode mode,
                    SCULPT_TOOL_THUMB, SCULPT_TOOL_ROTATE)))
        {
                if (((brush->mtex.brush_map_mode == MTEX_MAP_MODE_VIEW) ||
-                       (brush->mtex.brush_map_mode == MTEX_MAP_MODE_RANDOM)) &&
+                   (brush->mtex.brush_map_mode == MTEX_MAP_MODE_RANDOM)) &&
                    !(brush->flag & BRUSH_RAKE))
                {
                        if (brush->flag & BRUSH_RANDOM_ROTATION)
@@ -191,7 +191,8 @@ static void paint_brush_update(bContext *C, Brush *brush, PaintMode mode,
                if ((brush->mtex.brush_map_mode == MTEX_MAP_MODE_RANDOM)) {
                        ups->tex_mouse[0] = BLI_frand() * stroke->vc.ar->sizex;
                        ups->tex_mouse[1] = BLI_frand() * stroke->vc.ar->sizey;;
-               } else {
+               }
+               else {
                        copy_v2_v2(ups->tex_mouse, mouse);
                }
        }
index ba931b05214c3d121ea3b113e17e96160d4d0bf3..e3270d9ce8e02cf165cb545462238af10f07d2bd 100644 (file)
@@ -1460,23 +1460,22 @@ static int file_delete_poll(bContext *C)
 {
        int poll = ED_operator_file_active(C);
        SpaceFile *sfile = CTX_wm_space_file(C);
-       struct direntry *file;
 
-       if (sfile && sfile->params) {           
+       if (sfile && sfile->params) {
                char dir[FILE_MAX], group[FILE_MAX];
                int numfiles = filelist_numfiles(sfile->files);
                int i;
                int num_selected = 0;
 
                if (filelist_islibrary(sfile->files, dir, group)) poll = 0;
-               for (i = 0; i < numfiles; i++) {                                
+               for (i = 0; i < numfiles; i++) {
                        if (filelist_is_selected(sfile->files, i, CHECK_FILES)) {
                                num_selected++;
                        }
                }
                if (num_selected <= 0) {
                        poll = 0;
-               }               
+               }
        }
        else
                poll = 0;
index 4c56a016176a99823361784b09a5c56524b1b1c2..8f8c5b8e03c37a049dbc3a62e20a6b31d63dd621 100644 (file)
@@ -754,7 +754,8 @@ static void stitch_set_face_preview_buffer_position(BMFace *efa, StitchPreviewer
 
 /* setup face preview for all coincident uvs and their faces */
 static void stitch_setup_face_preview_for_uv_group(UvElement *element, StitchState *state, IslandStitchData *island_stitch_data,
-                                                   PreviewPosition *preview_position) {
+                                                   PreviewPosition *preview_position)
+{
        StitchPreviewer *preview = state->stitch_preview;
 
        /* static island does not change so returning immediately */
@@ -774,7 +775,8 @@ static void stitch_setup_face_preview_for_uv_group(UvElement *element, StitchSta
 
 /* checks if uvs are indeed stitchable and registers so that they can be shown in preview */
 static void stitch_validate_uv_stichability(UvElement *element, StitchState *state, IslandStitchData *island_stitch_data,
-                                         PreviewPosition *preview_position) {
+                                            PreviewPosition *preview_position)
+{
        UvElement *element_iter;
        StitchPreviewer *preview = state->stitch_preview;
        int vert_index;
@@ -809,7 +811,8 @@ static void stitch_validate_uv_stichability(UvElement *element, StitchState *sta
 
 
 static void stitch_validate_edge_stichability(UvEdge *edge, StitchState *state, IslandStitchData *island_stitch_data,
-                                              PreviewPosition *preview_position) {
+                                              PreviewPosition *preview_position)
+{
        UvEdge *edge_iter = edge->first;
        StitchPreviewer *preview = state->stitch_preview;
 
index 4ef1f962a0f284e4e4a6d465aae5b39d9e81c02e..7f25d9b1d257a7fdabbd2f959fa529e03afa9cad 100644 (file)
@@ -946,7 +946,8 @@ static int ffmpeg_seek_by_byte(AVFormatContext *pFormatCtx)
 }
 
 static ImBuf *ffmpeg_fetchibuf(struct anim *anim, int position,
-                               IMB_Timecode_Type tc) {
+                               IMB_Timecode_Type tc)
+{
        int64_t pts_to_search = 0;
        double frame_rate;
        double pts_time_base;
@@ -1303,7 +1304,8 @@ struct ImBuf *IMB_anim_previewframe(struct anim *anim)
 
 struct ImBuf *IMB_anim_absolute(struct anim *anim, int position,
                                 IMB_Timecode_Type tc,
-                                IMB_Proxy_Size preview_size) {
+                                IMB_Proxy_Size preview_size)
+{
        struct ImBuf *ibuf = NULL;
        char head[256], tail[256];
        unsigned short digits;
index aa3dd05dbd1f8bd274572f11abad545a92b4dc93..65a3db839a99900d668a21c3ffa0700f4aaed760 100644 (file)
@@ -2401,15 +2401,15 @@ void IMB_colormanagement_colorspace_items_add(EnumPropertyItem **items, int *tot
 static void partial_buffer_update_rect(ImBuf *ibuf, unsigned char *display_buffer, const float *linear_buffer,
                                        const unsigned char *byte_buffer, int display_stride, int linear_stride,
                                        int linear_offset_x, int linear_offset_y, ColormanageProcessor *cm_processor,
-                                       int xmin, int ymin, int xmax, int ymax)
+                                       const int xmin, const int ymin, const int xmax, const int ymax)
 {
        int x, y;
        int channels = ibuf->channels;
        float dither = ibuf->dither;
        ColorSpace *rect_colorspace = ibuf->rect_colorspace;
        float *display_buffer_float = NULL;
-       int width = xmax - xmin;
-       int height = ymax - ymin;
+       const int width = xmax - xmin;
+       const int height = ymax - ymin;
        int is_data = ibuf->colormanage_flag & IMB_COLORMANAGE_IS_DATA;
 
        if (dither != 0.0f) {
@@ -2467,7 +2467,7 @@ static void partial_buffer_update_rect(ImBuf *ibuf, unsigned char *display_buffe
                                                   width, height, width, display_stride);
                }
                else {
-                       int i, width = xmax - xmin;
+                       int i;
 
                        for (i = ymin; i < ymax; i++) {
                                int byte_offset = (linear_stride * i + xmin) * 4;
index 3bf3dec3872e22513353d6c51c46ea3bb76ca45e..61e12c1cea0dc7b0fae0fa5fc88f52574a44143c 100644 (file)
@@ -81,8 +81,10 @@ static PyObject *make_ffmpeg_info(void)
 #define SetIntItem(flag) \
        PyStructSequence_SET_ITEM(ffmpeg_info, pos++, PyLong_FromLong(flag))
 #endif
+#ifndef WITH_FFMPEG
 #define SetStrItem(str) \
        PyStructSequence_SET_ITEM(ffmpeg_info, pos++, PyUnicode_FromString(str))
+#endif
 #define SetObjItem(obj) \
        PyStructSequence_SET_ITEM(ffmpeg_info, pos++, obj)
 
index 3f66fb7b3370a59438f4dc7f4e794d8756550e6d..623d45dfd90025757f63af0bacdfeede6c95b446 100644 (file)
@@ -330,10 +330,10 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args))
        mainl = BLO_library_append_begin(bmain, &(self->blo_handle), self->relpath);
 
        {
-               int i = 0, code;
-               while ((code = BKE_idcode_iter_step(&i))) {
-                       if (BKE_idcode_is_linkable(code)) {
-                               const char *name_plural = BKE_idcode_to_name_plural(code);
+               int idcode_step = 0, idcode;
+               while ((idcode = BKE_idcode_iter_step(&idcode_step))) {
+                       if (BKE_idcode_is_linkable(idcode)) {
+                               const char *name_plural = BKE_idcode_to_name_plural(idcode);
                                PyObject *ls = PyDict_GetItemString(self->dict, name_plural);
                                // printf("lib: %s\n", name_plural);
                                if (ls && PyList_Check(ls)) {
@@ -350,7 +350,7 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args))
                                                // printf("  %s\n", item_str);
 
                                                if (item_str) {
-                                                       ID *id = BLO_library_append_named_part(mainl, &(self->blo_handle), item_str, code);
+                                                       ID *id = BLO_library_append_named_part(mainl, &(self->blo_handle), item_str, idcode);
                                                        if (id) {
 #ifdef USE_RNA_DATABLOCKS
                                                                PointerRNA id_ptr;
index 0bd09146f3aa778acf366d834b06a1764fb50377..2918ec8bce7c0ae110861a04d2a57a551020f7de 100644 (file)
@@ -123,7 +123,7 @@ void BL_ActionActuator::ProcessReplica()
        
 }
 
-void BL_ActionActuator::SetBlendTime (float newtime)
+void BL_ActionActuator::SetBlendTime(float newtime)
 {
        m_blendframe = newtime;
 }
index c5dea5d0b43c0b4ed6bb1abca63f1e1c2b1a9fea..dcf99502a3e67e3508efb5b241b23ab0b309202a 100644 (file)
@@ -2107,7 +2107,7 @@ struct parentChildLink {
 #include "DNA_constraint_types.h"
 //XXX #include "BIF_editconstraint.h"
 
-static bPoseChannel *get_active_posechannel2 (Object *ob)
+static bPoseChannel *get_active_posechannel2(Object *ob)
 {
        bArmature *arm= (bArmature*)ob->data;
        bPoseChannel *pchan;
index 4806ed04cc67858691a341e733dc8a0ad4f2d96b..67712c683f96f5b110ff5cf593dc73745caf461f 100644 (file)
@@ -105,7 +105,7 @@ void BL_ShapeActionActuator::ProcessReplica()
        m_lastUpdate=-1;
 }
 
-void BL_ShapeActionActuator::SetBlendTime (float newtime)
+void BL_ShapeActionActuator::SetBlendTime(float newtime)
 {
        m_blendframe = newtime;
 }
index 706cfc13ca3962c19d7db29b68efc3559d228a49..7b20b4b2d97ac38af9267f153ad79e484b7c740e 100644 (file)
@@ -144,7 +144,7 @@ effect: deletes the object
 #define VALUE_POS(val1)       (val1)->Calc(VALUE_POS_OPERATOR, val1)
 
 
-STR_String CValue::op2str (VALUE_OPERATOR op)
+STR_String CValue::op2str(VALUE_OPERATOR op)
 {
        //pre:
        //ret: the stringrepresentation of operator op
index 1263514d475c4551ffbee41d6eb205e9edc0b58e..adf57dec278c7744ecc143f95a90adc77d47c3e0 100644 (file)
@@ -249,7 +249,7 @@ void SCA_LogicManager::UpdateFrame(double curtime, bool frame)
 
 
 
-void* SCA_LogicManager::GetActionByName (const STR_String& actname)
+void *SCA_LogicManager::GetActionByName(const STR_String& actname)
 {
        STR_HashedString an = actname;
        void** actptr = m_mapStringToActions[an];
index 138124f9b1ad1417ebb77453a8d612475556ad60..95798900ccc1926cf1ad21d0f20b1575dc99ec04 100644 (file)
@@ -117,7 +117,7 @@ void KX_FontObject::ProcessReplica()
        KX_GetActiveScene()->AddFont(this);
 }
 
-int GetFontId (VFont *vfont)
+int GetFontId(VFont *vfont)
 {
        PackedFile *packedfile=NULL;
        int fontid = -1;
index 8b8918d8141a8af7a1bd085e983f32cc5f26a95f..89d95d26971ae997b57d0a1c7e15d6e4d31cfc60 100644 (file)
@@ -40,8 +40,8 @@
 ExceptionID ErrGeneral, ErrNotFound;
 
 // exception descriptions
-ExpDesc errGenerDesc (ErrGeneral, "General Error");
-ExpDesc errNFoundDesc (ErrNotFound, "Error description not found");
+ExpDesc errGenerDesc(ErrGeneral, "General Error");
+ExpDesc errNFoundDesc(ErrNotFound, "Error description not found");
 
 
 
index a232bcc12010e04397caec3c635a5b1df0881edd..66552cde928171d65404762f6633cfb3d11db8a3 100644 (file)
@@ -105,7 +105,7 @@ PyObject *Filter_allocNew (PyTypeObject *type, PyObject *args, PyObject *kwds)
 }
 
 // object deallocation
-void Filter_dealloc (PyFilter *self)
+void Filter_dealloc(PyFilter *self)
 {
        // release object attributes
        if (self->m_filter != NULL)
@@ -139,7 +139,7 @@ PyObject *Filter_getPrevious (PyFilter *self, void *closure)
 
 
 // set previous pixel filter object
-int Filter_setPrevious (PyFilter *self, PyObject *value, void *closure)
+int Filter_setPrevious(PyFilter *self, PyObject *value, void *closure)
 {
        // if filter object is available
        if (self->m_filter != NULL)
index 662ecabd283514b2a3454f3f71210d49ac2f7fcc..857da12c28de1869641029a3984cb9f9d756e0be 100644 (file)
@@ -84,7 +84,7 @@ static PyObject *getColor (PyFilter *self, void *closure)
 }
 
 // set color
-static int setColor (PyFilter *self, PyObject *value, void *closure)
+static int setColor(PyFilter *self, PyObject *value, void *closure)
 {
        // check validity of parameter
        if (value == NULL ||
@@ -114,7 +114,7 @@ static PyObject *getLimits (PyFilter *self, void *closure)
 }
 
 // set limit
-static int setLimits (PyFilter *self, PyObject *value, void *closure)
+static int setLimits(PyFilter *self, PyObject *value, void *closure)
 {
        // check validity of parameter
        if (value == NULL ||
index e4101b5587d22bbddd7e492d0927f8add28b3c6f..5efb59efe4cbd46dcb29d5072d5d0bdb821dea81 100644 (file)
@@ -130,7 +130,7 @@ static PyObject *getMatrix (PyFilter *self, void *closure)
 }
 
 // set color matrix
-static int setMatrix (PyFilter *self, PyObject *value, void *closure)
+static int setMatrix(PyFilter *self, PyObject *value, void *closure)
 {
        // matrix to store items
        ColorMatrix mat;
@@ -263,7 +263,7 @@ static PyObject *getLevels (PyFilter *self, void *closure)
 }
 
 // set color levels
-static int setLevels (PyFilter *self, PyObject *value, void *closure)
+static int setLevels(PyFilter *self, PyObject *value, void *closure)
 {
        // matrix to store items
        ColorLevel lev;
index ba963d9307954bc645e35cf7d405dc3eee2ec44c..78a09f8afac09715e6c772cd2c6afe5f9e5fd2f9 100644 (file)
@@ -76,7 +76,7 @@ static PyObject *getColor (PyFilter *self, void *closure)
 }
 
 // set index of color used to calculate normal
-static int setColor (PyFilter *self, PyObject *value, void *closure)
+static int setColor(PyFilter *self, PyObject *value, void *closure)
 {
        // check validity of parameter
        if (value == NULL || !PyLong_Check(value))
@@ -98,7 +98,7 @@ static PyObject *getDepth (PyFilter *self, void *closure)
 }
 
 // set depth
-static int setDepth (PyFilter *self, PyObject *value, void *closure)
+static int setDepth(PyFilter *self, PyObject *value, void *closure)
 {
        // check validity of parameter
        if (value)
index 3b6dec21e5232a49a3a14c8111587f6b1267119d..4745ce784c02469cd12c668cb57cb7c3e3bcc3ca 100644 (file)
@@ -182,8 +182,8 @@ void ImageBase::setFilter (PyFilter * filt)
 ExceptionID ImageHasExports;
 ExceptionID InvalidColorChannel;
 
-ExpDesc ImageHasExportsDesc (ImageHasExports, "Image has exported buffers, cannot resize");
-ExpDesc InvalidColorChannelDesc (InvalidColorChannel, "Invalid or too many color channels specified. At most 4 values within R, G, B, A, 0, 1");
+ExpDesc ImageHasExportsDesc(ImageHasExports, "Image has exported buffers, cannot resize");
+ExpDesc InvalidColorChannelDesc(InvalidColorChannel, "Invalid or too many color channels specified. At most 4 values within R, G, B, A, 0, 1");
 
 // initialize image data
 void ImageBase::init (short width, short height)
@@ -375,7 +375,7 @@ PyObject *Image_allocNew (PyTypeObject *type, PyObject *args, PyObject *kwds)
 }
 
 // object deallocation
-void Image_dealloc (PyImage *self)
+void Image_dealloc(PyImage *self)
 {
        // release object attributes
        if (self->m_image != NULL)
@@ -514,7 +514,7 @@ PyObject *Image_getScale (PyImage *self, void *closure)
 }
 
 // set scale
-int Image_setScale (PyImage *self, PyObject *value, void *closure)
+int Image_setScale(PyImage *self, PyObject *value, void *closure)
 {
        // check parameter, report failure
        if (value == NULL || !PyBool_Check(value))
@@ -536,7 +536,7 @@ PyObject *Image_getFlip (PyImage *self, void *closure)
 }
 
 // set flip
-int Image_setFlip (PyImage *self, PyObject *value, void *closure)
+int Image_setFlip(PyImage *self, PyObject *value, void *closure)
 {
        // check parameter, report failure
        if (value == NULL || !PyBool_Check(value))
@@ -558,7 +558,7 @@ PyObject * Image_getZbuff (PyImage * self, void * closure)
 }
 
 // set zbuff
-int Image_setZbuff (PyImage * self, PyObject * value, void * closure)
+int Image_setZbuff(PyImage *self, PyObject *value, void *closure)
 {
        // check parameter, report failure
        if (value == NULL || !PyBool_Check(value))
@@ -580,7 +580,7 @@ PyObject * Image_getDepth (PyImage * self, void * closure)
 }
 
 // set depth
-int Image_setDepth (PyImage * self, PyObject * value, void * closure)
+int Image_setDepth(PyImage *self, PyObject *value, void *closure)
 {
        // check parameter, report failure
        if (value == NULL || !PyBool_Check(value))
@@ -678,7 +678,7 @@ PyObject *Image_getFilter (PyImage *self, void *closure)
 
 
 // set pixel filter object
-int Image_setFilter (PyImage *self, PyObject *value, void *closure)
+int Image_setFilter(PyImage *self, PyObject *value, void *closure)
 {
        // if image object is available
        if (self->m_image != NULL)
index 1593a08bb4b4c3b0a20e18ec08684cfc31b004f4..80ad9b40c240068d781027b95b3916f6d0abed9d 100644 (file)
@@ -51,7 +51,7 @@ FilterRGB24 defFilter;
 // forward declaration;
 extern PyTypeObject ImageBuffType;
 
-static int ImageBuff_init (PyObject *pySelf, PyObject *args, PyObject *kwds)
+static int ImageBuff_init(PyObject *pySelf, PyObject *args, PyObject *kwds)
 {
        short width = -1;
        short height = -1;
index 27c4fed6fe61c83a8b02613e3e6effffead98c38..ee6e16d0a86a6123cec6de9f5c918f4046e8f87d 100644 (file)
@@ -69,7 +69,7 @@ bool ImageMix::setWeight (const char * id, short weight)
 
 ExceptionID ImageSizesNotMatch;
 
-ExpDesc ImageSizesNotMatchDesc (ImageSizesNotMatch, "Image sizes of sources are different");
+ExpDesc ImageSizesNotMatchDesc(ImageSizesNotMatch, "Image sizes of sources are different");
 
 // calculate image from sources and set its availability
 void ImageMix::calcImage (unsigned int texId, double ts)
index f778f84086442af2abb20c7d89503624658bf8c4..0b34824fd082510931c1a8137da9f875852b6130 100644 (file)
 
 ExceptionID SceneInvalid, CameraInvalid, ObserverInvalid;
 ExceptionID MirrorInvalid, MirrorSizeInvalid, MirrorNormalInvalid, MirrorHorizontal, MirrorTooSmall;
-ExpDesc SceneInvalidDesc (SceneInvalid, "Scene object is invalid");
-ExpDesc CameraInvalidDesc (CameraInvalid, "Camera object is invalid");
-ExpDesc ObserverInvalidDesc (ObserverInvalid, "Observer object is invalid");
-ExpDesc MirrorInvalidDesc (MirrorInvalid, "Mirror object is invalid");
-ExpDesc MirrorSizeInvalidDesc (MirrorSizeInvalid, "Mirror has no vertex or no size");
-ExpDesc MirrorNormalInvalidDesc (MirrorNormalInvalid, "Cannot determine mirror plane");
-ExpDesc MirrorHorizontalDesc (MirrorHorizontal, "Mirror is horizontal in local space");
-ExpDesc MirrorTooSmallDesc (MirrorTooSmall, "Mirror is too small");
+ExpDesc SceneInvalidDesc(SceneInvalid, "Scene object is invalid");
+ExpDesc CameraInvalidDesc(CameraInvalid, "Camera object is invalid");
+ExpDesc ObserverInvalidDesc(ObserverInvalid, "Observer object is invalid");
+ExpDesc MirrorInvalidDesc(MirrorInvalid, "Mirror object is invalid");
+ExpDesc MirrorSizeInvalidDesc(MirrorSizeInvalid, "Mirror has no vertex or no size");
+ExpDesc MirrorNormalInvalidDesc(MirrorNormalInvalid, "Cannot determine mirror plane");
+ExpDesc MirrorHorizontalDesc(MirrorHorizontal, "Mirror is horizontal in local space");
+ExpDesc MirrorTooSmallDesc(MirrorTooSmall, "Mirror is too small");
 
 // constructor
 ImageRender::ImageRender (KX_Scene * scene, KX_Camera * camera) : 
@@ -294,7 +294,7 @@ BlendType<KX_Camera> cameraType ("KX_Camera");
 
 
 // object initialization
-static int ImageRender_init (PyObject *pySelf, PyObject *args, PyObject *kwds)
+static int ImageRender_init(PyObject *pySelf, PyObject *args, PyObject *kwds)
 {
        // parameters - scene object
        PyObject *scene;
@@ -347,7 +347,7 @@ static PyObject *getBackground (PyImage *self, void *closure)
 }
 
 // set color
-static int setBackground (PyImage *self, PyObject *value, void *closure)
+static int setBackground(PyImage *self, PyObject *value, void *closure)
 {
        // check validity of parameter
        if (value == NULL || !PySequence_Check(value) || PySequence_Size(value) != 4
@@ -441,7 +441,7 @@ PyTypeObject ImageRenderType =
 };
 
 // object initialization
-static int ImageMirror_init (PyObject *pySelf, PyObject *args, PyObject *kwds)
+static int ImageMirror_init(PyObject *pySelf, PyObject *args, PyObject *kwds)
 {
        // parameters - scene object
        PyObject *scene;
@@ -523,7 +523,7 @@ static PyObject *getClip (PyImage *self, void *closure)
 }
 
 // set clip
-static int setClip (PyImage *self, PyObject *value, void *closure)
+static int setClip(PyImage *self, PyObject *value, void *closure)
 {
        // check validity of parameter
        double clip;
index 5fc388bdefb6ea54e90cf8316d80d2c3380e9883..19d0289be200f5ddbab7159ff1214646b5d4f0cd 100644 (file)
@@ -210,7 +210,7 @@ PyObject *ImageViewport_getWhole (PyImage *self, void *closure)
 }
 
 // set whole
-int ImageViewport_setWhole (PyImage *self, PyObject *value, void *closure)
+int ImageViewport_setWhole(PyImage *self, PyObject *value, void *closure)
 {
        // check parameter, report failure
        if (value == NULL || !PyBool_Check(value))
@@ -240,7 +240,7 @@ PyObject *ImageViewport_getAlpha (PyImage *self, void *closure)
 }
 
 // set whole
-int ImageViewport_setAlpha (PyImage *self, PyObject *value, void *closure)
+int ImageViewport_setAlpha(PyImage *self, PyObject *value, void *closure)
 {
        // check parameter, report failure
        if (value == NULL || !PyBool_Check(value))
@@ -266,7 +266,7 @@ static PyObject *ImageViewport_getPosition (PyImage *self, void *closure)
 }
 
 // set position
-static int ImageViewport_setPosition (PyImage *self, PyObject *value, void *closure)
+static int ImageViewport_setPosition(PyImage *self, PyObject *value, void *closure)
 {
        // check validity of parameter
        if (value == NULL ||
@@ -299,7 +299,7 @@ PyObject *ImageViewport_getCaptureSize (PyImage *self, void *closure)
 }
 
 // set capture size
-int ImageViewport_setCaptureSize (PyImage *self, PyObject *value, void *closure)
+int ImageViewport_setCaptureSize(PyImage *self, PyObject *value, void *closure)
 {
        // check validity of parameter
        if (value == NULL ||
index 98d36d19ddfc08b1e6b3b810b9bb0ce1c5b3c81e..ebad7a924371cf9fe76ba601590d6800c797b3cf 100644 (file)
@@ -68,8 +68,8 @@ BlendType<KX_LightObject> lightObjectType ("KX_LightObject");
 
 
 // load texture
-void loadTexture (unsigned int texId, unsigned int * texture, short * size,
-                                 bool mipmap)
+void loadTexture(unsigned int texId, unsigned int *texture, short *size,
+                 bool mipmap)
 {
        // load texture for rendering
        glBindTexture(GL_TEXTURE_2D, texId);
@@ -171,8 +171,8 @@ static PyObject *Texture_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 
 
 // forward declaration
-PyObject *Texture_close(Texture * self);
-int Texture_setSource (Texture * self, PyObject *value, void *closure);
+PyObject *Texture_close(Texture *self);
+int Texture_setSource(Texture *self, PyObject *value, void *closure);
 
 
 // Texture object deallocation
@@ -191,7 +191,7 @@ static void Texture_dealloc(Texture *self)
 
 
 ExceptionID MaterialNotAvail;
-ExpDesc MaterialNotAvailDesc (MaterialNotAvail, "Texture material is not available");
+ExpDesc MaterialNotAvailDesc(MaterialNotAvail, "Texture material is not available");
 
 // Texture object initialization
 static int Texture_init(Texture *self, PyObject *args, PyObject *kwds)
@@ -439,7 +439,7 @@ static PyObject *Texture_getSource(Texture *self, PyObject *value, void *closure
 
 
 // set source object
-int Texture_setSource (Texture * self, PyObject *value, void *closure)
+int Texture_setSource(Texture *self, PyObject *value, void *closure)
 {
        // check new value
        if (value == NULL || !pyImageTypes.in(Py_TYPE(value)))
index 576e358fe75278f3f455d674f69c6b24996bd263..edf03dea484f787bf96b4bf54829fe96b07e22bb 100644 (file)
@@ -102,11 +102,11 @@ void VideoBase::process (BYTE * sample)
 
 // exceptions for video source initialization
 ExceptionID SourceVideoEmpty, SourceVideoCreation;
-ExpDesc SourceVideoEmptyDesc (SourceVideoEmpty, "Source Video is empty");
-ExpDesc SourceVideoCreationDesc (SourceVideoCreation, "SourceVideo object was not created");
+ExpDesc SourceVideoEmptyDesc(SourceVideoEmpty, "Source Video is empty");
+ExpDesc SourceVideoCreationDesc(SourceVideoCreation, "SourceVideo object was not created");
 
 // open video source
-void Video_open (VideoBase * self, char * file, short captureID)
+void Video_open(VideoBase * self, char * file, short captureID)
 {
        // if file is empty, throw exception
        if (file == NULL) THRWEXCP(SourceVideoEmpty, S_OK);
index 93a1d09869bdddfd1e516554974ad733ba86e0c4..4e584cc89ad7fab57025f2fbcd731d2f7898ad09 100644 (file)
@@ -1085,7 +1085,7 @@ inline VideoFFmpeg * getVideoFFmpeg (PyImage *self)
 
 
 // object initialization
-static int VideoFFmpeg_init (PyObject *pySelf, PyObject *args, PyObject *kwds)
+static int VideoFFmpeg_init(PyObject *pySelf, PyObject *args, PyObject *kwds)
 {
        PyImage *self = reinterpret_cast<PyImage*>(pySelf);
        // parameters - video source
@@ -1243,7 +1243,7 @@ PyTypeObject VideoFFmpegType =
 };
 
 // object initialization
-static int ImageFFmpeg_init (PyObject *pySelf, PyObject *args, PyObject *kwds)
+static int ImageFFmpeg_init(PyObject *pySelf, PyObject *args, PyObject *kwds)
 {
        PyImage *self = reinterpret_cast<PyImage*>(pySelf);
        // parameters - video source