python SME error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
from pymxs import runtime as rt
rt.MatEditor.Open()
if rt.maxOps.mtlDlgMode == rt.Name('basic'):
rt.meditMaterials[0] = rt.selection[0].material
elif rt.maxOps.mtlDlgMode == rt.Name('advanced'):
if rt.sme.activeView == 0:
rt.sme.CreateView(rt.uniquename("MaterialView_"))
active_view = rt.sme.GetView(rt.sme.activeView)
new_node = active_view.CreateNode(rt.selection[0].material, rt.Point2(400, 800))
nodes_array = rt.Array(new_node)
active_view.LayoutAll()
#1:
active_view.SetSelectedNodes(new_node )
# Unable to convert: <MixinInterface:Node> to type: MaxObject
# 2:
#active_view.SetSelectedNodes(nodes_array)
# Unable to convert: <MixinInterface:Node> to type: MaxObject
active_view.ZoomExtents(type=rt.Name('selected'))
i use #1: or #2: max send back:# Unable to convert: <MixinInterface:Node> to type: MaxObject
please help me!!3q