From 89a963fb7fdff543b77de790355b9dac3019bd33 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 9 Mar 2012 18:28:30 +0000 Subject: style cleanup: comment blocks --- source/blender/avi/intern/avi.c | 13 +- source/blender/blenfont/BLF_api.h | 12 +- source/blender/blenkernel/BKE_customdata.h | 2 +- source/blender/blenkernel/BKE_sequencer.h | 54 +++--- source/blender/blenkernel/intern/DerivedMesh.c | 22 ++- source/blender/blenkernel/intern/cdderivedmesh.c | 32 ++-- source/blender/blenkernel/intern/depsgraph.c | 59 +++--- source/blender/blenkernel/intern/displist.c | 30 +-- source/blender/blenkernel/intern/dynamicpaint.c | 44 ++--- source/blender/blenkernel/intern/multires.c | 26 +-- source/blender/blenkernel/intern/seqeffects.c | 98 +++++----- source/blender/blenkernel/intern/sequencer.c | 183 +++++++++--------- source/blender/blenkernel/intern/softbody.c | 24 +-- source/blender/blenkernel/intern/text.c | 123 ++++++------- source/blender/blenlib/BLI_utildefines.h | 2 +- source/blender/blenlib/CMakeLists.txt | 1 - source/blender/blenlib/intern/dynamiclist.h | 58 ------ source/blender/blenlib/intern/pbvh.c | 2 +- source/blender/blenlib/intern/string_cursor_utf8.c | 4 +- source/blender/blenpluginapi/iff.h | 6 +- source/blender/blenpluginapi/intern/pluginapi.c | 2 +- source/blender/bmesh/bmesh_class.h | 2 +- source/blender/bmesh/intern/bmesh_polygon.c | 32 ++-- source/blender/collada/collada_internal.cpp | 16 +- source/blender/editors/mesh/knifetool.c | 2 +- source/blender/editors/screen/screen_edit.c | 2 +- source/blender/gpu/GPU_buffers.h | 30 +-- source/blender/gpu/GPU_extensions.h | 42 ++--- source/blender/gpu/intern/gpu_codegen.c | 4 +- source/blender/gpu/intern/gpu_codegen.h | 8 +- source/blender/gpu/intern/gpu_draw.c | 34 ++-- source/blender/gpu/intern/gpu_extensions.c | 24 +-- source/blender/gpu/intern/gpu_material.c | 11 +- source/blender/ikplugin/intern/iksolver_plugin.c | 8 +- source/blender/ikplugin/intern/itasc_plugin.cpp | 53 +++--- source/blender/imbuf/IMB_imbuf.h | 25 ++- source/blender/imbuf/IMB_imbuf_types.h | 4 +- source/blender/imbuf/IMB_moviecache.h | 4 +- source/blender/imbuf/intern/IMB_indexer.h | 36 ++-- source/blender/imbuf/intern/IMB_metadata.h | 16 +- source/blender/imbuf/intern/anim_movie.c | 12 +- source/blender/imbuf/intern/bmp.c | 17 +- source/blender/imbuf/intern/cache.c | 22 +-- source/blender/imbuf/intern/cineon/logmemfile.c | 4 +- source/blender/imbuf/intern/dds/Image.h | 4 +- source/blender/imbuf/intern/filter.c | 7 +- source/blender/imbuf/intern/imageprocess.c | 21 +-- source/blender/imbuf/intern/jp2.c | 30 +-- source/blender/imbuf/intern/jpeg.c | 12 +- .../blender/imbuf/intern/openexr/openexr_api.cpp | 18 +- source/blender/imbuf/intern/openexr/openexr_api.h | 2 +- .../blender/imbuf/intern/openexr/openexr_multi.h | 2 +- .../blender/imbuf/intern/openexr/openexr_stub.cpp | 7 +- source/blender/imbuf/intern/png.c | 16 +- source/blender/imbuf/intern/radiance_hdr.c | 12 +- source/blender/imbuf/intern/rectop.c | 12 +- source/blender/imbuf/intern/scaling.c | 44 ++--- source/blender/imbuf/intern/tiff.c | 2 +- source/blender/makesdna/DNA_ID.h | 7 +- source/blender/makesdna/DNA_action_types.h | 2 +- source/blender/makesdna/DNA_actuator_types.h | 2 +- source/blender/makesdna/DNA_armature_types.h | 14 +- source/blender/makesdna/DNA_camera_types.h | 2 +- source/blender/makesdna/DNA_cloth_types.h | 20 +- source/blender/makesdna/DNA_curve_types.h | 20 +- source/blender/makesdna/DNA_documentation.h | 6 +- source/blender/makesdna/DNA_dynamicpaint_types.h | 2 +- source/blender/makesdna/DNA_material_types.h | 2 +- source/blender/makesdna/DNA_mesh_types.h | 27 +-- source/blender/makesdna/DNA_meshdata_types.h | 8 +- source/blender/makesdna/DNA_meta_types.h | 4 +- source/blender/makesdna/DNA_modifier_types.h | 32 ++-- source/blender/makesdna/DNA_movieclip_types.h | 4 +- source/blender/makesdna/DNA_node_types.h | 2 +- source/blender/makesdna/DNA_object_force.h | 21 ++- source/blender/makesdna/DNA_scene_types.h | 15 +- source/blender/makesdna/DNA_sdna_types.h | 12 +- source/blender/makesdna/DNA_smoke_types.h | 12 +- source/blender/makesdna/DNA_sound_types.h | 14 +- source/blender/makesdna/DNA_space_types.h | 12 +- source/blender/makesdna/DNA_userdef_types.h | 10 +- source/blender/makesdna/intern/dna_genfile.c | 178 +++++++++--------- source/blender/makesdna/intern/makesdna.c | 16 +- source/blender/makesrna/RNA_define.h | 8 +- source/blender/makesrna/RNA_types.h | 2 +- source/blender/makesrna/intern/makesrna.c | 24 ++- source/blender/makesrna/intern/rna_ID.c | 12 +- source/blender/makesrna/intern/rna_access.c | 4 +- source/blender/makesrna/intern/rna_define.c | 2 +- source/blender/makesrna/intern/rna_dynamicpaint.c | 44 ++--- source/blender/makesrna/intern/rna_gpencil.c | 4 +- source/blender/makesrna/intern/rna_key.c | 6 +- source/blender/makesrna/intern/rna_object_api.c | 8 +- source/blender/makesrna/intern/rna_sculpt_paint.c | 2 +- source/blender/makesrna/intern/rna_space.c | 2 +- source/blender/makesrna/intern/rna_wm.c | 2 +- source/blender/modifiers/intern/MOD_array.c | 22 +-- source/blender/modifiers/intern/MOD_bevel.c | 6 +- source/blender/modifiers/intern/MOD_boolean.c | 6 +- source/blender/modifiers/intern/MOD_boolean_util.c | 2 +- source/blender/modifiers/intern/MOD_boolean_util.h | 10 +- source/blender/modifiers/intern/MOD_build.c | 3 +- source/blender/modifiers/intern/MOD_cast.c | 40 ++-- source/blender/modifiers/intern/MOD_edgesplit.c | 3 +- .../blender/modifiers/intern/MOD_fluidsim_util.c | 10 +- source/blender/modifiers/intern/MOD_multires.c | 2 +- .../blender/modifiers/intern/MOD_particlesystem.c | 2 +- source/blender/modifiers/intern/MOD_remesh.c | 2 +- source/blender/modifiers/intern/MOD_screw.c | 11 +- source/blender/modifiers/intern/MOD_simpledeform.c | 4 +- source/blender/modifiers/intern/MOD_smooth.c | 2 +- source/blender/modifiers/intern/MOD_solidify.c | 6 +- source/blender/modifiers/intern/MOD_util.c | 6 +- source/blender/modifiers/intern/MOD_uvproject.c | 8 +- source/blender/nodes/shader/node_shader_tree.c | 8 +- .../nodes/shader/nodes/node_shader_dynamic.c | 8 +- .../nodes/shader/nodes/node_shader_output.c | 6 +- source/blender/python/generic/py_capi_utils.c | 2 +- source/blender/python/intern/gpu.c | 2 +- source/blender/python/mathutils/mathutils.c | 2 +- source/blender/python/mathutils/mathutils_Vector.c | 4 +- source/blender/render/extern/include/RE_pipeline.h | 12 +- .../blender/render/intern/include/pixelblending.h | 2 +- .../blender/render/intern/include/pixelshading.h | 9 +- .../render/intern/include/rayintersection.h | 2 +- .../blender/render/intern/include/render_types.h | 10 +- source/blender/render/intern/raytrace/bvh.h | 8 +- .../blender/render/intern/raytrace/rayobject.cpp | 16 +- .../render/intern/raytrace/rayobject_hint.h | 5 +- .../render/intern/raytrace/rayobject_internal.h | 68 +++---- .../render/intern/raytrace/rayobject_octree.cpp | 12 +- .../render/intern/raytrace/rayobject_rtbuild.cpp | 18 +- source/blender/render/intern/raytrace/vbvh.h | 17 +- .../blender/render/intern/source/convertblender.c | 42 ++--- source/blender/render/intern/source/envmap.c | 16 +- source/blender/render/intern/source/imagetexture.c | 2 +- source/blender/render/intern/source/occlusion.c | 16 +- source/blender/render/intern/source/pipeline.c | 57 +++--- .../blender/render/intern/source/pixelblending.c | 23 ++- source/blender/render/intern/source/pixelshading.c | 13 +- source/blender/render/intern/source/pointdensity.c | 10 +- source/blender/render/intern/source/rayshade.c | 8 +- .../blender/render/intern/source/render_result.c | 4 +- .../blender/render/intern/source/render_texture.c | 28 +-- source/blender/render/intern/source/rendercore.c | 12 +- .../blender/render/intern/source/renderdatabase.c | 28 +-- source/blender/render/intern/source/shadbuf.c | 37 ++-- source/blender/render/intern/source/shadeinput.c | 56 +++--- source/blender/render/intern/source/shadeoutput.c | 6 +- source/blender/render/intern/source/sss.c | 64 +++---- source/blender/render/intern/source/strand.c | 2 +- source/blender/render/intern/source/volumetric.c | 28 +-- source/blender/render/intern/source/zbuf.c | 9 +- source/blender/windowmanager/WM_types.h | 14 +- source/blender/windowmanager/intern/wm.c | 4 +- source/blender/windowmanager/intern/wm_apple.c | 14 +- source/blender/windowmanager/intern/wm_cursors.c | 72 ++++---- source/blender/windowmanager/intern/wm_draw.c | 6 +- .../blender/windowmanager/intern/wm_event_system.c | 42 ++--- source/blender/windowmanager/intern/wm_files.c | 26 +-- source/blender/windowmanager/intern/wm_init_exit.c | 6 +- source/blender/windowmanager/intern/wm_jobs.c | 48 ++--- source/blender/windowmanager/intern/wm_keymap.c | 6 +- source/blender/windowmanager/intern/wm_operators.c | 41 +++-- source/blender/windowmanager/intern/wm_subwindow.c | 34 ++-- source/blender/windowmanager/intern/wm_window.c | 28 +-- source/blender/windowmanager/wm_event_types.h | 4 +- source/creator/creator.c | 21 +-- source/gameengine/Converter/BL_ActionActuator.cpp | 4 +- source/gameengine/Converter/BL_ArmatureChannel.h | 4 +- .../Converter/BL_BlenderDataConversion.cpp | 7 +- .../gameengine/Converter/KX_ConvertActuators.cpp | 42 ++--- source/gameengine/Converter/KX_ConvertSensors.cpp | 8 +- source/gameengine/Expressions/BoolValue.cpp | 6 +- source/gameengine/Expressions/BoolValue.h | 2 +- source/gameengine/Expressions/EmptyValue.h | 2 +- source/gameengine/Expressions/ErrorValue.h | 2 +- source/gameengine/Expressions/Expression.h | 2 +- source/gameengine/Expressions/FloatValue.h | 2 +- source/gameengine/Expressions/IfExpr.cpp | 28 +-- source/gameengine/Expressions/InputParser.cpp | 12 +- source/gameengine/Expressions/IntValue.cpp | 9 +- source/gameengine/Expressions/IntValue.h | 2 +- source/gameengine/Expressions/ListValue.h | 2 +- source/gameengine/Expressions/Operator2Expr.h | 2 +- source/gameengine/Expressions/PyObjectPlus.h | 8 +- source/gameengine/Expressions/StringValue.cpp | 36 ++-- source/gameengine/Expressions/Value.h | 2 +- source/gameengine/Expressions/VectorValue.cpp | 17 +- source/gameengine/Expressions/VectorValue.h | 8 +- .../gameengine/GameLogic/Joystick/SCA_Joystick.h | 2 +- source/gameengine/GamePlayer/common/GPC_Canvas.cpp | 16 +- source/gameengine/Ketsji/BL_Material.h | 10 +- .../Ketsji/KX_BulletPhysicsController.cpp | 10 +- source/gameengine/Ketsji/KX_Camera.cpp | 34 ++-- source/gameengine/Ketsji/KX_Camera.h | 9 +- source/gameengine/Ketsji/KX_CameraActuator.cpp | 8 +- source/gameengine/Ketsji/KX_ConstraintActuator.cpp | 4 +- .../gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp | 4 +- source/gameengine/Ketsji/KX_Dome.cpp | 204 ++++++++++----------- source/gameengine/Ketsji/KX_Dome.h | 7 +- source/gameengine/Ketsji/KX_FontObject.cpp | 4 +- source/gameengine/Ketsji/KX_FontObject.h | 4 +- source/gameengine/Ketsji/KX_GameObject.cpp | 6 +- source/gameengine/Ketsji/KX_IPhysicsController.h | 10 +- source/gameengine/Ketsji/KX_ISceneConverter.h | 10 +- source/gameengine/Ketsji/KX_IpoActuator.h | 6 +- source/gameengine/Ketsji/KX_KetsjiEngine.cpp | 10 +- source/gameengine/Ketsji/KX_MouseFocusSensor.cpp | 10 +- source/gameengine/Ketsji/KX_MouseFocusSensor.h | 2 +- source/gameengine/Ketsji/KX_NearSensor.h | 4 +- source/gameengine/Ketsji/KX_PythonInit.cpp | 2 +- source/gameengine/Ketsji/KX_PythonInitTypes.cpp | 6 +- source/gameengine/Ketsji/KX_RadarSensor.h | 4 +- source/gameengine/Ketsji/KX_RaySensor.cpp | 2 +- source/gameengine/Ketsji/KX_Scene.cpp | 4 +- source/gameengine/Ketsji/KX_Scene.h | 8 +- .../gameengine/Rasterizer/RAS_2DFilterManager.cpp | 10 +- .../RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp | 10 +- source/gameengine/VideoTexture/BlendType.h | 2 +- source/gameengine/VideoTexture/Common.h | 14 +- source/gameengine/VideoTexture/Exception.h | 2 +- source/gameengine/VideoTexture/FilterBase.h | 2 +- source/gameengine/VideoTexture/FilterBlueScreen.h | 2 +- source/gameengine/VideoTexture/FilterColor.h | 2 +- source/gameengine/VideoTexture/FilterNormal.h | 2 +- source/gameengine/VideoTexture/FilterSource.h | 2 +- source/gameengine/VideoTexture/ImageBase.h | 2 +- source/gameengine/VideoTexture/ImageBuff.h | 2 +- source/gameengine/VideoTexture/ImageMix.h | 2 +- source/gameengine/VideoTexture/ImageRender.h | 2 +- source/gameengine/VideoTexture/ImageViewport.h | 2 +- source/gameengine/VideoTexture/PyTypeList.h | 2 +- source/gameengine/VideoTexture/Texture.h | 2 +- source/gameengine/VideoTexture/VideoBase.h | 2 +- source/gameengine/VideoTexture/VideoFFmpeg.h | 2 +- 236 files changed, 1874 insertions(+), 1940 deletions(-) delete mode 100644 source/blender/blenlib/intern/dynamiclist.h (limited to 'source') diff --git a/source/blender/avi/intern/avi.c b/source/blender/avi/intern/avi.c index 1da93d5ed50..cc4d6b41f98 100644 --- a/source/blender/avi/intern/avi.c +++ b/source/blender/avi/intern/avi.c @@ -197,13 +197,12 @@ AviError AVI_print_error (AviError in_error) return in_error; } -/* +#if 0 void AVI_set_debug (int mode) { AVI_DEBUG= mode; } -*/ -/* + int AVI_is_avi (char *name) { FILE *fp; @@ -224,7 +223,7 @@ int AVI_is_avi (char *name) fclose(fp); return ret; } -*/ +#endif int AVI_is_avi (const char *name) { @@ -659,7 +658,7 @@ void *AVI_read_frame (AviMovie *movie, AviFormat format, int frame, int stream) void *buffer; /* Retrieve the record number of the desired frame in the index - If a chunk has Size 0 we need to rewind to previous frame */ + * If a chunk has Size 0 we need to rewind to previous frame */ while(rewind && frame > -1) { i=0; cur_frame=-1; @@ -798,13 +797,13 @@ AviError AVI_open_compress (char *name, AviMovie *movie, int streams, ...) movie->streams[i].sh.bottom = 0; if (movie->streams[i].sh.Type == FCC("vids")) { -/* +#if 0 if (movie->streams[i].format == AVI_FORMAT_MJPEG) { movie->streams[i].sf = MEM_mallocN (sizeof(AviBitmapInfoHeader) + sizeof(AviMJPEGUnknown),"moviestreamformatL"); movie->streams[i].sf_size = sizeof(AviBitmapInfoHeader) + sizeof(AviMJPEGUnknown); } else { -*/ +#endif movie->streams[i].sf = MEM_mallocN (sizeof(AviBitmapInfoHeader), "moviestreamformatS"); movie->streams[i].sf_size = sizeof(AviBitmapInfoHeader); diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h index d7b441e70e1..1e242deece4 100644 --- a/source/blender/blenfont/BLF_api.h +++ b/source/blender/blenfont/BLF_api.h @@ -59,12 +59,12 @@ void BLF_size(int fontid, int size, int dpi); * to enable this. * * The order of the matrix is like GL: - - | m[0] m[4] m[8] m[12] | - | m[1] m[5] m[9] m[13] | - | m[2] m[6] m[10] m[14] | - | m[3] m[7] m[11] m[15] | - + * + * | m[0] m[4] m[8] m[12] | + * | m[1] m[5] m[9] m[13] | + * | m[2] m[6] m[10] m[14] | + * | m[3] m[7] m[11] m[15] | + * */ void BLF_matrix(int fontid, const double m[16]); diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h index ee5e4f20af1..27b27ce5b42 100644 --- a/source/blender/blenkernel/BKE_customdata.h +++ b/source/blender/blenkernel/BKE_customdata.h @@ -69,7 +69,7 @@ extern const CustomDataMask CD_MASK_FACECORNERS; #define CD_DEFAULT 2 /* allocate and set to default */ #define CD_REFERENCE 3 /* use data pointers, set layer flag NOFREE */ #define CD_DUPLICATE 4 /* do a full copy of all layers, only allowed if source - has same number of elements */ + * has same number of elements */ #define CD_TYPE_AS_MASK(_type) (CustomDataMask)((CustomDataMask)1 << (CustomDataMask)(_type)) diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index ab7e0e72191..4b3a15181c1 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -118,11 +118,11 @@ struct SeqEffectHandle { void (*init_plugin)(struct Sequence *seq, const char *fname); /* number of input strips needed - (called directly after construction) */ + * (called directly after construction) */ int (*num_inputs)(void); /* load is called first time after readblenfile in - get_sequence_effect automatically */ + * get_sequence_effect automatically */ void (*load)(struct Sequence *seq); /* duplicate */ @@ -132,9 +132,9 @@ struct SeqEffectHandle { void (*free)(struct Sequence *seq); /* returns: -1: no input needed, - 0: no early out, - 1: out = ibuf1, - 2: out = ibuf2 */ + * 0: no early out, + * 1: out = ibuf1, + * 2: out = ibuf2 */ int (*early_out)(struct Sequence *seq, float facf0, float facf1); /* stores the y-range of the effect IPO */ @@ -146,9 +146,9 @@ struct SeqEffectHandle { float * facf0, float * facf1); /* execute the effect - sequence effects are only required to either support - float-rects or byte-rects - (mixed cases are handled one layer up...) */ + * sequence effects are only required to either support + * float-rects or byte-rects + * (mixed cases are handled one layer up...) */ struct ImBuf* (*execute)( SeqRenderData context, @@ -161,10 +161,10 @@ struct SeqEffectHandle { /* ********************* prototypes *************** */ /* ********************************************************************** - * sequence.c - - * sequencer render functions - ********************************************************************** */ + * sequence.c + * + * sequencer render functions + * ********************************************************************** */ struct ImBuf *give_ibuf_seq(SeqRenderData context, float cfra, int chanshown); struct ImBuf *give_ibuf_seq_threaded(SeqRenderData context, float cfra, int chanshown); @@ -209,10 +209,10 @@ void seq_proxy_rebuild_finish(struct SeqIndexBuildContext *context, short stop); /* ********************************************************************** - seqcache.c - - Sequencer memory cache management functions - ********************************************************************** */ + * seqcache.c + * + * Sequencer memory cache management functions + * ********************************************************************** */ typedef enum { SEQ_STRIPELEM_IBUF, @@ -230,20 +230,20 @@ struct ImBuf * seq_stripelem_cache_get( float cfra, seq_stripelem_ibuf_t type); /* passed ImBuf is properly refed, so ownership is *not* - transfered to the cache. - you can pass the same ImBuf multiple times to the cache without problems. -*/ + * transfered to the cache. + * you can pass the same ImBuf multiple times to the cache without problems. + */ void seq_stripelem_cache_put( SeqRenderData context, struct Sequence * seq, float cfra, seq_stripelem_ibuf_t type, struct ImBuf * nval); /* ********************************************************************** - seqeffects.c - - Sequencer effect strip managment functions - ********************************************************************** -*/ + * seqeffects.c + * + * Sequencer effect strip managment functions + * ********************************************************************** + */ /* intern */ struct SeqEffectHandle get_sequence_blend(struct Sequence *seq); @@ -255,9 +255,9 @@ int get_sequence_effect_num_inputs(int seq_type); /* ********************************************************************** - Sequencer editing functions - ********************************************************************** -*/ + * Sequencer editing functions + * ********************************************************************** + */ /* for transform but also could use elsewhere */ int seq_tx_get_start(struct Sequence *seq); diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 5bd5c09be28..4c683b2b2c8 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -421,7 +421,7 @@ void DM_to_mesh(DerivedMesh *dm, Mesh *me, Object *ob) } /* not all DerivedMeshes store their verts/edges/faces in CustomData, so - we set them here in case they are missing */ + * we set them here in case they are missing */ if(!CustomData_has_layer(&tmp.vdata, CD_MVERT)) CustomData_add_layer(&tmp.vdata, CD_MVERT, CD_ASSIGN, dm->dupVertArray(dm), totvert); if(!CustomData_has_layer(&tmp.edata, CD_MEDGE)) @@ -454,9 +454,9 @@ void DM_to_mesh(DerivedMesh *dm, Mesh *me, Object *ob) CustomData_free(&me->ldata, me->totloop); CustomData_free(&me->pdata, me->totpoly); - /* ok, this should now use new CD shapekey data, - which shouuld be fed through the modifier - stack*/ + /* ok, this should now use new CD shapekey data, + * which shouuld be fed through the modifier + * stack*/ if(tmp.totvert != me->totvert && !did_shapekeys && me->key) { printf("YEEK! this should be recoded! Shape key loss!!!\n"); if(tmp.key) tmp.key->id.us--; @@ -787,7 +787,7 @@ static void *get_orco_coords_dm(Object *ob, BMEditMesh *em, int layer, int *free } else if(layer == CD_CLOTH_ORCO) { /* apply shape key for cloth, this should really be solved - by a more flexible customdata system, but not simple */ + * by a more flexible customdata system, but not simple */ if(!em) { ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); KeyBlock *kb= key_get_keyblock(ob_get_key(ob), clmd->sim_parms->shapekey_rest); @@ -2636,8 +2636,9 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs, attribs->tface[a].glIndex = gattribs->layer[b].glindex; attribs->tface[a].glTexco = gattribs->layer[b].gltexco; } - /* BMESH ONLY, may need to get this working?, otherwise remove */ - /* else { + /* BMESH_TODO - BMESH ONLY, may need to get this working?, otherwise remove */ +#if 0 + else { int player; CustomData *pdata = dm->getPolyDataLayout(dm); @@ -2657,7 +2658,7 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs, } } - */ +#endif } else if(gattribs->layer[b].type == CD_MCOL) { /* vertex colors */ @@ -2756,13 +2757,14 @@ static void navmesh_drawColored(DerivedMesh *dm) if (!polygonIdx) return; - /* +#if 0 //UI_ThemeColor(TH_WIRE); glDisable(GL_LIGHTING); glLineWidth(2.0); dm->drawEdges(dm, 0, 1); glLineWidth(1.0); - glEnable(GL_LIGHTING);*/ + glEnable(GL_LIGHTING); +#endif glDisable(GL_LIGHTING); /* if(GPU_buffer_legacy(dm) ) */ { /* TODO - VBO draw code, not high priority - campbell */ diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index 7ba9e6b9686..cf435e96332 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -79,7 +79,7 @@ typedef struct { DerivedMesh dm; /* these point to data in the DerivedMesh custom data layers, - they are only here for efficiency and convenience **/ + * they are only here for efficiency and convenience **/ MVert *mvert; MEdge *medge; MFace *mface; @@ -237,13 +237,13 @@ static int can_pbvh_draw(Object *ob, DerivedMesh *dm) int deformed= 0; /* active modifiers means extra deformation, which can't be handled correct - on bith of PBVH and sculpt "layer" levels, so use PBVH only for internal brush - stuff and show final DerivedMesh so user would see actual object shape */ + * on bith of PBVH and sculpt "layer" levels, so use PBVH only for internal brush + * stuff and show final DerivedMesh so user would see actual object shape */ deformed|= ob->sculpt->modifiers_active; /* as in case with modifiers, we can't synchronize deformation made against - PBVH and non-locked keyblock, so also use PBVH only for brushes and - final DM to give final result to user */ + * PBVH and non-locked keyblock, so also use PBVH only for brushes and + * final DM to give final result to user */ deformed|= ob->sculpt->kb && (ob->shapeflag&OB_SHAPE_LOCK) == 0; if(deformed) @@ -269,8 +269,8 @@ static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm) } /* always build pbvh from original mesh, and only use it for drawing if - this derivedmesh is just original mesh. it's the multires subsurf dm - that this is actually for, to support a pbvh on a modified mesh */ + * this derivedmesh is just original mesh. it's the multires subsurf dm + * that this is actually for, to support a pbvh on a modified mesh */ if(!cddm->pbvh && ob->type == OB_MESH) { SculptSession *ss= ob->sculpt; Mesh *me= ob->data; @@ -297,7 +297,7 @@ static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm) } /* update vertex normals so that drawing smooth faces works during sculpt - TODO: proper fix is to support the pbvh in all drawing modes */ + * TODO: proper fix is to support the pbvh in all drawing modes */ static void cdDM_update_normals_from_pbvh(DerivedMesh *dm) { CDDerivedMesh *cddm = (CDDerivedMesh*) dm; @@ -760,7 +760,7 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm, if(!flush && compareDrawOptions) { /* also compare draw options and flush buffer if they're different - need for face selection highlight in edit mode */ + * need for face selection highlight in edit mode */ flush|= compareDrawOptions(userData, actualFace, next_actualFace) == 0; } @@ -840,7 +840,7 @@ static void cdDM_drawMappedFaces(DerivedMesh *dm, cp = (unsigned char *)&mc[i * 4]; /* no need to set shading mode to flat because - * normals are already used to change shading */ + * normals are already used to change shading */ glShadeModel(GL_SMOOTH); glBegin(mf->v4?GL_QUADS:GL_TRIANGLES); @@ -931,8 +931,8 @@ static void cdDM_drawMappedFaces(DerivedMesh *dm, draw_option= setDrawOptions(userData, orig); /* Goal is to draw as long of a contiguous triangle - array as possible, so draw when we hit either an - invisible triangle or at the end of the array */ + * array as possible, so draw when we hit either an + * invisible triangle or at the end of the array */ /* flush buffer if current triangle isn't drawable or it's last triangle... */ flush= (draw_option == DM_DRAW_OPTION_SKIP) || (i == tottri - 1); @@ -1517,7 +1517,7 @@ void CDDM_recalc_tessellation_ex(DerivedMesh *dm, const int do_face_nor_cpy) cddm->mface = CustomData_get_layer(&dm->faceData, CD_MFACE); /* Tessellation recreated faceData, and the active layer indices need to get re-propagated - from loops and polys to faces */ + * from loops and polys to faces */ CustomData_bmesh_update_active_layers(&dm->faceData, &dm->polyData, &dm->loopData); } @@ -1826,8 +1826,8 @@ DerivedMesh *CDDM_from_BMEditMesh(BMEditMesh *em, Mesh *UNUSED(me), int use_mdis mask = use_mdisps ? CD_MASK_DERIVEDMESH|CD_MASK_MDISPS : CD_MASK_DERIVEDMESH; - /*don't process shapekeys, we only feed them through the modifier stack as needed, - e.g. for applying modifiers or the like*/ + /* don't process shapekeys, we only feed them through the modifier stack as needed, + * e.g. for applying modifiers or the like*/ mask &= ~CD_MASK_SHAPEKEY; CustomData_merge(&bm->vdata, &dm->vertData, mask, CD_CALLOC, dm->numVertData); @@ -1992,7 +1992,7 @@ static DerivedMesh *cddm_copy_ex(DerivedMesh *source, int faces_from_tessfaces) /* any callers that need tessface data can calculate it - campbell */ #if 0 /* BMESH_TODO: Find out why this is necessary (or else find a way to remove - it). If it is necessary, add a comment explaining why. */ + * it). If it is necessary, add a comment explaining why. */ CDDM_recalc_tessellation((DerivedMesh *)cddm); #endif diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index 72890908457..c178a4ef6ea 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -595,8 +595,8 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O if(part->ren_as == PART_DRAW_OB && part->dup_ob) { node2 = dag_get_node(dag, part->dup_ob); /* note that this relation actually runs in the wrong direction, the problem - is that dupli system all have this (due to parenting), and the render - engine instancing assumes particular ordering of objects in list */ + * is that dupli system all have this (due to parenting), and the render + * engine instancing assumes particular ordering of objects in list */ dag_add_relation(dag, node, node2, DAG_RL_OB_OB, "Particle Object Visualisation"); if(part->dup_ob->type == OB_MBALL) dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA, "Particle Object Visualisation"); @@ -756,8 +756,8 @@ struct DagForest *build_dag(Main *bmain, Scene *sce, short mask) } /* Now all relations were built, but we need to solve 1 exceptional case; - When objects have multiple "parents" (for example parent + constraint working on same object) - the relation type has to be synced. One of the parents can change, and should give same event to child */ + * When objects have multiple "parents" (for example parent + constraint working on same object) + * the relation type has to be synced. One of the parents can change, and should give same event to child */ /* nodes were callocced, so we can use node->color for temporal storage */ for(node = sce->theDag->DagNode.first; node; node= node->next) { @@ -1159,9 +1159,8 @@ void graph_bfs(void) } set_node_xy(node, node->BFS_dist*DEPSX*2, pos[node->BFS_dist]*DEPSY*2); node->color = DAG_BLACK; - /* - fprintf(stderr,"BFS node : %20s %i %5.0f %5.0f\n",((ID *) node->ob)->name,node->BFS_dist, node->x, node->y); - */ + + // fprintf(stderr,"BFS node : %20s %i %5.0f %5.0f\n",((ID *) node->ob)->name,node->BFS_dist, node->x, node->y); } } queue_delete(nqueue); @@ -1185,8 +1184,8 @@ int pre_and_post_source_BFS(DagForest *dag, short mask, DagNode *source, graph_a /* fprintf(stderr,"starting BFS \n ------------\n"); */ /* Init - * dagnode.first is always the root (scene) - */ + * dagnode.first is always the root (scene) + */ node = dag->DagNode.first; nqueue = queue_create(DAGQUEUEALLOC); while(node) { @@ -1220,9 +1219,8 @@ int pre_and_post_source_BFS(DagForest *dag, short mask, DagNode *source, graph_a } post_func(node->ob,data); node->color = DAG_BLACK; - /* - fprintf(stderr,"BFS node : %20s %i %5.0f %5.0f\n",((ID *) node->ob)->name,node->BFS_dist, node->x, node->y); - */ + + // fprintf(stderr,"BFS node : %20s %i %5.0f %5.0f\n",((ID *) node->ob)->name,node->BFS_dist, node->x, node->y); } } queue_delete(nqueue); @@ -1303,7 +1301,7 @@ DagNodeQueue * graph_dfs(void) ; /* already processed node but we may want later to change distance either to shorter to longer. * DFS_dist is the first encounter - */ + */ /*if (node->DFS_dist >= itA->node->DFS_dist) itA->node->DFS_dist = node->DFS_dist + 1; @@ -1337,9 +1335,8 @@ DagNodeQueue * graph_dfs(void) } set_node_xy(node, node->DFS_dist*DEPSX*2, pos[node->DFS_dist]*DEPSY*2); - /* - fprintf(stderr,"DFS node : %20s %i %i %i %i\n",((ID *) node->ob)->name,node->BFS_dist, node->DFS_dist, node->DFS_dvtm, node->DFS_fntm ); - */ + // fprintf(stderr,"DFS node : %20s %i %i %i %i\n",((ID *) node->ob)->name,node->BFS_dist, node->DFS_dist, node->DFS_dvtm, node->DFS_fntm ); + push_stack(retqueue,node); } @@ -1376,8 +1373,8 @@ int pre_and_post_source_DFS(DagForest *dag, short mask, DagNode *source, graph_a nqueue = queue_create(DAGQUEUEALLOC); /* Init - * dagnode.first is always the root (scene) - */ + * dagnode.first is always the root (scene) + */ node = dag->DagNode.first; while(node) { node->color = DAG_WHITE; @@ -1652,7 +1649,7 @@ void graph_print_adj_list(void) /* ************************ API *********************** */ /* mechanism to allow editors to be informed of depsgraph updates, - to do their own updates based on changes... */ + * to do their own updates based on changes... */ static void (*EditorsUpdateIDCb)(Main *bmain, ID *id)= NULL; static void (*EditorsUpdateSceneCb)(Main *bmain, Scene *scene, int updated)= NULL; @@ -2363,7 +2360,7 @@ static void dag_current_scene_layers(Main *bmain, Scene **sce, unsigned int *lay wmWindow *win; /* only one scene supported currently, making more scenes work - correctly requires changes beyond just the dependency graph */ + * correctly requires changes beyond just the dependency graph */ *sce= NULL; *lay= 0; @@ -2383,8 +2380,8 @@ static void dag_current_scene_layers(Main *bmain, Scene **sce, unsigned int *lay if(*sce) *lay= (*sce)->lay; /* XXX for background mode, we should get the scene - from somewhere, for the -S option, but it's in - the context, how to get it here? */ + * from somewhere, for the -S option, but it's in + * the context, how to get it here? */ } } @@ -2414,9 +2411,9 @@ void DAG_on_visible_update(Main *bmain, const short do_time) if(scene && scene->theDag) { Scene *sce_iter; /* derivedmeshes and displists are not saved to file so need to be - remade, tag them so they get remade in the scene update loop, - note armature poses or object matrices are preserved and do not - require updates, so we skip those */ + * remade, tag them so they get remade in the scene update loop, + * note armature poses or object matrices are preserved and do not + * require updates, so we skip those */ dag_scene_flush_layers(scene, lay); for(SETLOOPER(scene, sce_iter, base)) { @@ -2471,7 +2468,7 @@ static void dag_id_flush_update(Scene *sce, ID *id) short idtype; /* here we flush a few things before actual scene wide flush, mostly - due to only objects and not other datablocks being in the depsgraph */ + * due to only objects and not other datablocks being in the depsgraph */ /* set flags & pointcache for object */ if(GS(id->name) == ID_OB) { @@ -2591,8 +2588,8 @@ static void dag_id_flush_update(Scene *sce, ID *id) } /* camera's matrix is used to orient reconstructed stuff, - so it should happen tracking-related constraints recalculation - when camera is changing (sergey) */ + * so it should happen tracking-related constraints recalculation + * when camera is changing (sergey) */ if(sce->camera && &sce->camera->id == id) { MovieClip *clip = object_get_movieclip(sce, sce->camera, 1); @@ -2625,7 +2622,7 @@ void DAG_ids_flush_tagged(Main *bmain) ID *id = lb->first; /* we tag based on first ID type character to avoid - looping over all ID's in case there are no tags */ + * looping over all ID's in case there are no tags */ if(id && bmain->id_tag_update[id->name[0]]) { for(; id; id=id->next) { if(id->flag & (LIB_ID_RECALC|LIB_ID_RECALC_DATA)) { @@ -2654,7 +2651,7 @@ void DAG_ids_check_recalc(Main *bmain, Scene *scene, int time) ID *id = lb->first; /* we tag based on first ID type character to avoid - looping over all ID's in case there are no tags */ + * looping over all ID's in case there are no tags */ if(id && bmain->id_tag_update[id->name[0]]) { updated= 1; break; @@ -2677,7 +2674,7 @@ void DAG_ids_clear_recalc(Main *bmain) ID *id = lb->first; /* we tag based on first ID type character to avoid - looping over all ID's in case there are no tags */ + * looping over all ID's in case there are no tags */ if(id && bmain->id_tag_update[id->name[0]]) { for(; id; id=id->next) if(id->flag & (LIB_ID_RECALC|LIB_ID_RECALC_DATA)) diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index 6383f7b9040..d10c060cc7f 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -613,10 +613,10 @@ static void curve_to_filledpoly(Curve *cu, ListBase *UNUSED(nurb), ListBase *dis } /* taper rules: - - only 1 curve - - first point left, last point right - - based on subdivided points in original curve, not on points in taper curve (still) -*/ + * - only 1 curve + * - first point left, last point right + * - based on subdivided points in original curve, not on points in taper curve (still) + */ float calc_taper(Scene *scene, Object *taperobj, int cur, int tot) { DispList *dl; @@ -710,8 +710,8 @@ static ModifierData *curve_get_tesselate_point(Scene *scene, Object *ob, int for preTesselatePoint = md; /* this modifiers are moving point of tessellation automatically - (some of them even can't be applied on tesselated curve), set flag - for incformation button in modifier's header */ + * (some of them even can't be applied on tesselated curve), set flag + * for incformation button in modifier's header */ md->mode |= eModifierMode_ApplyOnSpline; } else if(md->mode&eModifierMode_ApplyOnSpline) { preTesselatePoint = md; @@ -746,9 +746,9 @@ static void curve_calc_modifiers_pre(Scene *scene, Object *ob, int forRender, fl if(keyVerts) { /* split coords from key data, the latter also includes - tilts, which is passed through in the modifier stack. - this is also the reason curves do not use a virtual - shape key modifier yet. */ + * tilts, which is passed through in the modifier stack. + * this is also the reason curves do not use a virtual + * shape key modifier yet. */ deformedVerts= curve_getKeyVertexCos(cu, nurb, keyVerts); originalVerts= MEM_dupallocN(deformedVerts); } @@ -1168,8 +1168,8 @@ void makeDispListSurf(Scene *scene, Object *ob, ListBase *dispbase, } /* make copy of 'undeformed" displist for texture space calculation - actually, it's not totally undeformed -- pre-tessellation modifiers are - already applied, thats how it worked for years, so keep for compatibility (sergey) */ + * actually, it's not totally undeformed -- pre-tessellation modifiers are + * already applied, thats how it worked for years, so keep for compatibility (sergey) */ copy_displist(&cu->disp, dispbase); if (!forRender) { @@ -1394,8 +1394,8 @@ static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispba if(cu->flag & CU_PATH) calc_curvepath(ob); /* make copy of 'undeformed" displist for texture space calculation - actually, it's not totally undeformed -- pre-tessellation modifiers are - already applied, thats how it worked for years, so keep for compatibility (sergey) */ + * actually, it's not totally undeformed -- pre-tessellation modifiers are + * already applied, thats how it worked for years, so keep for compatibility (sergey) */ copy_displist(&cu->disp, dispbase); if (!forRender) { @@ -1416,8 +1416,8 @@ void makeDispListCurveTypes(Scene *scene, Object *ob, int forOrco) ListBase *dispbase; /* The same check for duplis as in do_makeDispListCurveTypes. - Happens when curve used for constraint/bevel was converted to mesh. - check there is still needed for render displist and orco displists. */ + * Happens when curve used for constraint/bevel was converted to mesh. + * check there is still needed for render displist and orco displists. */ if(!ELEM3(ob->type, OB_SURF, OB_CURVE, OB_FONT)) return; freedisplist(&(ob->disp)); diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 5280215d15c..2c7814a6a43 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -156,7 +156,7 @@ typedef struct PaintBakeData { int *s_pos; /* index to start reading point sample realCoord */ int *s_num; /* num of realCoord samples */ Vec3f *realCoord; /* current pixel center world-space coordinates for each sample - * ordered as (s_pos+s_num)*/ + * ordered as (s_pos+s_num)*/ Bounds3D mesh_bounds; /* adjacency info */ @@ -4145,9 +4145,9 @@ static int dynamicPaint_prepareEffectStep(DynamicPaintSurface *surface, Scene *s return steps; } -/* -* Processes active effect step. -*/ +/** + * Processes active effect step. + */ static void dynamicPaint_doEffectStep(DynamicPaintSurface *surface, float *force, PaintPoint *prevPoint, float timescale, float steps) { PaintSurfaceData *sData = surface->data; @@ -4159,8 +4159,8 @@ static void dynamicPaint_doEffectStep(DynamicPaintSurface *surface, float *force if (!sData->adj_data) return; /* - * Spread Effect - */ + * Spread Effect + */ if (surface->effect & MOD_DPAINT_EFFECT_DO_SPREAD) { float eff_scale = distance_scale*EFF_MOVEMENT_PER_FRAME*surface->spread_speed*timescale; @@ -4175,7 +4175,7 @@ static void dynamicPaint_doEffectStep(DynamicPaintSurface *surface, float *force PaintPoint *pPoint = &((PaintPoint*)sData->type_data)[index]; /* Only reads values from the surface copy (prevPoint[]), - * so this one is thread safe */ + * so this one is thread safe */ /* Loop through neighboring points */ for (i=0; ieffect & MOD_DPAINT_EFFECT_DO_SHRINK) { float eff_scale = distance_scale*EFF_MOVEMENT_PER_FRAME*surface->shrink_speed*timescale; @@ -4227,7 +4227,7 @@ static void dynamicPaint_doEffectStep(DynamicPaintSurface *surface, float *force totalAlpha += ePoint->e_alpha; /* Check if neighboring point has lower alpha, - * if so, decrease this point's alpha as well*/ + * if so, decrease this point's alpha as well*/ if (pPoint->alpha <= 0.0f && pPoint->e_alpha <= 0.0f && pPoint->wetness <= 0.0f) continue; /* decrease factor for dry paint alpha */ @@ -4251,8 +4251,8 @@ static void dynamicPaint_doEffectStep(DynamicPaintSurface *surface, float *force } /* - * Drip Effect - */ + * Drip Effect + */ if (surface->effect & MOD_DPAINT_EFFECT_DO_DRIP && force) { float eff_scale = distance_scale*EFF_MOVEMENT_PER_FRAME*timescale/2.0f; @@ -4450,8 +4450,8 @@ static void dynamicPaint_surfacePreStep(DynamicPaintSurface *surface, float time dry_ratio = pPoint->wetness/p_wetness; /* - * Slowly "shift" paint from wet layer to dry layer as it drys: - */ + * Slowly "shift" paint from wet layer to dry layer as it drys: + */ /* make sure alpha values are within proper range */ CLAMP(pPoint->alpha, 0.0f, 1.0f); CLAMP(pPoint->e_alpha, 0.0f, 1.0f); @@ -4464,7 +4464,7 @@ static void dynamicPaint_surfacePreStep(DynamicPaintSurface *surface, float time /* now calculate new alpha for dry layer that keeps final blended color unchanged */ pPoint->alpha = (f_color[3] - pPoint->e_alpha)/(1.0f-pPoint->e_alpha); /* for each rgb component, calculate a new dry layer color that keeps the final blend color - * with these new alpha values. (wet layer color doesnt change)*/ + * with these new alpha values. (wet layer color doesnt change)*/ if (pPoint->alpha) { for (i=0; i<3; i++) { pPoint->color[i] = (f_color[i]*f_color[3] - pPoint->e_color[i]*pPoint->e_alpha)/(pPoint->alpha*(1.0f-pPoint->e_alpha)); @@ -4635,8 +4635,8 @@ static int dynamicPaint_generateBakeData(DynamicPaintSurface *surface, Scene *sc } /* - * Make a transformed copy of canvas derived mesh vertices to avoid recalculation. - */ + * Make a transformed copy of canvas derived mesh vertices to avoid recalculation. + */ bData->mesh_bounds.valid = 0; for (index=0; indextotal_points; index++) { @@ -4655,8 +4655,8 @@ static int dynamicPaint_generateBakeData(DynamicPaintSurface *surface, Scene *sc copy_v3_v3(prev_point, bData->realCoord[bData->s_pos[index]].v); } /* - * Calculate current 3D-position and normal of each surface point - */ + * Calculate current 3D-position and normal of each surface point + */ if (surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ) { float n1[3], n2[3], n3[3]; ImgSeqFormatData *f_data = (ImgSeqFormatData*)sData->format_data; @@ -4716,7 +4716,7 @@ static int dynamicPaint_generateBakeData(DynamicPaintSurface *surface, Scene *sc } /* Prepare surface normal directional scale to easily convert - * brush intersection amount between global and local space */ + * brush intersection amount between global and local space */ if (surface->type == MOD_DPAINT_SURFACE_T_DISPLACE || surface->type == MOD_DPAINT_SURFACE_T_WAVE) { float temp_nor[3]; diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index 95f4b465beb..6581c442356 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -106,8 +106,8 @@ MultiresModifierData *find_multires_modifier_before(Scene *scene, ModifierData * } /* used for applying scale on mdisps layer and syncing subdivide levels when joining objects - use_first - return first multires modifier if all multires'es are disabled -*/ + * use_first - return first multires modifier if all multires'es are disabled + */ MultiresModifierData *get_multires_modifier(Scene *scene, Object *ob, int use_first) { ModifierData *md; @@ -128,7 +128,7 @@ MultiresModifierData *get_multires_modifier(Scene *scene, Object *ob, int use_fi if (!mmd && use_first) { /* active multires have not been found - try to use first one */ + * try to use first one */ return firstmmd; } @@ -491,7 +491,7 @@ static DerivedMesh *subsurf_dm_create_local(Object *ob, DerivedMesh *dm, int lvl /* assumes no is normalized; return value's sign is negative if v is on - the other side of the plane */ + * the other side of the plane */ static float v3_dist_from_plane(float v[3], float center[3], float no[3]) { float s[3]; @@ -572,7 +572,7 @@ void multiresModifier_base_apply(MultiresModifierData *mmd, Object *ob) float no[3]; /* set up poly, loops, and coords in order to call - mesh_calc_poly_normal_coords() */ + * mesh_calc_poly_normal_coords() */ fake_poly.totloop = p->totloop; fake_poly.loopstart = 0; fake_loops = MEM_mallocN(sizeof(MLoop) * p->totloop, "fake_loops"); @@ -813,20 +813,20 @@ static void multiresModifier_disp_run(DerivedMesh *dm, Mesh *me, DerivedMesh *dm switch(op) { case APPLY_DISPLACEMENTS: /* Convert displacement to object space - and add to grid points */ + * and add to grid points */ mul_v3_m3v3(disp, mat, data); add_v3_v3v3(co, sco, disp); break; case CALC_DISPLACEMENTS: /* Calculate displacement between new and old - grid points and convert to tangent space */ + * grid points and convert to tangent space */ sub_v3_v3v3(disp, co, sco); invert_m3(mat); mul_v3_m3v3(data, mat, disp); break; case ADD_DISPLACEMENTS: /* Convert subdivided displacements to tangent - space and add to the original displacements */ + * space and add to the original displacements */ invert_m3(mat); mul_v3_m3v3(d, mat, co); add_v3_v3(data, d); @@ -1138,7 +1138,7 @@ DerivedMesh *multires_dm_create_from_derived(MultiresModifierData *mmd, int loca } /**** Old Multires code **** -***************************/ + ***************************/ /* Adapted from sculptmode.c */ void old_mdisps_bilinear(float out[3], float (*disps)[3], const int st, float u, float v) @@ -1669,7 +1669,7 @@ static void multires_load_old_vcols(Mesh *me) return; /* older multires format never supported multiple vcol layers, - so we can assume the active vcol layer is the correct one */ + * so we can assume the active vcol layer is the correct one */ if (!(mcol = CustomData_get_layer(&me->fdata, CD_MCOL))) return; @@ -1776,9 +1776,9 @@ static void multires_sync_levels(Scene *scene, Object *ob, Object *to_ob) if (!mmd) { /* object could have MDISP even when there is no multires modifier - this could lead to troubles due to i've got no idea how mdisp could be - upsampled correct without modifier data. - just remove mdisps if no multires present (nazgul) */ + * this could lead to troubles due to i've got no idea how mdisp could be + * upsampled correct without modifier data. + * just remove mdisps if no multires present (nazgul) */ Mesh *me= (Mesh*)ob->data; diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c index 6a72933332b..b24b885c001 100644 --- a/source/blender/blenkernel/intern/seqeffects.c +++ b/source/blender/blenkernel/intern/seqeffects.c @@ -119,8 +119,8 @@ static struct ImBuf * prepare_effect_imbufs( } /* ********************************************************************** - PLUGINS - ********************************************************************** */ + * PLUGINS + * ********************************************************************** */ static void open_plugin_seq(PluginSeq *pis, const char *seqname) { @@ -288,8 +288,8 @@ static struct ImBuf * do_plugin_effect( char *cp; int float_rendering; int use_temp_bufs = 0; /* Are needed since blur.c (and maybe some other - old plugins) do very bad stuff - with imbuf-internals */ + * old plugins) do very bad stuff + * with imbuf-internals */ struct ImBuf * out = prepare_effect_imbufs(context,ibuf1, ibuf2, ibuf3); int x = context.rectx; @@ -394,8 +394,8 @@ static void free_plugin(struct Sequence * seq) } /* ********************************************************************** - ALPHA OVER - ********************************************************************** */ + * ALPHA OVER + * ********************************************************************** */ static void init_alpha_over_or_under(Sequence * seq) { @@ -558,8 +558,8 @@ static struct ImBuf * do_alphaover_effect( /* ********************************************************************** - ALPHA UNDER - ********************************************************************** */ + * ALPHA UNDER + * ********************************************************************** */ static void do_alphaunder_effect_byte( float facf0, float facf1, int x, int y, char *rect1, @@ -730,8 +730,8 @@ static struct ImBuf* do_alphaunder_effect( /* ********************************************************************** - CROSS - ********************************************************************** */ + * CROSS + * ********************************************************************** */ static void do_cross_effect_byte(float facf0, float facf1, int x, int y, char *rect1, char *rect2, @@ -855,8 +855,8 @@ static struct ImBuf* do_cross_effect( /* ********************************************************************** - GAMMA CROSS - ********************************************************************** */ + * GAMMA CROSS + * ********************************************************************** */ /* copied code from initrender.c */ static unsigned short gamtab[65536]; @@ -1124,8 +1124,8 @@ static struct ImBuf * do_gammacross_effect( /* ********************************************************************** - ADD - ********************************************************************** */ + * ADD + * ********************************************************************** */ static void do_add_effect_byte(float facf0, float facf1, int x, int y, unsigned char *rect1, unsigned char *rect2, @@ -1240,8 +1240,8 @@ static struct ImBuf * do_add_effect(SeqRenderData context, /* ********************************************************************** - SUB - ********************************************************************** */ + * SUB + * ********************************************************************** */ static void do_sub_effect_byte(float facf0, float facf1, int x, int y, @@ -1355,8 +1355,8 @@ static struct ImBuf * do_sub_effect( } /* ********************************************************************** - DROP - ********************************************************************** */ + * DROP + * ********************************************************************** */ /* Must be > 0 or add precopy, etc to the function */ #define XOFF 8 @@ -1444,8 +1444,8 @@ static void do_drop_effect_float(float facf0, float facf1, int x, int y, } /* ********************************************************************** - MUL - ********************************************************************** */ + * MUL + * ********************************************************************** */ static void do_mul_effect_byte(float facf0, float facf1, int x, int y, unsigned char *rect1, unsigned char *rect2, @@ -1464,7 +1464,7 @@ static void do_mul_effect_byte(float facf0, float facf1, int x, int y, /* formula: * fac*(a*b) + (1-fac)*a => fac*a*(b-1)+axaux= c*px + py*s ;//+centx - yaux= -s*px + c*py;//+centy + * yaux= -s*px + c*py;//+centy */ while(y--) { @@ -1569,8 +1569,8 @@ static struct ImBuf * do_mul_effect( } /* ********************************************************************** - WIPE - ********************************************************************** */ + * WIPE + * ********************************************************************** */ typedef struct WipeZone { float angle; @@ -1616,9 +1616,8 @@ static float check_zone(WipeZone *wipezone, int x, int y, Sequence *seq, float facf0) { float posx, posy,hyp,hyp2,angle,hwidth,b1,b2,b3,pointdist; -/*some future stuff -float hyp3,hyp4,b4,b5 -*/ + /* some future stuff */ + // float hyp3,hyp4,b4,b5 float temp1,temp2,temp3,temp4; //some placeholder variables int xo = wipezone->xo; int yo = wipezone->yo; @@ -1714,12 +1713,12 @@ float hyp3,hyp4,b4,b5 if(!wipe->forward)output = 1-output; break; case DO_CLOCK_WIPE: - /* - temp1: angle of effect center in rads - temp2: angle of line through (halfx,halfy) and (x,y) in rads - temp3: angle of low side of blur - temp4: angle of high side of blur - */ + /* + * temp1: angle of effect center in rads + * temp2: angle of line through (halfx,halfy) and (x,y) in rads + * temp3: angle of low side of blur + * temp4: angle of high side of blur + */ output = 1.0f - facf0; widthf = wipe->edgeWidth*2.0f*(float)M_PI; temp1 = 2.0f * (float)M_PI * facf0; @@ -2002,8 +2001,8 @@ static struct ImBuf * do_wipe_effect( return out; } /* ********************************************************************** - TRANSFORM - ********************************************************************** */ + * TRANSFORM + * ********************************************************************** */ static void init_transform_effect(Sequence *seq) { TransformVars *transform; @@ -2140,8 +2139,8 @@ static struct ImBuf * do_transform_effect( /* ********************************************************************** - GLOW - ********************************************************************** */ + * GLOW + * ********************************************************************** */ static void RVBlurBitmap2_byte ( unsigned char* map, int width,int height, float blur, @@ -2667,8 +2666,8 @@ static struct ImBuf * do_glow_effect( } /* ********************************************************************** - SOLID COLOR - ********************************************************************** */ + * SOLID COLOR + * ********************************************************************** */ static void init_solid_color(Sequence *seq) { @@ -2786,8 +2785,8 @@ static struct ImBuf * do_solid_color( } /* ********************************************************************** - MULTICAM - ********************************************************************** */ + * MULTICAM + * ********************************************************************** */ /* no effect inputs for multicam, we use give_ibuf_seq */ static int num_inputs_multicam(void) @@ -2840,8 +2839,8 @@ static struct ImBuf * do_multicam( } /* ********************************************************************** - ADJUSTMENT - ********************************************************************** */ + * ADJUSTMENT + * ********************************************************************** */ /* no effect inputs for adjustment, we use give_ibuf_seq */ static int num_inputs_adjustment(void) @@ -2871,10 +2870,10 @@ static struct ImBuf * do_adjustment_impl(SeqRenderData context, Sequence * seq, } /* found nothing? so let's work the way up the metastrip stack, so - that it is possible to group a bunch of adjustment strips into - a metastrip and have that work on everything below the metastrip - */ - + * that it is possible to group a bunch of adjustment strips into + * a metastrip and have that work on everything below the metastrip + */ + if (!i) { Sequence * meta; @@ -2917,8 +2916,8 @@ static struct ImBuf * do_adjustment( } /* ********************************************************************** - SPEED - ********************************************************************** */ + * SPEED + * ********************************************************************** */ static void init_speed_effect(Sequence *seq) { SpeedControlVars * v; @@ -3010,8 +3009,7 @@ void sequence_effect_speed_rebuild_map(Scene *scene, Sequence * seq, int force) } if ( (seq->seq1 == NULL) || (seq->len < 1) - ) { /* make coverity happy and check for (CID 598) - input strip ... */ + ) { /* make coverity happy and check for (CID 598) input strip ... */ return; } diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 4b2a2fef27f..8f8874d3a3c 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -124,8 +124,8 @@ int seq_recursive_apply(Sequence *seq, int (*apply_func)(Sequence *, void *), vo } /* ********************************************************************** - alloc / free functions - ********************************************************************** */ + * alloc / free functions + * ********************************************************************** */ @@ -281,8 +281,8 @@ void seq_free_editing(Scene *scene) } /* ********************************************************************** - * sequencer pipeline functions - ********************************************************************** */ + * sequencer pipeline functions + * ********************************************************************** */ SeqRenderData seq_new_render_data( struct Main * bmain, struct Scene * scene, @@ -456,13 +456,13 @@ void seq_end(SeqIterator *iter) } /* - ********************************************************************** - * build_seqar - ********************************************************************** - * Build a complete array of _all_ sequencies (including those - * in metastrips!) - ********************************************************************** -*/ + * ********************************************************************** + * build_seqar + * ********************************************************************* + * Build a complete array of _all_ sequencies (including those + * in metastrips!) + * ********************************************************************* + */ static void do_seq_count_cb(ListBase *seqbase, int *totseq, int (*test_func)(Sequence * seq)) @@ -1048,11 +1048,11 @@ StripElem *give_stripelem(Sequence *seq, int cfra) { StripElem *se= seq->strip->stripdata; - if(seq->type == SEQ_IMAGE) { /* only - IMAGE strips use the whole array, - MOVIE strips use only - the first element, all other strips - don't use this... */ + if(seq->type == SEQ_IMAGE) { /* only + * IMAGE strips use the whole array, + * MOVIE strips use only + * the first element, all other strips + * don't use this... */ int nr = (int) give_stripelem_index(seq, cfra); if (nr == -1 || se == NULL) return NULL; @@ -1137,8 +1137,8 @@ static int get_shown_sequences( ListBase * seqbasep, int cfra, int chanshown, Se /* ********************************************************************** - proxy management - ********************************************************************** */ + * proxy management + * ********************************************************************** */ typedef struct SeqIndexBuildContext { struct IndexBuildContext *index_context; @@ -1214,12 +1214,12 @@ static int seq_proxy_get_fname(Sequence * seq, int cfra, int render_size, char * } /* MOVIE tracks (only exception: custom files) are now handled - internally by ImBuf module for various reasons: proper time code - support, quicker index build, using one file instead - of a full directory of jpeg files, etc. Trying to support old - and new method at once could lead to funny effects, if people - have both, a directory full of jpeg files and proxy avis, so - sorry folks, please rebuild your proxies... */ + * internally by ImBuf module for various reasons: proper time code + * support, quicker index build, using one file instead + * of a full directory of jpeg files, etc. Trying to support old + * and new method at once could lead to funny effects, if people + * have both, a directory full of jpeg files and proxy avis, so + * sorry folks, please rebuild your proxies... */ if (seq->flag & (SEQ_USE_PROXY_CUSTOM_DIR|SEQ_USE_PROXY_CUSTOM_FILE)) { BLI_strncpy(dir, seq->strip->proxy->dir, sizeof(dir)); @@ -1339,7 +1339,7 @@ static void seq_proxy_build_frame(SeqRenderData context, } /* depth = 32 is intentionally left in, otherwise ALPHA channels - won't work... */ + * won't work... */ quality = seq->strip->proxy->quality; ibuf->ftype= JPG | quality; @@ -1465,8 +1465,8 @@ void seq_proxy_rebuild_finish(SeqIndexBuildContext *context, short stop) } /* ********************************************************************** - color balance - ********************************************************************** */ + * color balance + * ********************************************************************** */ static StripColorBalance calc_cb(StripColorBalance * cb_) { @@ -1628,23 +1628,22 @@ static void color_balance(Sequence * seq, ImBuf* ibuf, float mul) } /* - input preprocessing for SEQ_IMAGE, SEQ_MOVIE and SEQ_SCENE - - Do all the things you can't really do afterwards using sequence effects - (read: before rescaling to render resolution has been done) - - Order is important! - - - Deinterlace - - Crop and transform in image source coordinate space - - Flip X + Flip Y (could be done afterwards, backward compatibility) - - Promote image to float data (affects pipeline operations afterwards) - - Color balance (is most efficient in the byte -> float - (future: half -> float should also work fine!) - case, if done on load, since we can use lookup tables) - - Premultiply - -*/ + * input preprocessing for SEQ_IMAGE, SEQ_MOVIE and SEQ_SCENE + * + * Do all the things you can't really do afterwards using sequence effects + * (read: before rescaling to render resolution has been done) + * + * Order is important! + * + * - Deinterlace + * - Crop and transform in image source coordinate space + * - Flip X + Flip Y (could be done afterwards, backward compatibility) + * - Promote image to float data (affects pipeline operations afterwards) + * - Color balance (is most efficient in the byte -> float + * (future: half -> float should also work fine!) + * case, if done on load, since we can use lookup tables) + * - Premultiply + */ int input_have_to_preprocess( SeqRenderData UNUSED(context), Sequence * seq, float UNUSED(cfra)) @@ -1824,8 +1823,8 @@ static void copy_to_ibuf_still(SeqRenderData context, Sequence * seq, float nr, { if (nr == 0 || nr == seq->len - 1) { /* we have to store a copy, since the passed ibuf - could be preprocessed afterwards (thereby silently - changing the cached image... */ + * could be preprocessed afterwards (thereby silently + * changing the cached image... */ ibuf = IMB_dupImBuf(ibuf); if (nr == 0) { @@ -1845,8 +1844,8 @@ static void copy_to_ibuf_still(SeqRenderData context, Sequence * seq, float nr, } /* ********************************************************************** - strip rendering functions - ********************************************************************** */ + * strip rendering functions + * ********************************************************************** */ static ImBuf* seq_render_strip_stack( SeqRenderData context, ListBase *seqbasep, float cfra, int chanshown); @@ -1964,35 +1963,35 @@ static ImBuf * seq_render_scene_strip_impl( ListBase oldmarkers; /* Old info: - Hack! This function can be called from do_render_seq(), in that case - the seq->scene can already have a Render initialized with same name, - so we have to use a default name. (compositor uses scene name to - find render). - However, when called from within the UI (image preview in sequencer) - we do want to use scene Render, that way the render result is defined - for display in render/imagewindow - - Hmm, don't see, why we can't do that all the time, - and since G.rendering is uhm, gone... (Peter) - */ + * Hack! This function can be called from do_render_seq(), in that case + * the seq->scene can already have a Render initialized with same name, + * so we have to use a default name. (compositor uses scene name to + * find render). + * However, when called from within the UI (image preview in sequencer) + * we do want to use scene Render, that way the render result is defined + * for display in render/imagewindow + * + * Hmm, don't see, why we can't do that all the time, + * and since G.rendering is uhm, gone... (Peter) + */ /* New info: - Using the same name for the renders works just fine as the do_render_seq() - render is not used while the scene strips are rendered. - - However rendering from UI (through sequencer_preview_area_draw) can crash in - very many cases since other renders (material preview, an actual render etc.) - can be started while this sequence preview render is running. The only proper - solution is to make the sequencer preview render a proper job, which can be - stopped when needed. This would also give a nice progress bar for the preview - space so that users know there's something happening. - - As a result the active scene now only uses OpenGL rendering for the sequencer - preview. This is far from nice, but is the only way to prevent crashes at this - time. - - -jahka - */ + * Using the same name for the renders works just fine as the do_render_seq() + * render is not used while the scene strips are rendered. + * + * However rendering from UI (through sequencer_preview_area_draw) can crash in + * very many cases since other renders (material preview, an actual render etc.) + * can be started while this sequence preview render is running. The only proper + * solution is to make the sequencer preview render a proper job, which can be + * stopped when needed. This would also give a nice progress bar for the preview + * space so that users know there's something happening. + * + * As a result the active scene now only uses OpenGL rendering for the sequencer + * preview. This is far from nice, but is the only way to prevent crashes at this + * time. + * + * -jahka + */ int rendering = G.rendering; int doseq; @@ -2120,7 +2119,7 @@ static ImBuf * seq_render_strip(SeqRenderData context, Sequence * seq, float cfr ibuf = seq_stripelem_cache_get(context, seq, cfra, SEQ_STRIPELEM_IBUF); /* currently, we cache preprocessed images in SEQ_STRIPELEM_IBUF, - but not(!) on SEQ_STRIPELEM_IBUF_ENDSTILL and ..._STARTSTILL */ + * but not(!) on SEQ_STRIPELEM_IBUF_ENDSTILL and ..._STARTSTILL */ if (ibuf) use_preprocess = FALSE; @@ -2263,15 +2262,15 @@ static ImBuf * seq_render_strip(SeqRenderData context, Sequence * seq, float cfr } /* ********************************************************************** - strip stack rendering functions - ********************************************************************** */ + * strip stack rendering functions + * ********************************************************************** */ static int seq_must_swap_input_in_blend_mode(Sequence * seq) { int swap_input = FALSE; /* bad hack, to fix crazy input ordering of - those two effects */ + * those two effects */ if (ELEM3(seq->blend_mode, SEQ_ALPHAOVER, SEQ_ALPHAUNDER, SEQ_OVERDROP)) { swap_input = TRUE; @@ -2808,13 +2807,13 @@ void free_imbuf_seq(Scene *scene, ListBase * seqbase, int check_mem_usage, if (check_mem_usage) { /* Let the cache limitor take care of this (schlaile) */ /* While render let's keep all memory available for render - (ton) - At least if free memory is tight... - This can make a big difference in encoding speed - (it is around 4 times(!) faster, if we do not waste time - on freeing _all_ buffers every time on long timelines...) - (schlaile) - */ + * (ton) + * At least if free memory is tight... + * This can make a big difference in encoding speed + * (it is around 4 times(!) faster, if we do not waste time + * on freeing _all_ buffers every time on long timelines...) + * (schlaile) + */ uintptr_t mem_in_use; uintptr_t mmap_in_use; @@ -2905,11 +2904,11 @@ void update_changed_seq_and_deps(Scene *scene, Sequence *changed_seq, int len_ch } /* seq funcs's for transforming internally - notice the difference between start/end and left/right. - - left and right are the bounds at which the sequence is rendered, -start and end are from the start and fixed length of the sequence. -*/ + * notice the difference between start/end and left/right. + * + * left and right are the bounds at which the sequence is rendered, + * start and end are from the start and fixed length of the sequence. + */ int seq_tx_get_start(Sequence *seq) { return seq->start; @@ -2962,7 +2961,7 @@ void seq_tx_set_final_right(Sequence *seq, int val) } /* used so we can do a quick check for single image seq - since they work a bit differently to normal image seq's (during transform) */ + * since they work a bit differently to normal image seq's (during transform) */ int seq_single_check(Sequence *seq) { return (seq->len==1 && ( diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 664c9389edb..b0075f5c121 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -3800,18 +3800,18 @@ static void softbody_update_positions(Object *ob, SoftBody *sb, float (*vertexCo /* void SB_estimate_transform */ /* input Object *ob out (says any object that can do SB like mesh,lattice,curve ) - output float lloc[3],float lrot[3][3],float lscale[3][3] - that is: - a precise position vector denoting the motion of the center of mass - give a rotation/scale matrix using averaging method, that's why estimate and not calculate - see: this is kind of reverse engeneering: having to states of a point cloud and recover what happend - our advantage here we know the identity of the vertex - there are others methods giving other results. - lloc,lrot,lscale are allowed to be NULL, just in case you don't need it. - should be pretty useful for pythoneers :) - not! velocity .. 2nd order stuff - vcloud_estimate_transform see - */ + * output float lloc[3],float lrot[3][3],float lscale[3][3] + * that is: + * a precise position vector denoting the motion of the center of mass + * give a rotation/scale matrix using averaging method, that's why estimate and not calculate + * see: this is kind of reverse engeneering: having to states of a point cloud and recover what happend + * our advantage here we know the identity of the vertex + * there are others methods giving other results. + * lloc,lrot,lscale are allowed to be NULL, just in case you don't need it. + * should be pretty useful for pythoneers :) + * not! velocity .. 2nd order stuff + * vcloud_estimate_transform see + */ void SB_estimate_transform(Object *ob,float lloc[3],float lrot[3][3],float lscale[3][3]) { diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 6cd900c9ed2..3f382cc5543 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -65,68 +65,67 @@ #include "BPY_extern.h" #endif -/***************/ /* - -How Texts should work --- -A text should relate to a file as follows - -(Text *)->name should be the place where the - file will or has been saved. - -(Text *)->flags has the following bits - TXT_ISDIRTY - should always be set if the file in mem. differs from - the file on disk, or if there is no file on disk. - TXT_ISMEM - should always be set if the Text has not been mapped to - a file, in which case (Text *)->name may be NULL or garbage. - TXT_ISEXT - should always be set if the Text is not to be written into - the .blend - TXT_ISSCRIPT - should be set if the user has designated the text - as a script. (NEW: this was unused, but now it is needed by - space handler script links (see header_view3d.c, for example) - -->>> see also: /makesdna/DNA_text_types.h - -Display --- -The st->top determines at what line the top of the text is displayed. -If the user moves the cursor the st containing that cursor should -be popped ... other st's retain their own top location. - -Markers --- -The mrk->flags define the behavior and relationships between markers. The -upper two bytes are used to hold a group ID, the lower two are normal flags. If -TMARK_EDITALL is set the group ID defines which other markers should be edited. - -The mrk->clr field is used to visually group markers where the flags may not -match. A template system, for example, may allow editing of repeating tokens -(in one group) but include other marked positions (in another group) all in the -same template with the same color. - -Undo --- -Undo/Redo works by storing -events in a queue, and a pointer -to the current position in the -queue... - -Events are stored using an -arbitrary op-code system -to keep track of -a) the two cursors (normal and selected) -b) input (visible and control (ie backspace)) - -input data is stored as its -ASCII value, the opcodes are -then selected to not conflict. - -opcodes with data in between are -written at the beginning and end -of the data to allow undo and redo -to simply check the code at the current -undo position - -*/ /***************/ +/* + * How Texts should work + * -- + * A text should relate to a file as follows - + * (Text *)->name should be the place where the + * file will or has been saved. + * + * (Text *)->flags has the following bits + * TXT_ISDIRTY - should always be set if the file in mem. differs from + * the file on disk, or if there is no file on disk. + * TXT_ISMEM - should always be set if the Text has not been mapped to + * a file, in which case (Text *)->name may be NULL or garbage. + * TXT_ISEXT - should always be set if the Text is not to be written into + * the .blend + * TXT_ISSCRIPT - should be set if the user has designated the text + * as a script. (NEW: this was unused, but now it is needed by + * space handler script links (see header_view3d.c, for example) + * + * ->>> see also: /makesdna/DNA_text_types.h + * + * Display + * -- + * The st->top determines at what line the top of the text is displayed. + * If the user moves the cursor the st containing that cursor should + * be popped ... other st's retain their own top location. + * + * Markers + * -- + * The mrk->flags define the behavior and relationships between markers. The + * upper two bytes are used to hold a group ID, the lower two are normal flags. If + * TMARK_EDITALL is set the group ID defines which other markers should be edited. + * + * The mrk->clr field is used to visually group markers where the flags may not + * match. A template system, for example, may allow editing of repeating tokens + * (in one group) but include other marked positions (in another group) all in the + * same template with the same color. + * + * Undo + * -- + * Undo/Redo works by storing + * events in a queue, and a pointer + * to the current position in the + * queue... + * + * Events are stored using an + * arbitrary op-code system + * to keep track of + * a) the two cursors (normal and selected) + * b) input (visible and control (ie backspace)) + * + * input data is stored as its + * ASCII value, the opcodes are + * then selected to not conflict. + * + * opcodes with data in between are + * written at the beginning and end + * of the data to allow undo and redo + * to simply check the code at the current + * undo position + * + */ /***/ diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h index 26e8e8afeb7..06de3ff05fc 100644 --- a/source/blender/blenlib/BLI_utildefines.h +++ b/source/blender/blenlib/BLI_utildefines.h @@ -263,7 +263,7 @@ /* BLI_assert(), default only to print * for aborting need to define WITH_ASSERT_ABORT */ -#if !defined NDEBUG +#ifndef NDEBUG # ifdef WITH_ASSERT_ABORT # define _BLI_DUMMY_ABORT abort # else diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt index d69ecbe325b..ddcc344e939 100644 --- a/source/blender/blenlib/CMakeLists.txt +++ b/source/blender/blenlib/CMakeLists.txt @@ -143,7 +143,6 @@ set(SRC BLI_voxel.h BLI_winstuff.h PIL_time.h - intern/dynamiclist.h ) if(WITH_BINRELOC) diff --git a/source/blender/blenlib/intern/dynamiclist.h b/source/blender/blenlib/intern/dynamiclist.h deleted file mode 100644 index 64c4a8fd61a..00000000000 --- a/source/blender/blenlib/intern/dynamiclist.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Contributor(s): Jiri Hnidek. - * - * Documentation of Two way dynamic list with access array can be found at: - * - * http://wiki.blender.org/bin/view.pl/Blenderwiki/DynamicListWithAccessArray - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/blenlib/intern/dynamiclist.h - * \ingroup bli - */ - - -#ifndef __DYNAMICLIST_H__ -#define __DYNAMICLIST_H__ - -#define PAGE_SIZE 4 - -struct ListBase; - -/* - * Access array using realloc - */ -typedef struct DynamicArray{ - unsigned int count; /* count of items in list */ - unsigned int max_item_index; /* max available index */ - unsigned int last_item_index; /* max used index */ - void **items; /* dynamicaly allocated array of pointers - pointing at items in list */ -} DynamicArray; - -/* - * Two way dynamic list with access array - */ -typedef struct DynamicList { - struct DynamicArray da; /* access array */ - struct ListBase lb; /* two way linked dynamic list */ -} DynamicList; - -#endif diff --git a/source/blender/blenlib/intern/pbvh.c b/source/blender/blenlib/intern/pbvh.c index d0dc51d1a8a..dcf03590808 100644 --- a/source/blender/blenlib/intern/pbvh.c +++ b/source/blender/blenlib/intern/pbvh.c @@ -476,7 +476,7 @@ static void build_leaf(PBVH *bvh, int node_index, BBC *prim_bbc, } /* Return zero if all primitives in the node can be drawn with the - same material (including flat/smooth shading), non-zerootherwise */ + * same material (including flat/smooth shading), non-zerootherwise */ int leaf_needs_material_split(PBVH *bvh, int offset, int count) { int i, prim; diff --git a/source/blender/blenlib/intern/string_cursor_utf8.c b/source/blender/blenlib/intern/string_cursor_utf8.c index 08440b0e12b..56998cfd927 100644 --- a/source/blender/blenlib/intern/string_cursor_utf8.c +++ b/source/blender/blenlib/intern/string_cursor_utf8.c @@ -25,8 +25,8 @@ */ /** \file blender/blenlib/intern/string_cursor_utf8.c - * \ingroup bli - */ + * \ingroup bli + */ #include #include diff --git a/source/blender/blenpluginapi/iff.h b/source/blender/blenpluginapi/iff.h index cf235c2f0ca..450dfc7f8d1 100644 --- a/source/blender/blenpluginapi/iff.h +++ b/source/blender/blenpluginapi/iff.h @@ -57,9 +57,9 @@ typedef struct ImBuf { unsigned int encodedsize; /**< Size of data written to encodedbuffer */ unsigned int encodedbuffersize; /**< Size of encodedbuffer */ - float *rect_float; /**< floating point Rect equivalent - Linear RGB color space - may need gamma correction to - sRGB when generating 8bit representations */ + float *rect_float; /** < floating point Rect equivalent + * Linear RGB color space - may need gamma correction to + * sRGB when generating 8bit representations */ int channels; /**< amount of channels in rect_float (0 = 4 channel default) */ float dither; /**< random dither value, for conversion from float -> byte rect */ short profile; /** color space/profile preset that the byte rect buffer represents */ diff --git a/source/blender/blenpluginapi/intern/pluginapi.c b/source/blender/blenpluginapi/intern/pluginapi.c index b6bd15fd1c3..aac20a96f08 100644 --- a/source/blender/blenpluginapi/intern/pluginapi.c +++ b/source/blender/blenpluginapi/intern/pluginapi.c @@ -42,7 +42,7 @@ */ #define PLUGIN_INTERN /* This tells the LIBEXPORT macro to compile with - dll export set on windows */ + * dll export set on windows */ #ifdef WIN32 #include "blenpluginapi/util.h" diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h index ed4e231edea..02953f84a22 100644 --- a/source/blender/bmesh/bmesh_class.h +++ b/source/blender/bmesh/bmesh_class.h @@ -217,7 +217,7 @@ enum { BM_ELEM_HIDDEN = (1 << 1), BM_ELEM_SEAM = (1 << 2), BM_ELEM_SMOOTH = (1 << 3), /* used for faces and edges, note from the user POV, - * this is a sharp edge when disabled */ + * this is a sharp edge when disabled */ BM_ELEM_TAG = (1 << 4), /* internal flag, used for ensuring correct normals * during multires interpolation, and any other time diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index 49a4df0fc9c..e3993b42f3f 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -103,16 +103,16 @@ static void compute_poly_normal(float normal[3], float (*verts)[3], int nverts) } #endif /* newell's method - - so thats?: - (a[1] - b[1]) * (a[2] + b[2]); - a[1] * b[2] - b[1] * a[2] - b[1] * b[2] + a[1] * a[2] - - odd. half of that is the cross product. . .what's the - other half? - - also could be like a[1] * (b[2] + a[2]) - b[1] * (a[2] - b[2]) - */ + * + * so thats?: + * (a[1] - b[1]) * (a[2] + b[2]); + * a[1] * b[2] - b[1] * a[2] - b[1] * b[2] + a[1] * a[2] + * + * odd. half of that is the cross product. . .what's the + * other half? + * + * also could be like a[1] * (b[2] + a[2]) - b[1] * (a[2] - b[2]) + */ n[0] += (u[1] - v[1]) * (u[2] + v[2]); n[1] += (u[2] - v[2]) * (u[0] + v[0]); @@ -126,12 +126,12 @@ static void compute_poly_normal(float normal[3], float (*verts)[3], int nverts) #if 0 l = len_v3(n); /* fast square root, newton/babylonian method: - l2 = l * 0.1; - - l2 = (l / l2 + l2) * 0.5; - l2 = (l / l2 + l2) * 0.5; - l2 = (l / l2 + l2) * 0.5; - */ + * l2 = l * 0.1; + * + * l2 = (l / l2 + l2) * 0.5; + * l2 = (l / l2 + l2) * 0.5; + * l2 = (l / l2 + l2) * 0.5; + */ if (l == 0.0) { normal[0] = 0.0f; diff --git a/source/blender/collada/collada_internal.cpp b/source/blender/collada/collada_internal.cpp index 5d0e8d957b3..d7263e07eb8 100644 --- a/source/blender/collada/collada_internal.cpp +++ b/source/blender/collada/collada_internal.cpp @@ -111,14 +111,14 @@ void TransformBase::decompose(float mat[][4], float *loc, float eul[3], float qu } /** -Translation map. -Used to translate every COLLADA id to a valid id, no matter what "wrong" letters may be -included. Look at the IDREF XSD declaration for more. -Follows strictly the COLLADA XSD declaration which explicitly allows non-english chars, -like special chars (e.g. micro sign), umlauts and so on. -The COLLADA spec also allows additional chars for member access ('.'), these -must obviously be removed too, otherwise they would be heavily misinterpreted. -*/ + * Translation map. + * Used to translate every COLLADA id to a valid id, no matter what "wrong" letters may be + * included. Look at the IDREF XSD declaration for more. + * Follows strictly the COLLADA XSD declaration which explicitly allows non-english chars, + * like special chars (e.g. micro sign), umlauts and so on. + * The COLLADA spec also allows additional chars for member access ('.'), these + * must obviously be removed too, otherwise they would be heavily misinterpreted. + */ const unsigned char translate_start_name_map[256] = { 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, diff --git a/source/blender/editors/mesh/knifetool.c b/source/blender/editors/mesh/knifetool.c index 0c9dd8fc699..e1380e6f1e1 100644 --- a/source/blender/editors/mesh/knifetool.c +++ b/source/blender/editors/mesh/knifetool.c @@ -2411,7 +2411,7 @@ static void knife_make_face_cuts(knifetool_opdata *kcd, BMFace *f, ListBase *kfe if (find_hole_chains(kcd, hole, f, &chain, &sidechain)) { /* chain goes across f and sidechain comes back * from the second last vertex to the second vertex. - */ + */ knife_make_chain_cut(kcd, f, chain, &fnew); kfe = ((Ref *)sidechain->first)->ref; if (knife_edge_in_face(kcd, kfe, f)) { diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 476f037c191..6288f39367e 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1743,7 +1743,7 @@ void ED_screen_animation_timer(bContext *C, int redraws, int refresh, int sync, sad->ar= CTX_wm_region(C); /* if startframe is larger than current frame, we put currentframe on startframe. - note: first frame then is not drawn! (ton) */ + * note: first frame then is not drawn! (ton) */ if(scene->r.sfra > scene->r.cfra) { sad->sfra= scene->r.cfra; scene->r.cfra= scene->r.sfra; diff --git a/source/blender/gpu/GPU_buffers.h b/source/blender/gpu/GPU_buffers.h index 9aa9b6fe857..09314351078 100644 --- a/source/blender/gpu/GPU_buffers.h +++ b/source/blender/gpu/GPU_buffers.h @@ -62,20 +62,20 @@ typedef struct GPUBufferMaterial { } GPUBufferMaterial; /* meshes are split up by material since changing materials requires - GL state changes that can't occur in the middle of drawing an - array. - - some simplifying assumptions are made: - * all quads are treated as two triangles. - * no vertex sharing is used; each triangle gets its own copy of the - vertices it uses (this makes it easy to deal with a vertex used - by faces with different properties, such as smooth/solid shading, - different MCols, etc.) - - to avoid confusion between the original MVert vertices and the - arrays of OpenGL vertices, the latter are referred to here and in - the source as `points'. similarly, the OpenGL triangles generated - for MFaces are referred to as triangles rather than faces. + * GL state changes that can't occur in the middle of drawing an + * array. + * + * some simplifying assumptions are made: + * - all quads are treated as two triangles. + * - no vertex sharing is used; each triangle gets its own copy of the + * vertices it uses (this makes it easy to deal with a vertex used + * by faces with different properties, such as smooth/solid shading, + * different MCols, etc.) + * + * to avoid confusion between the original MVert vertices and the + * arrays of OpenGL vertices, the latter are referred to here and in + * the source as `points'. similarly, the OpenGL triangles generated + * for MFaces are referred to as triangles rather than faces. */ typedef struct GPUDrawObject { GPUBuffer *points; @@ -107,7 +107,7 @@ typedef struct GPUDrawObject { int totedge; /* if there was a failure allocating some buffer, use old - rendering code */ + * rendering code */ int legacy; } GPUDrawObject; diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h index 5ec373802a3..5f541e2e8e6 100644 --- a/source/blender/gpu/GPU_extensions.h +++ b/source/blender/gpu/GPU_extensions.h @@ -92,18 +92,18 @@ typedef enum GPUDriverType { int GPU_type_matches(GPUDeviceType device, GPUOSType os, GPUDriverType driver); /* GPU Texture - - always returns unsigned char RGBA textures - - if texture with non square dimensions is created, depending on the - graphics card capabilities the texture may actually be stored in a - larger texture with power of two dimensions. the actual dimensions - may be queried with GPU_texture_opengl_width/height. GPU_texture_coord_2f - calls glTexCoord2f with the coordinates adjusted for this. - - can use reference counting: - - reference counter after GPU_texture_create is 1 - - GPU_texture_ref increases by one - - GPU_texture_free decreases by one, and frees if 0 - - if created with from_blender, will not free the texture -*/ + * - always returns unsigned char RGBA textures + * - if texture with non square dimensions is created, depending on the + * graphics card capabilities the texture may actually be stored in a + * larger texture with power of two dimensions. the actual dimensions + * may be queried with GPU_texture_opengl_width/height. GPU_texture_coord_2f + * calls glTexCoord2f with the coordinates adjusted for this. + * - can use reference counting: + * - reference counter after GPU_texture_create is 1 + * - GPU_texture_ref increases by one + * - GPU_texture_free decreases by one, and frees if 0 + * - if created with from_blender, will not free the texture + */ GPUTexture *GPU_texture_create_1D(int w, float *pixels, char err_out[256]); GPUTexture *GPU_texture_create_2D(int w, int h, float *pixels, char err_out[256]); @@ -126,11 +126,11 @@ int GPU_texture_opengl_height(GPUTexture *tex); int GPU_texture_opengl_bindcode(GPUTexture *tex); /* GPU Framebuffer - - this is a wrapper for an OpenGL framebuffer object (FBO). in practice - multiple FBO's may be created, to get around limitations on the number - of attached textures and the dimension requirements. - - after any of the GPU_framebuffer_* functions, GPU_framebuffer_restore must - be called before rendering to the window framebuffer again */ + * - this is a wrapper for an OpenGL framebuffer object (FBO). in practice + * multiple FBO's may be created, to get around limitations on the number + * of attached textures and the dimension requirements. + * - after any of the GPU_framebuffer_* functions, GPU_framebuffer_restore must + * be called before rendering to the window framebuffer again */ GPUFrameBuffer *GPU_framebuffer_create(void); int GPU_framebuffer_texture_attach(GPUFrameBuffer *fb, GPUTexture *tex, char err_out[256]); @@ -142,8 +142,8 @@ void GPU_framebuffer_free(GPUFrameBuffer *fb); void GPU_framebuffer_restore(void); /* GPU OffScreen - - wrapper around framebuffer and texture for simple offscreen drawing - - changes size if graphics card can't support it */ + * - wrapper around framebuffer and texture for simple offscreen drawing + * - changes size if graphics card can't support it */ GPUOffScreen *GPU_offscreen_create(int width, int height, char err_out[256]); void GPU_offscreen_free(GPUOffScreen *ofs); @@ -152,8 +152,8 @@ void GPU_offscreen_unbind(GPUOffScreen *ofs); void GPU_offscreen_read_pixels(GPUOffScreen *ofs, int type, void *pixels); /* GPU Shader - - only for fragment shaders now - - must call texture bind before setting a texture as uniform! */ + * - only for fragment shaders now + * - must call texture bind before setting a texture as uniform! */ GPUShader *GPU_shader_create(const char *vertexcode, const char *fragcode, const char *libcode); /*GPUShader *lib);*/ /*GPUShader *GPU_shader_create_lib(const char *code);*/ diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c index f6db4f6e735..07d7568ab95 100644 --- a/source/blender/gpu/intern/gpu_codegen.c +++ b/source/blender/gpu/intern/gpu_codegen.c @@ -72,8 +72,8 @@ static const char* GPU_DATATYPE_STR[17] = {"", "float", "vec2", "vec3", "vec4", * These are stored in a hash for lookup when creating a material. */ static GHash *FUNCTION_HASH= NULL; -/*static char *FUNCTION_PROTOTYPES= NULL; -static GPUShader *FUNCTION_LIB= NULL;*/ +/* static char *FUNCTION_PROTOTYPES= NULL; + * static GPUShader *FUNCTION_LIB= NULL;*/ static int gpu_str_prefix(const char *str, const char *prefix) { diff --git a/source/blender/gpu/intern/gpu_codegen.h b/source/blender/gpu/intern/gpu_codegen.h index 85bf65232c1..db334b8bf19 100644 --- a/source/blender/gpu/intern/gpu_codegen.h +++ b/source/blender/gpu/intern/gpu_codegen.h @@ -61,10 +61,10 @@ typedef struct GPUFunction { GPUFunction *GPU_lookup_function(const char *name); /* Pass Generation - - Takes a list of nodes and a desired output, and makes a pass. This - will take ownership of the nodes and free them early if unused or - at the end if used. -*/ + * - Takes a list of nodes and a desired output, and makes a pass. This + * will take ownership of the nodes and free them early if unused or + * at the end if used. + */ typedef enum GPUDataSource { GPU_SOURCE_VEC_UNIFORM, diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index 526f293d0b9..a5d6c374a42 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -193,9 +193,11 @@ static int is_pow2_limit(int num) { /* take texture clamping into account */ - /* XXX: texturepaint not global! + /* XXX: texturepaint not global! */ +#if 0 if (G.f & G_TEXTUREPAINT) return 1;*/ +#endif if (U.glreslimit != 0 && num > U.glreslimit) return 0; @@ -205,10 +207,12 @@ static int is_pow2_limit(int num) static int smaller_pow2_limit(int num) { - /* XXX: texturepaint not global! + /* XXX: texturepaint not global! */ +#if 0 if (G.f & G_TEXTUREPAINT) return 1;*/ - +#endif + /* take texture clamping into account */ if (U.glreslimit != 0 && num > U.glreslimit) return U.glreslimit; @@ -467,7 +471,7 @@ int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int if(ibuf->rect_float) { if(U.use_16bit_textures) { /* use high precision textures. This is relatively harmless because OpenGL gives us - a high precision format only if it is available */ + * a high precision format only if it is available */ use_high_bit_depth = TRUE; } @@ -593,7 +597,7 @@ int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int } /* scale if not a power of two. this is not strictly necessary for newer - GPUs (OpenGL version >= 2.0) since they support non-power-of-two-textures */ + * GPUs (OpenGL version >= 2.0) since they support non-power-of-two-textures */ if (!is_pow2_limit(rectw) || !is_pow2_limit(recth)) { rectw= smaller_pow2_limit(rectw); recth= smaller_pow2_limit(recth); @@ -714,9 +718,9 @@ int GPU_set_tpage(MTFace *tface, int mipmap, int alphablend) } /* these two functions are called on entering and exiting texture paint mode, - temporary disabling/enabling mipmapping on all images for quick texture - updates with glTexSubImage2D. images that didn't change don't have to be - re-uploaded to OpenGL */ + * temporary disabling/enabling mipmapping on all images for quick texture + * updates with glTexSubImage2D. images that didn't change don't have to be + * re-uploaded to OpenGL */ void GPU_paint_set_mipmap(int mipmap) { Image* ima; @@ -1086,10 +1090,10 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O GMS.gviewinv= rv3d->viewinv; /* alpha pass setup. there's various cases to handle here: - * object transparency on: only solid materials draw in the first pass, - and only transparent in the second 'alpha' pass. - * object transparency off: for glsl we draw both in a single pass, and - for solid we don't use transparency at all. */ + * - object transparency on: only solid materials draw in the first pass, + * and only transparent in the second 'alpha' pass. + * - object transparency off: for glsl we draw both in a single pass, and + * for solid we don't use transparency at all. */ GMS.use_alpha_pass = (do_alpha_after != NULL); GMS.is_alpha_pass = (v3d && v3d->transp); if(GMS.use_alpha_pass) @@ -1236,7 +1240,7 @@ int GPU_enable_material(int nr, void *attribs) GMS.gboundmat= mat; /* for glsl use alpha blend mode, unless it's set to solid and - we are already drawing in an alpha pass */ + * we are already drawing in an alpha pass */ if(mat->game.alpha_blend != GPU_BLEND_SOLID) alphablend= mat->game.alpha_blend; @@ -1525,8 +1529,8 @@ void GPU_state_init(void) glDisable(GL_CULL_FACE); /* calling this makes drawing very slow when AA is not set up in ghost - on Linux/NVIDIA. - glDisable(GL_MULTISAMPLE); */ + * on Linux/NVIDIA. */ + // glDisable(GL_MULTISAMPLE); } /* debugging aid */ diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index ea47e67c1e6..e1d6f64f661 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -56,14 +56,14 @@ /* Extensions support */ /* extensions used: - - texture border clamp: 1.3 core - - fragement shader: 2.0 core - - framebuffer object: ext specification - - multitexture 1.3 core - - arb non power of two: 2.0 core - - pixel buffer objects? 2.1 core - - arb draw buffers? 2.0 core -*/ + * - texture border clamp: 1.3 core + * - fragement shader: 2.0 core + * - framebuffer object: ext specification + * - multitexture 1.3 core + * - arb non power of two: 2.0 core + * - pixel buffer objects? 2.1 core + * - arb draw buffers? 2.0 core + */ static struct GPUGlobal { GLint maxtextures; @@ -850,7 +850,7 @@ struct GPUOffScreen { GPUTexture *depth; /* requested width/height, may be smaller than actual texture size due - to missing non-power of two support, so we compensate for that */ + * to missing non-power of two support, so we compensate for that */ int w, h; }; @@ -1021,8 +1021,10 @@ GPUShader *GPU_shader_create(const char *vertexcode, const char *fragcode, /*GPU } } - /*if(lib && lib->lib) - glAttachObjectARB(shader->object, lib->lib);*/ +#if 0 + if(lib && lib->lib) + glAttachObjectARB(shader->object, lib->lib); +#endif glLinkProgramARB(shader->object); glGetObjectParameterivARB(shader->object, GL_OBJECT_LINK_STATUS_ARB, &status); diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index c59af3cc7fb..89b3a7d5f3f 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -672,9 +672,10 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la i = is; GPU_link(mat, "shade_visifac", i, visifac, shi->refl, &i); - - /*if(ma->mode & MA_TANGENT_VN) - GPU_link(mat, "shade_tangent_v_spec", GPU_attribute(CD_TANGENT, ""), &vn);*/ +#if 0 + if(ma->mode & MA_TANGENT_VN) + GPU_link(mat, "shade_tangent_v_spec", GPU_attribute(CD_TANGENT, ""), &vn); +#endif /* this replaces if(i > 0.0) conditional until that is supported */ // done in shade_visifac now, GPU_link(mat, "mtex_value_clamp_positive", i, &i); @@ -1461,8 +1462,8 @@ GPUMaterial *GPU_material_from_blender(Scene *scene, Material *ma) GPU_material_construct_end(mat); /* note that even if building the shader fails in some way, we still keep - it to avoid trying to compile again and again, and simple do not use - the actual shader on drawing */ + * it to avoid trying to compile again and again, and simple do not use + * the actual shader on drawing */ link = MEM_callocN(sizeof(LinkData), "GPUMaterialLink"); link->data = mat; diff --git a/source/blender/ikplugin/intern/iksolver_plugin.c b/source/blender/ikplugin/intern/iksolver_plugin.c index 34656daaa19..7a96edeaf5f 100644 --- a/source/blender/ikplugin/intern/iksolver_plugin.c +++ b/source/blender/ikplugin/intern/iksolver_plugin.c @@ -230,7 +230,7 @@ static void where_is_ik_bone(bPoseChannel *pchan, float ik_mat[][3]) // nr = t /* called from within the core where_is_pose loop, all animsystems and constraints -were executed & assigned. Now as last we do an IK pass */ + * were executed & assigned. Now as last we do an IK pass */ static void execute_posetree(struct Scene *scene, Object *ob, PoseTree *tree) { float R_parmat[3][3], identity[3][3]; @@ -349,8 +349,8 @@ static void execute_posetree(struct Scene *scene, Object *ob, PoseTree *tree) pchan= tree->pchan[0]; if (pchan->parent) /* transform goal by parent mat, so this rotation is not part of the - segment's basis. otherwise rotation limits do not work on the - local transform of the segment itself. */ + * segment's basis. otherwise rotation limits do not work on the + * local transform of the segment itself. */ copy_m4_m4(rootmat, pchan->parent->pose_mat); else unit_m4(rootmat); @@ -539,7 +539,7 @@ void iksolver_execute_tree(struct Scene *scene, struct Object *ob, struct bPose execute_posetree(scene, ob, tree); /* 6. apply the differences to the channels, - we need to calculate the original differences first */ + * we need to calculate the original differences first */ for(a=0; atotchannel; a++) { make_dmats(tree->pchan[a]); } diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp index 42a3aace775..5385366f075 100644 --- a/source/blender/ikplugin/intern/itasc_plugin.cpp +++ b/source/blender/ikplugin/intern/itasc_plugin.cpp @@ -890,33 +890,32 @@ static int convert_channels(IK_Scene *ikscene, PoseTree *tree) flag |= IK_TRANSY; } /* - Logic to create the segments: - RX,RY,RZ = rotational joints with no length - RY(tip) = rotational joints with a fixed length arm = (0,length,0) - TY = translational joint on Y axis - F(pos) = fixed joint with an arm at position pos - Conversion rule of the above flags: - - ==> F(tip) - X ==> RX(tip) - Y ==> RY(tip) - Z ==> RZ(tip) - XY ==> RX+RY(tip) - XZ ==> RX+RZ(tip) - YZ ==> RZ+RY(tip) - XYZ ==> full spherical unless there are limits, in which case RX+RZ+RY(tip) - In case of stretch, tip=(0,0,0) and there is an additional TY joint - The frame at last of these joints represents the tail of the bone. - The head is computed by a reverse translation on Y axis of the bone length - or in case of TY joint, by the frame at previous joint. - In case of separation of bones, there is an additional F(head) joint - - Computing rest pose and length is complicated: the solver works in world space - Here is the logic: - rest position is computed only from bone->bone_mat. - bone length is computed from bone->length multiplied by the scaling factor of - the armature. Non-uniform scaling will give bad result! - - */ + * Logic to create the segments: + * RX,RY,RZ = rotational joints with no length + * RY(tip) = rotational joints with a fixed length arm = (0,length,0) + * TY = translational joint on Y axis + * F(pos) = fixed joint with an arm at position pos + * Conversion rule of the above flags: + * - ==> F(tip) + * X ==> RX(tip) + * Y ==> RY(tip) + * Z ==> RZ(tip) + * XY ==> RX+RY(tip) + * XZ ==> RX+RZ(tip) + * YZ ==> RZ+RY(tip) + * XYZ ==> full spherical unless there are limits, in which case RX+RZ+RY(tip) + * In case of stretch, tip=(0,0,0) and there is an additional TY joint + * The frame at last of these joints represents the tail of the bone. + * The head is computed by a reverse translation on Y axis of the bone length + * or in case of TY joint, by the frame at previous joint. + * In case of separation of bones, there is an additional F(head) joint + * + * Computing rest pose and length is complicated: the solver works in world space + * Here is the logic: + * rest position is computed only from bone->bone_mat. + * bone length is computed from bone->length multiplied by the scaling factor of + * the armature. Non-uniform scaling will give bad result! + */ switch (flag & (IK_XDOF|IK_YDOF|IK_ZDOF)) { default: diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index 1e0cdf10dba..a68bbb97b62 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -185,18 +185,17 @@ void IMB_rectblend(struct ImBuf *dbuf, struct ImBuf *sbuf, int destx, typedef enum IMB_Timecode_Type { IMB_TC_NONE = 0, /* don't use timecode files at all */ - IMB_TC_RECORD_RUN = 1, /* use images in the order as they are recorded - (currently, this is the only one implemented - and is a sane default) - */ + + IMB_TC_RECORD_RUN = 1, /* use images in the order as they are recorded + * (currently, this is the only one implemented + * and is a sane default) */ + IMB_TC_FREE_RUN = 2, /* use global timestamp written by recording - device (prosumer camcorders e.g. can do - that) */ - IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN = 4, - /* interpolate a global timestamp using the - record date and time written by recording - device (*every* consumer camcorder can do - that :) )*/ + * device (prosumer camcorders e.g. can do that) */ + IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN = 4, /* interpolate a global timestamp using the + * record date and time written by recording + * device (*every* consumer camcorder can do + * that :) )*/ IMB_TC_RECORD_RUN_NO_GAPS = 8, IMB_TC_MAX_SLOT = 4 } IMB_Timecode_Type; @@ -367,8 +366,8 @@ void IMB_interlace(struct ImBuf *ibuf); /* create char buffer, color corrected if necessary, for ImBufs that lack one */ void IMB_rect_from_float(struct ImBuf *ibuf); -/* create char buffer for part of the image, color corrected if necessary, - Changed part will be stored in buffer. This is expected to be used for texture painting updates */ +/* Create char buffer for part of the image, color corrected if necessary, + * Changed part will be stored in buffer. This is expected to be used for texture painting updates */ void IMB_partial_rect_from_float(struct ImBuf *ibuf, float *buffer, int x, int y, int w, int h); void IMB_float_from_rect(struct ImBuf *ibuf); void IMB_float_from_rect_simple(struct ImBuf *ibuf); /* no profile conversion */ diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h index c2b42db447d..076f518585b 100644 --- a/source/blender/imbuf/IMB_imbuf_types.h +++ b/source/blender/imbuf/IMB_imbuf_types.h @@ -84,8 +84,8 @@ typedef struct ImBuf { /* pixels */ unsigned int *rect; /* pixel values stored here */ float *rect_float; /* floating point Rect equivalent - Linear RGB color space - may need gamma correction to - sRGB when generating 8bit representations */ + * Linear RGB color space - may need gamma correction to + * sRGB when generating 8bit representations */ /* resolution - pixels per meter */ double ppm[2]; diff --git a/source/blender/imbuf/IMB_moviecache.h b/source/blender/imbuf/IMB_moviecache.h index 3fa98a04d8d..f6927d4f31d 100644 --- a/source/blender/imbuf/IMB_moviecache.h +++ b/source/blender/imbuf/IMB_moviecache.h @@ -36,8 +36,8 @@ #include "BLI_ghash.h" /* Cache system for movie data - now supports stoting ImBufs only - Supposed to provide unified cache system for movie clips, sequencer and - other movie-related areas */ + * Supposed to provide unified cache system for movie clips, sequencer and + * other movie-related areas */ struct ImBuf; struct MovieCache; diff --git a/source/blender/imbuf/intern/IMB_indexer.h b/source/blender/imbuf/intern/IMB_indexer.h index 6546840ea85..dc16b4d7e36 100644 --- a/source/blender/imbuf/intern/IMB_indexer.h +++ b/source/blender/imbuf/intern/IMB_indexer.h @@ -33,26 +33,24 @@ #include #include "BKE_utildefines.h" #include "IMB_anim.h" - /* - separate animation index files to solve the following problems: - - a) different timecodes within one file (like DTS/PTS, Timecode-Track, - "implicit" timecodes within DV-files and HDV-files etc.) - b) seeking difficulties within ffmpeg for files with timestamp holes - c) broken files that miss several frames / have varying framerates - d) use proxies accordingly - - ... we need index files, that provide us with - - the binary(!) position, where we have to seek into the file *and* - the continuous frame number (ignoring the holes) starting from the - beginning of the file, so that we know, which proxy frame to serve. - - This index has to be only built once for a file and is written into - the BL_proxy directory structure for later reuse in different blender files. - -*/ + * separate animation index files to solve the following problems: + * + * a) different timecodes within one file (like DTS/PTS, Timecode-Track, + * "implicit" timecodes within DV-files and HDV-files etc.) + * b) seeking difficulties within ffmpeg for files with timestamp holes + * c) broken files that miss several frames / have varying framerates + * d) use proxies accordingly + * + * ... we need index files, that provide us with + * + * the binary(!) position, where we have to seek into the file *and* + * the continuous frame number (ignoring the holes) starting from the + * beginning of the file, so that we know, which proxy frame to serve. + * + * This index has to be only built once for a file and is written into + * the BL_proxy directory structure for later reuse in different blender files. + */ typedef struct anim_index_entry { int frameno; diff --git a/source/blender/imbuf/intern/IMB_metadata.h b/source/blender/imbuf/intern/IMB_metadata.h index 8211896b185..336a5f95082 100644 --- a/source/blender/imbuf/intern/IMB_metadata.h +++ b/source/blender/imbuf/intern/IMB_metadata.h @@ -42,13 +42,13 @@ typedef struct ImMetaData { int len; } ImMetaData; -/** The metadata is a list of key/value pairs (both char*) that can me - saved in the header of several image formats. - Apart from some common keys like - 'Software' and 'Description' (png standard) we'll use keys within the - Blender namespace, so should be called 'Blender::StampInfo' or 'Blender::FrameNum' - etc... -*/ +/** The metadata is a list of key/value pairs (both char*) that can me + * saved in the header of several image formats. + * Apart from some common keys like + * 'Software' and 'Description' (png standard) we'll use keys within the + * Blender namespace, so should be called 'Blender::StampInfo' or 'Blender::FrameNum' + * etc... + */ /* free blender ImMetaData struct */ @@ -58,7 +58,7 @@ void IMB_metadata_free(struct ImBuf* img); * \param img - the ImBuf that contains the image data * \param key - the key of the field * \param value - the data in the field, first one found with key is returned, - memory has to be allocated by user. + * memory has to be allocated by user. * \param len - length of value buffer allocated by user. * \return - 1 (true) if ImageInfo present and value for the key found, 0 (false) otherwise */ diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c index 8722ca8e90a..2719f2e296b 100644 --- a/source/blender/imbuf/intern/anim_movie.c +++ b/source/blender/imbuf/intern/anim_movie.c @@ -61,7 +61,7 @@ #endif #include "BLI_blenlib.h" /* BLI_remlink BLI_filesize BLI_addtail - BLI_countlist BLI_stringdec */ + * BLI_countlist BLI_stringdec */ #include "BLI_utildefines.h" #include "BLI_math_base.h" @@ -603,10 +603,10 @@ static int startffmpeg(struct anim * anim) } /* postprocess the image in anim->pFrame and do color conversion - and deinterlacing stuff. - - Output is anim->last_frame -*/ + * and deinterlacing stuff. + * + * Output is anim->last_frame + */ static void ffmpeg_postprocess(struct anim * anim) { @@ -621,7 +621,7 @@ static void ffmpeg_postprocess(struct anim * anim) } /* This means the data wasnt read properly, - this check stops crashing */ + * this check stops crashing */ if (input->data[0]==0 && input->data[1]==0 && input->data[2]==0 && input->data[3]==0){ fprintf(stderr, "ffmpeg_fetchibuf: " diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c index 77fc6bdf856..1b6184c8b58 100644 --- a/source/blender/imbuf/intern/bmp.c +++ b/source/blender/imbuf/intern/bmp.c @@ -40,9 +40,9 @@ #include "IMB_filetype.h" /* some code copied from article on microsoft.com, copied - here for enhanced BMP support in the future - http://www.microsoft.com/msj/defaultframe.asp?page=/msj/0197/mfcp1/mfcp1.htm&nav=/msj/0197/newnav.htm -*/ + * here for enhanced BMP support in the future + * http://www.microsoft.com/msj/defaultframe.asp?page=/msj/0197/mfcp1/mfcp1.htm&nav=/msj/0197/newnav.htm + */ typedef struct BMPINFOHEADER{ unsigned int biSize; @@ -129,10 +129,13 @@ struct ImBuf *imb_bmp_decode(unsigned char *mem, size_t size, int flags) y = LITTLE_LONG(bmi.biHeight); depth = LITTLE_SHORT(bmi.biBitCount); - /* printf("skip: %d, x: %d y: %d, depth: %d (%x)\n", skip, x, y, - depth, bmi.biBitCount); */ - /* printf("skip: %d, x: %d y: %d, depth: %d (%x)\n", skip, x, y, - depth, bmi.biBitCount); */ +#if 0 + printf("skip: %d, x: %d y: %d, depth: %d (%x)\n", skip, x, y, + depth, bmi.biBitCount); + printf("skip: %d, x: %d y: %d, depth: %d (%x)\n", skip, x, y, + depth, bmi.biBitCount); +#endif + if (flags & IB_test) { ibuf = IMB_allocImBuf(x, y, depth, 0); } else { diff --git a/source/blender/imbuf/intern/cache.c b/source/blender/imbuf/intern/cache.c index 7213979b500..3bac570da4e 100644 --- a/source/blender/imbuf/intern/cache.c +++ b/source/blender/imbuf/intern/cache.c @@ -40,13 +40,13 @@ #include "imbuf.h" /* We use a two level cache here. A per-thread cache with limited number of - tiles. This can be accessed without locking and so is hoped to lead to most - tile access being lock-free. The global cache is shared between all threads - and requires slow locking to access, and contains all tiles. - - The per-thread cache should be big enough that one might hope to not fall - back to the global cache every pixel, but not to big to keep too many tiles - locked and using memory. */ + * tiles. This can be accessed without locking and so is hoped to lead to most + * tile access being lock-free. The global cache is shared between all threads + * and requires slow locking to access, and contains all tiles. + * + * The per-thread cache should be big enough that one might hope to not fall + * back to the global cache every pixel, but not to big to keep too many tiles + * locked and using memory. */ #define IB_THREAD_CACHE_SIZE 100 @@ -207,7 +207,7 @@ void imb_tile_cache_init(void) BLI_mutex_init(&GLOBAL_CACHE.mutex); /* initialize for one thread, for places that access textures - outside of rendering (displace modifier, painting, ..) */ + * outside of rendering (displace modifier, painting, ..) */ IMB_tile_cache_params(0, 0); GLOBAL_CACHE.initialized = 1; @@ -286,8 +286,8 @@ static ImGlobalTile *imb_global_cache_get_tile(ImBuf *ibuf, int tx, int ty, ImGl if(gtile) { /* found tile. however it may be in the process of being loaded - by another thread, in that case we do stupid busy loop waiting - for the other thread to load the tile */ + * by another thread, in that case we do stupid busy loop waiting + * for the other thread to load the tile */ gtile->refcount++; BLI_mutex_unlock(&GLOBAL_CACHE.mutex); @@ -428,7 +428,7 @@ void IMB_tiles_to_rect(ImBuf *ibuf) for(ty=0; tyytiles; ty++) { for(tx=0; txxtiles; tx++) { /* acquire tile through cache, this assumes cache is initialized, - which it is always now but it's a weak assumption ... */ + * which it is always now but it's a weak assumption ... */ gtile= imb_global_cache_get_tile(mipbuf, tx, ty, NULL); /* setup pointers */ diff --git a/source/blender/imbuf/intern/cineon/logmemfile.c b/source/blender/imbuf/intern/cineon/logmemfile.c index d3a32774efd..289dd0357a4 100644 --- a/source/blender/imbuf/intern/cineon/logmemfile.c +++ b/source/blender/imbuf/intern/cineon/logmemfile.c @@ -68,8 +68,8 @@ int logimage_fread(void *buffer, unsigned int size, unsigned int count, void *lo if (file->file) return fread(buffer, size, count, file->file); else { /*we're reading from memory*/ int i; - /*we convert ot uchar just on the off chance some platform can't handle - pointer arithmetic with type (void*). */ + /* we convert ot uchar just on the off chance some platform can't handle + * pointer arithmetic with type (void*). */ unsigned char *buf = (unsigned char *) buffer; for (i=0; i(y) ? (x) : (y) ) /* Only this one is used liberally here, and in imbuf */ @@ -100,16 +100,15 @@ static void pixel_from_buffer(struct ImBuf *ibuf, unsigned char **outI, float ** } /************************************************************************** -* INTERPOLATIONS -* -* Reference and docs: -* http://wiki.blender.org/index.php/User:Damiles#Interpolations_Algorithms -***************************************************************************/ - -/* BICUBIC Interpolation functions */ -/* More info: http://wiki.blender.org/index.php/User:Damiles#Bicubic_pixel_interpolation -*/ -/* function assumes out to be zero'ed, only does RGBA */ + * INTERPOLATIONS + * + * Reference and docs: + * http://wiki.blender.org/index.php/User:Damiles#Interpolations_Algorithms + ***************************************************************************/ + +/* BICUBIC Interpolation functions + * More info: http://wiki.blender.org/index.php/User:Damiles#Bicubic_pixel_interpolation + * function assumes out to be zero'ed, only does RGBA */ static float P(float k) { diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c index b219d4b592e..c2bdb44be10 100644 --- a/source/blender/imbuf/intern/jp2.c +++ b/source/blender/imbuf/intern/jp2.c @@ -68,24 +68,24 @@ int imb_is_a_jp2(unsigned char *buf) /** -sample error callback expecting a FILE* client object -*/ + * sample error callback expecting a FILE* client object + */ static void error_callback(const char *msg, void *client_data) { FILE *stream = (FILE*)client_data; fprintf(stream, "[ERROR] %s", msg); } /** -sample warning callback expecting a FILE* client object -*/ + * sample warning callback expecting a FILE* client object + */ static void warning_callback(const char *msg, void *client_data) { FILE *stream = (FILE*)client_data; fprintf(stream, "[WARNING] %s", msg); } /** -sample debug callback expecting no client object -*/ + * sample debug callback expecting no client object + */ static void info_callback(const char *msg, void *client_data) { (void)client_data; @@ -292,11 +292,11 @@ struct ImBuf *imb_jp2_decode(unsigned char *mem, size_t size, int flags) /* -2048x1080 (2K) at 24 fps or 48 fps, or 4096x2160 (4K) at 24 fps; 3x12 bits per pixel, XYZ color space - - * In 2K, for Scope (2.39:1) presentation 2048x858 pixels of the imager is used - * In 2K, for Flat (1.85:1) presentation 1998x1080 pixels of the imager is used -*/ + * 2048x1080 (2K) at 24 fps or 48 fps, or 4096x2160 (4K) at 24 fps; 3x12 bits per pixel, XYZ color space + * + * - In 2K, for Scope (2.39:1) presentation 2048x858 pixels of the imager is used + * - In 2K, for Flat (1.85:1) presentation 1998x1080 pixels of the imager is used + */ /* ****************************** COPIED FROM image_to_j2k.c */ @@ -679,9 +679,9 @@ int imb_savejp2(struct ImBuf *ibuf, const char *name, int flags) (void)flags; /* unused */ /* - configure the event callbacks (not required) - setting of each callback is optionnal - */ + * configure the event callbacks (not required) + * setting of each callback is optionnal + */ memset(&event_mgr, 0, sizeof(opj_event_mgr_t)); event_mgr.error_handler = error_callback; event_mgr.warning_handler = warning_callback; @@ -692,7 +692,7 @@ int imb_savejp2(struct ImBuf *ibuf, const char *name, int flags) /* compression ratio */ /* invert range, from 10-100, 100-1 - * where jpeg see's 1 and highest quality (lossless) and 100 is very low quality*/ + * where jpeg see's 1 and highest quality (lossless) and 100 is very low quality*/ parameters.tcp_rates[0]= ((100-quality)/90.0f*99.0f) + 1; diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c index ca30628c62f..2aab497649a 100644 --- a/source/blender/imbuf/intern/jpeg.c +++ b/source/blender/imbuf/intern/jpeg.c @@ -69,11 +69,11 @@ static ImBuf * ibJpegImageFromCinfo(struct jpeg_decompress_struct * cinfo, int f * * 1. jpeg - standard printing, u & v at quarter of resulution * 2. jvid - standaard video, u & v half resolution, frame not interlaced - -type 3 is unsupported as of jul 05 2000 Frank. - + * + * type 3 is unsupported as of jul 05 2000 Frank. + * * 3. jstr - as 2, but written in 2 separate fields - + * * 4. jmax - no scaling in the components */ @@ -142,8 +142,8 @@ static boolean fill_input_buffer(j_decompress_ptr cinfo) my_src_ptr src = (my_src_ptr) cinfo->src; /* Since we have given all we have got already - * we simply fake an end of file - */ + * we simply fake an end of file + */ src->pub.next_input_byte = src->terminal; src->pub.bytes_in_buffer = 2; diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index e076dcfa286..bd79a6ea48b 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -1,8 +1,4 @@ -/** \file blender/imbuf/intern/openexr/openexr_api.cpp - * \ingroup openexr - */ /* -* * ***** BEGIN GPLLICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -29,6 +25,10 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file blender/imbuf/intern/openexr/openexr_api.cpp + * \ingroup openexr + */ + #include #include #include @@ -384,11 +384,11 @@ int imb_save_openexr(struct ImBuf *ibuf, const char *name, int flags) /* ********************* Nicer API, MultiLayer and with Tile file support ************************************ */ /* naming rules: - - parse name from right to left - - last character is channel ID, 1 char like 'A' 'R' 'G' 'B' 'X' 'Y' 'Z' 'W' 'U' 'V' - - separated with a dot; the Pass name (like "Depth", "Color", "Diffuse" or "Combined") - - separated with a dot: the Layer name (like "Lamp1" or "Walls" or "Characters") -*/ + * - parse name from right to left + * - last character is channel ID, 1 char like 'A' 'R' 'G' 'B' 'X' 'Y' 'Z' 'W' 'U' 'V' + * - separated with a dot; the Pass name (like "Depth", "Color", "Diffuse" or "Combined") + * - separated with a dot: the Layer name (like "Lamp1" or "Walls" or "Characters") + */ static ListBase exrhandles= {NULL, NULL}; diff --git a/source/blender/imbuf/intern/openexr/openexr_api.h b/source/blender/imbuf/intern/openexr/openexr_api.h index 0d51461c2e8..e0358361713 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.h +++ b/source/blender/imbuf/intern/openexr/openexr_api.h @@ -39,7 +39,7 @@ extern "C" { #include - /** +/** * Test presence of OpenEXR file. * \param mem pointer to loaded OpenEXR bitstream */ diff --git a/source/blender/imbuf/intern/openexr/openexr_multi.h b/source/blender/imbuf/intern/openexr/openexr_multi.h index cb18ddd219b..88d8b09675b 100644 --- a/source/blender/imbuf/intern/openexr/openexr_multi.h +++ b/source/blender/imbuf/intern/openexr/openexr_multi.h @@ -36,7 +36,7 @@ /* experiment with more advanced exr api */ /* Note: as for now openexr only supports 32 chars in channel names. - This api also supports max 8 channels per pass now. easy to fix! */ + * This api also supports max 8 channels per pass now. easy to fix! */ #define EXR_LAY_MAXNAME 19 #define EXR_PASS_MAXNAME 11 #define EXR_TOT_MAXNAME 32 diff --git a/source/blender/imbuf/intern/openexr/openexr_stub.cpp b/source/blender/imbuf/intern/openexr/openexr_stub.cpp index 29b12a2984b..e896fc58cf3 100644 --- a/source/blender/imbuf/intern/openexr/openexr_stub.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_stub.cpp @@ -1,8 +1,4 @@ -/** \file blender/imbuf/intern/openexr/openexr_stub.cpp - * \ingroup openexr - */ /* -* * ***** BEGIN GPLLICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -29,6 +25,9 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file blender/imbuf/intern/openexr/openexr_stub.cpp + * \ingroup openexr + */ #include "openexr_api.h" #include "openexr_multi.h" diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c index 74047ae74f5..84f3e18591d 100644 --- a/source/blender/imbuf/intern/png.c +++ b/source/blender/imbuf/intern/png.c @@ -205,15 +205,15 @@ int imb_savepng(struct ImBuf *ibuf, const char *name, int flags) png_init_io(png_ptr, fp); } - /* +#if 0 png_set_filter(png_ptr, 0, - PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE | - PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB | - PNG_FILTER_UP | PNG_FILTER_VALUE_UP | - PNG_FILTER_AVG | PNG_FILTER_VALUE_AVG | - PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH| - PNG_ALL_FILTERS); - */ + PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE | + PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB | + PNG_FILTER_UP | PNG_FILTER_VALUE_UP | + PNG_FILTER_AVG | PNG_FILTER_VALUE_AVG | + PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH| + PNG_ALL_FILTERS); +#endif png_set_compression_level(png_ptr, compression); diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c index 23db6b47b9d..9265da8d8dc 100644 --- a/source/blender/imbuf/intern/radiance_hdr.c +++ b/source/blender/imbuf/intern/radiance_hdr.c @@ -30,12 +30,12 @@ */ /* ---------------------------------------------------------------------- - Radiance High Dynamic Range image file IO - For description and code for reading/writing of radiance hdr files - by Greg Ward, refer to: - http://radsite.lbl.gov/radiance/refer/Notes/picture_format.html ----------------------------------------------------------------------- -*/ + * Radiance High Dynamic Range image file IO + * For description and code for reading/writing of radiance hdr files + * by Greg Ward, refer to: + * http://radsite.lbl.gov/radiance/refer/Notes/picture_format.html + * ---------------------------------------------------------------------- + */ #ifdef WIN32 # include diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c index 97b94ae7b27..492d0af2ac8 100644 --- a/source/blender/imbuf/intern/rectop.c +++ b/source/blender/imbuf/intern/rectop.c @@ -47,8 +47,8 @@ static void blend_color_mix(char *cp, char *cp1, char *cp2, int fac) { /* this and other blending modes previously used >>8 instead of /255. both - are not equivalent (>>8 is /256), and the former results in rounding - errors that can turn colors black fast after repeated blending */ + * are not equivalent (>>8 is /256), and the former results in rounding + * errors that can turn colors black fast after repeated blending */ int mfac= 255-fac; cp[0]= (mfac*cp1[0]+fac*cp2[0])/255; @@ -93,7 +93,7 @@ static void blend_color_mul(char *cp, char *cp1, char *cp2, int fac) static void blend_color_lighten(char *cp, char *cp1, char *cp2, int fac) { /* See if are lighter, if so mix, else dont do anything. - if the paint col is darker then the original, then ignore */ + * if the paint col is darker then the original, then ignore */ if (cp1[0]+cp1[1]+cp1[2] > cp2[0]+cp2[1]+cp2[2]) { cp[0]= cp1[0]; cp[1]= cp1[1]; @@ -106,7 +106,7 @@ static void blend_color_lighten(char *cp, char *cp1, char *cp2, int fac) static void blend_color_darken(char *cp, char *cp1, char *cp2, int fac) { /* See if were darker, if so mix, else dont do anything. - if the paint col is brighter then the original, then ignore */ + * if the paint col is brighter then the original, then ignore */ if (cp1[0]+cp1[1]+cp1[2] < cp2[0]+cp2[1]+cp2[2]) { cp[0]= cp1[0]; cp[1]= cp1[1]; @@ -202,7 +202,7 @@ static void blend_color_mul_float(float *cp, float *cp1, float *cp2, float fac) static void blend_color_lighten_float(float *cp, float *cp1, float *cp2, float fac) { /* See if are lighter, if so mix, else dont do anything. - if the pafloat col is darker then the original, then ignore */ + * if the pafloat col is darker then the original, then ignore */ if (cp1[0]+cp1[1]+cp1[2] > cp2[0]+cp2[1]+cp2[2]) { cp[0]= cp1[0]; cp[1]= cp1[1]; @@ -215,7 +215,7 @@ static void blend_color_lighten_float(float *cp, float *cp1, float *cp2, float f static void blend_color_darken_float(float *cp, float *cp1, float *cp2, float fac) { /* See if were darker, if so mix, else dont do anything. - if the pafloat col is brighter then the original, then ignore */ + * if the pafloat col is brighter then the original, then ignore */ if (cp1[0]+cp1[1]+cp1[2] < cp2[0]+cp2[1]+cp2[2]) { cp[0]= cp1[0]; cp[1]= cp1[1]; diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c index c131d385874..361faa08b29 100644 --- a/source/blender/imbuf/intern/scaling.c +++ b/source/blender/imbuf/intern/scaling.c @@ -773,27 +773,27 @@ static void q_scale_float(float* in, float* out, int in_width, } } -/* q_scale_linear_interpolation (derived from ppmqscale, http://libdv.sf.net) - - q stands for quick _and_ quality :) - - only handles common cases when we either - - scale both, x and y or - shrink both, x and y - - but that is pretty fast: - * does only blit once instead of two passes like the old code - (fewer cache misses) - * uses fixed point integer arithmetic for byte buffers - * doesn't branch in tight loops - - Should be comparable in speed to the ImBuf ..._fast functions at least - for byte-buffers. - - NOTE: disabled, due to inacceptable inaccuracy and quality loss, see bug #18609 (ton) - -*/ +/** + * q_scale_linear_interpolation (derived from ppmqscale, http://libdv.sf.net) + * + * q stands for quick _and_ quality :) + * + * only handles common cases when we either + * + * scale both, x and y or + * shrink both, x and y + * + * but that is pretty fast: + * - does only blit once instead of two passes like the old code + * (fewer cache misses) + * - uses fixed point integer arithmetic for byte buffers + * - doesn't branch in tight loops + * + * Should be comparable in speed to the ImBuf ..._fast functions at least + * for byte-buffers. + * + * NOTE: disabled, due to inacceptable inaccuracy and quality loss, see bug #18609 (ton) + */ static int q_scale_linear_interpolation( struct ImBuf *ibuf, int newx, int newy) { @@ -1473,7 +1473,7 @@ struct ImBuf *IMB_scaleImBuf(struct ImBuf * ibuf, unsigned int newx, unsigned in if (newx == ibuf->x && newy == ibuf->y) { return ibuf; } /* scaleup / scaledown functions below change ibuf->x and ibuf->y - so we first scale the Z-buffer (if any) */ + * so we first scale the Z-buffer (if any) */ scalefast_Z_ImBuf(ibuf, newx, newy); /* try to scale common cases in a fast way */ diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c index afc64e1a528..1e6bc216128 100644 --- a/source/blender/imbuf/intern/tiff.c +++ b/source/blender/imbuf/intern/tiff.c @@ -554,7 +554,7 @@ ImBuf *imb_loadtiff(unsigned char *mem, size_t size, int flags) } /* detect if we are reading a tiled/mipmapped texture, in that case - we don't read pixels but leave it to the cache to load tiles */ + * we don't read pixels but leave it to the cache to load tiles */ if(flags & IB_tilecache) { format= NULL; TIFFGetField(image, TIFFTAG_PIXAR_TEXTUREFORMAT, &format); diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index eb8d06fc9f2..1737f3b79e6 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -54,15 +54,14 @@ typedef struct IDProperty { char type, subtype; short flag; char name[64]; /* MAX_IDPROP_NAME */ - int saved; /*saved is used to indicate if this struct has been saved yet. - seemed like a good idea as a pad var was needed anyway :)*/ + int saved; /* saved is used to indicate if this struct has been saved yet. + * seemed like a good idea as a pad var was needed anyway :)*/ IDPropertyData data; /* note, alignment for 64 bits */ int len; /* array length, also (this is important!) string length + 1. * the idea is to be able to reuse array realloc functions on strings.*/ /* totallen is total length of allocated array/string, including a buffer. * Note that the buffering is mild; the code comes from python's list implementation.*/ - int totallen; /*strings and arrays are both buffered, though the buffer isn't - saved.*/ + int totallen; /*strings and arrays are both buffered, though the buffer isn't saved.*/ } IDProperty; #define MAX_IDPROP_NAME 64 diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index 058c72be639..73aabd7d84b 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -416,7 +416,7 @@ typedef enum eItasc_Solver { /* Groups -------------------------------------- */ /* Action-Channel Group (agrp) - + * * These are stored as a list per-Action, and are only used to * group that Action's channels in an Animation Editor. * diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 776231476ba..f4e06455c63 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -199,7 +199,7 @@ typedef struct bTwoDFilterActuator { /* Tells what type of 2D Filter */ short type; /* (flag == 0) means 2D filter is activate and - (flag != 0) means 2D filter is inactive */ + * (flag != 0) means 2D filter is inactive */ short flag; int int_arg; /* a float argument */ diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index f915b75a77f..b8b1f7d8b70 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -36,13 +36,13 @@ struct AnimData; /* this system works on different transformation space levels; - -1) Bone Space; with each Bone having own (0,0,0) origin -2) Armature Space; the rest position, in Object space, Bones Spaces are applied hierarchical -3) Pose Space; the animation position, in Object space -4) World Space; Object matrix applied to Pose or Armature space - -*/ + * + * 1) Bone Space; with each Bone having own (0,0,0) origin + * 2) Armature Space; the rest position, in Object space, Bones Spaces are applied hierarchical + * 3) Pose Space; the animation position, in Object space + * 4) World Space; Object matrix applied to Pose or Armature space + * + */ typedef struct Bone { struct Bone *next, *prev; /* Next/prev elements within this list */ diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h index cdf20bd726a..112247f3d66 100644 --- a/source/blender/makesdna/DNA_camera_types.h +++ b/source/blender/makesdna/DNA_camera_types.h @@ -59,7 +59,7 @@ typedef struct Camera { /* yafray: dof params */ /* qdn: yafray var 'YF_dofdist' now enabled for defocus composite node as well. - The name was not changed so that no other files need to be modified */ + * The name was not changed so that no other files need to be modified */ float YF_dofdist; struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index 79a1d821543..fd8b08e68c6 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -33,16 +33,16 @@ #define __DNA_CLOTH_TYPES_H__ /** -* This struct contains all the global data required to run a simulation. -* At the time of this writing, this structure contains data appropriate -* to run a simulation as described in Deformation Constraints in a -* Mass-Spring Model to Describe Rigid Cloth Behavior by Xavier Provot. -* -* I've tried to keep similar, if not exact names for the variables as -* are presented in the paper. Where I've changed the concept slightly, -* as in stepsPerFrame comapred to the time step in the paper, I've used -* variables with different names to minimize confusion. -**/ + * This struct contains all the global data required to run a simulation. + * At the time of this writing, this structure contains data appropriate + * to run a simulation as described in Deformation Constraints in a + * Mass-Spring Model to Describe Rigid Cloth Behavior by Xavier Provot. + * + * I've tried to keep similar, if not exact names for the variables as + * are presented in the paper. Where I've changed the concept slightly, + * as in stepsPerFrame comapred to the time step in the paper, I've used + * variables with different names to minimize confusion. + */ typedef struct ClothSimSettings { diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index e311b6dffea..c9d80476fde 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -92,16 +92,16 @@ typedef struct BevPoint { */ /* note: alfa location in struct is abused by Key system */ /* vec in BezTriple looks like this: - vec[0][0]=x location of handle 1 - vec[0][1]=y location of handle 1 - vec[0][2]=z location of handle 1 (not used for FCurve Points(2d)) - vec[1][0]=x location of control point - vec[1][1]=y location of control point - vec[1][2]=z location of control point - vec[2][0]=x location of handle 2 - vec[2][1]=y location of handle 2 - vec[2][2]=z location of handle 2 (not used for FCurve Points(2d)) -*/ + * - vec[0][0]=x location of handle 1 + * - vec[0][1]=y location of handle 1 + * - vec[0][2]=z location of handle 1 (not used for FCurve Points(2d)) + * - vec[1][0]=x location of control point + * - vec[1][1]=y location of control point + * - vec[1][2]=z location of control point + * - vec[2][0]=x location of handle 2 + * - vec[2][1]=y location of handle 2 + * - vec[2][2]=z location of handle 2 (not used for FCurve Points(2d)) + */ typedef struct BezTriple { float vec[3][3]; float alfa, weight, radius; /* alfa: tilt in 3D View, weight: used for softbody goal weight, radius: for bevel tapering */ diff --git a/source/blender/makesdna/DNA_documentation.h b/source/blender/makesdna/DNA_documentation.h index c1d6ee4aec3..0dd7f37f8b4 100644 --- a/source/blender/makesdna/DNA_documentation.h +++ b/source/blender/makesdna/DNA_documentation.h @@ -60,14 +60,14 @@ * * DNA has no external dependencies (except for a few system * includes). - + * * \section dnanote NOTE - + * * PLEASE READ INSTRUCTIONS ABOUT ADDING VARIABLES IN 'DNA' STRUCTS IN * * intern/dna_genfile.c * (ton) - + * */ diff --git a/source/blender/makesdna/DNA_dynamicpaint_types.h b/source/blender/makesdna/DNA_dynamicpaint_types.h index fedc603fde2..ca1b1bf1725 100644 --- a/source/blender/makesdna/DNA_dynamicpaint_types.h +++ b/source/blender/makesdna/DNA_dynamicpaint_types.h @@ -159,7 +159,7 @@ typedef struct DynamicPaintCanvasSettings { #define MOD_DPAINT_PART_RAD (1<<0) /* use particle radius */ #define MOD_DPAINT_USE_MATERIAL (1<<1) /* use object material */ #define MOD_DPAINT_ABS_ALPHA (1<<2) /* don't increase alpha unless - paint alpha is higher than existing */ + * paint alpha is higher than existing */ #define MOD_DPAINT_ERASE (1<<3) /* removes paint */ #define MOD_DPAINT_RAMP_ALPHA (1<<4) /* only read falloff ramp alpha */ diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index 6416f3117dc..dcd4306600f 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -136,7 +136,7 @@ typedef struct Material { short diff_shader, spec_shader; float roughness, refrac; /* XXX param[4] needs review and improvement (shader system as whole anyway) - This is nasty reused variable for different goals and not easy to RNAify nicely. -jesterKing */ + * This is nasty reused variable for different goals and not easy to RNAify nicely. -jesterKing */ float param[4]; /* size, smooth, size, smooth, for toonshader, 0 (fac) and 1 (fresnel) also for fresnel shader */ float rms; float darkness; diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index 13186a9e780..48704fe43d4 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -77,8 +77,8 @@ typedef struct Mesh { struct MLoopCol *mloopcol; /* END BMESH ONLY */ - /*mface stores the tessellation (triangulation) of the mesh, - real faces are now stored in nface.*/ + /* mface stores the tessellation (triangulation) of the mesh, + * real faces are now stored in nface.*/ struct MFace *mface; /* array of mesh object mode faces for tessellation */ struct MTFace *mtface; /* store tessellation face UV's and texture here */ struct TFace *tface; /* depecrated, use mtface */ @@ -87,7 +87,7 @@ typedef struct Mesh { struct MDeformVert *dvert; /* deformgroup vertices */ /* array of colors for the tesselated faces, must be number of tesselated - faces * 4 in length */ + * faces * 4 in length */ struct MCol *mcol; struct MSticky *msticky; struct Mesh *texcomesh; @@ -194,27 +194,6 @@ typedef struct TFace { /* debug only option */ #define ME_DRAWEXTRA_INDICES (1 << 13) -/* old global flags: -#define G_DRAWEDGES (1 << 18) -#define G_DRAWFACES (1 << 7) -#define G_DRAWNORMALS (1 << 6) -#define G_DRAW_VNORMALS (1 << 14) - -#define G_ALLEDGES (1 << 11) -#define G_HIDDENEDGES (1 << 21) - -#define G_DRAWCREASES (1 << 19) -#define G_DRAWSEAMS (1 << 20) -#define G_DRAWSHARP (1 << 28) -#define G_DRAWBWEIGHTS (1 << 31) - -#define G_DRAW_EDGELEN (1 << 22) -#define G_DRAW_FACEAREA (1 << 23) -#define G_DRAW_EDGEANG (1 << 24) -*/ - - - /* Subsurf Type */ #define ME_CC_SUBSURF 0 #define ME_SIMPLE_SUBSURF 1 diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index be2a676778f..4367d259b1f 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -75,8 +75,8 @@ typedef struct MCol { char a, r, g, b; } MCol; -/*new face structure, replaces MFace, which is now - only used for storing tessellations.*/ +/* new face structure, replaces MFace, which is now + * only used for storing tessellations.*/ typedef struct MPoly { /* offset into loop array and number of loops in the face */ int loopstart; @@ -85,8 +85,8 @@ typedef struct MPoly { char flag, pad; } MPoly; -/*the e here is because we want to move away from - relying on edge hashes.*/ +/* the e here is because we want to move away from + * relying on edge hashes.*/ typedef struct MLoop { unsigned int v; /*vertex index*/ unsigned int e; /*edge index*/ diff --git a/source/blender/makesdna/DNA_meta_types.h b/source/blender/makesdna/DNA_meta_types.h index 9c20b8f644b..2912650c77c 100644 --- a/source/blender/makesdna/DNA_meta_types.h +++ b/source/blender/makesdna/DNA_meta_types.h @@ -87,8 +87,8 @@ typedef struct MetaBall { float wiresize, rendersize; /* display and render res */ /* bias elements to have an offset volume. - mother ball changes will effect other objects thresholds, - but these may also have their own thresh as an offset */ + * mother ball changes will effect other objects thresholds, + * but these may also have their own thresh as an offset */ float thresh; /* used in editmode */ diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index a848c3edd49..f00bd338fd5 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -191,33 +191,33 @@ typedef struct ArrayModifierData { /* the object to use for object offset */ struct Object *offset_ob; /* a constant duplicate offset; - 1 means the duplicates are 1 unit apart - */ + * 1 means the duplicates are 1 unit apart + */ float offset[3]; /* a scaled factor for duplicate offsets; - 1 means the duplicates are 1 object-width apart - */ + * 1 means the duplicates are 1 object-width apart + */ float scale[3]; /* the length over which to distribute the duplicates */ float length; /* the limit below which to merge vertices in adjacent duplicates */ float merge_dist; /* determines how duplicate count is calculated; one of: - MOD_ARR_FIXEDCOUNT -> fixed - MOD_ARR_FITLENGTH -> calculated to fit a set length - MOD_ARR_FITCURVE -> calculated to fit the length of a Curve object - */ + * - MOD_ARR_FIXEDCOUNT -> fixed + * - MOD_ARR_FITLENGTH -> calculated to fit a set length + * - MOD_ARR_FITCURVE -> calculated to fit the length of a Curve object + */ int fit_type; /* flags specifying how total offset is calculated; binary OR of: - MOD_ARR_OFF_CONST -> total offset += offset - MOD_ARR_OFF_RELATIVE -> total offset += relative * object width - MOD_ARR_OFF_OBJ -> total offset += offset_ob's matrix - total offset is the sum of the individual enabled offsets - */ + * - MOD_ARR_OFF_CONST -> total offset += offset + * - MOD_ARR_OFF_RELATIVE -> total offset += relative * object width + * - MOD_ARR_OFF_OBJ -> total offset += offset_ob's matrix + * total offset is the sum of the individual enabled offsets + */ int offset_type; /* general flags: - MOD_ARR_MERGE -> merge vertices in adjacent duplicates - */ + * MOD_ARR_MERGE -> merge vertices in adjacent duplicates + */ int flags; /* the number of duplicates to generate for MOD_ARR_FIXEDCOUNT */ int count; @@ -1045,7 +1045,7 @@ typedef struct RemeshModifierData { ModifierData modifier; /* floodfill option, controls how small components can be - before they are removed */ + * before they are removed */ float threshold; /* ratio between size of model and grid */ diff --git a/source/blender/makesdna/DNA_movieclip_types.h b/source/blender/makesdna/DNA_movieclip_types.h index f764042ee5d..b4e6c07cec3 100644 --- a/source/blender/makesdna/DNA_movieclip_types.h +++ b/source/blender/makesdna/DNA_movieclip_types.h @@ -78,8 +78,8 @@ typedef struct MovieClip { struct MovieTracking tracking; /* data for SfM tracking */ void *tracking_context; /* context of tracking job - used to synchronize data like framenumber - in SpaceClip clip user */ + * used to synchronize data like framenumber + * in SpaceClip clip user */ struct MovieClipProxy proxy; /* proxy to clip data */ int flag, pad; diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index dbb3f6bfc66..6caf0a7d8b2 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -238,7 +238,7 @@ typedef struct bNodeTree { int type, init; /* set init on fileread */ int cur_index; /* sockets in groups have unique identifiers, adding new sockets always - will increase this counter */ + * will increase this counter */ int flag; int update; /* update flags */ diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h index 6b11fd0766f..0e70b5d28e3 100644 --- a/source/blender/makesdna/DNA_object_force.h +++ b/source/blender/makesdna/DNA_object_force.h @@ -130,7 +130,7 @@ typedef struct EffectorWeights { * - to add new data types update: * * BKE_ptcache_data_size() * * ptcache_file_init_pointers() -*/ + */ #define BPHYS_DATA_INDEX 0 #define BPHYS_DATA_LOCATION 1 #define BPHYS_DATA_SMOKE_LOW 1 @@ -276,9 +276,10 @@ typedef struct SoftBody { /* general options */ float nodemass; /* softbody mass of *vertex* */ - char namedVG_Mass[64]; /* MAX_VGROUP_NAME */ /* along with it introduce mass painting - starting to fix old bug .. nastyness that VG are indexes - rather find them by name tag to find it -> jow20090613 */ + char namedVG_Mass[64]; /* MAX_VGROUP_NAME */ + /* along with it introduce mass painting + * starting to fix old bug .. nastyness that VG are indexes + * rather find them by name tag to find it -> jow20090613 */ float grav; /* softbody amount of gravitaion to apply */ float mediafrict; /* friction to env */ float rklimit; /* error limit for ODE solver */ @@ -291,17 +292,19 @@ typedef struct SoftBody { float maxgoal; float defgoal; /* default goal for vertices without vgroup */ short vertgroup; /* index starting at 1 */ - char namedVG_Softgoal[64]; /* MAX_VGROUP_NAME */ /* starting to fix old bug .. nastyness that VG are indexes - rather find them by name tag to find it -> jow20090613 */ + char namedVG_Softgoal[64]; /* MAX_VGROUP_NAME */ + /* starting to fix old bug .. nastyness that VG are indexes + * rather find them by name tag to find it -> jow20090613 */ short fuzzyness; /* */ /* springs */ float inspring; /* softbody inner springs */ float infrict; /* softbody inner springs friction */ - char namedVG_Spring_K[64]; /* MAX_VGROUP_NAME */ /* along with it introduce Spring_K painting - starting to fix old bug .. nastyness that VG are indexes - rather find them by name tag to find it -> jow20090613 */ + char namedVG_Spring_K[64]; /* MAX_VGROUP_NAME */ + /* along with it introduce Spring_K painting + * starting to fix old bug .. nastyness that VG are indexes + * rather find them by name tag to find it -> jow20090613 */ /* baking */ int sfra, efra; diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 3d80e9a08d3..79ed1186c1a 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -614,7 +614,7 @@ typedef struct GameData { /* * bit 3: (gameengine): Activity culling is enabled. * bit 5: (gameengine) : enable Bullet DBVT tree for view frustrum culling - */ + */ int flag; short mode, matmode; short occlusionRes; /* resolution of occlusion Z buffer in pixel */ @@ -837,11 +837,12 @@ typedef struct TransformOrientation { } TransformOrientation; /* *************************************************************** */ -/* Unified Paint Settings */ +/* Unified Paint Settings + */ /* These settings can override the equivalent fields in the active - Brush for any paint mode; the flag field controls whether these - values are used */ + * Brush for any paint mode; the flag field controls whether these + * values are used */ typedef struct UnifiedPaintSettings { /* unified radius of brush in pixels */ int size; @@ -861,12 +862,12 @@ typedef enum { UNIFIED_PAINT_ALPHA = (1<<1), /* only used if unified size is enabled, mirros the brush flags - BRUSH_LOCK_SIZE and BRUSH_SIZE_PRESSURE */ + * BRUSH_LOCK_SIZE and BRUSH_SIZE_PRESSURE */ UNIFIED_PAINT_BRUSH_LOCK_SIZE = (1<<2), UNIFIED_PAINT_BRUSH_SIZE_PRESSURE = (1<<3), /* only used if unified alpha is enabled, mirrors the brush flag - BRUSH_ALPHA_PRESSURE */ + * BRUSH_ALPHA_PRESSURE */ UNIFIED_PAINT_BRUSH_ALPHA_PRESSURE = (1<<4) } UnifiedPaintSettingsFlags; @@ -995,7 +996,7 @@ typedef struct ToolSettings { int uv_sculpt_tool; int uv_relax_method; /* XXX: these sculpt_paint_* fields are deprecated, use the - unified_paint_settings field instead! */ + * unified_paint_settings field instead! */ short sculpt_paint_settings DNA_DEPRECATED; short pad1; int sculpt_paint_unified_size DNA_DEPRECATED; float sculpt_paint_unified_unprojected_radius DNA_DEPRECATED; diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h index 97b65235a29..ec02db192fd 100644 --- a/source/blender/makesdna/DNA_sdna_types.h +++ b/source/blender/makesdna/DNA_sdna_types.h @@ -48,14 +48,14 @@ typedef struct SDNA { short *typelens; /* type lengths */ int nr_structs; /* number of struct types */ - short **structs; /* sp= structs[a] is the address of a struct definintion - sp[0] is struct type number, sp[1] amount of members - - (sp[2], sp[3]), (sp[4], sp[5]), .. are the member - type and name numbers respectively */ + short **structs; /* sp = structs[a] is the address of a struct definintion + * sp[0] is struct type number, sp[1] amount of members + * + * (sp[2], sp[3]), (sp[4], sp[5]), .. are the member + * type and name numbers respectively */ struct GHash *structs_map; /* ghash for faster lookups, - requires WITH_DNA_GHASH to be used for now */ + * requires WITH_DNA_GHASH to be used for now */ /* wrong place for this really, its a simple * cache for findstruct_nr. diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h index 894e1135c0d..053c0c8f7d3 100644 --- a/source/blender/makesdna/DNA_smoke_types.h +++ b/source/blender/makesdna/DNA_smoke_types.h @@ -109,8 +109,7 @@ typedef struct SmokeDomainSettings { /* flags */ #define MOD_SMOKE_FLOW_ABSOLUTE (1<<1) /*old style emission*/ -#define MOD_SMOKE_FLOW_INITVELOCITY (1<<2) /* passes particles speed to - the smoke*/ +#define MOD_SMOKE_FLOW_INITVELOCITY (1<<2) /* passes particles speed to the smoke */ typedef struct SmokeFlowSettings { @@ -128,11 +127,10 @@ typedef struct SmokeFlowSettings { int flags; /* absolute emission etc*/ } SmokeFlowSettings; -/* - struct BVHTreeFromMesh *bvh; - float mat[4][4]; - float mat_old[4][4]; - */ + +// struct BVHTreeFromMesh *bvh; +// float mat[4][4]; +// float mat_old[4][4]; /* collision objects (filled with smoke) */ typedef struct SmokeCollSettings { diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h index 1fab63f9d63..67683979e2e 100644 --- a/source/blender/makesdna/DNA_sound_types.h +++ b/source/blender/makesdna/DNA_sound_types.h @@ -75,8 +75,8 @@ typedef struct bSound { int flags; int pad; -/** currently int type; - struct bSound *child_sound;*/ +// currently int type; +// struct bSound *child_sound;*/ /** * The audaspace handle for cache. @@ -94,17 +94,19 @@ typedef struct bSound { */ void *playback_handle; -/** XXX unused currently // SOUND_TYPE_LIMITER - float start, end;*/ +// XXX unused currently // SOUND_TYPE_LIMITER +// float start, end;*/ } bSound; -/* XXX unused currently +/* XXX unused currently */ +#if 0 typedef enum eSound_Type { SOUND_TYPE_INVALID = -1, SOUND_TYPE_FILE = 0, SOUND_TYPE_BUFFER, SOUND_TYPE_LIMITER -} eSound_Type;*/ +} eSound_Type; +#endif /* spacesound->flag */ #define SND_DRAWFRAMES 1 diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 7b633523ef8..128c1422ed6 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -215,10 +215,10 @@ typedef struct SpaceFile { ListBase *folders_next; /* holds the list of next directories (pushed from previous) to show */ /* operator that is invoking fileselect - op->exec() will be called on the 'Load' button. - if operator provides op->cancel(), then this will be invoked - on the cancel button. - */ + * op->exec() will be called on the 'Load' button. + * if operator provides op->cancel(), then this will be invoked + * on the cancel button. + */ struct wmOperator *op; struct wmTimer *smoothscroll_timer; @@ -516,8 +516,8 @@ typedef struct SpaceClip { /* current stabilization data */ float loc[2], scale, angle; /* pre-composed stabilization data */ int pad; - float stabmat[4][4], unistabmat[4][4]; /* current stabilization matrix and the same matrix in unified space, - defined when drawing and used for mouse position calculation */ + float stabmat[4][4], unistabmat[4][4]; /* current stabilization matrix and the same matrix in unified space, + * defined when drawing and used for mouse position calculation */ /* movie postprocessing */ int postproc_flag; diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index e72b7dcfa72..2243eb357fc 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -619,11 +619,11 @@ extern UserDef U; /* from blenkernel blender.c */ /* orbit navigation modes * only two options, so it's sort of a hybrid bool/enum * if ((U.ndof_flag & NDOF_ORBIT_MODE) == NDOF_OM_OBJECT)... */ -/* -#define NDOF_ORBIT_MODE (1 << 6) -#define NDOF_OM_TARGETCAMERA 0 -#define NDOF_OM_OBJECT NDOF_ORBIT_MODE -*/ + +// #define NDOF_ORBIT_MODE (1 << 6) +// #define NDOF_OM_TARGETCAMERA 0 +// #define NDOF_OM_OBJECT NDOF_ORBIT_MODE + /* actually... users probably don't care about what the mode * is called, just that it feels right */ /* zoom is up/down if this flag is set (otherwise forward/backward) */ diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index a332c77c402..2148bc96c04 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -51,90 +51,90 @@ /* gcc 4.1 on mingw was complaining that __int64 was already defined -actually is saw the line below as typedef long long long long... -Anyhow, since its already defined, its safe to do an ifndef here- Campbell */ + * actually is saw the line below as typedef long long long long... + * Anyhow, since its already defined, its safe to do an ifndef here- Campbell */ #ifdef FREE_WINDOWS -#ifndef __int64 +# ifndef __int64 typedef long long __int64; -#endif +# endif #endif /* * - please note: no builtin security to detect input of double structs * - if you want a struct not to be in DNA file: add two hash marks above it (##) - -Structure DNA data is added to each blender file and to each executable, this to detect -in .blend files new veriables in structs, changed array sizes, etc. It's also used for -converting endian and pointer size (32-64 bits) -As an extra, Python uses a call to detect run-time the contents of a blender struct. - -Create a structDNA: only needed when one of the input include (.h) files change. -File Syntax: - SDNA (4 bytes) (magic number) - NAME (4 bytes) - (4 bytes) amount of names (int) - - - ... - ... - TYPE (4 bytes) - amount of types (int) - - - ... - ... - TLEN (4 bytes) - (short) the lengths of types - - ... - ... - STRC (4 bytes) - amount of structs (int) - ... - -!!Remember to read/write integer and short aligned!! - - While writing a file, the names of a struct is indicated with a type number, - to be found with: type= findstruct_nr(SDNA *, char *) - The value of 'type' corresponds with the the index within the structs array - - For the moment: the complete DNA file is included in a .blend file. For - the future we can think of smarter methods, like only included the used - structs. Only needed to keep a file short though... - -ALLOWED AND TESTED CHANGES IN STRUCTS: - - type change (a char to float will be divided by 255) - - location within a struct (everthing can be randomly mixed up) - - struct within struct (within struct etc), this is recursive - - adding new elements, will be default initialized zero - - remving elements - - change of array sizes - - change of a pointer type: when the name doesn't change the contents is copied - -NOT YET: - - array (vec[3]) to float struct (vec3f) - -DONE: - - endian compatibility - - pointer conversion (32-64 bits) - -IMPORTANT: - - do not use #defines in structs for array lengths, this cannot be read by the dna functions - - do not use uint, but unsigned int instead, ushort and ulong are allowed - - only use a long in Blender if you want this to be the size of a pointer. so it is - 32 bits or 64 bits, dependent at the cpu architecture - - chars are always unsigned - - aligment of variables has to be done in such a way, that any system does - not create 'padding' (gaps) in structures. So make sure that: - - short: 2 aligned - - int: 4 aligned - - float: 4 aligned - - double: 8 aligned - - long: 8 aligned - - struct: 8 aligned - - the sdna functions have several error prints builtin, always check blender running from a console. - -*/ + * + * Structure DNA data is added to each blender file and to each executable, this to detect + * in .blend files new veriables in structs, changed array sizes, etc. It's also used for + * converting endian and pointer size (32-64 bits) + * As an extra, Python uses a call to detect run-time the contents of a blender struct. + * + * Create a structDNA: only needed when one of the input include (.h) files change. + * File Syntax: + * SDNA (4 bytes) (magic number) + * NAME (4 bytes) + * (4 bytes) amount of names (int) + * + * + * ... + * ... + * TYPE (4 bytes) + * amount of types (int) + * + * + * ... + * ... + * TLEN (4 bytes) + * (short) the lengths of types + * + * ... + * ... + * STRC (4 bytes) + * amount of structs (int) + * ... + * + * !!Remember to read/write integer and short aligned!! + * + * While writing a file, the names of a struct is indicated with a type number, + * to be found with: type= findstruct_nr(SDNA *, char *) + * The value of 'type' corresponds with the the index within the structs array + * + * For the moment: the complete DNA file is included in a .blend file. For + * the future we can think of smarter methods, like only included the used + * structs. Only needed to keep a file short though... + * + * ALLOWED AND TESTED CHANGES IN STRUCTS: + * - type change (a char to float will be divided by 255) + * - location within a struct (everthing can be randomly mixed up) + * - struct within struct (within struct etc), this is recursive + * - adding new elements, will be default initialized zero + * - remving elements + * - change of array sizes + * - change of a pointer type: when the name doesn't change the contents is copied + * + * NOT YET: + * - array (vec[3]) to float struct (vec3f) + * + * DONE: + * - endian compatibility + * - pointer conversion (32-64 bits) + * + * IMPORTANT: + * - do not use #defines in structs for array lengths, this cannot be read by the dna functions + * - do not use uint, but unsigned int instead, ushort and ulong are allowed + * - only use a long in Blender if you want this to be the size of a pointer. so it is + * 32 bits or 64 bits, dependent at the cpu architecture + * - chars are always unsigned + * - aligment of variables has to be done in such a way, that any system does + * not create 'padding' (gaps) in structures. So make sure that: + * - short: 2 aligned + * - int: 4 aligned + * - float: 4 aligned + * - double: 8 aligned + * - long: 8 aligned + * - struct: 8 aligned + * - the sdna functions have several error prints builtin, always check blender running from a console. + * + */ /* local */ static int le_int(int temp); @@ -351,8 +351,8 @@ static void init_structDNA(SDNA *sdna, int do_endian_swap) sdna->names[nr]= cp; /* "float gravity [3]" was parsed wrong giving both "gravity" and - "[3]" members. we rename "[3]", and later set the type of - "gravity" to "void" so the offsets work out correct */ + * "[3]" members. we rename "[3]", and later set the type of + * "gravity" to "void" so the offsets work out correct */ if(*cp == '[' && strcmp(cp, "[3]")==0) { if(nr && strcmp(sdna->names[nr-1], "Cvi") == 0) { sdna->names[nr]= "gravity[3]"; @@ -644,14 +644,14 @@ char *DNA_struct_get_compareflags(SDNA *sdna, SDNA *newsdna) if(compflags[a]==2) recurs_test_compflags(sdna, compflags, a); } -/* +#if 0 for(a=0; anr_structs; a++) { if(compflags[a]==2) { spold= sdna->structs[a]; printf("changed: %s\n", sdna->types[ spold[0] ]); } } -*/ +#endif return compflags; } @@ -843,14 +843,14 @@ static void reconstruct_elem(SDNA *newsdna, SDNA *oldsdna, char *type, const char *name, char *curdata, short *old, char *olddata) { /* rules: test for NAME: - - name equal: - - cast type - - name partially equal (array differs) - - type equal: memcpy - - types casten - (nzc 2-4-2001 I want the 'unsigned' bit to be parsed as well. Where - can I force this?) - */ + * - name equal: + * - cast type + * - name partially equal (array differs) + * - type equal: memcpy + * - types casten + * (nzc 2-4-2001 I want the 'unsigned' bit to be parsed as well. Where + * can I force this?) + */ int a, elemcount, len, array, oldsize, cursize, mul; char *otype; const char *oname, *cp; diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 77f3e8084dd..42fe26d87a9 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -146,9 +146,9 @@ static char **types, *typedata; /* at address types[a] is string a */ static short *typelens; /* at typelens[a] is de length of type a */ static short *alphalens; /* contains sizes as they are calculated on the DEC Alpha (64 bits), infact any 64bit system */ static short **structs, *structdata;/* at sp= structs[a] is the first address of a struct definition - sp[0] is type number - sp[1] is amount of elements - sp[2] sp[3] is typenr, namenr (etc) */ + * sp[0] is type number + * sp[1] is amount of elements + * sp[2] sp[3] is typenr, namenr (etc) */ /** * Variable to control debug output of makesdna. * debugSDNA: @@ -289,9 +289,9 @@ static int add_name(const char *str) if (str[0] == '(' && str[1] == '*') { /* we handle function pointer and special array cases here, e.g. - void (*function)(...) and float (*array)[..]. the array case - name is still converted to (array*)() though because it is that - way in old dna too, and works correct with elementsize() */ + * void (*function)(...) and float (*array)[..]. the array case + * name is still converted to (array*)() though because it is that + * way in old dna too, and works correct with elementsize() */ int isfuncptr = (strchr(str+1, '(')) != NULL; if (debugSDNA > 3) printf("\t\t\t\t*** Function pointer or multidim array pointer found\n"); @@ -539,8 +539,8 @@ static void *read_file_data(char *filename, int *len_r) static int convert_include(char *filename) { /* read include file, skip structs with a '#' before it. - store all data in temporal arrays. - */ + * store all data in temporal arrays. + */ int filelen, count, overslaan, slen, type, name, strct; short *structpoin, *sp; char *maindata, *mainend, *md, *md1; diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h index 95f988b470b..d6c3422c8d4 100644 --- a/source/blender/makesrna/RNA_define.h +++ b/source/blender/makesrna/RNA_define.h @@ -100,10 +100,10 @@ PropertyRNA *RNA_def_float_rotation(StructOrFunctionRNA *cont, const char *ident float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax); PropertyRNA *RNA_def_float_array(StructOrFunctionRNA *cont, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax); - /* -PropertyRNA *RNA_def_float_dynamic_array(StructOrFunctionRNA *cont, const char *identifier, float hardmin, float hardmax, - const char *ui_name, const char *ui_description, float softmin, float softmax, unsigned int dimension, unsigned short dim_size[]); - */ + +//PropertyRNA *RNA_def_float_dynamic_array(StructOrFunctionRNA *cont, const char *identifier, float hardmin, float hardmax, +// const char *ui_name, const char *ui_description, float softmin, float softmax, unsigned int dimension, unsigned short dim_size[]); + PropertyRNA *RNA_def_float_percentage(StructOrFunctionRNA *cont, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax); PropertyRNA *RNA_def_float_factor(StructOrFunctionRNA *cont, const char *identifier, float default_value, float hardmin, float hardmax, diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h index af45c6d1696..8a668f68761 100644 --- a/source/blender/makesrna/RNA_types.h +++ b/source/blender/makesrna/RNA_types.h @@ -191,7 +191,7 @@ typedef enum PropertyFlag { * this exposes the flag as multiple options in python and the UI. * * note: these can't be animated so use with care. - */ + */ PROP_ENUM_FLAG = 1<<21, /* need context for update function */ diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 418d4e31819..2e8090c71f4 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -1559,12 +1559,14 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe break; } case PROP_COLLECTION: { - /*CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)dp->prop; +#if 0 + CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)dp->prop; if(cprop->type) fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", (const char*)cprop->type, srna->identifier, prop->identifier); else - fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", "UnknownType", srna->identifier, prop->identifier);*/ + fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", "UnknownType", srna->identifier, prop->identifier); +#endif break; } } @@ -2529,9 +2531,11 @@ static void rna_generate(BlenderRNA *brna, FILE *f, const char *filename, const PropertyDefRNA *dp; FunctionDefRNA *dfunc; - fprintf(f, "\n/* Automatically generated struct definitions for the Data API.\n" - " Do not edit manually, changes will be overwritten. */\n\n" - "#define RNA_RUNTIME\n\n"); + fprintf(f, + "\n" + "/* Automatically generated struct definitions for the Data API.\n" + " * Do not edit manually, changes will be overwritten. */\n\n" + "#define RNA_RUNTIME\n\n"); fprintf(f, "#include \n"); fprintf(f, "#include \n"); @@ -2606,8 +2610,9 @@ static void rna_generate_header(BlenderRNA *brna, FILE *f) fprintf(f, "\n#ifndef __RNA_BLENDER_H__\n"); fprintf(f, "#define __RNA_BLENDER_H__\n\n"); - fprintf(f, "/* Automatically generated function declarations for the Data API.\n" - " Do not edit manually, changes will be overwritten. */\n\n"); + fprintf(f, + "/* Automatically generated function declarations for the Data API.\n" + " * Do not edit manually, changes will be overwritten. */\n\n"); fprintf(f, "#include \"RNA_types.h\"\n\n"); @@ -2768,8 +2773,9 @@ static void rna_generate_header_cpp(BlenderRNA *brna, FILE *f) fprintf(f, "\n#ifndef __RNA_BLENDER_CPP_H__\n"); fprintf(f, "#define __RNA_BLENDER_CPP_H__\n\n"); - fprintf(f, "/* Automatically generated classes for the Data API.\n" - " Do not edit manually, changes will be overwritten. */\n\n"); + fprintf(f, + "/* Automatically generated classes for the Data API.\n" + " * Do not edit manually, changes will be overwritten. */\n\n"); fprintf(f, "#include \"RNA_blender.h\"\n"); fprintf(f, "#include \"RNA_types.h\"\n"); diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 6ca66f1d116..bb541471a19 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -262,11 +262,13 @@ ID *rna_ID_copy(ID *id) static void rna_ID_update_tag(ID *id, ReportList *reports, int flag) { /* XXX, new function for this! */ - /*if (ob->type == OB_FONT) { +#if 0 + if (ob->type == OB_FONT) { Curve *cu = ob->data; freedisplist(&cu->disp); BKE_text_to_curve(sce, ob, CU_LEFT); - }*/ + } +#endif if (flag == 0) { /* pass */ @@ -281,12 +283,14 @@ static void rna_ID_update_tag(ID *id, ReportList *reports, int flag) } break; /* Could add particle updates later */ -/* case ID_PA: +#if 0 + case ID_PA: if(flag & ~(OB_RECALC_ALL|PSYS_RECALC)) { BKE_report(reports, RPT_ERROR, "'refresh' incompatible with ParticleSettings ID type"); return; } - break; */ + break; +#endif default: BKE_report(reports, RPT_ERROR, "This ID type is not compatible with any 'refresh' options"); return; diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index bf9a21a87c6..2ccd7d293d3 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -1447,7 +1447,7 @@ static void rna_property_update(bContext *C, Main *bmain, Scene *scene, PointerR if (is_rna) { if (prop->update) { /* ideally no context would be needed for update, but there's some - parts of the code that need it still, so we have this exception */ + * parts of the code that need it still, so we have this exception */ if (prop->flag & PROP_CONTEXT_UPDATE) { if (C) { if (prop->flag & PROP_CONTEXT_PROPERTY_UPDATE) { @@ -2521,7 +2521,7 @@ PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop) } else if (prop->flag & PROP_IDPROPERTY) { /* XXX temporary hack to add it automatically, reading should - never do any write ops, to ensure thread safety etc .. */ + * never do any write ops, to ensure thread safety etc .. */ RNA_property_pointer_add(ptr, prop); return RNA_property_pointer_get(ptr, prop); } diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index a27ee0af828..202418205f3 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -2694,7 +2694,7 @@ int rna_parameter_size(PropertyRNA *parm) } /* this function returns the size of the memory allocated for the parameter, - useful for instance for memory alignment or for storing additional information */ + * useful for instance for memory alignment or for storing additional information */ int rna_parameter_size_alloc(PropertyRNA *parm) { int size = rna_parameter_size(parm); diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c index fafa3a72174..e9e7f58b638 100644 --- a/source/blender/makesrna/intern/rna_dynamicpaint.c +++ b/source/blender/makesrna/intern/rna_dynamicpaint.c @@ -68,8 +68,8 @@ static char *rna_DynamicPaintSurface_path(PointerRNA *ptr) /* -* Surfaces -*/ + * Surfaces + */ static void rna_DynamicPaint_redoModifier(Main *bmain, Scene *scene, PointerRNA *ptr) { @@ -102,7 +102,7 @@ static void rna_DynamicPaintSurface_changePreview(Main *bmain, Scene *scene, Poi DynamicPaintSurface *surface = act_surface->canvas->surfaces.first; /* since only one color surface can show preview at time - * disable preview on other surfaces*/ + * disable preview on other surfaces*/ for (; surface; surface = surface->next) { if (surface != act_surface) surface->flags &= ~MOD_DPAINT_PREVIEW; @@ -316,7 +316,7 @@ static void rna_def_canvas_surface(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; /* Effect type - * Only used by ui to view per effect settings */ + * Only used by ui to view per effect settings */ static EnumPropertyItem prop_dynamicpaint_effecttype[] = { {1, "SPREAD", 0, "Spread", ""}, {2, "DRIP", 0, "Drip", ""}, @@ -383,8 +383,8 @@ static void rna_def_canvas_surface(BlenderRNA *brna) /* - * Paint, wet and displace - */ + * Paint, wet and displace + */ prop = RNA_def_property(srna, "use_dissolve", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_DISSOLVE); @@ -406,8 +406,8 @@ static void rna_def_canvas_surface(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Dry Speed", "Approximately in how many frames should drying happen"); /* - * Simulation settings - */ + * Simulation settings + */ prop = RNA_def_property(srna, "image_resolution", PROP_INT, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 16.0, 4096.0); @@ -462,8 +462,8 @@ static void rna_def_canvas_surface(BlenderRNA *brna) RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier"); /* - * Initial Color - */ + * Initial Color + */ prop = RNA_def_property(srna, "init_color_type", PROP_ENUM, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); @@ -487,8 +487,8 @@ static void rna_def_canvas_surface(BlenderRNA *brna) RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW|ND_MODIFIER, "rna_DynamicPaintSurface_reset"); /* - * Effect Settings - */ + * Effect Settings + */ prop = RNA_def_property(srna, "effect_ui", PROP_ENUM, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_enum_items(prop, prop_dynamicpaint_effecttype); @@ -562,8 +562,8 @@ static void rna_def_canvas_surface(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Acceleration", "How much surface acceleration affects dripping"); /* - * Output settings - */ + * Output settings + */ prop = RNA_def_property(srna, "use_premultiply", PROP_BOOLEAN, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_MULALPHA); @@ -691,8 +691,8 @@ static void rna_def_dynamic_paint_canvas_settings(BlenderRNA *brna) RNA_def_struct_path_func(srna, "rna_DynamicPaintCanvasSettings_path"); /* - * Surface Slots - */ + * Surface Slots + */ prop = RNA_def_property(srna, "canvas_surfaces", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_funcs(prop, "rna_DynamicPaint_surfaces_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", NULL, NULL, NULL, NULL); RNA_def_property_struct_type(prop, "DynamicPaintSurface"); @@ -739,8 +739,8 @@ static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna) RNA_def_struct_path_func(srna, "rna_DynamicPaintBrushSettings_path"); /* - * Paint - */ + * Paint + */ prop = RNA_def_property(srna, "paint_color", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_float_sdna(prop, NULL, "r"); RNA_def_property_array(prop, 3); @@ -878,8 +878,8 @@ static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna) /* - * Particle - */ + * Particle + */ prop = RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "psys"); RNA_def_property_struct_type(prop, "ParticleSystem"); @@ -909,8 +909,8 @@ static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna) /* - * Color ramps - */ + * Color ramps + */ prop = RNA_def_property(srna, "paint_ramp", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "paint_ramp"); RNA_def_property_struct_type(prop, "ColorRamp"); diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index 21cc97bd1c0..fa8f9bf9d35 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -253,13 +253,13 @@ static void rna_def_gpencil_layer(BlenderRNA *brna) RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL); /* expose as layers.active */ - /* +#if 0 prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_ACTIVE); RNA_def_property_boolean_funcs(prop, NULL, "rna_GPencilLayer_active_set"); RNA_def_property_ui_text(prop, "Active", "Set active layer for editing"); RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL); - */ +#endif prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_SELECT); diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c index 54d258e2e72..9e7ea1379d9 100644 --- a/source/blender/makesrna/intern/rna_key.c +++ b/source/blender/makesrna/intern/rna_key.c @@ -494,11 +494,13 @@ static void rna_def_keydata(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Handle 2 Location", ""); RNA_def_property_update(prop, 0, "rna_Key_update_data"); - /* appears to be unused currently + /* appears to be unused currently */ +#if 0 prop= RNA_def_property(srna, "tilt", PROP_FLOAT, PROP_NONE); RNA_def_property_float_funcs(prop, "rna_ShapeKeyBezierPoint_tilt_get", "rna_ShapeKeyBezierPoint_tilt_set", NULL); RNA_def_property_ui_text(prop, "Tilt", ""); - RNA_def_property_update(prop, 0, "rna_Key_update_data"); */ + RNA_def_property_update(prop, 0, "rna_Key_update_data"); +#endif } static void rna_def_keyblock(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index 51fd52360e4..f33cf1a3993 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -104,8 +104,8 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_ copycu = tmpobj->data = copy_curve( (Curve *) ob->data ); /* temporarily set edit so we get updates from edit mode, but - also because for text datablocks copying it while in edit - mode gives invalid data structures */ + * also because for text datablocks copying it while in edit + * mode gives invalid data structures */ copycu->editfont = tmpcu->editfont; copycu->editnurb = tmpcu->editnurb; @@ -279,8 +279,8 @@ static void dupli_render_particle_set(Scene *scene, Object *ob, int level, int e if (level == 0 && enable) { /* this is to make sure we get render level duplis in groups: - * the derivedmesh must be created before init_render_mesh, - * since object_duplilist does dupliparticles before that */ + * the derivedmesh must be created before init_render_mesh, + * since object_duplilist does dupliparticles before that */ dm = mesh_create_derived_render(scene, ob, CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL); dm->release(dm); diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index f48224884ba..eea11aed803 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -179,7 +179,7 @@ static int rna_Brush_mode_poll(PointerRNA *ptr, PointerRNA value) int mode = 0; /* check the origin of the Paint struct to see which paint - mode to select from */ + * mode to select from */ if (ptr->data == &ts->imapaint) mode = OB_MODE_TEXTURE_PAINT; diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 779a5720645..d89af94d447 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2644,7 +2644,7 @@ static void rna_def_space_filebrowser(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Active Operator", ""); /* keep this for compatibility with existing presets, - not exposed in c++ api because of keyword conflict */ + * not exposed in c++ api because of keyword conflict */ prop = RNA_def_property(srna, "operator", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "op"); RNA_def_property_ui_text(prop, "Active Operator", ""); diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index cd9eec5abb6..18d599ca283 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -540,7 +540,7 @@ static void rna_Window_screen_update(bContext *C, PointerRNA *ptr) wmWindow *win = (wmWindow*)ptr->data; /* exception: can't set screens inside of area/region handers, and must - use context so notifier gets to the right window */ + * use context so notifier gets to the right window */ if (win->newscreen) { WM_event_add_notifier(C, NC_SCREEN|ND_SCREENBROWSE, win->newscreen); win->newscreen = NULL; diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index 9eeffcc1488..2fbec392b1e 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -66,8 +66,8 @@ static void initData(ModifierData *md) ArrayModifierData *amd = (ArrayModifierData*) md; /* default to 2 duplicates distributed along the x-axis by an - offset of 1 object-width - */ + * offset of 1 object-width + */ amd->start_cap = amd->end_cap = amd->curve_ob = amd->offset_ob = NULL; amd->count = 2; amd->offset[0] = amd->offset[1] = amd->offset[2] = 0; @@ -264,14 +264,14 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, } /* calculate the maximum number of copies which will fit within the - prescribed length */ + * prescribed length */ if(amd->fit_type == MOD_ARR_FITLENGTH || amd->fit_type == MOD_ARR_FITCURVE) { float dist = sqrt(dot_v3v3(offset[3], offset[3])); if(dist > 1e-6f) /* this gives length = first copy start to last copy end - add a tiny offset for floating point rounding errors */ + * add a tiny offset for floating point rounding errors */ count = (length + 1e-6f) / dist; else /* if the offset has no translation, just make one copy */ @@ -282,11 +282,11 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, count = 1; /* BMESH_TODO: bumping up the stack level avoids computing the normals - after every top-level operator execution (and this modifier has the - potential to execute a *lot* of top-level BMOps. There should be a - cleaner way to do this. One possibility: a "mirror" BMOp would - certainly help by compressing it all into one top-level BMOp that - executes a lot of second-level BMOps. */ + * after every top-level operator execution (and this modifier has the + * potential to execute a *lot* of top-level BMOps. There should be a + * cleaner way to do this. One possibility: a "mirror" BMOp would + * certainly help by compressing it all into one top-level BMOp that + * executes a lot of second-level BMOps. */ BMO_push(em->bm, NULL); bmesh_edit_begin(em->bm, 0); @@ -349,8 +349,8 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, BMO_op_finish(em->bm, &findop); } - /*generate merge mappping using index map. we do this by using the - operator slots as lookup arrays.*/ + /* generate merge mappping using index map. we do this by using the + * operator slots as lookup arrays.*/ #define E(i) (i) < s1->len ? _E(s1, i) : _E(s2, (i)-s1->len) for (i=0; iflags|bmd->val_flags|bmd->lim_flags|bmd->e_flags; - /*if ((options & BME_BEVEL_VWEIGHT) && bmd->defgrp_name[0]) { +#if 0 + if ((options & BME_BEVEL_VWEIGHT) && bmd->defgrp_name[0]) { defgrp_index = defgroup_name_index(ob, bmd->defgrp_name); if (defgrp_index < 0) { options &= ~BME_BEVEL_VWEIGHT; } - }*/ + } +#endif bm = BME_derivedmesh_to_bmesh(derivedData); BME_bevel(bm,bmd->value,bmd->res,options,defgrp_index,bmd->bevel_angle,NULL); diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c index 72e54754498..76560d14e3b 100644 --- a/source/blender/modifiers/intern/MOD_boolean.c +++ b/source/blender/modifiers/intern/MOD_boolean.c @@ -133,8 +133,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *result; /* when one of objects is empty (has got no faces) we could speed up - calculation a bit returning one of objects' derived meshes (or empty one) - Returning mesh is depended on modifieier's operation (sergey) */ + * calculation a bit returning one of objects' derived meshes (or empty one) + * Returning mesh is depended on modifieier's operation (sergey) */ result = get_quick_derivedMesh(derivedData, dm, bmd->operation); if(result == NULL) { @@ -151,7 +151,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, } /* if new mesh returned, return it; otherwise there was - * an error, so delete the modifier object */ + * an error, so delete the modifier object */ if(result) return result; else diff --git a/source/blender/modifiers/intern/MOD_boolean_util.c b/source/blender/modifiers/intern/MOD_boolean_util.c index 04b6bf33b1e..3fd4119c915 100644 --- a/source/blender/modifiers/intern/MOD_boolean_util.c +++ b/source/blender/modifiers/intern/MOD_boolean_util.c @@ -333,7 +333,7 @@ static void InterpCSGFace( } /* Iterate over the CSG Output Descriptors and create a new DerivedMesh - from them */ + * from them */ static DerivedMesh *ConvertCSGDescriptorsToDerivedMesh( CSG_FaceIteratorDescriptor *face_it, CSG_VertexIteratorDescriptor *vertex_it, diff --git a/source/blender/modifiers/intern/MOD_boolean_util.h b/source/blender/modifiers/intern/MOD_boolean_util.h index 8e3617cf74e..6ba4940a4e9 100644 --- a/source/blender/modifiers/intern/MOD_boolean_util.h +++ b/source/blender/modifiers/intern/MOD_boolean_util.h @@ -39,15 +39,15 @@ struct Base; struct DerivedMesh; /* Performs a boolean between two mesh objects, it is assumed that both objects - are in fact a mesh object. On success returns 1 and creates a new mesh object - into blender data structures. On failure returns 0 and reports an error. */ + * are in fact a mesh object. On success returns 1 and creates a new mesh object + * into blender data structures. On failure returns 0 and reports an error. */ int NewBooleanMesh(struct Scene *scene, struct Base *base, struct Base *base_select, int op); /* Performs a boolean between two mesh objects, it is assumed that both objects - are in fact mesh object. On success returns a DerivedMesh. On failure - returns NULL and reports an error. */ - + * are in fact mesh object. On success returns a DerivedMesh. On failure + * returns NULL and reports an error. */ + struct DerivedMesh *NewBooleanDerivedMesh(struct DerivedMesh *dm, struct Object *ob, struct DerivedMesh *dm_select, struct Object *ob_select, int int_op_type); #endif // MOD_BOOLEAN_UTILS diff --git a/source/blender/modifiers/intern/MOD_build.c b/source/blender/modifiers/intern/MOD_build.c index b7f25f126cd..a268f475bc8 100644 --- a/source/blender/modifiers/intern/MOD_build.c +++ b/source/blender/modifiers/intern/MOD_build.c @@ -192,8 +192,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob), } } - /* get the set of edges that will be in the new mesh - */ + /* get the set of edges that will be in the new mesh */ for (i = 0; i < numEdges_dst; i++) { j = BLI_ghash_size(edgeHash); diff --git a/source/blender/modifiers/intern/MOD_cast.c b/source/blender/modifiers/intern/MOD_cast.c index 7de8a8f7923..6ca3a82dd0e 100644 --- a/source/blender/modifiers/intern/MOD_cast.c +++ b/source/blender/modifiers/intern/MOD_cast.c @@ -154,8 +154,8 @@ static void sphere_do( ctrl_ob = cmd->object; /* spherify's center is {0, 0, 0} (the ob's own center in its local - * space), by default, but if the user defined a control object, - * we use its location, transformed to ob's local space */ + * space), by default, but if the user defined a control object, + * we use its location, transformed to ob's local space */ if (ctrl_ob) { if(flag & MOD_CAST_USE_OB_TRANSFORM) { invert_m4_m4(ctrl_ob->imat, ctrl_ob->obmat); @@ -171,11 +171,11 @@ static void sphere_do( /* 1) (flag was checked in the "if (ctrl_ob)" block above) */ /* 2) cmd->radius > 0.0f: only the vertices within this radius from - * the center of the effect should be deformed */ + * the center of the effect should be deformed */ if (cmd->radius > FLT_EPSILON) has_radius = 1; /* 3) if we were given a vertex group name, - * only those vertices should be affected */ + * only those vertices should be affected */ modifier_get_vgroup(ob, dm, cmd->defgrp_name, &dvert, &defgrp_index); if(flag & MOD_CAST_SIZE_FROM_RADIUS) { @@ -195,10 +195,10 @@ static void sphere_do( } /* ready to apply the effect, one vertex at a time; - * tiny optimization: the code is separated (with parts repeated) + * tiny optimization: the code is separated (with parts repeated) * in two possible cases: - * with or w/o a vgroup. With lots of if's in the code below, - * further optimization's are possible, if needed */ + * with or w/o a vgroup. With lots of if's in the code below, + * further optimization's are possible, if needed */ if (dvert) { /* with a vgroup */ MDeformVert *dv= dvert; float fac_orig = fac; @@ -321,11 +321,11 @@ static void cuboid_do( /* 1) (flag was checked in the "if (ctrl_ob)" block above) */ /* 2) cmd->radius > 0.0f: only the vertices within this radius from - * the center of the effect should be deformed */ + * the center of the effect should be deformed */ if (cmd->radius > FLT_EPSILON) has_radius = 1; /* 3) if we were given a vertex group name, - * only those vertices should be affected */ + * only those vertices should be affected */ modifier_get_vgroup(ob, dm, cmd->defgrp_name, &dvert, &defgrp_index); if (ctrl_ob) { @@ -352,12 +352,12 @@ static void cuboid_do( } else { /* get bound box */ /* We can't use the object's bound box because other modifiers - * may have changed the vertex data. */ + * may have changed the vertex data. */ INIT_MINMAX(min, max); /* Cast's center is the ob's own center in its local space, - * by default, but if the user defined a control object, we use - * its location, transformed to ob's local space. */ + * by default, but if the user defined a control object, we use + * its location, transformed to ob's local space. */ if (ctrl_ob) { float vec[3]; @@ -393,10 +393,10 @@ static void cuboid_do( bb[4][2] = bb[5][2] = bb[6][2] = bb[7][2] = max[2]; /* ready to apply the effect, one vertex at a time; - * tiny optimization: the code is separated (with parts repeated) + * tiny optimization: the code is separated (with parts repeated) * in two possible cases: - * with or w/o a vgroup. With lots of if's in the code below, - * further optimization's are possible, if needed */ + * with or w/o a vgroup. With lots of if's in the code below, + * further optimization's are possible, if needed */ if (dvert) { /* with a vgroup */ float fac_orig = fac; for (i = 0; i < numVerts; i++) { @@ -434,10 +434,10 @@ static void cuboid_do( /* The algo used to project the vertices to their * bounding box (bb) is pretty simple: * for each vertex v: - * 1) find in which octant v is in; - * 2) find which outer "wall" of that octant is closer to v; - * 3) calculate factor (var fbb) to project v to that wall; - * 4) project. */ + * 1) find in which octant v is in; + * 2) find which outer "wall" of that octant is closer to v; + * 3) calculate factor (var fbb) to project v to that wall; + * 4) project. */ /* find in which octant this vertex is in */ octant = 0; @@ -471,7 +471,7 @@ static void cuboid_do( continue; /* finally, this is the factor we wanted, to project the vertex - * to its bounding box (bb) */ + * to its bounding box (bb) */ fbb = apex[coord] / tmp_co[coord]; /* calculate the new vertex position */ diff --git a/source/blender/modifiers/intern/MOD_edgesplit.c b/source/blender/modifiers/intern/MOD_edgesplit.c index c9831959adb..481ab805c5a 100644 --- a/source/blender/modifiers/intern/MOD_edgesplit.c +++ b/source/blender/modifiers/intern/MOD_edgesplit.c @@ -115,8 +115,7 @@ static void initData(ModifierData *md) { EdgeSplitModifierData *emd = (EdgeSplitModifierData*) md; - /* default to 30-degree split angle, sharpness from both angle & flag - */ + /* default to 30-degree split angle, sharpness from both angle & flag */ emd->split_angle = 30; emd->flags = MOD_EDGESPLIT_FROMANGLE | MOD_EDGESPLIT_FROMFLAG; } diff --git a/source/blender/modifiers/intern/MOD_fluidsim_util.c b/source/blender/modifiers/intern/MOD_fluidsim_util.c index e9563b55d47..42a6f74aba5 100644 --- a/source/blender/modifiers/intern/MOD_fluidsim_util.c +++ b/source/blender/modifiers/intern/MOD_fluidsim_util.c @@ -131,11 +131,11 @@ void fluidsim_init(FluidsimModifierData *fluidmd) fss->cpsQuality = 10.0; // 1.0 / 10.0 => means 0.1 width /* - BAD TODO: this is done in buttons_object.c in the moment - Mesh *mesh = ob->data; - // calculate bounding box - fluid_get_bb(mesh->mvert, mesh->totvert, ob->obmat, fss->bbStart, fss->bbSize); - */ + * BAD TODO: this is done in buttons_object.c in the moment + * Mesh *mesh = ob->data; + * // calculate bounding box + * fluid_get_bb(mesh->mvert, mesh->totvert, ob->obmat, fss->bbStart, fss->bbSize); + */ fss->meshVelocities = NULL; diff --git a/source/blender/modifiers/intern/MOD_multires.c b/source/blender/modifiers/intern/MOD_multires.c index 769ad864d98..00572eaad86 100644 --- a/source/blender/modifiers/intern/MOD_multires.c +++ b/source/blender/modifiers/intern/MOD_multires.c @@ -96,7 +96,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *dm, } else if(sculpting) { /* would be created on the fly too, just nicer this - way on first stroke after e.g. switching levels */ + * way on first stroke after e.g. switching levels */ ss->pbvh= result->getPBVH(ob, result); } diff --git a/source/blender/modifiers/intern/MOD_particlesystem.c b/source/blender/modifiers/intern/MOD_particlesystem.c index 10e43afebe2..ad8642497fb 100644 --- a/source/blender/modifiers/intern/MOD_particlesystem.c +++ b/source/blender/modifiers/intern/MOD_particlesystem.c @@ -111,7 +111,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) } /* particles only need this if they are after a non deform modifier, and - * the modifier stack will only create them in that case. */ + * the modifier stack will only create them in that case. */ dataMask |= CD_MASK_ORIGSPACE_MLOOP|CD_MASK_ORIGINDEX; dataMask |= CD_MASK_ORCO; diff --git a/source/blender/modifiers/intern/MOD_remesh.c b/source/blender/modifiers/intern/MOD_remesh.c index ec893a3bf44..a608defc434 100644 --- a/source/blender/modifiers/intern/MOD_remesh.c +++ b/source/blender/modifiers/intern/MOD_remesh.c @@ -90,7 +90,7 @@ static void init_dualcon_mesh(DualConInput *mesh, DerivedMesh *dm) } /* simple structure to hold the output: a CDDM and two counters to - keep track of the current elements */ + * keep track of the current elements */ typedef struct { DerivedMesh *dm; int curvert, curface; diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c index 496d41b1550..f88c49fc6d7 100644 --- a/source/blender/modifiers/intern/MOD_screw.c +++ b/source/blender/modifiers/intern/MOD_screw.c @@ -543,19 +543,22 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, ed_loop_flip= 0; } - }/* else { + } +#if 0 + else { printf("No Connected ___\n"); - }*/ + } +#endif /*printf("flip direction %i\n", ed_loop_flip);*/ /* switch the flip option if set * note: flip is now done at face level so copying vgroup slizes is easier */ - /* +#if 0 if (do_flip) ed_loop_flip= !ed_loop_flip; - */ +#endif if (angle < 0.0f) ed_loop_flip= !ed_loop_flip; diff --git a/source/blender/modifiers/intern/MOD_simpledeform.c b/source/blender/modifiers/intern/MOD_simpledeform.c index 88c21eea806..9fb72bb4abc 100644 --- a/source/blender/modifiers/intern/MOD_simpledeform.c +++ b/source/blender/modifiers/intern/MOD_simpledeform.c @@ -315,7 +315,7 @@ static void deformVerts(ModifierData *md, Object *ob, CustomDataMask dataMask = requiredDataMask(ob, md); /* we implement requiredDataMask but thats not really useful since - mesh_calc_modifiers pass a NULL derivedData */ + * mesh_calc_modifiers pass a NULL derivedData */ if(dataMask) dm= get_dm(ob, NULL, dm, NULL, 0); @@ -335,7 +335,7 @@ static void deformVertsEM(ModifierData *md, Object *ob, CustomDataMask dataMask = requiredDataMask(ob, md); /* we implement requiredDataMask but thats not really useful since - mesh_calc_modifiers pass a NULL derivedData */ + * mesh_calc_modifiers pass a NULL derivedData */ if(dataMask) dm= get_dm(ob, editData, dm, NULL, 0); diff --git a/source/blender/modifiers/intern/MOD_smooth.c b/source/blender/modifiers/intern/MOD_smooth.c index 01b012655d0..7b7597af6d6 100644 --- a/source/blender/modifiers/intern/MOD_smooth.c +++ b/source/blender/modifiers/intern/MOD_smooth.c @@ -124,7 +124,7 @@ static void smoothModifier_do( modifier_get_vgroup(ob, dm, smd->defgrp_name, &dvert, &defgrp_index); /* NOTICE: this can be optimized a little bit by moving the - * if (dvert) out of the loop, if needed */ + * if (dvert) out of the loop, if needed */ for (j = 0; j < smd->repeat; j++) { for (i = 0; i < numDMEdges; i++) { float fvec[3]; diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c index 78178387ee9..b7c820991f1 100644 --- a/source/blender/modifiers/intern/MOD_solidify.c +++ b/source/blender/modifiers/intern/MOD_solidify.c @@ -77,11 +77,11 @@ static void dm_calc_normal(DerivedMesh *dm, float (*temp_nors)[3]) /* we don't want to overwrite any referenced layers */ - /* - Doesn't work here! + /* Doesn't work here! */ +#if 0 mv = CustomData_duplicate_referenced_layer(&dm->vertData, CD_MVERT, numVerts); cddm->mvert = mv; - */ +#endif face_nors = CustomData_get_layer(&dm->polyData, CD_NORMAL); if(!face_nors) { diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c index 5f8c29944bd..11bf5bc6edf 100644 --- a/source/blender/modifiers/intern/MOD_util.c +++ b/source/blender/modifiers/intern/MOD_util.c @@ -65,9 +65,9 @@ void get_texture_value(Tex *texture, float *tex_co, TexResult *texres) result_type = multitex_ext_safe(texture, tex_co, texres); /* if the texture gave an RGB value, we assume it didn't give a valid - * intensity, so calculate one (formula from do_material_tex). - * if the texture didn't give an RGB value, copy the intensity across - */ + * intensity, so calculate one (formula from do_material_tex). + * if the texture didn't give an RGB value, copy the intensity across + */ if(result_type & TEX_RGB) texres->tin = (0.35f * texres->tr + 0.45f * texres->tg + 0.2f * texres->tb); diff --git a/source/blender/modifiers/intern/MOD_uvproject.c b/source/blender/modifiers/intern/MOD_uvproject.c index e5fa0a323df..cd4858fcb4d 100644 --- a/source/blender/modifiers/intern/MOD_uvproject.c +++ b/source/blender/modifiers/intern/MOD_uvproject.c @@ -315,9 +315,7 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd, } while (fidx--); } } else { - /* multiple projectors, select the closest to face normal - * direction - */ + /* multiple projectors, select the closest to face normal direction */ float face_no[3]; int j; Projector *best_projector; @@ -327,8 +325,8 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd, mesh_calc_poly_normal_coords(mp, mloop + mp->loopstart, (const float (*)[3])coords, face_no); /* find the projector which the face points at most directly - * (projector normal with largest dot product is best) - */ + * (projector normal with largest dot product is best) + */ best_dot = dot_v3v3(projectors[0].normal, face_no); best_projector = &projectors[0]; diff --git a/source/blender/nodes/shader/node_shader_tree.c b/source/blender/nodes/shader/node_shader_tree.c index e4f21a474c0..e12ac4dee49 100644 --- a/source/blender/nodes/shader/node_shader_tree.c +++ b/source/blender/nodes/shader/node_shader_tree.c @@ -248,10 +248,10 @@ void ntreeShaderEndExecTree(bNodeTreeExec *exec, int use_tree_data) void ntreeShaderExecTree(bNodeTree *ntree, ShadeInput *shi, ShadeResult *shr) { ShaderCallData scd; - /* - \note: preserve material from ShadeInput for material id, nodetree execs change it - fix for bug "[#28012] Mat ID messy with shader nodes" - */ + /** + * \note: preserve material from ShadeInput for material id, nodetree execs change it + * fix for bug "[#28012] Mat ID messy with shader nodes" + */ Material *mat = shi->mat; bNodeThreadStack *nts = NULL; bNodeTreeExec *exec = ntree->execdata; diff --git a/source/blender/nodes/shader/nodes/node_shader_dynamic.c b/source/blender/nodes/shader/nodes/node_shader_dynamic.c index e55b1b164df..0c6c53b38e4 100644 --- a/source/blender/nodes/shader/nodes/node_shader_dynamic.c +++ b/source/blender/nodes/shader/nodes/node_shader_dynamic.c @@ -654,7 +654,7 @@ static void node_dynamic_setup(bNode *node) * 0: for loaded empty nodes * NODE_DYNAMIC_MENU: for the default Dynamic node type * > NODE_DYNAMIC_MENU: for the new types defined by scripts -*/ + */ static void node_dynamic_init_cb(bNode *node) { int type = node->custom2; @@ -718,8 +718,10 @@ static void node_dynamic_exec_cb(void *data, bNode *node, bNodeStack **in, bNode if (!node->id) return; - /*if (G.scene->r.threads > 1) - return;*/ +#if 0 + if (G.scene->r.threads > 1) + return; +#endif if (BTST2(node->custom1, NODE_DYNAMIC_NEW, NODE_DYNAMIC_REPARSE)) { node_dynamic_setup(node); diff --git a/source/blender/nodes/shader/nodes/node_shader_output.c b/source/blender/nodes/shader/nodes/node_shader_output.c index 4a4a2010d59..8b0e9a5803b 100644 --- a/source/blender/nodes/shader/nodes/node_shader_output.c +++ b/source/blender/nodes/shader/nodes/node_shader_output.c @@ -69,8 +69,10 @@ static int gpu_shader_output(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack { GPUNodeLink *outlink; - /*if(in[1].hasinput) - GPU_material_enable_alpha(mat);*/ +#if 0 + if(in[1].hasinput) + GPU_material_enable_alpha(mat); +#endif GPU_stack_link(mat, "output_node", in, out, &outlink); GPU_material_output_link(mat, outlink); diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c index 238ba8cc11a..9e373fc8048 100644 --- a/source/blender/python/generic/py_capi_utils.c +++ b/source/blender/python/generic/py_capi_utils.c @@ -429,7 +429,7 @@ PyObject *PyC_UnicodeFromByte(const char *str) * note: this overwrites __main__ which gives problems with nested calles. * be sure to run PyC_MainModule_Backup & PyC_MainModule_Restore if there is * any chance that python is in the call stack. -*****************************************************************************/ + ****************************************************************************/ PyObject *PyC_DefaultNameSpace(const char *filename) { PyInterpreterState *interp= PyThreadState_GET()->interp; diff --git a/source/blender/python/intern/gpu.c b/source/blender/python/intern/gpu.c index 9c1fc07108a..552abaaf414 100644 --- a/source/blender/python/intern/gpu.c +++ b/source/blender/python/intern/gpu.c @@ -70,7 +70,7 @@ static struct PyModuleDef gpumodule = { "gpu", /* name of module */ M_gpu_doc, /* module documentation */ -1, /* size of per-interpreter state of the module, - or -1 if the module keeps state in global variables. */ + * or -1 if the module keeps state in global variables. */ NULL, NULL, NULL, NULL, NULL }; diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c index 2dd1d256b01..8e4d3955c80 100644 --- a/source/blender/python/mathutils/mathutils.c +++ b/source/blender/python/mathutils/mathutils.c @@ -163,7 +163,7 @@ int mathutils_array_parse_alloc(float **array, int array_min, PyObject *value, c #endif { PyObject *value_fast = NULL; - //*array = NULL; + // *array = NULL; /* non list/tuple cases */ if (!(value_fast = PySequence_Fast(value, error_prefix))) { diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c index 46663f55be6..6a7ace9c2a4 100644 --- a/source/blender/python/mathutils/mathutils_Vector.c +++ b/source/blender/python/mathutils/mathutils_Vector.c @@ -788,7 +788,7 @@ static PyObject *Vector_to_track_quat(VectorObject *self, PyObject *args) /* * flip vector around, since vectoquat expect a vector from target to tracking object * and the python function expects the inverse (a vector to the target). - */ + */ negate_v3_v3(vec, self->vec); vec_to_quat(quat, vec, track, up); @@ -2720,7 +2720,7 @@ static struct PyMethodDef Vector_methods[] = { * Py_TPFLAGS_CHECKTYPES allows us to avoid casting all types to Vector when coercing * but this means for eg that * (vec * mat) and (mat * vec) both get sent to Vector_mul and it neesd to sort out the order -*/ + */ PyDoc_STRVAR(vector_doc, "This object gives access to Vectors in Blender." diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h index a670446189e..b81066201e7 100644 --- a/source/blender/render/extern/include/RE_pipeline.h +++ b/source/blender/render/extern/include/RE_pipeline.h @@ -58,12 +58,12 @@ struct EnvMap; typedef struct Render Render; /* Render Result usage: - -- render engine allocates/frees and delivers raw floating point rects -- right now it's full rects, but might become tiles or file -- the display client has to allocate display rects, sort out what to display, - and how it's converted -*/ + * + * - render engine allocates/frees and delivers raw floating point rects + * - right now it's full rects, but might become tiles or file + * - the display client has to allocate display rects, sort out what to display, + * and how it's converted + */ typedef struct RenderPass { struct RenderPass *next, *prev; diff --git a/source/blender/render/intern/include/pixelblending.h b/source/blender/render/intern/include/pixelblending.h index 16d67fb95fe..97d41107856 100644 --- a/source/blender/render/intern/include/pixelblending.h +++ b/source/blender/render/intern/include/pixelblending.h @@ -33,7 +33,7 @@ /** -* add 1 pixel to into filtered three lines + * add 1 pixel to into filtered three lines * (float vecs to float vec) */ void add_filt_fmask(unsigned int mask, float *col, float *rowbuf, int row_w); diff --git a/source/blender/render/intern/include/pixelshading.h b/source/blender/render/intern/include/pixelshading.h index c0adc36f3a3..00d731912b6 100644 --- a/source/blender/render/intern/include/pixelshading.h +++ b/source/blender/render/intern/include/pixelshading.h @@ -25,15 +25,10 @@ /** \file blender/render/intern/include/pixelshading.h * \ingroup render + * + * These functions determine what actual color a pixel will have. */ - -/* pixelshading.h -* -* These functions determine what actual color a pixel will have. -*/ - - #ifndef __PIXELSHADING_H__ #define __PIXELSHADING_H__ diff --git a/source/blender/render/intern/include/rayintersection.h b/source/blender/render/intern/include/rayintersection.h index 934bf92db8f..4dceae56a4c 100644 --- a/source/blender/render/intern/include/rayintersection.h +++ b/source/blender/render/intern/include/rayintersection.h @@ -59,7 +59,7 @@ typedef struct RayHint { typedef struct Isect { /* ray start, direction (normalized vector), and max distance. on hit, - the distance is modified to be the distance to the hit point. */ + * the distance is modified to be the distance to the hit point. */ float start[3]; float dir[3]; float dist; diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h index 4c0a1b26dd6..74255560025 100644 --- a/source/blender/render/intern/include/render_types.h +++ b/source/blender/render/intern/include/render_types.h @@ -131,8 +131,8 @@ struct Render /* a list of RenderResults, for fullsample */ ListBase fullresult; /* read/write mutex, all internal code that writes to re->result must use a - write lock, all external code must use a read lock. internal code is assumed - to not conflict with writes, so no lock used for that */ + * write lock, all external code must use a read lock. internal code is assumed + * to not conflict with writes, so no lock used for that */ ThreadRWMutex resultmutex; /* window size, display rect, viewplane */ @@ -149,7 +149,7 @@ struct Render /* real maximum amount of xparts/yparts after correction for minimum */ int xparts, yparts; /* real maximum size of parts after correction for minimum - partx*xparts can be larger than rectx, in that case last part is smaller */ + * partx*xparts can be larger than rectx, in that case last part is smaller */ int partx, party; /* values for viewing */ @@ -229,8 +229,8 @@ struct Render ListBase volume_precache_parts; /* arena for allocating data for use during render, for - * example dynamic TFaces to go in the VlakRen structure. - */ + * example dynamic TFaces to go in the VlakRen structure. + */ struct MemArena *memArena; /* callbacks */ diff --git a/source/blender/render/intern/raytrace/bvh.h b/source/blender/render/intern/raytrace/bvh.h index 6eaad444ed4..ac86a65ff0b 100644 --- a/source/blender/render/intern/raytrace/bvh.h +++ b/source/blender/render/intern/raytrace/bvh.h @@ -267,7 +267,7 @@ static int bvh_node_stack_raycast_simd(Node *root, Isect *isec) const __m128 Y2Z2Y3Z3 = _mm_shuffle_ps( _mm_load_ps(bb2+4), _mm_load_ps(bb3+4), _MM_SHUFFLE(1,0,1,0) ); t_bb[4] = _mm_shuffle_ps( Y0Z0Y1Z1, Y2Z2Y3Z3, _MM_SHUFFLE(2,0,2,0) ); t_bb[5] = _mm_shuffle_ps( Y0Z0Y1Z1, Y2Z2Y3Z3, _MM_SHUFFLE(3,1,3,1) ); -/* +#if 0 for(int i=0; i<4; i++) { Node *t = stack[stack_pos+i]; @@ -282,7 +282,7 @@ static int bvh_node_stack_raycast_simd(Node *root, Isect *isec) bb[4*5] = t->bb[5]; t_node[i] = t->child; } -*/ +#endif RE_RC_COUNT(isec->raycounter->simd_bb.test); int res = test_bb_group4( t_bb, isec ); @@ -333,7 +333,7 @@ static int bvh_node_stack_raycast_simd(Node *root, Isect *isec) /* * recursively transverse a BVH looking for a rayhit using system stack */ -/* +#if 0 template static int bvh_node_raycast(Node *node, Isect *isec) { @@ -378,7 +378,7 @@ static int bvh_node_raycast(Node *node, Isect *isec) } return hit; } -*/ +#endif template void bvh_dfs_make_hint(Node *node, LCTSHint *hint, int reserve_space, HintObject *hintObject) diff --git a/source/blender/render/intern/raytrace/rayobject.cpp b/source/blender/render/intern/raytrace/rayobject.cpp index 26c0105b624..3f675a1b9ab 100644 --- a/source/blender/render/intern/raytrace/rayobject.cpp +++ b/source/blender/render/intern/raytrace/rayobject.cpp @@ -45,10 +45,10 @@ #include "render_types.h" /* RayFace - - note we force always inline here, because compiler refuses to otherwise - because function is too long. Since this is code that is called billions - of times we really do want to inline. */ + * + * note we force always inline here, because compiler refuses to otherwise + * because function is too long. Since this is code that is called billions + * of times we really do want to inline. */ MALWAYS_INLINE RayObject* rayface_from_coords(RayFace *rayface, void *ob, void *face, float *v1, float *v2, float *v3, float *v4) @@ -283,7 +283,7 @@ MALWAYS_INLINE int isec_tri_quad_neighbour(float start[3], float dir[3], RayFace } /* RayFace intersection with checks and neighbor verifaction included, - Isect is modified if the face is hit. */ + * Isect is modified if the face is hit. */ MALWAYS_INLINE int intersect_rayface(RayObject *hit_obj, RayFace *face, Isect *is) { @@ -321,7 +321,7 @@ MALWAYS_INLINE int intersect_rayface(RayObject *hit_obj, RayFace *face, Isect *i if(ok) { /* when a shadow ray leaves a face, it can be little outside the edges - of it, causing intersection to be detected in its neighbor face */ + * of it, causing intersection to be detected in its neighbor face */ if(is->skip & RE_SKIP_VLR_NEIGHBOUR) { if(dist < 0.1f && is->orig.ob == face->ob) @@ -330,8 +330,8 @@ MALWAYS_INLINE int intersect_rayface(RayObject *hit_obj, RayFace *face, Isect *i VlakRen * b = (VlakRen*)face->face; /* so there's a shared edge or vertex, let's intersect ray with - face itself, if that's true we can safely return 1, otherwise - we assume the intersection is invalid, 0 */ + * face itself, if that's true we can safely return 1, otherwise + * we assume the intersection is invalid, 0 */ if(a->v1==b->v1 || a->v2==b->v1 || a->v3==b->v1 || a->v4==b->v1 || a->v1==b->v2 || a->v2==b->v2 || a->v3==b->v2 || a->v4==b->v2 || a->v1==b->v3 || a->v2==b->v3 || a->v3==b->v3 || a->v4==b->v3 diff --git a/source/blender/render/intern/raytrace/rayobject_hint.h b/source/blender/render/intern/raytrace/rayobject_hint.h index 9e505b68101..3689aa8ac17 100644 --- a/source/blender/render/intern/raytrace/rayobject_hint.h +++ b/source/blender/render/intern/raytrace/rayobject_hint.h @@ -49,7 +49,7 @@ inline int hint_test_bb(HintBB *obj, float *Nmin, float *Nmax) else return HINT_ACCEPT; } -/* +#if 0 struct HintFrustum { float co[3]; @@ -69,7 +69,6 @@ inline int hint_test_bb(HintFrustum &obj, float *Nmin, float *Nmax) return HINT_ACCEPT; } -*/ - #endif +#endif /* __RAYOBJECT_HINT_H__ */ diff --git a/source/blender/render/intern/raytrace/rayobject_internal.h b/source/blender/render/intern/raytrace/rayobject_internal.h index 8e39b687b34..8c8e432b6bd 100644 --- a/source/blender/render/intern/raytrace/rayobject_internal.h +++ b/source/blender/render/intern/raytrace/rayobject_internal.h @@ -33,40 +33,40 @@ typedef struct RayObjectControl { int RE_rayobjectcontrol_test_break(RayObjectControl *c); /* RayObject - - A ray object is everything where we can cast rays like: - * a face/triangle - * an octree - * a bvh tree - * an octree of bvh's - * a bvh of bvh's - - - All types of RayObjects can be created by implementing the - callbacks of the RayObject. - - Due to high computing time evolved with casting on faces - there is a special type of RayObject (named RayFace) - which won't use callbacks like other generic nodes. - - In order to allow a mixture of RayFace+RayObjects, - all RayObjects must be 4byte aligned, allowing us to use the - 2 least significant bits (with the mask 0x03) to define the - type of RayObject. - - This leads to 4 possible types of RayObject: - - addr&3 - type of object - 0 Self (reserved for each structure) - 1 RayFace (tri/quad primitive) - 2 RayObject (generic with API callbacks) - 3 VlakPrimitive - (vlak primitive - to be used when we have a vlak describing the data - eg.: on render code) - - 0 means it's reserved and has it own meaning inside each ray acceleration structure - (this way each structure can use the allign offset to determine if a node represents a - RayObject primitive, which can be used to save memory) + * + * A ray object is everything where we can cast rays like: + * * a face/triangle + * * an octree + * * a bvh tree + * * an octree of bvh's + * * a bvh of bvh's + * + * + * All types of RayObjects can be created by implementing the + * callbacks of the RayObject. + * + * Due to high computing time evolved with casting on faces + * there is a special type of RayObject (named RayFace) + * which won't use callbacks like other generic nodes. + * + * In order to allow a mixture of RayFace+RayObjects, + * all RayObjects must be 4byte aligned, allowing us to use the + * 2 least significant bits (with the mask 0x03) to define the + * type of RayObject. + * + * This leads to 4 possible types of RayObject: + * + * addr&3 - type of object + * 0 Self (reserved for each structure) + * 1 RayFace (tri/quad primitive) + * 2 RayObject (generic with API callbacks) + * 3 VlakPrimitive + * (vlak primitive - to be used when we have a vlak describing the data + * eg.: on render code) + * + * 0 means it's reserved and has it own meaning inside each ray acceleration structure + * (this way each structure can use the allign offset to determine if a node represents a + * RayObject primitive, which can be used to save memory) */ /* used to test the type of ray object */ diff --git a/source/blender/render/intern/raytrace/rayobject_octree.cpp b/source/blender/render/intern/raytrace/rayobject_octree.cpp index 648cb940af4..3e2c60cfcc0 100644 --- a/source/blender/render/intern/raytrace/rayobject_octree.cpp +++ b/source/blender/render/intern/raytrace/rayobject_octree.cpp @@ -29,7 +29,7 @@ /* IMPORTANT NOTE: this code must be independent of any other render code - to use it outside the renderer! */ + * to use it outside the renderer! */ #include #include @@ -805,9 +805,9 @@ static int cliptest(float p, float q, float *u1, float *u2) } /* extensive coherence checks/storage cancels out the benefit of it, and gives errors... we - need better methods, sample code commented out below (ton) */ + * need better methods, sample code commented out below (ton) */ -/* +#if 0 in top: static int coh_nodes[16*16*16][6]; in makeoctree: memset(coh_nodes, 0, sizeof(coh_nodes)); @@ -832,7 +832,7 @@ static int do_coherence_test(int ocx1, int ocx2, int ocy1, int ocy2, int ocz1, i return 0; } -*/ +#endif /* return 1: found valid intersection */ /* starts with is->orig.face */ @@ -986,7 +986,7 @@ static int RE_rayobject_octree_intersect(RayObject *tree, Isect *is) vec2[2]= oz1; /* this loop has been constructed to make sure the first and last node of ray - are always included, even when ddalabda==1.0f or larger */ + * are always included, even when ddalabda==1.0f or larger */ while(TRUE) { @@ -1013,7 +1013,7 @@ static int RE_rayobject_octree_intersect(RayObject *tree, Isect *is) labdao= ddalabda; /* traversing ocree nodes need careful detection of smallest values, with proper - exceptions for equal labdas */ + * exceptions for equal labdas */ eqval= (labdax==labday); if(labday==labdaz) eqval += 2; if(labdax==labdaz) eqval += 4; diff --git a/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp b/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp index dc75ed5e37b..6988e3fcc38 100644 --- a/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp +++ b/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp @@ -105,8 +105,8 @@ void rtbuild_add(RTBuilder *b, RayObject *o) RE_rayobject_merge_bb(o, bb, bb+3); /* skip objects with invalid bounding boxes, nan causes DO_MINMAX - to do nothing, so we get these invalid values. this shouldn't - happen usually, but bugs earlier in the pipeline can cause it. */ + * to do nothing, so we get these invalid values. this shouldn't + * happen usually, but bugs earlier in the pipeline can cause it. */ if(bb[0] > bb[3] || bb[1] > bb[4] || bb[2] > bb[5]) return; /* skip objects with inf bounding boxes */ @@ -115,7 +115,7 @@ void rtbuild_add(RTBuilder *b, RayObject *o) if(!finite(bb[3]) || !finite(bb[4]) || !finite(bb[5])) return; /* skip objects with zero bounding box, they are of no use, and - will give problems in rtbuild_heuristic_object_split later */ + * will give problems in rtbuild_heuristic_object_split later */ if(bb[0] == bb[3] && bb[1] == bb[4] && bb[2] == bb[5]) return; @@ -205,7 +205,7 @@ void rtbuild_merge_bb(RTBuilder *b, float *min, float *max) DO_MAX(b->bb+3, max); } -/* +#if 0 int rtbuild_get_largest_axis(RTBuilder *b) { rtbuild_calc_bb(b); @@ -269,13 +269,13 @@ int rtbuild_mean_split_largest_axis(RTBuilder *b, int nchilds) int axis = rtbuild_get_largest_axis(b); return rtbuild_mean_split(b, nchilds, axis); } -*/ +#endif /* * "separators" is an array of dim NCHILDS-1 * and indicates where to cut the childs */ -/* +#if 0 int rtbuild_median_split(RTBuilder *b, float *separators, int nchilds, int axis) { int size = rtbuild_size(b); @@ -318,7 +318,7 @@ int rtbuild_median_split_largest_axis(RTBuilder *b, int nchilds) return rtbuild_median_split(b, separators, nchilds, la); } -*/ +#endif //Heuristics Object Splitter @@ -454,7 +454,7 @@ int rtbuild_heuristic_object_split(RTBuilder *b, int nchilds) * PARTITION code / used on mean-split * basicly this a std::nth_element (like on C++ STL algorithm) */ -/* +#if 0 static void split_leafs(RTBuilder *b, int *nth, int partitions, int split_axis) { int i; @@ -469,7 +469,7 @@ static void split_leafs(RTBuilder *b, int *nth, int partitions, int split_axis) if(split_axis == 2) std::nth_element(b, nth[i], nth[i+1], nth[partitions], obj_bb_compare); } } -*/ +#endif /* * Bounding Box utils diff --git a/source/blender/render/intern/raytrace/vbvh.h b/source/blender/render/intern/raytrace/vbvh.h index ab6a1bbfd33..7d4d25c8d00 100644 --- a/source/blender/render/intern/raytrace/vbvh.h +++ b/source/blender/render/intern/raytrace/vbvh.h @@ -65,14 +65,17 @@ inline static void bvh_node_push_childs(Node *node, Isect *UNUSED(isec), Node ** { while(child) { - //Skips BB tests on primitives -/* - if(is_leaf(child->child)) + /* Skips BB tests on primitives */ +#if 0 + if(is_leaf(child->child)) { stack[stack_pos++] = child->child; + } else -*/ +#endif + { stack[stack_pos++] = child; - + } + child = child->sibling; } } @@ -197,7 +200,7 @@ struct BuildBinaryVBVH } }; -/* +#if 0 template struct Reorganize_VBVH { @@ -242,4 +245,4 @@ struct Reorganize_VBVH return node; } }; -*/ +#endif diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index 89e10cf37eb..1501c6ca4b3 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -126,7 +126,7 @@ /* ------------------------------------------------------------------------- */ /* Stuff for stars. This sits here because it uses gl-things. Part of -this code may move down to the converter. */ + * this code may move down to the converter. */ /* ------------------------------------------------------------------------- */ /* this is a bad beast, since it is misused by the 3d view drawing as well. */ @@ -149,10 +149,10 @@ static HaloRen *initstar(Render *re, ObjectRen *obr, float *vec, float hasize) } /* there must be a 'fixed' amount of stars generated between -* near and far -* all stars must by preference lie on the far and solely -* differ in clarity/color -*/ + * near and far + * all stars must by preference lie on the far and solely + * differ in clarity/color + */ void RE_make_stars(Render *re, Scene *scenev3d, void (*initfunc)(void), void (*vertexfunc)(float*), void (*termfunc)(void)) @@ -199,10 +199,10 @@ void RE_make_stars(Render *re, Scene *scenev3d, void (*initfunc)(void), else unit_m4(mat); /* BOUNDING BOX CALCULATION - * bbox goes from z = loc_near_var | loc_far_var, - * x = -z | +z, - * y = -z | +z - */ + * bbox goes from z = loc_near_var | loc_far_var, + * x = -z | +z, + * y = -z | +z + */ camera= re ? RE_GetCamera(re) : scene->camera; @@ -250,9 +250,9 @@ void RE_make_stars(Render *re, Scene *scenev3d, void (*initfunc)(void), mul_m4_v3(re->viewmat, vec); /* in vec are global coordinates - * calculate distance to camera - * and using that, define the alpha - */ + * calculate distance to camera + * and using that, define the alpha + */ { float tx, ty, tz; @@ -321,7 +321,7 @@ void RE_make_stars(Render *re, Scene *scenev3d, void (*initfunc)(void), /* ------------------------------------------------------------------------- */ /* tool functions/defines for ad hoc simplification and possible future - cleanup */ + * cleanup */ /* ------------------------------------------------------------------------- */ #define UVTOINDEX(u,v) (startvlak + (u) * sizev + (v)) @@ -514,8 +514,8 @@ static void calc_tangent_vector(ObjectRen *obr, VertexTangent **vtangents, MemAr /**************************************************************** -************ tangent space generation interface ***************** -****************************************************************/ + ************ tangent space generation interface **************** + ****************************************************************/ typedef struct { @@ -608,7 +608,7 @@ static void calc_vertexnormals(Render *UNUSED(re), ObjectRen *obr, int do_tangen } /* calculate cos of angles and point-masses, use as weight factor to - add face normal to vertex */ + * add face normal to vertex */ for(a=0; atotvlak; a++) { VlakRen *vlr= RE_findOrAddVlak(obr, a); if(vlr->flag & ME_SMOOTH) { @@ -2316,7 +2316,7 @@ static void displace_render_vert(Render *re, ObjectRen *obr, ShadeInput *shi, Ve //printf("after co=%f, %f, %f\n", vr->co[0], vr->co[1], vr->co[2]); /* we just don't do this vertex again, bad luck for other face using same vertex with - different material... */ + * different material... */ vr->flag |= 1; /* Pass sample back so displace_face can decide which way to split the quad */ @@ -2334,7 +2334,7 @@ static void displace_render_face(Render *re, ObjectRen *obr, VlakRen *vlr, float ShadeInput shi; /* Warning, This is not that nice, and possibly a bit slow, - however some variables were not initialized properly in, unless using shade_input_initialize(...), we need to do a memset */ + * however some variables were not initialized properly in, unless using shade_input_initialize(...), we need to do a memset */ memset(&shi, 0, sizeof(ShadeInput)); /* end warning! - Campbell */ @@ -4054,8 +4054,8 @@ static void set_phong_threshold(ObjectRen *obr) int tot=0, i; /* Added check for 'pointy' situations, only dotproducts of 0.9 and larger - are taken into account. This threshold is meant to work on smooth geometry, not - for extreme cases (ton) */ + * are taken into account. This threshold is meant to work on smooth geometry, not + / for extreme cases (ton) */ for(i=0; itotvlak; i++) { vlr= RE_findOrAddVlak(obr, i); @@ -4094,7 +4094,7 @@ static void set_phong_threshold(ObjectRen *obr) } /* per face check if all samples should be taken. - if raytrace or multisample, do always for raytraced material, or when material full_osa set */ + * if raytrace or multisample, do always for raytraced material, or when material full_osa set */ static void set_fullsample_trace_flag(Render *re, ObjectRen *obr) { VlakRen *vlr; diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c index a45bb63ff06..f9641ed9fbe 100644 --- a/source/blender/render/intern/source/envmap.c +++ b/source/blender/render/intern/source/envmap.c @@ -295,8 +295,8 @@ static void env_rotate_scene(Render *re, float mat[][4], int mode) lar= go->lampren; /* removed here some horrible code of someone in NaN who tried to fix - prototypes... just solved by introducing a correct cmat[3][3] instead - of using smat. this works, check square spots in reflections (ton) */ + * prototypes... just solved by introducing a correct cmat[3][3] instead + * of using smat. this works, check square spots in reflections (ton) */ copy_m3_m3(cmat, lar->imat); mul_m3_m3m3(lar->imat, cmat, imat); @@ -330,12 +330,12 @@ static void env_layerflags(Render *re, unsigned int notlay) int a; /* invert notlay, so if face is in multiple layers it will still be visible, - unless all 'notlay' bits match the face bits. - face: 0110 - not: 0100 - ~not: 1011 - now (face & ~not) is true - */ + * unless all 'notlay' bits match the face bits. + * face: 0110 + * not: 0100 + * ~not: 1011 + * now (face & ~not) is true + */ notlay= ~notlay; diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c index 2d64828b6b3..4a6558474f0 100644 --- a/source/blender/render/intern/source/imagetexture.c +++ b/source/blender/render/intern/source/imagetexture.c @@ -455,7 +455,7 @@ static float clipy_rctf(rctf *rf, float y1, float y2) static void boxsampleclip(struct ImBuf *ibuf, rctf *rf, TexResult *texres) { /* sample box, is clipped already, and minx etc. have been set at ibuf size. - Enlarge with antialiased edges of the pixels */ + * Enlarge with antialiased edges of the pixels */ float muly, mulx, div, col[4]; int x, y, startx, endx, starty, endy; diff --git a/source/blender/render/intern/source/occlusion.c b/source/blender/render/intern/source/occlusion.c index c9729aecfae..47b13cd484d 100644 --- a/source/blender/render/intern/source/occlusion.c +++ b/source/blender/render/intern/source/occlusion.c @@ -235,9 +235,9 @@ static void occ_build_shade(Render *re, OcclusionTree *tree) /* ------------------------- Spherical Harmonics --------------------------- */ /* Use 2nd order SH => 9 coefficients, stored in this order: - 0 = (0,0), - 1 = (1,-1), 2 = (1,0), 3 = (1,1), - 4 = (2,-2), 5 = (2,-1), 6 = (2,0), 7 = (2,1), 8 = (2,2) */ + * 0 = (0,0), + * 1 = (1,-1), 2 = (1,0), 3 = (1,1), + * 4 = (2,-2), 5 = (2,-1), 6 = (2,0), 7 = (2,1), 8 = (2,2) */ static void sh_copy(float *shresult, float *sh) { @@ -263,7 +263,7 @@ static void sh_add(float *shresult, float *sh1, float *sh2) static void sh_from_disc(float *n, float area, float *shresult) { /* See formula (3) in: - "An Efficient Representation for Irradiance Environment Maps" */ + * "An Efficient Representation for Irradiance Environment Maps" */ float sh[9], x, y, z; x= n[0]; @@ -289,7 +289,7 @@ static void sh_from_disc(float *n, float area, float *shresult) static float sh_eval(float *sh, float *v) { /* See formula (13) in: - "An Efficient Representation for Irradiance Environment Maps" */ + * "An Efficient Representation for Irradiance Environment Maps" */ static const float c1 = 0.429043f, c2 = 0.511664f, c3 = 0.743125f; static const float c4 = 0.886227f, c5 = 0.247708f; float x, y, z, sum; @@ -1307,12 +1307,14 @@ static void occ_lookup(OcclusionTree *tree, int thread, OccFace *exclude, float if(occ) *occ= resultocc; if(rad) copy_v3_v3(rad, resultrad); - /*if(rad && exclude) { +#if 0 + if(rad && exclude) { int a; for(a=0; atotface; a++) if((tree->face[a].obi == exclude->obi && tree->face[a].facenr == exclude->facenr)) copy_v3_v3(rad, tree->rad[a]); - }*/ + } +#endif if(bentn) normalize_v3(bentn); } diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index d06df07f6b0..73305755fc5 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -86,31 +86,30 @@ #include "pixelblending.h" #include "zbuf.h" - /* render flow - -1) Initialize state -- state data, tables -- movie/image file init -- everything that doesn't change during animation - -2) Initialize data -- camera, world, matrices -- make render verts, faces, halos, strands -- everything can change per frame/field - -3) Render Processor -- multiple layers -- tiles, rect, baking -- layers/tiles optionally to disk or directly in Render Result - -4) Composite Render Result -- also read external files etc - -5) Image Files -- save file or append in movie - -*/ + * + * 1) Initialize state + * - state data, tables + * - movie/image file init + * - everything that doesn't change during animation + * + * 2) Initialize data + * - camera, world, matrices + * - make render verts, faces, halos, strands + * - everything can change per frame/field + * + * 3) Render Processor + * - multiple layers + * - tiles, rect, baking + * - layers/tiles optionally to disk or directly in Render Result + * + * 4) Composite Render Result + * - also read external files etc + * + * 5) Image Files + * - save file or append in movie + * + */ /* ********* globals ******** */ @@ -1241,8 +1240,8 @@ static void do_render_fields_blur_3d(Render *re) /* within context of current Render *re, render another scene. - it uses current render image size and disprect, but doesn't execute composite -*/ + * it uses current render image size and disprect, but doesn't execute composite + */ static void render_scene(Render *re, Scene *sce, int cfra) { Render *resc= RE_NewRender(sce->id.name); @@ -1646,7 +1645,7 @@ static void do_render_seq(Render * re) if((re->r.mode & R_BORDER) && (re->r.mode & R_CROP)==0) { /* if border rendering is used and cropping is disabled, final buffer should - be as large as the whole frame */ + * be as large as the whole frame */ context = seq_new_render_data(re->main, re->scene, re->winx, re->winy, 100); @@ -1921,7 +1920,7 @@ static int render_initialize_from_main(Render *re, Main *bmain, Scene *scene, Sc rcti disprect; /* r.xsch and r.ysch has the actual view window size - r.border is the clipping rect */ + * r.border is the clipping rect */ /* calculate actual render result and display size */ winx= (scene->r.size*scene->r.xsch)/100; @@ -1959,7 +1958,7 @@ static int render_initialize_from_main(Render *re, Main *bmain, Scene *scene, Sc * Disabled completely for now, * can be later set as render profile option * and default for background render. - */ + */ if(0) { /* make sure dynamics are up to date */ update_physics_cache(re, scene, anim_init); diff --git a/source/blender/render/intern/source/pixelblending.c b/source/blender/render/intern/source/pixelblending.c index 11e8e792159..0a8a59a860c 100644 --- a/source/blender/render/intern/source/pixelblending.c +++ b/source/blender/render/intern/source/pixelblending.c @@ -233,18 +233,17 @@ void mask_array(unsigned int mask, float filt[][3]) } -/* - -index ordering, scanline based: - - --- --- --- -| 2,0 | 2,1 | 2,2 | - --- --- --- -| 1,0 | 1,1 | 1,2 | - --- --- --- -| 0,0 | 0,1 | 0,2 | - --- --- --- -*/ +/** + * Index ordering, scanline based: + * + * --- --- --- + * | 2,0 | 2,1 | 2,2 | + * --- --- --- + * | 1,0 | 1,1 | 1,2 | + * --- --- --- + * | 0,0 | 0,1 | 0,2 | + * --- --- --- + */ void add_filt_fmask_coord(float filt[][3], float *col, float *rowbuf, int row_w, int col_h, int x, int y) { diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c index 223c56ef9d6..965abb361fd 100644 --- a/source/blender/render/intern/source/pixelshading.c +++ b/source/blender/render/intern/source/pixelshading.c @@ -142,7 +142,8 @@ static void render_lighting_halo(HaloRen *har, float col_r[3]) ShadeInput shi; /* Warning, This is not that nice, and possibly a bit slow, - however some variables were not initialized properly in, unless using shade_input_initialize(...), we need to do a memset */ + * however some variables were not initialized properly in, unless using shade_input_initialize(...), + * we need to do a memset */ memset(&shi, 0, sizeof(ShadeInput)); /* end warning! - Campbell */ @@ -593,17 +594,17 @@ void shadeSunView(float col_r[3], const float view[3]) /* - Stuff the sky color into the collector. + * Stuff the sky color into the collector. */ void shadeSkyPixel(float collector[4], float fx, float fy, short thread) { float view[3], dxyview[2]; /* - The rules for sky: - 1. Draw an image, if a background image was provided. Stop - 2. get texture and color blend, and combine these. - */ + * The rules for sky: + * 1. Draw an image, if a background image was provided. Stop + * 2. get texture and color blend, and combine these. + */ float fac; diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c index ae3748755ff..1904d5dce63 100644 --- a/source/blender/render/intern/source/pointdensity.c +++ b/source/blender/render/intern/source/pointdensity.c @@ -346,9 +346,9 @@ static void accum_density(void *userdata, int index, float squared_dist) float density = 0.0f; if (pdr->point_data_used & POINT_DATA_VEL) { - pdr->vec[0] += pdr->point_data[index*3 + 0]; //* density; - pdr->vec[1] += pdr->point_data[index*3 + 1]; //* density; - pdr->vec[2] += pdr->point_data[index*3 + 2]; //* density; + pdr->vec[0] += pdr->point_data[index*3 + 0]; // * density; + pdr->vec[1] += pdr->point_data[index*3 + 1]; // * density; + pdr->vec[2] += pdr->point_data[index*3 + 2]; // * density; } if (pdr->point_data_used & POINT_DATA_LIFE) { *pdr->age += pdr->point_data[pdr->offset + index]; // * density; @@ -515,9 +515,9 @@ int pointdensitytex(Tex *tex, float *texvec, TexResult *texres) return retval; - /* +#if 0 if (texres->nor!=NULL) { texres->nor[0] = texres->nor[1] = texres->nor[2] = 0.0f; } - */ +#endif } diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c index 526f709e13b..9272dcf5b30 100644 --- a/source/blender/render/intern/source/rayshade.c +++ b/source/blender/render/intern/source/rayshade.c @@ -435,7 +435,7 @@ void makeraytree(Render *re) re->stats_draw(re->sdh, &re->i); /* disable options not yet supported by octree, - they might actually never be supported (unless people really need it) */ + * they might actually never be supported (unless people really need it) */ if(re->r.raytrace_structure == R_RAYSTRUCTURE_OCTREE) re->r.raytrace_options &= ~( R_RAYTRACE_USE_INSTANCES | R_RAYTRACE_USE_LOCAL_COORDS); @@ -1604,7 +1604,7 @@ static void addAlphaLight(float shadfac[4], const float col[3], float alpha, flo static void ray_trace_shadow_tra(Isect *is, ShadeInput *origshi, int depth, int traflag, float col[4]) { /* ray to lamp, find first face that intersects, check alpha properties, - if it has col[3]>0.0f continue. so exit when alpha is full */ + * if it has col[3]>0.0f continue. so exit when alpha is full */ const float initial_dist = is->dist; if(RE_rayobject_raycast(R.raytree, is)) { @@ -1709,7 +1709,7 @@ static int UNUSED_FUNCTION(ray_trace_shadow_rad)(ShadeInput *ship, ShadeResult * float fac; /* Warning, This is not that nice, and possibly a bit slow for every ray, - however some variables were not initialized properly in, unless using shade_input_initialize(...), we need to do a memset */ + * however some variables were not initialized properly in, unless using shade_input_initialize(...), we need to do a memset */ memset(&shi, 0, sizeof(ShadeInput)); /* end warning! - Campbell */ @@ -2075,7 +2075,7 @@ static void ray_ao_spheresamp(ShadeInput *shi, float ao[3], float env[3]) if(resol>32) resol= 32; /* get sphere samples. for faces we get the same samples for sample x/y values, - for strand render we always require a new sampler because x/y are not set */ + * for strand render we always require a new sampler because x/y are not set */ vec= sphere_sampler(R.wrld.aomode, resol, shi->thread, shi->xs, shi->ys, shi->strand != NULL); // warning: since we use full sphere now, and dotproduct is below, we do twice as much diff --git a/source/blender/render/intern/source/render_result.c b/source/blender/render/intern/source/render_result.c index 384b2e13e90..f9ceaa63fc1 100644 --- a/source/blender/render/intern/source/render_result.c +++ b/source/blender/render/intern/source/render_result.c @@ -110,7 +110,7 @@ void render_result_free_list(ListBase *lb, RenderResult *rr) /********************************* Names *************************************/ /* NOTE: OpenEXR only supports 32 chars for layer+pass names - In blender we now use max 10 chars for pass, max 20 for layer */ + * In blender we now use max 10 chars for pass, max 20 for layer */ static const char *get_pass_name(int passtype, int channel) { @@ -1069,7 +1069,7 @@ void render_result_rect_from_ibuf(RenderResult *rr, RenderData *rd, ImBuf *ibuf) rr->rectx, rr->recty, rr->rectx, rr->rectx); /* TSK! Since sequence render doesn't free the *rr render result, the old rect32 - can hang around when sequence render has rendered a 32 bits one before */ + * can hang around when sequence render has rendered a 32 bits one before */ if(rr->rect32) { MEM_freeN(rr->rect32); rr->rect32= NULL; diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c index 76b9537116b..ede314a42e1 100644 --- a/source/blender/render/intern/source/render_texture.c +++ b/source/blender/render/intern/source/render_texture.c @@ -1348,7 +1348,7 @@ int multitex_mtex(ShadeInput *shi, MTex *mtex, float *texvec, float *dxt, float if(tex->use_nodes && tex->nodetree) { /* stupid exception here .. but we have to pass shi and mtex to - textures nodes for 2d mapping and color management for images */ + * textures nodes for 2d mapping and color management for images */ return ntreeTexExecTree(tex->nodetree, texres, texvec, dxt, dyt, shi->osatex, shi->thread, tex, mtex->which_output, R.r.cfra, (R.r.scemode & R_TEXNODE_PREVIEW) != 0, shi, mtex); } @@ -2064,8 +2064,8 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T texres->nor = nvec; /* replaced newbump with code based on listing 1 and 2 of - [Mik10] Mikkelsen M. S.: Bump Mapping Unparametrized Surfaces on the GPU. - -> http://jbit.net/~sparky/sfgrad_bump/mm_sfgrad_bump.pdf */ + * [Mik10] Mikkelsen M. S.: Bump Mapping Unparametrized Surfaces on the GPU. + * -> http://jbit.net/~sparky/sfgrad_bump/mm_sfgrad_bump.pdf */ if( mtex->texflag & MTEX_BUMP_OBJECTSPACE ) iBumpSpace = 1; @@ -2494,7 +2494,7 @@ void do_material_tex(ShadeInput *shi, Render *re) found_nmapping = 1; /* qdn: for normalmaps, to invert the normalmap vector, - it is better to negate x & y instead of subtracting the vector as was done before */ + * it is better to negate x & y instead of subtracting the vector as was done before */ if (norfac < 0.0f) { texres.nor[0] = -texres.nor[0]; texres.nor[1] = -texres.nor[1]; @@ -3508,7 +3508,7 @@ void render_realtime_texture(ShadeInput *shi, Image *ima) } /* A modified part of shadeinput.c -> shade_input_set_uv() -* Used for sampling UV mapped texture color */ + * Used for sampling UV mapped texture color */ static void textured_face_generate_uv(float *uv, float *normal, float *hit, float *v1, float *v2, float *v3) { @@ -3647,15 +3647,15 @@ void RE_free_sample_material(Material *mat) /* -* Get material diffuse color and alpha (including linked textures) in given coordinates -* -* color,alpha : input/output color values -* volume_co : sample coordinate in global space. used by volumetric materials -* surface_co : sample surface coordinate in global space. used by "surface" materials -* face_index : surface face index -* hit_quad : whether point is on second "half" of a quad -* orcoDm : orco state derived mesh -*/ + * Get material diffuse color and alpha (including linked textures) in given coordinates + * + * color,alpha : input/output color values + * volume_co : sample coordinate in global space. used by volumetric materials + * surface_co : sample surface coordinate in global space. used by "surface" materials + * face_index : surface face index + * hit_quad : whether point is on second "half" of a quad + * orcoDm : orco state derived mesh + */ void RE_sample_material_color(Material *mat, float color[3], float *alpha, const float volume_co[3], const float surface_co[3], int face_index, short hit_quad, DerivedMesh *orcoDm, Object *ob) { MFace *mface; diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index 2d3837acbfa..28988af64c4 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -1469,7 +1469,7 @@ static void addps_sss(void *cb_handle, int obi, int facenr, int x, int y, int z) RenderPart *pa= handle->pa; /* extra border for filter gives double samples on part edges, - don't use those */ + * don't use those */ if(xcrop || x>=pa->rectx-pa->crop) return; if(ycrop || y>=pa->recty-pa->crop) @@ -1528,9 +1528,9 @@ static void shade_sample_sss(ShadeSample *ssamp, Material *mat, ObjectInstanceRe sy = y + 0.5f; /* we estimate the area here using shi->dxco and shi->dyco. we need to - enabled shi->osatex these are filled. we compute two areas, one with - the normal pointed at the camera and one with the original normal, and - then clamp to avoid a too large contribution from a single pixel */ + * enabled shi->osatex these are filled. we compute two areas, one with + * the normal pointed at the camera and one with the original normal, and + * then clamp to avoid a too large contribution from a single pixel */ shi->osatex= 1; copy_v3_v3(nor, shi->facenor); @@ -1559,7 +1559,7 @@ static void shade_sample_sss(ShadeSample *ssamp, Material *mat, ObjectInstanceRe } /* if nodetree, use the material that we are currently preprocessing - instead of the node material */ + * instead of the node material */ if(shi->mat->nodetree && shi->mat->use_nodes) shi->mat= mat; @@ -2054,7 +2054,7 @@ static void bake_shade(void *handle, Object *ob, ShadeInput *shi, int UNUSED(qua shade_input_set_shade_texco(shi); /* only do AO for a full bake (and obviously AO bakes) - AO for light bakes is a leftover and might not be needed */ + * AO for light bakes is a leftover and might not be needed */ if( ELEM3(bs->type, RE_BAKE_ALL, RE_BAKE_AO, RE_BAKE_LIGHT)) shade_samples_do_AO(ssamp); diff --git a/source/blender/render/intern/source/renderdatabase.c b/source/blender/render/intern/source/renderdatabase.c index 9bec8595569..c04daa11b3e 100644 --- a/source/blender/render/intern/source/renderdatabase.c +++ b/source/blender/render/intern/source/renderdatabase.c @@ -91,10 +91,10 @@ /* ------------------------------------------------------------------------- */ /* More dynamic allocation of options for render vertices and faces, so we dont - have to reserve this space inside vertices. - Important; vertices and faces, should have been created already (to get tables - checked) that's a reason why the calls demand VertRen/VlakRen * as arg, not - the index */ + * have to reserve this space inside vertices. + * Important; vertices and faces, should have been created already (to get tables + * checked) that's a reason why the calls demand VertRen/VlakRen * as arg, not + * the index */ /* NOTE! the hardcoded table size 256 is used still in code for going quickly over vertices/faces */ @@ -460,7 +460,7 @@ void RE_vlakren_get_normal(Render *UNUSED(re), ObjectInstanceRen *obi, VlakRen * void RE_set_customdata_names(ObjectRen *obr, CustomData *data) { /* CustomData layer names are stored per object here, because the - DerivedMesh which stores the layers is freed */ + * DerivedMesh which stores the layers is freed */ CustomDataLayer *layer; int numtf = 0, numcol = 0, i, mtfn, mcn; @@ -1223,15 +1223,15 @@ static int panotestclip(Render *re, int do_pano, float *v) return c; } -/* - This adds the hcs coordinates to vertices. It iterates over all - vertices, halos and faces. After the conversion, we clip in hcs. - - Elsewhere, all primites are converted to vertices. - Called in - - envmapping (envmap.c) - - shadow buffering (shadbuf.c) -*/ +/** + * This adds the hcs coordinates to vertices. It iterates over all + * vertices, halos and faces. After the conversion, we clip in hcs. + * + * Elsewhere, all primites are converted to vertices. + * Called in + * - envmapping (envmap.c) + * - shadow buffering (shadbuf.c) + */ void project_renderdata(Render *re, void (*projectfunc)(const float *, float mat[][4], float *), int do_pano, float xoffs, int UNUSED(do_buckets)) { diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c index 0e90fbf7536..3ef62f7b383 100644 --- a/source/blender/render/intern/source/shadbuf.c +++ b/source/blender/render/intern/source/shadbuf.c @@ -59,8 +59,7 @@ #include "shading.h" #include "zbuf.h" -/* XXX, could be better implemented... this is for endian issues -*/ +/* XXX, could be better implemented... this is for endian issues */ #ifdef __BIG_ENDIAN__ # define RCOMP 3 # define GCOMP 2 @@ -185,17 +184,19 @@ static int verg_deepsample(const void *poin1, const void *poin2) static int compress_deepsamples(DeepSample *dsample, int tot, float epsilon) { /* uses doubles to avoid overflows and other numerical issues, - could be improved */ + * could be improved */ DeepSample *ds, *newds; float v; double slope, slopemin, slopemax, min, max, div, newmin, newmax; int a, first, z, newtot= 0; - /*if(print) { +#if 0 + if(print) { for(a=0, ds=dsample; az/(double)0x7FFFFFFF, ds->v); printf("\n"); - }*/ + } +#endif /* read from and write into same array */ ds= dsample; @@ -212,7 +213,7 @@ static int compress_deepsamples(DeepSample *dsample, int tot, float epsilon) //dz= ds->z - newds->z; if(ds->z == newds->z) { /* still in same z position, simply check - visibility difference against epsilon */ + * visibility difference against epsilon */ if(!(fabs(newds->v - ds->v) <= epsilon)) { break; } @@ -274,11 +275,13 @@ static int compress_deepsamples(DeepSample *dsample, int tot, float epsilon) if(newtot == 0 || (newds->v != (newds-1)->v)) newtot++; - /*if(print) { +#if 0 + if(print) { for(a=0, ds=dsample; az/(double)0x7FFFFFFF, ds->v); printf("\n"); - }*/ + } +#endif return newtot; } @@ -769,7 +772,7 @@ void makeshadowbuf(Render *re, LampRen *lar) shb->size= 1024; /* matrices and window: in winmat the transformation is being put, - transforming from observer view to lamp view, including lamp window matrix */ + * transforming from observer view to lamp view, including lamp window matrix */ angle= saacos(lar->spotsi); temp= 0.5f*shb->size*cos(angle)/sin(angle); @@ -1134,7 +1137,7 @@ float testshadowbuf(Render *re, ShadBuf *shb, const float co[3], const float dxc shadowbuf_project_co(&xs1, &ys1, &zs1, shb, co); /* clip z coordinate, z is projected so that (-1.0, 1.0) matches - (clipstart, clipend), so we can do this simple test */ + * (clipstart, clipend), so we can do this simple test */ if(zs1>=1.0f) return 0.0f; else if(zs1<= -1.0f) @@ -1151,7 +1154,7 @@ float testshadowbuf(Render *re, ShadBuf *shb, const float co[3], const float dxc if(mat_bias!=0.0f) biasf= shb->bias*mat_bias; else biasf= shb->bias; /* with inp==1.0, bias is half the size. correction value was 1.1, giving errors - on cube edges, with one side being almost frontal lighted (ton) */ + * on cube edges, with one side being almost frontal lighted (ton) */ bias= (1.5f-inp*inp)*biasf; /* in case of no filtering we can do things simpler */ @@ -1416,12 +1419,12 @@ float shadow_halo(LampRen *lar, const float p1[3], const float p2[3]) /* ********** storage of all view samples in a raster of lists ***** */ /* based on several articles describing this method, like: -The Irregular Z-Buffer and its Application to Shadow Mapping -Gregory S. Johnson - William R. Mark - Christopher A. Burns -and -Alias-Free Shadow Maps -Timo Aila and Samuli Laine -*/ + * The Irregular Z-Buffer and its Application to Shadow Mapping + * Gregory S. Johnson - William R. Mark - Christopher A. Burns + * and + * Alias-Free Shadow Maps + * Timo Aila and Samuli Laine + */ /* bsp structure (actually kd tree) */ diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c index e855f2e62f3..29c1318727c 100644 --- a/source/blender/render/intern/source/shadeinput.c +++ b/source/blender/render/intern/source/shadeinput.c @@ -66,30 +66,31 @@ extern struct Render R; /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -#define VECADDISFAC(v1,v3,fac) {*(v1)+= *(v3)*(fac); *(v1+1)+= *(v3+1)*(fac); *(v1+2)+= *(v3+2)*(fac);} - - - /* Shade Sample order: + * + * - shade_samples_fill_with_ps() + * - for each sample + * - shade_input_set_triangle() <- if prev sample-face is same, use shade_input_copy_triangle() + * - if vlr + * - shade_input_set_viewco() <- not for ray or bake + * - shade_input_set_uv() <- not for ray or bake + * - shade_input_set_normals() + * - shade_samples() + * - if AO + * - shade_samples_do_AO() + * - if shading happens + * - for each sample + * - shade_input_set_shade_texco() + * - shade_samples_do_shade() + * - OSA: distribute sample result with filter masking + * + */ -- shade_samples_fill_with_ps() - - for each sample - - shade_input_set_triangle() <- if prev sample-face is same, use shade_input_copy_triangle() - - if vlr - - shade_input_set_viewco() <- not for ray or bake - - shade_input_set_uv() <- not for ray or bake - - shade_input_set_normals() -- shade_samples() - - if AO - - shade_samples_do_AO() - - if shading happens - - for each sample - - shade_input_set_shade_texco() - - shade_samples_do_shade() -- OSA: distribute sample result with filter masking - - */ +#define VECADDISFAC(v1,v3,fac) { \ + *(v1 + 0) += *(v3 + 0) * (fac); \ + *(v1 + 1) += *(v3 + 1) * (fac); \ + *(v1 + 2) += *(v3 + 2) * (fac); \ +} /* initialize material variables in shadeinput, * doing inverse gamma correction where applicable */ @@ -926,7 +927,7 @@ void shade_input_set_shade_texco(ShadeInput *shi) } else { /* qdn: flat faces have tangents too, - could pick either one, using average here */ + * could pick either one, using average here */ tl= 1.0f/3.0f; tu= -1.0f/3.0f; tv= -1.0f/3.0f; @@ -1310,9 +1311,12 @@ void shade_input_set_shade_texco(ShadeInput *shi) } } } - } /* else { - Note! For raytracing winco is not set, important because thus means all shader input's need to have their variables set to zero else in-initialized values are used - */ + } + /* else { + * Note! For raytracing winco is not set, + * important because thus means all shader input's need to have their variables set to zero + * else un-initialized values are used + */ if (shi->do_manage) { if(mode & (MA_VERTEXCOL|MA_VERTEXCOLP|MA_FACETEXTURE)) { srgb_to_linearrgb_v3_v3(shi->vcol, shi->vcol); diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c index 85b545269e5..04fde7bf0b9 100644 --- a/source/blender/render/intern/source/shadeoutput.c +++ b/source/blender/render/intern/source/shadeoutput.c @@ -326,7 +326,7 @@ static void spothalo(struct LampRen *lar, ShadeInput *shi, float *intens) *intens= c*( (1.0-a)+(1.0-b) ); /* WATCH IT: do not clip a,b en c at 1.0, this gives nasty little overflows - at the edges (especially with narrow halos) */ + * at the edges (especially with narrow halos) */ if(*intens<=0.0f) return; /* soft area */ @@ -1765,8 +1765,8 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr) shade_one_light(lar, shi, shr, passflag); } - /*this check is to prevent only shadow lamps from producing negative - colors.*/ + /* this check is to prevent only shadow lamps from producing negative + * colors.*/ if (shr->spec[0] < 0) shr->spec[0] = 0; if (shr->spec[1] < 0) shr->spec[1] = 0; if (shr->spec[2] < 0) shr->spec[2] = 0; diff --git a/source/blender/render/intern/source/sss.c b/source/blender/render/intern/source/sss.c index 4192aaf42aa..a60db8a963f 100644 --- a/source/blender/render/intern/source/sss.c +++ b/source/blender/render/intern/source/sss.c @@ -32,16 +32,16 @@ /* Possible Improvements: - - add fresnel terms - - adapt Rd table to scale, now with small scale there are a lot of misses? - - possible interesting method: perform sss on all samples in the tree, - and then use those values interpolated somehow later. can also do this - filtering on demand for speed. since we are doing things in screen - space now there is an exact correspondence - - avoid duplicate shading (filtering points in advance, irradiance cache - like lookup?) - - lower resolution samples -*/ + * - add fresnel terms + * - adapt Rd table to scale, now with small scale there are a lot of misses? + * - possible interesting method: perform sss on all samples in the tree, + * and then use those values interpolated somehow later. can also do this + * filtering on demand for speed. since we are doing things in screen + * space now there is an exact correspondence + * - avoid duplicate shading (filtering points in advance, irradiance cache + * like lookup?) + * - lower resolution samples + */ #include #include @@ -82,11 +82,11 @@ extern Render R; // meh /* Generic Multiple Scattering API */ /* Relevant papers: - [1] A Practical Model for Subsurface Light Transport - [2] A Rapid Hierarchical Rendering Technique for Translucent Materials - [3] Efficient Rendering of Local Subsurface Scattering - [4] Implementing a skin BSSRDF (or several...) -*/ + * [1] A Practical Model for Subsurface Light Transport + * [2] A Rapid Hierarchical Rendering Technique for Translucent Materials + * [3] Efficient Rendering of Local Subsurface Scattering + * [4] Implementing a skin BSSRDF (or several...) + */ /* Defines */ @@ -164,7 +164,7 @@ typedef struct ScatterResult { } ScatterResult; /* Functions for BSSRDF reparametrization in to more intuitive parameters, - see [2] section 4 for more info. */ + * see [2] section 4 for more info. */ static float f_Rd(float alpha_, float A, float ro) { @@ -182,7 +182,7 @@ static float compute_reduced_albedo(ScatterSettings *ss) int i; /* use secant method to compute reduced albedo using Rd function inverse - with a given reflectance */ + * with a given reflectance */ fxn= f_Rd(xn, ss->A, ss->ro); fxn_1= f_Rd(xn_1, ss->A, ss->ro); @@ -232,10 +232,10 @@ static float Rd(ScatterSettings *ss, float r) } /* table lookups for Rd. this avoids expensive exp calls. we use two - separate tables as well for lower and higher numbers to improve - precision, since the number are poorly distributed because we do - a lookup with the squared distance for smaller distances, saving - another sqrt. */ + * separate tables as well for lower and higher numbers to improve + * precision, since the number are poorly distributed because we do + * a lookup with the squared distance for smaller distances, saving + * another sqrt. */ static void approximate_Rd_rgb(ScatterSettings **ss, float rr, float *rd) { @@ -444,10 +444,10 @@ static void compute_radiance(ScatterTree *tree, float *co, float *rad) traverse_octree(tree, tree->root, co, 1, &result); /* the original paper doesn't do this, but we normalize over the - sampled area and multiply with the reflectance. this is because - our point samples are incomplete, there are no samples on parts - of the mesh not visible from the camera. this can not only make - it darker, but also lead to ugly color shifts */ + * sampled area and multiply with the reflectance. this is because + * our point samples are incomplete, there are no samples on parts + * of the mesh not visible from the camera. this can not only make + * it darker, but also lead to ugly color shifts */ mul_v3_fl(result.rad, tree->ss[0]->frontweight); mul_v3_fl(result.backrad, tree->ss[0]->backweight); @@ -484,7 +484,7 @@ static void sum_leaf_radiance(ScatterTree *UNUSED(tree), ScatterNode *node) node->backrad[0]= node->backrad[1]= node->backrad[2]= 0.0; /* compute total rad, rad weighted average position, - and total area */ + * and total area */ for(i=0; itotpoint; i++) { p= &node->points[i]; @@ -532,7 +532,7 @@ static void sum_leaf_radiance(ScatterTree *UNUSED(tree), ScatterNode *node) } else { /* make sure that if radiance is 0.0f, we still have these points in - the tree at a good position, they count for rdsum too */ + * the tree at a good position, they count for rdsum too */ for(i=0; itotpoint; i++) { p= &node->points[i]; @@ -558,7 +558,7 @@ static void sum_branch_radiance(ScatterTree *UNUSED(tree), ScatterNode *node) node->backrad[0]= node->backrad[1]= node->backrad[2]= 0.0; /* compute total rad, rad weighted average position, - and total area */ + * and total area */ for(i=0; i<8; i++) { if(node->child[i] == NULL) continue; @@ -606,7 +606,7 @@ static void sum_branch_radiance(ScatterTree *UNUSED(tree), ScatterNode *node) } else { /* make sure that if radiance is 0.0f, we still have these points in - the tree at a good position, they count for rdsum too */ + * the tree at a good position, they count for rdsum too */ totnode= 0; for(i=0; i<8; i++) { @@ -686,8 +686,8 @@ static void create_octree_node(ScatterTree *tree, ScatterNode *node, float *mid, } /* here we check if only one subnode is used. if this is the case, we don't - create a new node, but rather call this function again, with different - size and middle position for the same node. */ + * create a new node, but rather call this function again, with different + * size and middle position for the same node. */ for(usedi=0, usednodes=0, i=0; i<8; i++) { if(nsize[i]) { usednodes++; @@ -865,7 +865,7 @@ static void sss_create_tree_mat(Render *re, Material *mat) points.first= points.last= NULL; /* TODO: this is getting a bit ugly, copying all those variables and - setting them back, maybe we need to create our own Render? */ + * setting them back, maybe we need to create our own Render? */ /* do SSS preprocessing render */ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE); diff --git a/source/blender/render/intern/source/strand.c b/source/blender/render/intern/source/strand.c index cdc185160d5..5f034ee9aeb 100644 --- a/source/blender/render/intern/source/strand.c +++ b/source/blender/render/intern/source/strand.c @@ -680,7 +680,7 @@ static void strand_render(Render *re, StrandSegment *sseg, float winmat[][4], St zbufclip4(re, &zspan[a], obi, index, p1->hoco2, p1->hoco1, p2->hoco1, p2->hoco2, p1->clip2, p1->clip1, p2->clip1, p2->clip2); #endif /* only render a line for now, which makes the shadow map more - similiar across frames, and so reduces flicker */ + * similiar across frames, and so reduces flicker */ zbufsinglewire(&zspan[a], obi, index, hoco1, hoco2); } } diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c index fee71563d2b..36895f8ad53 100644 --- a/source/blender/render/intern/source/volumetric.c +++ b/source/blender/render/intern/source/volumetric.c @@ -383,8 +383,8 @@ static float vol_get_phasefunc(ShadeInput *UNUSED(shi), float g, const float w[3 return normalize * (1.f - k*k) / ((1.f - kcostheta) * (1.f - kcostheta)); } - /* - * not used, but here for reference: + /* not used, but here for reference: */ +#if 0 switch (phasefunc_type) { case MA_VOL_PH_MIEHAZY: return normalize * (0.5f + 4.5f * powf(0.5 * (1.f + costheta), 8.f)); @@ -404,7 +404,7 @@ static float vol_get_phasefunc(ShadeInput *UNUSED(shi), float g, const float w[3 default: return normalize * 1.f; } - */ +#endif } /* Compute transmittance = e^(-attenuation) */ @@ -568,15 +568,15 @@ void vol_get_scattering(ShadeInput *shi, float scatter_col[3], const float co[3] /* -The main volumetric integrator, using an emission/absorption/scattering model. - -Incoming radiance = - -outgoing radiance from behind surface * beam transmittance/attenuation -+ added radiance from all points along the ray due to participating media - --> radiance for each segment = - (radiance added by scattering + radiance added by emission) * beam transmittance/attenuation -*/ + * The main volumetric integrator, using an emission/absorption/scattering model. + * + * Incoming radiance = + * + * outgoing radiance from behind surface * beam transmittance/attenuation + * + added radiance from all points along the ray due to participating media + * --> radiance for each segment = + * (radiance added by scattering + radiance added by emission) * beam transmittance/attenuation + */ /* For ease of use, I've also introduced a 'reflection' and 'reflection color' parameter, which isn't * physically correct. This works as an RGB tint/gain on out-scattered light, but doesn't affect the light @@ -667,12 +667,12 @@ static void volume_trace(struct ShadeInput *shi, struct ShadeResult *shr, int in int render_this=0; /* don't render the backfaces of ztransp volume materials. - + * * volume shading renders the internal volume from between the * ' view intersection of the solid volume to the * intersection on the other side, as part of the shading of * the front face. - + * * Because ztransp renders both front and back faces independently * this will double up, so here we prevent rendering the backface as well, * which would otherwise render the volume in between the camera and the backface diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c index 0727fd6fdd7..d5ed5c7a824 100644 --- a/source/blender/render/intern/source/zbuf.c +++ b/source/blender/render/intern/source/zbuf.c @@ -244,7 +244,7 @@ int testclip(const float v[4]) short c=0; /* if we set clip flags, the clipping should be at least larger than epsilon. - prevents issues with vertices lying exact on borders */ + * prevents issues with vertices lying exact on borders */ abs4= fabsf(v[3]) + FLT_EPSILON; if( v[0] < -abs4) c+=1; @@ -851,8 +851,8 @@ static int clipline(float v1[4], float v2[4]) /* return 0: do not draw */ dw= v2[3]-v1[3]; /* this 1.01 is for clipping x and y just a tinsy larger. that way it is - filled in with zbufwire correctly when rendering in parts. otherwise - you see line endings at edges... */ + * filled in with zbufwire correctly when rendering in parts. otherwise + * you see line endings at edges... */ if(cliptestf(-dz, -dw, v1[3], v1[2], &u1,&u2)) { if(cliptestf(dz, -dw, v1[3], -v1[2], &u1,&u2)) { @@ -1591,8 +1591,7 @@ void zspan_scanconvert(ZSpan *zspan, void *handle, float *v1, float *v2, float * /** * (clip pyramid) * Sets labda: flag, and parametrize the clipping of vertices in - * viewspace coordinates. labda = -1 means no clipping, labda in [0, - * 1] means a clipping. + * viewspace coordinates. labda = -1 means no clipping, labda in [0, 1] means a clipping. * Note: uses globals. * \param v1 start coordinate s * \param v2 target coordinate t diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index 3a0e5eab143..3beb81eef0a 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -137,13 +137,13 @@ typedef struct wmNotifier { } wmNotifier; -/* 4 levels - -0xFF000000; category -0x00FF0000; data -0x0000FF00; data subtype (unused?) -0x000000FF; action -*/ +/* 4 levels + * + * 0xFF000000; category + * 0x00FF0000; data + * 0x0000FF00; data subtype (unused?) + * 0x000000FF; action + */ /* category */ #define NOTE_CATEGORY 0xFF000000 diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c index 3aa974bd9f4..bed49941efd 100644 --- a/source/blender/windowmanager/intern/wm.c +++ b/source/blender/windowmanager/intern/wm.c @@ -217,10 +217,10 @@ void WM_keymap_init(bContext *C) wm->userconf= WM_keyconfig_new(wm, "Blender User"); /* initialize only after python init is done, for keymaps that - use python operators */ + * use python operators */ if(CTX_py_init_get(C) && (wm->initialized & WM_INIT_KEYMAP) == 0) { /* create default key config, only initialize once, - it's persistent across sessions */ + * it's persistent across sessions */ if(!(wm->defaultconf->flag & KEYCONF_INIT_DEFAULT)) { wm_window_keymap(wm->defaultconf); ED_spacetypes_keymap(wm->defaultconf); diff --git a/source/blender/windowmanager/intern/wm_apple.c b/source/blender/windowmanager/intern/wm_apple.c index e17441873d5..1b2a4e490a4 100644 --- a/source/blender/windowmanager/intern/wm_apple.c +++ b/source/blender/windowmanager/intern/wm_apple.c @@ -40,15 +40,15 @@ #define ID ID_ #include - /* To avoid killing small end comps, we want to allow -blender to start maximised if all the followings are true : -- Renderer is OpenGL capable -- Hardware acceleration -- VRAM > 16 Mo + * blender to start maximised if all the followings are true : + * - Renderer is OpenGL capable + * - Hardware acceleration + * - VRAM > 16 Mo + * + * We will bail out if VRAM is less than 8Mo + */ - We will bail out if VRAM is less than 8Mo - */ /* bad global, used in wm_window.c to open windows */ int macPrefState = 0; diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c index 0770faa8d47..e35a1a269ae 100644 --- a/source/blender/windowmanager/intern/wm_cursors.c +++ b/source/blender/windowmanager/intern/wm_cursors.c @@ -273,44 +273,44 @@ void WM_timecursor(wmWindow *win, int nr) } -/* ****************************************************************** -Custom Cursor Description: - -Each bit represents a pixel, so 1 byte = 8 pixels, -the bytes go Left to Right. Top to bottom -the bits in a byte go right to left -(ie; 0x01, 0x80 represents a line of 16 pix with the first and last pix set.) - -A 0 in the bitmap = bg_color, a 1 fg_color -a 0 in the mask = transparent pix. - -Until 32x32 cursors are supported on all platforms, the size of the -small cursors MUST be 16x16. - -Large cursors have a MAXSIZE of 32x32. - -Other than that, the specified size of the cursors is just a guideline, -However, the char array that defines the BM and MASK must be byte aligned. -ie a 17x17 cursor needs 3 bytes (cols) * 17 bytes (rows) -(3 bytes = 17 bits rounded up to nearest whole byte). Pad extra bits -in mask with 0's. - -Setting big_bm=NULL disables the large version of the cursor. - -******************************************************************* - -There is a nice Python GUI utility that can be used for drawing cursors in -this format in the Blender source distribution, in -blender/source/tools/MakeCursor.py . Start it with $ python MakeCursor.py -It will copy its output to the console when you press 'Do it'. - -*/ +/* ****************************************************************** + * Custom Cursor Description: + * + * Each bit represents a pixel, so 1 byte = 8 pixels, + * the bytes go Left to Right. Top to bottom + * the bits in a byte go right to left + * (ie; 0x01, 0x80 represents a line of 16 pix with the first and last pix set.) + * + * A 0 in the bitmap = bg_color, a 1 fg_color + * a 0 in the mask = transparent pix. + * + * Until 32x32 cursors are supported on all platforms, the size of the + * small cursors MUST be 16x16. + * + * Large cursors have a MAXSIZE of 32x32. + * + * Other than that, the specified size of the cursors is just a guideline, + * However, the char array that defines the BM and MASK must be byte aligned. + * ie a 17x17 cursor needs 3 bytes (cols) * 17 bytes (rows) + * (3 bytes = 17 bits rounded up to nearest whole byte). Pad extra bits + * in mask with 0's. + * + * Setting big_bm=NULL disables the large version of the cursor. + * + * ******************************************************************* + * + * There is a nice Python GUI utility that can be used for drawing cursors in + * this format in the Blender source distribution, in + * blender/source/tools/MakeCursor.py . Start it with $ python MakeCursor.py + * It will copy its output to the console when you press 'Do it'. + * + */ /* Because defining a cursor mixes declarations and executable code -each cursor needs it's own scoping block or it would be split up -over several hundred lines of code. To enforce/document this better -I define 2 pretty braindead macros so it's obvious what the extra "[]" -are for */ + * each cursor needs it's own scoping block or it would be split up + * over several hundred lines of code. To enforce/document this better + * I define 2 pretty braindead macros so it's obvious what the extra "[]" + * are for */ #define BEGIN_CURSOR_BLOCK { #define END_CURSOR_BLOCK } diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index d386f65498f..4751dbb87ff 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -701,9 +701,9 @@ static int wm_draw_update_test_window(wmWindow *win) static int wm_automatic_draw_method(wmWindow *win) { /* Ideally all cards would work well with triple buffer, since if it works - well gives the least redraws and is considerably faster at partial redraw - for sculpting or drawing overlapping menus. For typically lower end cards - copy to texture is slow though and so we use overlap instead there. */ + * well gives the least redraws and is considerably faster at partial redraw + * for sculpting or drawing overlapping menus. For typically lower end cards + * copy to texture is slow though and so we use overlap instead there. */ if(win->drawmethod == USER_DRAW_AUTOMATIC) { /* ATI opensource driver is known to be very slow at this */ diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 591b8b1103b..e15ed7b8929 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -537,8 +537,8 @@ static void wm_operator_finished(bContext *C, wmOperator *op, int repeat) op->customdata= NULL; /* we don't want to do undo pushes for operators that are being - called from operators that already do an undo push. usually - this will happen for python operators that call C operators */ + * called from operators that already do an undo push. usually + * this will happen for python operators that call C operators */ if(wm->op_undo_depth == 0) if(op->type->flag & OPTYPE_UNDO) ED_undo_push_op(C, op); @@ -889,9 +889,9 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P } /* cancel UI handlers, typically tooltips that can hang around - while dragging the view or worse, that stay there permanently - after the modal operator has swallowed all events and passed - none to the UI handler */ + * while dragging the view or worse, that stay there permanently + * after the modal operator has swallowed all events and passed + * none to the UI handler */ wm_handler_ui_cancel(C); } else @@ -1027,10 +1027,10 @@ int WM_operator_name_call(bContext *C, const char *opstring, int context, Pointe } /* Similar to WM_operator_name_call called with WM_OP_EXEC_DEFAULT context. - - wmOperatorType is used instead of operator name since python already has the operator type - - poll() must be called by python before this runs. - - reports can be passed to this function (so python can report them as exceptions) -*/ + * - wmOperatorType is used instead of operator name since python already has the operator type + * - poll() must be called by python before this runs. + * - reports can be passed to this function (so python can report them as exceptions) + */ int WM_operator_call_py(bContext *C, wmOperatorType *ot, int context, PointerRNA *properties, ReportList *reports) { int retval= OPERATOR_CANCELLED; @@ -1090,7 +1090,7 @@ static void wm_handler_op_context(bContext *C, wmEventHandler *handler) break; if(sa==NULL) { /* when changing screen layouts with running modal handlers (like render display), this - is not an error to print */ + * is not an error to print */ if(handler->op==NULL) printf("internal error: handler (%s) has invalid area\n", handler->op->type->idname); } @@ -2028,7 +2028,7 @@ void wm_event_do_handlers(bContext *C) } /* XXX hrmf, this gives reliable previous mouse coord for area change, feels bad? - doing it on ghost queue gives errors when mousemoves go over area borders */ + * doing it on ghost queue gives errors when mousemoves go over area borders */ if(doit && win->screen && win->screen->subwinactive != win->screen->mainwin) { win->eventstate->prevx= event->x; win->eventstate->prevy= event->y; @@ -2116,9 +2116,9 @@ void WM_event_fileselect_event(bContext *C, void *ophandle, int eventval) /* optional property: filetype (XXX enum?) */ /* Idea is to keep a handler alive on window queue, owning the operator. - The filewindow can send event to make it execute, thus ensuring - executing happens outside of lower level queues, with UI refreshed. - Should also allow multiwin solutions */ + * The filewindow can send event to make it execute, thus ensuring + * executing happens outside of lower level queues, with UI refreshed. + * Should also allow multiwin solutions */ void WM_event_add_fileselect(bContext *C, wmOperator *op) { @@ -2582,8 +2582,8 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U event.type= MOUSEMOVE; /* some painting operators want accurate mouse events, they can - handle in between mouse move moves, others can happily ignore - them for better performance */ + * handle in between mouse move moves, others can happily ignore + * them for better performance */ if(lastevent && lastevent->type == MOUSEMOVE) lastevent->type = INBETWEEN_MOUSEMOVE; @@ -2754,14 +2754,14 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U } /* this case happens on some systems that on holding a key pressed, - generate press events without release, we still want to keep the - modifier in win->eventstate, but for the press event of the same - key we don't want the key modifier */ + * generate press events without release, we still want to keep the + * modifier in win->eventstate, but for the press event of the same + * key we don't want the key modifier */ if(event.keymodifier == event.type) event.keymodifier= 0; /* this case happened with an external numpad, it's not really clear - why, but it's also impossible to map a key modifier to an unknwon - key, so it shouldn't harm */ + * why, but it's also impossible to map a key modifier to an unknwon + * key, so it shouldn't harm */ if(event.keymodifier == UNKNOWNKEY) event.keymodifier= 0; diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index f50049f93b7..0c2cb7dab3e 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -120,12 +120,12 @@ static void write_history(void); -/* To be able to read files without windows closing, opening, moving - we try to prepare for worst case: - - active window gets active screen from file - - restoring the screens from non-active windows - Best case is all screens match, in that case they get assigned to proper window -*/ +/* To be able to read files without windows closing, opening, moving + * we try to prepare for worst case: + * - active window gets active screen from file + * - restoring the screens from non-active windows + * Best case is all screens match, in that case they get assigned to proper window + */ static void wm_window_match_init(bContext *C, ListBase *wmlist) { wmWindowManager *wm; @@ -173,11 +173,11 @@ static void wm_window_match_init(bContext *C, ListBase *wmlist) } /* match old WM with new, 4 cases: - 1- no current wm, no read wm: make new default - 2- no current wm, but read wm: that's OK, do nothing - 3- current wm, but not in file: try match screen names - 4- current wm, and wm in file: try match ghostwin -*/ + * 1- no current wm, no read wm: make new default + * 2- no current wm, but read wm: that's OK, do nothing + * 3- current wm, but not in file: try match screen names + * 4- current wm, and wm in file: try match ghostwin + */ static void wm_window_match_do(bContext *C, ListBase *oldwmlist) { @@ -332,13 +332,13 @@ static int wm_read_exotic(Scene *UNUSED(scene), const char *name) } else { //XXX waitcursor(1); - /* +#if 0 /* historic stuff - no longer used */ if(is_foo_format(name)) { read_foo(name); retval= BKE_READ_EXOTIC_OK_OTHER; } else - */ +#endif { retval= BKE_READ_EXOTIC_FAIL_FORMAT; } diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index b9bc6d04654..f5dec4dbcd3 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -162,7 +162,7 @@ void WM_init(bContext *C, int argc, const char **argv) BPY_driver_reset(); BPY_app_handlers_reset(FALSE); /* causes addon callbacks to be freed [#28068], - * but this is actually what we want. */ + * but this is actually what we want. */ BPY_modules_load_user(C); #else (void)argc; /* unused */ @@ -192,10 +192,10 @@ void WM_init(bContext *C, int argc, const char **argv) WM_read_history(); /* allow a path of "", this is what happens when making a new file */ - /* +#if 0 if(G.main->name[0] == 0) BLI_make_file_string("/", G.main->name, BLI_getDefaultDocumentFolder(), "untitled.blend"); - */ +#endif BLI_strncpy(G.lib, G.main->name, FILE_MAX); } diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c index f2ee5a328d6..5e09a701755 100644 --- a/source/blender/windowmanager/intern/wm_jobs.c +++ b/source/blender/windowmanager/intern/wm_jobs.c @@ -58,29 +58,29 @@ /* ********************** Threaded Jobs Manager ****************************** */ /* -Add new job -- register in WM -- configure callbacks - -Start or re-run job -- if job running - - signal job to end - - add timer notifier to verify when it has ended, to start it -- else - - start job - - add timer notifier to handle progress - -Stop job - - signal job to end - on end, job will tag itself as sleeping - -Remove job -- signal job to end - on end, job will remove itself - -When job is done: -- it puts timer to sleep (or removes?) - + * Add new job + * - register in WM + * - configure callbacks + * + * Start or re-run job + * - if job running + * - signal job to end + * - add timer notifier to verify when it has ended, to start it + * - else + * - start job + * - add timer notifier to handle progress + * + * Stop job + * - signal job to end + * on end, job will tag itself as sleeping + * + * Remove job + * - signal job to end + * on end, job will remove itself + * + * When job is done: + * - it puts timer to sleep (or removes?) + * */ struct wmJob { @@ -150,7 +150,7 @@ static wmJob *wm_job_find(wmWindowManager *wm, void *owner, const char *name) /* returns current or adds new job, but doesnt run it */ /* every owner only gets a single job, adding a new one will stop running stop and - when stopped it starts the new one */ + * when stopped it starts the new one */ wmJob *WM_jobs_get(wmWindowManager *wm, wmWindow *win, void *owner, const char *name, int flag) { wmJob *steve= wm_job_find(wm, owner, name); diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c index d34a7d46e54..107ebd8699c 100644 --- a/source/blender/windowmanager/intern/wm_keymap.c +++ b/source/blender/windowmanager/intern/wm_keymap.c @@ -240,7 +240,7 @@ static wmKeyConfig *WM_keyconfig_active(wmWindowManager *wm) void WM_keyconfig_set_active(wmWindowManager *wm, const char *idname) { /* setting a different key configuration as active: we ensure all is - updated properly before and after making the change */ + * updated properly before and after making the change */ WM_keyconfig_update(wm); @@ -534,7 +534,7 @@ static wmKeyMap *wm_keymap_patch_update(ListBase *lb, wmKeyMap *defaultmap, wmKe /* copy new keymap from an existing one */ if(usermap && !(usermap->flag & KEYMAP_DIFF)) { /* for compatibiltiy with old user preferences with non-diff - keymaps we override the original entirely */ + * keymaps we override the original entirely */ wmKeyMapItem *kmi, *orig_kmi; km = wm_keymap_copy(usermap); @@ -620,7 +620,7 @@ static void wm_keymap_diff_update(ListBase *lb, wmKeyMap *defaultmap, wmKeyMap * /* ****************** storage in WM ************ */ /* name id's are for storing general or multiple keymaps, - space/region ids are same as DNA_space_types.h */ + * space/region ids are same as DNA_space_types.h */ /* gets freed in wm.c */ wmKeyMap *WM_keymap_list_find(ListBase *lb, const char *idname, int spaceid, int regionid) diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index cab4b014c3e..22e6d5be383 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -461,7 +461,7 @@ void WM_operator_py_idname(char *to, const char *from) int ofs= (sep-from); /* note, we use ascii tolower instead of system tolower, because the - latter depends on the locale, and can lead to idname mistmatch */ + * latter depends on the locale, and can lead to idname mistmatch */ memcpy(to, from, sizeof(char)*ofs); BLI_ascii_strtolower(to, ofs); @@ -1228,10 +1228,11 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *arg_unuse static void wm_block_splash_refreshmenu (bContext *UNUSED(C), void *UNUSED(arg_block), void *UNUSED(arg)) { /* ugh, causes crashes in other buttons, disabling for now until - * a better fix + * a better fix */ +#if 0 uiPupBlockClose(C, arg_block); uiPupBlock(C, wm_block_create_splash, NULL); - */ +#endif } static int wm_resource_check_prev(void) @@ -1672,9 +1673,9 @@ int wm_link_append_poll(bContext *C) { if(WM_operator_winactive(C)) { /* linking changes active object which is pretty useful in general, - but which totally confuses edit mode (i.e. it becoming not so obvious - to leave from edit mode and inwalid tools in toolbar might be displayed) - so disable link/append when in edit mode (sergey) */ + * but which totally confuses edit mode (i.e. it becoming not so obvious + * to leave from edit mode and inwalid tools in toolbar might be displayed) + * so disable link/append when in edit mode (sergey) */ if(CTX_data_edit_object(C)) return 0; @@ -2272,10 +2273,10 @@ static void WM_OT_console_toggle(wmOperatorType *ot) /* ************ default paint cursors, draw always around cursor *********** */ /* - - returns handler to free - - poll(bContext): returns 1 if draw should happen - - draw(bContext): drawing callback for paint cursor -*/ + * - returns handler to free + * - poll(bContext): returns 1 if draw should happen + * - draw(bContext): drawing callback for paint cursor + */ void *WM_paint_cursor_activate(wmWindowManager *wm, int (*poll)(bContext *C), wmPaintCursorDraw draw, void *customdata) @@ -2312,11 +2313,11 @@ void WM_paint_cursor_end(wmWindowManager *wm, void *handle) /* **************** Border gesture *************** */ /* Border gesture has two types: - 1) WM_GESTURE_CROSS_RECT: starts a cross, on mouse click it changes to border - 2) WM_GESTURE_RECT: starts immediate as a border, on mouse click or release it ends - - It stores 4 values (xmin, xmax, ymin, ymax) and event it ended with (event_type) -*/ + * 1) WM_GESTURE_CROSS_RECT: starts a cross, on mouse click it changes to border + * 2) WM_GESTURE_RECT: starts immediate as a border, on mouse click or release it ends + * + * It stores 4 values (xmin, xmax, ymin, ymax) and event it ended with (event_type) + */ static int border_apply_rect(wmOperator *op) { @@ -2726,7 +2727,7 @@ int WM_gesture_lasso_modal(bContext *C, wmOperator *op, wmEvent *event) y = (event->y - sy - lasso[1]); /* make a simple distance check to get a smoother lasso - add only when at least 2 pixels between this and previous location */ + * add only when at least 2 pixels between this and previous location */ if((x*x+y*y) > 4) { lasso += 2; lasso[0] = event->x - sx; @@ -3112,8 +3113,8 @@ typedef enum { } RCPropFlags; /* attempt to retrieve the rna pointer/property from an rna path; - returns 0 for failure, 1 for success, and also 1 if property is not - set */ + * returns 0 for failure, 1 for success, and also 1 if property is not + * set */ static int radial_control_get_path(PointerRNA *ctx_ptr, wmOperator *op, const char *name, PointerRNA *r_ptr, PropertyRNA **r_prop, int req_length, RCPropFlags flags) @@ -3326,8 +3327,8 @@ static int radial_control_cancel(bContext *C, wmOperator *op) wm->paintcursors = rc->orig_paintcursors; /* not sure if this is a good notifier to use; - intended purpose is to update the UI so that the - new value is displayed in sliders/numfields */ + * intended purpose is to update the UI so that the + * new value is displayed in sliders/numfields */ WM_event_add_notifier(C, NC_WINDOW, NULL); glDeleteTextures(1, &rc->gltex); diff --git a/source/blender/windowmanager/intern/wm_subwindow.c b/source/blender/windowmanager/intern/wm_subwindow.c index 8a4dd3df134..5e11e31c045 100644 --- a/source/blender/windowmanager/intern/wm_subwindow.c +++ b/source/blender/windowmanager/intern/wm_subwindow.c @@ -58,14 +58,14 @@ /* wmSubWindow stored in wmWindow... but not exposed outside this C file */ /* it seems a bit redundant (area regions can store it too, but we keep it - because we can store all kind of future opengl fanciness here */ + * because we can store all kind of future opengl fanciness here */ /* we use indices and array because: - - index has safety, no pointers from this C file hanging around - - fast lookups of indices with array, list would give overhead - - old code used it this way... - - keep option open to have 2 screens using same window -*/ + * - index has safety, no pointers from this C file hanging around + * - fast lookups of indices with array, list would give overhead + * - old code used it this way... + * - keep option open to have 2 screens using same window + */ typedef struct wmSubWindow { struct wmSubWindow *next, *prev; @@ -207,17 +207,17 @@ void wm_subwindow_position(wmWindow *win, int swinid, rcti *winrct) swin->winrct= *winrct; /* CRITICAL, this clamping ensures that - * the viewport never goes outside the screen - * edges (assuming the x, y coords aren't - * outside). This caused a hardware lock - * on Matrox cards if it happens. - * - * Really Blender should never _ever_ try - * to do such a thing, but just to be safe - * clamp it anyway (or fix the bScreen - * scaling routine, and be damn sure you - * fixed it). - zr (2001!) - */ + * the viewport never goes outside the screen + * edges (assuming the x, y coords aren't + * outside). This caused a hardware lock + * on Matrox cards if it happens. + * + * Really Blender should never _ever_ try + * to do such a thing, but just to be safe + * clamp it anyway (or fix the bScreen + * scaling routine, and be damn sure you + * fixed it). - zr (2001!) + */ if (swin->winrct.xmax > win->sizex) swin->winrct.xmax= win->sizex; diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 6842b6be497..2e3e56f7c23 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -85,7 +85,7 @@ static unsigned short useprefsize= 0; /* ******** win open & close ************ */ /* XXX this one should correctly check for apple top header... - done for Cocoa : returns window contents (and not frame) max size*/ + * done for Cocoa : returns window contents (and not frame) max size*/ void wm_get_screensize(int *width_r, int *height_r) { unsigned int uiwidth; @@ -141,7 +141,7 @@ static void wm_ghostwindow_destroy(wmWindow *win) } /* including window itself, C can be NULL. - ED_screen_exit should have been called */ + * ED_screen_exit should have been called */ void wm_window_free(bContext *C, wmWindowManager *wm, wmWindow *win) { wmTimer *wt, *wtnext; @@ -290,8 +290,8 @@ void wm_window_title(wmWindowManager *wm, wmWindow *win) GHOST_SetTitle(win->ghostwin, "Blender"); /* Informs GHOST of unsaved changes, to set window modified visual indicator (MAC OS X) - and to give hint of unsaved changes for a user warning mechanism - in case of OS application terminate request (e.g. OS Shortcut Alt+F4, Cmd+Q, (...), or session end) */ + * and to give hint of unsaved changes for a user warning mechanism + * in case of OS application terminate request (e.g. OS Shortcut Alt+F4, Cmd+Q, (...), or session end) */ GHOST_SetWindowModifiedState(win->ghostwin, (GHOST_TUns8)!wm->file_saved); #if defined(__APPLE__) && !defined(GHOST_COCOA) @@ -326,7 +326,7 @@ static void wm_window_add_ghostwindow(bContext *C, const char *title, wmWindow * } #endif /* Disable AA for now, as GL_SELECT (used for border, lasso, ... select) - doesn't work well when AA is initialized, even if not used. */ + * doesn't work well when AA is initialized, even if not used. */ ghostwin= GHOST_CreateWindow(g_system, title, win->posx, posy, win->sizex, win->sizey, initial_state, @@ -450,7 +450,7 @@ wmWindow *WM_window_open(bContext *C, rcti *rect) } /* uses screen->temp tag to define what to do, currently it limits - to only one "temp" window for render out, preferences, filewindow, etc */ + * to only one "temp" window for render out, preferences, filewindow, etc */ /* type is #define in WM_api.h */ void WM_window_open_temp(bContext *C, rcti *position, int type) @@ -777,7 +777,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private) if (path) { /* operator needs a valid window in context, ensures - it is correctly set */ + * it is correctly set */ oldWindow = CTX_wm_window(C); CTX_wm_window_set(C, win); @@ -860,11 +860,11 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private) /* This timer system only gives maximum 1 timer event per redraw cycle, - to prevent queues to get overloaded. - Timer handlers should check for delta to decide if they just - update, or follow real time. - Timer handlers can also set duration to match frames passed -*/ + * to prevent queues to get overloaded. + * Timer handlers should check for delta to decide if they just + * update, or follow real time. + * Timer handlers can also set duration to match frames passed + */ static int wm_window_timer(const bContext *C) { wmWindowManager *wm= CTX_wm_manager(C); @@ -931,8 +931,8 @@ void wm_window_testbreak(void) double curtime= PIL_check_seconds_timer(); /* only check for breaks every 50 milliseconds - * if we get called more often. - */ + * if we get called more often. + */ if ((curtime-ltime)>.05) { int hasevent= GHOST_ProcessEvents(g_system, 0); /* 0 is no wait */ diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h index 02434d85c51..30f6c564688 100644 --- a/source/blender/windowmanager/wm_event_types.h +++ b/source/blender/windowmanager/wm_event_types.h @@ -78,8 +78,8 @@ /* NDOF (from SpaceNavigator & friends) - These should be kept in sync with GHOST_NDOFManager.h - Ordering matters, exact values do not. */ + * These should be kept in sync with GHOST_NDOFManager.h + * Ordering matters, exact values do not. */ #define NDOF_MOTION 400 diff --git a/source/creator/creator.c b/source/creator/creator.c index 7b67cdad23c..4a4887f52f9 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -491,9 +491,9 @@ static int no_joystick(int UNUSED(argc), const char **UNUSED(argv), void *data) SYS_SystemHandle *syshandle = data; /** - don't initialize joysticks if user doesn't want to use joysticks - failed joystick initialization delays over 5 seconds, before game engine start - */ + * don't initialize joysticks if user doesn't want to use joysticks + * failed joystick initialization delays over 5 seconds, before game engine start + */ SYS_WriteCommandLineInt(*syshandle, "nojoystick",1); if (G.f & G_DEBUG) printf("disabling nojoystick\n"); #endif @@ -932,8 +932,8 @@ static int load_file(int UNUSED(argc), const char **argv, void *data) if (G.background) { int retval = BKE_read_file(C, filename, NULL); - /*we successfully loaded a blend file, get sure that - pointcache works */ + /* we successfully loaded a blend file, get sure that + * pointcache works */ if (retval != BKE_READ_FILE_FAIL) { wmWindowManager *wm= CTX_wm_manager(C); @@ -971,7 +971,7 @@ static int load_file(int UNUSED(argc), const char **argv, void *data) // BKE_write_undo("original"); /* save current state */ } else { /* we are not running in background mode here, but start blender in UI mode with - a file - this should do everything a 'load file' does */ + * a file - this should do everything a 'load file' does */ ReportList reports; BKE_reports_init(&reports, RPT_PRINT); WM_read_file(C, filename, &reports); @@ -1200,7 +1200,7 @@ int main(int argc, const char **argv) BKE_font_register_builtin(datatoc_Bfont, datatoc_Bfont_size); /* Initialiaze ffmpeg if built in, also needed for bg mode if videos are - rendered via ffmpeg */ + * rendered via ffmpeg */ sound_init_once(); init_def_material(); @@ -1268,13 +1268,6 @@ int main(int argc, const char **argv) WM_main(C); - - /*XXX if (scr_init==0) { - main_init_screen(); - } - - screenmain();*/ /* main display loop */ - return 0; } /* end of int main(argc,argv) */ diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp index 28b03b56370..5d87e7fd969 100644 --- a/source/gameengine/Converter/BL_ActionActuator.cpp +++ b/source/gameengine/Converter/BL_ActionActuator.cpp @@ -401,12 +401,12 @@ PyObject* BL_ActionActuator::PyGetChannel(PyObject* value) PyTuple_SET_ITEM(ret, 2, list); return ret; -/* +#if 0 return Py_BuildValue("([fff][fff][ffff])", pchan->loc[0], pchan->loc[1], pchan->loc[2], pchan->size[0], pchan->size[1], pchan->size[2], pchan->quat[0], pchan->quat[1], pchan->quat[2], pchan->quat[3] ); -*/ +#endif } /* setChannel */ diff --git a/source/gameengine/Converter/BL_ArmatureChannel.h b/source/gameengine/Converter/BL_ArmatureChannel.h index 3fd49c276ae..cd38ee2d531 100644 --- a/source/gameengine/Converter/BL_ArmatureChannel.h +++ b/source/gameengine/Converter/BL_ArmatureChannel.h @@ -72,8 +72,8 @@ public: }; /* this is a factory class to access bBone data field in the GE. - It's not supposed to be instantiated, we only need it for the Attributes and Method array. - The actual proxy object will be manually created using NewProxyPtr */ + * It's not supposed to be instantiated, we only need it for the Attributes and Method array. + * The actual proxy object will be manually created using NewProxyPtr */ class BL_ArmatureBone : public PyObjectPlus { // use Py_HeaderPtr since we use generic pointer in proxy diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 066cfe63bb5..89877261cd7 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -1071,15 +1071,16 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene, * "Texture Face/Singletexture" we can then think about it */ /* Texture Face mode ignores texture but requires "Face Textures to be True "*/ - /** +#if 0 if ((ma->mode &MA_FACETEXTURE)==0 && (ma->game.flag &GEMAT_TEXT)==0) { bima = NULL; imastr = ""; alpha_blend = GEMAT_SOLID; } - else + else { alpha_blend = ma->game.alpha_blend; - */ + } +#endif } /* check for tface tex to fallback on */ else { diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index 135a3b20d96..04342717555 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -106,8 +106,8 @@ #include "BL_BlenderDataConversion.h" /** -KX_BLENDERTRUNC needed to round 'almost' zero values to zero, else velocities etc. are incorrectly set -*/ + * KX_BLENDERTRUNC needed to round 'almost' zero values to zero, else velocities etc. are incorrectly set + */ #define KX_BLENDERTRUNC(x) (( x < 0.0001 && x > -0.0001 ) ? 0.0 : x) @@ -310,30 +310,26 @@ void BL_ConvertActuators(const char* maggiename, { bMessageActuator *msgAct = (bMessageActuator *) bact->data; - /** - * Get the name of the properties that objects must own that - * we're sending to, if present - */ + /* Get the name of the properties that objects must own that + * we're sending to, if present + */ STR_String toPropName = (msgAct->toPropName ? (char*) msgAct->toPropName : ""); - /** - * Get the Message Subject to send. - */ + /* Get the Message Subject to send. + */ STR_String subject = (msgAct->subject ? (char*) msgAct->subject : ""); - /** - * Get the bodyType - */ + /* Get the bodyType + */ int bodyType = msgAct->bodyType; - /** - * Get the body (text message or property name whose value - * we'll be sending, might be empty - */ + /* Get the body (text message or property name whose value + * we'll be sending, might be empty + */ STR_String body = (msgAct->body ? (char*) msgAct->body : ""); @@ -451,13 +447,13 @@ void BL_ConvertActuators(const char* maggiename, SCA_IObject* destinationObj = NULL; /* - here the destinationobject is searched. problem with multiple scenes: other scenes - have not been converted yet, so the destobj will not be found, so the prop will - not be copied. - possible solutions: - - convert everything when possible and not realtime only when needed. - - let the object-with-property report itself to the act when converted - */ + * here the destinationobject is searched. problem with multiple scenes: other scenes + * have not been converted yet, so the destobj will not be found, so the prop will + * not be copied. + * possible solutions: + * - convert everything when possible and not realtime only when needed. + * - let the object-with-property report itself to the act when converted + */ if (propact->ob) destinationObj = converter->FindGameObject(propact->ob); diff --git a/source/gameengine/Converter/KX_ConvertSensors.cpp b/source/gameengine/Converter/KX_ConvertSensors.cpp index a672e9cd9b8..fa9eb5317b9 100644 --- a/source/gameengine/Converter/KX_ConvertSensors.cpp +++ b/source/gameengine/Converter/KX_ConvertSensors.cpp @@ -50,7 +50,7 @@ #include "DNA_material_types.h" #include "DNA_sensor_types.h" #include "DNA_actuator_types.h" /* for SENS_ALL_KEYS ? this define is -probably misplaced */ + * probably misplaced */ /* end of blender include block */ #include "RAS_IPolygonMaterial.h" @@ -315,9 +315,9 @@ void BL_ConvertSensors(struct Object* blenderobject, bMouseSensor *bmouse = (bMouseSensor *)sens->data; /* There are two main types of mouse sensors. If there is - * no focus-related behavior requested, we can make do - * with a basic sensor. This cuts down memory usage and - * gives a slight performance gain. */ + * no focus-related behavior requested, we can make do + * with a basic sensor. This cuts down memory usage and + * gives a slight performance gain. */ SCA_MouseManager *eventmgr = (SCA_MouseManager*) logicmgr->FindEventManager(SCA_EventManager::MOUSE_EVENTMGR); diff --git a/source/gameengine/Expressions/BoolValue.cpp b/source/gameengine/Expressions/BoolValue.cpp index 113d12b7d59..b3c4dc144df 100644 --- a/source/gameengine/Expressions/BoolValue.cpp +++ b/source/gameengine/Expressions/BoolValue.cpp @@ -30,9 +30,9 @@ const STR_String CBoolValue::sFalseString = "FALSE"; CBoolValue::CBoolValue() /* -pre: false -effect: constructs a new CBoolValue -*/ + * pre: false + * effect: constructs a new CBoolValue + */ { trace("Bool constructor error"); } diff --git a/source/gameengine/Expressions/BoolValue.h b/source/gameengine/Expressions/BoolValue.h index 00baeba0857..23c8ef5b0e9 100644 --- a/source/gameengine/Expressions/BoolValue.h +++ b/source/gameengine/Expressions/BoolValue.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _BOOLVALUE_H +#ifndef _BOOLVALUE_H #define _BOOLVALUE_H #include "Value.h" diff --git a/source/gameengine/Expressions/EmptyValue.h b/source/gameengine/Expressions/EmptyValue.h index 1da0ee8e928..d7212c55adf 100644 --- a/source/gameengine/Expressions/EmptyValue.h +++ b/source/gameengine/Expressions/EmptyValue.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _EMPTYVALUE_H +#ifndef _EMPTYVALUE_H #define _EMPTYVALUE_H #include "Value.h" diff --git a/source/gameengine/Expressions/ErrorValue.h b/source/gameengine/Expressions/ErrorValue.h index ec81fc2c82b..55d799cc5e4 100644 --- a/source/gameengine/Expressions/ErrorValue.h +++ b/source/gameengine/Expressions/ErrorValue.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _ERRORVALUE_H +#ifndef _ERRORVALUE_H #define _ERRORVALUE_H #include "Value.h" diff --git a/source/gameengine/Expressions/Expression.h b/source/gameengine/Expressions/Expression.h index b9232477c34..b4d12e6328c 100644 --- a/source/gameengine/Expressions/Expression.h +++ b/source/gameengine/Expressions/Expression.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _EXPRESSION_H +#ifndef _EXPRESSION_H #define _EXPRESSION_H #include "Value.h" diff --git a/source/gameengine/Expressions/FloatValue.h b/source/gameengine/Expressions/FloatValue.h index 8dfb42d6b2e..6276e533547 100644 --- a/source/gameengine/Expressions/FloatValue.h +++ b/source/gameengine/Expressions/FloatValue.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _FLOATVALUE_H +#ifndef _FLOATVALUE_H #define _FLOATVALUE_H #include "Value.h" diff --git a/source/gameengine/Expressions/IfExpr.cpp b/source/gameengine/Expressions/IfExpr.cpp index 9e6d80ab468..baf91e4a5c3 100644 --- a/source/gameengine/Expressions/IfExpr.cpp +++ b/source/gameengine/Expressions/IfExpr.cpp @@ -31,11 +31,11 @@ CIfExpr::CIfExpr() -CIfExpr::CIfExpr(CExpression *guard, CExpression *e1, CExpression *e2) /* -pre: -effect: constructs an CifExpr-object corresponding to IF(guard, e1, e2) -*/ + * pre: + * effect: constructs an CifExpr-object corresponding to IF(guard, e1, e2) + */ +CIfExpr::CIfExpr(CExpression *guard, CExpression *e1, CExpression *e2) { m_guard = guard; m_e1 = e1; @@ -44,11 +44,11 @@ effect: constructs an CifExpr-object corresponding to IF(guard, e1, e2) -CIfExpr::~CIfExpr() /* -pre: -effect: dereferences the object -*/ + * pre: + * effect: dereferences the object + */ +CIfExpr::~CIfExpr() { if (m_guard) m_guard->Release(); @@ -62,13 +62,13 @@ effect: dereferences the object +/** + * pre: + * ret: a new object containing the value of m_e1 if m_guard is a boolean TRUE + * a new object containing the value of m_e2 if m_guard is a boolean FALSE + * an new errorvalue if m_guard is not a boolean + */ CValue* CIfExpr::Calculate() -/* -pre: -ret: a new object containing the value of m_e1 if m_guard is a boolean TRUE - a new object containing the value of m_e2 if m_guard is a boolean FALSE - an new errorvalue if m_guard is not a boolean -*/ { CValue *guardval; guardval = m_guard->Calculate(); diff --git a/source/gameengine/Expressions/InputParser.cpp b/source/gameengine/Expressions/InputParser.cpp index 9f0def6e866..e13cb8200b1 100644 --- a/source/gameengine/Expressions/InputParser.cpp +++ b/source/gameengine/Expressions/InputParser.cpp @@ -579,12 +579,12 @@ CExpression* CParser::ProcessText } ch = text[0]; - /*if (ch != '=') { - expr = new CConstExpr(new CStringValue(text)); - *dependent = deplist; - return expr; - } else - */ + /* if (ch != '=') { + * expr = new CConstExpr(new CStringValue(text)); + * *dependent = deplist; + * return expr; + * } else + */ // NextCh(); NextSym(); expr = Expr(); diff --git a/source/gameengine/Expressions/IntValue.cpp b/source/gameengine/Expressions/IntValue.cpp index c03c97311c7..20a4bbc0405 100644 --- a/source/gameengine/Expressions/IntValue.cpp +++ b/source/gameengine/Expressions/IntValue.cpp @@ -278,12 +278,11 @@ this object } - +/** + * pre: + * ret: the cInt stored in the object + */ cInt CIntValue::GetInt() -/* -pre: -ret: the cInt stored in the object -*/ { return m_int; } diff --git a/source/gameengine/Expressions/IntValue.h b/source/gameengine/Expressions/IntValue.h index e6802b6ad04..09cf910dbc3 100644 --- a/source/gameengine/Expressions/IntValue.h +++ b/source/gameengine/Expressions/IntValue.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _INTVALUE_H +#ifndef _INTVALUE_H #define _INTVALUE_H diff --git a/source/gameengine/Expressions/ListValue.h b/source/gameengine/Expressions/ListValue.h index 4446b40af16..4d97c6cc29c 100644 --- a/source/gameengine/Expressions/ListValue.h +++ b/source/gameengine/Expressions/ListValue.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _LISTVALUE_H +#ifndef _LISTVALUE_H #define _LISTVALUE_H #include "Value.h" diff --git a/source/gameengine/Expressions/Operator2Expr.h b/source/gameengine/Expressions/Operator2Expr.h index f003696b580..261fef106df 100644 --- a/source/gameengine/Expressions/Operator2Expr.h +++ b/source/gameengine/Expressions/Operator2Expr.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _OPERATOR2EXPR_H +#ifndef _OPERATOR2EXPR_H #define _OPERATOR2EXPR_H diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h index e3701b8793c..6de0f3fa8d5 100644 --- a/source/gameengine/Expressions/PyObjectPlus.h +++ b/source/gameengine/Expressions/PyObjectPlus.h @@ -609,10 +609,10 @@ public: static PyObject *GetProxyPlus_Ext(PyObjectPlus *self, PyTypeObject *tp, void *ptr); /* self=NULL => proxy to generic pointer detached from GE object - if py_owns is true, the memory pointed by ptr will be deleted automatically with MEM_freeN - self!=NULL=> proxy attached to GE object, ptr is optional and point to a struct from which attributes can be defined - if py_owns is true, the object will be deleted automatically, ptr will NOT be deleted - (assume object destructor takes care of it) */ + * if py_owns is true, the memory pointed by ptr will be deleted automatically with MEM_freeN + * self!=NULL=> proxy attached to GE object, ptr is optional and point to a struct from which attributes can be defined + * if py_owns is true, the object will be deleted automatically, ptr will NOT be deleted + * (assume object destructor takes care of it) */ static PyObject *NewProxyPlus_Ext(PyObjectPlus *self, PyTypeObject *tp, void *ptr, bool py_owns); static WarnLink* GetDeprecationWarningLinkFirst(void); diff --git a/source/gameengine/Expressions/StringValue.cpp b/source/gameengine/Expressions/StringValue.cpp index 29c72a29b71..2e29a39222b 100644 --- a/source/gameengine/Expressions/StringValue.cpp +++ b/source/gameengine/Expressions/StringValue.cpp @@ -24,20 +24,20 @@ // Construction/Destruction ////////////////////////////////////////////////////////////////////// +/** + * pre: false + * effect: constructs a new CStringValue + */ CStringValue::CStringValue() -/* -pre: false -effect: constructs a new CStringValue -*/ { m_strString = "[Illegal String constructor call]"; } +/** + * pre: + * effect: constructs a new CStringValue containing text txt + */ CStringValue::CStringValue(const char *txt,const char *name,AllocationTYPE alloctype) -/* -pre: -effect: constructs a new CStringValue containing text txt -*/ { m_strString = txt; SetName(name); @@ -52,23 +52,23 @@ effect: constructs a new CStringValue containing text txt } +/** + * pre: + * ret: a new object containing the result of applying operator op to this + * object and val + */ CValue* CStringValue::Calc(VALUE_OPERATOR op, CValue *val) -/* -pre: -ret: a new object containing the result of applying operator op to this -object and val -*/ { //return val->CalrcString(op, this); return val->CalcFinal(VALUE_STRING_TYPE, op, this); } +/** + * pre: the type of val is dtype + * ret: a new object containing the result of applying operator op to val and + * this object + */ CValue* CStringValue::CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val) -/* -pre: the type of val is dtype -ret: a new object containing the result of applying operator op to val and -this object -*/ { CValue *ret; diff --git a/source/gameengine/Expressions/Value.h b/source/gameengine/Expressions/Value.h index 3a81ec05d5b..00320ff9ed2 100644 --- a/source/gameengine/Expressions/Value.h +++ b/source/gameengine/Expressions/Value.h @@ -152,7 +152,7 @@ struct ValueFlags { /** * Base Class for all Actions performed on CValue's. Can be extended for undo/redo system in future. -*/ + */ class CAction { public: diff --git a/source/gameengine/Expressions/VectorValue.cpp b/source/gameengine/Expressions/VectorValue.cpp index 07a2743b19f..65f5d7d3d22 100644 --- a/source/gameengine/Expressions/VectorValue.cpp +++ b/source/gameengine/Expressions/VectorValue.cpp @@ -87,12 +87,12 @@ CVectorValue::~CVectorValue() } +/** + * pre: the type of val is dtype + * ret: a new object containing the result of applying operator op to val and + * this object + */ CValue* CVectorValue::CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val) -/* -pre: the type of val is dtype -ret: a new object containing the result of applying operator op to val and -this object -*/ { CValue *ret = NULL; @@ -210,10 +210,9 @@ CValue* CVectorValue::GetReplica() return replica; }; -/*void CVectorValue::Transform(rcMatrix4x4 mat) +#if 0 +void CVectorValue::Transform(rcMatrix4x4 mat) { m_transformedvec = mat*m_vec; } -*/ - - +#endif diff --git a/source/gameengine/Expressions/VectorValue.h b/source/gameengine/Expressions/VectorValue.h index 6ff47843282..6158d6773ff 100644 --- a/source/gameengine/Expressions/VectorValue.h +++ b/source/gameengine/Expressions/VectorValue.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _VECTORVALUE_H +#ifndef _VECTORVALUE_H #define _VECTORVALUE_H #include "Value.h" @@ -59,7 +59,7 @@ public: virtual CValue* GetReplica(); virtual const STR_String & GetText(); -/* +#if 0 void SnapPoint(float num,int snap) { if (num > 0) num += ((float)snap / 2); @@ -78,8 +78,8 @@ public: SnapPoint(m_vec[KX_Z],snapvec[KX_Z]); } -*/ - +#endif + protected: double m_vec[3]; double m_transformedvec[3]; diff --git a/source/gameengine/GameLogic/Joystick/SCA_Joystick.h b/source/gameengine/GameLogic/Joystick/SCA_Joystick.h index ba4a64a138c..a992150fad3 100644 --- a/source/gameengine/GameLogic/Joystick/SCA_Joystick.h +++ b/source/gameengine/GameLogic/Joystick/SCA_Joystick.h @@ -74,7 +74,7 @@ class SCA_Joystick /** * max # of buttons avail - */ + */ int m_axismax; int m_buttonmax; diff --git a/source/gameengine/GamePlayer/common/GPC_Canvas.cpp b/source/gameengine/GamePlayer/common/GPC_Canvas.cpp index 15211247d26..0915326c8eb 100644 --- a/source/gameengine/GamePlayer/common/GPC_Canvas.cpp +++ b/source/gameengine/GamePlayer/common/GPC_Canvas.cpp @@ -442,17 +442,17 @@ MakeScreenShot( png_init_io(png_ptr, fp); - /* +#if 0 png_set_filter(png_ptr, 0, - PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE | - PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB | - PNG_FILTER_UP | PNG_FILTER_VALUE_UP | - PNG_FILTER_AVG | PNG_FILTER_VALUE_AVG | - PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH| - PNG_ALL_FILTERS); + PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE | + PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB | + PNG_FILTER_UP | PNG_FILTER_VALUE_UP | + PNG_FILTER_AVG | PNG_FILTER_VALUE_AVG | + PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH| + PNG_ALL_FILTERS); png_set_compression_level(png_ptr, Z_BEST_COMPRESSION); - */ +#endif // png image settings png_set_IHDR(png_ptr, diff --git a/source/gameengine/Ketsji/BL_Material.h b/source/gameengine/Ketsji/BL_Material.h index 2c6316ea32b..7b1779fed10 100644 --- a/source/gameengine/Ketsji/BL_Material.h +++ b/source/gameengine/Ketsji/BL_Material.h @@ -24,11 +24,11 @@ struct EnvMap; // -- /** max units - this will default to users available units - to build with more available, just increment this value - although the more you add the slower the search time will be. - we will go for eight, which should be enough -*/ + * this will default to users available units + * to build with more available, just increment this value + * although the more you add the slower the search time will be. + * we will go for eight, which should be enough + */ #define MAXTEX 8 //match in RAS_TexVert & RAS_OpenGLRasterizer // different mapping modes diff --git a/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp b/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp index 3febff92e18..9940b400527 100644 --- a/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp +++ b/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp @@ -235,9 +235,9 @@ void KX_BulletPhysicsController::setRigidBody(bool rigid) } /* This function dynamically adds the collision shape of another controller to - the current controller shape provided it is a compound shape. - The idea is that dynamic parenting on a compound object will dynamically extend the shape -*/ + * the current controller shape provided it is a compound shape. + * The idea is that dynamic parenting on a compound object will dynamically extend the shape + */ void KX_BulletPhysicsController::AddCompoundChild(KX_IPhysicsController* child) { if (child == NULL || !IsCompound()) @@ -308,8 +308,8 @@ void KX_BulletPhysicsController::AddCompoundChild(KX_IPhysicsController* chil } /* Reverse function of the above, it will remove a shape from a compound shape - provided that the former was added to the later using AddCompoundChild() -*/ + * provided that the former was added to the later using AddCompoundChild() + */ void KX_BulletPhysicsController::RemoveCompoundChild(KX_IPhysicsController* child) { if (child == NULL || !IsCompound()) diff --git a/source/gameengine/Ketsji/KX_Camera.cpp b/source/gameengine/Ketsji/KX_Camera.cpp index 14a307794db..7a2d71f56ff 100644 --- a/source/gameengine/Ketsji/KX_Camera.cpp +++ b/source/gameengine/Ketsji/KX_Camera.cpp @@ -133,8 +133,8 @@ const MT_Quaternion KX_Camera::GetCameraOrientation() const /** -* Sets the projection matrix that is used by the rasterizer. -*/ + * Sets the projection matrix that is used by the rasterizer. + */ void KX_Camera::SetProjectionMatrix(const MT_Matrix4x4 & mat) { m_projection_matrix = mat; @@ -146,8 +146,8 @@ void KX_Camera::SetProjectionMatrix(const MT_Matrix4x4 & mat) /** -* Sets the modelview matrix that is used by the rasterizer. -*/ + * Sets the modelview matrix that is used by the rasterizer. + */ void KX_Camera::SetModelviewMatrix(const MT_Matrix4x4 & mat) { m_modelview_matrix = mat; @@ -158,8 +158,8 @@ void KX_Camera::SetModelviewMatrix(const MT_Matrix4x4 & mat) /** -* Gets the projection matrix that is used by the rasterizer. -*/ + * Gets the projection matrix that is used by the rasterizer. + */ const MT_Matrix4x4& KX_Camera::GetProjectionMatrix() const { return m_projection_matrix; @@ -168,8 +168,8 @@ const MT_Matrix4x4& KX_Camera::GetProjectionMatrix() const /** -* Gets the modelview matrix that is used by the rasterizer. -*/ + * Gets the modelview matrix that is used by the rasterizer. + */ const MT_Matrix4x4& KX_Camera::GetModelviewMatrix() const { return m_modelview_matrix; @@ -187,9 +187,9 @@ void KX_Camera::InvalidateProjectionMatrix(bool valid) } -/* -* These getters retrieve the clip data and the focal length -*/ +/** + * These getters retrieve the clip data and the focal length + */ float KX_Camera::GetLens() const { return m_camdata.m_lens; @@ -200,17 +200,17 @@ float KX_Camera::GetScale() const return m_camdata.m_scale; } -/* -* Gets the horizontal size of the sensor - for camera matching. -*/ +/** + * Gets the horizontal size of the sensor - for camera matching. + */ float KX_Camera::GetSensorWidth() const { return m_camdata.m_sensor_x; } -/* -* Gets the vertical size of the sensor - for camera matching. -*/ +/** + * Gets the vertical size of the sensor - for camera matching. + */ float KX_Camera::GetSensorHeight() const { return m_camdata.m_sensor_y; diff --git a/source/gameengine/Ketsji/KX_Camera.h b/source/gameengine/Ketsji/KX_Camera.h index 38fc170e371..7481b2eb7f0 100644 --- a/source/gameengine/Ketsji/KX_Camera.h +++ b/source/gameengine/Ketsji/KX_Camera.h @@ -63,12 +63,13 @@ protected: // Never used, I think... // void MoveTo(const MT_Point3& movevec) // { - /*MT_Transform camtrans; +#if 0 + MT_Transform camtrans; camtrans.invert(m_trans1); MT_Matrix3x3 camorient = camtrans.getBasis(); camtrans.translate(camorient.inverse()*movevec); m_trans1.invert(camtrans); - */ +#endif // } /** @@ -185,8 +186,8 @@ public: bool hasValidProjectionMatrix() const; /** Sets the validity of the projection matrix. Call this if you change camera - data (eg lens, near plane, far plane) and require the projection matrix to be - recalculated. + * data (eg lens, near plane, far plane) and require the projection matrix to be + * recalculated. */ void InvalidateProjectionMatrix(bool valid = false); diff --git a/source/gameengine/Ketsji/KX_CameraActuator.cpp b/source/gameengine/Ketsji/KX_CameraActuator.cpp index 1361a6122ad..b683fcb8036 100644 --- a/source/gameengine/Ketsji/KX_CameraActuator.cpp +++ b/source/gameengine/Ketsji/KX_CameraActuator.cpp @@ -186,7 +186,7 @@ static void Kx_VecUpMat3(float vec[3], float mat[][3], short axis) mat[coz][2]= vec[2]; if (Kx_Normalize((float *)mat[coz]) == 0.f) { /* this is a very abnormal situation: the camera has reach the object center exactly - We will choose a completely arbitrary direction */ + * We will choose a completely arbitrary direction */ mat[coz][0] = 1.0f; mat[coz][1] = 0.0f; mat[coz][2] = 0.0f; @@ -239,9 +239,9 @@ bool KX_CameraActuator::Update(double curtime, bool frame) /* CONSTRAINT 6: again: fixed height relative to floor below actor */ /* CONSTRAINT 7: track to floor below actor */ /* CONSTRAINT 8: look a little bit left or right, depending on how the - - character is looking (horizontal x) - */ + * + * character is looking (horizontal x) + */ /* ...and then set the camera position. Since we assume the parent of */ /* this actuator is always a camera, just set the parent position and */ diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp index f78ff0081b7..322d6e60071 100644 --- a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp +++ b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp @@ -147,8 +147,8 @@ bool KX_ConstraintActuator::RayHit(KX_ClientObjectInfo* client, KX_RayCast* resu return true; } -/* this function is used to pre-filter the object before casting the ray on them. - This is useful for "X-Ray" option when we want to see "through" unwanted object. +/* This function is used to pre-filter the object before casting the ray on them. + * This is useful for "X-Ray" option when we want to see "through" unwanted object. */ bool KX_ConstraintActuator::NeedRayCast(KX_ClientObjectInfo* client) { diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp index 610200cc235..28e7f221ce4 100644 --- a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp +++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp @@ -464,7 +464,7 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj, if (objprop->m_dyna && !objprop->m_angular_rigidbody) { - /* +#if 0 //setting the inertia could achieve similar results to constraint the up //but it is prone to instability, so use special 'Angular' constraint btVector3 inertia = physicscontroller->GetRigidBody()->getInvInertiaDiagLocal(); @@ -473,7 +473,7 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj, physicscontroller->GetRigidBody()->setInvInertiaDiagLocal(inertia); physicscontroller->GetRigidBody()->updateInertiaTensor(); - */ +#endif //env->createConstraint(physicscontroller,0,PHY_ANGULAR_CONSTRAINT,0,0,0,0,0,1); diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp index 6bd30685696..6e989dd4d7d 100644 --- a/source/gameengine/Ketsji/KX_Dome.cpp +++ b/source/gameengine/Ketsji/KX_Dome.cpp @@ -1,26 +1,26 @@ /* ------------------------------------------------------------------------------ - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place - Suite 330, Boston, MA 02111-1307, USA, or go to -http://www.gnu.org/copyleft/lesser.txt. - -Contributor(s): Dalai Felinto - -This code is originally inspired on some of the ideas and codes from Paul Bourke. -Developed as part of a Research and Development project for SAT - La Société des arts technologiques. ------------------------------------------------------------------------------ -*/ + * ----------------------------------------------------------------------------- + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 59 Temple + * Place - Suite 330, Boston, MA 02111-1307, USA, or go to + * http://www.gnu.org/copyleft/lesser.txt. + * + * Contributor(s): Dalai Felinto + * + * This code is originally inspired on some of the ideas and codes from Paul Bourke. + * Developed as part of a Research and Development project for SAT - La Société des arts technologiques. + * ----------------------------------------------------------------------------- + */ /** \file gameengine/Ketsji/KX_Dome.cpp * \ingroup ketsji @@ -218,20 +218,20 @@ void KX_Dome::CreateGLImages(void) void KX_Dome::ClearGLImages(void) { glDeleteTextures(m_numimages, (GLuint*)&domefacesId); -/* +#if 0 for (int i=0;iGetWidth(); canvasheight = m_canvas->GetHeight(); @@ -453,28 +453,28 @@ void KX_Dome::GLDrawWarpQuads(void) bool KX_Dome::ParseWarpMesh(STR_String text) { -/* -//Notes about the supported data format: -File example:: - mode - width height - n0_x n0_y n0_u n0_v n0_i - n1_x n1_y n1_u n1_v n1_i - n2_x n1_y n2_u n2_v n2_i - n3_x n3_y n3_u n3_v n3_i - (...) -First line is the image type the mesh is support to be applied to: 2 = fisheye, 1=radial -Tthe next line has the mesh dimensions -Rest of the lines are the nodes of the mesh. Each line has x y u v i - (x,y) are the normalised screen coordinates - (u,v) texture coordinates - i a multiplicative intensity factor - -x varies from -screen aspect to screen aspect -y varies from -1 to 1 -u and v vary from 0 to 1 -i ranges from 0 to 1, if negative don't draw that mesh node -*/ + /* + * //Notes about the supported data format: + * File example:: + * mode + * width height + * n0_x n0_y n0_u n0_v n0_i + * n1_x n1_y n1_u n1_v n1_i + * n2_x n1_y n2_u n2_v n2_i + * n3_x n3_y n3_u n3_v n3_i + * (...) + * First line is the image type the mesh is support to be applied to: 2 = fisheye, 1=radial + * Tthe next line has the mesh dimensions + * Rest of the lines are the nodes of the mesh. Each line has x y u v i + * (x,y) are the normalised screen coordinates + * (u,v) texture coordinates + * i a multiplicative intensity factor + * + * x varies from -screen aspect to screen aspect + * y varies from -1 to 1 + * u and v vary from 0 to 1 + * i ranges from 0 to 1, if negative don't draw that mesh node + */ int i; int nodeX=0, nodeY=0; @@ -532,16 +532,16 @@ i ranges from 0 to 1, if negative don't draw that mesh node void KX_Dome::CreateMeshDome180(void) { -/* -1)- Define the faces of half of a cube - - each face is made out of 2 triangles -2) Subdivide the faces - - more resolution == more curved lines -3) Spherize the cube - - normalize the verts -4) Flatten onto xz plane - - transform it onto an equidistant spherical projection techniques to transform the sphere onto a dome image -*/ + /* + * 1)- Define the faces of half of a cube + * - each face is made out of 2 triangles + * 2) Subdivide the faces + * - more resolution == more curved lines + * 3) Spherize the cube + * - normalize the verts + * 4) Flatten onto xz plane + * - transform it onto an equidistant spherical projection techniques to transform the sphere onto a dome image + */ int i,j; float uv_ratio = (float)(m_buffersize-1) / m_imagesize; @@ -711,16 +711,16 @@ void KX_Dome::CreateMeshDome180(void) void KX_Dome::CreateMeshDome250(void) { -/* -1)- Define the faces of a cube without the back face - - each face is made out of 2 triangles -2) Subdivide the faces - - more resolution == more curved lines -3) Spherize the cube - - normalize the verts -4) Flatten onto xz plane - - transform it onto an equidistant spherical projection techniques to transform the sphere onto a dome image -*/ + /* + * 1)- Define the faces of a cube without the back face + * - each face is made out of 2 triangles + * 2) Subdivide the faces + * - more resolution == more curved lines + * 3) Spherize the cube + * - normalize the verts + * 4) Flatten onto xz plane + * - transform it onto an equidistant spherical projection techniques to transform the sphere onto a dome image + */ int i,j; float uv_height, uv_base; @@ -730,20 +730,20 @@ void KX_Dome::CreateMeshDome250(void) float uv_ratio = (float)(m_buffersize-1) / m_imagesize; m_radangle = m_angle * M_PI/180.0;//calculates the radians angle, used for flattening -/* -verts_height is the exactly needed height of the cube faces (not always 1.0). -When we want some horizontal information (e.g. for horizontal 220deg domes) we don't need to create and tesselate the whole cube. -Therefore the lateral cube faces could be small, and the tesselate mesh would be completely used. -(if we always worked with verts_height = 1.0, we would be discarding a lot of the calculated and tesselated geometry). - -So I came out with this formula: -verts_height = tan((rad_ang/2) - (MT_PI/2))*sqrt(2.0); - -Here we take half the sphere(rad_ang/2) and subtract a quarter of it (MT_PI/2) -Therefore we have the length in radians of the dome/sphere over the horizon. -Once we take the tangent of that angle, you have the verts coordinate corresponding to the verts on the side faces. -Then we need to multiply it by sqrt(2.0) to get the coordinate of the verts on the diagonal of the original cube. -*/ + /* + * verts_height is the exactly needed height of the cube faces (not always 1.0). + * When we want some horizontal information (e.g. for horizontal 220deg domes) we don't need to create and tesselate the whole cube. + * Therefore the lateral cube faces could be small, and the tesselate mesh would be completely used. + * (if we always worked with verts_height = 1.0, we would be discarding a lot of the calculated and tesselated geometry). + * + * So I came out with this formula: + * verts_height = tan((rad_ang/2) - (MT_PI/2))*sqrt(2.0); + * + * Here we take half the sphere(rad_ang/2) and subtract a quarter of it (MT_PI/2) + * Therefore we have the length in radians of the dome/sphere over the horizon. + * Once we take the tangent of that angle, you have the verts coordinate corresponding to the verts on the side faces. + * Then we need to multiply it by sqrt(2.0) to get the coordinate of the verts on the diagonal of the original cube. + */ verts_height = tan((rad_ang/2) - (MT_PI/2))*M_SQRT2; uv_height = uv_ratio * ((verts_height/2) + 0.5); @@ -995,16 +995,16 @@ Then we need to multiply it by sqrt(2.0) to get the coordinate of the verts on t void KX_Dome::CreateMeshPanorama(void) { -/* -1)- Define the faces of a cube without the top and bottom faces - - each face is made out of 2 triangles -2) Subdivide the faces - - more resolution == more curved lines -3) Spherize the cube - - normalize the verts t -4) Flatten onto xz plane - - use spherical projection techniques to transform the sphere onto a flat panorama -*/ + /* + * 1)- Define the faces of a cube without the top and bottom faces + * - each face is made out of 2 triangles + * 2) Subdivide the faces + * - more resolution == more curved lines + * 3) Spherize the cube + * - normalize the verts t + * 4) Flatten onto xz plane + * - use spherical projection techniques to transform the sphere onto a flat panorama + */ int i,j; float uv_ratio = (float)(m_buffersize-1) / m_imagesize; @@ -1432,10 +1432,10 @@ void KX_Dome::SplitFace(vector & face, int *nfaces) void KX_Dome::CalculateFrustum(KX_Camera * cam) { - /* +#if 0 // manually creating a 90deg Field of View Frustum - the original formula: + // the original formula: top = tan(fov*3.14159/360.0) * near [for fov in degrees] fov*0.5 = arctan ((top-bottom)*0.5 / near) [for fov in radians] bottom = -top @@ -1446,7 +1446,7 @@ void KX_Dome::CalculateFrustum(KX_Camera * cam) glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(90.0,1.0,cam->GetCameraNear(),cam->GetCameraFar()); - */ +#endif RAS_FrameFrustum m_frustrum; //90 deg. Frustum @@ -1469,10 +1469,10 @@ void KX_Dome::CalculateFrustum(KX_Camera * cam) void KX_Dome::CalculateCameraOrientation() { /* -Uses 4 cameras for angles up to 180deg -Uses 5 cameras for angles up to 250deg -Uses 6 cameras for angles up to 360deg -*/ + * Uses 4 cameras for angles up to 180deg + * Uses 5 cameras for angles up to 250deg + * Uses 6 cameras for angles up to 360deg + */ int i; float deg45 = MT_PI / 4; MT_Scalar c = cos(deg45); diff --git a/source/gameengine/Ketsji/KX_Dome.h b/source/gameengine/Ketsji/KX_Dome.h index 922e2d4efb3..d4524d23d7d 100644 --- a/source/gameengine/Ketsji/KX_Dome.h +++ b/source/gameengine/Ketsji/KX_Dome.h @@ -26,8 +26,8 @@ Developed as part of a Research and Development project for SAT - La Soci�t� * \ingroup ketsji */ -#if !defined KX_DOME_H -#define KX_DOME_H +#ifndef __KX_DOME_H__ +#define __KX_DOME_H__ #include "KX_Scene.h" #include "KX_Camera.h" @@ -196,5 +196,4 @@ public: #endif }; -#endif - +#endif /* __KX_DOME_H__ */ diff --git a/source/gameengine/Ketsji/KX_FontObject.cpp b/source/gameengine/Ketsji/KX_FontObject.cpp index 3739ad0d712..5a67b052a2b 100644 --- a/source/gameengine/Ketsji/KX_FontObject.cpp +++ b/source/gameengine/Ketsji/KX_FontObject.cpp @@ -92,8 +92,8 @@ KX_FontObject::KX_FontObject( void* sgReplicationInfo, m_fontid = GetFontId(text->vfont); /* initialize the color with the object color and store it in the KX_Object class - This is a workaround waiting for the fix: - [#25487] BGE: Object Color only works when it has a keyed frame */ + * This is a workaround waiting for the fix: + * [#25487] BGE: Object Color only works when it has a keyed frame */ copy_v4_v4(m_color, (const float*) ob->col); this->SetObjectColor((const MT_Vector4&) m_color); } diff --git a/source/gameengine/Ketsji/KX_FontObject.h b/source/gameengine/Ketsji/KX_FontObject.h index 2466a32dad4..affa882427f 100644 --- a/source/gameengine/Ketsji/KX_FontObject.h +++ b/source/gameengine/Ketsji/KX_FontObject.h @@ -69,13 +69,13 @@ protected: class RAS_IRenderTools* m_rendertools; //needed for drawing routine -/* +#if 0 // WHY COMMENTED? - campbell #ifdef WITH_CXX_GUARDEDALLOC public: void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_FontObject"); } void operator delete( void *mem ) { MEM_freeN(mem); } #endif -*/ +#endif #ifdef WITH_PYTHON static PyObject* pyattr_get_text(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 5c758379727..5db9958f269 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -540,8 +540,8 @@ void KX_GameObject::ApplyRotation(const MT_Vector3& drot,bool local) /** -GetOpenGL Matrix, returns an OpenGL 'compatible' matrix -*/ + * GetOpenGL Matrix, returns an OpenGL 'compatible' matrix + */ double* KX_GameObject::GetOpenGLMatrix() { // todo: optimize and only update if necessary @@ -2901,7 +2901,7 @@ bool KX_GameObject::RayHit(KX_ClientObjectInfo* client, KX_RayCast* result, void } /* this function is used to pre-filter the object before casting the ray on them. - This is useful for "X-Ray" option when we want to see "through" unwanted object. + * This is useful for "X-Ray" option when we want to see "through" unwanted object. */ bool KX_GameObject::NeedRayCast(KX_ClientObjectInfo* client) { diff --git a/source/gameengine/Ketsji/KX_IPhysicsController.h b/source/gameengine/Ketsji/KX_IPhysicsController.h index 5fc9f5c2473..68577f09414 100644 --- a/source/gameengine/Ketsji/KX_IPhysicsController.h +++ b/source/gameengine/Ketsji/KX_IPhysicsController.h @@ -41,11 +41,11 @@ struct KX_ClientObjectInfo; /** - Physics Controller, a special kind of Scene Graph Transformation Controller. - It get's callbacks from Physics in case a transformation change took place. - Each time the scene graph get's updated, the controller get's a chance - in the 'Update' method to reflect changed. -*/ + * Physics Controller, a special kind of Scene Graph Transformation Controller. + * It get's callbacks from Physics in case a transformation change took place. + * Each time the scene graph get's updated, the controller get's a chance + * in the 'Update' method to reflect changed. + */ class KX_IPhysicsController : public SG_Controller diff --git a/source/gameengine/Ketsji/KX_ISceneConverter.h b/source/gameengine/Ketsji/KX_ISceneConverter.h index dce97ea039f..50390005f2b 100644 --- a/source/gameengine/Ketsji/KX_ISceneConverter.h +++ b/source/gameengine/Ketsji/KX_ISceneConverter.h @@ -49,11 +49,11 @@ public: virtual ~KX_ISceneConverter () {}; /* - scenename: name of the scene to be converted, - if the scenename is empty, convert the 'default' scene (whatever this means) - destinationscene: pass an empty scene, everything goes into this - dictobj: python dictionary (for pythoncontrollers) - */ + * scenename: name of the scene to be converted, + * if the scenename is empty, convert the 'default' scene (whatever this means) + * destinationscene: pass an empty scene, everything goes into this + * dictobj: python dictionary (for pythoncontrollers) + */ virtual void ConvertScene( class KX_Scene* destinationscene, class RAS_IRenderTools* rendertools, diff --git a/source/gameengine/Ketsji/KX_IpoActuator.h b/source/gameengine/Ketsji/KX_IpoActuator.h index a8b7a362bd9..58cdfc28742 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.h +++ b/source/gameengine/Ketsji/KX_IpoActuator.h @@ -40,13 +40,13 @@ class KX_IpoActuator : public SCA_IActuator Py_Header private: /** Computes the IPO start time from the current time - and the current frame. */ + * and the current frame. */ void SetStartTime(float curtime); /** Computes the current frame from the current time - and the IPO start time. */ + * and the IPO start time. */ void SetLocalTime(float curtime); /** Ensures the current frame is between the start and - end frames. */ + * end frames. */ bool ClampLocalTime(); protected: diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp index 1381dcb3607..facac230e05 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp @@ -599,9 +599,9 @@ else KX_Scene* scene = *sceneit; /* Suspension holds the physics and logic processing for an - * entire scene. Objects can be suspended individually, and - * the settings for that preceed the logic and physics - * update. */ + * entire scene. Objects can be suspended individually, and + * the settings for that preceed the logic and physics + * update. */ m_logger->StartLog(tc_logic, m_kxsystem->GetTimeInSeconds(), true); m_sceneconverter->resetNoneDynamicObjectToIpo();//this is for none dynamic objects with ipo @@ -1340,8 +1340,8 @@ void KX_KetsjiEngine::RenderFonts(KX_Scene* scene) } /* -To run once per scene -*/ + * To run once per scene + */ void KX_KetsjiEngine::PostRenderScene(KX_Scene* scene) { // We need to first make sure our viewport is correct (enabling multiple viewports can mess this up) diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp index c8a916e85b6..0d81883104b 100644 --- a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp +++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp @@ -142,11 +142,11 @@ bool KX_MouseFocusSensor::RayHit(KX_ClientObjectInfo* client_info, KX_RayCast* r KX_GameObject* hitKXObj = client_info->m_gameobject; /* Is this me? In the ray test, there are a lot of extra checks - * for aliasing artefacts from self-hits. That doesn't happen - * here, so a simple test suffices. Or does the camera also get - * self-hits? (No, and the raysensor shouldn't do it either, since - * self-hits are excluded by setting the correct ignore-object.) - * Hitspots now become valid. */ + * for aliasing artefacts from self-hits. That doesn't happen + * here, so a simple test suffices. Or does the camera also get + * self-hits? (No, and the raysensor shouldn't do it either, since + * self-hits are excluded by setting the correct ignore-object.) + * Hitspots now become valid. */ KX_GameObject* thisObj = (KX_GameObject*) GetParent(); if ((m_focusmode == 2) || hitKXObj == thisObj) { diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.h b/source/gameengine/Ketsji/KX_MouseFocusSensor.h index f8f5426dc8d..db9e3697492 100644 --- a/source/gameengine/Ketsji/KX_MouseFocusSensor.h +++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.h @@ -120,7 +120,7 @@ class KX_MouseFocusSensor : public SCA_MouseSensor private: /** * The focus mode. 1 for handling focus, 0 for not handling, 2 for focus on any object - */ + */ int m_focusmode; /** diff --git a/source/gameengine/Ketsji/KX_NearSensor.h b/source/gameengine/Ketsji/KX_NearSensor.h index 1327f0aea37..8655d93d406 100644 --- a/source/gameengine/Ketsji/KX_NearSensor.h +++ b/source/gameengine/Ketsji/KX_NearSensor.h @@ -55,7 +55,7 @@ public: bool bFindMaterial, const STR_String& touchedpropname, PHY_IPhysicsController* ctrl); -/* +#if 0 public: KX_NearSensor(class SCA_EventManager* eventmgr, class KX_GameObject* gameobj, @@ -64,7 +64,7 @@ public: bool bFindMaterial, const STR_String& touchedpropname, class KX_Scene* scene); -*/ +#endif virtual ~KX_NearSensor(); virtual void SynchronizeTransform(); virtual CValue* GetReplica(); diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index cbf08a674ef..82016e2fff3 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -2025,7 +2025,7 @@ PyObject* initRasterizer(RAS_IRasterizer* rasty,RAS_ICanvas* canvas) PyObject* item; /* Use existing module where possible - * be careful not to init any runtime vars after this */ + * be careful not to init any runtime vars after this */ m = PyImport_ImportModule( "Rasterizer" ); if(m) { Py_DECREF(m); diff --git a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp index e367ef83eb8..6a60fc08244 100644 --- a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp +++ b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp @@ -168,9 +168,9 @@ void initPyTypes(void) { /* - initPyObjectPlusType(BL_ActionActuator::Parents); - ..... -*/ + * initPyObjectPlusType(BL_ActionActuator::Parents); + * ..... + */ /* For now just do PyType_Ready */ PyObject *mod= PyModule_New("GameTypes"); diff --git a/source/gameengine/Ketsji/KX_RadarSensor.h b/source/gameengine/Ketsji/KX_RadarSensor.h index f647189ab35..903413ca89b 100644 --- a/source/gameengine/Ketsji/KX_RadarSensor.h +++ b/source/gameengine/Ketsji/KX_RadarSensor.h @@ -36,8 +36,8 @@ #include "MT_Point3.h" /** -* Radar 'cone' sensor. Very similar to a near-sensor, but instead of a sphere, a cone is used. -*/ + * Radar 'cone' sensor. Very similar to a near-sensor, but instead of a sphere, a cone is used. + */ class KX_RadarSensor : public KX_NearSensor { protected: diff --git a/source/gameengine/Ketsji/KX_RaySensor.cpp b/source/gameengine/Ketsji/KX_RaySensor.cpp index 0cc0e7318c1..58ca847b617 100644 --- a/source/gameengine/Ketsji/KX_RaySensor.cpp +++ b/source/gameengine/Ketsji/KX_RaySensor.cpp @@ -151,7 +151,7 @@ bool KX_RaySensor::RayHit(KX_ClientObjectInfo* client, KX_RayCast* result, void } /* this function is used to pre-filter the object before casting the ray on them. - This is useful for "X-Ray" option when we want to see "through" unwanted object. + * This is useful for "X-Ray" option when we want to see "through" unwanted object. */ bool KX_RaySensor::NeedRayCast(KX_ClientObjectInfo* client) { diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 2763dea04ec..74a0abe526d 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -1574,8 +1574,8 @@ void KX_Scene::LogicEndFrame() /** - * UpdateParents: SceneGraph transformation update. - */ + * UpdateParents: SceneGraph transformation update. + */ void KX_Scene::UpdateParents(double curtime) { // we use the SG dynamic list diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h index 9f12d9473bc..7e3378bd13f 100644 --- a/source/gameengine/Ketsji/KX_Scene.h +++ b/source/gameengine/Ketsji/KX_Scene.h @@ -160,8 +160,8 @@ protected: // Used to deregister objects that are deleted class KX_BlenderSceneConverter* m_sceneConverter; /** - * physics engine abstraction - */ + * physics engine abstraction + */ //e_PhysicsEngine m_physicsEngine; //who needs this ? class PHY_IPhysicsEnvironment* m_physicsEnvironment; @@ -582,8 +582,8 @@ public: void SetNodeTree(SG_Tree* root); /** - * 2D Filters - */ + * 2D Filters + */ void Update2DFilter(std::vector& propNames, void* gameObj, RAS_2DFilterManager::RAS_2DFILTER_MODE filtermode, int pass, STR_String& text); void Render2DFilters(RAS_ICanvas* canvas); diff --git a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp index 30344ce3a10..903ea14c5d2 100644 --- a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp +++ b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp @@ -356,11 +356,11 @@ void RAS_2DFilterManager::UpdateOffsetMatrix(RAS_ICanvas* canvas) void RAS_2DFilterManager::UpdateCanvasTextureCoord(unsigned int * viewport) { /* - This function update canvascoord[]. - These parameters are used to create texcoord[1] - That way we can access the texcoord relative to the canvas: - (0.0,0.0) bottom left, (1.0,1.0) top right, (0.5,0.5) center - */ + * This function update canvascoord[]. + * These parameters are used to create texcoord[1] + * That way we can access the texcoord relative to the canvas: + * (0.0,0.0) bottom left, (1.0,1.0) top right, (0.5,0.5) center + */ canvascoord[0] = (GLfloat) viewport[0] / viewport[2]; canvascoord[0] *= -1; canvascoord[1] = (GLfloat) (texturewidth - viewport[0]) / viewport[2]; diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp index e5ca40c1354..4e4d70fac31 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp @@ -158,11 +158,11 @@ void RAS_ListRasterizer::RemoveListSlot(RAS_ListSlot* list) RAS_ListSlot* RAS_ListRasterizer::FindOrAdd(RAS_MeshSlot& ms) { /* - Keep a copy of constant lists submitted for rendering, - this guards against (replicated)new...delete every frame, - and we can reuse lists! - :: sorted by mesh slot - */ + * Keep a copy of constant lists submitted for rendering, + * this guards against (replicated)new...delete every frame, + * and we can reuse lists! + * :: sorted by mesh slot + */ RAS_ListSlot* localSlot = (RAS_ListSlot*)ms.m_DisplayList; if(!localSlot) { if (ms.m_pDerivedMesh) { diff --git a/source/gameengine/VideoTexture/BlendType.h b/source/gameengine/VideoTexture/BlendType.h index fad23af922e..22f0cd769d3 100644 --- a/source/gameengine/VideoTexture/BlendType.h +++ b/source/gameengine/VideoTexture/BlendType.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined BLENDTYPE_H +#ifndef BLENDTYPE_H #define BLENDTYPE_H diff --git a/source/gameengine/VideoTexture/Common.h b/source/gameengine/VideoTexture/Common.h index fe9632b02bb..e6e0ffa1ebc 100644 --- a/source/gameengine/VideoTexture/Common.h +++ b/source/gameengine/VideoTexture/Common.h @@ -28,31 +28,31 @@ http://www.gnu.org/copyleft/lesser.txt. #define WINDOWS_LEAN_AND_MEAN #endif -#if !defined NULL +#ifndef NULL #define NULL 0 #endif -#if !defined HRESULT +#ifndef HRESULT #define HRESULT long #endif -#if !defined DWORD +#ifndef DWORD #define DWORD unsigned long #endif -#if !defined S_OK +#ifndef S_OK #define S_OK ((HRESULT)0L) #endif -#if !defined BYTE +#ifndef BYTE #define BYTE unsigned char #endif -#if !defined WIN32 +#ifndef WIN32 #define Sleep(time) sleep(time) #endif -#if !defined FAILED +#ifndef FAILED #define FAILED(Status) ((HRESULT)(Status)<0) #endif diff --git a/source/gameengine/VideoTexture/Exception.h b/source/gameengine/VideoTexture/Exception.h index af226fab75d..115a5c48641 100644 --- a/source/gameengine/VideoTexture/Exception.h +++ b/source/gameengine/VideoTexture/Exception.h @@ -25,7 +25,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined EXCEPTION_H +#ifndef EXCEPTION_H #define EXCEPTION_H #include diff --git a/source/gameengine/VideoTexture/FilterBase.h b/source/gameengine/VideoTexture/FilterBase.h index bdb3106d58d..902c10de953 100644 --- a/source/gameengine/VideoTexture/FilterBase.h +++ b/source/gameengine/VideoTexture/FilterBase.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined FILTERBASE_H +#ifndef FILTERBASE_H #define FILTERBASE_H #include "Common.h" diff --git a/source/gameengine/VideoTexture/FilterBlueScreen.h b/source/gameengine/VideoTexture/FilterBlueScreen.h index 381941fdcca..c083b672717 100644 --- a/source/gameengine/VideoTexture/FilterBlueScreen.h +++ b/source/gameengine/VideoTexture/FilterBlueScreen.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined FILTERBLUESCREEN_H +#ifndef FILTERBLUESCREEN_H #define FILTERBLUESCREEN_H #include "Common.h" diff --git a/source/gameengine/VideoTexture/FilterColor.h b/source/gameengine/VideoTexture/FilterColor.h index aeca4d326b4..316135d6174 100644 --- a/source/gameengine/VideoTexture/FilterColor.h +++ b/source/gameengine/VideoTexture/FilterColor.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined FILTERCOLOR_H +#ifndef FILTERCOLOR_H #define FILTERCOLOR_H #include "Common.h" diff --git a/source/gameengine/VideoTexture/FilterNormal.h b/source/gameengine/VideoTexture/FilterNormal.h index 0b4574d4d1f..f0ba851ed94 100644 --- a/source/gameengine/VideoTexture/FilterNormal.h +++ b/source/gameengine/VideoTexture/FilterNormal.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined FILTERNORMAL_H +#ifndef FILTERNORMAL_H #define FILTERNORMAL_H #include "Common.h" diff --git a/source/gameengine/VideoTexture/FilterSource.h b/source/gameengine/VideoTexture/FilterSource.h index 5b73fcda947..95407f12367 100644 --- a/source/gameengine/VideoTexture/FilterSource.h +++ b/source/gameengine/VideoTexture/FilterSource.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined FILTERSOURCE_H +#ifndef FILTERSOURCE_H #define FILTERSOURCE_H #include "Common.h" diff --git a/source/gameengine/VideoTexture/ImageBase.h b/source/gameengine/VideoTexture/ImageBase.h index cb2187f00ef..d027a549eee 100644 --- a/source/gameengine/VideoTexture/ImageBase.h +++ b/source/gameengine/VideoTexture/ImageBase.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined IMAGEBASE_H +#ifndef IMAGEBASE_H #define IMAGEBASE_H #include "Common.h" diff --git a/source/gameengine/VideoTexture/ImageBuff.h b/source/gameengine/VideoTexture/ImageBuff.h index 1fd2d3f9ee6..06422908bd1 100644 --- a/source/gameengine/VideoTexture/ImageBuff.h +++ b/source/gameengine/VideoTexture/ImageBuff.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined IMAGEBUFF_H +#ifndef IMAGEBUFF_H #define IMAGEBUFF_H diff --git a/source/gameengine/VideoTexture/ImageMix.h b/source/gameengine/VideoTexture/ImageMix.h index d99f27576c1..049447927f4 100644 --- a/source/gameengine/VideoTexture/ImageMix.h +++ b/source/gameengine/VideoTexture/ImageMix.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined IMAGEMIX_H +#ifndef IMAGEMIX_H #define IMAGEMIX_H diff --git a/source/gameengine/VideoTexture/ImageRender.h b/source/gameengine/VideoTexture/ImageRender.h index 61f441465c3..08b70d8ce1a 100644 --- a/source/gameengine/VideoTexture/ImageRender.h +++ b/source/gameengine/VideoTexture/ImageRender.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined IMAGERENDER_H +#ifndef IMAGERENDER_H #define IMAGERENDER_H diff --git a/source/gameengine/VideoTexture/ImageViewport.h b/source/gameengine/VideoTexture/ImageViewport.h index 4195847c9d0..c39c255b417 100644 --- a/source/gameengine/VideoTexture/ImageViewport.h +++ b/source/gameengine/VideoTexture/ImageViewport.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined IMAGEVIEWPORT_H +#ifndef IMAGEVIEWPORT_H #define IMAGEVIEWPORT_H diff --git a/source/gameengine/VideoTexture/PyTypeList.h b/source/gameengine/VideoTexture/PyTypeList.h index 3f1523294aa..29c71ca3f4e 100644 --- a/source/gameengine/VideoTexture/PyTypeList.h +++ b/source/gameengine/VideoTexture/PyTypeList.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined PYTYPELIST_H +#ifndef PYTYPELIST_H #define PYTYPELIST_H #include "Common.h" diff --git a/source/gameengine/VideoTexture/Texture.h b/source/gameengine/VideoTexture/Texture.h index 32801a2c38e..cab1f38c798 100644 --- a/source/gameengine/VideoTexture/Texture.h +++ b/source/gameengine/VideoTexture/Texture.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined TEXTURE_H +#ifndef TEXTURE_H #define TEXTURE_H #include diff --git a/source/gameengine/VideoTexture/VideoBase.h b/source/gameengine/VideoTexture/VideoBase.h index a1eae96be57..6599ef62c8e 100644 --- a/source/gameengine/VideoTexture/VideoBase.h +++ b/source/gameengine/VideoTexture/VideoBase.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined VIDEOBASE_H +#ifndef VIDEOBASE_H #define VIDEOBASE_H diff --git a/source/gameengine/VideoTexture/VideoFFmpeg.h b/source/gameengine/VideoTexture/VideoFFmpeg.h index 2be86b6c535..9a24c0e5a5d 100644 --- a/source/gameengine/VideoTexture/VideoFFmpeg.h +++ b/source/gameengine/VideoTexture/VideoFFmpeg.h @@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt. * \ingroup bgevideotex */ -#if !defined VIDEOFFMPEG_H +#ifndef VIDEOFFMPEG_H #define VIDEOFFMPEG_H #ifdef WITH_FFMPEG -- cgit v1.2.3