style cleanup: mainly for mesh code, also some WM function use.
authorCampbell Barton <ideasman42@gmail.com>
Sat, 24 Mar 2012 02:51:46 +0000 (02:51 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 24 Mar 2012 02:51:46 +0000 (02:51 +0000)
143 files changed:
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/camera.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/scene.c
source/blender/blenloader/intern/readfile.c
source/blender/bmesh/intern/bmesh_inline.h
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/anim_markers.c
source/blender/editors/animation/anim_ops.c
source/blender/editors/animation/fmodifier_ui.c
source/blender/editors/armature/armature_ops.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/editarmature_sketch.c
source/blender/editors/curve/curve_ops.c
source/blender/editors/gpencil/drawgpencil.c
source/blender/editors/gpencil/gpencil_ops.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_draw.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_panel.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/interface/interface_style.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/interface_utils.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/interface/view2d.c
source/blender/editors/interface/view2d_ops.c
source/blender/editors/mesh/editmesh_add.c
source/blender/editors/mesh/editmesh_bvh.c
source/blender/editors/mesh/editmesh_knife.c
source/blender/editors/mesh/editmesh_loopcut.c
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/mesh_navmesh.c
source/blender/editors/mesh/mesh_ops.c
source/blender/editors/metaball/mball_edit.c
source/blender/editors/metaball/mball_ops.c
source/blender/editors/object/object_ops.c
source/blender/editors/physics/physics_ops.c
source/blender/editors/render/render_internal.c
source/blender/editors/render/render_preview.c
source/blender/editors/render/render_view.c
source/blender/editors/screen/area.c
source/blender/editors/screen/glutil.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/sculpt_paint/paint_hide.c
source/blender/editors/sculpt_paint/paint_ops.c
source/blender/editors/space_action/action_draw.c
source/blender/editors/space_action/action_edit.c
source/blender/editors/space_action/action_ops.c
source/blender/editors/space_action/action_select.c
source/blender/editors/space_action/space_action.c
source/blender/editors/space_buttons/buttons_context.c
source/blender/editors/space_buttons/buttons_header.c
source/blender/editors/space_buttons/buttons_texture.c
source/blender/editors/space_buttons/space_buttons.c
source/blender/editors/space_clip/clip_buttons.c
source/blender/editors/space_clip/clip_ops.c
source/blender/editors/space_clip/space_clip.c
source/blender/editors/space_clip/tracking_ops.c
source/blender/editors/space_console/console_draw.c
source/blender/editors/space_console/space_console.c
source/blender/editors/space_file/file_draw.c
source/blender/editors/space_file/file_ops.c
source/blender/editors/space_file/file_panels.c
source/blender/editors/space_file/space_file.c
source/blender/editors/space_graph/graph_buttons.c
source/blender/editors/space_graph/graph_ops.c
source/blender/editors/space_graph/graph_select.c
source/blender/editors/space_graph/space_graph.c
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_info/info_draw.c
source/blender/editors/space_info/info_report.c
source/blender/editors/space_info/space_info.c
source/blender/editors/space_info/textview.c
source/blender/editors/space_logic/logic_buttons.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_logic/space_logic.c
source/blender/editors/space_nla/nla_draw.c
source/blender/editors/space_nla/nla_edit.c
source/blender/editors/space_nla/nla_ops.c
source/blender/editors/space_nla/nla_select.c
source/blender/editors/space_nla/space_nla.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_ops.c
source/blender/editors/space_node/node_select.c
source/blender/editors/space_node/node_state.c
source/blender/editors/space_node/node_templates.c
source/blender/editors/space_node/space_node.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/space_outliner/outliner_edit.c
source/blender/editors/space_outliner/outliner_ops.c
source/blender/editors/space_outliner/outliner_select.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/space_outliner/space_outliner.c
source/blender/editors/space_script/script_ops.c
source/blender/editors/space_script/space_script.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_sequencer/sequencer_ops.c
source/blender/editors/space_sequencer/sequencer_select.c
source/blender/editors/space_sequencer/space_sequencer.c
source/blender/editors/space_text/space_text.c
source/blender/editors/space_text/text_draw.c
source/blender/editors/space_time/space_time.c
source/blender/editors/space_time/time_ops.c
source/blender/editors/space_view3d/space_view3d.c
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/space_view3d/view3d_ops.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_toolbar.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/editors/transform/transform_manipulator.c
source/blender/editors/transform/transform_ops.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/nodes/composite/node_composite_util.c
source/blender/render/intern/source/external_engine.c
source/blender/render/intern/source/imagetexture.c
source/blender/render/intern/source/initrender.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/render_result.c
source/blender/render/intern/source/rendercore.c
source/blender/render/intern/source/shadbuf.c
source/blender/render/intern/source/zbuf.c
source/blender/windowmanager/intern/wm_dragdrop.c
source/blender/windowmanager/intern/wm_draw.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_gesture.c
source/blender/windowmanager/intern/wm_keymap.c
source/blender/windowmanager/intern/wm_operators.c
source/blender/windowmanager/intern/wm_subwindow.c
source/blender/windowmanager/intern/wm_window.c

index 743cfba..48d8631 100644 (file)
@@ -29,7 +29,6 @@
  *  \ingroup bke
  */
 
-
 #include <stdio.h>
 #include <math.h>
 #include <string.h>
index 2ef93dd..1bb6841 100644 (file)
 
 
 #ifndef _WIN32 
-       #include <unistd.h> // for read close
+#  include <unistd.h> // for read close
 #else
-       #include <io.h> // for open close read
-       #define open _open
-       #define read _read
-       #define close _close
-       #define write _write
+#  include <io.h> // for open close read
+#  define open _open
+#  define read _read
+#  define close _close
+#  define write _write
 #endif
 
 #include <stdlib.h>
index 7180d15..a6651e2 100644 (file)
@@ -312,10 +312,10 @@ void camera_params_compute_viewplane(CameraParams *params, int winx, int winy, f
 
        /* compute view plane:
         * fully centered, zbuffer fills in jittered between -.5 and +.5 */
-       viewplane.xmin= -0.5f*(float)winx;
-       viewplane.ymin= -0.5f*params->ycor*(float)winy;
-       viewplane.xmax=  0.5f*(float)winx;
-       viewplane.ymax=  0.5f*params->ycor*(float)winy;
+       viewplane.xmin = -0.5f*(float)winx;
+       viewplane.ymin = -0.5f*params->ycor*(float)winy;
+       viewplane.xmax =  0.5f*(float)winx;
+       viewplane.ymax =  0.5f*params->ycor*(float)winy;
 
        /* lens shift and offset */
        dx= params->shiftx*viewfac + winx*params->offsetx;
index 158319a..3bfccea 100644 (file)
 
 /** \file blender/blenkernel/intern/library.c
  *  \ingroup bke
+ *
+ * Contains management of ID's and libraries
+ * allocate and free of all library data
  */
 
-
-/*
- *  Contains management of ID's and libraries
- *  allocate and free of all library data
- * 
- */
-
-
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
index 5dfabc6..496c72c 100644 (file)
@@ -3100,7 +3100,7 @@ void BKE_mesh_ensure_navmesh(Mesh *me)
        if (!CustomData_has_layer(&me->pdata, CD_RECAST)) {
                int i;
                int numFaces = me->totpoly;
-               intrecastData;
+               int *recastData;
                CustomData_add_layer_named(&me->pdata, CD_RECAST, CD_CALLOC, NULL, numFaces, "recastData");
                recastData = (int*)CustomData_get_layer(&me->pdata, CD_RECAST);
                for (i=0; i<numFaces; i++) {
index 5c59f4c..7c242da 100644 (file)
@@ -396,10 +396,10 @@ Scene *add_scene(const char *name)
        sce->r.simplify_shadowsamples= 16;
        sce->r.simplify_aosss= 1.0f;
 
-       sce->r.border.xmin= 0.0f;
-       sce->r.border.ymin= 0.0f;
-       sce->r.border.xmax= 1.0f;
-       sce->r.border.ymax= 1.0f;
+       sce->r.border.xmin = 0.0f;
+       sce->r.border.ymin = 0.0f;
+       sce->r.border.xmax = 1.0f;
+       sce->r.border.ymax = 1.0f;
        
        sce->toolsettings = MEM_callocN(sizeof(struct ToolSettings),"Tool Settings Struct");
        sce->toolsettings->cornertype=1;
index f1e8d01..3b69c84 100644 (file)
@@ -5168,10 +5168,10 @@ static void direct_link_gpencil(FileData *fd, bGPdata *gpd)
 
 static void butspace_version_132(SpaceButs *buts)
 {
-       buts->v2d.tot.xmin= 0.0f;
-       buts->v2d.tot.ymin= 0.0f;
-       buts->v2d.tot.xmax= 1279.0f;
-       buts->v2d.tot.ymax= 228.0f;
+       buts->v2d.tot.xmin = 0.0f;
+       buts->v2d.tot.ymin = 0.0f;
+       buts->v2d.tot.xmax = 1279.0f;
+       buts->v2d.tot.ymax = 228.0f;
 
        buts->v2d.min[0]= 256.0f;
        buts->v2d.min[1]= 42.0f;
@@ -6876,10 +6876,10 @@ static void sequencer_init_preview_region(ARegion* ar)
        ar->v2d.keepzoom= V2D_KEEPASPECT | V2D_KEEPZOOM;
        ar->v2d.minzoom= 0.00001f;
        ar->v2d.maxzoom= 100000.0f;
-       ar->v2d.tot.xmin= -960.0f; /* 1920 width centered */
-       ar->v2d.tot.ymin= -540.0f; /* 1080 height centered */
-       ar->v2d.tot.xmax= 960.0f;
-       ar->v2d.tot.ymax= 540.0f;
+       ar->v2d.tot.xmin = -960.0f; /* 1920 width centered */
+       ar->v2d.tot.ymin = -540.0f; /* 1080 height centered */
+       ar->v2d.tot.xmax = 960.0f;
+       ar->v2d.tot.ymax = 540.0f;
        ar->v2d.min[0]= 0.0f;
        ar->v2d.min[1]= 0.0f;
        ar->v2d.max[0]= 12000.0f;
@@ -7048,7 +7048,7 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb)
                                ar->v2d.align |= V2D_ALIGN_NO_NEG_Y;
                                ar->v2d.keepofs |= V2D_LOCKOFS_Y;
                                ar->v2d.keepzoom |= V2D_LOCKZOOM_Y;
-                               ar->v2d.tot.ymin= ar->v2d.cur.ymin= -10.0;
+                               ar->v2d.tot.ymin = ar->v2d.cur.ymin = -10.0;
                                ar->v2d.min[1]= ar->v2d.max[1]= 20.0;
                        }
                                break;
@@ -7075,8 +7075,8 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb)
                                SpaceNla *snla= (SpaceNla *)sl;
                                memcpy(&ar->v2d, &snla->v2d, sizeof(View2D));
                                
-                               ar->v2d.tot.ymin= (float)(-sa->winy)/3.0f;
-                               ar->v2d.tot.ymax= 0.0f;
+                               ar->v2d.tot.ymin = (float)(-sa->winy)/3.0f;
+                               ar->v2d.tot.ymax = 0.0f;
                                
                                ar->v2d.scroll |= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
                                ar->v2d.scroll |= (V2D_SCROLL_RIGHT);
@@ -7089,10 +7089,10 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb)
                                SpaceAction *saction= (SpaceAction *)sl;
                                
                                /* we totally reinit the view for the Action Editor, as some old instances had some weird cruft set */
-                               ar->v2d.tot.xmin= -20.0f;
-                               ar->v2d.tot.ymin= (float)(-sa->winy)/3.0f;
-                               ar->v2d.tot.xmax= (float)((sa->winx > 120)? (sa->winx) : 120);
-                               ar->v2d.tot.ymax= 0.0f;
+                               ar->v2d.tot.xmin = -20.0f;
+                               ar->v2d.tot.ymin = (float)(-sa->winy)/3.0f;
+                               ar->v2d.tot.xmax = (float)((sa->winx > 120)? (sa->winx) : 120);
+                               ar->v2d.tot.ymax = 0.0f;
                                
                                ar->v2d.cur= ar->v2d.tot;
                                
@@ -9808,11 +9808,11 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                                                if(sl->spacetype==SPACE_ACTION) {
                                                        SpaceAction *saction= (SpaceAction*) sl;
                                                        
-                                                       saction->v2d.tot.ymin= -1000.0;
-                                                       saction->v2d.tot.ymax= 0.0;
+                                                       saction->v2d.tot.ymin = -1000.0;
+                                                       saction->v2d.tot.ymax = 0.0;
                                                        
-                                                       saction->v2d.cur.ymin= -75.0;
-                                                       saction->v2d.cur.ymax= 5.0;
+                                                       saction->v2d.cur.ymin = -75.0;
+                                                       saction->v2d.cur.ymax = 5.0;
                                                }
                                        }
                                        sa = sa->next;
@@ -11772,8 +11772,8 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                                        if (ELEM(sl->spacetype, SPACE_ACTION, SPACE_NLA)) {
                                                for (ar = (ARegion*)regionbase->first; ar; ar = ar->next) {
                                                        if (ar->regiontype == RGN_TYPE_WINDOW) {
-                                                               ar->v2d.cur.ymax= ar->v2d.tot.ymax= 0.0f;
-                                                               ar->v2d.cur.ymin= ar->v2d.tot.ymin= (float)(-sa->winy) / 3.0f;
+                                                               ar->v2d.cur.ymax = ar->v2d.tot.ymax = 0.0f;
+                                                               ar->v2d.cur.ymin = ar->v2d.tot.ymin = (float)(-sa->winy) / 3.0f;
                                                        }
                                                }
                                        }
