Conversation
There was a problem hiding this comment.
Cpp-linter Review
Used clang-format v21.1.8
Click here for the full clang-format patch
diff --git a/trinity/Controllers/ITr2Controller.h b/trinity/Controllers/ITr2Controller.h
index 422a834..85822ae 100644
--- a/trinity/Controllers/ITr2Controller.h
+++ b/trinity/Controllers/ITr2Controller.h
@@ -56 +56 @@ BLUE_INTERFACE( ITr2Controller ) :
-void UpdateSpaceObjectParentRoot( std::vector<std::pair<std::string, IRoot*>> & roots, IRoot * owner );
+void UpdateSpaceObjectParentRoot( std::vector<std::pair<std::string, IRoot*>>& roots, IRoot* owner );
Have any feedback or feature suggestions? Share it here.
…ttps://github.com/carbonengine/trinity into EO-26922-Bindable-roots-in-controller-expressions
There was a problem hiding this comment.
Cpp-linter Review
Used clang-format v21.1.8
Click here for the full clang-format patch
diff --git a/trinity/Controllers/ITr2Controller.h b/trinity/Controllers/ITr2Controller.h
index 422a834..85822ae 100644
--- a/trinity/Controllers/ITr2Controller.h
+++ b/trinity/Controllers/ITr2Controller.h
@@ -56 +56 @@ BLUE_INTERFACE( ITr2Controller ) :
-void UpdateSpaceObjectParentRoot( std::vector<std::pair<std::string, IRoot*>> & roots, IRoot * owner );
+void UpdateSpaceObjectParentRoot( std::vector<std::pair<std::string, IRoot*>>& roots, IRoot* owner );
Have any feedback or feature suggestions? Share it here.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Reference handling introduces undefined pointer arithmetic, naming collisions, stale dynamic bindings, and misleading diagnostics.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds bindable object-root paths to controller expressions, including owner and space-object-parent attributes.
Changes:
- Rewrites binding paths into parser variables evaluated through
Tr2BindingPoint. - Adds dynamic
OwnerandSpaceObjectParentroots. - Extends binding-path parsing and validity checks.
| File | Description |
|---|---|
Tr2TimelineController.cpp |
Exposes binding roots and expression metadata. |
Tr2ControllerExpression.h |
Defines reference-binding state. |
Tr2ControllerExpression.cpp |
Rewrites, binds, and evaluates references. |
Tr2Controller.cpp |
Resolves space-object-parent roots. |
Tr2BindingPoint.h |
Exposes path matching. |
Tr2BindingPoint.cpp |
Improves path parsing and binding validity. |
ITr2Controller.h |
Declares the root-update helper. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This should not affect anything but now the comparator is strictly defined runs the range check first, using std::less, and only subtracts once the pointer is known to be inside the first view None of the other lines do pointer arithmetic, so there's nothing to change. It looks like Copilot grouped them in by mistake?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary: Controller expressions can now read float attributes straight from bound objects using path syntax in the expression field ( for example Owner.translation.x or SpaceObjectParent.someAttr )
the problem before this:
right now when artists need to use attribute variables in controllers the go-to methood is sto bind it into one of the variables. This is a bit problematic as often that variable is only needed once or only in certain controller subsections.
Another problem is that getting variables from above the level where the controller sits it requires a lot of extra effort and another controller on a higher level to pass that variable down.
This change attempts to fix both problems at once by making it so variables can be fetched on demand and up the tree
some notes:
Owner and SpaceObjectParent now appear under a new "Bindings" group in the expression term info, so artists can have some help remembering this feature
img of an example use:
