Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-11-18 05:22:31 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-18 05:22:31 +0400
commitb867f9f17eb1af2051749190aa6aee708972af82 (patch)
tree95b1ba6bb8a7584823caa7e4943ee0ee4c1d4b48 /source
parent8b57f7502bb748a3acd01858c393cdac5675fcf0 (diff)
style cleanup: comments & spelling
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/pointcache.c6
-rw-r--r--source/blender/blenkernel/intern/scene.c2
-rw-r--r--source/blender/blenlib/intern/BLI_kdopbvh.c2
-rw-r--r--source/blender/blenlib/intern/math_rotation.c2
-rw-r--r--source/blender/blenlib/intern/scanfill.c2
-rw-r--r--source/blender/bmesh/intern/bmesh_iterators.h4
-rw-r--r--source/blender/bmesh/intern/bmesh_opdefines.c2
-rw-r--r--source/blender/collada/DocumentImporter.cpp4
-rw-r--r--source/blender/collada/DocumentImporter.h4
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c2
-rw-r--r--source/blender/editors/space_node/drawnode.c5
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c4
-rw-r--r--source/blender/imbuf/intern/cineon/dpxlib.c2
-rw-r--r--source/blender/imbuf/intern/dds/BlockDXT.h4
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_colorbalance.c16
-rw-r--r--source/blender/python/generic/bpy_internal_import.c13
-rw-r--r--source/blender/windowmanager/intern/wm_draw.c4
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c10
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c2
-rw-r--r--source/blender/windowmanager/intern/wm_playanim.c2
-rw-r--r--source/blender/windowmanager/intern/wm_window.c2
-rw-r--r--source/blender/windowmanager/wm_event_types.h6
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.h2
-rw-r--r--source/gameengine/SceneGraph/SG_IObject.h4
24 files changed, 60 insertions, 46 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index f195b3d71b0..3f2eb32f61c 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -2568,10 +2568,12 @@ int BKE_ptcache_id_reset(Scene *scene, PTCacheID *pid, int mode)
sbFreeSimulation(pid->calldata);
else if (pid->type == PTCACHE_TYPE_PARTICLES)
psys_reset(pid->calldata, PSYS_RESET_DEPSGRAPH);
- /*else if (pid->type == PTCACHE_TYPE_SMOKE_DOMAIN)
+#if 0
+ else if (pid->type == PTCACHE_TYPE_SMOKE_DOMAIN)
smokeModifier_reset(pid->calldata);
else if (pid->type == PTCACHE_TYPE_SMOKE_HIGHRES)
- smokeModifier_reset_turbulence(pid->calldata);*/
+ smokeModifier_reset_turbulence(pid->calldata);
+#endif
else if (pid->type == PTCACHE_TYPE_DYNAMICPAINT)
dynamicPaint_clearSurface((DynamicPaintSurface*)pid->calldata);
}
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 4f62732f5e6..9b1425584a7 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1045,7 +1045,7 @@ static void scene_update_tagged_recursive(Main *bmain, Scene *scene, Scene *scen
/* always update layer, so that animating layers works (joshua july 2010) */
/* XXX commented out, this has depsgraph issues anyway - and this breaks setting scenes
- (on scene-set, the base-lay is copied to ob-lay (ton nov 2012) */
+ * (on scene-set, the base-lay is copied to ob-lay (ton nov 2012) */
// base->lay = ob->lay;
}
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index 7968fcabda6..6cf167b8823 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -1410,7 +1410,7 @@ static float ray_nearest_hit(BVHRayCastData *data, const float bv[6])
* Based on Tactical Optimization of Ray/Box Intersection, by Graham Fyffe
* [http://tog.acm.org/resources/RTNews/html/rtnv21n1.html#art9]
*
- * TODO this doens't has data->ray.radius in consideration */
+ * TODO this doesn't take data->ray.radius into consideration */
static float fast_ray_nearest_hit(const BVHRayCastData *data, const BVHNode *node)
{
const float *bv = node->bv;
diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c
index b0c4724e1ec..3069542107e 100644
--- a/source/blender/blenlib/intern/math_rotation.c
+++ b/source/blender/blenlib/intern/math_rotation.c
@@ -84,7 +84,7 @@ void mul_qt_qtqt(float q[4], const float q1[4], const float q2[4])
* \note:
* Assumes a unit quaternion?
*
- * in fact not, but you may wan't to use a unit quat, read on...
+ * in fact not, but you may want to use a unit quat, read on...
*
* Shortcut for 'q v q*' when \a v is actually a quaternion.
* This removes the need for converting a vector to a quaternion,
diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c
index 362a87782c6..1b7858f7f88 100644
--- a/source/blender/blenlib/intern/scanfill.c
+++ b/source/blender/blenlib/intern/scanfill.c
@@ -985,7 +985,7 @@ int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const short do_quad_tri_speedu
/* CURRENT STATUS:
- * - eve->f :1 = availalble in edges
+ * - eve->f :1 = available in edges
* - eve->xs :polynumber
* - eve->h :amount of edges connected to vertex
* - eve->tmp.v :store! original vertex number
diff --git a/source/blender/bmesh/intern/bmesh_iterators.h b/source/blender/bmesh/intern/bmesh_iterators.h
index c0eefc2a3aa..7291bca6356 100644
--- a/source/blender/bmesh/intern/bmesh_iterators.h
+++ b/source/blender/bmesh/intern/bmesh_iterators.h
@@ -107,14 +107,14 @@ typedef struct BMIter {
BMesh *bm;
void (*begin)(struct BMIter *iter);
void *(*step)(struct BMIter *iter);
- /*
+#if 0
union {
void *p;
int i;
long l;
float f;
} filter;
- */
+#endif
int count; /* note, only some iterators set this, don't rely on it */
char itype;
} BMIter;
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c
index 398e6bbedcf..c5941a6c637 100644
--- a/source/blender/bmesh/intern/bmesh_opdefines.c
+++ b/source/blender/bmesh/intern/bmesh_opdefines.c
@@ -117,7 +117,7 @@ static BMOpDefine bmo_smooth_vert_def = {
* Vertext Smooth Laplacian
* Smooths vertices by using Laplacian smoothing propose by.
* Desbrun, et al. Implicit Fairing of Irregular Meshes using Diffusion and Curvature Flow
-*/
+ */
static BMOpDefine bmo_smooth_laplacian_vert_def = {
"smooth_laplacian_vert",
{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input vertices
diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp
index 1c4f0974c6d..084f71e0afc 100644
--- a/source/blender/collada/DocumentImporter.cpp
+++ b/source/blender/collada/DocumentImporter.cpp
@@ -552,8 +552,8 @@ bool DocumentImporter::writeVisualScene(const COLLADAFW::VisualScene *visualScen
}
/** When this method is called, the writer must handle all nodes contained in the
-* library nodes.
-* \return The writer should return true, if writing succeeded, false otherwise.*/
+ * library nodes.
+ * \return The writer should return true, if writing succeeded, false otherwise.*/
bool DocumentImporter::writeLibraryNodes(const COLLADAFW::LibraryNodes *libraryNodes)
{
if (mImportStage != General)
diff --git a/source/blender/collada/DocumentImporter.h b/source/blender/collada/DocumentImporter.h
index e878a5a5b48..d54b8db9f00 100644
--- a/source/blender/collada/DocumentImporter.h
+++ b/source/blender/collada/DocumentImporter.h
@@ -81,8 +81,8 @@ public:
/**
* This method will be called if an error in the loading process occurred and the loader cannot
* continue to load. The writer should undo all operations that have been performed.
- \param errorMessage A message containing informations about the error that occurred.
- */
+ * \param errorMessage A message containing informations about the error that occurred.
+ */
void cancel(const COLLADAFW::String& errorMessage);
/** This is the method called. The writer hast to prepare to receive data.*/
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 77f6d2bda5c..e04bbc1f2bf 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -110,7 +110,7 @@ typedef struct tGPsdata {
double ocurtime; /* Used when converting to path */
float imat[4][4]; /* inverted transformation matrix applying when converting coords from screen-space
- * to region space */
+ * to region space */
float custom_color[4]; /* custom color - hack for enforcing a particular color for track/mask editing */
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 99bdb8d6fe9..92edac356e6 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -1471,9 +1471,10 @@ static void node_shader_buts_script_details(uiLayout *layout, bContext *C, Point
node_shader_buts_script(layout, C, ptr);
- /* not implemented yet
+#if 0 /* not implemented yet */
if (RNA_enum_get(ptr, "mode") == NODE_SCRIPT_EXTERNAL)
- uiItemR(layout, ptr, "use_auto_update", 0, NULL, ICON_NONE);*/
+ uiItemR(layout, ptr, "use_auto_update", 0, NULL, ICON_NONE);
+#endif
}
/* only once called */
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index b3e7fa15523..7a1b97ff1d6 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -1228,7 +1228,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d)
hmargin = 0.035f * (x2 - x1);
vmargin = 0.035f * (y2 - y1);
- uiDrawBox(GL_LINE_LOOP, x1 + hmargin, y1+vmargin, x2 - hmargin, y2 - vmargin, 2.0f);
+ uiDrawBox(GL_LINE_LOOP, x1 + hmargin, y1 + vmargin, x2 - hmargin, y2 - vmargin, 2.0f);
}
if (ca && (ca->flag & CAM_SHOWSENSOR)) {
/* determine sensor fit, and get sensor x/y, for auto fit we
@@ -3276,7 +3276,7 @@ static void bl_debug_draw(void)
int i;
cpack(0x00FF0000);
glBegin(GL_LINE_LOOP);
- for(i=0; i < _bl_debug_draw_quads_tot; i ++) {
+ for (i = 0; i < _bl_debug_draw_quads_tot; i ++) {
glVertex3fv(_bl_debug_draw_quads[i][0]);
glVertex3fv(_bl_debug_draw_quads[i][1]);
glVertex3fv(_bl_debug_draw_quads[i][2]);
diff --git a/source/blender/imbuf/intern/cineon/dpxlib.c b/source/blender/imbuf/intern/cineon/dpxlib.c
index aedce52a7bf..4c9b5e620dd 100644
--- a/source/blender/imbuf/intern/cineon/dpxlib.c
+++ b/source/blender/imbuf/intern/cineon/dpxlib.c
@@ -457,7 +457,7 @@ LogImageFile *dpxCreate(const char *filename, int width, int height, int bitsPer
}
/* Header should be rounded to next 8k block
- 6044 = 8092 - sizeof(DpxMainHeader) */
+ * 6044 = 8092 - sizeof(DpxMainHeader) */
memset(&pad, 0, 6044);
if (fwrite(&pad, 6044, 1, dpx->file) == 0) {
if (verbose) printf("DPX: Couldn't write image header\n");
diff --git a/source/blender/imbuf/intern/dds/BlockDXT.h b/source/blender/imbuf/intern/dds/BlockDXT.h
index 0291816cd03..7e5a1e504b8 100644
--- a/source/blender/imbuf/intern/dds/BlockDXT.h
+++ b/source/blender/imbuf/intern/dds/BlockDXT.h
@@ -147,7 +147,7 @@ struct BlockDXT3
struct AlphaBlockDXT5
{
// uint64 unions do not compile on all platforms
- /*
+#if 0
union {
struct {
uint64 alpha0 : 8; // 8
@@ -171,7 +171,7 @@ struct AlphaBlockDXT5
};
uint64 u;
};
- */
+#endif
uint64 u;
uint8 alpha0() const { return u & 0xffLL; }
uint8 alpha1() const { return (u >> 8) & 0xffLL; }
diff --git a/source/blender/nodes/composite/nodes/node_composite_colorbalance.c b/source/blender/nodes/composite/nodes/node_composite_colorbalance.c
index e9d26ebebbc..df49e537788 100644
--- a/source/blender/nodes/composite/nodes/node_composite_colorbalance.c
+++ b/source/blender/nodes/composite/nodes/node_composite_colorbalance.c
@@ -49,14 +49,14 @@ static bNodeSocketTemplate cmp_node_colorbalance_out[] = {
#ifdef WITH_COMPOSITOR_LEGACY
/* this function implements ASC-CDL according to the spec at http://www.asctech.org/
- Slope
- S = in * slope
- Offset
- O = S + offset
- = (in * slope) + offset
- Power
- out = Clamp(O) ^ power
- = Clamp((in * slope) + offset) ^ power
+ * Slope
+ * S = in * slope
+ * Offset
+ * O = S + offset
+ * = (in * slope) + offset
+ * Power
+ * out = Clamp(O) ^ power
+ * = Clamp((in * slope) + offset) ^ power
*/
DO_INLINE float colorbalance_cdl(float in, float offset, float power, float slope)
{
diff --git a/source/blender/python/generic/bpy_internal_import.c b/source/blender/python/generic/bpy_internal_import.c
index ad97ceb68d4..8d146bedb48 100644
--- a/source/blender/python/generic/bpy_internal_import.c
+++ b/source/blender/python/generic/bpy_internal_import.c
@@ -59,6 +59,19 @@ static PyMethodDef bpy_reload_meth;
static PyObject *imp_reload_orig = NULL;
/* 'builtins' is most likely PyEval_GetBuiltins() */
+
+/**
+ * \note to the discerning developer, yes - this is nasty
+ * monkey-patching our own import into Python's builtin 'imp' module.
+ *
+ * However Python's alternative is to use import hooks,
+ * which are implemented in a way that we can't use our own importer as a
+ * fall-back (instead we must try and fail - raise an exception evert time).
+ * Since importing from blenders text-blocks is not the common case
+ * I prefer to use Pythons import by default and fall-back to
+ * Blenders - which we can only do by intercepting import calls I'm afraid.
+ * - Campbell
+ */
void bpy_import_init(PyObject *builtins)
{
PyObject *item;
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c
index 60e3f7d6164..bd6e752076d 100644
--- a/source/blender/windowmanager/intern/wm_draw.c
+++ b/source/blender/windowmanager/intern/wm_draw.c
@@ -711,14 +711,14 @@ static int wm_automatic_draw_method(wmWindow *win)
if (GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_UNIX, GPU_DRIVER_OPENSOURCE))
return USER_DRAW_OVERLAP;
/* also Intel drivers are slow */
- /* 2.64 BCon3 period, let's try if intel now works...
+#if 0 /* 2.64 BCon3 period, let's try if intel now works... */
else if (GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_UNIX, GPU_DRIVER_ANY))
return USER_DRAW_OVERLAP;
else if (GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_WIN, GPU_DRIVER_ANY))
return USER_DRAW_OVERLAP_FLIP;
else if (GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_MAC, GPU_DRIVER_ANY))
return USER_DRAW_OVERLAP_FLIP;
- */
+#endif
/* Windows software driver darkens color on each redraw */
else if (GPU_type_matches(GPU_DEVICE_SOFTWARE, GPU_OS_WIN, GPU_DRIVER_SOFTWARE))
return USER_DRAW_OVERLAP_FLIP;
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 54e61df4f6a..5cbad42134c 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -340,7 +340,7 @@ static int wm_handler_ui_call(bContext *C, wmEventHandler *handler, wmEvent *eve
int retval;
/* UI code doesn't handle return values - it just always returns break.
- to make the DBL_CLICK conversion work, we just don't send this to UI */
+ * to make the DBL_CLICK conversion work, we just don't send this to UI */
if (event->val == KM_DBL_CLICK)
return WM_HANDLER_CONTINUE;
@@ -1288,9 +1288,9 @@ static int wm_eventmatch(wmEvent *winevent, wmKeyMapItem *kmi)
/* the matching rules */
if (kmitype == KM_TEXTINPUT)
- if (winevent->val == KM_PRESS) { // prevent double clicks
+ if (winevent->val == KM_PRESS) { /* prevent double clicks */
/* NOT using ISTEXTINPUT anymore because (at least on Windows) some key codes above 255
- could have printable ascii keys - BUG [#30479] */
+ * could have printable ascii keys - BUG [#30479] */
if (ISKEYBOARD(winevent->type) && (winevent->ascii || winevent->utf8_buf[0])) return 1;
}
@@ -1550,8 +1550,8 @@ static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHa
if (handler->op->reports->list.first) {
/* FIXME, temp setting window, this is really bad!
- * only have because lib linking errors need to be seen by users :(
- * it can be removed without breaking anything but then no linking errors - campbell */
+ * only have because lib linking errors need to be seen by users :(
+ * it can be removed without breaking anything but then no linking errors - campbell */
wmWindow *win_prev = CTX_wm_window(C);
ScrArea *area_prev = CTX_wm_area(C);
ARegion *ar_prev = CTX_wm_region(C);
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 035e9d44b02..896a24f3fba 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1228,7 +1228,7 @@ static int wm_operator_props_popup_ex(bContext *C, wmOperator *op, const int do_
}
/* Same as WM_operator_props_popup but call the operator first,
- * This way - the button values corraspond to the result of the operator.
+ * This way - the button values correspond to the result of the operator.
* Without this, first access to a button will make the result jump,
* see [#32452] */
int WM_operator_props_popup_call(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c
index 0da3774d9a4..f4c2c13dcac 100644
--- a/source/blender/windowmanager/intern/wm_playanim.c
+++ b/source/blender/windowmanager/intern/wm_playanim.c
@@ -88,7 +88,6 @@ typedef struct PlayState {
short pingpong;
short noskip;
short sstep;
- short pause;
short wait2;
short stopped;
short go;
@@ -748,7 +747,6 @@ void WM_main_playanim(int argc, const char **argv)
ps.pingpong = FALSE;
ps.noskip = FALSE;
ps.sstep = FALSE;
- ps.pause = FALSE;
ps.wait2 = FALSE;
ps.stopped = FALSE;
ps.picture = NULL;
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index fbb3466032d..09f7e1692d9 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -337,7 +337,7 @@ static void wm_window_add_ghostwindow(const char *title, wmWindow *win)
int scr_w, scr_h, posy;
/* force setting multisamples only once, it requires restart - and you cannot
- mix it, either all windows have it, or none (tested in OSX opengl) */
+ * mix it, either all windows have it, or none (tested in OSX opengl) */
if (multisamples == -1)
multisamples = U.ogl_multisamples;
diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h
index ca0e9659a22..4d3d6ef89d9 100644
--- a/source/blender/windowmanager/wm_event_types.h
+++ b/source/blender/windowmanager/wm_event_types.h
@@ -285,9 +285,9 @@ enum {
/* for event checks */
/* only used for KM_TEXTINPUT, so assume that we want all user-inputtable ascii codes included */
- /* UNUSED - see wm_eventmatch - BUG [#30479]
-#define ISTEXTINPUT(event) (event >= ' ' && event <= 255)
- */
+ /* UNUSED - see wm_eventmatch - BUG [#30479] */
+// #define ISTEXTINPUT(event) (event >= ' ' && event <= 255)
+
/* test whether the event is a key on the keyboard */
#define ISKEYBOARD(event) (event >= ' ' && event <= 320)
diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h
index 83b7c8c8771..37e26e88750 100644
--- a/source/gameengine/Expressions/PyObjectPlus.h
+++ b/source/gameengine/Expressions/PyObjectPlus.h
@@ -526,7 +526,7 @@ typedef struct KX_PYATTRIBUTE_DEF {
/*------------------------------
* PyObjectPlus
-------------------------------*/
+ *------------------------------ */
typedef PyTypeObject *PyParentObject; /* Define the PyParent Object */
#else // WITH_PYTHON
diff --git a/source/gameengine/SceneGraph/SG_IObject.h b/source/gameengine/SceneGraph/SG_IObject.h
index 6b57db1a467..72a04064834 100644
--- a/source/gameengine/SceneGraph/SG_IObject.h
+++ b/source/gameengine/SceneGraph/SG_IObject.h
@@ -152,8 +152,8 @@ struct SG_Callbacks
};
/**
-base object that can be part of the scenegraph.
-*/
+ * base object that can be part of the scenegraph.
+ */
class SG_IObject : public SG_QList
{
private :