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:
authorJoshua Leung <aligorith@gmail.com>2009-04-16 17:10:08 +0400
committerJoshua Leung <aligorith@gmail.com>2009-04-16 17:10:08 +0400
commitf47ab4f0aedf2445bffab2094986884a418a976f (patch)
treefeb0de1eb8f9d32d3ffebd14f03b0a1a64424fc0 /source/blender/blenkernel/intern
parent23af7214d3721862eae9f4601791ee0602740f50 (diff)
2.5:
* Added extra parameter to generic unique name finding function BLI_uniquename() for specifying the delimeter between non-unique parts of the name and digits. * Driver target variables now get unique names by default.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c2
-rw-r--r--source/blender/blenkernel/intern/constraint.c2
-rw-r--r--source/blender/blenkernel/intern/fcurve.c6
-rw-r--r--source/blender/blenkernel/intern/ipo.c2
4 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index c8b2ff71612..1d819b7de8b 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -240,7 +240,7 @@ KeyingSet *BKE_keyingset_add (ListBase *list, const char name[], short flag, sho
BLI_addtail(list, ks);
/* make sure KeyingSet has a unique name (this helps with identification) */
- BLI_uniquename(list, ks, "Keying Set", offsetof(KeyingSet, name), 64);
+ BLI_uniquename(list, ks, "Keying Set", ' ', offsetof(KeyingSet, name), 64);
/* return new KeyingSet for further editing */
return ks;
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 9fc907a3931..dd8fd88f76c 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -93,7 +93,7 @@
/* Find the first available, non-duplicate name for a given constraint */
void unique_constraint_name (bConstraint *con, ListBase *list)
{
- BLI_uniquename(list, con, "Const", offsetof(bConstraint, name), 32);
+ BLI_uniquename(list, con, "Const", '.', offsetof(bConstraint, name), 32);
}
/* ----------------- Evaluation Loop Preparation --------------- */
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 5d475767369..d7b1bdaeff3 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -5,6 +5,7 @@
#include <math.h>
#include <stdio.h>
+#include <stddef.h>
#include <string.h>
#include <float.h>
@@ -589,8 +590,9 @@ DriverTarget *driver_add_new_target (ChannelDriver *driver)
dtar= MEM_callocN(sizeof(DriverTarget), "DriverTarget");
BLI_addtail(&driver->targets, dtar);
- /* give the target a name */
- strcpy(dtar->name, "a"); // XXX fimxe... this needs more work to get unique names without dots...
+ /* give the target a 'unique' name */
+ strcpy(dtar->name, "var");
+ BLI_uniquename(&driver->targets, dtar, "var", '_', offsetof(DriverTarget, name), 64);
/* return the target */
return dtar;
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index 48ffdca3a83..43791e32b38 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -1082,7 +1082,7 @@ static void fcurve_add_to_list (ListBase *groups, ListBase *list, FCurve *fcu, c
BLI_snprintf(agrp->name, 64, grpname);
BLI_addtail(&tmp_act.groups, agrp);
- BLI_uniquename(&tmp_act.groups, agrp, "Group", offsetof(bActionGroup, name), 64);
+ BLI_uniquename(&tmp_act.groups, agrp, "Group", '.', offsetof(bActionGroup, name), 64);
}
}