additional changes

This commit is contained in:
Julian Daube 2020-04-18 11:37:47 +02:00
parent 1cf790d1d0
commit a79b06e577
2 changed files with 24 additions and 15 deletions

View File

@ -26,15 +26,14 @@ from bpy.props import (
from bpy_extras.io_utils import (
ImportHelper,
ExportHelper,
orientation_helper_factory,
path_reference_mode,
axis_conversion,
)
IOOBJOrientationHelper = orientation_helper_factory("IOOBJOrientationHelper", axis_forward='-Z', axis_up='Y')
IGDSOrientationHelper = orientation_helper_factory("IGDSOrientationHelper", axis_forward='-Z', axis_up='Y')
class ImportGDS(bpy.types.Operator, ImportHelper, IOOBJOrientationHelper):
class ImportGDS(bpy.types.Operator, ImportHelper, IGDSOrientationHelper):
"""Load a GDSII File"""
bl_idname = "import_scene.gds"
bl_label = "Import GDSII"
@ -96,16 +95,27 @@ class ImportGDS(bpy.types.Operator, ImportHelper, IOOBJOrientationHelper):
# default=0.0,
# )
top_cell_name = StringProperty(
name="Top Cell Name",
#descriptionn="When set, only import the structure with that name",
default="",
gds_file = StringProperty(
name="gds file",
subtype="FILE_PATH"
)
top_cell_name = StringProperty(
name="Top Cell Name",
#descriptionn="When set, only import the structure with that name",
default="",
)
layer_definition = StringProperty(
name="Layer Def",
#descriptionn="When set, only import the structure with that name",
subtype="FILE_PATH"
)
def execute(self, context):
# print("Selected: " + context.active_object.name)
from . import import_gds
from . import gds
from . import pygds as gds
# ignore axis helper arguments
keywords = self.as_keywords(ignore=("axis_forward",
@ -138,10 +148,12 @@ class ImportGDS(bpy.types.Operator, ImportHelper, IOOBJOrientationHelper):
def draw(self, context):
layout = self.layout
box = layout.box()
box.row().prop(self, "gds_file")
box.row().prop(self, "top_cell_name")
row = layout.row()
row.prop(self, "top_cell_name")
row.prop(self, "layer_definition")
# row = layout.row(align=True)
# row.prop(self, "use_smooth_groups")

View File

@ -1,10 +1,7 @@
from . import gds
from . import pygds as gds
from concurrent.futures import ThreadPoolExecutor
import importlib
if "gds" in locals():
gds = importlib.reload(gds)
import pathlib
import bpy
from bpy_extras.wm_utils.progress_report import ProgressReport