关于 MAXScript 如何获取当前max版本

用到了 GetFileVersion 相关文档在此:http://docs.autodesk.com/3DSMAX/16/ENU/MAXScript-Help/index.html?url=files/GUID-BA196B48-8ECA-4E0C-AE2E-F7EFAAF39844.htm,topicNumber=d30e712756

fn max_Version =

(

max_V = GetFileVersion (getDir #maxRoot + "\\3dsmax.exe")  -- 获取当前max版本号

YY_v = substring max_V 1 2  -- 返回字符串中从第一个到第二个字符

case of 

(

    (YY_v == "10"): (YY_max_V = "3dsmax2008")

    (YY_v == "11"): (YY_max_V = "3dsmax2009")

    (YY_v == "12"): (YY_max_V = "3dsmax2010")

    (YY_v == "13"): (YY_max_V = "3dsmax2011")

    (YY_v == "14"): (YY_max_V = "3dsmax2012")

    (YY_v == "15"): (YY_max_V = "3dsmax2013")

    (YY_v == "16"): (YY_max_V = "3dsmax2014")

    (YY_v == "17"): (YY_max_V = "3dsmax2015")

    )

YY_max_V

)

 

你可能感兴趣的:(script)