Schematic.FindNode

説明

指定された Softimage オブジェクトの SchematicNode オブジェクト表現を戻します。

スクリプト 構文

oReturn = Schematic.FindNode( Object );

戻り値

SchematicNode

パラメータ

パラメータ タイプ 詳細
オブジェクト オブジェクトまたはString ビューで検索する Softimage オブジェクトです。

Python の例

#
# Demonstrates how to access a Schematic node from a Softimage object. 
#
# import some Softimage python shortcuts
from siutils import *
# Get the 'MySchematic' schematic view object in the current layout
viewname = 'MySchematic'
activelayout = sidesk.ActiveLayout
v = activelayout.Views( viewname )
# 'MySchematic' view is not created yet
if v == None:
        log('Creating new schematic...: %s' % (viewname))
        v = activelayout.CreateView( "Schematic", viewname )
# Python needs to convert from View to Schematic object
sv = disp(v)
# Grab the camera root and look for the node
Application.SelectObj("Camera_Root", "", "")
node = sv.FindNode( si.Selection(0) )   
(x,y,w,h) = node.UIInfo
log( 'name=%s x=%d y=%d w=%d h=%d parent=%s object=%s selected=%d expanded=%d' % (node.Name,x,y,w,h,node.Parent,node.Object,node.Selected,node.Expanded) )