Skip to content

Conversation

@yuto-trd
Copy link
Member

@yuto-trd yuto-trd commented Oct 21, 2025

Description

This PR implements Beutl.Engine.Property for drawing-related properties and performs the migration.

The conventional implementation using CoreProperty did not distinguish between editing data and drawing data. This PR enables separation of responsibilities as follows:

  • Editing data
    • Holds user-set properties and animations.
    • Can generate drawing data for any frame.
  • Drawing data
    • Data for drawing a specific frame.

@b-editor b-editor deleted a comment from claude bot Oct 21, 2025
@yuto-trd

This comment was marked as resolved.

@b-editor b-editor deleted a comment from claude bot Oct 22, 2025
@yuto-trd
Copy link
Member Author

yuto-trd commented Oct 23, 2025

  • RenderNodeのキャッシュ実装

@yuto-trd yuto-trd force-pushed the feat/migrate-new-property-api branch from fbd5704 to 97096b9 Compare October 25, 2025 16:01
@github-actions
Copy link
Contributor

The following TODO comments were found:

// TODO: System.Interactive.AsyncからSystem.Linq.Asyncが削除されれば、AsyncEnumerableを使った実装に戻す

// TODO: System.Interactive.AsyncからSystem.Linq.Asyncが削除されれば、AsyncEnumerableを使った実装に戻す

// TODO: System.Interactive.AsyncからSystem.Linq.Asyncが削除されれば、AsyncEnumerableを使った実装に戻す

// TODO: System.Interactive.AsyncからSystem.Linq.Asyncが削除されれば、AsyncEnumerableを使った実装に戻す

// TODO: JsonArrayに対応させる

// TODO: 不要になる予定

// TODO: Resource.UpdateでCubeを更新するようにする

// TODO: Limitがdefaultの場合、CalculateBoundsを使うようにする

// TODO: NodeTree
// NodesRegistrar.RegisterAll);

// TODO: UI側の物理的なサイズをもとに描画するように変更する

// TODO: NodeTree
// NodeTreeTabExtension.Instance,
// NodeTreeInputTabExtension.Instance,

// TODO: Colorプロパティにアニメーションが適用されている時の対応

// TODO: PathSegmentEditorViewModel に改名

// TODO: NodeTree
// else if (Data is NodeRegistry.RegistryItem regitem)
// {
// yield return (KnownLibraryItemFormats.Node, regitem.Type);
// }

// TODO: NodeTree
return Data is SingleTypeLibraryItem or MultipleTypeLibraryItem;// or NodeRegistry.RegistryItem;

// TODO: NodeTree
// else if (Data is NodeRegistry.RegistryItem regitem)
// {
// if (RegexHelper.IsMatch(regexes, regitem.Type.Name))
// {
// result += 75;
// }
// }

// TODO: Node
// IList<NodeRegistry.BaseRegistryItem> nodes = NodeRegistry.GetRegistered();
// Nodes = new List<LibraryItemViewModel>(nodes.Count);
// Nodes.AddRange(nodes.Select(x => LibraryItemViewModel.CreateFromNodeRegistryItem(x)));

// TODO: NodeTree
// private void OpenNodeTree_Click(object? sender, RoutedEventArgs e)
// {
// Element model = ViewModel.Model;
// EditViewModel context = ViewModel.Timeline.EditorContext;
// NodeTreeTabViewModel? nodeTree = context.FindToolTab<NodeTreeTabViewModel>(
// v => v.Element.Value == model || v.Element.Value == null);
// nodeTree ??= new NodeTreeTabViewModel(context);
// nodeTree.Element.Value = model;

// TODO: DrawableGroup以下のDrawableを拾った場合の対応

// TODO: DrawableGroup以下のDrawableを拾った場合の対応

// TODO: NodeTree
// [Test]
// public void Serialize()
// {
// BeutlApplication app = BeutlApplication.Current;
// var proj = new Project();
//
// proj.Save(Path.Combine(ArtifactProvider.GetArtifactDirectory(), $"0.bproj"));
// app.Project = proj;
//
// var scene = new Scene();
// scene.Save(Path.Combine(ArtifactProvider.GetArtifactDirectory(), $"0.scene"));
// proj.Items.Add(scene);
// var elm1 = new Element();
// elm1.Save(Path.Combine(ArtifactProvider.GetArtifactDirectory(), $"0.layer"));
// scene.AddChild(elm1).Do();
// elm1.Operation.Children.Add(new EllipseOperator());
// elm1.Operation.Children.Add(new DecorateOperator());
//
// var elm2 = new Element { ZIndex = 2 };
// elm2.Save(Path.Combine(ArtifactProvider.GetArtifactDirectory(), $"1.layer"));
// scene.AddChild(elm2).Do();
// var rectNode = new RectGeometryNode();
// var shapeNode = new GeometryShapeNode();
// var outNode = new LayerOutputNode();
// elm2.NodeTree.Nodes.Add(rectNode);
// elm2.NodeTree.Nodes.Add(shapeNode);
// elm2.NodeTree.Nodes.Add(outNode);
//
// Assert.That(((OutputSocket<RectGeometry>)rectNode.Items[0]).TryConnect((InputSocket<Geometry?>)shapeNode.Items[1]));
// Assert.That(((OutputSocket<GeometryShape>)shapeNode.Items[0]).TryConnect((InputSocket<Drawable?>)outNode.Items[0]));
// }

