From 72dae8e9ad2994d2b0db1b5ddbc0695d46b28735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Perdig=C3=A3o?= Date: Sat, 22 Apr 2023 20:58:06 -0300 Subject: [PATCH] applyed the patch by Bruno Postle --- .../blenderbim/bim/module/ifcgit/__init__.py | 18 ++++++------- .../blenderbim/bim/module/ifcgit/operator.py | 25 ++++++++----------- .../blenderbim/bim/module/ifcgit/prop.py | 2 +- .../blenderbim/bim/module/ifcgit/ui.py | 2 +- src/blenderbim/blenderbim/tool/__init__.py | 2 ++ 5 files changed, 23 insertions(+), 26 deletions(-) diff --git a/src/blenderbim/blenderbim/bim/module/ifcgit/__init__.py b/src/blenderbim/blenderbim/bim/module/ifcgit/__init__.py index d90dbee43a..cea1660c64 100644 --- a/src/blenderbim/blenderbim/bim/module/ifcgit/__init__.py +++ b/src/blenderbim/blenderbim/bim/module/ifcgit/__init__.py @@ -33,15 +33,15 @@ from . import ui, prop, operator # } classes = ( - operators.AddFileToRepo, - operators.CommitChanges, - operators.CreateRepo, - operators.DiscardUncommitted, - operators.DisplayRevision, - operators.DisplayUncommitted, - operators.Merge, - operators.RefreshGit, - operators.SwitchRevision, + operator.AddFileToRepo, + operator.CommitChanges, + operator.CreateRepo, + operator.DiscardUncommitted, + operator.DisplayRevision, + operator.DisplayUncommitted, + operator.Merge, + operator.RefreshGit, + operator.SwitchRevision, prop.IfcGitListItem, prop.IfcGitProperties, ui.IFCGIT_PT_panel, diff --git a/src/blenderbim/blenderbim/bim/module/ifcgit/operator.py b/src/blenderbim/blenderbim/bim/module/ifcgit/operator.py index 279eeabff4..3d7cb1ee90 100644 --- a/src/blenderbim/blenderbim/bim/module/ifcgit/operator.py +++ b/src/blenderbim/blenderbim/bim/module/ifcgit/operator.py @@ -3,12 +3,7 @@ import re import bpy import blenderbim.core.ifcgit as core import blenderbim.tool as tool -# from tool import IfcGit as tool -from data import IfcGitData - -# import handler - -# import blenderbim.tool as tool +from blenderbim.bim.module.ifcgit.data import IfcGitData, refresh class CreateRepo(bpy.types.Operator): @@ -34,7 +29,7 @@ class CreateRepo(bpy.types.Operator): def execute(self, context): core.create_repo(tool.IfcGit, tool.Ifc) - handler.refresh_ui_data() + refresh() return {"FINISHED"} @@ -58,7 +53,7 @@ class AddFileToRepo(bpy.types.Operator): def execute(self, context): core.add_file(tool.IfcGit, tool.Ifc) - handler.refresh_ui_data() + refresh() return {"FINISHED"} @@ -72,7 +67,7 @@ class DiscardUncommitted(bpy.types.Operator): def execute(self, context): core.discard_uncomitted(tool.IfcGit, tool.Ifc) - handler.refresh_ui_data() + refresh() return {"FINISHED"} @@ -107,7 +102,7 @@ class CommitChanges(bpy.types.Operator): repo = IfcGitData.data["repo"] core.commit_changes(tool.IfcGit, tool.Ifc, repo, context) - handler.refresh_ui_data() + refresh() return {"FINISHED"} @@ -129,7 +124,7 @@ class RefreshGit(bpy.types.Operator): repo = IfcGitData.data["repo"] core.refresh_revision_list(tool.IfcGit, repo, tool.Ifc) - handler.refresh_ui_data() + refresh() return {"FINISHED"} @@ -143,7 +138,7 @@ class DisplayRevision(bpy.types.Operator): def execute(self, context): core.colourise_revision(tool.IfcGit, context) - handler.refresh_ui_data() + refresh() return {"FINISHED"} @@ -158,7 +153,7 @@ class DisplayUncommitted(bpy.types.Operator): repo = IfcGitData.data["repo"] core.colourise_uncommitted(tool.IfcGit, tool.Ifc, repo) - handler.refresh_ui_data() + refresh() return {"FINISHED"} @@ -172,7 +167,7 @@ class SwitchRevision(bpy.types.Operator): def execute(self, context): core.switch_revision(tool.IfcGit, tool.Ifc) - handler.refresh_ui_data() + refresh() return {"FINISHED"} @@ -192,7 +187,7 @@ class Merge(bpy.types.Operator): def execute(self, context): if core.merge_branch(tool.IfcGit, tool.Ifc, self): - handler.refresh_ui_data() + refresh() return {"FINISHED"} else: return {"CANCELLED"} diff --git a/src/blenderbim/blenderbim/bim/module/ifcgit/prop.py b/src/blenderbim/blenderbim/bim/module/ifcgit/prop.py index 551933fdbe..bbee8084c9 100644 --- a/src/blenderbim/blenderbim/bim/module/ifcgit/prop.py +++ b/src/blenderbim/blenderbim/bim/module/ifcgit/prop.py @@ -7,7 +7,7 @@ from bpy.props import ( IntProperty, EnumProperty, ) -from data import IfcGitData +from blenderbim.bim.module.ifcgit.data import IfcGitData, refresh def git_branches(self, context): diff --git a/src/blenderbim/blenderbim/bim/module/ifcgit/ui.py b/src/blenderbim/blenderbim/bim/module/ifcgit/ui.py index 690f2f2c64..35a289f338 100644 --- a/src/blenderbim/blenderbim/bim/module/ifcgit/ui.py +++ b/src/blenderbim/blenderbim/bim/module/ifcgit/ui.py @@ -1,6 +1,6 @@ import bpy import time -from data import IfcGitData +from blenderbim.bim.module.ifcgit.data import IfcGitData, refresh class IFCGIT_PT_panel(bpy.types.Panel): diff --git a/src/blenderbim/blenderbim/tool/__init__.py b/src/blenderbim/blenderbim/tool/__init__.py index 5ccefb71be..118f61a047 100644 --- a/src/blenderbim/blenderbim/tool/__init__.py +++ b/src/blenderbim/blenderbim/tool/__init__.py @@ -30,6 +30,8 @@ from blenderbim.tool.drawing import Drawing from blenderbim.tool.geometry import Geometry from blenderbim.tool.georeference import Georeference from blenderbim.tool.ifc import Ifc +from blenderbim.tool.ifcgit import IfcGit +from blenderbim.tool.ifcgit import IfcGitRepo from blenderbim.tool.library import Library from blenderbim.tool.loader import Loader from blenderbim.tool.material import Material