Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weekly updates #5

Merged
merged 13 commits into from
Sep 12, 2022
Prev Previous commit
Next Next commit
small fix
  • Loading branch information
losanc committed Aug 28, 2022
commit 2d98a27a07bb2d4487662831e69c78fdaff064ee
8 changes: 6 additions & 2 deletions bseq/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
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
from .properties import BSEQ_scene_property, BSEQ_obj_property,BSEQ_mesh_property
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
from .properties import BSEQ_scene_property, BSEQ_obj_property, BSEQ_mesh_property
from .panels import BSEQ_UL_Obj_List, BSEQ_List_Panel, BSEQ_Settings, BSEQ_Import, BSEQ_Templates, BSEQ_UL_Att_List, draw_template
from .messenger import subscribe_to_selected, unsubscribe_to_selected
import bpy
from bpy.app.handlers import persistent
from .importer import update_obj
from datetime import datetime
import os


def print_information(scene):
Expand All @@ -14,6 +15,9 @@ def print_information(scene):
now = datetime.now()
path = bpy.context.scene.render.filepath
path = bpy.path.abspath(path)
if not os.path.isdir(path):
# by default, path is '/tmp', and it does not exist on windows system
return
filepath = path + '/bseq_' + now.strftime("%Y-%m-%d_%H-%M")
with open(filepath, 'w') as file:
file.write("Render Time: {}\n".format(now.strftime("%Y-%m-%d_%H-%M")))
Expand Down
4 changes: 2 additions & 2 deletions bseq/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,14 @@ def create_obj(fileseq, use_relaitve, transform_matrix=Matrix([[1, 0, 0, 0], [0,


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

for obj in bpy.data.objects:
if obj.BSEQ.init == False:
continue
if obj.BSEQ.enabled == False:
continue
if obj.mode != "OBJECT":
continue

current_frame = obj.BSEQ.frame
meshio_mesh = None
Expand Down