This commit is contained in:
Andrej730
2026-04-10 18:02:44 +05:00
parent 80a9df8f52
commit 5a3160eb62
4 changed files with 19 additions and 57 deletions
@@ -201,15 +201,9 @@ class ExecuteIfcClash(bpy.types.Operator, ExportHelper):
"ALT+click to run a quick clash without selecting a file to save." "ALT+click to run a quick clash without selecting a file to save."
) )
filter_glob: bpy.props.StringProperty( filter_glob: bpy.props.StringProperty(default="*.bcf;*.json", options={"HIDDEN"})
default="*.bcf;*.json", options={"HIDDEN"} format: bpy.props.EnumProperty(name="Format", items=[(i, i, "") for i in ("bcf", "json")])
) filepath: bpy.props.StringProperty(subtype="FILE_PATH", options={"SKIP_SAVE"})
format: bpy.props.EnumProperty(
name="Format", items=[(i, i, "") for i in ("bcf", "json")]
)
filepath: bpy.props.StringProperty(
subtype="FILE_PATH", options={"SKIP_SAVE"}
)
quick_clash: bpy.props.BoolProperty( quick_clash: bpy.props.BoolProperty(
options={"SKIP_SAVE"}, options={"SKIP_SAVE"},
) )
@@ -3640,9 +3640,7 @@ class ToggleTargetView(bpy.types.Operator):
default=False, default=False,
options={"SKIP_SAVE"}, options={"SKIP_SAVE"},
) )
option: bpy.props.EnumProperty( option: bpy.props.EnumProperty(items=[(i, i, "") for i in get_args(ToggleOption)])
items=[(i, i, "") for i in get_args(ToggleOption)]
)
if TYPE_CHECKING: if TYPE_CHECKING:
target_view: str target_view: str
@@ -453,9 +453,7 @@ class MoveQuickFavoritesItem(bpy.types.Operator):
bl_label = "Move Quick Favorites Item" bl_label = "Move Quick Favorites Item"
bl_options = {"REGISTER", "UNDO"} bl_options = {"REGISTER", "UNDO"}
index: bpy.props.IntProperty() index: bpy.props.IntProperty()
direction: bpy.props.EnumProperty( direction: bpy.props.EnumProperty(items=[("UP", "Up", ""), ("DOWN", "Down", "")])
items=[("UP", "Up", ""), ("DOWN", "Down", "")]
)
if TYPE_CHECKING: if TYPE_CHECKING:
index: int index: int
@@ -86,9 +86,7 @@ class NewProject(bpy.types.Operator):
bl_label = "New Project" bl_label = "New Project"
bl_options = {"REGISTER", "UNDO"} bl_options = {"REGISTER", "UNDO"}
bl_description = "Start a new IFC project in a fresh session" bl_description = "Start a new IFC project in a fresh session"
preset: bpy.props.EnumProperty( preset: bpy.props.EnumProperty(items=[(i, i, "") for i in get_args(PresetType)])
items=[(i, i, "") for i in get_args(PresetType)]
)
if TYPE_CHECKING: if TYPE_CHECKING:
preset: PresetType preset: PresetType
@@ -178,13 +176,9 @@ class SelectLibraryFile(bpy.types.Operator, IFCFileSelector, ImportHelper):
bl_description = ( bl_description = (
"Select an IFC file that can be used as a library.\n\nALT+click to reload the current loaded library file." "Select an IFC file that can be used as a library.\n\nALT+click to reload the current loaded library file."
) )
filter_glob: bpy.props.StringProperty( filter_glob: bpy.props.StringProperty(default="*.ifc;*.ifczip;*.ifcxml", options={"HIDDEN"})
default="*.ifc;*.ifczip;*.ifcxml", options={"HIDDEN"}
)
append_all: bpy.props.BoolProperty(default=False) append_all: bpy.props.BoolProperty(default=False)
use_relative_path: bpy.props.BoolProperty( use_relative_path: bpy.props.BoolProperty(name="Use Relative Path", default=False)
name="Use Relative Path", default=False
)
if TYPE_CHECKING: if TYPE_CHECKING:
filter_glob: str filter_glob: str
@@ -602,9 +596,7 @@ class AppendLibraryElement(bpy.types.Operator, tool.Ifc.Operator):
) )
definition: bpy.props.IntProperty() definition: bpy.props.IntProperty()
prop_index: bpy.props.IntProperty() prop_index: bpy.props.IntProperty()
assume_unique_by_name: bpy.props.BoolProperty( assume_unique_by_name: bpy.props.BoolProperty(name="Assume Unique By Name", default=True, options={"SKIP_SAVE"})
name="Assume Unique By Name", default=True, options={"SKIP_SAVE"}
)
if TYPE_CHECKING: if TYPE_CHECKING:
definition: int definition: int
@@ -959,12 +951,8 @@ class LoadProject(bpy.types.Operator, IFCFileSelector, ImportHelper):
bl_label = "Load Project" bl_label = "Load Project"
bl_options = {"REGISTER", "UNDO"} bl_options = {"REGISTER", "UNDO"}
bl_description = "Load an existing IFC project" bl_description = "Load an existing IFC project"
filepath: bpy.props.StringProperty( filepath: bpy.props.StringProperty(subtype="FILE_PATH", options={"SKIP_SAVE"})
subtype="FILE_PATH", options={"SKIP_SAVE"} filter_glob: bpy.props.StringProperty(default="*.ifc;*.ifczip;*.ifcxml;*.ifcsqlite", options={"HIDDEN"})
)
filter_glob: bpy.props.StringProperty(
default="*.ifc;*.ifczip;*.ifcxml;*.ifcsqlite", options={"HIDDEN"}
)
is_advanced: bpy.props.BoolProperty( is_advanced: bpy.props.BoolProperty(
name="Enable Advanced Mode", name="Enable Advanced Mode",
description="Load IFC file with advanced settings. Checking this option will skip loading IFC file and will open advanced load settings", description="Load IFC file with advanced settings. Checking this option will skip loading IFC file and will open advanced load settings",
@@ -988,9 +976,7 @@ class LoadProject(bpy.types.Operator, IFCFileSelector, ImportHelper):
), ),
default=False, default=False,
) )
use_detailed_tooltip: bpy.props.BoolProperty( use_detailed_tooltip: bpy.props.BoolProperty(default=False, options={"HIDDEN"})
default=False, options={"HIDDEN"}
)
filename_ext = ".ifc" filename_ext = ".ifc"
if TYPE_CHECKING: if TYPE_CHECKING:
@@ -1882,21 +1868,11 @@ class ExportIFC(bpy.types.Operator, ExportHelper):
bl_options = {"REGISTER", "UNDO"} bl_options = {"REGISTER", "UNDO"}
filename_ext = ".ifc" filename_ext = ".ifc"
supported_filexts = (".ifc", ".ifczip", ".ifcjson") supported_filexts = (".ifc", ".ifczip", ".ifcjson")
filter_glob: bpy.props.StringProperty( filter_glob: bpy.props.StringProperty(default=";".join(f"*{ext}" for ext in supported_filexts), options={"HIDDEN"})
default=";".join(f"*{ext}" for ext in supported_filexts), options={"HIDDEN"} json_version: bpy.props.EnumProperty(items=[("4", "4", ""), ("5a", "5a", "")], name="IFC JSON Version")
) json_compact: bpy.props.BoolProperty(name="Export Compact IFCJSON", default=False)
json_version: bpy.props.EnumProperty( should_save_as: bpy.props.BoolProperty(name="Should Save As", default=False, options={"HIDDEN"})
items=[("4", "4", ""), ("5a", "5a", "")], name="IFC JSON Version" use_relative_path: bpy.props.BoolProperty(name="Use Relative Path", default=False)
)
json_compact: bpy.props.BoolProperty(
name="Export Compact IFCJSON", default=False
)
should_save_as: bpy.props.BoolProperty(
name="Should Save As", default=False, options={"HIDDEN"}
)
use_relative_path: bpy.props.BoolProperty(
name="Use Relative Path", default=False
)
if TYPE_CHECKING: if TYPE_CHECKING:
filter_glob: str filter_glob: str
@@ -2918,12 +2894,8 @@ class IFCFileHandlerOperator(bpy.types.Operator):
bl_label = "Import .ifc file" bl_label = "Import .ifc file"
bl_options = {"REGISTER", "UNDO", "INTERNAL"} bl_options = {"REGISTER", "UNDO", "INTERNAL"}
directory: bpy.props.StringProperty( directory: bpy.props.StringProperty(subtype="FILE_PATH", options={"SKIP_SAVE", "HIDDEN"})
subtype="FILE_PATH", options={"SKIP_SAVE", "HIDDEN"} files: bpy.props.CollectionProperty(type=bpy.types.OperatorFileListElement, options={"SKIP_SAVE", "HIDDEN"})
)
files: bpy.props.CollectionProperty(
type=bpy.types.OperatorFileListElement, options={"SKIP_SAVE", "HIDDEN"}
)
if TYPE_CHECKING: if TYPE_CHECKING:
directory: str directory: str