Message 1 of 1
Maya API ls -type command
Not applicable
12-10-2007
10:27 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Is anybody knows how 'ls –type nodeType' command works ? How can I iterate all created nodes in scene, by giving string parameter(not MFn), using only API ? I wrote a lot of nodes, but how can I list, operate them using only API ?
my very simple ls command:
Now, how can I iterate, for example, on 'simpleNode's on the scene ?
Thanks,
Peter
Is anybody knows how 'ls –type nodeType' command works ? How can I iterate all created nodes in scene, by giving string parameter(not MFn), using only API ? I wrote a lot of nodes, but how can I list, operate them using only API ?
my very simple ls command:
MStringArray result;
for( MItDependencyNodes nodeIt( MFn::kDependencyNode );
!nodeIt.isDone(); nodeIt.next() ){
MFnDependencyNode nodeFn( nodeIt.item() );
result.append( nodeFn.name() );
}
this->setResult(result);
Now, how can I iterate, for example, on 'simpleNode's on the scene ?
Thanks,
Peter