加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

Max2014脚本工具的乱码问题

(2014-01-21 15:22:44)
标签:

建筑动画

建筑效果图

3dsmax2014

文化

分类: 建筑表现教程-Tutorials

以下文章转载与  http://www.cnblogs.com/sitt/

Max2010activex以及.net界面乱码解决方式

原本记录在网易博客的,有人问起,查了一下就顺路搬过来

其实就是这一句脚本设置一下就好。可以放到自动启动里。

(DotNetClass "System.Windows.Forms.Application").CurrentCulture dotnetObject "System.Globalization.CultureInfo" "zh-cn"

 

Max2014脚本工具的乱码问题  以下操作。。

有时一些中文的脚本会在max2014中显示为乱码,是因为max2014将多种语言统一在一起的缘故,在开始菜单中max2014可以用支持的各种语言的版本启动。

题外插一句,可见还是用英文比较合适,不会出现乱码问题,哈哈。

要解决使用中文的脚本乱码问题,方式如下。

第一种是手动

http://s10/mw690/5939df00gd4bbccd38ab9&690

=====================================================================

第二种方法:惯例分隔线,以下是代码改变选项的方式,美术同鞋可以止步了,技术美术和程序请继续

========================================================================

这个选项就保存在3dsmax.ini,可以读ini文件来判断或设置

if "2052" != GetINISetting (GetMAXIniFile()) "File Language Options" "LanguageToUseForFileIO" do

SetINISetting (GetMAXIniFile()) "File Language Options" "LanguageToUseForFileIO" "2052"

当然修改ini文件会有个缺点,就是需要重启max。如果不想重启max,可以用下面的函数

Fn SetDefaultLanguageToChinese =

(

    if (MaxVersion() )[1] >= 15000 do

    if "2052" != GetINISetting (GetMAXIniFile()) "File Language Options" "LanguageToUseForFileIO" do

    (

        DialogMonitorOPS.UnRegisterNotification id:#SetDefaultLanguageToChinese

        Fn DialogMonitorCallBackSetDefaultLanguageToChinese =

        (

            currentHandle = DialogMonitorOPS.GetWindowHandle()

            if "Preference Settings" == UIAccessor.GetWindowText currentHandle do

            (

                languageNames = #("Chinese","English","German","French","japanese","Korean","Current")

                childrens = Windows.getChildrenHWND currentHandle

               

                languageLabel = undefined

                for tempControl in childrens where tempControl[5] == "Default Language:" do

                (

                    languageLabel = tempControl

                )

                if languageLabel != undefined do

                for tempControl in childrens where

                (

                    tempControl[2]==languageLabel[2] and

                    tempControl[3]==languageLabel[3 and

                    "ComboBox" == tempControl[4] and

                    FindItem languageNames tempControl[5] != 0

                )

                do

                (

                    UIAccessor.SendMessage tempControl[1] 0x014E 6 0

                )

                UIAccessor.SendMessageID currentHandle #IDOK

            )

            true

        )

        DialogMonitorOPS.RegisterNotification DialogMonitorCallBackSetDefaultLanguageToChinese id:#SetDefaultLanguageToChinese

        DialogMonitorOPS.Enabled = true

        DialogMonitorOPS.ShowNotification()

        max file preferences

        DialogMonitorOPS.UnRegisterNotification id:#SetDefaultLanguageToChinese

        DialogMonitorOPS.Enabled = false

    )

)

SetDefaultLanguageToChinese()

 

 

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有