From 2abfcebb0eb7989e3d1e7d03f37ecf5c088210af Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 10 Oct 2020 18:19:55 +1100 Subject: Cleanup: use C comments for descriptive text Follow our code style guide by using C-comments for text descriptions. --- source/blender/blenloader/intern/readfile.c | 83 +++++++++++++++-------------- 1 file changed, 42 insertions(+), 41 deletions(-) (limited to 'source/blender/blenloader/intern/readfile.c') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 9465819a2d8..ccf4e08b5b7 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -33,11 +33,11 @@ #include "BLI_utildefines.h" #ifndef WIN32 -# include // for read close +# include /* for read close */ #else # include "BLI_winstuff.h" # include "winsock2.h" -# include // for open close read +# include /* for open close read */ #endif /* allow readfile to use deprecated functionality */ @@ -126,7 +126,7 @@ #include "BKE_fcurve.h" #include "BKE_fcurve_driver.h" #include "BKE_fluid.h" -#include "BKE_global.h" // for G +#include "BKE_global.h" /* for G */ #include "BKE_gpencil.h" #include "BKE_gpencil_modifier.h" #include "BKE_hair.h" @@ -138,15 +138,15 @@ #include "BKE_lib_id.h" #include "BKE_lib_override.h" #include "BKE_lib_query.h" -#include "BKE_main.h" // for Main +#include "BKE_main.h" /* for Main */ #include "BKE_main_idmap.h" #include "BKE_material.h" -#include "BKE_mesh.h" // for ME_ defines (patching) +#include "BKE_mesh.h" /* for ME_ defines (patching) */ #include "BKE_mesh_runtime.h" #include "BKE_modifier.h" #include "BKE_multires.h" #include "BKE_nla.h" -#include "BKE_node.h" // for tree type defines +#include "BKE_node.h" /* for tree type defines */ #include "BKE_object.h" #include "BKE_packedFile.h" #include "BKE_paint.h" @@ -1490,7 +1490,7 @@ static ssize_t fd_read_gzip_from_memory(FileData *filedata, filedata->strm.next_out = (Bytef *)buffer; filedata->strm.avail_out = (uint)size; - // Inflate another chunk. + /* Inflate another chunk. */ err = inflate(&filedata->strm, Z_SYNC_FLUSH); if (err == Z_STREAM_END) { @@ -2490,7 +2490,7 @@ static void direct_link_id_common( /** \name Read Animation (legacy for version patching) * \{ */ -// XXX deprecated - old animation system +/* XXX deprecated - old animation system */ static void lib_link_ipo(BlendLibReader *reader, Ipo *ipo) { LISTBASE_FOREACH (IpoCurve *, icu, &ipo->curve) { @@ -2500,7 +2500,7 @@ static void lib_link_ipo(BlendLibReader *reader, Ipo *ipo) } } -// XXX deprecated - old animation system +/* XXX deprecated - old animation system */ static void direct_link_ipo(BlendDataReader *reader, Ipo *ipo) { BLO_read_list(reader, &(ipo->curve)); @@ -2538,7 +2538,7 @@ static void direct_link_ipo(BlendDataReader *reader, Ipo *ipo) } } -// XXX deprecated - old animation system +/* XXX deprecated - old animation system */ static void lib_link_nlastrips(BlendLibReader *reader, ID *id, ListBase *striplist) { LISTBASE_FOREACH (bActionStrip *, strip, striplist) { @@ -2551,7 +2551,7 @@ static void lib_link_nlastrips(BlendLibReader *reader, ID *id, ListBase *stripli } } -// XXX deprecated - old animation system +/* XXX deprecated - old animation system */ static void direct_link_nlastrips(BlendDataReader *reader, ListBase *strips) { BLO_read_list(reader, strips); @@ -2561,7 +2561,7 @@ static void direct_link_nlastrips(BlendDataReader *reader, ListBase *strips) } } -// XXX deprecated - old animation system +/* XXX deprecated - old animation system */ static void lib_link_constraint_channels(BlendLibReader *reader, ID *id, ListBase *chanbase) { LISTBASE_FOREACH (bConstraintChannel *, chan, chanbase) { @@ -2680,7 +2680,7 @@ static void lib_link_constraints(BlendLibReader *reader, ID *id, ListBase *conli con->type = CONSTRAINT_TYPE_NULL; } /* own ipo, all constraints have it */ - BLO_read_id_address(reader, id->lib, &con->ipo); // XXX deprecated - old animation system + BLO_read_id_address(reader, id->lib, &con->ipo); /* XXX deprecated - old animation system */ /* If linking from a library, clear 'local' library override flag. */ if (id->lib != NULL) { @@ -2829,14 +2829,14 @@ void blo_do_versions_key_uidgen(Key *key) /* update this also to writefile.c */ static const char *ptcache_data_struct[] = { - "", // BPHYS_DATA_INDEX - "", // BPHYS_DATA_LOCATION - "", // BPHYS_DATA_VELOCITY - "", // BPHYS_DATA_ROTATION - "", // BPHYS_DATA_AVELOCITY / BPHYS_DATA_XCONST */ - "", // BPHYS_DATA_SIZE: - "", // BPHYS_DATA_TIMES: - "BoidData", // case BPHYS_DATA_BOIDS: + "", /* BPHYS_DATA_INDEX */ + "", /* BPHYS_DATA_LOCATION */ + "", /* BPHYS_DATA_VELOCITY */ + "", /* BPHYS_DATA_ROTATION */ + "", /* BPHYS_DATA_AVELOCITY / BPHYS_DATA_XCONST */ + "", /* BPHYS_DATA_SIZE: */ + "", /* BPHYS_DATA_TIMES: */ + "BoidData", /* case BPHYS_DATA_BOIDS: */ }; static void direct_link_pointcache_cb(BlendDataReader *reader, void *data) @@ -2923,7 +2923,8 @@ static void lib_link_partdeflect(BlendLibReader *reader, ID *id, PartDeflect *pd static void lib_link_particlesettings(BlendLibReader *reader, ParticleSettings *part) { - BLO_read_id_address(reader, part->id.lib, &part->ipo); // XXX deprecated - old animation system + BLO_read_id_address( + reader, part->id.lib, &part->ipo); /* XXX deprecated - old animation system */ BLO_read_id_address(reader, part->id.lib, &part->instance_object); BLO_read_id_address(reader, part->id.lib, &part->instance_collection); @@ -3222,10 +3223,10 @@ static void lib_link_object(BlendLibReader *reader, Object *ob) { bool warn = false; - // XXX deprecated - old animation system <<< + /* XXX deprecated - old animation system <<< */ BLO_read_id_address(reader, ob->id.lib, &ob->ipo); BLO_read_id_address(reader, ob->id.lib, &ob->action); - // >>> XXX deprecated - old animation system + /* >>> XXX deprecated - old animation system */ BLO_read_id_address(reader, ob->id.lib, &ob->parent); BLO_read_id_address(reader, ob->id.lib, &ob->track); @@ -3322,10 +3323,10 @@ static void lib_link_object(BlendLibReader *reader, Object *ob) lib_link_pose(reader, ob, ob->pose); lib_link_constraints(reader, &ob->id, &ob->constraints); - // XXX deprecated - old animation system <<< + /* XXX deprecated - old animation system <<< */ lib_link_constraint_channels(reader, &ob->id, &ob->constraintChannels); lib_link_nlastrips(reader, &ob->id, &ob->nlastrips); - // >>> XXX deprecated - old animation system + /* >>> XXX deprecated - old animation system */ LISTBASE_FOREACH (PartEff *, paf, &ob->effect) { if (paf->type == EFF_PARTICLE) { @@ -3339,7 +3340,7 @@ static void lib_link_object(BlendLibReader *reader, Object *ob) if (fluidmd && fluidmd->fss) { BLO_read_id_address( - reader, ob->id.lib, &fluidmd->fss->ipo); // XXX deprecated - old animation system + reader, ob->id.lib, &fluidmd->fss->ipo); /* XXX deprecated - old animation system */ } } @@ -3881,10 +3882,10 @@ static void direct_link_object(BlendDataReader *reader, Object *ob) BLO_read_list(reader, &ob->defbase); BLO_read_list(reader, &ob->fmaps); - // XXX deprecated - old animation system <<< + /* XXX deprecated - old animation system <<< */ direct_link_nlastrips(reader, &ob->nlastrips); BLO_read_list(reader, &ob->constraintChannels); - // >>> XXX deprecated - old animation system + /* >>> XXX deprecated - old animation system */ BLO_read_pointer_array(reader, (void **)&ob->mat); BLO_read_data_address(reader, &ob->matbits); @@ -3951,7 +3952,7 @@ static void direct_link_object(BlendDataReader *reader, Object *ob) if (ob->soft) { SoftBody *sb = ob->soft; - sb->bpoint = NULL; // init pointers so it gets rebuilt nicely + sb->bpoint = NULL; /* init pointers so it gets rebuilt nicely */ sb->bspring = NULL; sb->scratch = NULL; /* although not used anymore */ @@ -4448,7 +4449,7 @@ static void lib_link_scene(BlendLibReader *reader, Scene *sce) if (seq->ipo) { BLO_read_id_address( - reader, sce->id.lib, &seq->ipo); // XXX deprecated - old animation system + reader, sce->id.lib, &seq->ipo); /* XXX deprecated - old animation system */ } seq->scene_sound = NULL; if (seq->scene) { @@ -5139,7 +5140,7 @@ static void direct_link_area(BlendDataReader *reader, ScrArea *area) } } /* we only saved what was used */ - space_outliner->storeflag |= SO_TREESTORE_CLEANUP; // at first draw + space_outliner->storeflag |= SO_TREESTORE_CLEANUP; /* at first draw */ } space_outliner->treehash = NULL; space_outliner->tree.first = space_outliner->tree.last = NULL; @@ -6895,7 +6896,7 @@ static void link_global(FileData *fd, BlendFileData *bfd) bfd->cur_view_layer = blo_read_get_new_globaldata_address(fd, bfd->cur_view_layer); bfd->curscreen = newlibadr(fd, NULL, bfd->curscreen); bfd->curscene = newlibadr(fd, NULL, bfd->curscene); - // this happens in files older than 2.35 + /* this happens in files older than 2.35 */ if (bfd->curscene == NULL) { if (bfd->curscreen) { bfd->curscene = bfd->curscreen->scene; @@ -7197,7 +7198,7 @@ static BHead *read_userdef(BlendFileData *bfd, FileData *fd, BHead *bhead) IDP_BlendDataRead(reader, &addon->prop); } - // XXX + /* XXX */ user->uifonts.first = user->uifonts.last = NULL; BLO_read_list(reader, &user->uistyles); @@ -7575,7 +7576,7 @@ static void expand_doit_library(void *fdhandle, Main *mainvar, void *old) /* ID has not been read yet, add placeholder to the main of the * library it belongs to, so that it will be read later. */ read_libblock(fd, libmain, bhead, LIB_TAG_INDIRECT, false, NULL); - // commented because this can print way too much + /* commented because this can print way too much */ // if (G.debug & G_DEBUG) printf("expand_doit: other lib %s\n", lib->filepath); /* for outliner dependency only */ @@ -7642,7 +7643,7 @@ static void expand_doit_library(void *fdhandle, Main *mainvar, void *old) * and another append happens which invokes same ID... * in that case the lookup table needs this entry */ oldnewmap_insert(fd->libmap, bhead->old, id, bhead->code); - // commented because this can print way too much + /* commented because this can print way too much */ // if (G.debug & G_DEBUG) printf("expand: already read %s\n", id->name); } } @@ -7660,7 +7661,7 @@ static void expand_ipo(BlendExpander *expander, Ipo *ipo) } } -// XXX deprecated - old animation system +/* XXX deprecated - old animation system */ static void expand_constraint_channels(BlendExpander *expander, ListBase *chanbase) { LISTBASE_FOREACH (bConstraintChannel *, chan, chanbase) { @@ -7788,7 +7789,7 @@ static void expand_constraints(BlendExpander *expander, ListBase *lb) /* deprecated manual expansion stuff */ LISTBASE_FOREACH (bConstraint *, curcon, lb) { if (curcon->ipo) { - BLO_expand(expander, curcon->ipo); // XXX deprecated - old animation system + BLO_expand(expander, curcon->ipo); /* XXX deprecated - old animation system */ } } } @@ -7840,7 +7841,7 @@ static void expand_object(BlendExpander *expander, Object *ob) BLO_expand(expander, ob->gpd); - // XXX deprecated - old animation system (for version patching only) + /* XXX deprecated - old animation system (for version patching only) */ BLO_expand(expander, ob->ipo); BLO_expand(expander, ob->action); @@ -7851,7 +7852,7 @@ static void expand_object(BlendExpander *expander, Object *ob) BLO_expand(expander, strip->act); BLO_expand(expander, strip->ipo); } - // XXX deprecated - old animation system (for version patching only) + /* XXX deprecated - old animation system (for version patching only) */ for (int a = 0; a < ob->totcol; a++) { BLO_expand(expander, ob->mat[a]); @@ -8075,7 +8076,7 @@ void BLO_expand_main(void *fdhandle, Main *mainvar) expand_collection(&expander, (Collection *)id); break; case ID_IP: - expand_ipo(&expander, (Ipo *)id); // XXX deprecated - old animation system + expand_ipo(&expander, (Ipo *)id); /* XXX deprecated - old animation system */ break; case ID_PA: expand_particlesettings(&expander, (ParticleSettings *)id); -- cgit v1.2.3