Skip to content

Commit 2d98a27

Browse files
committed
small fix
1 parent 758e64e commit 2d98a27

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

bseq/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
from .operators import BSEQ_OT_load, BSEQ_OT_edit, BSEQ_OT_resetpt, BSEQ_OT_resetmesh, BSEQ_OT_resetins,BSEQ_OT_set_as_split_norm,BSEQ_OT_remove_split_norm,BSEQ_OT_disable_selected,BSEQ_OT_enable_selected,BSEQ_OT_refresh_seq
2-
from .properties import BSEQ_scene_property, BSEQ_obj_property,BSEQ_mesh_property
1+
from .operators import BSEQ_OT_load, BSEQ_OT_edit, BSEQ_OT_resetpt, BSEQ_OT_resetmesh, BSEQ_OT_resetins, BSEQ_OT_set_as_split_norm, BSEQ_OT_remove_split_norm, BSEQ_OT_disable_selected, BSEQ_OT_enable_selected, BSEQ_OT_refresh_seq
2+
from .properties import BSEQ_scene_property, BSEQ_obj_property, BSEQ_mesh_property
33
from .panels import BSEQ_UL_Obj_List, BSEQ_List_Panel, BSEQ_Settings, BSEQ_Import, BSEQ_Templates, BSEQ_UL_Att_List, draw_template
44
from .messenger import subscribe_to_selected, unsubscribe_to_selected
55
import bpy
66
from bpy.app.handlers import persistent
77
from .importer import update_obj
88
from datetime import datetime
9+
import os
910

1011

1112
def print_information(scene):
@@ -14,6 +15,9 @@ def print_information(scene):
1415
now = datetime.now()
1516
path = bpy.context.scene.render.filepath
1617
path = bpy.path.abspath(path)
18+
if not os.path.isdir(path):
19+
# by default, path is '/tmp', and it does not exist on windows system
20+
return
1721
filepath = path + '/bseq_' + now.strftime("%Y-%m-%d_%H-%M")
1822
with open(filepath, 'w') as file:
1923
file.write("Render Time: {}\n".format(now.strftime("%Y-%m-%d_%H-%M")))

bseq/importer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,14 @@ def create_obj(fileseq, use_relaitve, transform_matrix=Matrix([[1, 0, 0, 0], [0,
174174

175175

176176
def update_obj(scene, depsgraph=None):
177-
if bpy.context.active_object.mode != "OBJECT":
178-
return
179177

180178
for obj in bpy.data.objects:
181179
if obj.BSEQ.init == False:
182180
continue
183181
if obj.BSEQ.enabled == False:
184182
continue
183+
if obj.mode != "OBJECT":
184+
continue
185185

186186
current_frame = obj.BSEQ.frame
187187
meshio_mesh = None

0 commit comments

Comments
 (0)