-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from banodoco/green-head
Green head
- Loading branch information
Showing
29 changed files
with
661 additions
and
446 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import streamlit as st | ||
from ui_components.widgets.shot_view import shot_keyframe_element | ||
from ui_components.components.explorer_page import gallery_image_view | ||
from ui_components.components.explorer_page import generate_images_element | ||
from ui_components.widgets.frame_selector import frame_selector_widget, frame_view | ||
from utils import st_memory | ||
from utils.data_repo.data_repo import DataRepo | ||
|
||
|
||
|
||
def adjust_shot_page(shot_uuid: str, h2): | ||
data_repo = DataRepo() | ||
shot = data_repo.get_shot_from_uuid(shot_uuid) | ||
|
||
with h2: | ||
frame_selector_widget(show=['shot_selector']) | ||
|
||
st.markdown(f"#### :red[{st.session_state['main_view_type']}] > :green[{st.session_state['page']}] > :orange[{shot.name}]") | ||
|
||
st.markdown("***") | ||
|
||
with st.sidebar: | ||
frame_view(view='Video') | ||
|
||
shot_keyframe_element(st.session_state["shot_uuid"], 4, position="Individual") | ||
# with st.expander("📋 Explorer Shortlist",expanded=True): | ||
shot_explorer_view = st_memory.menu('',["Shortlist", "Explore"], | ||
icons=['grid-3x3','airplane'], | ||
menu_icon="cast", | ||
default_index=st.session_state.get('shot_explorer_view', 0), | ||
key="shot_explorer_view", orientation="horizontal", | ||
styles={"nav-link": {"font-size": "15px", "margin": "0px", "--hover-color": "#eee"}, "nav-link-selected": {"background-color": "#868c91"}}) | ||
|
||
st.markdown("***") | ||
|
||
if shot_explorer_view == "Shortlist": | ||
project_setting = data_repo.get_project_setting(shot.project.uuid) | ||
page_number = st.radio("Select page:", options=range(1, project_setting.total_shortlist_gallery_pages + 1), horizontal=True) | ||
st.markdown("***") | ||
gallery_image_view(shot.project.uuid, page_number=page_number, num_items_per_page=8, open_detailed_view_for_all=False, shortlist=True, num_columns=4,view="individual_shot", shot=shot) | ||
elif shot_explorer_view == "Explore": | ||
project_setting = data_repo.get_project_setting(shot.project.uuid) | ||
page_number = st.radio("Select page:", options=range(1, project_setting.total_shortlist_gallery_pages + 1), horizontal=True) | ||
generate_images_element(position='explorer', project_uuid=shot.project.uuid, timing_uuid=st.session_state['current_frame_uuid']) | ||
st.markdown("***") | ||
gallery_image_view(shot.project.uuid, page_number=page_number, num_items_per_page=8, open_detailed_view_for_all=False, shortlist=False, num_columns=4,view="individual_shot", shot=shot) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import streamlit as st | ||
from ui_components.widgets.frame_selector import frame_selector_widget, frame_view | ||
from ui_components.widgets.variant_comparison_grid import variant_comparison_grid | ||
from ui_components.widgets.animation_style_element import animation_style_element | ||
from utils.data_repo.data_repo import DataRepo | ||
|
||
def animate_shot_page(shot_uuid: str, h2): | ||
data_repo = DataRepo() | ||
shot = data_repo.get_shot_from_uuid(shot_uuid) | ||
|
||
with h2: | ||
frame_selector_widget(show=['shot_selector']) | ||
with st.sidebar: | ||
frame_view() | ||
|
||
st.markdown(f"#### :red[{st.session_state['main_view_type']}] > :green[{st.session_state['page']}] > :orange[{shot.name}]") | ||
st.markdown("***") | ||
variant_comparison_grid(st.session_state['shot_uuid'], stage="Shots") | ||
with st.expander("🎬 Choose Animation Style & Create Variants", expanded=True): | ||
animation_style_element(st.session_state['shot_uuid']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.