[Bf-blender-cvs] [faabf92a7e8] master: Cleanup: comments (long lines) in blenloader
Campbell Barton
noreply at git.blender.org
Sun Apr 21 22:35:12 CEST 2019
Commit: faabf92a7e891b355faf8ba6e2e2461e94262aab
Author: Campbell Barton
Date: Mon Apr 22 01:10:29 2019 +1000
Branches: master
https://developer.blender.org/rBfaabf92a7e891b355faf8ba6e2e2461e94262aab
Cleanup: comments (long lines) in blenloader
===================================================================
M source/blender/blenloader/BLO_blend_validate.h
M source/blender/blenloader/intern/blend_validate.c
M source/blender/blenloader/intern/readblenentry.c
M source/blender/blenloader/intern/readfile.c
M source/blender/blenloader/intern/undofile.c
M source/blender/blenloader/intern/versioning_250.c
M source/blender/blenloader/intern/versioning_260.c
M source/blender/blenloader/intern/versioning_270.c
M source/blender/blenloader/intern/versioning_280.c
M source/blender/blenloader/intern/versioning_defaults.c
M source/blender/blenloader/intern/versioning_legacy.c
M source/blender/blenloader/intern/writefile.c
===================================================================
diff --git a/source/blender/blenloader/BLO_blend_validate.h b/source/blender/blenloader/BLO_blend_validate.h
index c0c2ceabb7f..1ffaddef02f 100644
--- a/source/blender/blenloader/BLO_blend_validate.h
+++ b/source/blender/blenloader/BLO_blend_validate.h
@@ -22,7 +22,8 @@
/** \file
* \ingroup blenloader
- * \brief Utils ensuring .blend file (i.e. Main) is in valid state during write and/or read process.
+ * \brief Utils ensuring .blend file (i.e. Main)
+ * is in valid state during write and/or read process.
*/
struct Main;
diff --git a/source/blender/blenloader/intern/blend_validate.c b/source/blender/blenloader/intern/blend_validate.c
index a71fe9f1adb..323ecedb971 100644
--- a/source/blender/blenloader/intern/blend_validate.c
+++ b/source/blender/blenloader/intern/blend_validate.c
@@ -17,7 +17,8 @@
/** \file
* \ingroup blenloader
*
- * Utils to check/validate a Main is in sane state, only checks relations between datablocks and libraries for now.
+ * Utils to check/validate a Main is in sane state,
+ * only checks relations between datablocks and libraries for now.
*
* \note Does not *fix* anything, only reports found errors.
*/
@@ -45,7 +46,10 @@
#include "readfile.h"
-/** Check (but do *not* fix) that all linked data-blocks are still valid (i.e. pointing to the right library). */
+/**
+ * Check (but do *not* fix) that all linked data-blocks are still valid
+ * (i.e. pointing to the right library).
+ */
bool BLO_main_validate_libraries(Main *bmain, ReportList *reports)
{
ListBase mainlist;
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c
index 6441c6d7a39..8067a322490 100644
--- a/source/blender/blenloader/intern/readblenentry.c
+++ b/source/blender/blenloader/intern/readblenentry.c
@@ -128,7 +128,8 @@ void BLO_blendhandle_print_sizes(BlendHandle *bh, void *fp)
}
/**
- * Gets the names of all the datablocks in a file of a certain type (e.g. all the scene names in a file).
+ * Gets the names of all the datablocks in a file of a certain type
+ * (e.g. all the scene names in a file).
*
* \param bh: The blendhandle to access.
* \param ofblocktype: The type of names to get.
@@ -158,7 +159,8 @@ LinkNode *BLO_blendhandle_get_datablock_names(BlendHandle *bh, int ofblocktype,
}
/**
- * Gets the previews of all the datablocks in a file of a certain type (e.g. all the scene previews in a file).
+ * Gets the previews of all the datablocks in a file of a certain type
+ * (e.g. all the scene previews in a file).
*
* \param bh: The blendhandle to access.
* \param ofblocktype: The type of names to get.
@@ -247,7 +249,8 @@ LinkNode *BLO_blendhandle_get_previews(BlendHandle *bh, int ofblocktype, int *to
}
/**
- * Gets the names of all the linkable datablock types available in a file. (e.g. "Scene", "Mesh", "Light", etc.).
+ * Gets the names of all the linkable datablock types available in a file.
+ * (e.g. "Scene", "Mesh", "Light", etc.).
*
* \param bh: The blendhandle to access.
* \return A BLI_linklist of strings. The string links should be freed with malloc.
@@ -348,9 +351,11 @@ BlendFileData *BLO_read_from_memory(const void *mem,
}
/**
- * Used for undo/redo, skips part of libraries reading (assuming their data are already loaded & valid).
+ * Used for undo/redo, skips part of libraries reading
+ * (assuming their data are already loaded & valid).
*
- * \param oldmain: old main, from which we will keep libraries and other datablocks that should not have changed.
+ * \param oldmain: old main,
+ * from which we will keep libraries and other datablocks that should not have changed.
* \param filename: current file, only for retrieving library data.
*/
BlendFileData *BLO_read_from_memfile(Main *oldmain,
@@ -410,17 +415,18 @@ BlendFileData *BLO_read_from_memfile(Main *oldmain,
BLI_assert(old_mainlist.first == oldmain);
if (bfd && old_mainlist.first != old_mainlist.last) {
- /* Even though directly used libs have been already moved to new main, indirect ones have not.
- * This is a bit annoying, but we have no choice but to keep them all for now - means some now unused
- * data may remain in memory, but think we'll have to live with it. */
+ /* Even though directly used libs have been already moved to new main,
+ * indirect ones have not.
+ * This is a bit annoying, but we have no choice but to keep them all for now -
+ * means some now unused data may remain in memory, but think we'll have to live with it. */
Main *libmain, *libmain_next;
Main *newmain = bfd->main;
ListBase new_mainlist = {newmain, newmain};
for (libmain = oldmain->next; libmain; libmain = libmain_next) {
libmain_next = libmain->next;
- /* Note that LIB_INDIRECT does not work with libraries themselves, so we use non-NULL parent
- * to detect indirect-linked ones... */
+ /* Note that LIB_INDIRECT does not work with libraries themselves, so we use non-NULL
+ * parent to detect indirect-linked ones. */
if (libmain->curlib && (libmain->curlib->parent != NULL)) {
BLI_remlink(&old_mainlist, libmain);
BLI_addtail(&new_mainlist, libmain);
@@ -438,7 +444,9 @@ BlendFileData *BLO_read_from_memfile(Main *oldmain,
blo_join_main(&new_mainlist);
}
- /* printf("Remaining mains/libs in oldmain: %d\n", BLI_listbase_count(&fd->old_mainlist) - 1); */
+#if 0
+ printf("Remaining mains/libs in oldmain: %d\n", BLI_listbase_count(&fd->old_mainlist) - 1);
+#endif
/* That way, libs (aka mains) we did not reuse in new undone/redone state
* will be cleared together with oldmain... */
@@ -451,7 +459,8 @@ BlendFileData *BLO_read_from_memfile(Main *oldmain,
}
/**
- * Frees a BlendFileData structure and *all* the data associated with it (the userdef data, and the main libblock data).
+ * Frees a BlendFileData structure and *all* the data associated with it
+ * (the userdef data, and the main libblock data).
*
* \param bfd: The structure to free.
*/
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 2708ad4fa3e..706f28eb312 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -571,7 +571,8 @@ void blo_split_main(ListBase *mainlist, Main *main)
while (i--) {
ID *id = lbarray[i]->first;
if (id == NULL || GS(id->name) == ID_LI) {
- continue; /* no ID_LI datablock should ever be linked anyway, but just in case, better be explicit. */
+ /* No ID_LI datablock should ever be linked anyway, but just in case, better be explicit. */
+ continue;
}
split_libdata(lbarray[i], lib_main_array, lib_main_array_len);
}
@@ -1379,8 +1380,8 @@ FileData *blo_filedata_from_file(const char *filepath, ReportList *reports)
}
/**
- * Same as blo_filedata_from_file(), but does not reads DNA data, only header. Use it for light access
- * (e.g. thumbnail reading).
+ * Same as blo_filedata_from_file(), but does not reads DNA data, only header.
+ * Use it for light access (e.g. thumbnail reading).
*/
static FileData *blo_filedata_from_file_minimal(const char *filepath)
{
@@ -1582,7 +1583,8 @@ bool BLO_has_bfile_extension(const char *str)
*/
bool BLO_library_path_explode(const char *path, char *r_dir, char **r_group, char **r_name)
{
- /* We might get some data names with slashes, so we have to go up in path until we find blend file itself,
+ /* We might get some data names with slashes,
+ * so we have to go up in path until we find blend file itself,
* then we now next path item is group, and everything else is data name. */
char *slash = NULL, *prev_slash = NULL, c = '\0';
@@ -1644,7 +1646,8 @@ bool BLO_library_path_explode(const char *path, char *r_dir, char **r_group, cha
*
* \param filepath: The path of the file to extract thumbnail from.
* \return The raw thumbnail
- * (MEM-allocated, as stored in file, use #BKE_main_thumbnail_to_imbuf() to convert it to ImBuf image).
+ * (MEM-allocated, as stored in file, use #BKE_main_thumbnail_to_imbuf()
+ * to convert it to ImBuf image).
*/
BlendThumbnail *BLO_thumbnail_from_file(const char *filepath)
{
@@ -2034,7 +2037,8 @@ void blo_end_sound_pointer_map(FileData *fd, Main *oldmain)
}
}
-/* XXX disabled this feature - packed files also belong in temp saves and quit.blend, to make restore work */
+/* XXX disabled this feature - packed files also belong in temp saves and quit.blend,
+ * to make restore work. */
static void insert_packedmap(FileData *fd, PackedFile *pf)
{
@@ -2584,7 +2588,8 @@ static void direct_link_id(FileData *fd, ID *id)
}
id->py_instance = NULL;
- /* That way datablock reading not going through main read_libblock() function are still in a clear tag state.
+ /* That way datablock reading not going through main read_libblock()
+ * function are still in a clear tag state.
* (glowering at certain nodetree fake datablock here...). */
id->tag = 0;
@@ -2955,7 +2960,8 @@ static void direct_link_fcurves(FileData *fd, ListBase *list)
ChannelDriver *driver = fcu->driver;
DriverVar *dvar;
- /* compiled expression data will need to be regenerated (old pointer may still be set here) */
+ /* Compiled expression data will need to be regenerated
+ * (old pointer may still be set here). */
driver->expr_comp = NULL;
driver->expr_simple = NULL;
@@ -5900,7 +5906,8 @@ static void direct_link_object(FileData *fd, Object *ob)
{
PartEff *paf;
- /* XXX This should not be needed - but seems like it can happen in some cases, so for now play safe... */
+ /* XXX This should not be needed - but seems like it can happen in some cases,
+ * so for now play safe. */
ob->proxy_from = NULL;
/* loading saved files with editmode enabled works, but for undo we like
@@ -6847,7 +6854,8 @@ static void direct_link_scene(FileData *fd, Scene *sce)
}
SEQ_END;
- /* link metastack, slight abuse of structs here, have to restore pointer to internal part in struct */
+ /* link metastack, slight abuse of structs here,
+ * h
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list