Hi,
Is anyone else having issues with the method `
OpenMaya.MIteratorType::setFilterList` working with some types but not with others? Using `
OpenMaya.MFn.kDagNode` for example returns an iterator over a valid number of objects, but `
OpenMaya.MFn.kTime` doesn't.
from maya import OpenMaya
type_to_look_for = OpenMaya.MFn.kTime
# type_to_look_for = OpenMaya.MFn.kDagNode
filter_list = OpenMaya.MIntArray()
filter_list.append(type_to_look_for)
iterator_type = OpenMaya.MIteratorType()
iterator_type.setFilterList(filter_list)
iterator = OpenMaya.MItDependencyNodes(iterator_type)
count = 0
while not iterator.isDone():
count += 1
iterator.next()
print(count)In this snippet I'd expect `
count` to be 1 but instead no nodes were found. Tested on Maya 2016 SP6.
Cheers!
--