additional changes
This commit is contained in:
parent
1cf790d1d0
commit
a79b06e577
34
__init__.py
34
__init__.py
@ -26,15 +26,14 @@ from bpy.props import (
|
|||||||
|
|
||||||
from bpy_extras.io_utils import (
|
from bpy_extras.io_utils import (
|
||||||
ImportHelper,
|
ImportHelper,
|
||||||
ExportHelper,
|
|
||||||
orientation_helper_factory,
|
orientation_helper_factory,
|
||||||
path_reference_mode,
|
path_reference_mode,
|
||||||
axis_conversion,
|
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"""
|
"""Load a GDSII File"""
|
||||||
bl_idname = "import_scene.gds"
|
bl_idname = "import_scene.gds"
|
||||||
bl_label = "Import GDSII"
|
bl_label = "Import GDSII"
|
||||||
@ -96,16 +95,27 @@ class ImportGDS(bpy.types.Operator, ImportHelper, IOOBJOrientationHelper):
|
|||||||
# default=0.0,
|
# default=0.0,
|
||||||
# )
|
# )
|
||||||
|
|
||||||
top_cell_name = StringProperty(
|
gds_file = StringProperty(
|
||||||
name="Top Cell Name",
|
name="gds file",
|
||||||
#descriptionn="When set, only import the structure with that name",
|
subtype="FILE_PATH"
|
||||||
default="",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
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):
|
def execute(self, context):
|
||||||
# print("Selected: " + context.active_object.name)
|
# print("Selected: " + context.active_object.name)
|
||||||
from . import import_gds
|
from . import import_gds
|
||||||
from . import gds
|
from . import pygds as gds
|
||||||
|
|
||||||
# ignore axis helper arguments
|
# ignore axis helper arguments
|
||||||
keywords = self.as_keywords(ignore=("axis_forward",
|
keywords = self.as_keywords(ignore=("axis_forward",
|
||||||
@ -138,10 +148,12 @@ class ImportGDS(bpy.types.Operator, ImportHelper, IOOBJOrientationHelper):
|
|||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
box = layout.box()
|
||||||
|
box.row().prop(self, "gds_file")
|
||||||
|
box.row().prop(self, "top_cell_name")
|
||||||
|
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.prop(self, "top_cell_name")
|
row.prop(self, "layer_definition")
|
||||||
|
|
||||||
|
|
||||||
# row = layout.row(align=True)
|
# row = layout.row(align=True)
|
||||||
# row.prop(self, "use_smooth_groups")
|
# row.prop(self, "use_smooth_groups")
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
from . import gds
|
from . import pygds as gds
|
||||||
from concurrent.futures import ThreadPoolExecutor
|
from concurrent.futures import ThreadPoolExecutor
|
||||||
|
|
||||||
import importlib
|
import importlib
|
||||||
if "gds" in locals():
|
|
||||||
gds = importlib.reload(gds)
|
|
||||||
|
|
||||||
import pathlib
|
import pathlib
|
||||||
import bpy
|
import bpy
|
||||||
from bpy_extras.wm_utils.progress_report import ProgressReport
|
from bpy_extras.wm_utils.progress_report import ProgressReport
|
||||||
|
Loading…
Reference in New Issue
Block a user