Skip to content

Commit cc6b858

Browse files
committed
Uncommented seperate obj import
1 parent e8432eb commit cc6b858

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

bseq/importer.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,13 @@ def create_meshio_obj(filepath):
197197
bpy.ops.import_scene.obj(filepath=filepath)
198198
# Substract all previous items from the current items and print their names
199199
imported_objs = set(bpy.context.scene.objects) - objs
200-
print(", ".join(o.name for o in imported_objs))
201200

202201
# Check if the imported object worked correctly
203202
if len(imported_objs) == 1:
204203
obj = imported_objs.pop()
205204
else:
206205
show_message_box("Error when reading: " + filepath + ",\n" + traceback.format_exc(),
207-
"obj. Loading Error",
206+
"obj. Loading Error in create_meshio_obj",
208207
icon="ERROR")
209208
return
210209

@@ -235,14 +234,13 @@ def create_obj(fileseq, root_path, transform_matrix=Matrix([[1, 0, 0, 0], [0, 1,
235234
bpy.ops.import_scene.obj(filepath=filepath)
236235
# Substract all previous items from the current items and print their names
237236
imported_objs = set(bpy.context.scene.objects) - objs
238-
print(", ".join(o.name for o in imported_objs))
239237

240238
# Check if the imported object worked correctly
241239
if len(imported_objs) == 1:
242240
tmp_obj = imported_objs.pop()
243241
else:
244242
show_message_box("Error when reading: " + filepath + ",\n" + traceback.format_exc(),
245-
"obj. Loading Error",
243+
"obj. Loading Error in create_obj",
246244
icon="ERROR")
247245
return
248246

@@ -273,7 +271,6 @@ def create_obj(fileseq, root_path, transform_matrix=Matrix([[1, 0, 0, 0], [0, 1,
273271
object = bpy.data.objects.new(name, mesh)
274272

275273
# create the object
276-
print("File path: " + filepath)
277274
if bpy.path.is_subdir(filepath, bpy.path.abspath("//")):
278275
if root_path != "":
279276
object.BSEQ.pattern = bpy.path.relpath(str(fileseq), start=root_path)
@@ -327,25 +324,24 @@ def update_obj(scene, depsgraph=None):
327324
if pattern.endswith(".obj") and scene.BSEQ.use_blender_obj_import:
328325
filepath = fs[current_frame % len(fs)]
329326

330-
print("File path update: " + filepath)
331-
332327
# Save all current objects
333328
objs = set(scene.objects)
329+
334330
# Reload the object
335331
bpy.ops.import_scene.obj(filepath=filepath)
332+
336333
# Substract all previous items from the current items and print their names
337334
imported_objs = set(scene.objects) - objs
338-
print(", ".join(o.name for o in imported_objs))
339335

340336
# Check if the imported object worked correctly
341337
if len(imported_objs) == 1:
342338
new_tmp_obj = imported_objs.pop()
343339
else:
344340
show_message_box("Error when reading: " + filepath + ",\n" + traceback.format_exc(),
345-
"obj. Loading Error",
341+
"obj. Loading Error in update_obj",
346342
icon="ERROR")
347343
continue
348-
344+
349345
# Copy the data except for material
350346
if obj.data.materials:
351347
# assign to 1st material slot

0 commit comments

Comments
 (0)