hi i am trying to get some value at time: from maya.api import OpenMaya time = OpenMaya.MTime(20) context = OpenMaya.MDGContext(time) node_obj = OpenMaya.MSelectionList().add('persp').getDependNode(0) node = OpenMaya.MFnDependencyNode(node_obj) plug = node.findPlug('tx', False) value = plug.asMDistance(context)
this freezes maya for a second or two and spits out this error: # sys:1: DeprecationWarning: Call MPlug::asType() instead. If needed, use MDGContextGuard switch context. it works fine on older maya versions, and using the old api. any ideas? cheers! -- 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 python_inside_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/f21c92bd-faf9-434b-9d75-74bd1aa408e2n%40googlegroups.com.