typo's and some style cleanup, also added asserts into BLI_vsnprintf and BLI_sprintfN...
authorCampbell Barton <ideasman42@gmail.com>
Wed, 28 Nov 2012 06:43:04 +0000 (06:43 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 28 Nov 2012 06:43:04 +0000 (06:43 +0000)
15 files changed:
release/scripts/modules/bl_i18n_utils/update_trunk.py
release/scripts/modules/bpy_types.py
release/scripts/modules/rna_xml.py
release/scripts/startup/bl_operators/uvcalc_lightmap.py
release/scripts/startup/bl_operators/uvcalc_smart_project.py
source/blender/blenlib/intern/string.c
source/blender/bmesh/tools/bmesh_decimate_collapse.c
source/blender/compositor/intern/COM_ExecutionGroup.h
source/blender/editors/mesh/editmesh_loopcut.c
source/blender/editors/mesh/editmesh_rip.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/transform/transform_conversions.c
source/blender/ikplugin/intern/ikplugin_api.c
source/blender/windowmanager/intern/wm_operators.c

index 9b904ec861aeff19e312d86c14f6043d64c81665..b84a227ae0aacc48b863f32c8a8d6925f65570f0 100755 (executable)
@@ -115,7 +115,7 @@ def main():
         if not os.path.exists(os.path.join(TRUNK_PO_DIR, ".".join((lang, "po")))):
             failed.add(lang)
 
-    # Check and compile each po separatly, to keep track of those failing.
+    # Check and compile each po separately, to keep track of those failing.
     # XXX There should not be any failing at this stage, import step is
     #     supposed to have already filtered them out!
     for po in os.listdir(TRUNK_PO_DIR):
index 4cd823d9184e044b526714cc06ad007d167e7003..e42ae43aed6dad0dbc8acf3f6f6e6b1c5551ed3d 100644 (file)
@@ -394,7 +394,7 @@ class Mesh(bpy_types.ID):
             p.vertices = f
             loop_index += loop_len
 
-        # if no edges - calculae them
+        # if no edges - calculate them
         if faces and (not edges):
             self.update(calc_edges=True)
 
index fc8e3125228afad8423e74ad335ef918ae429547..e21ccd08a35959cbb5d09d3f6e06f86b11f45293 100644 (file)
@@ -178,7 +178,7 @@ def rna2xml(fw=print_ln,
         fw("%s</%s>\n" % (ident, value_type_name))
 
     # -------------------------------------------------------------------------
-    # needs re-workign to be generic
+    # needs re-working to be generic
 
     if root_node:
         fw("%s<%s>\n" % (root_ident, root_node))
index 526d78c4c11c21cccfaa56a06e39282f57c6686f..198b3660ff8066dbc7763ca7cd3b464bc697316c 100644 (file)
@@ -552,7 +552,7 @@ class LightMapPack(Operator):
     # Disable REGISTER flag for now because this operator might create new
     # images. This leads to non-proper operator redo because current undo
     # stack is local for edit mode and can not remove images created by this
-    # oprtator.
+    # operator.
     # Proper solution would be to make undo stack aware of such things,
     # but for now just disable redo. Keep undo here so unwanted changes to uv
     # coords might be undone.
index dd4ced78422ca275f0e401540f22a27de6235b46..160ca5c69776625c9abc09e9f0f4587304557c22 100644 (file)
@@ -993,7 +993,7 @@ def main(context,
             if mostUniqueAngle < USER_PROJECTION_LIMIT_CONVERTED:
                 #print 'adding', mostUniqueAngle, USER_PROJECTION_LIMIT, len(newProjectMeshFaces)
                 # Now weight the vector to all its faces, will give a more direct projection
-                # if the face its self was not representive of the normal from surrounding faces.
+                # if the face its self was not representative of the normal from surrounding faces.
 
                 newProjectVec = tempMeshFaces[mostUniqueIndex].no
                 newProjectMeshFaces = [tempMeshFaces.pop(mostUniqueIndex)]
index 14e0dc2f04914d6ed6e5dc2526eb039e0712f66d..f23f75f69d9e1133ec1d35ef3666e8bee2926c7f 100644 (file)
@@ -85,6 +85,10 @@ size_t BLI_vsnprintf(char *__restrict buffer, size_t count, const char *__restri
 {
        size_t n;
 
+       BLI_assert(buffer != NULL);
+       BLI_assert(count > 0);
+       BLI_assert(format != NULL);
+
        n = vsnprintf(buffer, count, format, arg);
 
        if (n != -1 && n < count) {
@@ -115,6 +119,8 @@ char *BLI_sprintfN(const char *__restrict format, ...)
        va_list arg;
        char *n;
 
+       BLI_assert(format != NULL);
+
        va_start(arg, format);
 
        ds = BLI_dynstr_new();
index 02283aa6e28f359dfe32f77436e25aefe3e6d67f..7c054d84405f93f9ea170706c59f505b27698b88 100644 (file)
@@ -878,7 +878,7 @@ static void bm_decim_edge_collapse(BMesh *bm, BMEdge *e,
                int i;
 
                if (vweights) {
-                       vweights[BM_elem_index_get(v_other)] = vweights[v_clear_index] + vweights[BM_elem_index_get(v_other)];
+                       vweights[BM_elem_index_get(v_other)] += vweights[v_clear_index];
                }
 
                e = NULL;  /* paranoid safety check */
index c7a7d06134eb95125f836c2cb03b829abd2871ca..00104c24194e6b5e9cc2db0555b5da9490facafd 100644 (file)
@@ -193,7 +193,7 @@ private:
        
        /**
         * @brief try to schedule a specific chunk.
-        * @note scheduling succeeds when all input requirements are met and the chunks hasen't been scheduled yet.
+        * @note scheduling succeeds when all input requirements are met and the chunks hasn't been scheduled yet.
         * @param graph
         * @param xChunk
         * @param yChunk
@@ -245,7 +245,7 @@ public:
        
        /**
         * @brief add an operation to this ExecutionGroup
-        * @note this method will add input of the operations recursivly
+        * @note this method will add input of the operations recursively
         * @note this method can create multiple ExecutionGroup's
         * @param system
         * @param operation
@@ -369,7 +369,7 @@ public:
        /**
         * @brief this method determines the MemoryProxy's where this execution group depends on.
         * @note After this method determineDependingAreaOfInterest can be called to determine
-        * @note the area of the MemoryProxy.creator thas has to be executed.
+        * @note the area of the MemoryProxy.creator that has to be executed.
         * @param memoryProxies result
         */
        void determineDependingMemoryProxies(vector<MemoryProxy *> *memoryProxies);
index 62eabd98aee748d782430d182a39b8e6c23a555f..dec45b7f32695db0dba4ea049b74959ec0d70e61 100644 (file)
@@ -332,7 +332,7 @@ static void ringsel_finish(bContext *C, wmOperator *op)
                                           smoothness, 0.0f, 0.0f,
                                           cuts,
                                           SUBDIV_SELECT_LOOPCUT, SUBD_PATH, 0, TRUE,
-                                                          use_only_quads, 0);
+                                          use_only_quads, 0);
 
                        /* force edge slide to edge select mode in in face select mode */
                        if (em->selectmode & SCE_SELECT_FACE) {
index d3a4c951e06690ba445048a7be85c5bfdeccdf5c..2ecc20b2ddb7493000c4000375651c094c46ef43 100644 (file)
@@ -60,7 +60,7 @@
  *
  * \param inset is used so we get some useful distance
  * when comparing multiple edges that meet at the same
- * point and would result in teh same distance.
+ * point and would result in the same distance.
  */
 #define INSET_DEFAULT 0.00001f
 static float edbm_rip_edgedist(ARegion *ar, float mat[][4],
index 676f033af3210696aa06615ee93c5445c4e794c0..a929c3ef585fc687dcff54d822ad01a95723bac8 100644 (file)
@@ -656,7 +656,7 @@ static float VecZDepthPersp(const float pt[2],
         * barycentric_weights_v2 would return, in this case its easiest just to
         * undo the 4th axis division and make it unit-sum
         *
-        * don't call barycentric_weights_v2() becaue our callers expect 'w'
+        * don't call barycentric_weights_v2() because our callers expect 'w'
         * to be weighted from the perspective */
        w_tmp[0] = w[0] * v1[3];
        w_tmp[1] = w[1] * v2[3];
index af890a81ad6a0bcca1484704125dc63ff4a115e8..e6910280da470f9079efacf93070f0fba1c1a9b0 100644 (file)
@@ -133,7 +133,7 @@ static void outliner_storage_cleanup(SpaceOops *soops)
 }
 
 /* XXX - THIS FUNCTION IS INCREDIBLY SLOW
- * ... it can bring blenders tools and viewport to a grinding halt becuase of searching
+ * ... it can bring blenders tools and viewport to a grinding halt because of searching
  * for duplicate items every times they are added.
  *
  * TODO (possible speedups)
index 1cf01bc1bbceef67262466703bd71077421e7561..51efa2b0e401adf5acf46586342e08a9580a50b5 100644 (file)
@@ -938,7 +938,7 @@ static short pose_grab_with_ik(Object *ob)
        }
 
        /* iTaSC needs clear for new IK constraints */
-       if(tot_ik)
+       if (tot_ik)
                BIK_clear_data(ob->pose);
 
        return (tot_ik) ? 1 : 0;
index efe07b2c48c6d08d5cc09e30c747f7f0f7ce6c52..507d54d75266f0033561916631bf69c21f7abff6 100644 (file)
@@ -86,7 +86,7 @@ static IKPlugin ikplugin_tab[] = {
 
 static IKPlugin *get_plugin(bPose *pose)
 {
-       if (!pose || pose->iksolver < 0 || pose->iksolver > (sizeof(ikplugin_tab)/sizeof(IKPlugin) - 2))
+       if (!pose || pose->iksolver < 0 || pose->iksolver > (sizeof(ikplugin_tab) / sizeof(IKPlugin) - 2))
                return NULL;
 
        return &ikplugin_tab[pose->iksolver];
index c64cb33944564bb72976e6eca5f8525a6777024e..9968d81e7b4a2b1abf833934707388e9c143d779 100644 (file)
@@ -1215,7 +1215,7 @@ static int wm_operator_props_popup_ex(bContext *C, wmOperator *op, const int do_
 
        /* if we don't have global undo, we can't do undo push for automatic redo,
         * so we require manual OK clicking in this popup */
-       if(!(U.uiflag & USER_GLOBALUNDO))
+       if (!(U.uiflag & USER_GLOBALUNDO))
                return WM_operator_props_dialog_popup(C, op, 300, UI_UNIT_Y);
 
        ED_undo_push_op(C, op);