You can always use the PARSE option that separates each instance between spaces
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
PARSE LayerName LayerName1 LayerName2 LayerName3 LayerName4 Layername5
IF CMP(Layername5,"")==0
PRINT "This layername has too many spaces: "LayerName
END
IF CMP(LayerName4,"")==0
LayerName = LayerName1"_"LayerName2"_"LayerName3"_"LayerName4
ELSE
IF CMP(LayerName3,"")==0
LayerName = LayerName1"_"LayerName2"_"LayerName3
ELSE
IF CMP(LayerName2,"")==0
LayerName = LayerName1"_"LayerName2
END
END
END
lastUnderscore = LastPos(LayerName,"_")