From d8144ef0f57bfba6973b7de34fe8238ab88707cc Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 4 Oct 2012 13:26:15 +0000 Subject: style cleanup: comment blocks --- source/blender/blenkernel/intern/colortools.c | 6 +- source/blender/blenkernel/intern/ipo.c | 4 +- source/blender/blenkernel/intern/object.c | 2 +- source/blender/blenkernel/intern/seqeffects.c | 6 +- source/blender/blenkernel/intern/sequencer.c | 8 +-- source/blender/blenloader/intern/readfile.c | 2 +- source/blender/blenloader/intern/writefile.c | 80 +++++++++++----------- source/blender/collada/DocumentImporter.cpp | 6 +- source/blender/collada/DocumentImporter.h | 5 +- source/blender/collada/GeometryExporter.cpp | 4 +- .../operations/COM_TrackPositionOperation.h | 8 +-- source/blender/editors/mesh/editmesh_knife.c | 4 +- source/blender/editors/mesh/editmesh_tools.c | 4 +- source/blender/editors/space_view3d/view3d_edit.c | 4 +- source/blender/imbuf/intern/indexer.c | 6 +- source/blender/makesrna/intern/rna_nodetree.c | 4 +- source/blender/makesrna/intern/rna_sequencer.c | 4 +- .../blender/nodes/composite/node_composite_tree.c | 6 +- source/blender/render/intern/source/occlusion.c | 10 +-- 19 files changed, 87 insertions(+), 86 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index b66bd1fd32b..1bd5786debd 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -1289,9 +1289,9 @@ void BKE_color_managed_display_settings_copy(ColorManagedDisplaySettings *new_se void BKE_color_managed_view_settings_init(ColorManagedViewSettings *settings) { /* OCIO_TODO: use default view transform here when OCIO is completely integrated - * and proper versioning stuff is added. - * for now use NONE to be compatible with all current files - */ + * and proper versioning stuff is added. + * for now use NONE to be compatible with all current files + */ BLI_strncpy(settings->view_transform, "Default", sizeof(settings->view_transform)); settings->gamma = 1.0f; diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 953ee673f6b..5216aefab58 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -1757,13 +1757,13 @@ void do_versions_ipos_to_animato(Main *main) { /* If we have any empty action actuators, assume they were - converted IPO Actuators using the object IPO */ + * converted IPO Actuators using the object IPO */ bActuator *act; bActionActuator *aa; for (act = ob->actuators.first; act; act = act->next) { /* Any actuators set to ACT_IPO at this point are actually Action Actuators that - need this converted IPO to finish converting the actuator. */ + * need this converted IPO to finish converting the actuator. */ if (act->type == ACT_IPO) { aa = (bActionActuator *)act->data; aa->act = ob->adt->action; diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index ab261e79dfc..72a43da94b6 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -2261,7 +2261,7 @@ void BKE_object_minmax(Object *ob, float min_r[3], float max_r[3], const short u Curve *cu = ob->data; /* Use the object bounding box so that modifier output - gets taken into account */ + * gets taken into account */ if (ob->bb) bb = *(ob->bb); else { diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c index eaf3ec384c8..33519483843 100644 --- a/source/blender/blenkernel/intern/seqeffects.c +++ b/source/blender/blenkernel/intern/seqeffects.c @@ -609,9 +609,9 @@ static void makeGammaTables(float gamma) /* The end of the table should match 1.0 carefully. In order to avoid * rounding errors, we just set this explicitly. The last segment may - * have a different length than the other segments, but our - * interpolation is insensitive to that - */ + * have a different length than the other segments, but our + * interpolation is insensitive to that + */ color_domain_table[RE_GAMMA_TABLE_SIZE] = 1.0; gamma_range_table[RE_GAMMA_TABLE_SIZE] = 1.0; inv_gamma_range_table[RE_GAMMA_TABLE_SIZE] = 1.0; diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index bb845400cef..37f32a12111 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -3959,10 +3959,10 @@ Sequence *BKE_sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoad sound = sound_new_file(bmain, seq_load->path); /* handles relative paths */ if (sound == NULL || sound->playback_handle == NULL) { - /* +#if 0 if (op) BKE_report(op->reports, RPT_ERROR, "Unsupported audio format"); - */ +#endif return NULL; } @@ -3971,10 +3971,10 @@ Sequence *BKE_sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoad if (info.specs.channels == AUD_CHANNELS_INVALID) { sound_delete(bmain, sound); - /* +#if 0 if (op) BKE_report(op->reports, RPT_ERROR, "Unsupported audio format"); - */ +#endif return NULL; } diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 9fe1d6ca00f..9aa7da3ca6e 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -206,7 +206,7 @@ * - join all Mains * - link all LibBlocks and indirect pointers to libblocks * - initialize FileGlobal and copy pointers to Global -*/ + */ /* also occurs in library.c */ /* GS reads the memory pointed at in a specific ordering. There are, diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index b8d63b3c5d5..536376ac577 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -30,46 +30,46 @@ /* -FILEFORMAT: IFF-style structure (but not IFF compatible!) - -start file: - BLENDER_V100 12 bytes (versie 1.00) - V = big endian, v = little endian - _ = 4 byte pointer, - = 8 byte pointer - -datablocks: also see struct BHead - 4 chars - int, len data after BHead - void, old pointer - int - int, in case of array: amount of structs - data - ... - ... - -Almost all data in Blender are structures. Each struct saved -gets a BHead header. With BHead the struct can be linked again -and compared with StructDNA . - -WRITE - -Preferred writing order: (not really a must, but why would you do it random?) -Any case: direct data is ALWAYS after the lib block - -(Local file data) -- for each LibBlock - - write LibBlock - - write associated direct data -(External file data) -- per library - - write library block - - per LibBlock - - write the ID of LibBlock -- write TEST (128x128, blend file preview, optional) -- write FileGlobal (some global vars) -- write SDNA -- write USER if filename is ~/X.XX/config/startup.blend -*/ + * FILEFORMAT: IFF-style structure (but not IFF compatible!) + * + * start file: + * BLENDER_V100 12 bytes (versie 1.00) + * V = big endian, v = little endian + * _ = 4 byte pointer, - = 8 byte pointer + * + * datablocks: also see struct BHead + * 4 chars + * int, len data after BHead + * void, old pointer + * int + * int, in case of array: amount of structs + * data + * ... + * ... + * + * Almost all data in Blender are structures. Each struct saved + * gets a BHead header. With BHead the struct can be linked again + * and compared with StructDNA . + * + * WRITE + * + * Preferred writing order: (not really a must, but why would you do it random?) + * Any case: direct data is ALWAYS after the lib block + * + * (Local file data) + * - for each LibBlock + * - write LibBlock + * - write associated direct data + * (External file data) + * - per library + * - write library block + * - per LibBlock + * - write the ID of LibBlock + * - write TEST (128x128, blend file preview, optional) + * - write FileGlobal (some global vars) + * - write SDNA + * - write USER if filename is ~/X.XX/config/startup.blend + */ #include diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index 4d4f26561e3..f37f065b03b 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -88,8 +88,8 @@ extern "C" { /* - COLLADA Importer limitations: - - no multiple scene import, all objects are added to active scene + * COLLADA Importer limitations: + * - no multiple scene import, all objects are added to active scene */ // #define COLLADA_DEBUG @@ -878,7 +878,7 @@ bool DocumentImporter::writeCamera(const COLLADAFW::Camera *camera) } break; /* XXX correct way to do following four is probably to get also render - size and determine proper settings from that somehow */ + * size and determine proper settings from that somehow */ case COLLADAFW::Camera::ASPECTRATIO_AND_X: case COLLADAFW::Camera::SINGLE_X: case COLLADAFW::Camera::X_AND_Y: diff --git a/source/blender/collada/DocumentImporter.h b/source/blender/collada/DocumentImporter.h index 13f23b23388..e878a5a5b48 100644 --- a/source/blender/collada/DocumentImporter.h +++ b/source/blender/collada/DocumentImporter.h @@ -78,8 +78,9 @@ public: void write_profile_COMMON(COLLADAFW::EffectCommon*, Material*); void translate_anim_recursive(COLLADAFW::Node*, COLLADAFW::Node*, Object*); - /** This method will be called if an error in the loading process occurred and the loader cannot - continue to load. The writer should undo all operations that have been performed. + /** + * This method will be called if an error in the loading process occurred and the loader cannot + * continue to load. The writer should undo all operations that have been performed. \param errorMessage A message containing informations about the error that occurred. */ void cancel(const COLLADAFW::String& errorMessage); diff --git a/source/blender/collada/GeometryExporter.cpp b/source/blender/collada/GeometryExporter.cpp index 27700444ba9..e2332b7cd55 100644 --- a/source/blender/collada/GeometryExporter.cpp +++ b/source/blender/collada/GeometryExporter.cpp @@ -358,8 +358,8 @@ void GeometryExporter::createVertsSource(std::string geom_id, Mesh *me) param.push_back("X"); param.push_back("Y"); param.push_back("Z"); - /*main function, it creates , */ + /* main function, it creates , */ source.prepareToAppendValues(); //appends data to int i = 0; diff --git a/source/blender/compositor/operations/COM_TrackPositionOperation.h b/source/blender/compositor/operations/COM_TrackPositionOperation.h index 3a9e6f25cd9..b934719a92b 100644 --- a/source/blender/compositor/operations/COM_TrackPositionOperation.h +++ b/source/blender/compositor/operations/COM_TrackPositionOperation.h @@ -35,8 +35,8 @@ #include "BLI_listbase.h" /** - * Class with implementation of green screen gradient rasterization - */ + * Class with implementation of green screen gradient rasterization + */ class TrackPositionOperation : public NodeOperation { protected: enum { @@ -58,8 +58,8 @@ protected: float m_relativePos[2]; /** - * Determine the output resolution. The resolution is retrieved from the Renderer - */ + * Determine the output resolution. The resolution is retrieved from the Renderer + */ void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]); public: diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 790fd0a7cf1..1ddb210398e 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -446,8 +446,8 @@ static KnifeVert *knife_split_edge(KnifeTool_OpData *kcd, KnifeEdge *kfe, float } else { /* kfe cuts across an existing face. - If v1 and v2 are in multiple faces together (e.g., if they - are in doubled polys) then this arbitrarily chooses one of them */ + * If v1 and v2 are in multiple faces together (e.g., if they + * are in doubled polys) then this arbitrarily chooses one of them */ f = knife_find_common_face(&kfe->v1->faces, &kfe->v2->faces); if (f) knife_append_list(kcd, &newkfe->v2->faces, f); diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index a76d09827f0..48ffb352247 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -2140,7 +2140,7 @@ static int edbm_select_vertex_path_exec(bContext *C, wmOperator *op) } /* if those are not found, because vertices where selected by e.g. - border or circle select, find two selected vertices */ + * border or circle select, find two selected vertices */ if (svert == NULL) { BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) { if (!BM_elem_flag_test(eve, BM_ELEM_SELECT) || BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) @@ -2150,7 +2150,7 @@ static int edbm_select_vertex_path_exec(bContext *C, wmOperator *op) else if (evert == NULL) evert = eve; else { /* more than two vertices are selected, - show warning message and cancel operator */ + * show warning message and cancel operator */ svert = evert = NULL; break; } diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 744ce6f6209..d3ff64c9f40 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -1235,8 +1235,8 @@ void VIEW3D_OT_ndof_pan(struct wmOperatorType *ot) /* -* this is basically just the pan only code + the rotate only code crammed into one function that does both -*/ + * this is basically just the pan only code + the rotate only code crammed into one function that does both + */ static int ndof_all_invoke(bContext *C, wmOperator *op, wmEvent *event) { if (event->type != NDOF_MOTION) diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c index 97316c48621..f35a4345366 100644 --- a/source/blender/imbuf/intern/indexer.c +++ b/source/blender/imbuf/intern/indexer.c @@ -955,9 +955,9 @@ static int index_rebuild_ffmpeg(FFmpegIndexBuilderContext *context, } /* process pictures still stuck in decoder engine after EOF - according to ffmpeg docs using 0-size packets. - - At least, if we haven't already stopped... */ + * according to ffmpeg docs using 0-size packets. + * + * At least, if we haven't already stopped... */ if (!*stop) { int frame_finished; diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index af3a8691e08..b03d348b49d 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -2195,14 +2195,14 @@ static void def_cmp_inpaint(StructRNA *srna) { PropertyRNA *prop; -/* +#if 0 prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "custom1"); RNA_def_property_enum_items(prop, type_items); RNA_def_property_ui_text(prop, "Type", "Type of inpaint algorithm"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); -*/ +#endif prop = RNA_def_property(srna, "distance", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "custom2"); diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index d83debd3266..432e3841ad8 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -1673,14 +1673,14 @@ static void rna_def_effect_inputs(StructRNA *srna, int count) RNA_def_property_ui_text(prop, "Input 2", "Second input for the effect strip"); } - /* +#if 0 if (count == 3) { // not used by any effects (perhaps one day plugins?) prop = RNA_def_property(srna, "input_3", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "seq3"); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_NULL); RNA_def_property_ui_text(prop, "Input 3", "Third input for the effect strip"); } - */ +#endif } static void rna_def_image(BlenderRNA *brna) diff --git a/source/blender/nodes/composite/node_composite_tree.c b/source/blender/nodes/composite/node_composite_tree.c index 68bafd94ce4..0d86ada8026 100644 --- a/source/blender/nodes/composite/node_composite_tree.c +++ b/source/blender/nodes/composite/node_composite_tree.c @@ -515,9 +515,9 @@ static int setExecutableNodes(bNodeTreeExec *exec, ThreadData *thd) static void freeExecutableNode(bNodeTreeExec *exec) { /* node outputs can be freed when: - - not a render result or image node - - when node outputs go to nodes all being set NODE_FINISHED - */ + * - not a render result or image node + * - when node outputs go to nodes all being set NODE_FINISHED + */ bNodeTree *ntree = exec->nodetree; bNodeExec *nodeexec; bNode *node; diff --git a/source/blender/render/intern/source/occlusion.c b/source/blender/render/intern/source/occlusion.c index c8aad21b322..af774c5be73 100644 --- a/source/blender/render/intern/source/occlusion.c +++ b/source/blender/render/intern/source/occlusion.c @@ -232,9 +232,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) { @@ -1056,8 +1056,8 @@ static float occ_quad_form_factor(float *p, float *n, float *q0, float *q1, floa static __m128 sse_approx_acos(__m128 x) { /* needs a better approximation than taylor expansion of acos, since that - * gives big erros for near 1.0 values, sqrt(2*x)*acos(1-x) should work - * better, see http://www.tom.womack.net/projects/sse-fast-arctrig.html */ + * gives big erros for near 1.0 values, sqrt(2*x)*acos(1-x) should work + * better, see http://www.tom.womack.net/projects/sse-fast-arctrig.html */ return _mm_set_ps1(1.0f); } -- cgit v1.2.3