Re: [Maya-Python] maya API ?? reading an external json file

2021-05-18 Thread Justin Israel
On Wed, May 19, 2021 at 7:21 AM Marcus Ottosson wrote: > pybind11 is great, but it is incrdibly slow to compile. Like 20 > seconds for a handful of bound methods. It’s insane. > > That aside, I’ve got a recent project that might make a good example of > what it is and how it can be used to re

Re: [Maya-Python] maya API ?? reading an external json file

2021-05-18 Thread Marcus Ottosson
pybind11 is great, but it is incrdibly slow to compile. Like 20 seconds for a handful of bound methods. It’s insane. That aside, I’ve got a recent project that might make a good example of what it is and how it can be used to re-create the Maya Python API. - https://github.com/mottosso/cmd

Re: [Maya-Python] maya API ?? reading an external json file

2021-05-18 Thread Alok Gandhi
Thanks Justin! pybind definitely seems interesting. And yes, Cython is definitely great. I have used it in production previously for some generic algorithms implementations where performance was needed in python centric api interface. And it is super easy to write too. On Tue, May 18, 2021, 23:58

Re: [Maya-Python] maya API ?? reading an external json file

2021-05-18 Thread Justin Israel
On Wed, May 19, 2021 at 6:10 AM Alok Gandhi wrote: > As a side note, for generic use (outside of maya) you can use boost python > to call python from C++ and vice versa: > > https://www.boost.org/doc/libs/1_63_0/libs/python/doc/html/tutorial/index.html > Boost is a super heavy dependency. These

Re: [Maya-Python] maya API ?? reading an external json file

2021-05-18 Thread Alok Gandhi
As a side note, for generic use (outside of maya) you can use boost python to call python from C++ and vice versa: https://www.boost.org/doc/libs/1_63_0/libs/python/doc/html/tutorial/index.html On Tue, May 18, 2021, 23:30 Todd Widup wrote: > Thanks Marcus, > the txt file will be just a bunch

Re: [Maya-Python] maya API ?? reading an external json file

2021-05-18 Thread Todd Widup
Thanks Marcus, the txt file will be just a bunch of values and matrices ... it might be binary it might be ascii..not 100% yet, depends how big the files get. was leaning towards JSon for easy of use/setup the python Q was purely curiosity On Tue, May 18, 2021 at 9:50 AM Marcus Ottosson wrote

Re: [Maya-Python] maya API ?? reading an external json file

2021-05-18 Thread Marcus Ottosson
what would I use to allow the plugin to read an external user specified file, either a txt or json? You could make a string attribute on the node, and set MFnAttribute::isUsedAsFilename = true

[Maya-Python] maya API ?? reading an external json file

2021-05-18 Thread Todd Widup
me writing maya plugins has been limited to mostly utility nodes and an occasionally deformer. I am working on something a bit bigger and what would I use to allow the plugin to read an external user specified file, either a txt or json? also, been wondering, is there a way to have a C++ plugin r