@@ -215,7 +215,6 @@ def cancel_callback(self, sender, app_data):
215215track_patch_file = TrackPatchfile ()
216216render_patch_file = RenderPatchFile ()
217217
218-
219218# Helpers
220219def get_next_free_marker_num ():
221220 """Get the next marker number in the series"""
@@ -440,32 +439,38 @@ def open_documentation():
440439dpg .setup_dearpygui ()
441440dpg .show_viewport ()
442441
443- while dpg .is_dearpygui_running ():
444-
445- # REACTIVE VARIABLES
446- markers = copy .copy (resolve .active_timeline .markers )
447- frame_rate = copy .copy (resolve .active_timeline .settings .frame_rate )
448- current_timecode = copy .copy (resolve .active_timeline .timecode )
449442
450- # SIMPLE
451- resolve . active_timeline . custom_settings ( True )
452-
443+ in_half_sec = dpg . get_total_time ()
444+ while dpg . is_dearpygui_running ():
445+ tf = dpg . get_total_time ()
453446
454- # TODO: Check Resolve is open, lock up whole interface with warning otherwise
455- # No option to dismiss dialog box. Automatically dismiss box when Resolve is opened
447+ dpg .render_dearpygui_frame ()
456448
457- # TODO: Check timeline is open, lock up whole interface with warning otherwise
458- # No option to dismiss dialog box. Automatically dismiss box when timeline is opened
449+ # EVERY HALF SECOND
450+ if (tf - in_half_sec ) > 1 :
451+ in_half_sec = tf
459452
460- # TODO: Check timeline is same as tracked timeline, disable changes page
461- # On each timeline change, ensure custom settings are enabled. Make it so.
453+ # REFRESH API GLOBALS
454+ markers = copy .copy (resolve .active_timeline .markers )
455+ frame_rate = copy .copy (resolve .active_timeline .settings .frame_rate )
456+ current_timecode = copy .copy (resolve .active_timeline .timecode )
462457
463- routines .check_timecode_starts_at_zero (current_timecode , frame_rate )
464- routines .refresh_add_status (markers , current_timecode , frame_rate )
465- routines .refresh_commit_status (markers )
458+ # SIMPLE
459+ resolve .active_timeline .custom_settings (True )
466460
467- dpg .render_dearpygui_frame ()
461+ # TODO: Check Resolve is open, lock up whole interface with warning otherwise
462+ # No option to dismiss dialog box. Automatically dismiss box when Resolve is opened
463+
464+ # TODO: Check timeline is open, lock up whole interface with warning otherwise
465+ # No option to dismiss dialog box. Automatically dismiss box when timeline is opened
466+
467+ # TODO: Check timeline is same as tracked timeline, disable changes page
468+ # On each timeline change, ensure custom settings are enabled. Make it so.
469+
470+ routines .check_timecode_starts_at_zero (current_timecode , frame_rate )
471+ routines .refresh_add_status (markers , current_timecode , frame_rate )
472+ routines .refresh_commit_status (markers )
473+
468474
469- # TODO: Fix save init file
470475dpg .save_init_file (os .path .join (root_folder , "dpg.ini" ))
471476dpg .destroy_context ()
0 commit comments