#現在のUIに存在するNetwork Editorを取得
current_networkEditor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor)
#現在のネットワークエディターが表示しているオブジェクトのパスを取得する
cd = current_networkEditor.pwd()
#もし取得したパスのカテゴリーがジオメトリーなら
if(cd.type().description() =="Geometry"):
print "yas, it is geometry"
#このオブジェクトに含まれるノードを全て取得する
nodes = cd.children()
for c in nodes:
print c.type().description()
else:
print "please go to sop network"
print cd.type().description()
#このオブジェクトに含まれるノードを全て取得する
nodes = cd.children()
for c in nodes:
print c.type().description()