ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
-- function to make a filename valid by replacing illegal characters with a '_'
function MakeFileNameValid fileName = -- fname must be just filename, no path....(
local illegal_characters =":/\\~!@#$%^&*()+=|'?><;[]{}\""-- illegal characters in file name
local res = copy fileName
-- make sure the object name is legal for a filename
local count = res.count
for i = 1 to count do(if(findString illegal_characters res[i])!= undefined do-- replace illegal characters with _
res[i] = "_")--
res
)
var foreignCharacters = $("#foreign_characters").val();
var rforeign = /[^\u0000-\u007f]/;
if(rforeign.test(foreignCharacters)){
alert("This is non-Latin Characters");
}else{
alert("This is Latin Characters");
}
how to implement these things in maxscript:
for m in getClassInstances BitmapTexture where (foreignfn m.filename == true)do
rename m.filename
For the other hand we have:
character.set parameter for maxscript! I'm still confused!!!
Comments
Try this function:
Tools and Scripts for Autodesk 3dsMax
I've found smth like this for php and javascript
php
x30 will exclude: !"#$%&'()*+,-./.
java
how to implement these things in maxscript:
For the other hand we have:
character.set parameter for maxscript! I'm still confused!!!