From a37a6fb445feff993dc8691166d974bec92f75cc Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Dec 2021 18:23:57 +1100 Subject: Cleanup: remove incorrect/unhelpful comments --- source/blender/blenkernel/BKE_key.h | 2 +- source/blender/blenkernel/intern/modifier.c | 28 +++++------------------- source/blender/blenkernel/intern/object_deform.c | 1 - 3 files changed, 7 insertions(+), 24 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/BKE_key.h b/source/blender/blenkernel/BKE_key.h index 305cb62179d..de069d6236f 100644 --- a/source/blender/blenkernel/BKE_key.h +++ b/source/blender/blenkernel/BKE_key.h @@ -108,7 +108,7 @@ struct KeyBlock *BKE_keyblock_from_key(struct Key *key, int index); */ struct KeyBlock *BKE_keyblock_find_name(struct Key *key, const char name[]); /** - * \brief copy shape-key attributes, but not key data.or name/UID + * \brief copy shape-key attributes, but not key data or name/UID. */ void BKE_keyblock_copy_settings(struct KeyBlock *kb_dst, const struct KeyBlock *kb_src); /** diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 0d6beed1ec9..5ad8f143b2b 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -927,43 +927,27 @@ void BKE_modifiers_test_object(Object *ob) } } -/* where should this go?, it doesn't fit well anywhere :S - campbell */ - -/* elubie: changed this to default to the same dir as the render output - * to prevent saving to C:\ on Windows */ - -/* campbell: logic behind this... - * - * - if the ID is from a library, return library path - * - else if the file has been saved return the blend file path. - * - else if the file isn't saved and the ID isn't from a library, return the temp dir. - */ const char *BKE_modifier_path_relbase(Main *bmain, Object *ob) { + /* - If the ID is from a library, return library path. + * - Else if the file has been saved return the blend file path. + * - Else if the file isn't saved and the ID isn't from a library, return the temp dir. + */ if (G.relbase_valid || ID_IS_LINKED(ob)) { return ID_BLEND_PATH(bmain, &ob->id); } - /* last resort, better than using "" which resolves to the current - * working directory */ + /* Last resort, better than using "" which resolves to the current working directory. */ return BKE_tempdir_session(); } const char *BKE_modifier_path_relbase_from_global(Object *ob) { - if (G.relbase_valid || ID_IS_LINKED(ob)) { - return ID_BLEND_PATH_FROM_GLOBAL(&ob->id); - } - - /* last resort, better than using "" which resolves to the current - * working directory */ - return BKE_tempdir_session(); + return BKE_modifier_path_relbase(G_MAIN, ob); } void BKE_modifier_path_init(char *path, int path_maxlen, const char *name) { - /* elubie: changed this to default to the same dir as the render output - * to prevent saving to C:\ on Windows */ BLI_join_dirfile(path, path_maxlen, G.relbase_valid ? "//" : BKE_tempdir_session(), name); } diff --git a/source/blender/blenkernel/intern/object_deform.c b/source/blender/blenkernel/intern/object_deform.c index 362258c6a8a..0ec2854544e 100644 --- a/source/blender/blenkernel/intern/object_deform.c +++ b/source/blender/blenkernel/intern/object_deform.c @@ -124,7 +124,6 @@ bDeformGroup *BKE_object_defgroup_add(Object *ob) return BKE_object_defgroup_add_name(ob, DATA_("Group")); } -/* Can't include BKE_object_deform.h right now, due to an enum forward declaration. */ MDeformVert *BKE_object_defgroup_data_create(ID *id) { if (GS(id->name) == ID_ME) { -- cgit v1.2.3