@@ -11822,10 +11822,10 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                for(sce = main->scene.first; sce; sce = sce->id.next) {
                        if(sce->r.border.xmin == 0.0f && sce->r.border.ymin == 0.0f &&
                           sce->r.border.xmax == 0.0f && sce->r.border.ymax == 0.0f) {
-                               sce->r.border.xmin= 0.0f;
-                               sce->r.border.ymin= 0.0f;
-                               sce->r.border.xmax= 1.0f;
-                               sce->r.border.ymax= 1.0f;
+                               sce->r.border.xmin = 0.0f;
+                               sce->r.border.ymin = 0.0f;
+                               sce->r.border.xmax = 1.0f;
+                               sce->r.border.ymax = 1.0f;
                        }
 
                        if((sce->r.ffcodecdata.flags & FFMPEG_MULTIPLEX_AUDIO) == 0)
@@ -13391,7 +13391,7 @@ static BHead *read_userdef(BlendFileData *bfd, FileData *fd, BHead *bhead)
 
        for(keymap=user->user_keymaps.first; keymap; keymap=keymap->next) {
                keymap->modal_items= NULL;
-               keymap->poll= NULL;
+               keymap->poll = NULL;
                keymap->flag &= ~KEYMAP_UPDATE;
 
                link_list(fd, &keymap->diff_items);
index 6b52932..2cfaf49 100644 (file)
@@ -68,8 +68,8 @@ BLI_INLINE void _bm_elem_flag_merge(BMHeader *head_a, BMHeader *head_b)
        head_a->hflag = head_b->hflag = head_a->hflag | head_b->hflag;
 }
 
-
-/* notes on BM_elem_index_set(...) usage,
+/**
+ * notes on #BM_elem_index_set(...) usage,
  * Set index is sometimes abused as temp storage, other times we cant be
  * sure if the index values are valid because certain operations have modified
  * the mesh structure.
@@ -78,8 +78,8 @@ BLI_INLINE void _bm_elem_flag_merge(BMHeader *head_a, BMHeader *head_b)
  * rather then adding inline loops, however there are cases where we still
  * set the index directly
  *
- * In an attempt to manage this, here are 3 tags Im adding to uses of
- * 'BM_elem_index_set'
+ * In an attempt to manage this,
+ * here are 5 tags I'm adding to uses of #BM_elem_index_set
  *
  * - 'set_inline'  -- since the data is already being looped over set to a
  *                    valid value inline.
@@ -96,6 +96,7 @@ BLI_INLINE void _bm_elem_flag_merge(BMHeader *head_a, BMHeader *head_b)
  *
  * - 'set_loop'    -- currently loop index values are not used used much so
  *                    assume each case they are dirty.
+ *
  * - campbell */
 
 #define BM_elem_index_get(ele)           _bm_elem_index_get(&(ele)->head)
index 81513eb..b2839db 100644 (file)
@@ -3115,17 +3115,17 @@ static void draw_setting_widget (bAnimContext *ac, bAnimListElem *ale, bAnimChan
        if (ptr && flag) {
                switch (ptrsize) {
                        case sizeof(int):       /* integer pointer for setting */
-                               but= uiDefIconButBitI(block, butType, flag, 0, icon, 
+                               but = uiDefIconButBitI(block, butType, flag, 0, icon, 
                                                xpos, ypos, ICON_WIDTH, ICON_WIDTH, ptr, 0, 0, 0, 0, tooltip);
                                break;
                                
                        case sizeof(short):     /* short pointer for setting */
-                               but= uiDefIconButBitS(block, butType, flag, 0, icon, 
+                               but = uiDefIconButBitS(block, butType, flag, 0, icon, 
                                                xpos, ypos, ICON_WIDTH, ICON_WIDTH, ptr, 0, 0, 0, 0, tooltip);
                                break;
                                
                        case sizeof(char):      /* char pointer for setting */
-                               but= uiDefIconButBitC(block, butType, flag, 0, icon, 
+                               but = uiDefIconButBitC(block, butType, flag, 0, icon, 
                                                xpos, ypos, ICON_WIDTH, ICON_WIDTH, ptr, 0, 0, 0, 0, tooltip);
                                break;
                }
@@ -3320,7 +3320,7 @@ void ANIM_channel_draw_widgets (bContext *C, bAnimContext *ac, bAnimListElem *al
                                                uiBut *but;
                                                
                                                /* create the slider button, and assign relevant callback to ensure keyframes are inserted... */
-                                               but= uiDefAutoButR(block, &ptr, prop, array_index, "", ICON_NONE, (int)v2d->cur.xmax-offset, ymid, SLIDER_WIDTH, (int)ymaxc-yminc);
+                                               but = uiDefAutoButR(block, &ptr, prop, array_index, "", ICON_NONE, (int)v2d->cur.xmax-offset, ymid, SLIDER_WIDTH, (int)ymaxc-yminc);
                                                
                                                /* assign keyframing function according to slider type */
                                                if (ale->type == ANIMTYPE_SHAPEKEY)
index bfe17b8..69f4597 100644 (file)
@@ -1901,10 +1901,10 @@ static int animchannels_borderselect_exec(bContext *C, wmOperator *op)
                return OPERATOR_CANCELLED;
        
        /* get settings from operator */
-       rect.xmin= RNA_int_get(op->ptr, "xmin");
-       rect.ymin= RNA_int_get(op->ptr, "ymin");
-       rect.xmax= RNA_int_get(op->ptr, "xmax");
-       rect.ymax= RNA_int_get(op->ptr, "ymax");
+       rect.xmin = RNA_int_get(op->ptr, "xmin");
+       rect.ymin = RNA_int_get(op->ptr, "ymin");
+       rect.xmax = RNA_int_get(op->ptr, "xmax");
+       rect.ymax = RNA_int_get(op->ptr, "ymax");
        
        gesture_mode= RNA_int_get(op->ptr, "gesture_mode");
        extend= RNA_boolean_get(op->ptr, "extend");
index f5c7079..7937d19 100644 (file)
@@ -1486,7 +1486,7 @@ void ED_operatortypes_marker(void)
 /* called in screen_ops.c:ED_keymap_screen() */
 void ED_marker_keymap(wmKeyConfig *keyconf)
 {
-       wmKeyMap *keymap= WM_keymap_find(keyconf, "Markers", 0, 0);
+       wmKeyMap *keymap = WM_keymap_find(keyconf, "Markers", 0, 0);
        wmKeyMapItem *kmi;
        
        WM_keymap_verify_item(keymap, "MARKER_OT_add", MKEY, KM_PRESS, 0, 0);
@@ -1497,11 +1497,11 @@ void ED_marker_keymap(wmKeyConfig *keyconf)
        RNA_boolean_set(kmi->ptr, "extend", TRUE);
 
 #ifdef DURIAN_CAMERA_SWITCH
-       kmi= WM_keymap_add_item(keymap, "MARKER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
+       kmi = WM_keymap_add_item(keymap, "MARKER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
        RNA_boolean_set(kmi->ptr, "extend", FALSE);
        RNA_boolean_set(kmi->ptr, "camera", TRUE);
 
-       kmi= WM_keymap_add_item(keymap, "MARKER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
+       kmi = WM_keymap_add_item(keymap, "MARKER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
        RNA_boolean_set(kmi->ptr, "extend", TRUE);
        RNA_boolean_set(kmi->ptr, "camera", TRUE);
 #else
index 05a7a26..6ca7ffd 100644 (file)
@@ -315,7 +315,7 @@ void ED_operatortypes_anim(void)
 
 void ED_keymap_anim(wmKeyConfig *keyconf)
 {
-       wmKeyMap *keymap= WM_keymap_find(keyconf, "Animation", 0, 0);
+       wmKeyMap *keymap = WM_keymap_find(keyconf, "Animation", 0, 0);
        wmKeyMapItem *kmi;
        
        /* frame management */
index de0af2d..9b3e481 100644 (file)
@@ -126,7 +126,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s
        /* col= uiLayoutColumn(layout, 1); */ /* UNUSED */
        block= uiLayoutGetBlock(layout);
        uiBlockBeginAlign(block);
-               but= uiDefButR(block, MENU, B_FMODIFIER_REDRAW, NULL, 0, 0, width-30, UI_UNIT_Y, &ptr, "mode", -1, 0, 0, -1, -1, NULL);
+               but = uiDefButR(block, MENU, B_FMODIFIER_REDRAW, NULL, 0, 0, width-30, UI_UNIT_Y, &ptr, "mode", -1, 0, 0, -1, -1, NULL);
                uiButSetFunc(but, validate_fmodifier_cb, fcm, NULL);
                
                uiDefButR(block, TOG, B_FMODIFIER_REDRAW, NULL, 0, 0, width-30, UI_UNIT_Y, &ptr, "use_additive", -1, 0, 0, -1, -1, NULL);
@@ -143,7 +143,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s
                        /* draw polynomial order selector */
                        row= uiLayoutRow(layout, 0);
                        block= uiLayoutGetBlock(row);
-                               but= uiDefButI(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Poly Order:"), 10, 0, width-30, 19,
+                               but = uiDefButI(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Poly Order:"), 10, 0, width-30, 19,
                                               &data->poly_order, 1, 100, 0, 0,
                                               TIP_("'Order' of the Polynomial (for a polynomial with n terms, 'order' is n-1)"));
                                uiButSetFunc(but, validate_fmodifier_cb, fcm, NULL);
@@ -196,7 +196,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s
                        /* draw polynomial order selector */
                        row= uiLayoutRow(layout, 0);
                        block= uiLayoutGetBlock(row);
-                               but= uiDefButI(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Poly Order:"), 0, 0, width-30, 19,
+                               but = uiDefButI(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Poly Order:"), 0, 0, width-30, 19,
                                               &data->poly_order, 1, 100, 0, 0,
                                               TIP_("'Order' of the Polynomial (for a polynomial with n terms, 'order' is n-1)"));
                                uiButSetFunc(but, validate_fmodifier_cb, fcm, NULL);
@@ -515,7 +515,7 @@ static void draw_modifier__envelope(uiLayout *layout, ID *id, FModifier *fcm, sh
                
                uiDefBut(block, LABEL, 1, IFACE_("Control Points:"), 0, 0, 150, 20, NULL, 0.0, 0.0, 0, 0, "");
                
-               but= uiDefBut(block, BUT, B_FMODIFIER_REDRAW, IFACE_("Add Point"), 0, 0, 150, 19,
+               but = uiDefBut(block, BUT, B_FMODIFIER_REDRAW, IFACE_("Add Point"), 0, 0, 150, 19,
                              NULL, 0, 0, 0, 0, TIP_("Add a new control-point to the envelope on the current frame"));
                uiButSetFunc(but, fmod_envelope_addpoint_cb, env, NULL);
                
@@ -535,7 +535,7 @@ static void draw_modifier__envelope(uiLayout *layout, ID *id, FModifier *fcm, sh
                        uiDefButF(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Max:"), 0, 0, 100, 20,
                                  &fed->max, -UI_FLT_MAX, UI_FLT_MAX, 10, 2, TIP_("Maximum bound of envelope at this point"));
                        
-                       but= uiDefIconBut(block, BUT, B_FMODIFIER_REDRAW, ICON_X, 0, 0, 18, 20,
+                       but = uiDefIconBut(block, BUT, B_FMODIFIER_REDRAW, ICON_X, 0, 0, 18, 20,
                                          NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Delete envelope control point"));
                        uiButSetFunc(but, fmod_envelope_deletepoint_cb, env, SET_INT_IN_POINTER(i));
                uiBlockBeginAlign(block);
@@ -674,7 +674,7 @@ void ANIM_uiTemplate_fmodifier_draw (uiLayout *layout, ID *id, ListBase *modifie
                uiBlockSetEmboss(block, UI_EMBOSSN);
                
                /* delete button */
-               but= uiDefIconBut(block, BUT, B_REDR, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y,
+               but = uiDefIconBut(block, BUT, B_REDR, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y,
                                  NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Delete F-Curve Modifier"));
                uiButSetFunc(but, delete_fmodifier_cb, modifiers, fcm);
                
index cfc8794..4155f76 100644 (file)
@@ -170,31 +170,31 @@ void ED_operatormacros_armature(void)
        wmOperatorType *ot;
        wmOperatorTypeMacro *otmacro;
        
-       ot= WM_operatortype_append_macro("ARMATURE_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
+       ot = WM_operatortype_append_macro("ARMATURE_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
        if(ot) {
                ot->description = "Make copies of the selected bones within the same armature and move them";
                WM_operatortype_macro_define(ot, "ARMATURE_OT_duplicate");
-               otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+               otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
                RNA_enum_set(otmacro->ptr, "proportional", 0);
        }
 
-       ot= WM_operatortype_append_macro("ARMATURE_OT_extrude_move", "Extrude", OPTYPE_UNDO|OPTYPE_REGISTER);
+       ot = WM_operatortype_append_macro("ARMATURE_OT_extrude_move", "Extrude", OPTYPE_UNDO|OPTYPE_REGISTER);
        if(ot) {
                ot->description = "Create new bones from the selected joints and move them";
                otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
                RNA_boolean_set(otmacro->ptr, "forked", FALSE);
-               otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+               otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
                RNA_enum_set(otmacro->ptr, "proportional", 0);
        }
        
        // XXX would it be nicer to just be able to have standard extrude_move, but set the forked property separate?
        // that would require fixing a properties bug 19733
-       ot= WM_operatortype_append_macro("ARMATURE_OT_extrude_forked", "Extrude Forked", OPTYPE_UNDO|OPTYPE_REGISTER);
+       ot = WM_operatortype_append_macro("ARMATURE_OT_extrude_forked", "Extrude Forked", OPTYPE_UNDO|OPTYPE_REGISTER);
        if(ot) {
                ot->description = "Create new bones from the selected joints and move them";
                otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
                RNA_boolean_set(otmacro->ptr, "forked", TRUE);
-               otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+               otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
                RNA_enum_set(otmacro->ptr, "proportional", 0);
        }
 }
@@ -205,8 +205,8 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
        wmKeyMapItem *kmi;
        
        /* Armature ------------------------ */
-       keymap= WM_keymap_find(keyconf, "Armature", 0, 0);
-       keymap->poll= ED_operator_editarmature;
+       keymap = WM_keymap_find(keyconf, "Armature", 0, 0);
+       keymap->poll = ED_operator_editarmature;
        
        /* Armature -> Etch-A-Ton ------------------------ */
        WM_keymap_add_item(keymap, "SKETCH_OT_delete", XKEY, KM_PRESS, 0, 0);
@@ -228,7 +228,7 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
        /* only set in editmode armature, by space_view3d listener */
        kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, 0, 0);
        RNA_boolean_set(kmi->ptr, "unselected", FALSE);
-       kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0);
+       kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0);
        RNA_boolean_set(kmi->ptr, "unselected", TRUE);
 
        WM_keymap_add_item(keymap, "ARMATURE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0);
@@ -247,17 +247,17 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
        kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0);
                RNA_enum_set(kmi->ptr, "action", SEL_INVERT);
        
-       kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0);
+       kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0);
                RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
                RNA_boolean_set(kmi->ptr, "extend", FALSE);
-       kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
+       kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
                RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
                RNA_boolean_set(kmi->ptr, "extend", TRUE);
        
-       kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
+       kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
                RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
                RNA_boolean_set(kmi->ptr, "extend", FALSE);
-       kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
+       kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
                RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
                RNA_boolean_set(kmi->ptr, "extend", TRUE);
 
@@ -286,10 +286,10 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
        
                /* special transforms: */
                /*      1) envelope/b-bone size */
-       kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
+       kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
                RNA_enum_set(kmi->ptr, "mode", TFM_BONESIZE);
                /*      2) set roll */
-       kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", RKEY, KM_PRESS, KM_CTRL, 0);
+       kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", RKEY, KM_PRESS, KM_CTRL, 0);
                RNA_enum_set(kmi->ptr, "mode", TFM_BONE_ROLL);
                
                /* menus */
@@ -297,8 +297,8 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
 
        /* Pose ------------------------ */
        /* only set in posemode, by space_view3d listener */
-       keymap= WM_keymap_find(keyconf, "Pose", 0, 0);
-       keymap->poll= ED_operator_posemode;
+       keymap = WM_keymap_find(keyconf, "Pose", 0, 0);
+       keymap->poll = ED_operator_posemode;
        
        /* set parent and add object are object-based operators, but we make them
         * available here because it's useful to do in pose mode too */
@@ -327,7 +327,7 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
        kmi = WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0);
        RNA_boolean_set(kmi->ptr, "flipped", FALSE);
 
-       kmi= WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+       kmi = WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
        RNA_boolean_set(kmi->ptr, "flipped", TRUE);
        
        kmi = WM_keymap_add_item(keymap, "POSE_OT_select_all", AKEY, KM_PRESS, 0, 0);
@@ -337,17 +337,17 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
 
        WM_keymap_add_item(keymap, "POSE_OT_select_parent", PKEY, KM_PRESS, KM_SHIFT, 0);
 
-       kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0);
+       kmi = WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0);
                RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
                RNA_boolean_set(kmi->ptr, "extend", FALSE);
-       kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
+       kmi = WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
                RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT);
                RNA_boolean_set(kmi->ptr, "extend", TRUE);
        
-       kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
+       kmi = WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
                RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
                RNA_boolean_set(kmi->ptr, "extend", FALSE);
-       kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
+       kmi = WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
                RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD);
                RNA_boolean_set(kmi->ptr, "extend", TRUE);
 
@@ -374,7 +374,7 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
        
                /* special transforms: */
                /*      1) envelope/b-bone size */
-       kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
+       kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
                RNA_enum_set(kmi->ptr, "mode", TFM_BONESIZE);
        
                /* keyframes management */
index 321aa30..71c0e41 100644 (file)
@@ -1354,9 +1354,9 @@ static void *get_nearest_bone (bContext *C, short findunsel, int x, int y)
        
        view3d_set_viewcontext(C, &vc);
        
-       // rect.xmin= ... mouseco!
-       rect.xmin= rect.xmax= x;
-       rect.ymin= rect.ymax= y;
+       // rect.xmin = ... mouseco!
+       rect.xmin = rect.xmax = x;
+       rect.ymin = rect.ymax = y;
        
        glInitNames();
        hits= view3d_opengl_select(&vc, buffer, MAXPICKBUF, &rect);
@@ -1590,17 +1590,17 @@ static EditBone *get_nearest_editbonepoint (ViewContext *vc, const int mval[2],
 
        glInitNames();
        
-       rect.xmin= mval[0]-5;
-       rect.xmax= mval[0]+5;
-       rect.ymin= mval[1]-5;
-       rect.ymax= mval[1]+5;
+       rect.xmin = mval[0]-5;
+       rect.xmax = mval[0]+5;
+       rect.ymin = mval[1]-5;
+       rect.ymax = mval[1]+5;
        
        hits= view3d_opengl_select(vc, buffer, MAXPICKBUF, &rect);
        if(hits==0) {
-               rect.xmin= mval[0]-12;
-               rect.xmax= mval[0]+12;
-               rect.ymin= mval[1]-12;
-               rect.ymax= mval[1]+12;
+               rect.xmin = mval[0]-12;
+               rect.xmax = mval[0]+12;
+               rect.ymin = mval[1]-12;
+               rect.ymax = mval[1]+12;
                hits= view3d_opengl_select(vc, buffer, MAXPICKBUF, &rect);
        }
        /* See if there are any selected bones in this group */
index 5e5789d..f9f3cd6 100644 (file)
@@ -2166,10 +2166,10 @@ static int sk_selectStroke(bContext *C, SK_Sketch *sketch, const int mval[2], in
 
        view3d_set_viewcontext(C, &vc);
 
-       rect.xmin= mval[0]-5;
-       rect.xmax= mval[0]+5;
-       rect.ymin= mval[1]-5;
-       rect.ymax= mval[1]+5;
+       rect.xmin = mval[0]-5;
+       rect.xmax = mval[0]+5;
+       rect.ymin = mval[1]-5;
+       rect.ymax = mval[1]+5;
 
        hits = view3d_opengl_select(&vc, buffer, MAXPICKBUF, &rect);
 
index b213f79..94ec7c7 100644 (file)
@@ -140,17 +140,17 @@ void ED_operatormacros_curve(void)
        wmOperatorType *ot;
        wmOperatorTypeMacro *otmacro;
 
-       ot= WM_operatortype_append_macro("CURVE_OT_duplicate_move", "Add Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
+       ot = WM_operatortype_append_macro("CURVE_OT_duplicate_move", "Add Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
        ot->description = "Duplicate curve and move";
        WM_operatortype_macro_define(ot, "CURVE_OT_duplicate");
-       otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+       otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
        RNA_enum_set(otmacro->ptr, "proportional", 0);
        RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
 
-       ot= WM_operatortype_append_macro("CURVE_OT_extrude_move", "Extrude Curve and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
+       ot = WM_operatortype_append_macro("CURVE_OT_extrude_move", "Extrude Curve and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
        ot->description = "Extrude curve and move result";
        WM_operatortype_macro_define(ot, "CURVE_OT_extrude");
-       otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+       otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
        RNA_enum_set(otmacro->ptr, "proportional", 0);
        RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
 }
@@ -160,8 +160,8 @@ void ED_keymap_curve(wmKeyConfig *keyconf)
        wmKeyMap *keymap;
        wmKeyMapItem *kmi;
        
-       keymap= WM_keymap_find(keyconf, "Font", 0, 0);
-       keymap->poll= ED_operator_editfont;
+       keymap = WM_keymap_find(keyconf, "Font", 0, 0);
+       keymap->poll = ED_operator_editfont;
        
        /* only set in editmode font, by space_view3d listener */
        RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_style_toggle", BKEY, KM_PRESS, KM_CTRL, 0)->ptr, "style", CU_CHINFO_BOLD);
@@ -214,8 +214,8 @@ void ED_keymap_curve(wmKeyConfig *keyconf)
        RNA_boolean_set(kmi->ptr, "accent", TRUE); /* accented characters */
 
        /* only set in editmode curve, by space_view3d listener */
-       keymap= WM_keymap_find(keyconf, "Curve", 0, 0);
-       keymap->poll= ED_operator_editsurfcurve;
+       keymap = WM_keymap_find(keyconf, "Curve", 0, 0);
+       keymap->poll = ED_operator_editsurfcurve;
 
        WM_keymap_add_menu(keymap, "INFO_MT_edit_curve_add", AKEY, KM_PRESS, KM_SHIFT, 0);
        
index b307052..528991e 100644 (file)
@@ -791,10 +791,10 @@ void draw_gpencil_view3d (Scene *scene, View3D *v3d, ARegion *ar, short only3d)
                BLI_copy_rcti_rctf(&rect, &rectf);
        }
        else {
-               rect.xmin= 0;
-               rect.ymin= 0;
-               rect.xmax= ar->winx;
-               rect.ymax= ar->winy;
+               rect.xmin = 0;
+               rect.ymin = 0;
+               rect.xmax = ar->winx;
+               rect.ymax = ar->winy;
        }
        
        /* draw it! */
index 954c79b..0afe791 100644 (file)
@@ -50,7 +50,7 @@
 
 void ED_keymap_gpencil(wmKeyConfig *keyconf)
 {
-       wmKeyMap *keymap= WM_keymap_find(keyconf, "Grease Pencil", 0, 0);
+       wmKeyMap *keymap = WM_keymap_find(keyconf, "Grease Pencil", 0, 0);
        wmKeyMapItem *kmi;
        
        /* Draw */
index b7ebc6d..4dee4c4 100644 (file)
@@ -940,10 +940,10 @@ static void gp_stroke_doeraser (tGPsdata *p)
        rcti rect;
        
        /* rect is rectangle of eraser */
-       rect.xmin= p->mval[0] - p->radius;
-       rect.ymin= p->mval[1] - p->radius;
-       rect.xmax= p->mval[0] + p->radius;
-       rect.ymax= p->mval[1] + p->radius;
+       rect.xmin = p->mval[0] - p->radius;
+       rect.ymin = p->mval[1] - p->radius;
+       rect.xmax = p->mval[0] + p->radius;
+       rect.ymax = p->mval[1] + p->radius;
        
        /* loop over strokes, checking segments for intersections */
        for (gps= gpf->strokes.first; gps; gps= gpn) {
index 4f84b05..229a9de 100644 (file)
@@ -137,10 +137,10 @@ void ui_block_to_window_rct(const ARegion *ar, uiBlock *block, rctf *graph, rcti
        ui_block_to_window_fl(ar, block, &tmpr.xmin, &tmpr.ymin);
        ui_block_to_window_fl(ar, block, &tmpr.xmax, &tmpr.ymax);
 
-       winr->xmin= tmpr.xmin;
-       winr->ymin= tmpr.ymin;
-       winr->xmax= tmpr.xmax;
-       winr->ymax= tmpr.ymax;
+       winr->xmin = tmpr.xmin;
+       winr->ymin = tmpr.ymin;
+       winr->xmax = tmpr.xmax;
+       winr->ymax = tmpr.ymax;
 }
 
 void ui_window_to_block_fl(const ARegion *ar, uiBlock *block, float *x, float *y)      /* for mouse cursor */
@@ -295,10 +295,10 @@ void ui_bounds_block(uiBlock *block)
        if(bt && strncmp(bt->str, "ERROR", 5)==0) xof= 10;
        else xof= 40;
        
-       block->safety.xmin= block->minx-xof;
-       block->safety.ymin= block->miny-xof;
-       block->safety.xmax= block->maxx+xof;
-       block->safety.ymax= block->maxy+xof;
+       block->safety.xmin = block->minx-xof;
+       block->safety.ymin = block->miny-xof;
+       block->safety.xmax = block->maxx+xof;
+       block->safety.ymax = block->maxy+xof;
 }
 
 static void ui_centered_bounds_block(const bContext *C, uiBlock *block)
@@ -504,10 +504,10 @@ static void ui_draw_linkline(uiLinkLine *line)
 
        if(line->from==NULL || line->to==NULL) return;
        
-       rect.xmin= (line->from->x1+line->from->x2)/2.0f;
-       rect.ymin= (line->from->y1+line->from->y2)/2.0f;
-       rect.xmax= (line->to->x1+line->to->x2)/2.0f;
-       rect.ymax= (line->to->y1+line->to->y2)/2.0f;
+       rect.xmin = (line->from->x1+line->from->x2)/2.0f;
+       rect.ymin = (line->from->y1+line->from->y2)/2.0f;
+       rect.xmax = (line->to->x1+line->to->x2)/2.0f;
+       rect.ymax = (line->to->y1+line->to->y2)/2.0f;
        
        if(line->flag & UI_SELECT) 
                glColor3ub(100,100,100);
@@ -975,14 +975,14 @@ static void ui_but_to_pixelrect(rcti *rect, const ARegion *ar, uiBlock *block, u
        gx= (but?but->x1:block->minx) + (block->panel?block->panel->ofsx:0.0f);
        gy= (but?but->y1:block->miny) + (block->panel?block->panel->ofsy:0.0f);
        
-       rect->xmin= floorf(getsizex*(0.5f+ 0.5f*(gx*block->winmat[0][0]+ gy*block->winmat[1][0]+ block->winmat[3][0])));
-       rect->ymin= floorf(getsizey*(0.5f+ 0.5f*(gx*block->winmat[0][1]+ gy*block->winmat[1][1]+ block->winmat[3][1])));
+       rect->xmin = floorf(getsizex*(0.5f+ 0.5f*(gx*block->winmat[0][0]+ gy*block->winmat[1][0]+ block->winmat[3][0])));
+       rect->ymin = floorf(getsizey*(0.5f+ 0.5f*(gx*block->winmat[0][1]+ gy*block->winmat[1][1]+ block->winmat[3][1])));
        
        gx= (but?but->x2:block->maxx) + (block->panel?block->panel->ofsx:0.0f);
        gy= (but?but->y2:block->maxy) + (block->panel?block->panel->ofsy:0.0f);
        
-       rect->xmax= floorf(getsizex*(0.5f+ 0.5f*(gx*block->winmat[0][0]+ gy*block->winmat[1][0]+ block->winmat[3][0])));
-       rect->ymax= floorf(getsizey*(0.5f+ 0.5f*(gx*block->winmat[0][1]+ gy*block->winmat[1][1]+ block->winmat[3][1])));
+       rect->xmax = floorf(getsizex*(0.5f+ 0.5f*(gx*block->winmat[0][0]+ gy*block->winmat[1][0]+ block->winmat[3][0])));
+       rect->ymax = floorf(getsizey*(0.5f+ 0.5f*(gx*block->winmat[0][1]+ gy*block->winmat[1][1]+ block->winmat[3][1])));
 
 }
 
index 39ae2ec..c8fbda8 100644 (file)
@@ -1303,10 +1303,10 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect
        
        /* need scissor test, curve can draw outside of boundary */
        glGetIntegerv(GL_VIEWPORT, scissor);
-       scissor_new.xmin= ar->winrct.xmin + rect->xmin;
-       scissor_new.ymin= ar->winrct.ymin + rect->ymin;
-       scissor_new.xmax= ar->winrct.xmin + rect->xmax;
-       scissor_new.ymax= ar->winrct.ymin + rect->ymax;
+       scissor_new.xmin = ar->winrct.xmin + rect->xmin;
+       scissor_new.ymin = ar->winrct.ymin + rect->ymin;
+       scissor_new.xmax = ar->winrct.xmin + rect->xmax;
+       scissor_new.ymax = ar->winrct.ymin + rect->ymax;
        BLI_isect_rcti(&scissor_new, &ar->winrct, &scissor_new);
        glScissor(scissor_new.xmin, scissor_new.ymin, scissor_new.xmax-scissor_new.xmin, scissor_new.ymax-scissor_new.ymin);
        
index 4cd89b2..de5f12d 100644 (file)
@@ -651,12 +651,12 @@ static int ui_but_mouse_inside_icon(uiBut *but, ARegion *ar, wmEvent *event)
        
        ui_window_to_block(ar, but->block, &x, &y);
        
-       rect.xmin= but->x1; rect.xmax= but->x2;
-       rect.ymin= but->y1; rect.ymax= but->y2;
+       rect.xmin = but->x1; rect.xmax = but->x2;
+       rect.ymin = but->y1; rect.ymax = but->y2;
        
        if(but->imb); /* use button size itself */
        else if(but->flag & UI_ICON_LEFT) {
-               rect.xmax= rect.xmin + (rect.ymax-rect.ymin);
+               rect.xmax = rect.xmin + (rect.ymax-rect.ymin);
        }
        else {
                int delta= (rect.xmax-rect.xmin) - (rect.ymax-rect.ymin);
@@ -3295,8 +3295,8 @@ static int ui_numedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, int mx
        float rgb[3];
        float hsv[3];
        
-       rect.xmin= but->x1; rect.xmax= but->x2;
-       rect.ymin= but->y1; rect.ymax= but->y2;
+       rect.xmin = but->x1; rect.xmax = but->x2;
+       rect.ymin = but->y1; rect.ymax = but->y2;
        
        ui_get_but_vectorf(but, rgb);
        copy_v3_v3(hsv, ui_block_hsv_get(but->block));
@@ -3801,8 +3801,8 @@ static int ui_numedit_but_HISTOGRAM(uiBut *but, uiHandleButtonData *data, int mx
        int changed= 1;
        float /* dx, */ dy, yfac=1.f; /* UNUSED */
        
-       /* rect.xmin= but->x1; rect.xmax= but->x2; */
-       /* rect.ymin= but->y1; rect.ymax= but->y2; */
+       /* rect.xmin = but->x1; rect.xmax = but->x2; */
+       /* rect.ymin = but->y1; rect.ymax = but->y2; */
        
        /* dx = mx - data->draglastx; */ /* UNUSED */
        dy = my - data->draglasty;
@@ -3884,8 +3884,8 @@ static int ui_numedit_but_WAVEFORM(uiBut *but, uiHandleButtonData *data, int mx,
        int changed= 1;
        float /* dx, */ dy /* , yfac=1.f */; /* UNUSED */
 
-       /* rect.xmin= but->x1; rect.xmax= but->x2; */
-       /* rect.ymin= but->y1; rect.ymax= but->y2; */
+       /* rect.xmin = but->x1; rect.xmax = but->x2; */
+       /* rect.ymin = but->y1; rect.ymax = but->y2; */
 
        /* dx = mx - data->draglastx; */ /* UNUSED */
        dy = my - data->draglasty;
@@ -3967,8 +3967,8 @@ static int ui_numedit_but_VECTORSCOPE(uiBut *but, uiHandleButtonData *data, int
        int changed= 1;
        /* float dx, dy; */
 
-       /* rect.xmin= but->x1; rect.xmax= but->x2; */
-       /* rect.ymin= but->y1; rect.ymax= but->y2; */
+       /* rect.xmin = but->x1; rect.xmax = but->x2; */
+       /* rect.ymin = but->y1; rect.ymax = but->y2; */
 
        /* dx = mx - data->draglastx; */
        /* dy = my - data->draglasty; */
@@ -4507,11 +4507,11 @@ static int ui_but_menu(bContext *C, uiBut *but)
                IDProperty *prop= (but->opptr)? but->opptr->data: NULL;
                int w = uiLayoutGetWidth(layout);
                wmKeyMap *km;
-               wmKeyMapItem *kmi= NULL;
+               wmKeyMapItem *kmi = NULL;
                int kmi_id= WM_key_event_operator_id(C, but->optype->idname, but->opcontext, prop, 1, &km);
 
                if (kmi_id)
-                       kmi= WM_keymap_item_find_id(km, kmi_id);
+                       kmi = WM_keymap_item_find_id(km, kmi_id);
 
                /* keyboard shortcuts */
                if ((kmi) && ISKEYBOARD(kmi->type)) {
@@ -4882,22 +4882,22 @@ static int ui_mouse_inside_region(ARegion *ar, int x, int y)
                ui_window_to_region(ar, &mx, &my);
                
                /* make a copy of the mask rect, and tweak accordingly for hidden scrollbars */
-               mask_rct.xmin= v2d->mask.xmin;
-               mask_rct.xmax= v2d->mask.xmax;
-               mask_rct.ymin= v2d->mask.ymin;
-               mask_rct.ymax= v2d->mask.ymax;
+               mask_rct.xmin = v2d->mask.xmin;
+               mask_rct.xmax = v2d->mask.xmax;
+               mask_rct.ymin = v2d->mask.ymin;
+               mask_rct.ymax = v2d->mask.ymax;
                
                if (v2d->scroll & (V2D_SCROLL_VERTICAL_HIDE|V2D_SCROLL_VERTICAL_FULLR)) {
                        if (v2d->scroll & V2D_SCROLL_LEFT)
-                               mask_rct.xmin= v2d->vert.xmin;
+                               mask_rct.xmin = v2d->vert.xmin;
                        else if (v2d->scroll & V2D_SCROLL_RIGHT)
-                               mask_rct.xmax= v2d->vert.xmax;
+                               mask_rct.xmax = v2d->vert.xmax;
                }
                if (v2d->scroll & (V2D_SCROLL_HORIZONTAL_HIDE|V2D_SCROLL_HORIZONTAL_FULLR)) {
                        if (v2d->scroll & (V2D_SCROLL_BOTTOM|V2D_SCROLL_BOTTOM_O))
-                               mask_rct.ymin= v2d->hor.ymin;
+                               mask_rct.ymin = v2d->hor.ymin;
                        else if (v2d->scroll & V2D_SCROLL_TOP)
-                               mask_rct.ymax= v2d->hor.ymax;
+                               mask_rct.ymax = v2d->hor.ymax;
                }
                
                /* check if in the rect */
index 723ffb3..1c2f2ca 100644 (file)
@@ -388,7 +388,7 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in
                                if(layer_used & (1<<(a+b*colbuts))) icon= ICON_LAYER_USED;
                                else icon= ICON_BLANK1;
 
-                               but= uiDefAutoButR(block, ptr, prop, a+b*colbuts, "", icon, x + butw*a, y+buth, butw, buth);
+                               but = uiDefAutoButR(block, ptr, prop, a+b*colbuts, "", icon, x + butw*a, y+buth, butw, buth);
                                if(subtype == PROP_LAYER_MEMBER)
                                        uiButSetFunc(but, ui_layer_but_cb, but, SET_INT_IN_POINTER(a+b*colbuts));
                        }
@@ -396,7 +396,7 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in
                                if(layer_used & (1<<(a+len/2+b*colbuts))) icon= ICON_LAYER_USED;
                                else icon= ICON_BLANK1;
 
-                               but= uiDefAutoButR(block, ptr, prop, a+len/2+b*colbuts, "", icon, x + butw*a, y, butw, buth);
+                               but = uiDefAutoButR(block, ptr, prop, a+len/2+b*colbuts, "", icon, x + butw*a, y, butw, buth);
                                if(subtype == PROP_LAYER_MEMBER)
                                        uiButSetFunc(but, ui_layer_but_cb, but, SET_INT_IN_POINTER(a+len/2+b*colbuts));
                        }
@@ -421,7 +421,7 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in
                        col= a % dim_size[0];
                        row= a / dim_size[0];
                        
-                       but= uiDefAutoButR(block, ptr, prop, a, "", ICON_NONE, x + w*col, y+(dim_size[1]*UI_UNIT_Y)-(row*UI_UNIT_Y), w, UI_UNIT_Y);
+                       but = uiDefAutoButR(block, ptr, prop, a, "", ICON_NONE, x + w*col, y+(dim_size[1]*UI_UNIT_Y)-(row*UI_UNIT_Y), w, UI_UNIT_Y);
                        if(slider && but->type==NUM)
                                but->type= NUMSLI;
                }
@@ -460,7 +460,7 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in
                        for(a=0; a<len; a++) {
                                if(!icon_only) str[0]= RNA_property_array_item_char(prop, a);
                                if(boolarr) icon= boolarr[a] ? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT;
-                               but= uiDefAutoButR(block, ptr, prop, a, str, icon, 0, 0, w, UI_UNIT_Y);
+                               but = uiDefAutoButR(block, ptr, prop, a, str, icon, 0, 0, w, UI_UNIT_Y);
                                if(slider && but->type==NUM)
                                        but->type= NUMSLI;
                                if(toggle && but->type==OPTION)
@@ -496,11 +496,11 @@ static void ui_item_enum_expand(uiLayout *layout, uiBlock *block, PointerRNA *pt
                itemw= ui_text_icon_width(block->curlayout, name, icon, 0);
 
                if(icon && name[0] && !icon_only)
-                       but= uiDefIconTextButR_prop(block, ROW, 0, icon, name, 0, 0, itemw, h, ptr, prop, -1, 0, value, -1, -1, NULL);
+                       but = uiDefIconTextButR_prop(block, ROW, 0, icon, name, 0, 0, itemw, h, ptr, prop, -1, 0, value, -1, -1, NULL);
                else if(icon)
-                       but= uiDefIconButR_prop(block, ROW, 0, icon, 0, 0, itemw, h, ptr, prop, -1, 0, value, -1, -1, NULL);
+                       but = uiDefIconButR_prop(block, ROW, 0, icon, 0, 0, itemw, h, ptr, prop, -1, 0, value, -1, -1, NULL);
                else
-                       but= uiDefButR_prop(block, ROW, 0, name, 0, 0, itemw, h, ptr, prop, -1, 0, value, -1, -1, NULL);
+                       but = uiDefButR_prop(block, ROW, 0, name, 0, 0, itemw, h, ptr, prop, -1, 0, value, -1, -1, NULL);
 
                if(ui_layout_local_dir(layout) != UI_LAYOUT_HORIZONTAL)
                        but->flag |= UI_TEXT_LEFT;
@@ -554,7 +554,7 @@ static uiBut *ui_item_with_label(uiLayout *layout, uiBlock *block, const char *n
                uiDefAutoButR(block, ptr, prop, index, "", icon, x, y, w-UI_UNIT_X, h);
 
                /* BUTTONS_OT_file_browse calls uiFileBrowseContextProperty */
-               but= uiDefIconButO(block, BUT, subtype==PROP_DIRPATH ?
+               but = uiDefIconButO(block, BUT, subtype==PROP_DIRPATH ?
                                       "BUTTONS_OT_directory_browse" :
                                       "BUTTONS_OT_file_browse",
                                   WM_OP_INVOKE_DEFAULT, ICON_FILESEL, x, y, UI_UNIT_X, h, NULL);
@@ -568,14 +568,14 @@ static uiBut *ui_item_with_label(uiLayout *layout, uiBlock *block, const char *n
 
                        WM_keymap_item_to_string(ptr->data, buf, sizeof(buf));
 
-                       but= uiDefButR_prop(block, HOTKEYEVT, 0, buf, x, y, w, h, ptr, prop, 0, 0, 0, -1, -1, NULL);
+                       but = uiDefButR_prop(block, HOTKEYEVT, 0, buf, x, y, w, h, ptr, prop, 0, 0, 0, -1, -1, NULL);
                        uiButSetFunc(but, ui_keymap_but_cb, but, NULL);
                        if (flag & UI_ITEM_R_IMMEDIATE)
                                uiButSetFlag(but, UI_BUT_IMMEDIATE);
                }
        }
        else
-               but= uiDefAutoButR(block, ptr, prop, index, (type == PROP_ENUM && !(flag & UI_ITEM_R_ICON_ONLY))? NULL: "", icon, x, y, w, h);
+               but = uiDefAutoButR(block, ptr, prop, index, (type == PROP_ENUM && !(flag & UI_ITEM_R_ICON_ONLY))? NULL: "", icon, x, y, w, h);
 
        uiBlockSetCurLayout(block, layout);
        return but;
@@ -625,7 +625,7 @@ static void ui_item_disabled(uiLayout *layout, const char *name)
 
        w= ui_text_icon_width(layout, name, 0, 0);
 
-       but= uiDefBut(block, LABEL, 0, name, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
+       but = uiDefBut(block, LABEL, 0, name, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
        but->flag |= UI_BUT_DISABLED;
        but->lock = 1;
        but->lockstr = "";
@@ -666,7 +666,7 @@ PointerRNA uiItemFullO_ptr(uiLayout *layout, wmOperatorType *ot, const char *nam
                }
        }
        else {
-               but= uiDefButO_ptr(block, BUT, ot, context, name, 0, 0, w, UI_UNIT_Y, NULL);
+               but = uiDefButO_ptr(block, BUT, ot, context, name, 0, 0, w, UI_UNIT_Y, NULL);
        }
 
        assert(but->optype != NULL);
@@ -1105,7 +1105,7 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
        }
        /* single button */
        else {
-               but= uiDefAutoButR(block, ptr, prop, index, name, icon, 0, 0, w, h);
+               but = uiDefAutoButR(block, ptr, prop, index, name, icon, 0, 0, w, h);
 
                if(slider && but->type==NUM)
                        but->type= NUMSLI;
@@ -1463,11 +1463,11 @@ static void ui_item_menu(uiLayout *layout, const char *name, int icon, uiMenuCre
                w -= 10;
 
        if(name[0] && icon)
-               but= uiDefIconTextMenuBut(block, func, arg, icon, name, 0, 0, w, h, tip);
+               but = uiDefIconTextMenuBut(block, func, arg, icon, name, 0, 0, w, h, tip);
        else if(icon)
-               but= uiDefIconMenuBut(block, func, arg, icon, 0, 0, w, h, tip);
+               but = uiDefIconMenuBut(block, func, arg, icon, 0, 0, w, h, tip);
        else
-               but= uiDefMenuBut(block, func, arg, name, 0, 0, w, h, tip);
+               but = uiDefMenuBut(block, func, arg, name, 0, 0, w, h, tip);
 
        if(argN) { /* ugly .. */
                but->poin= (char*)but;
@@ -1486,7 +1486,7 @@ void uiItemM(uiLayout *layout, bContext *UNUSED(C), const char *menuname, const
 {
        MenuType *mt;
 
-       mt= WM_menutype_find(menuname, FALSE);
+       mt = WM_menutype_find(menuname, FALSE);
 
        if(mt==NULL) {
                RNA_warning("not found %s", menuname);
@@ -1494,7 +1494,7 @@ void uiItemM(uiLayout *layout, bContext *UNUSED(C), const char *menuname, const
        }
 
        if(!name) {
-               name= IFACE_(mt->label);
+               name = IFACE_(mt->label);
        }
 
        if(layout->root->type == UI_LAYOUT_MENU && !icon)
@@ -1520,11 +1520,11 @@ static uiBut *uiItemL_(uiLayout *layout, const char *name, int icon)
        w= ui_text_icon_width(layout, name, icon, 0);
 
        if(icon && name[0])
-               but= uiDefIconTextBut(block, LABEL, 0, icon, name, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
+               but = uiDefIconTextBut(block, LABEL, 0, icon, name, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
        else if(icon)
-               but= uiDefIconBut(block, LABEL, 0, icon, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
+               but = uiDefIconBut(block, LABEL, 0, icon, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
        else
-               but= uiDefBut(block, LABEL, 0, name, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
+               but = uiDefBut(block, LABEL, 0, name, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
        
        return but;
 }
index c5abcd4..ffb8b0a 100644 (file)
@@ -441,7 +441,7 @@ static void ui_draw_aligned_panel_header(uiStyle *style, uiBlock *block, rcti *r
        Panel *panel= block->panel;
        rcti hrect;
        int  pnl_icons;
-       const char *activename= IFACE_(panel->drawname[0] ? panel->drawname : panel->panelname);
+       const char *activename = IFACE_(panel->drawname[0] ? panel->drawname : panel->panelname);
 
        /* + 0.001f to avoid flirting with float inaccuracy */
        if(panel->control & UI_PNL_CLOSE) pnl_icons=(panel->labelofs+2*PNL_ICON+5)/block->aspect + 0.001f;
@@ -453,7 +453,7 @@ static void ui_draw_aligned_panel_header(uiStyle *style, uiBlock *block, rcti *r
        
        hrect= *rect;
        if(dir == 'h') {
-               hrect.xmin= rect->xmin+pnl_icons;
+               hrect.xmin = rect->xmin+pnl_icons;
                hrect.ymin += 2.0f/block->aspect;
                uiStyleFontDraw(&style->paneltitle, &hrect, activename);
        }
@@ -461,7 +461,7 @@ static void ui_draw_aligned_panel_header(uiStyle *style, uiBlock *block, rcti *r
                /* ignore 'pnl_icons', otherwise the text gets offset horizontally 
                 * + 0.001f to avoid flirting with float inaccuracy
                 */
-               hrect.xmin= rect->xmin + (PNL_ICON+5)/block->aspect + 0.001f;
+               hrect.xmin = rect->xmin + (PNL_ICON+5)/block->aspect + 0.001f;
                uiStyleFontDrawRotated(&style->paneltitle, &hrect, activename);
        }
 }
@@ -473,10 +473,10 @@ static void rectf_scale(rctf *rect, float scale)
        float sizex= 0.5f*scale*(rect->xmax - rect->xmin);
        float sizey= 0.5f*scale*(rect->ymax - rect->ymin);
        
-       rect->xmin= centx - sizex;
-       rect->xmax= centx + sizex;
-       rect->ymin= centy - sizey;
-       rect->ymax= centy + sizey;
+       rect->xmin = centx - sizex;
+       rect->xmax = centx + sizex;
+       rect->ymin = centy - sizey;
+       rect->ymax = centy + sizey;
 }
 
 /* panel integrated in buttonswindow, tool/property lists etc */
@@ -494,8 +494,8 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
        /* calculate header rect */
        /* + 0.001f to prevent flicker due to float inaccuracy */
        headrect= *rect;
-       headrect.ymin= headrect.ymax;
-       headrect.ymax= headrect.ymin + floor(PNL_HEADER/block->aspect + 0.001f);
+       headrect.ymin = headrect.ymax;
+       headrect.ymax = headrect.ymin + floor(PNL_HEADER/block->aspect + 0.001f);
        
        {
                float minx= rect->xmin;
@@ -533,10 +533,10 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
                ui_draw_aligned_panel_header(style, block, &headrect, 'h');
                
                /* itemrect smaller */  
-               itemrect.xmax= headrect.xmax - 5.0f/block->aspect;
-               itemrect.xmin= itemrect.xmax - (headrect.ymax-headrect.ymin);
-               itemrect.ymin= headrect.ymin;
-               itemrect.ymax= headrect.ymax;
+               itemrect.xmax = headrect.xmax - 5.0f/block->aspect;
+               itemrect.xmin = itemrect.xmax - (headrect.ymax-headrect.ymin);
+               itemrect.ymin = headrect.ymin;
+               itemrect.ymax = headrect.ymax;
 
                rectf_scale(&itemrect, 0.7f);
                ui_draw_panel_dragwidget(&itemrect);
@@ -582,10 +582,10 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
        UI_ThemeColor(TH_TEXT);
        
        /* itemrect smaller */  
-       itemrect.xmin= headrect.xmin + 5.0f/block->aspect;
-       itemrect.xmax= itemrect.xmin + (headrect.ymax-headrect.ymin);
-       itemrect.ymin= headrect.ymin;
-       itemrect.ymax= headrect.ymax;
+       itemrect.xmin = headrect.xmin + 5.0f/block->aspect;
+       itemrect.xmax = itemrect.xmin + (headrect.ymax-headrect.ymin);
+       itemrect.ymin = headrect.ymin;
+       itemrect.ymax = headrect.ymax;
        
        rectf_scale(&itemrect, 0.35f);
        
index 9b60915..b375b8d 100644 (file)
@@ -386,8 +386,8 @@ static void ui_tooltip_region_draw_cb(const bContext *UNUSED(C), ARegion *ar)
        /* draw text */
        uiStyleFontSet(&data->fstyle);
 
-       bbox.ymax= bbox.ymax - 0.5f*((bbox.ymax - bbox.ymin) - data->toth);
-       bbox.ymin= bbox.ymax - data->lineh;
+       bbox.ymax = bbox.ymax - 0.5f*((bbox.ymax - bbox.ymin) - data->toth);
+       bbox.ymin = bbox.ymax - data->lineh;
 
        for (i = 0; i < data->totline; i++) {
                glColor3fv(tip_colors[data->color_id[i]]);
@@ -656,16 +656,16 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
        }
 
        /* widget rect, in region coords */
-       data->bbox.xmin= MENU_SHADOW_SIDE;
-       data->bbox.xmax= x2-x1 + MENU_SHADOW_SIDE;
-       data->bbox.ymin= MENU_SHADOW_BOTTOM;
-       data->bbox.ymax= y2-y1 + MENU_SHADOW_BOTTOM;
+       data->bbox.xmin = MENU_SHADOW_SIDE;
+       data->bbox.xmax = x2-x1 + MENU_SHADOW_SIDE;
+       data->bbox.ymin = MENU_SHADOW_BOTTOM;
+       data->bbox.ymax = y2-y1 + MENU_SHADOW_BOTTOM;
        
        /* region bigger for shadow */
-       ar->winrct.xmin= x1 - MENU_SHADOW_SIDE;
-       ar->winrct.xmax= x2 + MENU_SHADOW_SIDE;
-       ar->winrct.ymin= y1 - MENU_SHADOW_BOTTOM;
-       ar->winrct.ymax= y2 + MENU_TOP;
+       ar->winrct.xmin = x1 - MENU_SHADOW_SIDE;
+       ar->winrct.xmax = x2 + MENU_SHADOW_SIDE;
+       ar->winrct.ymin = y1 - MENU_SHADOW_BOTTOM;
+       ar->winrct.ymax = y2 + MENU_TOP;
 
        /* adds subwindow */
        ED_region_init(C, ar);
@@ -812,11 +812,11 @@ static void ui_searchbox_butrect(rcti *rect, uiSearchboxData *data, int itemnr)
                int buth= (data->bbox.ymax-data->bbox.ymin - 2*MENU_TOP)/SEARCH_ITEMS;
                
                *rect= data->bbox;
-               rect->xmin= data->bbox.xmin + 3.0f;
-               rect->xmax= data->bbox.xmax - 3.0f;
+               rect->xmin = data->bbox.xmin + 3.0f;
+               rect->xmax = data->bbox.xmax - 3.0f;
                
-               rect->ymax= data->bbox.ymax - MENU_TOP - itemnr*buth;
-               rect->ymin= rect->ymax - buth;
+               rect->ymax = data->bbox.ymax - MENU_TOP - itemnr*buth;
+               rect->ymin = rect->ymax - buth;
        }
        
 }
@@ -1099,10 +1099,10 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
                ar->winrct= butregion->winrct;
                
                /* widget rect, in region coords */
-               data->bbox.xmin= MENU_SHADOW_SIDE;
-               data->bbox.xmax= (ar->winrct.xmax-ar->winrct.xmin) - MENU_SHADOW_SIDE;
-               data->bbox.ymin= MENU_SHADOW_BOTTOM;
-               data->bbox.ymax= (ar->winrct.ymax-ar->winrct.ymin) - MENU_SHADOW_BOTTOM;
+               data->bbox.xmin = MENU_SHADOW_SIDE;
+               data->bbox.xmax = (ar->winrct.xmax-ar->winrct.xmin) - MENU_SHADOW_SIDE;
+               data->bbox.ymin = MENU_SHADOW_BOTTOM;
+               data->bbox.ymax = (ar->winrct.ymax-ar->winrct.ymin) - MENU_SHADOW_BOTTOM;
                
                /* check if button is lower half */
                if( but->y2 < (but->block->miny+but->block->maxy)/2 ) {
@@ -1166,16 +1166,16 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
                }
 
                /* widget rect, in region coords */
-               data->bbox.xmin= MENU_SHADOW_SIDE;
-               data->bbox.xmax= x2-x1 + MENU_SHADOW_SIDE;
-               data->bbox.ymin= MENU_SHADOW_BOTTOM;
-               data->bbox.ymax= y2-y1 + MENU_SHADOW_BOTTOM;
+               data->bbox.xmin = MENU_SHADOW_SIDE;
+               data->bbox.xmax = x2-x1 + MENU_SHADOW_SIDE;
+               data->bbox.ymin = MENU_SHADOW_BOTTOM;
+               data->bbox.ymax = y2-y1 + MENU_SHADOW_BOTTOM;
                
                /* region bigger for shadow */
-               ar->winrct.xmin= x1 - MENU_SHADOW_SIDE;
-               ar->winrct.xmax= x2 + MENU_SHADOW_SIDE;
-               ar->winrct.ymin= y1 - MENU_SHADOW_BOTTOM;
-               ar->winrct.ymax= y2;
+               ar->winrct.xmin = x1 - MENU_SHADOW_SIDE;
+               ar->winrct.xmax = x2 + MENU_SHADOW_SIDE;
+               ar->winrct.ymin = y1 - MENU_SHADOW_BOTTOM;
+               ar->winrct.ymax = y2;
        }
        
        /* adds subwindow */
@@ -1262,8 +1262,8 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but,
        short dir1= 0, dir2=0;
        
        /* transform to window coordinates, using the source button region/block */
-       butrct.xmin= but->x1; butrct.xmax= but->x2;
-       butrct.ymin= but->y1; butrct.ymax= but->y2;
+       butrct.xmin = but->x1; butrct.xmax = but->x2;
+       butrct.ymin = but->y1; butrct.ymax = but->y2;
 
        ui_block_to_window_fl(butregion, but->block, &butrct.xmin, &butrct.ymin);
        ui_block_to_window_fl(butregion, but->block, &butrct.xmax, &butrct.ymax);
@@ -1443,31 +1443,31 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but,
                /* when you are outside parent button, safety there should be smaller */
                
                // parent button to left
-               if( midx < block->minx ) block->safety.xmin= block->minx-3; 
-               else block->safety.xmin= block->minx-40;
+               if( midx < block->minx ) block->safety.xmin = block->minx-3; 
+               else block->safety.xmin = block->minx-40;
                // parent button to right
-               if( midx > block->maxx ) block->safety.xmax= block->maxx+3; 
-               else block->safety.xmax= block->maxx+40;
+               if( midx > block->maxx ) block->safety.xmax = block->maxx+3; 
+               else block->safety.xmax = block->maxx+40;
                
                // parent button on bottom
-               if( midy < block->miny ) block->safety.ymin= block->miny-3; 
-               else block->safety.ymin= block->miny-40;
+               if( midy < block->miny ) block->safety.ymin = block->miny-3; 
+               else block->safety.ymin = block->miny-40;
                // parent button on top
-               if( midy > block->maxy ) block->safety.ymax= block->maxy+3; 
-               else block->safety.ymax= block->maxy+40;
+               if( midy > block->maxy ) block->safety.ymax = block->maxy+3; 
+               else block->safety.ymax = block->maxy+40;
                
                // exception for switched pulldowns...
                if(dir1 && (dir1 & block->direction)==0) {
-                       if(dir2==UI_RIGHT) block->safety.xmax= block->maxx+3; 
-                       if(dir2==UI_LEFT) block->safety.xmin= block->minx-3; 
+                       if(dir2==UI_RIGHT) block->safety.xmax = block->maxx+3; 
+                       if(dir2==UI_LEFT) block->safety.xmin = block->minx-3; 
                }
                block->direction= dir1;
        }
        else {
-               block->safety.xmin= block->minx-40;
-               block->safety.ymin= block->miny-40;
-               block->safety.xmax= block->maxx+40;
-               block->safety.ymax= block->maxy+40;
+               block->safety.xmin = block->minx-40;
+               block->safety.ymin = block->miny-40;
+               block->safety.xmax = block->maxx+40;
+               block->safety.ymax = block->maxy+40;
        }
 
        /* keep a list of these, needed for pulldown menus */
@@ -1615,10 +1615,10 @@ uiPopupBlockHandle *ui_popup_block_create(bContext *C, ARegion *butregion, uiBut
        /* the block and buttons were positioned in window space as in 2.4x, now
         * these menu blocks are regions so we bring it back to region space.
         * additionally we add some padding for the menu shadow or rounded menus */
-       ar->winrct.xmin= block->minx - MENU_SHADOW_SIDE;
-       ar->winrct.xmax= block->maxx + MENU_SHADOW_SIDE;
-       ar->winrct.ymin= block->miny - MENU_SHADOW_BOTTOM;
-       ar->winrct.ymax= block->maxy + MENU_TOP;
+       ar->winrct.xmin = block->minx - MENU_SHADOW_SIDE;
+       ar->winrct.xmax = block->maxx + MENU_SHADOW_SIDE;
+       ar->winrct.ymin = block->miny - MENU_SHADOW_BOTTOM;
+       ar->winrct.ymax = block->maxy + MENU_TOP;
        
        block->minx -= ar->winrct.xmin;
        block->maxx -= ar->winrct.xmin;
@@ -2457,7 +2457,7 @@ uiPopupMenu *uiPupMenuBegin(bContext *C, const char *title, int icon)
                        uiDefIconTextBut(pup->block, LABEL, 0, icon, titlestr, 0, 0, 200, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
                }
                else {
-                       but= uiDefBut(pup->block, LABEL, 0, title, 0, 0, 200, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
+                       but = uiDefBut(pup->block, LABEL, 0, title, 0, 0, 200, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
                        but->flag= UI_TEXT_LEFT;
                }
        }
@@ -2629,7 +2629,7 @@ void uiPupMenuInvoke(bContext *C, const char *idname)
        uiPopupMenu *pup;
        uiLayout *layout;
        Menu menu;
-       MenuType *mt= WM_menutype_find(idname, TRUE);
+       MenuType *mt = WM_menutype_find(idname, TRUE);
 
        if(mt==NULL) {
                printf("%s: named menu \"%s\" not found\n", __func__, idname);
index 65e2b98..580b0ff 100644 (file)
@@ -219,10 +219,10 @@ void uiStyleFontDrawRotated(uiFontStyle *fs, rcti *rect, const char *str)
        angle= 90.0f;
 
        /* translate rect to vertical */
-       txtrect.xmin= rect->xmin - (rect->ymax - rect->ymin);
-       txtrect.ymin= rect->ymin - (rect->xmax - rect->xmin);
-       txtrect.xmax= rect->xmin;
-       txtrect.ymax= rect->ymin;
+       txtrect.xmin = rect->xmin - (rect->ymax - rect->ymin);
+       txtrect.ymin = rect->ymin - (rect->xmax - rect->xmin);
+       txtrect.xmax = rect->xmin;
+       txtrect.ymax = rect->ymin;
 
        /* clip is very strict, so we give it some space */
        /* clipping is done without rotation, so make rect big enough to contain both positions */
index 2b225fb..ca6b37f 100644 (file)
@@ -182,7 +182,7 @@ static uiBlock *id_search_menu(bContext *C, ARegion *ar, void *arg_litem)
                /* fake button, it holds space for search items */
                uiDefBut(block, LABEL, 0, "", 10, 15, w, h, NULL, 0, 0, 0, 0, NULL);
                
-               but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, w, 19, template.prv_rows, template.prv_cols, "");
+               but = uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, w, 19, template.prv_rows, template.prv_cols, "");
                uiButSetSearchFunc(but, id_search_cb, &template, id_search_call_cb, idptr.data);
        }
        /* list view */
@@ -190,7 +190,7 @@ static uiBlock *id_search_menu(bContext *C, ARegion *ar, void *arg_litem)
                /* fake button, it holds space for search items */
                uiDefBut(block, LABEL, 0, "", 10, 15, 150, uiSearchBoxhHeight(), NULL, 0, 0, 0, 0, NULL);
                
-               but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, 150, 19, 0, 0, "");
+               but = uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, 150, 19, 0, 0, "");
                uiButSetSearchFunc(but, id_search_cb, &template, id_search_call_cb, idptr.data);
        }
                
@@ -360,7 +360,7 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
 
        if(flag & UI_ID_PREVIEWS) {
 
-               but= uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*6, UI_UNIT_Y*6,
+               but = uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*6, UI_UNIT_Y*6,
                                TIP_(template_id_browse_tip(type)));
                if(type) {
                        but->icon= RNA_struct_ui_icon(type);
@@ -374,7 +374,7 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
                template->preview= 1;
        }
        else if(flag & UI_ID_BROWSE) {
-               but= uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*1.6, UI_UNIT_Y,
+               but = uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*1.6, UI_UNIT_Y,
                                TIP_(template_id_browse_tip(type)));
                if(type) {
                        but->icon= RNA_struct_ui_icon(type);
@@ -394,18 +394,18 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
 
                //text_idbutton(id, name);
                name[0]= '\0';
-               but= uiDefButR(block, TEX, 0, name, 0, 0, UI_UNIT_X*6, UI_UNIT_Y, &idptr, "name", -1, 0, 0, -1, -1, NULL);
+               but = uiDefButR(block, TEX, 0, name, 0, 0, UI_UNIT_X*6, UI_UNIT_Y, &idptr, "name", -1, 0, 0, -1, -1, NULL);
                uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_RENAME));
                if(user_alert) uiButSetFlag(but, UI_BUT_REDALERT);
 
                if(id->lib) {
                        if(id->flag & LIB_INDIRECT) {
-                               but= uiDefIconBut(block, BUT, 0, ICON_LIBRARY_DATA_INDIRECT, 0,0,UI_UNIT_X,UI_UNIT_Y, NULL, 0, 0, 0, 0,
+                               but = uiDefIconBut(block, BUT, 0, ICON_LIBRARY_DATA_INDIRECT, 0,0,UI_UNIT_X,UI_UNIT_Y, NULL, 0, 0, 0, 0,
                                        TIP_("Indirect library datablock, cannot change"));
                                uiButSetFlag(but, UI_BUT_DISABLED);
                        }
                        else {
-                               but= uiDefIconBut(block, BUT, 0, ICON_LIBRARY_DATA_DIRECT, 0,0,UI_UNIT_X,UI_UNIT_Y, NULL, 0, 0, 0, 0,
+                               but = uiDefIconBut(block, BUT, 0, ICON_LIBRARY_DATA_DIRECT, 0,0,UI_UNIT_X,UI_UNIT_Y, NULL, 0, 0, 0, 0,
                                        TIP_("Direct linked library datablock, click to make local"));
                                if(!id_make_local(id, 1 /* test */) || (idfrom && idfrom->lib))
                                        uiButSetFlag(but, UI_BUT_DISABLED);
@@ -419,7 +419,7 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
 
                        BLI_snprintf(numstr, sizeof(numstr), "%d", id->us);
 
-                       but= uiDefBut(block, BUT, 0, numstr, 0,0,UI_UNIT_X + ((id->us < 10) ? 0:10), UI_UNIT_Y, NULL, 0, 0, 0, 0,
+                       but = uiDefBut(block, BUT, 0, numstr, 0,0,UI_UNIT_X + ((id->us < 10) ? 0:10), UI_UNIT_Y, NULL, 0, 0, 0, 0,
                                      TIP_("Display number of users of this data (click to make a single-user copy)"));
 
                        uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ALONE));
@@ -438,11 +438,11 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
                int w= id?UI_UNIT_X: (flag & UI_ID_OPEN)? UI_UNIT_X*3: UI_UNIT_X*6;
                
                if(newop) {
-                       but= uiDefIconTextButO(block, BUT, newop, WM_OP_INVOKE_DEFAULT, ICON_ZOOMIN, (id)? "": IFACE_("New"), 0, 0, w, UI_UNIT_Y, NULL);
+                       but = uiDefIconTextButO(block, BUT, newop, WM_OP_INVOKE_DEFAULT, ICON_ZOOMIN, (id)? "": IFACE_("New"), 0, 0, w, UI_UNIT_Y, NULL);
                        uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ADD_NEW));
                }
                else {
-                       but= uiDefIconTextBut(block, BUT, 0, ICON_ZOOMIN, (id)? "": IFACE_("New"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
+                       but = uiDefIconTextBut(block, BUT, 0, ICON_ZOOMIN, (id)? "": IFACE_("New"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
                        uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ADD_NEW));
                }
 
@@ -454,11 +454,11 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
                int w= id?UI_UNIT_X: (flag & UI_ID_ADD_NEW)? UI_UNIT_X*3: UI_UNIT_X*6;
                
                if(openop) {
-                       but= uiDefIconTextButO(block, BUT, openop, WM_OP_INVOKE_DEFAULT, ICON_FILESEL, (id)? "": IFACE_("Open"), 0, 0, w, UI_UNIT_Y, NULL);
+                       but = uiDefIconTextButO(block, BUT, openop, WM_OP_INVOKE_DEFAULT, ICON_FILESEL, (id)? "": IFACE_("Open"), 0, 0, w, UI_UNIT_Y, NULL);
                        uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_OPEN));
                }
                else {
-                       but= uiDefIconTextBut(block, BUT, 0, ICON_FILESEL, (id)? "": IFACE_("Open"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
+                       but = uiDefIconTextBut(block, BUT, 0, ICON_FILESEL, (id)? "": IFACE_("Open"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
                        uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_OPEN));
                }
 
@@ -469,12 +469,12 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
        /* delete button */
        if(id && (flag & UI_ID_DELETE) && (RNA_property_flag(template->prop) & PROP_NEVER_UNLINK)==0) {
                if(unlinkop) {
-                       but= uiDefIconButO(block, BUT, unlinkop, WM_OP_INVOKE_REGION_WIN, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL);
+                       but = uiDefIconButO(block, BUT, unlinkop, WM_OP_INVOKE_REGION_WIN, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL);
                        /* so we can access the template from operators, font unlinking needs this */
                        uiButSetNFunc(but, NULL, MEM_dupallocN(template), NULL);
                }
                else {
-                       but= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0,
+                       but = uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0,
                                        TIP_("Unlink datablock. Shift + Click to set users to zero, data will then not be saved"));
                        uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_DELETE));
 
@@ -787,7 +787,7 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob,
 
                                /* place holder button */
                                uiBlockSetEmboss(block, UI_EMBOSSN);
-                               but= uiDefIconBut(block, BUT, 0, ICON_NONE, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, NULL);
+                               but = uiDefIconBut(block, BUT, 0, ICON_NONE, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, NULL);
                                uiButSetFlag(but, UI_BUT_DISABLED);
                                uiBlockSetEmboss(block, UI_EMBOSS);
                        }
@@ -1431,8 +1431,8 @@ void uiTemplateColorRamp(uiLayout *layout, PointerRNA *ptr, const char *propname
        cb->ptr= *ptr;
        cb->prop= prop;
 
-       rect.xmin= 0; rect.xmax= 200;
-       rect.ymin= 0; rect.ymax= 190;
+       rect.xmin = 0; rect.xmax = 200;
+       rect.ymin = 0; rect.ymax = 190;
 
        block= uiLayoutAbsoluteBlock(layout);
        colorband_buttons_layout(layout, block, cptr.data, &rect, !expand, cb);
@@ -1463,8 +1463,8 @@ void uiTemplateHistogram(uiLayout *layout, PointerRNA *ptr, const char *propname
        cb->ptr= *ptr;
        cb->prop= prop;
        
-       rect.xmin= 0; rect.xmax= 200;
-       rect.ymin= 0; rect.ymax= 190;
+       rect.xmin = 0; rect.xmax = 200;
+       rect.ymin = 0; rect.ymax = 190;
        
        block= uiLayoutAbsoluteBlock(layout);
        //colorband_buttons_layout(layout, block, cptr.data, &rect, !expand, cb);
@@ -1503,8 +1503,8 @@ void uiTemplateWaveform(uiLayout *layout, PointerRNA *ptr, const char *propname)
        cb->ptr= *ptr;
        cb->prop= prop;
        
-       rect.xmin= 0; rect.xmax= 200;
-       rect.ymin= 0; rect.ymax= 190;
+       rect.xmin = 0; rect.xmax = 200;
+       rect.ymin = 0; rect.ymax = 190;
        
        block= uiLayoutAbsoluteBlock(layout);
        
@@ -1540,8 +1540,8 @@ void uiTemplateVectorscope(uiLayout *layout, PointerRNA *ptr, const char *propna
        cb->ptr= *ptr;
        cb->prop= prop;
        
-       rect.xmin= 0; rect.xmax= 200;
-       rect.ymin= 0; rect.ymax= 190;
+       rect.xmin = 0; rect.xmax = 200;
+       rect.ymin = 0; rect.ymax = 190;
        
        block= uiLayoutAbsoluteBlock(layout);
 
@@ -1937,7 +1937,7 @@ void uiTemplateColorWheel(uiLayout *layout, PointerRNA *ptr, const char *propnam
        col = uiLayoutColumn(layout, 0);
        row= uiLayoutRow(col, 1);
        
-       but= uiDefButR_prop(block, HSVCIRCLE, 0, "",    0, 0, WHEEL_SIZE, WHEEL_SIZE, ptr, prop, -1, 0.0, 0.0, 0, 0, "");
+       but = uiDefButR_prop(block, HSVCIRCLE, 0, "",   0, 0, WHEEL_SIZE, WHEEL_SIZE, ptr, prop, -1, 0.0, 0.0, 0, 0, "");
 
        if(lock) {
                but->flag |= UI_BUT_COLOR_LOCK;
@@ -2046,7 +2046,7 @@ void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, const char *propname,
                                else if(used_prop && RNA_property_boolean_get_index(used_ptr, used_prop, layer))
                                        icon = ICON_LAYER_USED;
                                
-                               but= uiDefAutoButR(block, ptr, prop, layer, "", icon, 0, 0, UI_UNIT_X/2, UI_UNIT_Y/2);
+                               but = uiDefAutoButR(block, ptr, prop, layer, "", icon, 0, 0, UI_UNIT_X/2, UI_UNIT_Y/2);
                                uiButSetFunc(but, handle_layer_buttons, but, SET_INT_IN_POINTER(layer));
                                but->type= TOG;
                        }
@@ -2108,7 +2108,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
        /* list item behind label & other buttons */
        sub= uiLayoutRow(overlap, 0);
 
-       but= uiDefButR_prop(block, LISTROW, 0, "", 0,0, UI_UNIT_X*10,UI_UNIT_Y, activeptr, activeprop, 0, 0, i, 0, 0, "");
+       but = uiDefButR_prop(block, LISTROW, 0, "", 0,0, UI_UNIT_X*10,UI_UNIT_Y, activeptr, activeprop, 0, 0, i, 0, 0, "");
        uiButSetFlag(but, UI_BUT_NO_TOOLTIP);
 
        sub= uiLayoutRow(overlap, 0);
@@ -2366,7 +2366,7 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
                                        row= uiLayoutRow(col, 0);
 
                                icon= list_item_icon_get(C, &itemptr, rnaicon, 1);
-                               but= uiDefIconButR_prop(block, LISTROW, 0, icon, 0,0,UI_UNIT_X*10,UI_UNIT_Y, activeptr, activeprop, 0, 0, i, 0, 0, "");
+                               but = uiDefIconButR_prop(block, LISTROW, 0, icon, 0,0,UI_UNIT_X*10,UI_UNIT_Y, activeptr, activeprop, 0, 0, i, 0, 0, "");
                                uiButSetFlag(but, UI_BUT_NO_TOOLTIP);
                                
 
@@ -2407,7 +2407,7 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
 
                /* next/prev button */
                BLI_snprintf(numstr, sizeof(numstr), "%d :", i);
-               but= uiDefIconTextButR_prop(block, NUM, 0, 0, numstr, 0,0,UI_UNIT_X*5,UI_UNIT_Y, activeptr, activeprop, 0, 0, 0, 0, 0, "");
+               but = uiDefIconTextButR_prop(block, NUM, 0, 0, numstr, 0,0,UI_UNIT_X*5,UI_UNIT_Y, activeptr, activeprop, 0, 0, 0, 0, 0, "");
                if(i == 0)
                        uiButSetFlag(but, UI_BUT_DISABLED);
        }
@@ -2519,7 +2519,7 @@ void uiTemplateOperatorSearch(uiLayout *layout)
        block= uiLayoutGetBlock(layout);
        uiBlockSetCurLayout(block, layout);
 
-       but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 0, 0, UI_UNIT_X*6, UI_UNIT_Y, 0, 0, "");
+       but = uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 0, 0, UI_UNIT_X*6, UI_UNIT_Y, 0, 0, "");
        uiButSetSearchFunc(but, operator_search_cb, NULL, operator_call_cb, NULL);
 }
 
@@ -2644,12 +2644,12 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
        
        /* make a box around the report to make it stand out */
        uiBlockBeginAlign(block);
-       but= uiDefBut(block, ROUNDBOX, 0, "", 0, 0, UI_UNIT_X+10, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "");
+       but = uiDefBut(block, ROUNDBOX, 0, "", 0, 0, UI_UNIT_X+10, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "");
        /* set the report's bg color in but->col - ROUNDBOX feature */
        rgb_float_to_uchar(but->col, rti->col);
        but->col[3]= 255; 
 
-       but= uiDefBut(block, ROUNDBOX, 0, "", UI_UNIT_X+10, 0, UI_UNIT_X+width, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "");
+       but = uiDefBut(block, ROUNDBOX, 0, "", UI_UNIT_X+10, 0, UI_UNIT_X+width, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "");
        but->col[0]= but->col[1]= but->col[2]= FTOCHAR(rti->greyscale);
        but->col[3]= 255;
 
@@ -2683,7 +2683,7 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
 
 static void keymap_item_modified(bContext *UNUSED(C), void *kmi_p, void *UNUSED(unused))
 {
-       wmKeyMapItem *kmi= (wmKeyMapItem*)kmi_p;
+       wmKeyMapItem *kmi = (wmKeyMapItem*)kmi_p;
        WM_keyconfig_update_tag(NULL, kmi);
 }
 
index 610e9f8..6692bd7 100644 (file)
@@ -64,11 +64,11 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
                                return NULL;
                        
                        if(icon && name && name[0] == '\0')
-                               but= uiDefIconButR_prop(block, ICONTOG, 0, icon, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+                               but = uiDefIconButR_prop(block, ICONTOG, 0, icon, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
                        else if(icon)
-                               but= uiDefIconTextButR_prop(block, ICONTOG, 0, icon, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+                               but = uiDefIconTextButR_prop(block, ICONTOG, 0, icon, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
                        else
-                               but= uiDefButR_prop(block, OPTION, 0, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+                               but = uiDefButR_prop(block, OPTION, 0, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
                        break;
                }
                case PROP_INT:
@@ -78,29 +78,29 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
 
                        if(arraylen && index == -1) {
                                if(ELEM(RNA_property_subtype(prop), PROP_COLOR, PROP_COLOR_GAMMA))
-                                       but= uiDefButR_prop(block, COL, 0, name, x1, y1, x2, y2, ptr, prop, 0, 0, 0, -1, -1, NULL);
+                                       but = uiDefButR_prop(block, COL, 0, name, x1, y1, x2, y2, ptr, prop, 0, 0, 0, -1, -1, NULL);
                        }
                        else if(RNA_property_subtype(prop) == PROP_PERCENTAGE || RNA_property_subtype(prop) == PROP_FACTOR)
-                               but= uiDefButR_prop(block, NUMSLI, 0, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+                               but = uiDefButR_prop(block, NUMSLI, 0, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
                        else
-                               but= uiDefButR_prop(block, NUM, 0, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+                               but = uiDefButR_prop(block, NUM, 0, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
                        break;
                }
                case PROP_ENUM:
                        if(icon && name && name[0] == '\0')
-                               but= uiDefIconButR_prop(block, MENU, 0, icon, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+                               but = uiDefIconButR_prop(block, MENU, 0, icon, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
                        else if(icon)
-                               but= uiDefIconTextButR_prop(block, MENU, 0, icon, NULL, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+                               but = uiDefIconTextButR_prop(block, MENU, 0, icon, NULL, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
                        else
-                               but= uiDefButR_prop(block, MENU, 0, NULL, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+                               but = uiDefButR_prop(block, MENU, 0, NULL, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
                        break;
                case PROP_STRING:
                        if(icon && name && name[0] == '\0')
-                               but= uiDefIconButR_prop(block, TEX, 0, icon, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+                               but = uiDefIconButR_prop(block, TEX, 0, icon, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
                        else if(icon)
-                               but= uiDefIconTextButR_prop(block, TEX, 0, icon, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+                               but = uiDefIconTextButR_prop(block, TEX, 0, icon, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
                        else
-                               but= uiDefButR_prop(block, TEX, 0, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+                               but = uiDefButR_prop(block, TEX, 0, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
                        break;
                case PROP_POINTER: {
                        PointerRNA pptr;
@@ -112,13 +112,13 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
                        if(icon == ICON_DOT)
                                icon= 0;
 
-                       but= uiDefIconTextButR_prop(block, IDPOIN, 0, icon, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+                       but = uiDefIconTextButR_prop(block, IDPOIN, 0, icon, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
                        break;
                }
                case PROP_COLLECTION: {
                        char text[256];
                        BLI_snprintf(text, sizeof(text), IFACE_("%d items"), RNA_property_collection_length(ptr, prop));
-                       but= uiDefBut(block, LABEL, 0, text, x1, y1, x2, y2, NULL, 0, 0, 0, 0, NULL);
+                       but = uiDefBut(block, LABEL, 0, text, x1, y1, x2, y2, NULL, 0, 0, 0, 0, NULL);
                        uiButSetFlag(but, UI_BUT_DISABLED);
                        break;
                }
index a8df7ec..32cb3f9 100644 (file)
@@ -2347,35 +2347,35 @@ static void widget_scroll(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat
        
        if(horizontal) {
                fac= (rect->xmax - rect->xmin)/(size);
-               rect1.xmin= rect1.xmin + ceilf(fac*((float)value - but->softmin));
-               rect1.xmax= rect1.xmin + ceilf(fac*(but->a1 - but->softmin));
+               rect1.xmin = rect1.xmin + ceilf(fac*((float)value - but->softmin));
+               rect1.xmax = rect1.xmin + ceilf(fac*(but->a1 - but->softmin));
 
                /* ensure minimium size */
                min= rect->ymax - rect->ymin;
 
                if(rect1.xmax - rect1.xmin < min) {
-                       rect1.xmax= rect1.xmin + min;
+                       rect1.xmax = rect1.xmin + min;
 
                        if(rect1.xmax > rect->xmax) {
-                               rect1.xmax= rect->xmax;
-                               rect1.xmin= MAX2(rect1.xmax - min, rect->xmin);
+                               rect1.xmax = rect->xmax;
+                               rect1.xmin = MAX2(rect1.xmax - min, rect->xmin);
                        }
                }
        }
        else {
                fac= (rect->ymax - rect->ymin)/(size);
-               rect1.ymax= rect1.ymax - ceilf(fac*((float)value - but->softmin));
-               rect1.ymin= rect1.ymax - ceilf(fac*(but->a1 - but->softmin));
+               rect1.ymax = rect1.ymax - ceilf(fac*((float)value - but->softmin));
+               rect1.ymin = rect1.ymax - ceilf(fac*(but->a1 - but->softmin));
 
                /* ensure minimium size */
                min= rect->xmax - rect->xmin;
 
                if(rect1.ymax - rect1.ymin < min) {
-                       rect1.ymax= rect1.ymin + min;
+                       rect1.ymax = rect1.ymin + min;
 
                        if(rect1.ymax > rect->ymax) {
-                               rect1.ymax= rect->ymax;
-                               rect1.ymin= MAX2(rect1.ymax - min, rect->ymin);
+                               rect1.ymax = rect->ymax;
+                               rect1.ymin = MAX2(rect1.ymax - min, rect->ymin);
                        }
                }
        }
@@ -2421,10 +2421,10 @@ static void widget_link(uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect, in
                
                UI_ThemeColor(TH_TEXT_HI);
                
-               rectlink.xmin= (rect->xmin+rect->xmax)/2;
-               rectlink.ymin= (rect->ymin+rect->ymax)/2;
-               rectlink.xmax= but->linkto[0];
-               rectlink.ymax= but->linkto[1];
+               rectlink.xmin = (rect->xmin+rect->xmax)/2;
+               rectlink.ymin = (rect->ymin+rect->ymax)/2;
+               rectlink.xmax = but->linkto[0];
+               rectlink.ymax = but->linkto[1];
                
                ui_draw_link_bezier(&rectlink);
        }
@@ -2468,13 +2468,13 @@ static void widget_numslider(uiBut *but, uiWidgetColors *wcol, rcti *rect, int s
                fac= ((float)value-but->softmin)*(rect1.xmax - rect1.xmin - offs)/(but->softmax - but->softmin);
                
                /* left part of slider, always rounded */
-               rect1.xmax= rect1.xmin + ceil(offs+1.0f);
+               rect1.xmax = rect1.xmin + ceil(offs+1.0f);
                round_box_edges(&wtb1, roundboxalign & ~(UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT), &rect1, offs);
                wtb1.outline= 0;
                widgetbase_draw(&wtb1, wcol);
                
                /* right part of slider, interpolate roundness */
-               rect1.xmax= rect1.xmin + fac + offs;
+               rect1.xmax = rect1.xmin + fac + offs;
                rect1.xmin+=  floor(offs-1.0f);
                if(rect1.xmax + offs > rect->xmax)
                        offs*= (rect1.xmax + offs - rect->xmax)/offs;
@@ -2687,7 +2687,7 @@ static void widget_optionbut(uiWidgetColors *wcol, rcti *rect, int state, int UN
        widget_init(&wtb);
        
        /* square */
-       recttemp.xmax= recttemp.xmin + (recttemp.ymax-recttemp.ymin);
+       recttemp.xmax = recttemp.xmin + (recttemp.ymax-recttemp.ymin);
        
        /* smaller */
        delta= 1 + (recttemp.ymax-recttemp.ymin)/8;
@@ -3313,7 +3313,7 @@ void ui_draw_menu_item(uiFontStyle *fstyle, rcti *rect, const char *name, int ic
        /* part text right aligned */
        if(cpoin) {
                fstyle->align= UI_STYLE_TEXT_RIGHT;
-               rect->xmax= _rect.xmax - 5;
+               rect->xmax = _rect.xmax - 5;
                uiStyleFontDraw(fstyle, rect, cpoin+1);
                *cpoin= '|';
        }
index 142584f..8c67502 100644 (file)
@@ -86,9 +86,9 @@ static void view2d_masks(View2D *v2d)
        int scroll;
        
        /* mask - view frame */
-       v2d->mask.xmin= v2d->mask.ymin= 0;
-       v2d->mask.xmax= v2d->winx - 1;  /* -1 yes! masks are pixels */
-       v2d->mask.ymax= v2d->winy - 1;
+       v2d->mask.xmin = v2d->mask.ymin = 0;
+       v2d->mask.xmax = v2d->winx - 1; /* -1 yes! masks are pixels */
+       v2d->mask.ymax = v2d->winy - 1;
 
 #if 0
        // XXX see above
@@ -114,29 +114,29 @@ static void view2d_masks(View2D *v2d)
                if (scroll & V2D_SCROLL_LEFT) {
                        /* on left-hand edge of region */
                        v2d->vert= v2d->mask;
-                       v2d->vert.xmax= V2D_SCROLL_WIDTH;
-                       v2d->mask.xmin= v2d->vert.xmax + 1;
+                       v2d->vert.xmax = V2D_SCROLL_WIDTH;
+                       v2d->mask.xmin = v2d->vert.xmax + 1;
                }
                else if (scroll & V2D_SCROLL_RIGHT) {
                        /* on right-hand edge of region */
                        v2d->vert= v2d->mask;
                        v2d->vert.xmax++; /* one pixel extra... was leaving a minor gap... */
-                       v2d->vert.xmin= v2d->vert.xmax - V2D_SCROLL_WIDTH;
-                       v2d->mask.xmax= v2d->vert.xmin - 1;
+                       v2d->vert.xmin = v2d->vert.xmax - V2D_SCROLL_WIDTH;
+                       v2d->mask.xmax = v2d->vert.xmin - 1;
                }
                
                /* horizontal scroller */
                if (scroll & (V2D_SCROLL_BOTTOM|V2D_SCROLL_BOTTOM_O)) {
                        /* on bottom edge of region (V2D_SCROLL_BOTTOM_O is outliner, the other is for standard) */
                        v2d->hor= v2d->mask;
-                       v2d->hor.ymax= V2D_SCROLL_HEIGHT;
-                       v2d->mask.ymin= v2d->hor.ymax + 1;
+                       v2d->hor.ymax = V2D_SCROLL_HEIGHT;
+                       v2d->mask.ymin = v2d->hor.ymax + 1;
                }
                else if (scroll & V2D_SCROLL_TOP) {
                        /* on upper edge of region */
                        v2d->hor= v2d->mask;
-                       v2d->hor.ymin= v2d->hor.ymax - V2D_SCROLL_HEIGHT;
-                       v2d->mask.ymax= v2d->hor.ymin - 1;
+                       v2d->hor.ymin = v2d->hor.ymax - V2D_SCROLL_HEIGHT;
+                       v2d->mask.ymax = v2d->hor.ymin - 1;
                }
                
                /* adjust vertical scroller if there's a horizontal scroller, to leave corner free */
@@ -144,11 +144,11 @@ static void view2d_masks(View2D *v2d)
                        /* just set y min/max for vertical scroller to y min/max of mask as appropriate */
                        if (scroll & (V2D_SCROLL_BOTTOM|V2D_SCROLL_BOTTOM_O)) {
                                /* on bottom edge of region (V2D_SCROLL_BOTTOM_O is outliner, the other is for standard) */
-                               v2d->vert.ymin= v2d->mask.ymin;
+                               v2d->vert.ymin = v2d->mask.ymin;
                        }
                        else if (scroll & V2D_SCROLL_TOP) {
                                /* on upper edge of region */
-                               v2d->vert.ymax= v2d->mask.ymax;
+                               v2d->vert.ymax = v2d->mask.ymax;
                        }
                }
        }
@@ -196,9 +196,9 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
                                v2d->align= (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y);
                                v2d->keeptot= V2D_KEEPTOT_BOUNDS;
                                
-                               v2d->tot.xmin= v2d->tot.ymin= 0.0f;
-                               v2d->tot.xmax= (float)(winx - 1);
-                               v2d->tot.ymax= (float)(winy - 1);
+                               v2d->tot.xmin = v2d->tot.ymin = 0.0f;
+                               v2d->tot.xmax = (float)(winx - 1);
+                               v2d->tot.ymax = (float)(winy - 1);
                                
                                v2d->cur= v2d->tot;
                                
@@ -281,18 +281,18 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
                                v2d->scroll |= V2D_SCROLL_HORIZONTAL_HIDE;
                                v2d->scroll &= ~V2D_SCROLL_VERTICAL_HIDE;
 
-                               v2d->tot.xmin= 0.0f;
-                               v2d->tot.xmax= winx;
+                               v2d->tot.xmin = 0.0f;
+                               v2d->tot.xmax = winx;
                                
-                               v2d->tot.ymax= 0.0f;
-                               v2d->tot.ymin= -winy;
+                               v2d->tot.ymax = 0.0f;
+                               v2d->tot.ymin = -winy;
                                
-                               v2d->cur.xmin= 0.0f;
+                               v2d->cur.xmin = 0.0f;
                                /* bad workaround for keeping zoom level with scrollers */
-                               v2d->cur.xmax= (winx - V2D_SCROLL_WIDTH)*panelzoom;
+                               v2d->cur.xmax = (winx - V2D_SCROLL_WIDTH)*panelzoom;
                                
-                               v2d->cur.ymax= 0.0f;
-                               v2d->cur.ymin= (-winy)*panelzoom;
+                               v2d->cur.ymax = 0.0f;
+                               v2d->cur.ymin = (-winy)*panelzoom;
                        }
                                break;
                                
@@ -546,8 +546,8 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
                /* width */
                if ( (curwidth > totwidth) && !(v2d->keepzoom & (V2D_KEEPZOOM|V2D_LOCKZOOM_X|V2D_LIMITZOOM)) ) {
                        /* if zoom doesn't have to be maintained, just clamp edges */
-                       if (cur->xmin < tot->xmin) cur->xmin= tot->xmin;
-                       if (cur->xmax > tot->xmax) cur->xmax= tot->xmax;
+                       if (cur->xmin < tot->xmin) cur->xmin = tot->xmin;
+                       if (cur->xmax > tot->xmax) cur->xmax = tot->xmax;
                }
                else if (v2d->keeptot == V2D_KEEPTOT_STRICT) {
                        /* This is an exception for the outliner (and later channel-lists, headers) 
@@ -595,8 +595,8 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
                                temp= (tot->xmax + tot->xmin) * 0.5f;
                                diff= curheight * 0.5f;
                                
-                               cur->xmin= temp - diff;
-                               cur->xmax= temp + diff;
+                               cur->xmin = temp - diff;
+                               cur->xmax = temp + diff;
                        }
                        else if (cur->xmin < tot->xmin) {
                                /* move cur across so that it sits at minimum of tot */
@@ -629,8 +629,8 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
                /* height */
                if ( (curheight > totheight) && !(v2d->keepzoom & (V2D_KEEPZOOM|V2D_LOCKZOOM_Y|V2D_LIMITZOOM)) ) {
                        /* if zoom doesn't have to be maintained, just clamp edges */
-                       if (cur->ymin < tot->ymin) cur->ymin= tot->ymin;
-                       if (cur->ymax > tot->ymax) cur->ymax= tot->ymax;
+                       if (cur->ymin < tot->ymin) cur->ymin = tot->ymin;
+                       if (cur->ymax > tot->ymax) cur->ymax = tot->ymax;
                }
                else {
                        /* This here occurs when:
@@ -645,8 +645,8 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
                                temp= (tot->ymax + tot->ymin) * 0.5f;
                                diff= curheight * 0.5f;
                                
-                               cur->ymin= temp - diff;
-                               cur->ymax= temp + diff;
+                               cur->ymin = temp - diff;
+                               cur->ymax = temp + diff;
                        }
                        else if (cur->ymin < tot->ymin) {
                                /* there's still space remaining, so shift up */
@@ -680,7 +680,7 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
                        /* width is in negative-x half */
                        if (v2d->cur.xmax > 0) {
                                v2d->cur.xmin -= v2d->cur.xmax;
-                               v2d->cur.xmax= 0.0f;
+                               v2d->cur.xmax = 0.0f;
                        }
                }
                else if ((v2d->align & V2D_ALIGN_NO_NEG_X) && !(v2d->align & V2D_ALIGN_NO_POS_X)) {
@@ -738,13 +738,13 @@ void UI_view2d_sync(bScreen *screen, ScrArea *area, View2D *v2dcur, int flag)
                                if (ar->v2d.flag & V2D_VIEWSYNC_AREA_VERTICAL) {
                                        if (flag == V2D_LOCK_COPY) {
                                                /* other views with locks on must copy active */
-                                               ar->v2d.cur.ymin= v2dcur->cur.ymin;
-                                               ar->v2d.cur.ymax= v2dcur->cur.ymax;
+                                               ar->v2d.cur.ymin = v2dcur->cur.ymin;
+                                               ar->v2d.cur.ymax = v2dcur->cur.ymax;
                                        }
                                        else { /* V2D_LOCK_SET */
                                                /* active must copy others */
-                                               v2dcur->cur.ymin= ar->v2d.cur.ymin;
-                                               v2dcur->cur.ymax= ar->v2d.cur.ymax;
+                                               v2dcur->cur.ymin = ar->v2d.cur.ymin;
+                                               v2dcur->cur.ymax = ar->v2d.cur.ymax;
                                        }
                                        
                                        /* region possibly changed, so refresh */
@@ -764,13 +764,13 @@ void UI_view2d_sync(bScreen *screen, ScrArea *area, View2D *v2dcur, int flag)
                                        if (ar->v2d.flag & V2D_VIEWSYNC_SCREEN_TIME) {
                                                if (flag == V2D_LOCK_COPY) {
                                                        /* other views with locks on must copy active */
-                                                       ar->v2d.cur.xmin= v2dcur->cur.xmin;
-                                                       ar->v2d.cur.xmax= v2dcur->cur.xmax;
+                                                       ar->v2d.cur.xmin = v2dcur->cur.xmin;
+                                                       ar->v2d.cur.xmax = v2dcur->cur.xmax;
                                                }
                                                else { /* V2D_LOCK_SET */
                                                        /* active must copy others */
-                                                       v2dcur->cur.xmin= ar->v2d.cur.xmin;
-                                                       v2dcur->cur.xmax= ar->v2d.cur.xmax;
+                                                       v2dcur->cur.xmin = ar->v2d.cur.xmin;
+                                                       v2dcur->cur.xmax = ar->v2d.cur.xmax;
                                                }
                                                
                                                /* region possibly changed, so refresh */
@@ -797,39 +797,39 @@ void UI_view2d_curRect_reset (View2D *v2d)
        /* handle width - posx and negx flags are mutually exclusive, so watch out */
        if ((v2d->align & V2D_ALIGN_NO_POS_X) && !(v2d->align & V2D_ALIGN_NO_NEG_X)) {
                /* width is in negative-x half */
-               v2d->cur.xmin= (float)-width;
-               v2d->cur.xmax= 0.0f;
+               v2d->cur.xmin = (float)-width;
+               v2d->cur.xmax = 0.0f;
        }
        else if ((v2d->align & V2D_ALIGN_NO_NEG_X) && !(v2d->align & V2D_ALIGN_NO_POS_X)) {
                /* width is in positive-x half */
-               v2d->cur.xmin= 0.0f;
-               v2d->cur.xmax= (float)width;
+               v2d->cur.xmin = 0.0f;
+               v2d->cur.xmax = (float)width;
        }
        else {
                /* width is centered around x==0 */
                const float dx= (float)width / 2.0f;
                
-               v2d->cur.xmin= -dx;
-               v2d->cur.xmax= dx;
+               v2d->cur.xmin = -dx;
+               v2d->cur.xmax = dx;
        }
        
        /* handle height - posx and negx flags are mutually exclusive, so watch out */
        if ((v2d->align & V2D_ALIGN_NO_POS_Y) && !(v2d->align & V2D_ALIGN_NO_NEG_Y)) {
                /* height is in negative-y half */
-               v2d->cur.ymin= (float)-height;
-               v2d->cur.ymax= 0.0f;
+               v2d->cur.ymin = (float)-height;
+               v2d->cur.ymax = 0.0f;
        }
        else if ((v2d->align & V2D_ALIGN_NO_NEG_Y) && !(v2d->align & V2D_ALIGN_NO_POS_Y)) {
                /* height is in positive-y half */
-               v2d->cur.ymin= 0.0f;
-               v2d->cur.ymax= (float)height;
+               v2d->cur.ymin = 0.0f;
+               v2d->cur.ymax = (float)height;
        }
        else {
                /* height is centered around y==0 */
                const float dy= (float)height / 2.0f;
                
-               v2d->cur.ymin= -dy;
-               v2d->cur.ymax= dy;
+               v2d->cur.ymin = -dy;
+               v2d->cur.ymax = dy;
        }
 }
 
@@ -860,39 +860,39 @@ void UI_view2d_totRect_set_resize (View2D *v2d, int width, int height, int resiz
        /* handle width - posx and negx flags are mutually exclusive, so watch out */
        if ((v2d->align & V2D_ALIGN_NO_POS_X) && !(v2d->align & V2D_ALIGN_NO_NEG_X)) {
                /* width is in negative-x half */
-               v2d->tot.xmin= (float)-width;
-               v2d->tot.xmax= 0.0f;
+               v2d->tot.xmin = (float)-width;
+               v2d->tot.xmax = 0.0f;
        }
        else if ((v2d->align & V2D_ALIGN_NO_NEG_X) && !(v2d->align & V2D_ALIGN_NO_POS_X)) {
                /* width is in positive-x half */
-               v2d->tot.xmin= 0.0f;
-               v2d->tot.xmax= (float)width;
+               v2d->tot.xmin = 0.0f;
+               v2d->tot.xmax = (float)width;
        }
        else {
                /* width is centered around x==0 */
                const float dx= (float)width / 2.0f;
                
-               v2d->tot.xmin= -dx;
-               v2d->tot.xmax= dx;
+               v2d->tot.xmin = -dx;
+               v2d->tot.xmax = dx;
        }
        
        /* handle height - posx and negx flags are mutually exclusive, so watch out */
        if ((v2d->align & V2D_ALIGN_NO_POS_Y) && !(v2d->align & V2D_ALIGN_NO_NEG_Y)) {
                /* height is in negative-y half */
-               v2d->tot.ymin= (float)-height;
-               v2d->tot.ymax= 0.0f;
+               v2d->tot.ymin = (float)-height;
+               v2d->tot.ymax = 0.0f;
        }
        else if ((v2d->align & V2D_ALIGN_NO_NEG_Y) && !(v2d->align & V2D_ALIGN_NO_POS_Y)) {
                /* height is in positive-y half */
-               v2d->tot.ymin= 0.0f;
-               v2d->tot.ymax= (float)height;
+               v2d->tot.ymin = 0.0f;
+               v2d->tot.ymax = (float)height;
        }
        else {
                /* height is centered around y==0 */
                const float dy= (float)height / 2.0f;
                
-               v2d->tot.ymin= -dy;
-               v2d->tot.ymax= dy;
+               v2d->tot.ymin = -dy;
+               v2d->tot.ymax = dy;
        }
        
        /* make sure that 'cur' rect is in a valid state as a result of these changes */
@@ -918,10 +918,10 @@ int UI_view2d_tab_set(View2D *v2d, int tab)
                        offset= default_offset;
 
                v2d->cur.xmax += offset[0] - v2d->cur.xmin;
-               v2d->cur.xmin= offset[0];
+               v2d->cur.xmin = offset[0];
 
                v2d->cur.ymin += offset[1] - v2d->cur.ymax;
-               v2d->cur.ymax= offset[1];
+               v2d->cur.ymax = offset[1];
 
                /* validation should happen in subsequent totRect_set */
 
@@ -996,12 +996,12 @@ void UI_view2d_view_ortho(View2D *v2d)
        
        /* XXX ton: this flag set by outliner, for icons */
        if(v2d->flag & V2D_PIXELOFS_X) {
-               curmasked.xmin= floorf(curmasked.xmin) - 0.001f;
-               curmasked.xmax= floorf(curmasked.xmax) - 0.001f;
+               curmasked.xmin = floorf(curmasked.xmin) - 0.001f;
+               curmasked.xmax = floorf(curmasked.xmax) - 0.001f;
        }
        if(v2d->flag & V2D_PIXELOFS_Y) {
-               curmasked.ymin= floorf(curmasked.ymin) - 0.001f;
-               curmasked.ymax= floorf(curmasked.ymax) - 0.001f;
+               curmasked.ymin = floorf(curmasked.ymin) - 0.001f;
+               curmasked.ymax = floorf(curmasked.ymax) - 0.001f;
        }
        
        /* set matrix on all appropriate axes */
@@ -1565,10 +1565,10 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
                        rcti slider;
                        int state;
                        
-                       slider.xmin= vs->hor_min;
-                       slider.xmax= vs->hor_max;
-                       slider.ymin= hor.ymin;
-                       slider.ymax= hor.ymax;
+                       slider.xmin = vs->hor_min;
+                       slider.xmax = vs->hor_max;
+                       slider.ymin = hor.ymin;
+                       slider.ymax = hor.ymax;
                        
                        state= (v2d->scroll_ui & V2D_SCROLL_H_ACTIVE)?UI_SCROLL_PRESSED:0;
                        
@@ -1676,10 +1676,10 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
                        rcti slider;
                        int state;
                        
-                       slider.xmin= vert.xmin;
-                       slider.xmax= vert.xmax;
-                       slider.ymin= vs->vert_min;
-                       slider.ymax= vs->vert_max;
+                       slider.xmin = vert.xmin;
+                       slider.xmax = vert.xmax;
+                       slider.ymin = vs->vert_min;
+                       slider.ymax = vs->vert_max;
                        
                        state= (v2d->scroll_ui & V2D_SCROLL_V_ACTIVE)?UI_SCROLL_PRESSED:0;
                        
@@ -1779,14 +1779,14 @@ void UI_view2d_listview_cell_to_view(View2D *v2d, short columnwidth, short rowhe
        if ELEM(NULL, v2d, rect)
                return;
        if ((columnwidth <= 0) && (rowheight <= 0)) {
-               rect->xmin= rect->xmax= 0.0f;
-               rect->ymin= rect->ymax= 0.0f;
+               rect->xmin = rect->xmax = 0.0f;
+               rect->ymin = rect->ymax = 0.0f;
                return;
        }
        
        /* x-coordinates */
-       rect->xmin= startx + (float)(columnwidth * column);
-       rect->xmax= startx + (float)(columnwidth * (column + 1));
+       rect->xmin = startx + (float)(columnwidth * column);
+       rect->xmax = startx + (float)(columnwidth * (column + 1));
        
        if ((v2d->align & V2D_ALIGN_NO_POS_X) && !(v2d->align & V2D_ALIGN_NO_NEG_X)) {
                /* simply negate the values for the coordinates if in negative half */
@@ -1795,8 +1795,8 @@ void UI_view2d_listview_cell_to_view(View2D *v2d, short columnwidth, short rowhe
        }
        
        /* y-coordinates */
-       rect->ymin= starty + (float)(rowheight * row);
-       rect->ymax= starty + (float)(rowheight * (row + 1));
+       rect->ymin = starty + (float)(rowheight * row);
+       rect->ymax = starty + (float)(rowheight * (row + 1));
        
        if ((v2d->align & V2D_ALIGN_NO_POS_Y) && !(v2d->align & V2D_ALIGN_NO_NEG_Y)) {
                /* simply negate the values for the coordinates if in negative half */
index 16613d3..29850c9 100644 (file)
@@ -1116,12 +1116,12 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op)
                 *        if zoom is allowed to be changed
                 */
                if ((v2d->keepzoom & V2D_LOCKZOOM_X)==0) {
-                       v2d->cur.xmin= rect.xmin;
-                       v2d->cur.xmax= rect.xmax;
+                       v2d->cur.xmin = rect.xmin;
+                       v2d->cur.xmax = rect.xmax;
                }
                if ((v2d->keepzoom & V2D_LOCKZOOM_Y)==0) {
-                       v2d->cur.ymin= rect.ymin;
-                       v2d->cur.ymax= rect.ymax;
+                       v2d->cur.ymin = rect.ymin;
+                       v2d->cur.ymax = rect.ymax;
                }
        }
        else /* if (gesture_mode == GESTURE_MODAL_OUT) */ {
@@ -1138,16 +1138,16 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op)
                        zoom= size / (rect.xmax - rect.xmin);
                        center= (v2d->cur.xmax + v2d->cur.xmin) * 0.5f;
                        
-                       v2d->cur.xmin= center - (size * zoom);
-                       v2d->cur.xmax= center + (size * zoom);
+                       v2d->cur.xmin = center - (size * zoom);
+                       v2d->cur.xmax = center + (size * zoom);
                }
                if ((v2d->keepzoom & V2D_LOCKZOOM_Y)==0) {
                        size= (v2d->cur.ymax - v2d->cur.ymin);
                        zoom= size / (rect.ymax - rect.ymin);
                        center= (v2d->cur.ymax + v2d->cur.ymin) * 0.5f;
                        
-                       v2d->cur.ymin= center - (size * zoom);
-                       v2d->cur.ymax= center + (size * zoom);
+                       v2d->cur.ymin = center - (size * zoom);
+                       v2d->cur.ymax = center + (size * zoom);
                }
        }
        
@@ -1616,29 +1616,29 @@ static int reset_exec(bContext *C, wmOperator *UNUSED(op))
        winx= (float)(v2d->mask.xmax - v2d->mask.xmin + 1);
        winy= (float)(v2d->mask.ymax - v2d->mask.ymin + 1);
 
-       v2d->cur.xmax= v2d->cur.xmin + winx;
-       v2d->cur.ymax= v2d->cur.ymin + winy;
+       v2d->cur.xmax = v2d->cur.xmin + winx;
+       v2d->cur.ymax = v2d->cur.ymin + winy;
        
        /* align */
        if (v2d->align) {
                /* posx and negx flags are mutually exclusive, so watch out */
                if ((v2d->align & V2D_ALIGN_NO_POS_X) && !(v2d->align & V2D_ALIGN_NO_NEG_X)) {
-                       v2d->cur.xmax= 0.0f;
-                       v2d->cur.xmin= -winx*style->panelzoom;
+                       v2d->cur.xmax = 0.0f;
+                       v2d->cur.xmin = -winx*style->panelzoom;
                }
                else if ((v2d->align & V2D_ALIGN_NO_NEG_X) && !(v2d->align & V2D_ALIGN_NO_POS_X)) {
-                       v2d->cur.xmax= winx*style->panelzoom;
-                       v2d->cur.xmin= 0.0f;
+                       v2d->cur.xmax = winx*style->panelzoom;
+                       v2d->cur.xmin = 0.0f;
                }
 
                /* - posx and negx flags are mutually exclusive, so watch out */
                if ((v2d->align & V2D_ALIGN_NO_POS_Y) && !(v2d->align & V2D_ALIGN_NO_NEG_Y)) {
-                       v2d->cur.ymax= 0.0f;
-                       v2d->cur.ymin= -winy*style->panelzoom;
+                       v2d->cur.ymax = 0.0f;
+                       v2d->cur.ymin = -winy*style->panelzoom;
                }
                else if ((v2d->align & V2D_ALIGN_NO_NEG_Y) && !(v2d->align & V2D_ALIGN_NO_POS_Y)) {
-                       v2d->cur.ymax= winy*style->panelzoom;
-                       v2d->cur.ymin= 0.0f;
+                       v2d->cur.ymax = winy*style->panelzoom;
+                       v2d->cur.ymin = 0.0f;
                }
        }
 
@@ -1689,7 +1689,7 @@ void UI_view2d_operatortypes(void)
 
 void UI_view2d_keymap(wmKeyConfig *keyconf)
 {
-       wmKeyMap *keymap= WM_keymap_find(keyconf, "View2D", 0, 0);
+       wmKeyMap *keymap = WM_keymap_find(keyconf, "View2D", 0, 0);
        wmKeyMapItem *kmi;
 
        /* scrollers */
@@ -1742,7 +1742,7 @@ void UI_view2d_keymap(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "VIEW2D_OT_zoom_border", BKEY, KM_PRESS, KM_SHIFT, 0);
 
        /* Alternative keymap for buttons listview */
-       keymap= WM_keymap_find(keyconf, "View2D Buttons List", 0, 0);
+       keymap = WM_keymap_find(keyconf, "View2D Buttons List", 0, 0);
 
        WM_keymap_add_item(keymap, "VIEW2D_OT_scroller_activate", LEFTMOUSE, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "VIEW2D_OT_scroller_activate", MIDDLEMOUSE, KM_PRESS, 0, 0);
index b770062..74160b3 100644 (file)
@@ -55,7 +55,7 @@
 /* returns standard diameter */
 static float new_primitive_matrix(bContext *C, float *loc, float *rot, float primmat[][4])
 {
-       Object *obedit= CTX_data_edit_object(C);
+       Object *obedit = CTX_data_edit_object(C);
        View3D *v3d = CTX_wm_view3d(C);
        float mat[3][3], rmat[3][3], cmat[3][3], imat[3][3];
        
@@ -85,11 +85,11 @@ static void make_prim_init(bContext *C, const char *idname,
                            float *dia, float mat[][4],
                            int *state, float *loc, float *rot, unsigned int layer)
 {
-       Object *obedit= CTX_data_edit_object(C);
+       Object *obedit = CTX_data_edit_object(C);
 
        *state = 0;
-       if(obedit==NULL || obedit->type!=OB_MESH) {
-               obedit= ED_object_add_type(C, OB_MESH, loc, rot, FALSE, layer);
+       if (obedit == NULL || obedit->type != OB_MESH) {
+               obedit = ED_object_add_type(C, OB_MESH, loc, rot, FALSE, layer);
                
                rename_id((ID *)obedit, idname);
                rename_id((ID *)obedit->data, idname);
@@ -186,7 +186,7 @@ static int add_primitive_cube_exec(bContext *C, wmOperator *op)
        ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
        make_prim_init(C, "Cube", &dia, mat, &state, loc, rot, layer);
 
-       obedit= CTX_data_edit_object(C);
+       obedit = CTX_data_edit_object(C);
        me = obedit->data;
        em = me->edit_btmesh;
 
@@ -235,7 +235,7 @@ static int add_primitive_circle_exec(bContext *C, wmOperator *op)
        unsigned int layer;
        
        cap_end = RNA_enum_get(op->ptr, "fill_type");
-       cap_tri = cap_end==2;
+       cap_tri = (cap_end == 2);
        
        ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
        make_prim_init(C, "Circle", &dia, mat, &state, loc, rot, layer);
@@ -294,7 +294,7 @@ static int add_primitive_cylinder_exec(bContext *C, wmOperator *op)
        unsigned int layer;
        
        cap_end = RNA_enum_get(op->ptr, "end_fill_type");
-       cap_tri = cap_end==2;
+       cap_tri = (cap_end == 2);
        
        ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
        make_prim_init(C, "Cylinder", &dia, mat, &state, loc, rot, layer);
@@ -359,7 +359,7 @@ static int add_primitive_cone_exec(bContext *C, wmOperator *op)
        unsigned int layer;
        
        cap_end = RNA_enum_get(op->ptr, "end_fill_type");
-       cap_tri = cap_end==2;
+       cap_tri = (cap_end == 2);
        
        ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
        make_prim_init(C, "Cone", &dia, mat, &state, loc, rot, layer);
@@ -480,7 +480,7 @@ static int add_primitive_monkey_exec(bContext *C, wmOperator *op)
        
        ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, &view_aligned);
        if (!view_aligned)
-               rot[0] += M_PI/2.0f;
+               rot[0] += M_PI / 2.0f;
        
        make_prim_init(C, "Monkey", &dia, mat, &state, loc, rot, layer);
 
@@ -534,7 +534,7 @@ static int add_primitive_uvsphere_exec(bContext *C, wmOperator *op)
        if (!EDBM_CallAndSelectOpf(em, op, "vertout",
                                   "create_uvsphere segments=%i revolutions=%i diameter=%f mat=%m4",
                                   RNA_int_get(op->ptr, "segments"), RNA_int_get(op->ptr, "ring_count"),
-                                  RNA_float_get(op->ptr,"size"), mat))
+                                  RNA_float_get(op->ptr, "size"), mat))
        {
                return OPERATOR_CANCELLED;
        }
index 0302e1d..3716949 100644 (file)
@@ -58,7 +58,7 @@ typedef struct BMBVHTree {
        float maxdist; //for nearest point search
        float uv[2];
        
-       /*stuff for topological vert search*/
+       /* stuff for topological vert search */
        BMVert *v, *curv;
        GHash *gh;
        float curw, curd;
@@ -101,7 +101,7 @@ BMBVHTree *BMBVH_NewBVH(BMEditMesh *em, int flag, Scene *scene, Object *obedit)
        tree->scene = scene;
        tree->em = em;
        tree->bm = em->bm;
-       tree->epsilon = FLT_EPSILON*2.0f;
+       tree->epsilon = FLT_EPSILON * 2.0f;
        tree->flag = flag;
        
        tree->tree = BLI_bvhtree_new(em->tottri, tree->epsilon, 8, 8);
@@ -111,7 +111,7 @@ BMBVHTree *BMBVH_NewBVH(BMEditMesh *em, int flag, Scene *scene, Object *obedit)
                BMVert *v;
                void *data[3];
                
-               tree->cos = MEM_callocN(sizeof(float)*3*em->bm->totvert, "bmbvh cos");
+               tree->cos = MEM_callocN(sizeof(float) * 3 * em->bm->totvert, "bmbvh cos");
                BM_ITER_INDEX(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL, i) {
                        BM_elem_index_set(v, i); /* set_inline */
                        copy_v3_v3(tree->cos[i], v->co);
@@ -120,7 +120,7 @@ BMBVHTree *BMBVH_NewBVH(BMEditMesh *em, int flag, Scene *scene, Object *obedit)
 
 
                cage = editbmesh_get_derived_cage_and_final(scene, obedit, em, &final, CD_MASK_DERIVEDMESH);
-               cagecos = MEM_callocN(sizeof(float)*3*em->bm->totvert, "bmbvh cagecos");
+               cagecos = MEM_callocN(sizeof(float) * 3 * em->bm->totvert, "bmbvh cagecos");
                
                data[0] = em;
                data[1] = cagecos;
@@ -131,18 +131,19 @@ BMBVHTree *BMBVH_NewBVH(BMEditMesh *em, int flag, Scene *scene, Object *obedit)
        
        tree->cagecos = cagecos;
        
-       for (i=0; i<em->tottri; i++) {
+       for (i = 0; i < em->tottri; i++) {
                if (flag & BMBVH_USE_CAGE) {
                        copy_v3_v3(cos[0], cagecos[BM_elem_index_get(em->looptris[i][0]->v)]);
                        copy_v3_v3(cos[1], cagecos[BM_elem_index_get(em->looptris[i][1]->v)]);
                        copy_v3_v3(cos[2], cagecos[BM_elem_index_get(em->looptris[i][2]->v)]);
-               } else {
+               }
+               else {
                        copy_v3_v3(cos[0], em->looptris[i][0]->v->co);
                        copy_v3_v3(cos[1], em->looptris[i][1]->v->co);
                        copy_v3_v3(cos[2], em->looptris[i][2]->v->co);
                }
 
-               BLI_bvhtree_insert(tree->tree, i, (float*)cos, 3);
+               BLI_bvhtree_insert(tree->tree, i, (float *)cos, 3);
        }
        
        BLI_bvhtree_balance(tree->tree);
@@ -163,14 +164,15 @@ void BMBVH_FreeBVH(BMBVHTree *tree)
        MEM_freeN(tree);
 }
 
-/*taken from bvhutils.c*/
+/* taken from bvhutils.c */
 static float ray_tri_intersection(const BVHTreeRay *ray, const float UNUSED(m_dist), float *v0, 
                                  float *v1, float *v2, float *uv, float UNUSED(e))
 {
        float dist;
 
-       if(isect_ray_tri_v3((float*)ray->origin, (float*)ray->direction, v0, v1, v2, &dist, uv))
+       if (isect_ray_tri_v3((float *)ray->origin, (float *)ray->direction, v0, v1, v2, &dist, uv)) {
                return dist;
+       }
 
        return FLT_MAX;
 }
@@ -222,8 +224,9 @@ BMFace *BMBVH_RayCast(BMBVHTree *tree, float *co, float *dir, float *hitout, flo
                                v2 = tree->em->looptris[hit.index][1]->v;
                                v3 = tree->em->looptris[hit.index][2]->v;
                                
-                               for (i=0; i<3; i++) {
-                                       co[i] = v1->co[i] + (v2->co[i] - v1->co[i])*tree->uv[0] + (v3->co[i]-v1->co[i])*tree->uv[1];
+                               for (i = 0; i < 3; i++) {
+                                       co[i] = v1->co[i] + ((v2->co[i] - v1->co[i]) * tree->uv[0]) +
+                                                           ((v3->co[i] - v1->co[i]) * tree->uv[1]);
                                }
                                copy_v3_v3(hitout, co);
                        } else {
@@ -254,10 +257,10 @@ static void vertsearchcallback(void *userdata, int index, const float *UNUSED(co
 
        maxdist = tree->maxdist;
 
-       for (i=0; i<3; i++) {
+       for (i = 0; i < 3; i++) {
                sub_v3_v3v3(v, hit->co, ls[i]->v->co);
 
-               dist = sqrt(v[0]*v[0] + v[1]*v[1] + v[2]*v[2]);
+               dist = len_v3(v);
                if (dist < hit->dist && dist < maxdist) {
                        copy_v3_v3(hit->co, ls[i]->v->co);
                        copy_v3_v3(hit->no, ls[i]->v->no);
@@ -272,7 +275,7 @@ BMVert *BMBVH_FindClosestVert(BMBVHTree *tree, float *co, float maxdist)
        BVHTreeNearest hit;
 
        copy_v3_v3(hit.co, co);
-       hit.dist = maxdist*5;
+       hit.dist = maxdist * 5;
        hit.index = -1;
 
        tree->maxdist = maxdist;
@@ -281,14 +284,14 @@ BMVert *BMBVH_FindClosestVert(BMBVHTree *tree, float *co, float maxdist)
        if (hit.dist != FLT_MAX && hit.index != -1) {
                BMLoop **ls = tree->em->looptris[hit.index];
                float dist, curdist = tree->maxdist, v[3];
-               int cur=0, i;
+               int cur = 0, i;
 
                maxdist = tree->maxdist;
 
-               for (i=0; i<3; i++) {
+               for (i = 0; i < 3; i++) {
                        sub_v3_v3v3(v, hit.co, ls[i]->v->co);
 
-                       dist = sqrt(v[0]*v[0] + v[1]*v[1] + v[2]*v[2]);
+                       dist = len_v3(v);
                        if (dist < curdist) {
                                cur = i;
                                curdist = dist;
@@ -308,7 +311,7 @@ typedef struct walklist {
        float w, r;
        int totwalked;
 
-       /*state data*/
+       /* state data */
        BMVert *lastv;
        BMLoop *curl, *firstl;
        BMEdge *cure;
@@ -317,17 +320,19 @@ typedef struct walklist {
 /* UNUSED */
 #if 0
 static short winding(float *v1, float *v2, float *v3)
-/* is v3 to the right of v1-v2 ? With exception: v3==v1 || v3==v2 */
+/* is v3 to the right of (v1 - v2) ? With exception: v3 == v1 || v3 == v2 */
 {
        double inp;
 
-       //inp= (v2[cox]-v1[cox])*(v1[coy]-v3[coy]) +(v1[coy]-v2[coy])*(v1[cox]-v3[cox]);
-       inp= (v2[0]-v1[0])*(v1[1]-v3[1]) +(v1[1]-v2[1])*(v1[0]-v3[0]);
+       //inp = (v2[cox] - v1[cox]) * (v1[coy] - v3[coy]) + (v1[coy] - v2[coy]) * (v1[cox] - v3[cox]);
+       inp = (v2[0] - v1[0]) * (v1[1] - v3[1]) + (v1[1] - v2[1]) * (v1[0] - v3[0]);
 
-       if(inp<0.0) return 0;
-       else if(inp==0) {
-               if(v1[0]==v3[0] && v1[1]==v3[1]) return 0;
-               if(v2[0]==v3[0] && v2[1]==v3[1]) return 0;
+       if (inp < 0.0) {
+               return 0;
+       }
+       else if (inp == 0) {
+               if (v1[0] == v3[0] && v1[1] == v3[1]) return 0;
+               if (v2[0] == v3[0] && v2[1] == v3[1]) return 0;
        }
        return 1;
 }
@@ -371,8 +376,8 @@ int BMBVH_EdgeVisible(BMBVHTree *tree, BMEdge *e, ARegion *ar, View3D *v3d, Obje
                return 0;
        }
        
-       mval_f[0] = ar->winx/2.0;
-       mval_f[1] = ar->winy/2.0;
+       mval_f[0] = ar->winx / 2.0f;
+       mval_f[1] = ar->winy / 2.0f;
        ED_view3d_win_to_segment_clip(ar, v3d, mval_f, origin, end);
        
        invert_m4_m4(invmat, obedit->obmat);
@@ -410,7 +415,7 @@ int BMBVH_EdgeVisible(BMBVHTree *tree, BMEdge *e, ARegion *ar, View3D *v3d, Obje
        normalize_v3(dir2);
        normalize_v3(dir3);
 
-       /*do three samplings: left, middle, right*/
+       /* do three samplings: left, middle, right */
        f = edge_ray_cast(tree, co1, dir1, NULL, e);
        if (f && !edge_ray_cast(tree, co2, dir2, NULL, e))
                return 1;
index 02f33b5..f636777 100644 (file)
@@ -1051,8 +1051,8 @@ static BMEdgeHit *knife_edge_tri_isect(knifetool_opdata *kcd, BMBVHTree *bmtree,
                                                continue;
                                        if (kcd->prev.vert && len_squared_v3v3(kcd->prev.vert->cageco, p) < depsilon_squared)
                                                continue;
-                                       if ( len_squared_v3v3(kcd->prev.cage, p) < depsilon_squared ||
-                                            len_squared_v3v3(kcd->cur.cage, p) < depsilon_squared)
+                                       if (len_squared_v3v3(kcd->prev.cage, p) < depsilon_squared ||
+                                           len_squared_v3v3(kcd->cur.cage, p) < depsilon_squared)
                                        {
                                                continue;
                                        }
@@ -1561,10 +1561,10 @@ static int knife_update_active(knifetool_opdata *kcd)
                kcd->cur.edge = knife_find_closest_edge(kcd, kcd->cur.co, kcd->cur.cage, &kcd->cur.bmface, &kcd->cur.is_space);
        }
 
-       /* if no hits are found this would normally default to (0,0,0) so instead
+       /* if no hits are found this would normally default to (0, 0, 0) so instead
         * get a point at the mouse ray closest to the previous point.
         * Note that drawing lines in `free-space` isn't properly supported
-        * but theres no guarantee (0,0,0) has any geometry either - campbell */
+        * but theres no guarantee (0, 0, 0) has any geometry either - campbell */
        if (kcd->cur.vert == NULL && kcd->cur.edge == NULL) {
                float origin[3], ray[3], co[3];
 
@@ -1601,7 +1601,7 @@ static void rnd_offset_co(float co[3], float scale)
        int i;
 
        for (i = 0; i < 3; i++) {
-               co[i] += (BLI_drand()-0.5)*scale;
+               co[i] += (BLI_drand() - 0.5) * scale;
        }
 }
 
@@ -2231,8 +2231,8 @@ static int find_hole_chains(knifetool_opdata *kcd, ListBase *hole, BMFace *f, Li
                j++;
        }
 
-       /* For first diagonal (m==0), want shortest length.
-        * For second diagonal (m==1), want max separation of index of hole
+       /* For first diagonal  (m == 0), want shortest length.
+        * For second diagonal (m == 1), want max separation of index of hole
         * vertex from the hole vertex used in the first diagonal, and from there
         * want the one with shortest length not to the same vertex as the first diagonal. */
        for (m = 0; m < 2; m++) {
@@ -2765,8 +2765,8 @@ static int knifetool_invoke(bContext *C, wmOperator *op, wmEvent *evt)
        kcd->vc.mval[1] = evt->mval[1];
 
        ED_area_headerprint(CTX_wm_area(C),
-               "LMB: define cut lines, Return or RMB: confirm, E: new cut, Ctrl: midpoint snap,"
-               Shift: ignore snap, C: angle constrain, Turn off limit selection to visibile: cut through");
+                           "LMB: define cut lines, Return or RMB: confirm, E: new cut, Ctrl: midpoint snap, "
+                           "Shift: ignore snap, C: angle constrain, Turn off limit selection to visibile: cut through");
 
        return OPERATOR_RUNNING_MODAL;
 }
@@ -2795,8 +2795,7 @@ wmKeyMap *knifetool_modal_keymap(wmKeyConfig *keyconf)
                {KNF_MODAL_ANGLE_SNAP_TOGGLE, "ANGLE_SNAP_TOGGLE", 0, "Toggle Angle Snapping", ""},
                {KNF_MODAL_NEW_CUT, "NEW_CUT", 0, "End Current Cut", ""},
                {KNF_MODAL_ADD_CUT, "ADD_CUT", 0, "Add Cut", ""},
-
-       {0, NULL, 0, NULL, NULL}};
+               {0, NULL, 0, NULL, NULL}};
 
        wmKeyMap *keymap = WM_modalkeymap_get(keyconf, "Knife Tool Modal Map");
 
index 1696d4d..b409ee1 100644 (file)
@@ -112,7 +112,7 @@ static void ringsel_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
        int i;
        
        if (lcd->totedge > 0) {
-               if(v3d && v3d->zbuf)
+               if (v3d && v3d->zbuf)
                        glDisable(GL_DEPTH_TEST);
 
                glPushMatrix();
@@ -120,20 +120,20 @@ static void ringsel_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
 
                glColor3ub(255, 0, 255);
                glBegin(GL_LINES);
-               for (i=0; i<lcd->totedge; i++) {
+               for (i = 0; i < lcd->totedge; i++) {
                        glVertex3fv(lcd->edges[i][0]);
                        glVertex3fv(lcd->edges[i][1]);
                }
                glEnd();
 
                glPopMatrix();
-               if(v3d && v3d->zbuf)
+               if (v3d && v3d->zbuf)
                        glEnable(GL_DEPTH_TEST);
        }
 }
 
 /* given two opposite edges in a face, finds the ordering of their vertices so
- * that cut preview lines won't cross each other*/
+ * that cut preview lines won't cross each other */
 static void edgering_find_order(BMEditMesh *em, BMEdge *lasteed, BMEdge *eed, 
                                 BMVert *lastv1, BMVert *v[2][2])
 {
@@ -143,7 +143,7 @@ static void edgering_find_order(BMEditMesh *em, BMEdge *lasteed, BMEdge *eed,
 
        l = eed->l;
 
-       /*find correct order for v[1]*/
+       /* find correct order for v[1] */
        if (!(BM_edge_in_face(l->f, eed) && BM_edge_in_face(l->f, lasteed))) {
                BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_LOOP, l) {
                        if (BM_edge_in_face(l->f, eed) && BM_edge_in_face(l->f, lasteed))
@@ -151,7 +151,7 @@ static void edgering_find_order(BMEditMesh *em, BMEdge *lasteed, BMEdge *eed,
                }
        }
        
-       /*this should never happen*/
+       /* this should never happen */
        if (!l) {
                v[0][0] = eed->v1;
                v[0][1] = eed->v2;
@@ -169,7 +169,8 @@ static void edgering_find_order(BMEditMesh *em, BMEdge *lasteed, BMEdge *eed,
        if (l2->v == lastv1) {
                v[0][0] = eed->v1;
                v[0][1] = eed->v2;
-       } else {
+       }
+       else {
                v[0][0] = eed->v2;
                v[0][1] = eed->v1;
        }
@@ -185,7 +186,7 @@ static void edgering_sel(tringselOpData *lcd, int previewlines, int select)
        float (*edges)[2][3] = NULL;
        BLI_array_declare(edges);
        float co[2][3];
-       int i, tot=0;
+       int i, tot = 0;
        
        memset(v, 0, sizeof(v));
        
@@ -208,7 +209,7 @@ static void edgering_sel(tringselOpData *lcd, int previewlines, int select)
                         BMW_NIL_LAY);
 
                eed = BMW_begin(&walker, startedge);
-               for (; eed; eed=BMW_step(&walker)) {
+               for ( ; eed; eed = BMW_step(&walker)) {
                        BM_elem_select_set(em->bm, eed, TRUE);
                }
                BMW_end(&walker);
@@ -222,12 +223,13 @@ static void edgering_sel(tringselOpData *lcd, int previewlines, int select)
 
        eed = startedge = BMW_begin(&walker, startedge);
        lastv1 = NULL;
-       for (lasteed=NULL; eed; eed=BMW_step(&walker)) {
+       for (lasteed = NULL; eed; eed = BMW_step(&walker)) {
                if (lasteed) {
                        if (lastv1) {
                                v[1][0] = v[0][0];
                                v[1][1] = v[0][1];
-                       } else {
+                       }
+                       else {
                                v[1][0] = lasteed->v1;
                                v[1][1] = lasteed->v2;
                                lastv1 = lasteed->v1;
@@ -236,14 +238,14 @@ static void edgering_sel(tringselOpData *lcd, int previewlines, int select)
                        edgering_find_order(em, lasteed, eed, lastv1, v);
                        lastv1 = v[0][0];
 
-                       for(i=1;i<=previewlines;i++){
-                               co[0][0] = (v[0][1]->co[0] - v[0][0]->co[0])*(i/((float)previewlines+1))+v[0][0]->co[0];
-                               co[0][1] = (v[0][1]->co[1] - v[0][0]->co[1])*(i/((float)previewlines+1))+v[0][0]->co[1];
-                               co[0][2] = (v[0][1]->co[2] - v[0][0]->co[2])*(i/((float)previewlines+1))+v[0][0]->co[2];
+                       for (i = 1; i <= previewlines; i++) {
+                               co[0][0] = (v[0][1]->co[0] - v[0][0]->co[0]) * (i / ((float)previewlines + 1)) + v[0][0]->co[0];
+                               co[0][1] = (v[0][1]->co[1] - v[0][0]->co[1]) * (i / ((float)previewlines + 1)) + v[0][0]->co[1];
+                               co[0][2] = (v[0][1]->co[2] - v[0][0]->co[2]) * (i / ((float)previewlines + 1)) + v[0][0]->co[2];
 
-                               co[1][0] = (v[1][1]->co[0] - v[1][0]->co[0])*(i/((float)previewlines+1))+v[1][0]->co[0];
-                               co[1][1] = (v[1][1]->co[1] - v[1][0]->co[1])*(i/((float)previewlines+1))+v[1][0]->co[1];
-                               co[1][2] = (v[1][1]->co[2] - v[1][0]->co[2])*(i/((float)previewlines+1))+v[1][0]->co[2];                                        
+                               co[1][0] = (v[1][1]->co[0] - v[1][0]->co[0]) * (i / ((float)previewlines + 1)) + v[1][0]->co[0];
+                               co[1][1] = (v[1][1]->co[1] - v[1][0]->co[1]) * (i / ((float)previewlines + 1)) + v[1][0]->co[1];
+                               co[1][2] = (v[1][1]->co[2] - v[1][0]->co[2]) * (i / ((float)previewlines + 1)) + v[1][0]->co[2];
 
                                BLI_array_growone(edges);
                                copy_v3_v3(edges[tot][0], co[0]);
@@ -260,17 +262,17 @@ static void edgering_sel(tringselOpData *lcd, int previewlines, int select)
 
                edgering_find_order(em, lasteed, startedge, lastv1, v);
                
-               for(i=1;i<=previewlines;i++){
+               for (i = 1; i <= previewlines; i++) {
                        if (!v[0][0] || !v[0][1] || !v[1][0] || !v[1][1])
                                continue;
                        
-                       co[0][0] = (v[0][1]->co[0] - v[0][0]->co[0])*(i/((float)previewlines+1))+v[0][0]->co[0];
-                       co[0][1] = (v[0][1]->co[1] - v[0][0]->co[1])*(i/((float)previewlines+1))+v[0][0]->co[1];
-                       co[0][2] = (v[0][1]->co[2] - v[0][0]->co[2])*(i/((float)previewlines+1))+v[0][0]->co[2];
+                       co[0][0] = (v[0][1]->co[0] - v[0][0]->co[0]) * (i / ((float)previewlines + 1)) + v[0][0]->co[0];
+                       co[0][1] = (v[0][1]->co[1] - v[0][0]->co[1]) * (i / ((float)previewlines + 1)) + v[0][0]->co[1];
+                       co[0][2] = (v[0][1]->co[2] - v[0][0]->co[2]) * (i / ((float)previewlines + 1)) + v[0][0]->co[2];
 
-                       co[1][0] = (v[1][1]->co[0] - v[1][0]->co[0])*(i/((float)previewlines+1))+v[1][0]->co[0];
-                       co[1][1] = (v[1][1]->co[1] - v[1][0]->co[1])*(i/((float)previewlines+1))+v[1][0]->co[1];
-                       co[1][2] = (v[1][1]->co[2] - v[1][0]->co[2])*(i/((float)previewlines+1))+v[1][0]->co[2];                                        
+                       co[1][0] = (v[1][1]->co[0] - v[1][0]->co[0]) * (i / ((float)previewlines + 1)) + v[1][0]->co[0];
+                       co[1][1] = (v[1][1]->co[1] - v[1][0]->co[1]) * (i / ((float)previewlines + 1)) + v[1][0]->co[1];
+                       co[1][2] = (v[1][1]->co[2] - v[1][0]->co[2]) * (i / ((float)previewlines + 1)) + v[1][0]->co[2];
                        
                        BLI_array_growone(edges);
                        copy_v3_v3(edges[tot][0], co[0]);
@@ -298,8 +300,8 @@ static void ringsel_find_edge(tringselOpData *lcd, int cuts)
 
 static void ringsel_finish(bContext *C, wmOperator *op)
 {
-       tringselOpData *lcd= op->customdata;
-       int cuts= RNA_int_get(op->ptr, "number_cuts");
+       tringselOpData *lcd = op->customdata;
+       int cuts = RNA_int_get(op->ptr, "number_cuts");
 
        if (lcd->eed) {
                BMEditMesh *em = lcd->em;
@@ -317,7 +319,7 @@ static void ringsel_finish(bContext *C, wmOperator *op)
                                        em->selectmode = SCE_SELECT_EDGE;
                                else
                                        em->selectmode &= ~SCE_SELECT_FACE;
-                               CTX_data_tool_settings(C)->selectmode= em->selectmode;
+                               CTX_data_tool_settings(C)->selectmode = em->selectmode;
                                EDBM_selectmode_set(em);
 
                                WM_event_add_notifier(C, NC_SCENE|ND_TOOLSETTINGS, CTX_data_scene(C));
@@ -331,9 +333,9 @@ static void ringsel_finish(bContext *C, wmOperator *op)
                else {
                        
                        /* sets as active, useful for other tools */
-                       if(em->selectmode & SCE_SELECT_VERTEX)
+                       if (em->selectmode & SCE_SELECT_VERTEX)
                                EDBM_store_selection(em, lcd->eed->v1); /* low priority TODO, get vertrex close to mouse */
-                       if(em->selectmode & SCE_SELECT_EDGE)
+                       if (em->selectmode & SCE_SELECT_EDGE)
                                EDBM_store_selection(em, lcd->eed);
                        
                        EDBM_selectmode_flush(lcd->em);
@@ -345,7 +347,7 @@ static void ringsel_finish(bContext *C, wmOperator *op)
 /* called when modal loop selection is done... */
 static void ringsel_exit(bContext *UNUSED(C), wmOperator *op)
 {
-       tringselOpData *lcd= op->customdata;
+       tringselOpData *lcd = op->customdata;
 
        /* deactivate the extra drawing stuff in 3D-View */
        ED_region_draw_cb_exit(lcd->ar->type, lcd->draw_handle);
@@ -357,7 +359,7 @@ static void ringsel_exit(bContext *UNUSED(C), wmOperator *op)
 
        /* free the custom data */
        MEM_freeN(lcd);
-       op->customdata= NULL;
+       op->customdata = NULL;
 }
 
 /* called when modal loop selection gets set up... */
@@ -366,11 +368,11 @@ static int ringsel_init (bContext *C, wmOperator *op, int do_cut)
        tringselOpData *lcd;
        
        /* alloc new customdata */
-       lcd= op->customdata= MEM_callocN(sizeof(tringselOpData), "ringsel Modal Op Data");
+       lcd = op->customdata = MEM_callocN(sizeof(tringselOpData), "ringsel Modal Op Data");
        
        /* assign the drawing handle for drawing preview line... */
-       lcd->ar= CTX_wm_region(C);
-       lcd->draw_handle= ED_region_draw_cb_activate(lcd->ar->type, ringsel_draw, lcd, REGION_DRAW_POST_VIEW);
+       lcd->ar = CTX_wm_region(C);
+       lcd->draw_handle = ED_region_draw_cb_activate(lcd->ar->type, ringsel_draw, lcd, REGION_DRAW_POST_VIEW);
        lcd->ob = CTX_data_edit_object(C);
        lcd->em = BMEdit_FromObject(lcd->ob);
        lcd->extend = do_cut ? 0 : RNA_boolean_get(op->ptr, "extend");
@@ -396,12 +398,12 @@ static int ringcut_cancel (bContext *C, wmOperator *op)
 
 static int ringcut_invoke (bContext *C, wmOperator *op, wmEvent *evt)
 {
-       Object *obedit= CTX_data_edit_object(C);
+       Object *obedit = CTX_data_edit_object(C);
        tringselOpData *lcd;
        BMEdge *edge;
        int dist = 75;
 
-       if(modifiers_isDeformedByLattice(obedit) || modifiers_isDeformedByArmature(obedit))
+       if (modifiers_isDeformedByLattice(obedit) || modifiers_isDeformedByArmature(obedit))
                BKE_report(op->reports, RPT_WARNING, "Loop cut doesn't work well on deformed edit mesh display");
        
        view3d_operator_needs_opengl(C);
@@ -428,8 +430,8 @@ static int ringcut_invoke (bContext *C, wmOperator *op, wmEvent *evt)
 
 static int loopcut_modal (bContext *C, wmOperator *op, wmEvent *event)
 {
-       int cuts= RNA_int_get(op->ptr,"number_cuts");
-       tringselOpData *lcd= op->customdata;
+       int cuts = RNA_int_get(op->ptr, "number_cuts");
+       tringselOpData *lcd = op->customdata;
        int show_cuts = 0;
 
        view3d_operator_needs_opengl(C);
@@ -475,7 +477,7 @@ static int loopcut_modal (bContext *C, wmOperator *op, wmEvent *event)
                                break;
 
                        cuts++;
-                       RNA_int_set(op->ptr,"number_cuts",cuts);
+                       RNA_int_set(op->ptr, "number_cuts", cuts);
                        ringsel_find_edge(lcd, cuts);
                        show_cuts = TRUE;
                        
@@ -487,8 +489,8 @@ static int loopcut_modal (bContext *C, wmOperator *op, wmEvent *event)
                        if (event->val == KM_RELEASE)
                                break;
 
-                       cuts=MAX2(cuts-1,1);
-                       RNA_int_set(op->ptr,"number_cuts",cuts);
+                       cuts = MAX2(cuts - 1, 1);
+                       RNA_int_set(op->ptr, "number_cuts", cuts);
                        ringsel_find_edge(lcd, cuts);
                        show_cuts = TRUE;
                        
@@ -513,15 +515,15 @@ static int loopcut_modal (bContext *C, wmOperator *op, wmEvent *event)
        }
        
        /* using the keyboard to input the number of cuts */
-       if (event->val==KM_PRESS) {
+       if (event->val == KM_PRESS) {
                float value;
                
                if (handleNumInput(&lcd->num, event)) {
                        applyNumInput(&lcd->num, &value);
                        
-                       cuts= CLAMPIS(value, 1, 130);
+                       cuts = CLAMPIS(value, 1, 130);
                        
-                       RNA_int_set(op->ptr,"number_cuts",cuts);
+                       RNA_int_set(op->ptr, "number_cuts", cuts);
                        ringsel_find_edge(lcd, cuts);
                        show_cuts = TRUE;
                        
index 5d4647b..dae4eac 100644 (file)
@@ -337,7 +337,7 @@ static void findnearestvert__doClosest(void *userData, BMVert *eve, int x, int y
        }
 
        if (data->dist > 3) {
-               int temp = abs(data->mval[0] - x) + abs(data->mval[1]- y);
+               int temp = abs(data->mval[0] - x) + abs(data->mval[1] - y);
                if (BM_elem_flag_test(eve, BM_ELEM_SELECT) == data->select) {
                        if (data->strict == 1) {
                                return;
@@ -1606,8 +1606,8 @@ void EDBM_convertsel(BMEditMesh *em, short oldmode, short selectmode)
                        /* select all edges associated with every selected vertex */
                        eed = BM_iter_new(&iter, em->bm, BM_EDGES_OF_MESH, NULL);
                        for ( ; eed; eed = BM_iter_step(&iter)) {
-                               if ( (BM_elem_flag_test(eed->v1, BM_ELEM_SELECT) ||
-                                     BM_elem_flag_test(eed->v2, BM_ELEM_SELECT)))
+                               if ((BM_elem_flag_test(eed->v1, BM_ELEM_SELECT) ||
+                                    BM_elem_flag_test(eed->v2, BM_ELEM_SELECT)))
                                {
                                        BM_elem_select_set(em->bm, eed, TRUE);
                                }
@@ -2094,7 +2094,7 @@ static void deselect_nth_active(BMEditMesh *em, BMVert **r_eve, BMEdge **r_eed,
        ese = (BMEditSelection *)em->bm->selected.last;
 
        if (ese) {
-               switch(ese->htype) {
+               switch (ese->htype) {
                case BM_VERT:
                        *r_eve = (BMVert *)ese->ele;
                        return;
@@ -2210,6 +2210,7 @@ int EM_view3d_poll(bContext *C)
 {
        if (ED_operator_editmesh(C) && ED_operator_view3d_active(C))
                return 1;
+
        return 0;
 }
 
index 651ad67..3448ac6 100644 (file)
@@ -1931,7 +1931,7 @@ static int edbm_merge_exec(bContext *C, wmOperator *op)
        BMEditMesh *em = BMEdit_FromObject(obedit);
        int status = 0, uvs = RNA_boolean_get(op->ptr, "uvs");
 
-       switch(RNA_enum_get(op->ptr, "type")) {
+       switch (RNA_enum_get(op->ptr, "type")) {
                case 3:
                        status = merge_target(em, scene, v3d, obedit, 0, uvs, op);
                        break;
@@ -2052,7 +2052,7 @@ static int edbm_remove_doubles_exec(bContext *C, wmOperator *op)
                return OPERATOR_CANCELLED;
        }
        
-       BKE_reportf(op->reports, RPT_INFO, "Removed %d vert%s", count, (count==1)?"ex":"ices");
+       BKE_reportf(op->reports, RPT_INFO, "Removed %d vert%s", count, (count == 1) ? "ex" : "ices");
 
 
        DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
@@ -2630,7 +2630,7 @@ static int edbm_select_axis_exec(bContext *C, wmOperator *op)
 
                BM_ITER(ev, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                        if (!BM_elem_flag_test(ev, BM_ELEM_HIDDEN)) {
-                               switch(mode) {
+                               switch (mode) {
                                case -1: /* aligned */
                                        if (fabs(ev->co[axis] - value) < limit)
                                                BM_elem_select_set(em->bm, ev, TRUE);
@@ -2820,7 +2820,7 @@ static float bm_edge_seg_isect(BMEdge *e, CutCurve *c, int len, char mode,
 
        *isected = 0;
 
-       /* check for *exact* vertex intersection first */
+       /* check for _exact_ vertex intersection first */
        if (mode != KNIFE_MULTICUT) {
                for (i = 0; i < len; i++) {
                        if (i > 0) {
@@ -2937,7 +2937,7 @@ static float bm_edge_seg_isect(BMEdge *e, CutCurve *c, int len, char mode,
                }       
                lastdist = dist;
        }
-       return(perc);
+       return perc;
 } 
 
 #define MAX_CUTS 2048
@@ -2973,7 +2973,9 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op)
                
                RNA_float_get_array(&itemptr, "loc", (float *)&curve[len]);
                len++;
-               if (len >= MAX_CUTS) break;
+               if (len >= MAX_CUTS) {
+                       break;
+               }
        }
        RNA_END;
        
index 2cd1587..58899ac 100644 (file)
 #include "DNA_modifier_types.h"
 #include "DNA_ID.h"
 
+#include "BLI_listbase.h"
+#include "BLI_utildefines.h"
+#include "BLI_math_vector.h"
+#include "BLI_linklist.h"
+
 #include "BKE_library.h"
 #include "BKE_depsgraph.h"
 #include "BKE_context.h"
 #include "BKE_report.h"
 #include "BKE_tessmesh.h"
 
-#include "BLI_listbase.h"
-#include "BLI_utildefines.h"
-#include "BLI_math_vector.h"
-#include "BLI_linklist.h"
-
 #include "ED_object.h"
 #include "ED_mesh.h"
 #include "ED_screen.h"
 #include "mesh_intern.h"
 #include "recast-capi.h"
 
-static void createVertsTrisData(bContext *C, LinkNodeobs, int *nverts_r, float **verts_r, int *ntris_r, int **tris_r)
+static void createVertsTrisData(bContext *C, LinkNode *obs, int *nverts_r, float **verts_r, int *ntris_r, int **tris_r)
 {
        MVert *mvert;
-       int nfaces= 0, *tri, i, curnverts, basenverts, curnfaces;
+       int nfaces = 0, *tri, i, curnverts, basenverts, curnfaces;
        MFace *mface;
        float co[3], wco[3];
        Object *ob;
        LinkNode *oblink, *dmlink;
        DerivedMesh *dm;
-       Scene* scene= CTX_data_scene(C);
-       LinkNode* dms= NULL;
+       Scene *scene = CTX_data_scene(C);
+       LinkNode *dms = NULL;
 
        int nverts, ntris, *tris;
        float *verts;
 
-       nverts= 0;
-       ntris= 0;
+       nverts = 0;
+       ntris = 0;
 
        /* calculate number of verts and tris */
-       for(oblink= obs; oblink; oblink= oblink->next) {
+       for(oblink = obs; oblink; oblink= oblink->next) {
                ob= (Object*) oblink->link;
                dm= mesh_create_derived_no_virtual(scene, ob, NULL, CD_MASK_MESH);
                BLI_linklist_append(&dms, (void*)dm);
@@ -97,7 +97,7 @@ static void createVertsTrisData(bContext *C, LinkNode* obs, int *nverts_r, float
                /* resolve quad faces */
                mface= dm->getTessFaceArray(dm);
                for(i= 0; i<nfaces; i++) {
-                       MFacemf= &mface[i];
+                       MFace *mf= &mface[i];
                        if(mf->v4)
                                ntris+=1;
                }
@@ -134,7 +134,7 @@ static void createVertsTrisData(bContext *C, LinkNode* obs, int *nverts_r, float
                mface= dm->getTessFaceArray(dm);
 
                for(i= 0; i<curnfaces; i++) {
-                       MFacemf= &mface[i];
+                       MFace *mf= &mface[i];
 
                        tri[0]= basenverts + mf->v1;
                        tri[1]= basenverts + mf->v3;
@@ -172,7 +172,7 @@ static int buildNavMesh(const RecastData *recastParams, int nverts, float *verts
        float bmin[3], bmax[3];
        struct recast_heightfield *solid;
        unsigned char *triflags;
-       struct recast_compactHeightfieldchf;
+       struct recast_compactHeightfield *chf;
        struct recast_contourSet *cset;
        int width, height, walkableHeight, walkableClimb, walkableRadius;
        int minRegionArea, mergeRegionArea, maxEdgeLen;
@@ -290,15 +290,15 @@ static int buildNavMesh(const RecastData *recastParams, int nverts, float *verts
        return 1;
 }
 
-static Object* createRepresentation(bContext *C, struct recast_polyMesh *pmesh, struct recast_polyMeshDetail *dmesh, Base* base)
+static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh, struct recast_polyMeshDetail *dmesh, Base *base)
 {
        float co[3], rot[3];
        BMEditMesh *em;
        int i,j, k;
-       unsigned shortv;
+       unsigned short *v;
        int face[3];
        Scene *scene= CTX_data_scene(C);
-       Objectobedit;
+       Object *obedit;
        int createob= base==NULL;
        int nverts, nmeshes, nvp;
        unsigned short *verts, *polys;
@@ -357,7 +357,7 @@ static Object* createRepresentation(bContext *C, struct recast_polyMesh *pmesh,
                unsigned short ndv= meshes[4*i+1];
                unsigned short tribase= meshes[4*i+2];
                unsigned short trinum= meshes[4*i+3];
-               const unsigned shortp= &polys[i*nvp*2];
+               const unsigned short *p= &polys[i*nvp*2];
                int nv= 0;
 
                for(j= 0; j < nvp; ++j) {
@@ -376,9 +376,9 @@ static Object* createRepresentation(bContext *C, struct recast_polyMesh *pmesh,
 
                /* create faces */
                for(j= 0; j<trinum; j++) {
-                       unsigned chartri= &tris[4*(tribase+j)];
-                       BMFacenewFace;
-                       intpolygonIdx;
+                       unsigned char *tri= &tris[4*(tribase+j)];
+                       BMFace *newFace;
+                       int *polygonIdx;
 
                        for(k= 0; k<3; k++) {
                                if(tri[k]<nv)
@@ -424,9 +424,9 @@ static Object* createRepresentation(bContext *C, struct recast_polyMesh *pmesh,
 
 static int navmesh_create_exec(bContext *C, wmOperator *op)
 {
-       Scenescene= CTX_data_scene(C);
-       LinkNodeobs= NULL;
-       BasenavmeshBase= NULL;
+       Scene *scene= CTX_data_scene(C);
+       LinkNode *obs= NULL;
+       Base *navmeshBase= NULL;
 
        CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
                if (base->object->type == OB_MESH) {
@@ -500,8 +500,8 @@ static int navmesh_face_copy_exec(bContext *C, wmOperator *op)
                                /* set target poly idx to other selected faces */
                                BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                                        if(BM_elem_flag_test(efa, BM_ELEM_SELECT) && efa != efa_act) {
-                                               int* recastDataBlock= (int*)CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_RECAST);
-                                               *recastDataBlock= targetPolyIdx;
+                                               int *recastDataBlock = (int*)CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_RECAST);
+                                               *recastDataBlock = targetPolyIdx;
                                        }
                                }
                        }
@@ -537,18 +537,18 @@ static int compare(const void * a, const void * b)
        return ( *(int*)a - *(int*)b );
 }
 
-static int findFreeNavPolyIndex(BMEditMeshem)
+static int findFreeNavPolyIndex(BMEditMesh *em)
 {
        /* construct vector of indices */
-       int numfaces= em->bm->totface;
-       int* indices= MEM_callocN(sizeof(int)*numfaces, "findFreeNavPolyIndex(indices)");
-       BMFaceef;
+       int numfaces = em->bm->totface;
+       int *indices = MEM_callocN(sizeof(int)*numfaces, "findFreeNavPolyIndex(indices)");
+       BMFace *ef;
        BMIter iter;
-       int i, idx= em->bm->totface-1, freeIdx= 1;
+       int i, idx = em->bm->totface-1, freeIdx = 1;
 
        /*XXX this originally went last to first, but that isn't possible anymore*/
        BM_ITER(ef, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
-               int polyIdx= *(int*)CustomData_bmesh_get(&em->bm->pdata, ef->head.data, CD_RECAST);
+               int polyIdx = *(int*)CustomData_bmesh_get(&em->bm->pdata, ef->head.data, CD_RECAST);
                indices[idx]= polyIdx;
                idx--;
        }
@@ -556,8 +556,8 @@ static int findFreeNavPolyIndex(BMEditMesh* em)
        qsort(indices, numfaces, sizeof(int), compare);
 
        /* search first free index */
-       freeIdx= 1;
-       for(i= 0; i<numfaces; i++) {
+       freeIdx = 1;
+       for(i = 0; i<numfaces; i++) {
                if(indices[i]==freeIdx)
                        freeIdx++;
                else if(indices[i]>freeIdx)
@@ -577,7 +577,7 @@ static int navmesh_face_add_exec(bContext *C, wmOperator *UNUSED(op))
        BMIter iter;
        
        if(CustomData_has_layer(&em->bm->pdata, CD_RECAST)) {
-               int targetPolyIdx= findFreeNavPolyIndex(em);
+               int targetPolyIdx = findFreeNavPolyIndex(em);
 
                if(targetPolyIdx>0) {
                        /* set target poly idx to selected faces */
@@ -585,8 +585,8 @@ static int navmesh_face_add_exec(bContext *C, wmOperator *UNUSED(op))
                        
                        BM_ITER(ef, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                                if(BM_elem_flag_test(ef, BM_ELEM_SELECT)) {
-                                       int *recastDataBlock= (int*)CustomData_bmesh_get(&em->bm->pdata, ef->head.data, CD_RECAST);
-                                       *recastDataBlock= targetPolyIdx;
+                                       int *recastDataBlock = (int*)CustomData_bmesh_get(&em->bm->pdata, ef->head.data, CD_RECAST);
+                                       *recastDataBlock = targetPolyIdx;
                                }
                        }
                }
@@ -617,7 +617,7 @@ static int navmesh_obmode_data_poll(bContext *C)
 {
        Object *ob = ED_object_active_context(C);
        if (ob && (ob->mode == OB_MODE_OBJECT) && (ob->type == OB_MESH)) {
-               Mesh *me= ob->data;
+               Mesh *me = ob->data;
                return CustomData_has_layer(&me->pdata, CD_RECAST);
        }
        return FALSE;
@@ -635,7 +635,7 @@ static int navmesh_obmode_poll(bContext *C)
 static int navmesh_reset_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Object *ob = ED_object_active_context(C);
-       Mesh *me= ob->data;
+       Mesh *me = ob->data;
 
        CustomData_free_layers(&me->pdata, CD_RECAST, me->totpoly);
 
@@ -665,7 +665,7 @@ void MESH_OT_navmesh_reset(struct wmOperatorType *ot)
 static int navmesh_clear_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Object *ob = ED_object_active_context(C);
-       Mesh *me= ob->data;
+       Mesh *me = ob->data;
 
        CustomData_free_layers(&me->pdata, CD_RECAST, me->totpoly);
 
index 556288b..29face0 100644 (file)
@@ -193,51 +193,51 @@ void ED_operatormacros_mesh(void)
        wmOperatorType *ot;
        wmOperatorTypeMacro *otmacro;
        
-       ot= WM_operatortype_append_macro("MESH_OT_loopcut_slide", "Loop Cut and Slide", OPTYPE_UNDO|OPTYPE_REGISTER);
+       ot = WM_operatortype_append_macro("MESH_OT_loopcut_slide", "Loop Cut and Slide", OPTYPE_UNDO|OPTYPE_REGISTER);
        ot->description = "Cut mesh loop and slide it";
        WM_operatortype_macro_define(ot, "MESH_OT_loopcut");
-       otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_edge_slide");
+       otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_edge_slide");
        RNA_struct_idprops_unset(otmacro->ptr, "release_confirm");
 
-       ot= WM_operatortype_append_macro("MESH_OT_duplicate_move", "Add Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
+       ot = WM_operatortype_append_macro("MESH_OT_duplicate_move", "Add Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
        ot->description = "Duplicate mesh and move";
        WM_operatortype_macro_define(ot, "MESH_OT_duplicate");
-       otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+       otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
        RNA_enum_set(otmacro->ptr, "proportional", 0);
        RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
 
-       ot= WM_operatortype_append_macro("MESH_OT_rip_move", "Rip", OPTYPE_UNDO|OPTYPE_REGISTER);
+       ot = WM_operatortype_append_macro("MESH_OT_rip_move", "Rip", OPTYPE_UNDO|OPTYPE_REGISTER);
        ot->description = "Rip polygons and move the result";
        WM_operatortype_macro_define(ot, "MESH_OT_rip");
-       otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+       otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
        RNA_enum_set(otmacro->ptr, "proportional", 0);
        RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
 
-       ot= WM_operatortype_append_macro("MESH_OT_extrude_region_move", "Extrude Region and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
+       ot = WM_operatortype_append_macro("MESH_OT_extrude_region_move", "Extrude Region and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
        ot->description = "Extrude region and move result";
-       otmacro= WM_operatortype_macro_define(ot, "MESH_OT_extrude_region");
-       otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+       otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_region");
+       otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
        RNA_enum_set(otmacro->ptr, "proportional", 0);
        RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
 
-       ot= WM_operatortype_append_macro("MESH_OT_extrude_faces_move", "Extrude Individual Faces and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
+       ot = WM_operatortype_append_macro("MESH_OT_extrude_faces_move", "Extrude Individual Faces and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
        ot->description = "Extrude faces and move result";
-       otmacro= WM_operatortype_macro_define(ot, "MESH_OT_extrude_faces_indiv");
-       otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_shrink_fatten");
+       otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_faces_indiv");
+       otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_shrink_fatten");
        RNA_enum_set(otmacro->ptr, "proportional", 0);
        RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
 
-       ot= WM_operatortype_append_macro("MESH_OT_extrude_edges_move", "Extrude Only Edges and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
+       ot = WM_operatortype_append_macro("MESH_OT_extrude_edges_move", "Extrude Only Edges and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
        ot->description = "Extrude edges and move result";
-       otmacro= WM_operatortype_macro_define(ot, "MESH_OT_extrude_edges_indiv");
-       otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+       otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_edges_indiv");
+       otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
        RNA_enum_set(otmacro->ptr, "proportional", 0);
        RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
 
-       ot= WM_operatortype_append_macro("MESH_OT_extrude_vertices_move", "Extrude Only Vertices and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
+       ot = WM_operatortype_append_macro("MESH_OT_extrude_vertices_move", "Extrude Only Vertices and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
        ot->description = "Extrude vertices and move result";
-       otmacro= WM_operatortype_macro_define(ot, "MESH_OT_extrude_verts_indiv");
-       otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+       otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_verts_indiv");
+       otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
        RNA_enum_set(otmacro->ptr, "proportional", 0);
        RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
 }
@@ -249,8 +249,8 @@ void ED_keymap_mesh(wmKeyConfig *keyconf)
        wmKeyMapItem *kmi;
        int i;
        
-       keymap= WM_keymap_find(keyconf, "Mesh", 0, 0);
-       keymap->poll= ED_operator_editmesh;
+       keymap = WM_keymap_find(keyconf, "Mesh", 0, 0);
+       keymap->poll = ED_operator_editmesh;
        
        WM_keymap_add_item(keymap, "MESH_OT_loopcut_slide", RKEY, KM_PRESS, KM_CTRL, 0);
 
index 2d20743..7e1be0d 100644 (file)
@@ -428,10 +428,10 @@ int mouse_mball(bContext *C, const int mval[2], int extend)
 
        view3d_set_viewcontext(C, &vc);
 
-       rect.xmin= mval[0]-12;
-       rect.xmax= mval[0]+12;
-       rect.ymin= mval[1]-12;
-       rect.ymax= mval[1]+12;
+       rect.xmin = mval[0]-12;
+       rect.xmax = mval[0]+12;
+       rect.ymin = mval[1]-12;
+       rect.ymax = mval[1]+12;
 
        hits= view3d_opengl_select(&vc, buffer, MAXPICKBUF, &rect);
 
index f689fb0..5d019cc 100644 (file)
@@ -59,8 +59,8 @@ void ED_keymap_metaball(wmKeyConfig *keyconf)
        wmKeyMap *keymap;
        wmKeyMapItem *kmi;
        
-       keymap= WM_keymap_find(keyconf, "Metaball", 0, 0);
-       keymap->poll= ED_operator_editmball;
+       keymap = WM_keymap_find(keyconf, "Metaball", 0, 0);
+       keymap->poll = ED_operator_editmball;
 
        WM_keymap_add_item(keymap, "OBJECT_OT_metaball_add", AKEY, KM_PRESS, KM_SHIFT, 0);
        
index cb231fc..b8ff71c 100644 (file)
@@ -221,26 +221,26 @@ void ED_operatormacros_object(void)
        wmOperatorType *ot;
        wmOperatorTypeMacro *otmacro;
        
-       ot= WM_operatortype_append_macro("OBJECT_OT_duplicate_move", "Duplicate Objects", OPTYPE_UNDO|OPTYPE_REGISTER);
+       ot = WM_operatortype_append_macro("OBJECT_OT_duplicate_move", "Duplicate Objects", OPTYPE_UNDO|OPTYPE_REGISTER);
        if(ot) {
                ot->description = "Duplicate selected objects and move them";
                WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate");
-               otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+               otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
                RNA_enum_set(otmacro->ptr, "proportional", PROP_EDIT_OFF);
        }
 
        /* grr, should be able to pass options on... */
-       ot= WM_operatortype_append_macro("OBJECT_OT_duplicate_move_linked", "Duplicate Linked", OPTYPE_UNDO|OPTYPE_REGISTER);
+       ot = WM_operatortype_append_macro("OBJECT_OT_duplicate_move_linked", "Duplicate Linked", OPTYPE_UNDO|OPTYPE_REGISTER);
        if(ot) {
                ot->description = "Duplicate selected objects and move them";
-               otmacro= WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate");
+               otmacro = WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate");
                RNA_boolean_set(otmacro->ptr, "linked", TRUE);
-               otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+               otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
                RNA_enum_set(otmacro->ptr, "proportional", PROP_EDIT_OFF);
        }
        
        /* XXX */
-       ot= WM_operatortype_append_macro("OBJECT_OT_add_named_cursor", "Add named object at cursor", OPTYPE_UNDO|OPTYPE_REGISTER);
+       ot = WM_operatortype_append_macro("OBJECT_OT_add_named_cursor", "Add named object at cursor", OPTYPE_UNDO|OPTYPE_REGISTER);
        if(ot) {
                ot->description = "Add named object at cursor";
                RNA_def_string(ot->srna, "name", "Cube", MAX_ID_NAME-2, "Name", "Object name to add");
@@ -263,7 +263,7 @@ void ED_keymap_object(wmKeyConfig *keyconf)
        int i;
        
        /* Objects, Regardless of Mode -------------------------------------------------- */
-       keymap= WM_keymap_find(keyconf, "Object Non-modal", 0, 0);
+       keymap = WM_keymap_find(keyconf, "Object Non-modal", 0, 0);
        
        /* Note: this keymap works disregarding mode */
        kmi = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", TABKEY, KM_PRESS, 0, 0);
@@ -286,8 +286,8 @@ void ED_keymap_object(wmKeyConfig *keyconf)
 
        /* Object Mode ---------------------------------------------------------------- */
        /* Note: this keymap gets disabled in non-objectmode,  */
-       keymap= WM_keymap_find(keyconf, "Object Mode", 0, 0);
-       keymap->poll= object_mode_poll;
+       keymap = WM_keymap_find(keyconf, "Object Mode", 0, 0);
+       keymap->poll = object_mode_poll;
        
        /* object mode supports PET now */
        ED_object_generic_keymap(keyconf, keymap, 1);
@@ -400,8 +400,8 @@ void ED_keymap_object(wmKeyConfig *keyconf)
        /* ################################ LATTICE ################################### */
        /* ############################################################################ */
 
-       keymap= WM_keymap_find(keyconf, "Lattice", 0, 0);
-       keymap->poll= ED_operator_editlattice;
+       keymap = WM_keymap_find(keyconf, "Lattice", 0, 0);
+       keymap->poll = ED_operator_editlattice;
 
        kmi = WM_keymap_add_item(keymap, "LATTICE_OT_select_all", AKEY, KM_PRESS, 0, 0);
        RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);
index 473ed50..272e13e 100644 (file)
@@ -93,8 +93,8 @@ static void keymap_particle(wmKeyConfig *keyconf)
        wmKeyMapItem *kmi;
        wmKeyMap *keymap;
        
-       keymap= WM_keymap_find(keyconf, "Particle", 0, 0);
-       keymap->poll= PE_poll;
+       keymap = WM_keymap_find(keyconf, "Particle", 0, 0);
+       keymap->poll = PE_poll;
        
        kmi = WM_keymap_add_item(keymap, "PARTICLE_OT_select_all", AKEY, KM_PRESS, 0, 0);
        RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);
@@ -187,7 +187,7 @@ static void operatortypes_dynamicpaint(void)
 
 //static void keymap_pointcache(wmWindowManager *wm)
 //{
-//     wmKeyMap *keymap= WM_keymap_find(wm, "Pointcache", 0, 0);
+//     wmKeyMap *keymap = WM_keymap_find(wm, "Pointcache", 0, 0);
 //     
 //     WM_keymap_add_item(keymap, "PHYSICS_OT_bake_all", AKEY, KM_PRESS, 0, 0);
 //     WM_keymap_add_item(keymap, "PHYSICS_OT_free_all", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
index 7459ac0..f3ef0f3 100644 (file)
@@ -97,7 +97,7 @@ void image_buffer_rect_update(Scene *scene, RenderResult *rr, ImBuf *ibuf, volat
                ymax= renrect->ymax - ymin + rr->crop;
                if(ymax<2)
                        return;
-               renrect->ymin= renrect->ymax;
+               renrect->ymin = renrect->ymax;
 
        }
        else {
index f0ef7c6..8cdde5f 100644 (file)
@@ -505,8 +505,8 @@ static int ed_preview_draw_rect(ScrArea *sa, Scene *sce, ID *id, int split, int
                
                if(ABS(rres.rectx-newx)<2 && ABS(rres.recty-newy)<2) {
 
-                       newrect->xmax= MAX2(newrect->xmax, rect->xmin + rres.rectx + offx);
-                       newrect->ymax= MAX2(newrect->ymax, rect->ymin + rres.recty);
+                       newrect->xmax = MAX2(newrect->xmax, rect->xmin + rres.rectx + offx);
+                       newrect->ymax = MAX2(newrect->ymax, rect->ymin + rres.recty);
 
                        if(rres.rectx && rres.recty) {
                                /* temporary conversion to byte for drawing */
@@ -549,10 +549,10 @@ void ED_preview_draw(const bContext *C, void *idp, void *parentp, void *slotp, r
                int ok;
                int newx= rect->xmax-rect->xmin, newy= rect->ymax-rect->ymin;
 
-               newrect.xmin= rect->xmin;
-               newrect.xmax= rect->xmin;
-               newrect.ymin= rect->ymin;
-               newrect.ymax= rect->ymin;
+               newrect.xmin = rect->xmin;
+               newrect.xmax = rect->xmin;
+               newrect.ymin = rect->ymin;
+               newrect.ymax = rect->ymin;
 
                if(parent) {
                        ok = ed_preview_draw_rect(sa, sce, id, 1, 1, rect, &newrect);
index 65fc283..64f54e6 100644 (file)
@@ -152,10 +152,10 @@ void render_view_open(bContext *C, int mx, int my)
                if(sizey < 256) sizey= 256;
 
                /* XXX some magic to calculate postition */
-               rect.xmin= mx + win->posx - sizex/2;
-               rect.ymin= my + win->posy - sizey/2;
-               rect.xmax= rect.xmin + sizex;
-               rect.ymax= rect.ymin + sizey;
+               rect.xmin = mx + win->posx - sizex/2;
+               rect.ymin = my + win->posy - sizey/2;
+               rect.xmax = rect.xmin + sizex;
+               rect.ymax = rect.ymin + sizey;
 
                /* changes context! */
                WM_window_open_temp(C, &rect, WM_WINDOW_RENDER);
index d744149..955a19f 100644 (file)
@@ -74,10 +74,10 @@ static void region_draw_emboss(ARegion *ar, rcti *scirct)
        rcti rect;
        
        /* translate scissor rect to region space */
-       rect.xmin= scirct->xmin - ar->winrct.xmin;
-       rect.ymin= scirct->ymin - ar->winrct.ymin;
-       rect.xmax= scirct->xmax - ar->winrct.xmin;
-       rect.ymax= scirct->ymax - ar->winrct.ymin;
+       rect.xmin = scirct->xmin - ar->winrct.xmin;
+       rect.ymin = scirct->ymin - ar->winrct.ymin;
+       rect.xmax = scirct->xmax - ar->winrct.xmin;
+       rect.ymax = scirct->ymax - ar->winrct.ymin;
        
        /* set transp line */
        glEnable( GL_BLEND );
@@ -406,10 +406,10 @@ void region_scissor_winrct(ARegion *ar, rcti *winrct)
                        if(ar->flag & RGN_FLAG_HIDDEN);
                        else if(ar->alignment & RGN_SPLIT_PREV);
                        else if(ar->alignment==RGN_OVERLAP_LEFT) {
-                               winrct->xmin= ar->winrct.xmax + 1;
+                               winrct->xmin = ar->winrct.xmax + 1;
                        }
                        else if(ar->alignment==RGN_OVERLAP_RIGHT) {
-                               winrct->xmax= ar->winrct.xmin - 1;
+                               winrct->xmax = ar->winrct.xmin - 1;
                        }
                        else break;
                }
@@ -458,10 +458,10 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
                ar->drawrct= winrct;
        else {
                /* extra clip for safety */
-               ar->drawrct.xmin= MAX2(winrct.xmin, ar->drawrct.xmin);
-               ar->drawrct.ymin= MAX2(winrct.ymin, ar->drawrct.ymin);
-               ar->drawrct.xmax= MIN2(winrct.xmax, ar->drawrct.xmax);
-               ar->drawrct.ymax= MIN2(winrct.ymax, ar->drawrct.ymax);
+               ar->drawrct.xmin = MAX2(winrct.xmin, ar->drawrct.xmin);
+               ar->drawrct.ymin = MAX2(winrct.ymin, ar->drawrct.ymin);
+               ar->drawrct.xmax = MIN2(winrct.xmax, ar->drawrct.xmax);
+               ar->drawrct.ymax = MIN2(winrct.ymax, ar->drawrct.ymax);
        }
        
        /* note; this sets state, so we can use wmOrtho and friends */
@@ -525,10 +525,10 @@ void ED_region_tag_redraw_partial(ARegion *ar, rcti *rct)
                }
                else if(ar->drawrct.xmin != ar->drawrct.xmax) {
                        /* partial redraw already set, expand region */
-                       ar->drawrct.xmin= MIN2(ar->drawrct.xmin, rct->xmin);
-                       ar->drawrct.ymin= MIN2(ar->drawrct.ymin, rct->ymin);
-                       ar->drawrct.xmax= MAX2(ar->drawrct.xmax, rct->xmax);
-                       ar->drawrct.ymax= MAX2(ar->drawrct.ymax, rct->ymax);
+                       ar->drawrct.xmin = MIN2(ar->drawrct.xmin, rct->xmin);
+                       ar->drawrct.ymin = MIN2(ar->drawrct.ymin, rct->ymin);
+                       ar->drawrct.xmax = MAX2(ar->drawrct.xmax, rct->xmax);
+                       ar->drawrct.ymax = MAX2(ar->drawrct.ymax, rct->ymax);
                }
        }
 }
@@ -961,12 +961,12 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int
                        ar->winrct= *remainder;
                        
                        if(alignment==RGN_ALIGN_TOP) {
-                               ar->winrct.ymin= ar->winrct.ymax - prefsizey + 1;
-                               remainder->ymax= ar->winrct.ymin - 1;
+                               ar->winrct.ymin = ar->winrct.ymax - prefsizey + 1;
+                               remainder->ymax = ar->winrct.ymin - 1;
                        }
                        else {
-                               ar->winrct.ymax= ar->winrct.ymin + prefsizey - 1;
-                               remainder->ymin= ar->winrct.ymax + 1;
+                               ar->winrct.ymax = ar->winrct.ymin + prefsizey - 1;
+                               remainder->ymin = ar->winrct.ymax + 1;
                        }
                }
        }
@@ -984,14 +984,14 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int
                        ar->winrct= *remainder;
                        
                        if(ELEM(alignment, RGN_ALIGN_RIGHT, RGN_OVERLAP_RIGHT)) {
-                               ar->winrct.xmin= ar->winrct.xmax - prefsizex + 1;
+                               ar->winrct.xmin = ar->winrct.xmax - prefsizex + 1;
                                if(alignment==RGN_ALIGN_RIGHT)
-                                       remainder->xmax= ar->winrct.xmin - 1;
+                                       remainder->xmax = ar->winrct.xmin - 1;
                        }
                        else {
-                               ar->winrct.xmax= ar->winrct.xmin + prefsizex - 1;
+                               ar->winrct.xmax = ar->winrct.xmin + prefsizex - 1;
                                if(alignment==RGN_ALIGN_LEFT)
-                                       remainder->xmin= ar->winrct.xmax + 1;
+                                       remainder->xmin = ar->winrct.xmax + 1;
                        }
                }
        }
@@ -1001,8 +1001,8 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int
                
                if(alignment==RGN_ALIGN_HSPLIT) {
                        if( rct_fits(remainder, 'h', prefsizex) > 4) {
-                               ar->winrct.xmax= (remainder->xmin+remainder->xmax)/2;
-                               remainder->xmin= ar->winrct.xmax+1;
+                               ar->winrct.xmax = (remainder->xmin+remainder->xmax)/2;
+                               remainder->xmin = ar->winrct.xmax+1;
                        }
                        else {
                                BLI_init_rcti(remainder, 0, 0, 0, 0);
@@ -1010,8 +1010,8 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int
                }
                else {
                        if( rct_fits(remainder, 'v', prefsizey) > 4) {
-                               ar->winrct.ymax= (remainder->ymin+remainder->ymax)/2;
-                               remainder->ymin= ar->winrct.ymax+1;
+                               ar->winrct.ymax = (remainder->ymin+remainder->ymax)/2;
+                               remainder->ymin = ar->winrct.ymax+1;
                        }
                        else {
                                BLI_init_rcti(remainder, 0, 0, 0, 0);
@@ -1072,15 +1072,15 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int
                ar->winrct= *remainder;
                
                if(alignment==RGN_ALIGN_TOP)
-                       ar->winrct.ymin= ar->winrct.ymax;
+                       ar->winrct.ymin = ar->winrct.ymax;
                else if(alignment==RGN_ALIGN_BOTTOM)
-                       ar->winrct.ymax= ar->winrct.ymin;
+                       ar->winrct.ymax = ar->winrct.ymin;
                else if(ELEM(alignment, RGN_ALIGN_RIGHT, RGN_OVERLAP_RIGHT))
-                       ar->winrct.xmin= ar->winrct.xmax;
+                       ar->winrct.xmin = ar->winrct.xmax;
                else if(ELEM(alignment, RGN_ALIGN_LEFT, RGN_OVERLAP_LEFT))
-                       ar->winrct.xmax= ar->winrct.xmin;
+                       ar->winrct.xmax = ar->winrct.xmin;
                else /* prevent winrct to be valid */
-                       ar->winrct.xmax= ar->winrct.xmin;
+                       ar->winrct.xmax = ar->winrct.xmin;
        }
 
        /* restore prev-split exception */
@@ -1113,15 +1113,15 @@ static void area_calc_totrct(ScrArea *sa, int sizex, int sizey)
 {
        short rt= 0; // CLAMPIS(G.rt, 0, 16);
 
-       if(sa->v1->vec.x>0) sa->totrct.xmin= sa->v1->vec.x+1+rt;
-       else sa->totrct.xmin= sa->v1->vec.x;
-       if(sa->v4->vec.x<sizex-1) sa->totrct.xmax= sa->v4->vec.x-1-rt;
-       else sa->totrct.xmax= sa->v4->vec.x;
+       if(sa->v1->vec.x>0) sa->totrct.xmin = sa->v1->vec.x+1+rt;
+       else sa->totrct.xmin = sa->v1->vec.x;
+       if(sa->v4->vec.x<sizex-1) sa->totrct.xmax = sa->v4->vec.x-1-rt;
+       else sa->totrct.xmax = sa->v4->vec.x;
        
-       if(sa->v1->vec.y>0) sa->totrct.ymin= sa->v1->vec.y+1+rt;
-       else sa->totrct.ymin= sa->v1->vec.y;
-       if(sa->v2->vec.y<sizey-1) sa->totrct.ymax= sa->v2->vec.y-1-rt;
-       else sa->totrct.ymax= sa->v2->vec.y;
+       if(sa->v1->vec.y>0) sa->totrct.ymin = sa->v1->vec.y+1+rt;
+       else sa->totrct.ymin = sa->v1->vec.y;
+       if(sa->v2->vec.y<sizey-1) sa->totrct.ymax = sa->v2->vec.y-1-rt;
+       else sa->totrct.ymax = sa->v2->vec.y;
        
        /* for speedup */
        sa->winx= sa->totrct.xmax-sa->totrct.xmin+1;
@@ -1154,12 +1154,12 @@ static void ed_default_handlers(wmWindowManager *wm, ScrArea *sa, ListBase *hand
        }
        if(flag & ED_KEYMAP_VIEW2D) {
                /* 2d-viewport handling+manipulation */
-               wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "View2D", 0, 0);
+               wmKeyMap *keymap = WM_keymap_find(wm->defaultconf, "View2D", 0, 0);
                WM_event_add_keymap_handler(handlers, keymap);
        }
        if(flag & ED_KEYMAP_MARKERS) {
                /* time-markers */
-               wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "Markers", 0, 0);
+               wmKeyMap *keymap = WM_keymap_find(wm->defaultconf, "Markers", 0, 0);
                
                /* time space only has this keymap, the others get a boundbox restricted map */
                if(sa->spacetype!=SPACE_TIME) {
@@ -1175,22 +1175,22 @@ static void ed_default_handlers(wmWindowManager *wm, ScrArea *sa, ListBase *hand
        }
        if(flag & ED_KEYMAP_ANIMATION) {
                /* frame changing and timeline operators (for time spaces) */
-               wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "Animation", 0, 0);
+               wmKeyMap *keymap = WM_keymap_find(wm->defaultconf, "Animation", 0, 0);
                WM_event_add_keymap_handler(handlers, keymap);
        }
        if(flag & ED_KEYMAP_FRAMES) {
                /* frame changing/jumping (for all spaces) */
-               wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "Frames", 0, 0);
+               wmKeyMap *keymap = WM_keymap_find(wm->defaultconf, "Frames", 0, 0);
                WM_event_add_keymap_handler(handlers, keymap);
        }
        if(flag & ED_KEYMAP_GPENCIL) {
                /* grease pencil */
-               wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "Grease Pencil", 0, 0);
+               wmKeyMap *keymap = WM_keymap_find(wm->defaultconf, "Grease Pencil", 0, 0);
                WM_event_add_keymap_handler(handlers, keymap);
        }
        if(flag & ED_KEYMAP_HEADER) {
                /* standard keymap for headers regions */
-               wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "Header", 0, 0);
+               wmKeyMap *keymap = WM_keymap_find(wm->defaultconf, "Header", 0, 0);
                WM_event_add_keymap_handler(handlers, keymap);
        }
 }
@@ -1505,7 +1505,7 @@ int ED_area_header_switchbutton(const bContext *C, uiBlock *block, int yco)
        uiBut *but;
        int xco= 8;
        
-       but= uiDefIconTextButC(block, ICONTEXTROW, 0, ICON_VIEW3D, 
+       but = uiDefIconTextButC(block, ICONTEXTROW, 0, ICON_VIEW3D, 
                                                   editortype_pup(), xco, yco, UI_UNIT_X+10, UI_UNIT_Y, 
                                                   &(sa->butspacetype), 1.0, SPACEICONMAX, 0, 0, 
                                                   TIP_("Displays current editor type. Click for menu of available types"));
@@ -1527,14 +1527,14 @@ int ED_area_header_standardbuttons(const bContext *C, uiBlock *block, int yco)
        uiBlockSetEmboss(block, UI_EMBOSSN);
 
        if (sa->flag & HEADER_NO_PULLDOWN) {
-               but= uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, 0,
+               but = uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, 0,
                                                 ICON_DISCLOSURE_TRI_RIGHT,
                                                 xco,yco,UI_UNIT_X,UI_UNIT_Y-2,
                                                 &(sa->flag), 0, 0, 0, 0, 
                                                 "Show pulldown menus");
        }
        else {
-               but= uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, 0,
+               but = uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, 0,
                                                 ICON_DISCLOSURE_TRI_DOWN,
                                                 xco,yco,UI_UNIT_X,UI_UNIT_Y-2,
                                                 &(sa->flag), 0, 0, 0, 0, 
@@ -1709,7 +1709,7 @@ void ED_region_panels_init(wmWindowManager *wm, ARegion *ar)
        
        UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_PANELS_UI, ar->winx, ar->winy);
 
-       keymap= WM_keymap_find(wm->defaultconf, "View2D Buttons List", 0, 0);
+       keymap = WM_keymap_find(wm->defaultconf, "View2D Buttons List", 0, 0);
        WM_event_add_keymap_handler(&ar->handlers, keymap);
 }
 
@@ -1788,17 +1788,17 @@ void ED_region_info_draw(ARegion *ar, const char *text, int block, float alpha)
 
        /* background box */
        rect= ar->winrct;
-       rect.xmin= 0;
-       rect.ymin= ar->winrct.ymax - ar->winrct.ymin - header_height;
+       rect.xmin = 0;
+       rect.ymin = ar->winrct.ymax - ar->winrct.ymin - header_height;
 
        if(block) {
-               rect.xmax= ar->winrct.xmax - ar->winrct.xmin;
+               rect.xmax = ar->winrct.xmax - ar->winrct.xmin;
        }
        else {
-               rect.xmax= rect.xmin + BLF_width(fontid, text) + 24;
+               rect.xmax = rect.xmin + BLF_width(fontid, text) + 24;
        }
 
-       rect.ymax= ar->winrct.ymax - ar->winrct.ymin;
+       rect.ymax = ar->winrct.ymax - ar->winrct.ymin;
 
        glEnable(GL_BLEND);
        glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
index 2608e9e..495bfb9 100644 (file)
@@ -710,10 +710,10 @@ gla2DDrawInfo *glaBegin2DDraw(rcti *screen_rect, rctf *world_rect)
        if (world_rect) {
                di->world_rect= *world_rect;
        } else {
-               di->world_rect.xmin= di->screen_rect.xmin;
-               di->world_rect.ymin= di->screen_rect.ymin;
-               di->world_rect.xmax= di->screen_rect.xmax;
-               di->world_rect.ymax= di->screen_rect.ymax;
+               di->world_rect.xmin = di->screen_rect.xmin;
+               di->world_rect.ymin = di->screen_rect.ymin;
+               di->world_rect.xmax = di->screen_rect.xmax;
+               di->world_rect.ymax = di->screen_rect.ymax;
        }
 
        sc_w= (di->screen_rect.xmax-di->screen_rect.xmin);
index 3f8f786..f07ca8b 100644 (file)
@@ -1075,10 +1075,10 @@ void ED_screen_refresh(wmWindowManager *wm, wmWindow *win)
                ScrArea *sa;
                rcti winrct;
        
-               winrct.xmin= 0;
-               winrct.xmax= win->sizex-1;
-               winrct.ymin= 0;
-               winrct.ymax= win->sizey-1;
+               winrct.xmin = 0;
+               winrct.xmax = win->sizex-1;
+               winrct.ymin = 0;
+               winrct.ymax = win->sizey-1;
                
                screen_test_scale(win->screen, win->sizex, win->sizey);
                
index 453b495..00915be 100644 (file)
@@ -3227,10 +3227,10 @@ static int userpref_show_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *ev
        sizey= 480;
        
        /* some magic to calculate postition */
-       rect.xmin= event->x + CTX_wm_window(C)->posx - sizex/2;
-       rect.ymin= event->y + CTX_wm_window(C)->posy - sizey/2;
-       rect.xmax= rect.xmin + sizex;
-       rect.ymax= rect.ymin + sizey;
+       rect.xmin = event->x + CTX_wm_window(C)->posx - sizex/2;
+       rect.ymin = event->y + CTX_wm_window(C)->posy - sizey/2;
+       rect.xmax = rect.xmin + sizex;
+       rect.ymax = rect.ymin + sizey;
        
        /* changes context! */
        WM_window_open_temp(C, &rect, WM_WINDOW_USERPREFS);
@@ -3495,7 +3495,7 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
        wmKeyMapItem *kmi;
        
        /* Screen Editing ------------------------------------------------ */
-       keymap= WM_keymap_find(keyconf, "Screen Editing", 0, 0);
+       keymap = WM_keymap_find(keyconf, "Screen Editing", 0, 0);
        
        RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_actionzone", LEFTMOUSE, KM_PRESS, 0, 0)->ptr, "modifier", 0);
        RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_actionzone", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "modifier", 1);
@@ -3514,12 +3514,12 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
        
        
        /* Header Editing ------------------------------------------------ */
-       keymap= WM_keymap_find(keyconf, "Header", 0, 0);
+       keymap = WM_keymap_find(keyconf, "Header", 0, 0);
        
        WM_keymap_add_item(keymap, "SCREEN_OT_header_toolbox", RIGHTMOUSE, KM_PRESS, 0, 0);
        
        /* Screen General ------------------------------------------------ */
-       keymap= WM_keymap_find(keyconf, "Screen", 0, 0);
+       keymap = WM_keymap_find(keyconf, "Screen", 0, 0);
        
        /* standard timers */
        WM_keymap_add_item(keymap, "SCREEN_OT_animation_step", TIMER0, KM_ANY, KM_ANY, 0);
@@ -3573,7 +3573,7 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
        
        
        /* Anim Playback ------------------------------------------------ */
-       keymap= WM_keymap_find(keyconf, "Frames", 0, 0);
+       keymap = WM_keymap_find(keyconf, "Frames", 0, 0);
        
        /* frame offsets */
        RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_offset", UPARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "delta", 10);
@@ -3611,7 +3611,7 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
        
        /* Alternative keys for animation and sequencer playing */
 #if 0 // XXX: disabled for restoring later... bad implementation
-       keymap= WM_keymap_find(keyconf, "Frames", 0, 0);
+       keymap = WM_keymap_find(keyconf, "Frames", 0, 0);
        kmi = WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", RIGHTARROWKEY, KM_PRESS, KM_ALT, 0);
                RNA_boolean_set(kmi->ptr, "cycle_speed", TRUE);
        
index 9008458..fbb0df4 100644 (file)
@@ -223,10 +223,10 @@ static void partialvis_update_grids(Object *ob,
 
 static void rect_from_props(rcti *rect, PointerRNA *ptr)
 {
-       rect->xmin= RNA_int_get(ptr, "xmin");
-       rect->ymin= RNA_int_get(ptr, "ymin");
-       rect->xmax= RNA_int_get(ptr, "xmax");
-       rect->ymax= RNA_int_get(ptr, "ymax");
+       rect->xmin = RNA_int_get(ptr, "xmin");
+       rect->ymin = RNA_int_get(ptr, "ymin");
+       rect->xmax = RNA_int_get(ptr, "xmax");
+       rect->ymax = RNA_int_get(ptr, "ymax");
 }
 
 static void clip_planes_from_rect(bContext *C,
index bb1833b..86af350 100644 (file)
@@ -443,7 +443,7 @@ static void ed_keymap_paint_brush_switch(wmKeyMap *keymap, const char *mode)
        int i;
        /* index 0-9 (zero key is tenth), shift key for index 10-19 */
        for (i = 0; i < 20; i++) {
-               kmi= WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set",
+               kmi = WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set",
                                        ZEROKEY + ((i + 1) % 10), KM_PRESS, i < 10 ? 0 : KM_SHIFT, 0);
                RNA_string_set(kmi->ptr, "mode", mode);
                RNA_int_set(kmi->ptr, "index", i);
@@ -454,10 +454,10 @@ static void ed_keymap_paint_brush_size(wmKeyMap *keymap, const char *UNUSED(path
 {
        wmKeyMapItem *kmi;
 
-       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_scale_size", LEFTBRACKETKEY, KM_PRESS, 0, 0);
+       kmi = WM_keymap_add_item(keymap, "BRUSH_OT_scale_size", LEFTBRACKETKEY, KM_PRESS, 0, 0);
        RNA_float_set(kmi->ptr, "scalar", 0.9);
 
-       kmi= WM_keymap_add_item(keymap, "BRUSH_OT_scale_size", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
+       kmi = WM_keymap_add_item(keymap, "BRUSH_OT_scale_size", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
        RNA_float_set(kmi->ptr, "scalar", 10.0/9.0); // 1.1111....
 }
 
@@ -533,13 +533,13 @@ void paint_partial_visibility_keys(wmKeyMap *keymap)
        wmKeyMapItem *kmi;
        
        /* Partial visiblity */
-       kmi= WM_keymap_add_item(keymap, "PAINT_OT_hide_show", HKEY, KM_PRESS, KM_SHIFT, 0);
+       kmi = WM_keymap_add_item(keymap, "PAINT_OT_hide_show", HKEY, KM_PRESS, KM_SHIFT, 0);
        RNA_enum_set(kmi->ptr, "action", PARTIALVIS_SHOW);
        RNA_enum_set(kmi->ptr, "area", PARTIALVIS_INSIDE);
-       kmi= WM_keymap_add_item(keymap, "PAINT_OT_hide_show", HKEY, KM_PRESS, 0, 0);
+       kmi = WM_keymap_add_item(keymap, "PAINT_OT_hide_show", HKEY, KM_PRESS, 0, 0);
        RNA_enum_set(kmi->ptr, "action", PARTIALVIS_HIDE);
        RNA_enum_set(kmi->ptr, "area", PARTIALVIS_INSIDE);
-       kmi= WM_keymap_add_item(keymap, "PAINT_OT_hide_show", HKEY, KM_PRESS, KM_ALT, 0);
+       kmi = WM_keymap_add_item(keymap, "PAINT_OT_hide_show", HKEY, KM_PRESS, KM_ALT, 0);
        RNA_enum_set(kmi->ptr, "action", PARTIALVIS_SHOW);
        RNA_enum_set(kmi->ptr, "area", PARTIALVIS_ALL);
 }
@@ -551,8 +551,8 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
        int i;
        
        /* Sculpt mode */
-       keymap= WM_keymap_find(keyconf, "Sculpt", 0, 0);
-       keymap->poll= sculpt_poll;
+       keymap = WM_keymap_find(keyconf, "Sculpt", 0, 0);
+       keymap->poll = sculpt_poll;
 
        RNA_enum_set(WM_keymap_add_item(keymap, "SCULPT_OT_brush_stroke", LEFTMOUSE, KM_PRESS, 0,        0)->ptr, "mode", BRUSH_STROKE_NORMAL);
        RNA_enum_set(WM_keymap_add_item(keymap, "SCULPT_OT_brush_stroke", LEFTMOUSE, KM_PRESS, KM_CTRL,  0)->ptr, "mode", BRUSH_STROKE_INVERT);
@@ -565,11 +565,11 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
                RNA_int_set(WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", ZEROKEY+i, KM_PRESS, KM_CTRL, 0)->ptr, "level", i);
 
        /* multires switch */
-       kmi= WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", PAGEUPKEY, KM_PRESS, 0, 0);
+       kmi = WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", PAGEUPKEY, KM_PRESS, 0, 0);
        RNA_int_set(kmi->ptr, "level", 1);
        RNA_boolean_set(kmi->ptr, "relative", TRUE);
 
-       kmi= WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", PAGEDOWNKEY, KM_PRESS, 0, 0);
+       kmi = WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", PAGEDOWNKEY, KM_PRESS, 0, 0);
        RNA_int_set(kmi->ptr, "level", -1);
        RNA_boolean_set(kmi->ptr, "relative", TRUE);
 
@@ -598,8 +598,8 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
        RNA_string_set(kmi->ptr, "data_path", "tool_settings.sculpt.brush.texture_angle_source_random");
 
        /* Vertex Paint mode */
-       keymap= WM_keymap_find(keyconf, "Vertex Paint", 0, 0);
-       keymap->poll= vertex_paint_mode_poll;
+       keymap = WM_keymap_find(keyconf, "Vertex Paint", 0, 0);
+       keymap->poll = vertex_paint_mode_poll;
 
        WM_keymap_verify_item(keymap, "PAINT_OT_vertex_paint", LEFTMOUSE, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "PAINT_OT_sample_color", RIGHTMOUSE, KM_PRESS, 0, 0);
@@ -615,8 +615,8 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
        RNA_string_set(kmi->ptr, "data_path", "vertex_paint_object.data.use_paint_mask");
 
        /* Weight Paint mode */
-       keymap= WM_keymap_find(keyconf, "Weight Paint", 0, 0);
-       keymap->poll= weight_paint_mode_poll;
+       keymap = WM_keymap_find(keyconf, "Weight Paint", 0, 0);
+       keymap->poll = weight_paint_mode_poll;
 
        WM_keymap_verify_item(keymap, "PAINT_OT_weight_paint", LEFTMOUSE, KM_PRESS, 0, 0);
 
@@ -642,8 +642,8 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
 
        
        /*Weight paint's Vertex Selection Mode */
-       keymap= WM_keymap_find(keyconf, "Weight Paint Vertex Selection", 0, 0);
-       keymap->poll= vert_paint_poll;
+       keymap = WM_keymap_find(keyconf, "Weight Paint Vertex Selection", 0, 0);
+       keymap->poll = vert_paint_poll;
        WM_keymap_add_item(keymap, "PAINT_OT_vert_select_all", AKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "PAINT_OT_vert_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "VIEW3D_OT_select_border", BKEY, KM_PRESS, 0, 0);
@@ -654,8 +654,8 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "VIEW3D_OT_select_circle", CKEY, KM_PRESS, 0, 0);
 
        /* Image/Texture Paint mode */
-       keymap= WM_keymap_find(keyconf, "Image Paint", 0, 0);
-       keymap->poll= image_texture_paint_poll;
+       keymap = WM_keymap_find(keyconf, "Image Paint", 0, 0);
+       keymap->poll = image_texture_paint_poll;
 
        WM_keymap_add_item(keymap, "PAINT_OT_image_paint", LEFTMOUSE, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "PAINT_OT_grab_clone", RIGHTMOUSE, KM_PRESS, 0, 0);
@@ -670,8 +670,8 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
        RNA_string_set(kmi->ptr, "data_path", "image_paint_object.data.use_paint_mask");
 
        /* face-mask mode */
-       keymap= WM_keymap_find(keyconf, "Face Mask", 0, 0);
-       keymap->poll= facemask_paint_poll;
+       keymap = WM_keymap_find(keyconf, "Face Mask", 0, 0);
+       keymap->poll = facemask_paint_poll;
 
        WM_keymap_add_item(keymap, "PAINT_OT_face_select_all", AKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "PAINT_OT_face_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
@@ -684,8 +684,8 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "PAINT_OT_face_select_linked", LKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "PAINT_OT_face_select_linked_pick", LKEY, KM_PRESS, 0, 0);
 
-       keymap= WM_keymap_find(keyconf, "UV Sculpt", 0, 0);
-       keymap->poll= uv_sculpt_poll;
+       keymap = WM_keymap_find(keyconf, "UV Sculpt", 0, 0);
+       keymap->poll = uv_sculpt_poll;
 
        kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", QKEY, KM_PRESS, 0, 0);
        RNA_string_set(kmi->ptr, "data_path", "tool_settings.use_uv_sculpt");
index f29dba4..024a9ff 100644 (file)
@@ -93,7 +93,7 @@ void draw_channel_names(bContext *C, bAnimContext *ac, ARegion *ar)
                /* don't use totrect set, as the width stays the same 
                 * (NOTE: this is ok here, the configuration is pretty straightforward) 
                 */
-               v2d->tot.ymin= (float)(-height);
+               v2d->tot.ymin = (float)(-height);
        }
        /* need to do a view-sync here, so that the keys area doesn't jump around (it must copy this) */
        UI_view2d_sync(NULL, ac->sa, v2d, V2D_LOCK_COPY);
@@ -209,7 +209,7 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
        /* don't use totrect set, as the width stays the same 
         * (NOTE: this is ok here, the configuration is pretty straightforward) 
         */
-       v2d->tot.ymin= (float)(-height);
+       v2d->tot.ymin = (float)(-height);
        
        /* first backdrop strips */
        y= (float)(-ACHANNEL_HEIGHT);
index 17f1dfc..b8c310f 100644 (file)
@@ -355,8 +355,8 @@ static int actkeys_viewall(bContext *C, const short onlySel)
        v2d->cur.xmax += extra;
        
        /* set vertical range */
-       v2d->cur.ymax= 0.0f;
-       v2d->cur.ymin= (float)-(v2d->mask.ymax - v2d->mask.ymin);
+       v2d->cur.ymax = 0.0f;
+       v2d->cur.ymin = (float)-(v2d->mask.ymax - v2d->mask.ymin);
        
        /* do View2D syncing */
        UI_view2d_sync(CTX_wm_screen(C), CTX_wm_area(C), v2d, V2D_LOCK_COPY);
index 82072c7..f502a97 100644 (file)
@@ -93,11 +93,11 @@ void ED_operatormacros_action(void)
        wmOperatorType *ot;
        wmOperatorTypeMacro *otmacro;
        
-       ot= WM_operatortype_append_macro("ACTION_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
+       ot = WM_operatortype_append_macro("ACTION_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
        if (ot) {
                ot->description = "Make a copy of all selected keyframes and move them";
                WM_operatortype_macro_define(ot, "ACTION_OT_duplicate");
-               otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform");
+               otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform");
                RNA_enum_set(otmacro->ptr, "mode", TFM_TIME_DUPLICATE);
        }
        
@@ -114,13 +114,13 @@ static void action_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap)
        kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, 0, 0);
                RNA_boolean_set(kmi->ptr, "extend", FALSE);
                RNA_boolean_set(kmi->ptr, "column", FALSE);
-       kmi= WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
+       kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
                RNA_boolean_set(kmi->ptr, "extend", FALSE);
                RNA_boolean_set(kmi->ptr, "column", TRUE);
-       kmi= WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
+       kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
                RNA_boolean_set(kmi->ptr, "extend", TRUE);
                RNA_boolean_set(kmi->ptr, "column", FALSE);
-       kmi= WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT|KM_SHIFT, 0);
+       kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT|KM_SHIFT, 0);
                RNA_boolean_set(kmi->ptr, "extend", TRUE);
                RNA_boolean_set(kmi->ptr, "column", TRUE);
                
@@ -128,14 +128,14 @@ static void action_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap)
        kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
                RNA_boolean_set(kmi->ptr, "extend", FALSE);
                RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_TEST);
-       kmi= WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+       kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
                RNA_boolean_set(kmi->ptr, "extend", TRUE);
                RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_TEST);
        
-       kmi= WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0);
+       kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0);
                RNA_boolean_set(kmi->ptr, "extend", FALSE);
                RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_LEFT);
-       kmi= WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
+       kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
                RNA_boolean_set(kmi->ptr, "extend", FALSE);
                RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_RIGHT);
        
@@ -225,7 +225,7 @@ void action_keymap(wmKeyConfig *keyconf)
         */
        
        /* keyframes */
-       keymap= WM_keymap_find(keyconf, "Dopesheet", SPACE_ACTION, 0);
+       keymap = WM_keymap_find(keyconf, "Dopesheet", SPACE_ACTION, 0);
        action_keymap_keyframes(keyconf, keymap);
 }
 
index 0fef3dd..3f3966b 100644 (file)
@@ -281,10 +281,10 @@ static int actkeys_borderselect_exec(bContext *C, wmOperator *op)
                deselect_action_keys(&ac, 1, SELECT_SUBTRACT);
        
        /* get settings from operator */
-       rect.xmin= RNA_int_get(op->ptr, "xmin");
-       rect.ymin= RNA_int_get(op->ptr, "ymin");
-       rect.xmax= RNA_int_get(op->ptr, "xmax");
-       rect.ymax= RNA_int_get(op->ptr, "ymax");
+       rect.xmin = RNA_int_get(op->ptr, "xmin");
+       rect.ymin = RNA_int_get(op->ptr, "ymin");
+       rect.xmax = RNA_int_get(op->ptr, "xmax");
+       rect.ymax = RNA_int_get(op->ptr, "ymax");
                
        gesture_mode= RNA_int_get(op->ptr, "gesture_mode");
        if (gesture_mode == GESTURE_MODAL_SELECT)
index 7bda0c9..8f14ef3 100644 (file)
@@ -101,10 +101,10 @@ static SpaceLink *action_new(const bContext *C)
        BLI_addtail(&saction->regionbase, ar);
        ar->regiontype= RGN_TYPE_WINDOW;
        
-       ar->v2d.tot.xmin= -10.0f;
-       ar->v2d.tot.ymin= (float)(-sa->winy)/3.0f;
-       ar->v2d.tot.xmax= (float)(sa->winx);
-       ar->v2d.tot.ymax= 0.0f;
+       ar->v2d.tot.xmin = -10.0f;
+       ar->v2d.tot.ymin = (float)(-sa->winy)/3.0f;
+       ar->v2d.tot.xmax = (float)(sa->winx);
+       ar->v2d.tot.ymax = 0.0f;
        
        ar->v2d.cur = ar->v2d.tot;
        
@@ -160,7 +160,7 @@ static void action_main_area_init(wmWindowManager *wm, ARegion *ar)
        UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
        
        /* own keymap */
-       keymap= WM_keymap_find(wm->defaultconf, "Dopesheet", SPACE_ACTION, 0);
+       keymap = WM_keymap_find(wm->defaultconf, "Dopesheet", SPACE_ACTION, 0);
        WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
 }
 
@@ -223,7 +223,7 @@ static void action_channel_area_init(wmWindowManager *wm, ARegion *ar)
        UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy);
        
        /* own keymap */
-       keymap= WM_keymap_find(wm->defaultconf, "Animation Channels", 0, 0);
+       keymap = WM_keymap_find(wm->defaultconf, "Animation Channels", 0, 0);
        WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
 }
 
index 2b63e45..440c3c6 100644 (file)
@@ -994,7 +994,7 @@ void buttons_context_draw(const bContext *C, uiLayout *layout)
 
        block= uiLayoutGetBlock(row);
        uiBlockSetEmboss(block, UI_EMBOSSN);
-       but= uiDefIconButBitC(block, ICONTOG, SB_PIN_CONTEXT, 0, ICON_UNPINNED, 0, 0, UI_UNIT_X, UI_UNIT_Y, &sbuts->flag, 0, 0, 0, 0, "Follow context or keep fixed datablock displayed");
+       but = uiDefIconButBitC(block, ICONTOG, SB_PIN_CONTEXT, 0, ICON_UNPINNED, 0, 0, UI_UNIT_X, UI_UNIT_Y, &sbuts->flag, 0, 0, 0, 0, "Follow context or keep fixed datablock displayed");
        uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
        uiButSetFunc(but, pin_cb, NULL, NULL);
 
index 6777e2c..52327d3 100644 (file)
@@ -123,7 +123,7 @@ void buttons_header_buttons(const bContext *C, ARegion *ar)
 
 #define BUTTON_HEADER_CTX(_ctx, _icon, _tip) \
        if(sbuts->pathflag & (1<<_ctx)) { \
-               but= uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, _icon, xco+=BUT_UNIT_X, yco, BUT_UNIT_X, UI_UNIT_Y, &(sbuts->mainb), 0.0, (float)_ctx, 0, 0, TIP_(_tip)); \
+               but = uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, _icon, xco+=BUT_UNIT_X, yco, BUT_UNIT_X, UI_UNIT_Y, &(sbuts->mainb), 0.0, (float)_ctx, 0, 0, TIP_(_tip)); \
                uiButClearFlag(but, UI_BUT_UNDO); \
        } \
 
index fb46dd5..ae1f504 100644 (file)
@@ -395,11 +395,11 @@ void uiTemplateTextureUser(uiLayout *layout, bContext *C)
        BLI_snprintf(name, UI_MAX_NAME_STR, "%s", user->name);
 
        if(user->icon) {
-               but= uiDefIconTextMenuBut(block, template_texture_user_menu, NULL,
+               but = uiDefIconTextMenuBut(block, template_texture_user_menu, NULL,
                        user->icon, name, 0, 0, UI_UNIT_X*4, UI_UNIT_Y, "");
        }
        else {
-               but= uiDefMenuBut(block, template_texture_user_menu, NULL,
+               but = uiDefMenuBut(block, template_texture_user_menu, NULL,
                        name, 0, 0, UI_UNIT_X*4, UI_UNIT_Y, "");
        }
 
@@ -459,7 +459,7 @@ void uiTemplateTextureShow(uiLayout *layout, bContext *C, PointerRNA *ptr, Prope
                uiBlock *block = uiLayoutGetBlock(layout);
                uiBut *but;
                
-               but= uiDefIconBut(block, BUT, 0, ICON_BUTS, 0, 0, UI_UNIT_X, UI_UNIT_Y,
+               but = uiDefIconBut(block, BUT, 0, ICON_BUTS, 0, 0, UI_UNIT_X, UI_UNIT_Y,
                        NULL, 0.0, 0.0, 0.0, 0.0, "Show texture in texture tab");
                uiButSetFunc(but, template_texture_show, user->ptr.data, user->prop);
        }
index 6be8421..de6c1c2 100644 (file)
@@ -139,7 +139,7 @@ static void buttons_main_area_init(wmWindowManager *wm, ARegion *ar)
 
        ED_region_panels_init(wm, ar);
 
-       keymap= WM_keymap_find(wm->defaultconf, "Property Editor", SPACE_BUTS, 0);
+       keymap = WM_keymap_find(wm->defaultconf, "Property Editor", SPACE_BUTS, 0);
        WM_event_add_keymap_handler(&ar->handlers, keymap);
 }
 
@@ -191,7 +191,7 @@ static void buttons_operatortypes(void)
 
 static void buttons_keymap(struct wmKeyConfig *keyconf)
 {
-       wmKeyMap *keymap= WM_keymap_find(keyconf, "Property Editor", SPACE_BUTS, 0);
+       wmKeyMap *keymap = WM_keymap_find(keyconf, "Property Editor", SPACE_BUTS, 0);
        
        WM_keymap_add_item(keymap, "BUTTONS_OT_toolbox", RIGHTMOUSE, KM_PRESS, 0, 0);
 }
index ddfd403..0b191b7 100644 (file)
@@ -152,8 +152,8 @@ void uiTemplateTrack(uiLayout *layout, PointerRNA *ptr, const char *propname)
        scopesptr= RNA_property_pointer_get(ptr, prop);
        scopes= (MovieClipScopes *)scopesptr.data;
 
-       rect.xmin= 0; rect.xmax= 200;
-       rect.ymin= 0; rect.ymax= 120;
+       rect.xmin = 0; rect.xmax = 200;
+       rect.ymin = 0; rect.ymax = 120;
 
        block= uiLayoutAbsoluteBlock(layout);
 
index c942873..6be1a83 100644 (file)
@@ -1065,15 +1065,15 @@ void ED_operatormacros_clip(void)
        wmOperatorType *ot;
        wmOperatorTypeMacro *otmacro;
 
-       ot= WM_operatortype_append_macro("CLIP_OT_add_marker_move", "Add Marker and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
+       ot = WM_operatortype_append_macro("CLIP_OT_add_marker_move", "Add Marker and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
        ot->description = "Add new marker and move it on movie";
        WM_operatortype_macro_define(ot, "CLIP_OT_add_marker");
-       otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+       otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
        RNA_struct_idprops_unset(otmacro->ptr, "release_confirm");
 
-       ot= WM_operatortype_append_macro("CLIP_OT_add_marker_slide", "Add Marker and Slide", OPTYPE_UNDO|OPTYPE_REGISTER);
+       ot = WM_operatortype_append_macro("CLIP_OT_add_marker_slide", "Add Marker and Slide", OPTYPE_UNDO|OPTYPE_REGISTER);
        ot->description = "Add new marker and slide it with mouse until mouse button release";
        WM_operatortype_macro_define(ot, "CLIP_OT_add_marker");
-       otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+       otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
        RNA_boolean_set(otmacro->ptr, "release_confirm", TRUE);
 }
index 48e5f74..96c348f 100644 (file)
@@ -77,10 +77,10 @@ static void init_preview_region(const bContext *C, ARegion *ar)
        ar->alignment= RGN_ALIGN_TOP;
        ar->flag|= RGN_FLAG_HIDDEN;
 
-       ar->v2d.tot.xmin= 0.0f;
-       ar->v2d.tot.ymin= -10.0f;
-       ar->v2d.tot.xmax= (float)scene->r.efra;
-       ar->v2d.tot.ymax= 10.0f;
+       ar->v2d.tot.xmin = 0.0f;
+       ar->v2d.tot.ymin = -10.0f;
+       ar->v2d.tot.xmax = (float)scene->r.efra;
+       ar->v2d.tot.ymax = 10.0f;
 
        ar->v2d.cur= ar->v2d.tot;
 
@@ -400,7 +400,7 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
 
        /* ******** Global hotkeys avalaible for all regions ******** */
 
-       keymap= WM_keymap_find(keyconf, "Clip", SPACE_CLIP, 0);
+       keymap = WM_keymap_find(keyconf, "Clip", SPACE_CLIP, 0);
 
        WM_keymap_add_item(keymap, "CLIP_OT_open", OKEY, KM_PRESS, KM_ALT, 0);
 
@@ -408,25 +408,25 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "CLIP_OT_properties", NKEY, KM_PRESS, 0, 0);
 
        /* 2d tracking */
-       kmi= WM_keymap_add_item(keymap, "CLIP_OT_track_markers", LEFTARROWKEY, KM_PRESS, KM_ALT, 0);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_track_markers", LEFTARROWKEY, KM_PRESS, KM_ALT, 0);
        RNA_boolean_set(kmi->ptr, "backwards", TRUE);
        RNA_boolean_set(kmi->ptr, "sequence", FALSE);
-       kmi= WM_keymap_add_item(keymap, "CLIP_OT_track_markers", RIGHTARROWKEY, KM_PRESS, KM_ALT, 0);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_track_markers", RIGHTARROWKEY, KM_PRESS, KM_ALT, 0);
        RNA_boolean_set(kmi->ptr, "backwards", FALSE);
        RNA_boolean_set(kmi->ptr, "sequence", FALSE);
-       kmi= WM_keymap_add_item(keymap, "CLIP_OT_track_markers", TKEY, KM_PRESS, KM_CTRL, 0);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_track_markers", TKEY, KM_PRESS, KM_CTRL, 0);
        RNA_boolean_set(kmi->ptr, "backwards", FALSE);
        RNA_boolean_set(kmi->ptr, "sequence", TRUE);
-       kmi= WM_keymap_add_item(keymap, "CLIP_OT_track_markers", TKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_track_markers", TKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
        RNA_boolean_set(kmi->ptr, "backwards", TRUE);
        RNA_boolean_set(kmi->ptr, "sequence", TRUE);
 
        /* mode */
-       kmi= WM_keymap_add_item(keymap, "CLIP_OT_mode_set", TABKEY, KM_PRESS, 0, 0);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_mode_set", TABKEY, KM_PRESS, 0, 0);
        RNA_enum_set(kmi->ptr, "mode", SC_MODE_RECONSTRUCTION);
        RNA_boolean_set(kmi->ptr, "toggle", TRUE);
 
-       kmi= WM_keymap_add_item(keymap, "CLIP_OT_mode_set", TABKEY, KM_PRESS, KM_CTRL, 0);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_mode_set", TABKEY, KM_PRESS, KM_CTRL, 0);
        RNA_enum_set(kmi->ptr, "mode", SC_MODE_DISTORTION);
        RNA_boolean_set(kmi->ptr, "toggle", TRUE);
 
@@ -439,7 +439,7 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
 
        /* ******** Hotkeys avalaible for main region only ******** */
 
-       keymap= WM_keymap_find(keyconf, "Clip Editor", SPACE_CLIP, 0);
+       keymap = WM_keymap_find(keyconf, "Clip Editor", SPACE_CLIP, 0);
 
        /* ** View/navigation ** */
 
@@ -470,16 +470,16 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "CLIP_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0);
 
        /* jump to special frame */
-       kmi= WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
        RNA_enum_set(kmi->ptr, "position", 0);
 
-       kmi= WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", RIGHTARROWKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", RIGHTARROWKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
        RNA_enum_set(kmi->ptr, "position", 1);
 
-       kmi= WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0);
        RNA_enum_set(kmi->ptr, "position", 2);
 
-       kmi= WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", RIGHTARROWKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", RIGHTARROWKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0);
        RNA_enum_set(kmi->ptr, "position", 3);
 
        /* "timeline" */
@@ -506,23 +506,23 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
 
        WM_keymap_add_item(keymap, "CLIP_OT_slide_marker", LEFTMOUSE, KM_PRESS, 0, 0);
 
-       kmi= WM_keymap_add_item(keymap, "CLIP_OT_disable_markers", DKEY, KM_PRESS, KM_SHIFT, 0);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_disable_markers", DKEY, KM_PRESS, KM_SHIFT, 0);
        RNA_enum_set(kmi->ptr, "action", 2);    /* toggle */
 
        /* tracks */
        WM_keymap_add_item(keymap, "CLIP_OT_delete_track", DELKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "CLIP_OT_delete_track", XKEY, KM_PRESS, 0, 0);
 
-       kmi= WM_keymap_add_item(keymap, "CLIP_OT_lock_tracks", LKEY, KM_PRESS, KM_CTRL, 0);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_lock_tracks", LKEY, KM_PRESS, KM_CTRL, 0);
        RNA_enum_set(kmi->ptr, "action", 0);    /* lock */
 
-       kmi= WM_keymap_add_item(keymap, "CLIP_OT_lock_tracks", LKEY, KM_PRESS, KM_ALT, 0);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_lock_tracks", LKEY, KM_PRESS, KM_ALT, 0);
        RNA_enum_set(kmi->ptr, "action", 1);    /* unlock */
 
-       kmi= WM_keymap_add_item(keymap, "CLIP_OT_hide_tracks", HKEY, KM_PRESS, 0, 0);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_hide_tracks", HKEY, KM_PRESS, 0, 0);
        RNA_boolean_set(kmi->ptr, "unselected", FALSE);
 
-       kmi= WM_keymap_add_item(keymap, "CLIP_OT_hide_tracks", HKEY, KM_PRESS, KM_SHIFT, 0);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_hide_tracks", HKEY, KM_PRESS, KM_SHIFT, 0);
        RNA_boolean_set(kmi->ptr, "unselected", TRUE);
 
        WM_keymap_add_item(keymap, "CLIP_OT_hide_tracks_clear", HKEY, KM_PRESS, KM_ALT, 0);
@@ -534,34 +534,34 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
        WM_keymap_add_menu(keymap, "CLIP_MT_tracking_specials", WKEY, KM_PRESS, 0, 0);
 
        /* display */
-       kmi= WM_keymap_add_item(keymap, "WM_OT_context_toggle", LKEY, KM_PRESS, 0, 0);
+       kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", LKEY, KM_PRESS, 0, 0);
        RNA_string_set(kmi->ptr, "data_path", "space_data.lock_selection");
 
-       kmi= WM_keymap_add_item(keymap, "WM_OT_context_toggle", DKEY, KM_PRESS, KM_ALT, 0);
+       kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", DKEY, KM_PRESS, KM_ALT, 0);
        RNA_string_set(kmi->ptr, "data_path", "space_data.show_disabled");
 
-       kmi= WM_keymap_add_item(keymap, "WM_OT_context_toggle", SKEY, KM_PRESS, KM_ALT, 0);
+       kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", SKEY, KM_PRESS, KM_ALT, 0);
        RNA_string_set(kmi->ptr, "data_path", "space_data.show_marker_search");
 
-       kmi= WM_keymap_add_item(keymap, "WM_OT_context_toggle", MKEY, KM_PRESS, 0, 0);
+       kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", MKEY, KM_PRESS, 0, 0);
        RNA_string_set(kmi->ptr, "data_path", "space_data.use_mute_footage");
 
        transform_keymap_for_space(keyconf, keymap, SPACE_CLIP);
 
        /* clean-up */
-       kmi= WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT, 0);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT, 0);
        RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_REMAINED);
        RNA_boolean_set(kmi->ptr, "clear_active", FALSE);
-       kmi= WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_SHIFT, 0);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_SHIFT, 0);
        RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_UPTO);
        RNA_boolean_set(kmi->ptr, "clear_active", FALSE);
-       kmi= WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0);
+       kmi = WM_key