OSArch Community

BlenderBIM Experimental IFC Git add-on

  1. B

    It can't find the git tool. Once Git has been installed, you will need to restart Blender and maybe even log out of Windows and log in again.

  2. B

    Can you check if Blender can find Git? in the blender Python Console type these commands:

    
    import shutil
    
    shutil.which("git")
    
    shutil.which("git.exe")
    
  3. A

    This is really great guys!

    However I am running into the following error when trying to do an initial Git commit on Windows 10 (Blender v4.3.2 Bonsai v0.8.0).

    When I try to add an existing IFC project file to the BlenderBIM/Bonsai initiated Git repo I get this:

    ValueError: Absolute path 'C:/Users/Marius/OneDrive/_Renovation/IFCs/Kantershof_386_FIXED_Copy.ifc' is not in git repository at 'C:\\Users\\Marius\\OneDrive\\_Renovation\\IFCs'

    I can Git add the IFC project file, and make the initial Git commit from the Command Prompt without any issues.

    The Command Prompt Git commit does show up in BlenderBIM/Bonsai after the "Refresh revision list" button is clicked.

    Does anyone have any pointers how to fix this Git add Absolute path issue, as of course it would be lot handier to have this all in Blender UI instead of having to move to Command Prompt back and forward. Thanks!

  4. B

    @Armatura can you commit changes to this file once it has been added to the repository?

  5. B

    ..also there have been a couple of changes to the git functionality in the latest snapshots:

    • ifcmerge now ships with Bonsai, so you shouldn't have to install it separately to be able to merge branches.

    • On windows there is a button where you can try to install Git using winget and the Microsoft Store (the button only appears when you don't have Git). It would be nice to have reports of success or failure. It should be removed if it causes too much trouble.

  6. A

    @brunopostle said:

    @Armatura can you commit changes to this file once it has been added to the repository?

    I get the same errors as with the Innitial CommitValueError: Absolute path 'C:/Users/Marius/OneDrive/_Renovation/IFCs/Kantershof_386_FIXED_Copy.ifc' is not in git repository at 'C:\\Users\\Marius\\OneDrive\\_Renovation\\IFCs'

    Mind you, if I load a new IFC Project from a Demo template, the Bonsai Git UI works fine.

  7. A

    @brunopostle said:

    ..also there have been a couple of changes to the git functionality in the latest snapshots:

    • ifcmerge now ships with Bonsai, so you shouldn't have to install it separately to be able to merge branches.

    • On windows there is a button where you can try to install Git using winget and the Microsoft Store (the button only appears when you don't have Git). It would be nice to have reports of success or failure. It should be removed if it causes too much trouble.

    So theifcmerge.exe should removed from .\Git\cmd directory?

  8. B

    @Armatura I don't know what the problem is, it shouldn't be an issue with OneDrive, but it is worth checking to see if it works outside of a OneDrive folder. I'll have a look in the code and see if these paths are normalised before being passed to git.

    Yes you can remove the ifcmerge.exe from the git installation folder, the version in Bonsai is more up to date with some minor fixes.

  9. A

    @brunopostle said:

    @Armatura I don't know what the problem is, it shouldn't be an issue with OneDrive, but it is worth checking to see if it works outside of a OneDrive folder. I'll have a look in the code and see if these paths are normalised before being passed to git.

    Yes you can remove the ifcmerge.exe from the git installation folder, the version in Bonsai is more up to date with some minor fixes.

    I think trying another folder in C:\Users\....\Documents\ via the Bonsai UI initial commit was one of the first things I tried while troubleshooting, and it throws the same error.

    The fact that it works fine with a fresh IFC project made from the "IFC4 Demo Template" points towards my IFC file having issues, but how can it then affect the Absolute/Relative path interpretation of Bonsai UI Git is beyond me.

  10. A

    And just like that, after purging the unused types & profiles, as well as moving all the objects to correct collections (Some objects were assigned to some random collection) in the Outliner, the Git started to work. I was able to Create the Repo, add the IFC file to it and commit it without any errors.

  11. B
    ValueError: Absolute path 'C:/Users/Marius/OneDrive/_Renovation/IFCs/Kantershof_386_FIXED_Copy.ifc' is not in git repository at 'C:\\Users\\Marius\\OneDrive\\_Renovation\\IFCs'

    Somehow, and I don't know how, this means that blender has supplied the file path with / folder separators when it should everywhere be \\ on Windows. Can you remember how you got the IFC file in Bonsai? was it double-clicking on an IFC file? the File > Open menu? or creating a new file and saving it?

  12. A

    @brunopostle said:

    ValueError: Absolute path 'C:/Users/Marius/OneDrive/_Renovation/IFCs/Kantershof_386_FIXED_Copy.ifc' is not in git repository at 'C:\\Users\\Marius\\OneDrive\\_Renovation\\IFCs'

    Somehow, and I don't know how, this means that blender has supplied the file path with / folder separators when it should everywhere be \\ on Windows. Can you remember how you got the IFC file in Bonsai? was it double-clicking on an IFC file? the File > Open menu? or creating a new file and saving it?

    I always get confused with these directory/path slash/backslash conventions for different OSs. But you are right, the path should be with "\" instead of "/" in Project Info IFC file path field, and then Bonsai Git UI works without a glitch. Still seems like some bug that Blender initially loads the IFC file path with "\".

  13. B

    Thanks, so if you open from the Recent Files list, the path is stored with / separators (which is wrong on Windows), but if you use File Open then it uses \\ (which is correct on Windows).

  14. A

    @brunopostle said:

    Thanks, so if you open from the Recent Files list, the path is stored with / separators (which is wrong on Windows), but if you use File Open then it uses \\ (which is correct on Windows).

    Not really.

    Opening the IFC file via File -> Open IFC Project or File -> Open Recent IFC Project results in / separators.

    Only when one loads the IFC file via the Bonsai UI Project Info directory field, does the separators switch to \ and allow Bonsai Git UI to add the IFC project file into to the Repo. You can see this moment, when the in the / switches to \ in GIF screen recording above.

  1. Page 1
  2. 2
  3. 3
  4. 4
  5. 5

Login or Register to reply.