示例#1
0
def load_all_panels(addon_prefs=None, first_time=False):
    mmvt = sys.modules[__name__]
    # check_empty_subject_version()
    # fix_cortex_labels_material()
    for panel in get_panels(first_time):
        if panel is freeview_panel:
            panel.init(mmvt, addon_prefs)
        else:
            now = time.time()
            panel.init(mmvt)
            print('{} took {:.5f}s to initialize'.format(
                panel.__name__,
                time.time() - now))
    if bpy.data.objects.get('rh'):
        split_view(0)
        split_view(0)
        fix_scale()
    show_activity()
    show_pial()
    # view_all()
    # show_electrodes(False)
    # show_hide_connections(False)
    # show_activity(False)
    mmvt_utils.select_layer(BRAIN_EMPTY_LAYER, False)
    mmvt_utils.unfilter_graph_editor()
    lock_colorbar_values(False)
    for hemi in ['lh', 'rh']:
        if bpy.data.objects.get(hemi):
            bpy.data.objects[hemi].hide = True
            bpy.data.objects[hemi].hide_render = True
    set_colorbar_defaults()
    mmvt_utils.center_view()
    mmvt_utils.select_time_range(0, bpy.context.scene.maximal_time_steps)
示例#2
0
 def invoke(self, context, event=None):
     context.scene.filter_to = bpy.context.scene.frame_current
     mu.select_time_range(t_end=context.scene.frame_current)
     return {"FINISHED"}
示例#3
0
def filter_from_to_update(self=None, context=None):
    mu.select_time_range(t_start=bpy.context.scene.filter_from)
    mu.select_time_range(t_end=bpy.context.scene.filter_to)