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!
--
Christopher Crouzet
*http://christophercrouzet.com* <http://christophercrouzet.com>
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CANuKW51g2Ew9UUOMCyaksMGTaz%2BXOriAKc%2B_vXhCsvGHSGpbBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.