一半君的总结纸

听话只听一半君

#114 如何在echo all commands的时候快速的在scripter editor里找到想要的信息?

想要android的logcat那样,有个filter regex,正解大概应该是重新写出自定义的cmdScrollFieldReporter,然后把默认script editor里的换掉吧,然后再加个输regex的textfield在ui上,lz选了简单点的方法,自己做个窗口把filter过的内容显示在里面(好像不简单…)

lz试了下搞到一半,想把界面弄成这样的,顶上是输filter的regex用的,下面是script editor的输出,高亮还不对,lz是直接用了python的highlighter做实验,script editor的输出大部分是mel,搞了一半的尸体在github

不知道能不能直接把filter加到自带的script editor里,他其实是个QTextEdit,如果能的话就用不着自己再做个窗口了.

logcat_maya

语法高亮:
搜到两个例子,

update: lz折腾半天,最后直接用了Mack Stone写的,大神的还是比较好阿,他原目的是给script editor上方的输出部分加上高亮,效果如下

highlighted script editor output - how to make your maya slower series

待续…

参考:
How to make Maya output all messages into console/terminal?
PyQt Python syntax highlighting
Better QPlainTextEdit With Line Numbers
Syntax highlighting with PyQt

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: