calling python from a c++ deformer fails when in Viewport 2.0

44 views
Skip to first unread message

Michał Frątczak

unread,
Mar 9, 2015, 7:29:01 PM3/9/15
to python_in...@googlegroups.com
Hi
I have a c++ deformer node that calls a python function using:
MString res = MGlobal::executePythonCommandStringResult(cmd);
This has always been working fine with legacy viewport, but with VP2.0 it fails most of the time (not always) with the following error:

# Traceback (most recent call last):
#   File "<maya console>", line 1, in <module>
#   File "mfCacheDeformExpandString.py", line 23, in mfCacheDeformExpandString
#     sceneName = mc.file(q=True, sn=True)
# TypeError: Argument to query flag must be a boolean // 

I have other nodes that use similar code (to expand a templated path with user defined python function) and I'd like them to work reliably with VP 2.0 ...
Any ideas ?

Michał Frątczak

unread,
Nov 9, 2016, 8:26:39 AM11/9/16
to Python Programming for Autodesk Maya
Hi all
Sorry for digging this out, but we switched do maya2017 and this problem persists.
Perhaps someone has solved this?
I know calling python from c++ deformer looks fishy, but...
Reply all
Reply to author
Forward
0 new messages