fix(main): Add render stage for non-headline sources
This commit is contained in:
@@ -84,6 +84,7 @@ def run_pipeline_mode_direct():
|
|||||||
--pipeline-ui: Enable UI panel (BorderMode.UI)
|
--pipeline-ui: Enable UI panel (BorderMode.UI)
|
||||||
--pipeline-border <mode>: off, simple, ui
|
--pipeline-border <mode>: off, simple, ui
|
||||||
"""
|
"""
|
||||||
|
import engine.effects.plugins as effects_plugins
|
||||||
from engine.camera import Camera
|
from engine.camera import Camera
|
||||||
from engine.data_sources.pipeline_introspection import PipelineIntrospectionSource
|
from engine.data_sources.pipeline_introspection import PipelineIntrospectionSource
|
||||||
from engine.data_sources.sources import EmptyDataSource, ListDataSource
|
from engine.data_sources.sources import EmptyDataSource, ListDataSource
|
||||||
@@ -92,6 +93,9 @@ def run_pipeline_mode_direct():
|
|||||||
ViewportFilterStage,
|
ViewportFilterStage,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Discover and register all effect plugins
|
||||||
|
effects_plugins.discover_plugins()
|
||||||
|
|
||||||
# Parse CLI arguments
|
# Parse CLI arguments
|
||||||
source_name = None
|
source_name = None
|
||||||
effect_names = []
|
effect_names = []
|
||||||
@@ -285,6 +289,11 @@ def run_pipeline_mode_direct():
|
|||||||
"viewport_filter", ViewportFilterStage(name="viewport-filter")
|
"viewport_filter", ViewportFilterStage(name="viewport-filter")
|
||||||
)
|
)
|
||||||
pipeline.add_stage("font", FontStage(name="font"))
|
pipeline.add_stage("font", FontStage(name="font"))
|
||||||
|
else:
|
||||||
|
# Fallback to simple conversion for other sources
|
||||||
|
from engine.pipeline.adapters import SourceItemsToBufferStage
|
||||||
|
|
||||||
|
pipeline.add_stage("render", SourceItemsToBufferStage(name="items-to-buffer"))
|
||||||
|
|
||||||
# Add camera
|
# Add camera
|
||||||
speed = getattr(params, "camera_speed", 1.0)
|
speed = getattr(params, "camera_speed", 1.0)
|
||||||
@@ -394,7 +403,8 @@ def run_pipeline_mode_direct():
|
|||||||
|
|
||||||
result = pipeline.execute(source_items)
|
result = pipeline.execute(source_items)
|
||||||
if not result.success:
|
if not result.success:
|
||||||
print(" \033[38;5;196mPipeline execution failed\033[0m")
|
error_msg = f" ({result.error})" if result.error else ""
|
||||||
|
print(f" \033[38;5;196mPipeline execution failed{error_msg}\033[0m")
|
||||||
break
|
break
|
||||||
|
|
||||||
# Render with UI panel
|
# Render with UI panel
|
||||||
|
|||||||
Reference in New Issue
Block a user