Skip to content
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

Add read-only mode to AnimationEditor for foreign resources. #63245

Merged
merged 1 commit into from
Aug 10, 2022

Conversation

SaracenOne
Copy link
Member

@SaracenOne SaracenOne commented Jul 20, 2022

Changes the behaviour the AnimationEditor plugin so that when operating on animation/animation libraries embedded in foreign scenes, the editor will operate in a read-only mode where animations can still be viewed, but any actual edits to the animation will be disallowed. This includes adding/removing tracks, adding/removing keys, changing loop modes, interpolation, ect., as well as bezier editing, and changing animation library editing to properly reflect the state of foreign resources. It does not make edits via the inspector read-only though; a corresponding PR for handling that is here #63282

This change will prevent users from accidentally making animation edits in situations where the changes will be lost.

Complementary PR to #63249

@SaracenOne SaracenOne force-pushed the animation_editor_read_only branch from a0652fd to 7776b47 Compare July 21, 2022 13:47
@reduz
Copy link
Member

reduz commented Aug 8, 2022

Thanks, this is a much needed improvement! I did not notice in the PR any message regarding animations being read-only though, so I wonder how this could be done to avoid the confusion that editing does not work.

@akien-mga akien-mga merged commit cf95056 into godotengine:master Aug 10, 2022
@akien-mga
Copy link
Member

Thanks!

@TokageItLab
Copy link
Member

TokageItLab commented Aug 27, 2022

Changing animation_length and inserting tracks by keying from inspector or viewport should also be prevented.
Also, it is better to prevent manage AnimationLibrary. However, I am not sure if that is necessary since AnimationLibrary can be broken by external factors.

@Zireael07
Copy link
Contributor

Agreed on inserting tracks from keying.

@TokageItLab
Copy link
Member

@SaracenOne I noticed that there is a problem with not being able to edit after Make Local. Also #63249 is the same.

@SaracenOne
Copy link
Member Author

SaracenOne commented Sep 2, 2022

@TokageItLab I looked into this, and from what I understand, the issue here is not a problem specifically with the read-only modes for AnimationPlayer and AnimationTree plugins, but rather that the 'Make Local' command only operates on nodes, not on resources. This means that if you have an animation resource embedded in a foreign scene, the resource is still embedded in that scene even after the 'Make Local' command has been run, which means displaying them in read-only mode is still technically correct since further edits to them would not be saved.

You can addresss this by making the individual resources local, but I understand that we may want to consider some changes to how the 'Make Local' command works in regards to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants