Schematic.FindNode

説明

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

C#構文

SchematicNode Schematic.FindNode( Object in_pObject );

スクリプト構文

oReturn = Schematic.FindNode( Object );

戻り値

SchematicNode

パラメータ

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

Python の例

#

# Demonstrates how to access a Schematic node from a Softimage object. 

#

# import some Softimage python shortcuts

from sipyutils import *

si = si()

# Get the 'MySchematic' schematic view object in the current layout

viewname = 'MySchematic'

activelayout = si.DeskTop.ActiveLayout

v = activelayout.Views( viewname )

# 'MySchematic' view is not created yet

if v == None:

	log('Creating new schematic...: %s' % (viewname))

	v = activelayout.CreateView2( "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) )