[Bf-blender-cvs] [a37a6fb445f] master: Cleanup: remove incorrect/unhelpful comments

Campbell Barton noreply at git.blender.org
Tue Dec 7 08:47:44 CET 2021


Commit: a37a6fb445feff993dc8691166d974bec92f75cc
Author: Campbell Barton
Date:   Tue Dec 7 18:23:57 2021 +1100
Branches: master
https://developer.blender.org/rBa37a6fb445feff993dc8691166d974bec92f75cc

Cleanup: remove incorrect/unhelpful comments

===================================================================

M	source/blender/blenkernel/BKE_key.h
M	source/blender/blenkernel/intern/modifier.c
M	source/blender/blenkernel/intern/object_deform.c

===================================================================

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) {



More information about the Bf-blender-cvs mailing list