-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix Cinematic initialization and serialization bugs #2560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
capdevon
wants to merge
9
commits into
jMonkeyEngine:master
Choose a base branch
from
capdevon:capdevon-Cinematic
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+181
−57
Conversation
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
codex128
requested changes
Sep 22, 2025
jme3-core/src/main/java/com/jme3/cinematic/events/AnimEvent.java
Outdated
Show resolved
Hide resolved
jme3-core/src/main/java/com/jme3/cinematic/events/AnimEvent.java
Outdated
Show resolved
Hide resolved
Contributor
|
Closing because requested changes have not been addressed in a timely manner. |
Updated copyright year and refactored AnimEvent class to use spatialRef for identification. Removed unused model variable and adjusted serialization methods.
Implement dispose method to clean up resources.
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.
Refactors and Improves the Cinematic class
This pull request enhances the
Cinematicclass, focusing on better documentation, serialization improvements, and memory management. Key updates include:SavableArrayListserialization/deserialization.Applicationfield to the class, initialized duringinitialize()and passed to event initialization for consistency.clearCameras()method to properly detach and clear all camera nodes from the scene, now called fromcleanup()to avoid memory leaks.initializedflag, clearing events, and removing camera nodes.cinematicEventslist non-final for deserialization.These changes improve maintainability, clarity, and the robustness of cinematic lifecycle management in the engine.
Enhance AnimEvent Serialization and Model Handling
This PR introduces improvements to the
AnimEventclass in thecom.jme3.cinematic.eventspackage by enhancing how animation events are associated with their models and how they are serialized/deserialized. The changes ensure more robust handling ofAnimComposerand the associatedSpatialmodel, especially when saving and loading animation events.Key Changes
Introduced a
private Spatial modelfield toAnimEventto keep track of the model associated with the animation event.modelfield from theAnimComposer.In
initEvent, if thecomposeris not set but themodelis, the code attempts to retrieve the correctAnimComposerfrom the model, ensuring reliable initialization even after deserialization.modelfield is now written to and read from the JME capsules, replacing the direct serialization ofcinematicandcomposerfields (which are no longer serialized).Added a custom
dispose()method to clean up references tocinematicandcomposerwhen the event is disposed, aiding memory management.Updated the copyright year.
Motivation
These changes address issues related to the persistence and restoration of animation events across sessions, improving the reliability of cinematic workflows in jMonkeyEngine. By serializing the model reference and reconstructing the composer as needed, the risk of null references or mismatched state is reduced.
Impact