Difference between revisions of "Snippet:Getting to the scene item"

From The Foundry MODO SDK wiki
Jump to: navigation, search
(Created page with "{{Snippet |summary=Getting the scene as an actual item can be useful at times: |code=<syntaxhighlight lang="python">scene = lxu.select.SceneSelection().current() sceneIte...")
 
 
Line 2: Line 2:
 
|summary=Getting the scene as an actual item can be useful at times:
 
|summary=Getting the scene as an actual item can be useful at times:
 
|code=<syntaxhighlight lang="python">scene    = lxu.select.SceneSelection().current()
 
|code=<syntaxhighlight lang="python">scene    = lxu.select.SceneSelection().current()
sceneItem = scene.AnyItemOfType (lx.service.Scene().ItemTypeLookup('scene'))</syntaxhighlight>
+
sceneItem = scene.AnyItemOfType (lx.service.Scene().ItemTypeLookup (lx.symbol.sITYPE_SCENE))</syntaxhighlight>
 
|lang=Python,
 
|lang=Python,
 
}}
 
}}

Latest revision as of 08:19, 24 June 2016

Description:

Getting the scene as an actual item can be useful at times:

Code:

scene     = lxu.select.SceneSelection().current()
sceneItem = scene.AnyItemOfType (lx.service.Scene().ItemTypeLookup (lx.symbol.sITYPE_SCENE))