uniquename + suffix
Hello!
I wonder how can i have uniquename and suffix in a single line code.
For instance if you run this line:
for points = 1 to 3 do (point size:1 name:(uniquename "Spine_"+"_helper"))
the output will be:
$Point_Helper:Spine001__helper @ [0.000000,0.000000,0.000000]
$Point_Helper:Spine001__helper @ [0.000000,0.000000,0.000000]
$Point_Helper:Spine001__helper @ [0.000000,0.000000,0.000000]
Notice that the objects in the scene don't have unique names at all. Objects has the same name!
I tried this line, but is not quite correct..
for points = 1 to 3 do (point size:1 name:(uniquename "Spine_") + "_helper")
the output is:
-- Unable to convert: "_helper" to type:
Long story short, it is possible in a single mxs line code, the final result to be:
$Point_Helper:Spine_001_helper
$Point_Helper:Spine_002_helper
$Point_Helper:Spine_003_helper
?
Thanks in advance,
-E.
Comments
.
I wonder how can i have uniquename and suffix in a single line code.
Note that your last approach has nothing to do with a uniquename.
Well, i found an easier way
Well, i found an easier way to do it.
Thank you for the help,
-M.
http://mihailupu.ro/
onliner
for p in (for i=1 to 3 collect point name:(uniqueName "point_")) do p.name += "_helper"
Yap. This is another good
Yap. This is another good solution. Thanks!
http://mihailupu.ro/
I don't know why you need one
I don't know why you need one line solution, but:
I prefere this way of coding:
Tools and Scripts for Autodesk 3dsMax
Thanks for the help miauu!
Thanks for the help miauu!
http://mihailupu.ro/