@yuto-trd yuto-trd changed the title Implement animatable property system with validation and rendering enhancements [破壊的変更] 新しい描画プロパティシステム Oct 28, 2025
…ing and add SuppressResourceClassGenerationAttribute
…、関連するノードのプロパティ設定を改善
@yuto-trd yuto-trd force-pushed the feat/migrate-new-property-api branch from e013dc2 to 5c1314f Compare November 25, 2025 09:37
@github-actions
Copy link
Contributor

Code Coverage

Package Line Rate Branch Rate Complexity Health
Beutl.Operators 4% 0% 62
Beutl.Core 29% 26% 3081
Beutl.Engine 26% 24% 9555
Beutl.Threading 100% 94% 118
Beutl.Utilities 73% 67% 358
Beutl.Configuration 40% 19% 283
Beutl.Extensibility 2% 0% 102
Beutl.ProjectSystem 12% 6% 1863
Beutl.Language 0% 0% 636
Summary 25% (9850 / 38663) 23% (2521 / 10815) 16058

Minimum allowed line rate is 0%

@yuto-trd yuto-trd changed the title [破壊的変更] 新しい描画プロパティシステム [Breaking Change] New Rendering Property System Nov 29, 2025
@yuto-trd yuto-trd marked this pull request as ready for review November 29, 2025 08:50
Copilot AI review requested due to automatic review settings November 29, 2025 08:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements a new rendering property system (Beutl.Engine.Property) to separate editing data from drawing data. The migration replaces the conventional CoreProperty system, which previously did not distinguish between these two responsibilities. This enables:

  • Editing data: Holds user-set properties and animations, capable of generating drawing data for any frame
  • Drawing data: Frame-specific data used for rendering

Reviewed changes

Copilot reviewed 215 out of 435 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
RoundedRectGeometry.cs Migrated from CoreProperty to IProperty system with Resource class for rendering
RectGeometry.cs Converted properties to IProperty pattern with Resource-based rendering
PathGeometry.cs Migrated to IProperty pattern, replaced PathFigures/PathSegments collection classes
PathFigure.cs Changed from Animatable to EngineObject with IProperty properties
PathSegment.cs Simplified base class with Resource pattern for rendering operations
QuadraticBezierSegment.cs Migrated segment properties to IProperty with Resource class
Geometry.cs Major refactoring to use EngineObject with Resource class for caching and rendering
EllipseGeometry.cs Converted to IProperty pattern with Resource-based rendering
ColorExtensions.cs Updated to return SolidColorBrush.Resource instead of immutable interfaces
Brushes.cs Changed return types from ISolidColorBrush to SolidColorBrush
Brushes.Resource.cs New file providing Resource versions of predefined brushes
Brush.cs Migrated from Animatable to EngineObject with IProperty properties
SolidColorBrush.cs Converted Color property to IProperty pattern
GradientBrush.cs Migrated properties to IProperty, replaced GradientStops collection
GradientStop.cs Changed from Animatable to EngineObject with IProperty properties
TileBrush.cs Converted all tile properties to IProperty pattern
Transform.cs Major refactoring to use Resource pattern with CreateMatrix method
TransformParser.cs Updated return types from ITransform to Transform
TransformGroup.cs Migrated Children to IListProperty, simplified matrix calculation
Shape.cs Converted to use Resource pattern for geometry caching
TextBlock.cs Migrated text properties to IProperty with Resource-based rendering
TextElement.cs Simplified from Animatable to plain class with public properties
SourceVideo.cs Migrated to IProperty pattern with Resource class for frame calculation
SourceImage.cs Converted Source to IProperty with Resource-based rendering
SourceBackdrop.cs Migrated Clear property to IProperty pattern
RenderNode.cs Added HasChanges property for tracking render state
RenderLayer.cs Updated to work with Resource pattern and time-based rendering
RenderContext.cs New file providing property evaluation at specific time points
Renderer.cs Changed from IClock to TimeSpan-based time tracking

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@yuto-trd yuto-trd merged commit 2e65155 into main Nov 29, 2025
6 of 7 checks passed
@yuto-trd yuto-trd deleted the feat/migrate-new-property-api branch November 29, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants