Message 1 of 2
'Create' command in python 2.0 API?

Not applicable
11-05-2012
06:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am trying to create a plugin command in the new Python 2.0 API. The problem is that I cannot find the method asMPxPtr(). Is that method needed and in that case, where is it?
I am asking since I get this error when not using it:
this is when returning an instance of my MPxCommand derived class (as described in the docs):
Anyone has any insight into this?
I am trying to create a plugin command in the new Python 2.0 API. The problem is that I cannot find the method asMPxPtr(). Is that method needed and in that case, where is it?
I am asking since I get this error when not using it:
Error: RuntimeError: file <string> line 2: Failed to convert result of script creator function
this is when returning an instance of my MPxCommand derived class (as described in the docs):
createCmdFunc is a Python callable which takes no arguments and returns a new instance of the MPxCommand-derived class.
Anyone has any insight into this?