[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46165] trunk/blender: source code style checker to, (similar to pythons pep8 checker)
Campbell Barton
ideasman42 at gmail.com
Tue May 1 22:36:40 CEST 2012
Revision: 46165
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46165
Author: campbellbarton
Date: 2012-05-01 20:36:39 +0000 (Tue, 01 May 2012)
Log Message:
-----------
source code style checker to, (similar to pythons pep8 checker)
currently checks for brace placement and some whitespace use.
can be accessed with:
make test_style
or...
source/tools/check_style_c.py source/blender
also style cleanup on bmo_primitives.c
Modified Paths:
--------------
trunk/blender/GNUmakefile
trunk/blender/source/blender/bmesh/operators/bmo_primitive.c
Added Paths:
-----------
trunk/blender/source/tools/check_style_c.py
Modified: trunk/blender/GNUmakefile
===================================================================
--- trunk/blender/GNUmakefile 2012-05-01 20:08:23 UTC (rev 46164)
+++ trunk/blender/GNUmakefile 2012-05-01 20:36:39 UTC (rev 46165)
@@ -164,6 +164,7 @@
@echo " * test_cmake - runs our own cmake file checker which detects errors in the cmake file list definitions"
@echo " * test_pep8 - checks all python script are pep8 which are tagged to use the stricter formatting"
@echo " * test_deprecated - checks for deprecation tags in our code which may need to be removed"
+ @echo " * test_style - checks C/C++ conforms with blenders style guide: http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
@echo ""
@echo "Static Source Code Checking (not assosiated with building blender)"
@echo " * check_cppcheck - run blender source through cppcheck (C & C++)"
@@ -213,6 +214,9 @@
test_deprecated:
python3 source/tests/check_deprecated.py
+test_style:
+ # run our own checks on C/C++ style
+ PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/check_style_c.py $(BLENDER_DIR)/source/blender $(BLENDER_DIR)/source/creator
# -----------------------------------------------------------------------------
# Project Files
@@ -250,7 +254,6 @@
check_spelling_c:
cd $(BUILD_DIR) ; PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/source
-
# -----------------------------------------------------------------------------
# Documentation
#
Modified: trunk/blender/source/blender/bmesh/operators/bmo_primitive.c
===================================================================
--- trunk/blender/source/blender/bmesh/operators/bmo_primitive.c 2012-05-01 20:08:23 UTC (rev 46164)
+++ trunk/blender/source/blender/bmesh/operators/bmo_primitive.c 2012-05-01 20:36:39 UTC (rev 46165)
@@ -36,41 +36,41 @@
/* ************************ primitives ******************* */
static float icovert[12][3] = {
- {0.0f,0.0f,-200.0f},
- {144.72f, -105.144f,-89.443f},
- {-55.277f, -170.128,-89.443f},
- {-178.885f,0.0f,-89.443f},
- {-55.277f,170.128f,-89.443f},
- {144.72f,105.144f,-89.443f},
- {55.277f,-170.128f,89.443f},
- {-144.72f,-105.144f,89.443f},
- {-144.72f,105.144f,89.443f},
- {55.277f,170.128f,89.443f},
- {178.885f,0.0f,89.443f},
- {0.0f,0.0f,200.0f}
+ {0.0f, 0.0f, -200.0f},
+ {144.72f, -105.144f, -89.443f},
+ {-55.277f, -170.128, -89.443f},
+ {-178.885f, 0.0f, -89.443f},
+ {-55.277f, 170.128f, -89.443f},
+ {144.72f, 105.144f, -89.443f},
+ {55.277f, -170.128f, 89.443f},
+ {-144.72f, -105.144f, 89.443f},
+ {-144.72f, 105.144f, 89.443f},
+ {55.277f, 170.128f, 89.443f},
+ {178.885f, 0.0f, 89.443f},
+ {0.0f, 0.0f, 200.0f}
};
static short icoface[20][3] = {
- {0,1,2},
- {1,0,5},
- {0,2,3},
- {0,3,4},
- {0,4,5},
- {1,5,10},
- {2,1,6},
- {3,2,7},
- {4,3,8},
- {5,4,9},
- {1,10,6},
- {2,6,7},
- {3,7,8},
- {4,8,9},
- {5,9,10},
- {6,10,11},
- {7,6,11},
- {8,7,11},
- {9,8,11},
- {10,9,11}
+ {0, 1, 2},
+ {1, 0, 5},
+ {0, 2, 3},
+ {0, 3, 4},
+ {0, 4, 5},
+ {1, 5, 10},
+ {2, 1, 6},
+ {3, 2, 7},
+ {4, 3, 8},
+ {5, 4, 9},
+ {1, 10, 6},
+ {2, 6, 7},
+ {3, 7, 8},
+ {4, 8, 9},
+ {5, 9, 10},
+ {6, 10, 11},
+ {7, 6, 11},
+ {8, 7, 11},
+ {9, 8, 11},
+ {10, 9, 11}
};
/* HACK: these can also be found in cmoview.tga.c, but are here so that they can be found by linker
@@ -81,149 +81,149 @@
static int monkeynv = 271;
static int monkeynf = 250;
static signed char monkeyv[271][3] = {
- {-71,21,98},{-63,12,88},{-57,7,74},{-82,-3,79},{-82,4,92},
- {-82,17,100},{-92,21,102},{-101,12,95},{-107,7,83},
- {-117,31,84},{-109,31,95},{-96,31,102},{-92,42,102},
- {-101,50,95},{-107,56,83},{-82,66,79},{-82,58,92},
- {-82,46,100},{-71,42,98},{-63,50,88},{-57,56,74},
- {-47,31,72},{-55,31,86},{-67,31,97},{-66,31,99},
- {-70,43,100},{-82,48,103},{-93,43,105},{-98,31,105},
- {-93,20,105},{-82,31,106},{-82,15,103},{-70,20,100},
- {-127,55,95},{-127,45,105},{-127,-87,94},{-127,-41,100},
- {-127,-24,102},{-127,-99,92},{-127,52,77},{-127,73,73},
- {-127,115,-70},{-127,72,-109},{-127,9,-106},{-127,-49,-45},
- {-101,-24,72},{-87,-56,73},{-82,-89,73},{-80,-114,68},
- {-85,-121,67},{-104,-124,71},{-127,-126,74},{-71,-18,68},
- {-46,-5,69},{-21,19,57},{-17,55,76},{-36,62,80},
- {-64,77,88},{-86,97,94},{-107,92,97},{-119,63,96},
- {-106,53,99},{-111,39,98},{-101,12,95},{-79,2,90},
- {-64,8,86},{-47,24,83},{-45,38,83},{-50,48,85},
- {-72,56,92},{-95,60,97},{-127,-98,94},{-113,-92,94},
- {-112,-107,91},{-119,-113,89},{-127,-114,88},{-127,-25,96},
- {-127,-18,95},{-114,-19,95},{-111,-29,96},{-116,-37,95},
- {-76,-6,86},{-48,7,80},{-34,26,77},{-32,48,84},
- {-39,53,93},{-71,70,102},{-87,82,107},{-101,79,109},
- {-114,55,108},{-111,-13,104},{-100,-57,91},{-95,-90,88},
- {-93,-105,85},{-97,-117,81},{-106,-119,81},{-127,-121,82},
- {-127,6,93},{-127,27,98},{-85,61,95},{-106,18,96},
- {-110,27,97},{-112,-88,94},{-117,-57,96},{-127,-57,96},
- {-127,-42,95},{-115,-35,100},{-110,-29,102},{-113,-17,100},
- {-122,-16,100},{-127,-26,106},{-121,-19,104},{-115,-20,104},
- {-113,-29,106},{-117,-32,103},{-127,-37,103},{-94,-40,71},
- {-106,-31,91},{-104,-40,91},{-97,-32,71},{-127,-112,88},
- {-121,-111,88},{-115,-105,91},{-115,-95,93},{-127,-100,84},
- {-115,-96,85},{-115,-104,82},{-121,-109,81},{-127,-110,81},
- {-105,28,100},{-103,20,99},{-84,55,97},{-92,54,99},
- {-73,51,99},{-55,45,89},{-52,37,88},{-53,25,87},
- {-66,13,92},{-79,8,95},{-98,14,100},{-104,38,100},
- {-100,48,100},{-97,46,97},{-102,38,97},{-96,16,97},
- {-79,11,93},{-68,15,90},{-57,27,86},{-56,36,86},
- {-59,43,87},{-74,50,96},{-91,51,98},{-84,52,96},
- {-101,22,96},{-102,29,96},{-113,59,78},{-102,85,79},
- {-84,88,76},{-65,71,71},{-40,58,63},{-25,52,59},
- {-28,21,48},{-50,0,53},{-71,-12,60},{-127,115,37},
- {-127,126,-10},{-127,-25,-86},{-127,-59,24},{-127,-125,59},
- {-127,-103,44},{-127,-73,41},{-127,-62,36},{-18,30,7},
- {-17,41,-6},{-28,34,-56},{-68,56,-90},{-33,-6,9},
- {-51,-16,-21},{-45,-1,-55},{-84,7,-85},{-97,-45,52},
- {-104,-53,33},{-90,-91,49},{-95,-64,50},{-85,-117,51},
- {-109,-97,47},{-111,-69,46},{-106,-121,56},{-99,-36,55},
- {-100,-29,60},{-101,-22,64},{-100,-50,21},{-89,-40,-34},
- {-83,-19,-69},{-69,111,-49},{-69,119,-9},{-69,109,30},
- {-68,67,55},{-34,52,43},{-46,58,36},{-45,90,7},
- {-25,72,16},{-25,79,-15},{-45,96,-25},{-45,87,-57},
- {-25,69,-46},{-48,42,-75},{-65,3,-70},{-22,42,-26},
- {-75,-22,19},{-72,-25,-27},{-13,52,-30},{-28,-18,-16},
- {6,-13,-42},{37,7,-55},{46,41,-54},{31,65,-54},
- {4,61,-40},{3,53,-37},{25,56,-50},{35,37,-52},
- {28,10,-52},{5,-5,-39},{-21,-9,-17},{-9,46,-28},
- {-6,39,-37},{-14,-3,-27},{6,0,-47},{25,12,-57},
- {31,32,-57},{23,46,-56},{4,44,-46},{-19,37,-27},
- {-20,22,-35},{-30,12,-35},{-22,11,-35},{-19,2,-35},
- {-23,-2,-35},{-34,0,-9},{-35,-3,-22},{-35,5,-24},
- {-25,26,-27},{-13,31,-34},{-13,30,-41},{-23,-2,-41},
- {-18,2,-41},{-21,10,-41},{-29,12,-41},{-19,22,-41},
- {6,42,-53},{25,44,-62},{34,31,-63},{28,11,-62},
- {7,0,-54},{-14,-2,-34},{-5,37,-44},{-13,14,-42},
- {-7,8,-43},{1,16,-47},{-4,22,-45},{3,30,-48},
- {8,24,-49},{15,27,-50},{12,35,-50},{4,56,-62},
- {33,60,-70},{48,38,-64},{41,7,-68},{6,-11,-63},
- {-26,-16,-42},{-17,49,-49},
+ {-71, 21, 98}, {-63, 12, 88}, {-57, 7, 74}, {-82, -3, 79}, {-82, 4, 92},
+ {-82, 17, 100}, {-92, 21, 102}, {-101, 12, 95}, {-107, 7, 83},
+ {-117, 31, 84}, {-109, 31, 95}, {-96, 31, 102}, {-92, 42, 102},
+ {-101, 50, 95}, {-107, 56, 83}, {-82, 66, 79}, {-82, 58, 92},
+ {-82, 46, 100}, {-71, 42, 98}, {-63, 50, 88}, {-57, 56, 74},
+ {-47, 31, 72}, {-55, 31, 86}, {-67, 31, 97}, {-66, 31, 99},
+ {-70, 43, 100}, {-82, 48, 103}, {-93, 43, 105}, {-98, 31, 105},
+ {-93, 20, 105}, {-82, 31, 106}, {-82, 15, 103}, {-70, 20, 100},
+ {-127, 55, 95}, {-127, 45, 105}, {-127, -87, 94}, {-127, -41, 100},
+ {-127, -24, 102}, {-127, -99, 92}, {-127, 52, 77}, {-127, 73, 73},
+ {-127, 115, -70}, {-127, 72, -109}, {-127, 9, -106}, {-127, -49, -45},
+ {-101, -24, 72}, {-87, -56, 73}, {-82, -89, 73}, {-80, -114, 68},
+ {-85, -121, 67}, {-104, -124, 71}, {-127, -126, 74}, {-71, -18, 68},
+ {-46, -5, 69}, {-21, 19, 57}, {-17, 55, 76}, {-36, 62, 80},
+ {-64, 77, 88}, {-86, 97, 94}, {-107, 92, 97}, {-119, 63, 96},
+ {-106, 53, 99}, {-111, 39, 98}, {-101, 12, 95}, {-79, 2, 90},
+ {-64, 8, 86}, {-47, 24, 83}, {-45, 38, 83}, {-50, 48, 85},
+ {-72, 56, 92}, {-95, 60, 97}, {-127, -98, 94}, {-113, -92, 94},
+ {-112, -107, 91}, {-119, -113, 89}, {-127, -114, 88}, {-127, -25, 96},
+ {-127, -18, 95}, {-114, -19, 95}, {-111, -29, 96}, {-116, -37, 95},
+ {-76, -6, 86}, {-48, 7, 80}, {-34, 26, 77}, {-32, 48, 84},
+ {-39, 53, 93}, {-71, 70, 102}, {-87, 82, 107}, {-101, 79, 109},
+ {-114, 55, 108}, {-111, -13, 104}, {-100, -57, 91}, {-95, -90, 88},
+ {-93, -105, 85}, {-97, -117, 81}, {-106, -119, 81}, {-127, -121, 82},
+ {-127, 6, 93}, {-127, 27, 98}, {-85, 61, 95}, {-106, 18, 96},
+ {-110, 27, 97}, {-112, -88, 94}, {-117, -57, 96}, {-127, -57, 96},
+ {-127, -42, 95}, {-115, -35, 100}, {-110, -29, 102}, {-113, -17, 100},
+ {-122, -16, 100}, {-127, -26, 106}, {-121, -19, 104}, {-115, -20, 104},
+ {-113, -29, 106}, {-117, -32, 103}, {-127, -37, 103}, {-94, -40, 71},
+ {-106, -31, 91}, {-104, -40, 91}, {-97, -32, 71}, {-127, -112, 88},
+ {-121, -111, 88}, {-115, -105, 91}, {-115, -95, 93}, {-127, -100, 84},
+ {-115, -96, 85}, {-115, -104, 82}, {-121, -109, 81}, {-127, -110, 81},
+ {-105, 28, 100}, {-103, 20, 99}, {-84, 55, 97}, {-92, 54, 99},
+ {-73, 51, 99}, {-55, 45, 89}, {-52, 37, 88}, {-53, 25, 87},
+ {-66, 13, 92}, {-79, 8, 95}, {-98, 14, 100}, {-104, 38, 100},
+ {-100, 48, 100}, {-97, 46, 97}, {-102, 38, 97}, {-96, 16, 97},
+ {-79, 11, 93}, {-68, 15, 90}, {-57, 27, 86}, {-56, 36, 86},
+ {-59, 43, 87}, {-74, 50, 96}, {-91, 51, 98}, {-84, 52, 96},
+ {-101, 22, 96}, {-102, 29, 96}, {-113, 59, 78}, {-102, 85, 79},
+ {-84, 88, 76}, {-65, 71, 71}, {-40, 58, 63}, {-25, 52, 59},
+ {-28, 21, 48}, {-50, 0, 53}, {-71, -12, 60}, {-127, 115, 37},
+ {-127, 126, -10}, {-127, -25, -86}, {-127, -59, 24}, {-127, -125, 59},
+ {-127, -103, 44}, {-127, -73, 41}, {-127, -62, 36}, {-18, 30, 7},
+ {-17, 41, -6}, {-28, 34, -56}, {-68, 56, -90}, {-33, -6, 9},
+ {-51, -16, -21}, {-45, -1, -55}, {-84, 7, -85}, {-97, -45, 52},
+ {-104, -53, 33}, {-90, -91, 49}, {-95, -64, 50}, {-85, -117, 51},
+ {-109, -97, 47}, {-111, -69, 46}, {-106, -121, 56}, {-99, -36, 55},
+ {-100, -29, 60}, {-101, -22, 64}, {-100, -50, 21}, {-89, -40, -34},
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list