[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52628] trunk/blender: typo' s and some style cleanup, also added asserts into BLI_vsnprintf and BLI_sprintfN when invalid args are given .
Campbell Barton
ideasman42 at gmail.com
Wed Nov 28 07:43:08 CET 2012
Revision: 52628
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52628
Author: campbellbarton
Date: 2012-11-28 06:43:04 +0000 (Wed, 28 Nov 2012)
Log Message:
-----------
typo's and some style cleanup, also added asserts into BLI_vsnprintf and BLI_sprintfN when invalid args are given.
Modified Paths:
--------------
trunk/blender/release/scripts/modules/bl_i18n_utils/update_trunk.py
trunk/blender/release/scripts/modules/bpy_types.py
trunk/blender/release/scripts/modules/rna_xml.py
trunk/blender/release/scripts/startup/bl_operators/uvcalc_lightmap.py
trunk/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py
trunk/blender/source/blender/blenlib/intern/string.c
trunk/blender/source/blender/bmesh/tools/bmesh_decimate_collapse.c
trunk/blender/source/blender/compositor/intern/COM_ExecutionGroup.h
trunk/blender/source/blender/editors/mesh/editmesh_loopcut.c
trunk/blender/source/blender/editors/mesh/editmesh_rip.c
trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
trunk/blender/source/blender/editors/space_outliner/outliner_tree.c
trunk/blender/source/blender/editors/transform/transform_conversions.c
trunk/blender/source/blender/ikplugin/intern/ikplugin_api.c
trunk/blender/source/blender/windowmanager/intern/wm_operators.c
trunk/blender/source/tools/spell_check_source.py
Modified: trunk/blender/release/scripts/modules/bl_i18n_utils/update_trunk.py
===================================================================
--- trunk/blender/release/scripts/modules/bl_i18n_utils/update_trunk.py 2012-11-28 05:07:04 UTC (rev 52627)
+++ trunk/blender/release/scripts/modules/bl_i18n_utils/update_trunk.py 2012-11-28 06:43:04 UTC (rev 52628)
@@ -115,7 +115,7 @@
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):
Modified: trunk/blender/release/scripts/modules/bpy_types.py
===================================================================
--- trunk/blender/release/scripts/modules/bpy_types.py 2012-11-28 05:07:04 UTC (rev 52627)
+++ trunk/blender/release/scripts/modules/bpy_types.py 2012-11-28 06:43:04 UTC (rev 52628)
@@ -394,7 +394,7 @@
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)
Modified: trunk/blender/release/scripts/modules/rna_xml.py
===================================================================
--- trunk/blender/release/scripts/modules/rna_xml.py 2012-11-28 05:07:04 UTC (rev 52627)
+++ trunk/blender/release/scripts/modules/rna_xml.py 2012-11-28 06:43:04 UTC (rev 52628)
@@ -178,7 +178,7 @@
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))
Modified: trunk/blender/release/scripts/startup/bl_operators/uvcalc_lightmap.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/uvcalc_lightmap.py 2012-11-28 05:07:04 UTC (rev 52627)
+++ trunk/blender/release/scripts/startup/bl_operators/uvcalc_lightmap.py 2012-11-28 06:43:04 UTC (rev 52628)
@@ -552,7 +552,7 @@
# 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.
Modified: trunk/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py 2012-11-28 05:07:04 UTC (rev 52627)
+++ trunk/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py 2012-11-28 06:43:04 UTC (rev 52628)
@@ -993,7 +993,7 @@
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)]
Modified: trunk/blender/source/blender/blenlib/intern/string.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/string.c 2012-11-28 05:07:04 UTC (rev 52627)
+++ trunk/blender/source/blender/blenlib/intern/string.c 2012-11-28 06:43:04 UTC (rev 52628)
@@ -85,6 +85,10 @@
{
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 @@
va_list arg;
char *n;
+ BLI_assert(format != NULL);
+
va_start(arg, format);
ds = BLI_dynstr_new();
Modified: trunk/blender/source/blender/bmesh/tools/bmesh_decimate_collapse.c
===================================================================
--- trunk/blender/source/blender/bmesh/tools/bmesh_decimate_collapse.c 2012-11-28 05:07:04 UTC (rev 52627)
+++ trunk/blender/source/blender/bmesh/tools/bmesh_decimate_collapse.c 2012-11-28 06:43:04 UTC (rev 52628)
@@ -878,7 +878,7 @@
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 */
Modified: trunk/blender/source/blender/compositor/intern/COM_ExecutionGroup.h
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_ExecutionGroup.h 2012-11-28 05:07:04 UTC (rev 52627)
+++ trunk/blender/source/blender/compositor/intern/COM_ExecutionGroup.h 2012-11-28 06:43:04 UTC (rev 52628)
@@ -193,7 +193,7 @@
/**
* @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 @@
/**
* @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 @@
/**
* @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);
Modified: trunk/blender/source/blender/editors/mesh/editmesh_loopcut.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_loopcut.c 2012-11-28 05:07:04 UTC (rev 52627)
+++ trunk/blender/source/blender/editors/mesh/editmesh_loopcut.c 2012-11-28 06:43:04 UTC (rev 52628)
@@ -332,7 +332,7 @@
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) {
Modified: trunk/blender/source/blender/editors/mesh/editmesh_rip.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_rip.c 2012-11-28 05:07:04 UTC (rev 52627)
+++ trunk/blender/source/blender/editors/mesh/editmesh_rip.c 2012-11-28 06:43:04 UTC (rev 52628)
@@ -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],
Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_image.c 2012-11-28 05:07:04 UTC (rev 52627)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_image.c 2012-11-28 06:43:04 UTC (rev 52628)
@@ -656,7 +656,7 @@
* 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];
Modified: trunk/blender/source/blender/editors/space_outliner/outliner_tree.c
===================================================================
--- trunk/blender/source/blender/editors/space_outliner/outliner_tree.c 2012-11-28 05:07:04 UTC (rev 52627)
+++ trunk/blender/source/blender/editors/space_outliner/outliner_tree.c 2012-11-28 06:43:04 UTC (rev 52628)
@@ -133,7 +133,7 @@
}
/* 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)
Modified: trunk/blender/source/blender/editors/transform/transform_conversions.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_conversions.c 2012-11-28 05:07:04 UTC (rev 52627)
+++ trunk/blender/source/blender/editors/transform/transform_conversions.c 2012-11-28 06:43:04 UTC (rev 52628)
@@ -938,7 +938,7 @@
}
/* iTaSC needs clear for new IK constraints */
- if(tot_ik)
+ if (tot_ik)
BIK_clear_data(ob->pose);
return (tot_ik) ? 1 : 0;
Modified: trunk/blender/source/blender/ikplugin/intern/ikplugin_api.c
===================================================================
--- trunk/blender/source/blender/ikplugin/intern/ikplugin_api.c 2012-11-28 05:07:04 UTC (rev 52627)
+++ trunk/blender/source/blender/ikplugin/intern/ikplugin_api.c 2012-11-28 06:43:04 UTC (rev 52628)
@@ -86,7 +86,7 @@
static IKPlugin *get_plugin(bPose *pose)
{
- if (!pose || pose->iksolver < 0 || pose->iksolver > (sizeof(ikplugin_tab)/sizeof(IKPlugin) - 2))
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list