Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-12-07 10:23:57 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-12-07 10:23:57 +0300
commita37a6fb445feff993dc8691166d974bec92f75cc (patch)
tree1fa95de11023397a2f81ee1ca6602852149ad85f
parent6483dee1412e1da79e84f5ae791ea94c7aff15bf (diff)
Cleanup: remove incorrect/unhelpful comments
-rw-r--r--source/blender/blenkernel/BKE_key.h2
-rw-r--r--source/blender/blenkernel/intern/modifier.c28
-rw-r--r--source/blender/blenkernel/intern/object_deform.c1
3 files changed, 7 insertions, 24 deletions
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) {