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>2007-04-27 15:16:35 +0400
committerJoshua Leung <aligorith@gmail.com>2007-04-27 15:16:35 +0400
commit01335fc7bbc339183a8828b37f905608f7d1a028 (patch)
tree971ebe3c746ece8ceecc40d67be5e4ad2664c3fd /source/blender/src/editdeform.c
parent0a9dc31c8b05ad479eaf22cf99300a9385d7d8c7 (diff)
Bugfix:
Previous versions of Blender allowed Vertex Groups to be nameless, which shouldn't be allowed. This caused problems with rigs from previous versions of Blender being loaded in 2.43+ versions, as the new VGroup feature for the Armature modifier mis-identified these nameless group(s) as being the Vertex Group to be used. As well as the checks done when renaming VGroups (from another commit), files created prior to and in 2.43 will have all such groups given default names. Code notes: * I've moved the unique_vertexgroup_name function from src to blenkernel like for constraints * Formatting in deform.c tidied up a bit
Diffstat (limited to 'source/blender/src/editdeform.c')
-rw-r--r--source/blender/src/editdeform.c54
1 files changed, 0 insertions, 54 deletions
diff --git a/source/blender/src/editdeform.c b/source/blender/src/editdeform.c
index 29324c28bf0..305d01a8aea 100644
--- a/source/blender/src/editdeform.c
+++ b/source/blender/src/editdeform.c
@@ -772,60 +772,6 @@ void remove_verts_defgroup (int allverts)
}
}
-void unique_vertexgroup_name (bDeformGroup *dg, Object *ob)
-{
- bDeformGroup *curdef;
- int number;
- int exists = 0;
- char tempname[64];
- char *dot;
-
- if (!ob)
- return;
-
- /* See if we are given an empty string */
- if (dg->name[0] == '\0') {
- /* give it default name first */
- strcpy (dg->name, "Group");
- }
-
- /* See if we even need to do this */
- for (curdef = ob->defbase.first; curdef; curdef=curdef->next){
- if (dg!=curdef){
- if (!strcmp(curdef->name, dg->name)){
- exists = 1;
- break;
- }
- }
- }
-
- if (!exists)
- return;
-
- /* Strip off the suffix */
- dot=strchr(dg->name, '.');
- if (dot)
- *dot=0;
-
- for (number = 1; number <=999; number++){
- sprintf (tempname, "%s.%03d", dg->name, number);
-
- exists = 0;
- for (curdef=ob->defbase.first; curdef; curdef=curdef->next){
- if (dg!=curdef){
- if (!strcmp (curdef->name, tempname)){
- exists = 1;
- break;
- }
- }
- }
- if (!exists){
- BLI_strncpy (dg->name, tempname, 32);
- return;
- }
- }
-}
-
void vertexgroup_select_by_name(Object *ob, char *name)
{
bDeformGroup *curdef;