arcsikex / cascadeur_bridge

This Blender addon is aimed to help you integrate Cascadeur into your workflow.
GNU General Public License v3.0
281 stars 12 forks source link

Broken on Linux #4

Closed HarshNarayanJha closed 1 year ago

HarshNarayanJha commented 1 year ago

Hey there @arcsikex ! Since this is the first issue here, I state that I really like your initiative! That would save ~me~ us tons of time.

Now the thing is, This doesn't work on ubuntu, yet. The add-on installed perfectly, cascedeur ran perfectly, but the very moment I press export button, and error pops-up!

And I technically can't use Windows, because blender 2.9+ won't run on my old windows 8.1

Here is the screenshot: Screenshot from 2023-05-04 11-06-23

And there is nothing imported in Cascedeur, but I can see those Temp import/export options in Cascedeur as you showed in your lastest Video, so it is installed correctly

From what I found out by digging into the project files, you use .pyd file, and as far as I know, .pyd binary runs on Windows and linux needs .so libraries.

And then if I again press the button, it says port in use, (which should be an easy bug to fix)

At last, Again thanks for starting this project. Fell free to ask me for any help!

Regards, Harsh Narayan Jha

arcsikex commented 1 year ago

Hi @HarshNarayanJha, Thank you for the detailed description, it seems like 3 different issues here.

  1. CREATE_NEW_CONSOLE flag only works on Windows. This is also an easy fix, if you want to you can remove this parameter from the Popen() call in the csc_handling.py file.
  2. The .pyd files. I will try to get the correct version of these. I belive Cascadeur uses python version 3.8.6.
  3. The port is already in use probably because the server started, but didn't close because of the error.

Thank you for your help and your kind words :) I will try to fix the issues after work.

HarshNarayanJha commented 1 year ago

Alright! Thanks. I will let you now if that works or not!

So why not make linux releases. I see you only have windows entry in automatically detecting the path. On my linux system I have extracted cascedeur at /opt/cascedeur/cascedeur, and I believe that might be the default on linux.

arcsikex commented 1 year ago

Thank you. Automatic detection can be easily added for linux, I'm just not that familiar with it.

HarshNarayanJha commented 1 year ago

I just opened a PR, with the flag removed for linux, and added the default path. Though you may want to create a new linux branch for this.

Now the Import export works both ways, with no errors! haven't tested animations/actions specifically yet, but I believe they would work.

On thing I didn't understand, I selected the armature object, extorted it and only armature got exported in cascadeur with no mesh. Selecting the Mesh and the armature both worked. In my opinion only selecting the armature should exported connected mesh as well

arcsikex commented 1 year ago

Awesome, I'm glad it works :) Did you copied get the correct .so files and copied them to python/DLLs folder too?

I think it's easier to maintain one branch, and handle the different OS in code.

Regarding exporting child objects of the parented object. For now I'm simply using the bpy.ops.export_scene.fbx(use_selection=True) operator in Blender. So it works exactly the same as you it would work with fbx export. It would be solvable to export with child objects of the selected objects, but I feel like it wouldn't be consistent with how Blender currently works. But my plan is to add a settings panel for the addon, where you could configure if you want to export selected only or the whole scene and other fbx settings.

HarshNarayanJha commented 1 year ago

Well no .so files! I was also surprised it worked.

I guess you are right about not using a different branch. I will update my PR with the separate linux condition.

arcsikex commented 1 year ago

I really appreciate your support man! Thank you

arcsikex commented 1 year ago

I menaged to set up a linux VM. It seems like the linux version contains the required .so files by default, that's why it worked πŸ˜† I created a new branch with your fixes and some handling the other issues you mentioned. Here is a release from that: cascadeur_bridge.zip

HarshNarayanJha commented 1 year ago

Oh you did all of the stuff while I was asleep πŸ˜‚. That’s great. Lemme test!

arcsikex commented 1 year ago

I hope the fix worked, I will close this issue finally πŸ˜„