I'm not an engineer, but hopefully you don't mind if I give this one a
shot. :)

Step 1, write your C++ code.
Step 2, create bindings for Python

For step 2, you can use any of these.

- sip (from PyQt-land)
- shiboken (from PySide-land)
- Boost.Python
- pybind11
- ...

You compile it against the Python that ships with Maya, and viola, a
regular importable library, like PyQt or PySide.


On 20 November 2015 at 20:23, Joe Weidenbach <[email protected]> wrote:

> Interesting Question.  I'm pretty sure it could be done.  There's lots of
> ways available to wrap custom c++ code with a Python Binding, and I know
> that in the past I've called into COM interfaces on windows (to drive
> Photoshop) from my python scripts, but I'm not sure on the "how" for custom
> code.
>
> On Sat, Nov 21, 2015 at 9:09 AM, AK Eric <[email protected]> wrote:
>
>> Asking for an engineer, since this isn't something I've ever tried:
>>
>> He wants to integrate some custom (non-Maya) c++ code into a Maya
>> plugin.  I have experience doing scriptedPlugins in Python, but not c++
>> ones.
>>
>> Obviously if you make a c++ plugin it'd be easy to integrate this other
>> code.  So the question is:  Can you call to custom c++ code from a Python
>> scripted plugin?  Or wrapper it somehow... or.... ?
>>
>> Any thoughts?
>>
>> thanks!
>>
>> --
>> 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/f3be53da-1894-4b77-8645-f60d2d8d74cf%40googlegroups.com
>> <https://groups.google.com/d/msgid/python_inside_maya/f3be53da-1894-4b77-8645-f60d2d8d74cf%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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/CAM33%3Da7q%3Dk%2BGXugp3kpsS6jskn1A9zJnjnoy8kAQxuEyyUOtPA%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAM33%3Da7q%3Dk%2BGXugp3kpsS6jskn1A9zJnjnoy8kAQxuEyyUOtPA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Marcus Ottosson*
[email protected]

-- 
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/CAFRtmOBp5Wgkcx7JY2Acs%2BAELGtqpym4RS_1aqBKeN2cD9%3D0Vg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to