updated structure
This commit is contained in:
@@ -172,15 +172,19 @@ class CreateAnimationScreen(Screen):
|
||||
self.manager.current = "pause_edit"
|
||||
|
||||
def generate_3d_video(self):
|
||||
"""Generate a 3D video animation similar to Relive"""
|
||||
# Show processing popup
|
||||
"""Show video generation mode selection popup"""
|
||||
self.show_video_generation_options()
|
||||
|
||||
def generate_3d_video_test_mode(self):
|
||||
"""Generate a 3D video animation in 720p test mode for faster processing"""
|
||||
# Show processing popup with test mode indication
|
||||
layout = BoxLayout(orientation='vertical', spacing=10, padding=10)
|
||||
label = Label(text="Preparing 3D video generation...")
|
||||
label = Label(text="Preparing 720p test video generation...")
|
||||
progress = ProgressBar(max=100, value=0)
|
||||
layout.add_widget(label)
|
||||
layout.add_widget(progress)
|
||||
popup = Popup(
|
||||
title="Generating 3D Video Animation",
|
||||
title="Generating 3D Video Animation (720p Test Mode)",
|
||||
content=layout,
|
||||
size_hint=(0.9, None),
|
||||
size=(0, 200),
|
||||
@@ -188,7 +192,7 @@ class CreateAnimationScreen(Screen):
|
||||
)
|
||||
popup.open()
|
||||
|
||||
# Schedule the 3D video generation
|
||||
# Schedule the 3D video generation in test mode
|
||||
Clock.schedule_once(
|
||||
lambda dt: generate_3d_video_animation(
|
||||
self.project_name,
|
||||
@@ -196,8 +200,156 @@ class CreateAnimationScreen(Screen):
|
||||
label,
|
||||
progress,
|
||||
popup,
|
||||
Clock
|
||||
Clock,
|
||||
test_mode=True # Enable test mode
|
||||
),
|
||||
0.5
|
||||
)
|
||||
|
||||
def generate_3d_video_production_mode(self):
|
||||
"""Generate a 3D video animation in 2K production mode for high quality"""
|
||||
# Show processing popup with production mode indication
|
||||
layout = BoxLayout(orientation='vertical', spacing=10, padding=10)
|
||||
label = Label(text="Preparing 2K production video generation...")
|
||||
progress = ProgressBar(max=100, value=0)
|
||||
layout.add_widget(label)
|
||||
layout.add_widget(progress)
|
||||
popup = Popup(
|
||||
title="Generating 3D Video Animation (2K Production Mode)",
|
||||
content=layout,
|
||||
size_hint=(0.9, None),
|
||||
size=(0, 200),
|
||||
auto_dismiss=False
|
||||
)
|
||||
popup.open()
|
||||
|
||||
# Schedule the 3D video generation in production mode
|
||||
Clock.schedule_once(
|
||||
lambda dt: generate_3d_video_animation(
|
||||
self.project_name,
|
||||
RESOURCES_FOLDER,
|
||||
label,
|
||||
progress,
|
||||
popup,
|
||||
Clock,
|
||||
test_mode=False # Disable test mode for production
|
||||
),
|
||||
0.5
|
||||
)
|
||||
|
||||
def show_video_generation_options(self):
|
||||
"""Show popup with video generation mode options"""
|
||||
from kivy.uix.popup import Popup
|
||||
from kivy.uix.boxlayout import BoxLayout
|
||||
from kivy.uix.button import Button
|
||||
from kivy.uix.label import Label
|
||||
|
||||
layout = BoxLayout(orientation='vertical', spacing=15, padding=15)
|
||||
|
||||
# Title
|
||||
title_label = Label(
|
||||
text="Choose Video Generation Mode",
|
||||
font_size=18,
|
||||
size_hint_y=None,
|
||||
height=40,
|
||||
color=(1, 1, 1, 1)
|
||||
)
|
||||
layout.add_widget(title_label)
|
||||
|
||||
# Test mode description
|
||||
test_layout = BoxLayout(orientation='vertical', spacing=5)
|
||||
test_title = Label(
|
||||
text="🏃♂️ 720p Test Mode (Fast)",
|
||||
font_size=16,
|
||||
size_hint_y=None,
|
||||
height=30,
|
||||
color=(0.2, 0.8, 0.2, 1)
|
||||
)
|
||||
test_desc = Label(
|
||||
text="• Resolution: 1280x720\n• Frame rate: 30 FPS\n• ~3x faster generation\n• Perfect for quick previews",
|
||||
font_size=12,
|
||||
size_hint_y=None,
|
||||
height=80,
|
||||
color=(0.9, 0.9, 0.9, 1),
|
||||
halign="left",
|
||||
valign="middle"
|
||||
)
|
||||
test_desc.text_size = (None, None)
|
||||
test_layout.add_widget(test_title)
|
||||
test_layout.add_widget(test_desc)
|
||||
layout.add_widget(test_layout)
|
||||
|
||||
# Test mode button
|
||||
test_btn = Button(
|
||||
text="Generate 720p Test Video",
|
||||
background_color=(0.2, 0.8, 0.2, 1),
|
||||
size_hint_y=None,
|
||||
height=50,
|
||||
font_size=14
|
||||
)
|
||||
layout.add_widget(test_btn)
|
||||
|
||||
# Production mode description
|
||||
prod_layout = BoxLayout(orientation='vertical', spacing=5)
|
||||
prod_title = Label(
|
||||
text="🎯 2K Production Mode (High Quality)",
|
||||
font_size=16,
|
||||
size_hint_y=None,
|
||||
height=30,
|
||||
color=(0.8, 0.2, 0.2, 1)
|
||||
)
|
||||
prod_desc = Label(
|
||||
text="• Resolution: 2560x1440\n• Frame rate: 60 FPS\n• Cinema-quality results\n• Ultra-detailed visuals",
|
||||
font_size=12,
|
||||
size_hint_y=None,
|
||||
height=80,
|
||||
color=(0.9, 0.9, 0.9, 1),
|
||||
halign="left",
|
||||
valign="middle"
|
||||
)
|
||||
prod_desc.text_size = (None, None)
|
||||
prod_layout.add_widget(prod_title)
|
||||
prod_layout.add_widget(prod_desc)
|
||||
layout.add_widget(prod_layout)
|
||||
|
||||
# Production mode button
|
||||
prod_btn = Button(
|
||||
text="Generate 2K Production Video",
|
||||
background_color=(0.8, 0.2, 0.2, 1),
|
||||
size_hint_y=None,
|
||||
height=50,
|
||||
font_size=14
|
||||
)
|
||||
layout.add_widget(prod_btn)
|
||||
|
||||
# Cancel button
|
||||
cancel_btn = Button(
|
||||
text="Cancel",
|
||||
background_color=(0.5, 0.5, 0.5, 1),
|
||||
size_hint_y=None,
|
||||
height=40,
|
||||
font_size=12
|
||||
)
|
||||
layout.add_widget(cancel_btn)
|
||||
|
||||
popup = Popup(
|
||||
title="Select Video Generation Mode",
|
||||
content=layout,
|
||||
size_hint=(0.9, 0.8),
|
||||
auto_dismiss=False
|
||||
)
|
||||
|
||||
def start_test_mode(instance):
|
||||
popup.dismiss()
|
||||
self.generate_3d_video_test_mode()
|
||||
|
||||
def start_production_mode(instance):
|
||||
popup.dismiss()
|
||||
self.generate_3d_video_production_mode()
|
||||
|
||||
test_btn.bind(on_press=start_test_mode)
|
||||
prod_btn.bind(on_press=start_production_mode)
|
||||
cancel_btn.bind(on_press=lambda x: popup.dismiss())
|
||||
|
||||
popup.open()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user