diff options
author | Ken Hughes <khughes@pacific.edu> | 2007-03-29 08:55:29 +0400 |
---|---|---|
committer | Ken Hughes <khughes@pacific.edu> | 2007-03-29 08:55:29 +0400 |
commit | b8e425af7c24ee24ee43205b0ce6e66e6a6a0c22 (patch) | |
tree | 7a61333dbc47eaa5c9d9bc53dd8d3b1309bf7900 /source/blender/blenkernel/BKE_library.h | |
parent | 42fa2ba00b4c5dc2427be616d64d30eaaab433f5 (diff) |
Revisions to previous change of new_id().
Note: the intent of the original modification (and these updates) is not to
change how new_id() functions. What has been done is to pull out the code
which calculates a new name for an ID in the case of duplicate, as would
happen when you copy any datablock, into a separate function. This code is
necessary in the new Python Library module, since it otherwise is extremely
difficult to locate a new datablock appended from a library. new_id() calls
this separate function to generate a name for the new ID if necessary, just
as it previously did.
To make the purpose of this new function clearer, I renamed it
check_for_dupid() and added more extensive comments. I repeat, it's not
meant to be a substitute for new_id().
Diffstat (limited to 'source/blender/blenkernel/BKE_library.h')
-rw-r--r-- | source/blender/blenkernel/BKE_library.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h index b0e82a3b7f7..f73c1b23a8a 100644 --- a/source/blender/blenkernel/BKE_library.h +++ b/source/blender/blenkernel/BKE_library.h @@ -47,7 +47,7 @@ void *copy_libblock(void *rt); void id_lib_extern(struct ID *id); void id_us_plus(struct ID *id); -int dup_id(struct ListBase *lb, struct ID *id, const char *name); +int check_for_dupid(struct ListBase *lb, struct ID *id, char *name); int new_id(struct ListBase *lb, struct ID *id, const char *name); struct ListBase *wich_libbase(struct Main *mainlib, short type); |