[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17522] branches/etch-a-ton/source/blender /src: Change name templating to &S and &N (less potential bugs).
Martin Poirier
theeth at yahoo.com
Thu Nov 20 23:23:01 CET 2008
Revision: 17522
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17522
Author: theeth
Date: 2008-11-20 23:23:01 +0100 (Thu, 20 Nov 2008)
Log Message:
-----------
Change name templating to &S and &N (less potential bugs).
It now also accepts lower case versions (&s and &n).
Modified Paths:
--------------
branches/etch-a-ton/source/blender/src/drawview.c
branches/etch-a-ton/source/blender/src/editarmature_retarget.c
Modified: branches/etch-a-ton/source/blender/src/drawview.c
===================================================================
--- branches/etch-a-ton/source/blender/src/drawview.c 2008-11-20 21:57:21 UTC (rev 17521)
+++ branches/etch-a-ton/source/blender/src/drawview.c 2008-11-20 22:23:01 UTC (rev 17522)
@@ -2363,8 +2363,8 @@
uiDefButF(block, NUM, B_DIFF, "D:", 143,yco, 67,19, &G.scene->toolsettings->skgen_retarget_distance_weight, 0, 10, 1, 0, "Distance Weight");
yco -= 20;
- uiDefBut(block, TEX,0,"S:", 10, yco, 90, 20, G.scene->toolsettings->skgen_side_string, 0.0, 8.0, 0, 0, "Text to replace %S with");
- uiDefBut(block, TEX,0,"N:", 100, yco, 90, 20, G.scene->toolsettings->skgen_num_string, 0.0, 8.0, 0, 0, "Text to replace %N with");
+ uiDefBut(block, TEX,0,"S:", 10, yco, 90, 20, G.scene->toolsettings->skgen_side_string, 0.0, 8.0, 0, 0, "Text to replace &S with");
+ uiDefBut(block, TEX,0,"N:", 100, yco, 90, 20, G.scene->toolsettings->skgen_num_string, 0.0, 8.0, 0, 0, "Text to replace &N with");
uiDefIconButBitC(block, TOG, SK_RETARGET_AUTONAME, B_DIFF, ICON_AUTO,190,yco,20,20, &G.scene->toolsettings->skgen_retarget_options, 0, 0, 0, 0, "Use Auto Naming");
/* auto renaming magic */
Modified: branches/etch-a-ton/source/blender/src/editarmature_retarget.c
===================================================================
--- branches/etch-a-ton/source/blender/src/editarmature_retarget.c 2008-11-20 21:57:21 UTC (rev 17521)
+++ branches/etch-a-ton/source/blender/src/editarmature_retarget.c 2008-11-20 22:23:01 UTC (rev 17522)
@@ -460,14 +460,14 @@
for (i = 0, j = 0; template_name[i] != '\0' && i < 31 && j < 31; i++)
{
- if (template_name[i] == '%')
+ if (template_name[i] == '&')
{
- if (template_name[i+1] == 'S')
+ if (template_name[i+1] == 'S' || template_name[i+1] == 's')
{
j += sprintf(name + j, side_string);
i++;
}
- else if (template_name[i+1] == 'N')
+ else if (template_name[i+1] == 'N' || template_name[i+1] == 'n')
{
j += sprintf(name + j, num_string);
i++;
More information about the Bf-blender-cvs
mailing list