Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions io_mesh_3mf/export_3mf.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ class Export3MF(bpy.types.Operator, bpy_extras.io_utils.ExportHelper):
min=0,
max=12)

def __init__(self):
def __init__(self, *args, **kwargs):
"""
Initialize some fields with defaults before starting.
"""
super().__init__()
super().__init__(*args, **kwargs)
self.next_resource_id = 1 # Which resource ID to generate for the next object.
self.num_written = 0 # How many objects we've written to the file.
self.material_resource_id = -1 # We write one material. This is the resource ID of that material.
Expand Down
4 changes: 2 additions & 2 deletions io_mesh_3mf/import_3mf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ class Import3MF(bpy.types.Operator, bpy_extras.io_utils.ImportHelper):
directory: bpy.props.StringProperty(subtype='DIR_PATH')
global_scale: bpy.props.FloatProperty(name="Scale", default=1.0, soft_min=0.001, soft_max=1000.0, min=1e-6, max=1e6)

def __init__(self):
def __init__(self, *args, **kwargs):
"""
Initializes the importer with empty fields.
"""
super().__init__()
super().__init__(*args, **kwargs)
self.resource_objects = {} # Dictionary mapping resource IDs to ResourceObjects.

# Dictionary mapping resource IDs to dictionaries mapping indexes to ResourceMaterial objects.
Expand Down
2 changes: 1 addition & 1 deletion io_mesh_3mf/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def store(self, blender_object):
name = metadata_entry.name
value = metadata_entry.value
if name == "Title": # Has a built-in ID property for objects as well as scenes.
blender_object.name = value if value is not None else ""
blender_object.name = value if value else ""
elif name == "3mf:partnumber":
# Special case: This is always a string and doesn't need the preserve attribute. We can simplify this to
# make it easier to edit.
Expand Down