|
本帖最后由 筑梦NARUTO 于 2016-5-5 11:25 编辑
我不咋会写巨集,我用rhinopython简单给你写一个。你修改下,做个按钮就可以了,代码如下。- #coding=utf-8
- import rhinoscriptsyntax as rs
- srf = rs.GetObject("选择帧平面",rs.filter.surface)
- if srf:
- materail_index = rs.ObjectMaterialIndex(srf)
- if (materail_index>-1):
- rs.MaterialTransparency(materail_index,0.7)
- else:
- print "没有选择帧平面"
复制代码
按钮的代码:- !-_RunPythonScript (
- #coding=utf-8
- import rhinoscriptsyntax as rs
- srf = rs.GetObject("选择帧平面",rs.filter.surface)
- if srf:
- materail_index = rs.ObjectMaterialIndex(srf)
- if (materail_index>-1):
- rs.MaterialTransparency(materail_index,0.7)
- else:
- print "没有选择帧平面"
- )
复制代码
|
|