asdasd

asdasd

hfcandrew
Advisor Advisor
2,832 Views
26 Replies
Message 1 of 27

asdasd

hfcandrew
Advisor
Advisor

asda

 

 

0 Likes
Accepted solutions (1)
2,833 Views
26 Replies
Replies (26)
Message 21 of 27

hfcandrew
Advisor
Advisor

Gotcha. Well thanks! I remember seeing you make a post about that last year.

 

I'll look into updating my Win10 mmapi build (and all my other scripts) for Python3 then going forward.

 

0 Likes
Message 22 of 27

Anonymous
Not applicable
Accepted solution

@hfcandrew Already ready to run a python3 script?

 

Today I got a hint to solve the auto dropping issue above (reason for the failure was that this very command the path string is case sensitive and expects e.g "Documents" instead of "documents").

 

 

0 Likes
Message 23 of 27

hfcandrew
Advisor
Advisor

Excellent work

0 Likes
Message 24 of 27

hfcandrew
Advisor
Advisor

@Anonymous I've having trouble with the python3 conversion. I feel like I'm 80-90% there but a couple things in TM are not running correctly. For example if I save the tools for a work flow go break>select tool (&make a selection)>smooth boundary (or any selection based tool/command). The selection I just made gets deselected, so the smooth boundary fails.

 

But I get no error.

0 Likes
Message 25 of 27

Anonymous
Not applicable

@hfcandrew : I didn't try ToolManager on P3 yet. Simple reason. I compiled the code to a standalone application (in P2) which ships all stuff inside (e.g. this runs on a machine where neither Python nor mmApi is installed) and performance seems to be better. BTW: Can't you simply keep Python2 along with Python3 on WIN and run the ToolManager from P2 ? This isn't a problem on macOS here.

Porting ToolManager to P3 needs to be done for Toolbox reasons and is the next point on my ToDo list.

 

mmappi.py is automatically generated by SWIG and this is OS specific. So my file most likely isn't much help on WIN. Also the SWIG stuff seems to work on your side. Otherwise you would get tons of errors....

I attach my mm folder. I transferred the original mm codes using 2to3 . But most of it are just wrapped SWIG calls- same for P2 and P3 there's not that much difference. Besides the 2to3 auto conversion I needed to modify

def get_object_name in scene.py (there are comments at the lines I edited).

 

Maybe there's a function used in ToolManager which I never used for other codes on P3? As said I'll look into it....

 

0 Likes
Message 26 of 27

hfcandrew
Advisor
Advisor

I've been playing around with compiling it all it an exe, while the program still works, I still need to have python installed. So I must be doing it wrong. I've tried p2exe and pyinstaller.

0 Likes
Message 27 of 27

Anonymous
Not applicable

@hfcandrew Ha we did the same work twice. I have ported the ToolManager too. Sure, I'm curious  how you did mod it...

About the labelling script: I'll send you a download link and some setup information today. Just need to write the instructions,

 

0 Likes