-
-
Notifications
You must be signed in to change notification settings - Fork 397
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
[Continuation] Auto select cloned frames, reuse tag animations #861
Merged
OverloadedOrama
merged 35 commits into
Orama-Interactive:master
from
Variable-ind:select_frames
Jun 15, 2023
Merged
Changes from 33 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
8db9e6e
Duplicated frames
Variable-ind 1f96aa1
Added Clone Tag feature
Variable-ind cdd2017
fix remaining tag issues
Variable-ind 378a5f5
Update AnimationTimeline.gd
Variable-ind 7429a95
formatting
Variable-ind fe21da6
formatting
Variable-ind 5a39035
add icon and other remaining stuff
Variable-ind 39ea228
formatting
Variable-ind 3463a17
formatting
Variable-ind 8fed73b
Update AnimationTimeline.gd
Variable-ind 1073635
Update AnimationTimeline.gd
Variable-ind dd23394
some bug fixes
Variable-ind dee18a7
some bug fixes
Variable-ind b73d7ab
make empty tags appear as (Untitled)
Variable-ind d38e0c6
Merge branch 'Orama-Interactive:master' into select_frames
Variable-ind a907803
linting
Variable-ind e5fc0c7
Delete copy_frame.png
Variable-ind 4836c92
Delete copy_tag.png
Variable-ind 9529174
Add files via upload
Variable-ind 3b9a0c2
removed separate button and use tag button
Variable-ind 4076459
UI improvements to
Variable-ind 9d03cc9
Merge branch 'master' into select_frames
Variable-ind 1c952c5
remove some lines that appeared
Variable-ind 3541cc4
Update AnimationTimeline.gd
Variable-ind d54753c
moved paste tag code to it's own script
Variable-ind 032b702
Merge branch 'Orama-Interactive:master' into select_frames
Variable-ind 02b0a96
formatting
Variable-ind 1902938
Add files via upload
Variable-ind cdf7913
Merge branch 'Orama-Interactive:master' into select_frames
Variable-ind 2a6ef83
test lint disabling
Variable-ind e0a2fdc
Update AnimationTimeline.gd
Variable-ind 224e7ed
increase max file lines to 2000
Variable-ind bc9795f
Merge branch 'Orama-Interactive:master' into select_frames
Variable-ind b5ba9b3
Merge branch 'Orama-Interactive:master' into select_frames
Variable-ind cd4d558
Removed accidental changes by commit:.....
Variable-ind File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
disable: | ||
- no-elif-return | ||
- no-else-return | ||
|
||
max-file-lines: 2000 |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
extends PopupMenu | ||
|
||
|
||
func _ready() -> void: | ||
var tag_container: Control = Global.animation_timeline.find_node("TagContainer") | ||
connect("id_pressed", self, "_on_TagList_id_pressed") | ||
tag_container.connect("gui_input", self, "_on_TagContainer_gui_input") | ||
|
||
|
||
func _on_TagContainer_gui_input(event: InputEvent) -> void: | ||
if !event is InputEventMouseButton: | ||
return | ||
if Input.is_action_just_released("right_mouse"): | ||
clear() | ||
if Global.current_project.animation_tags.empty(): | ||
return | ||
add_separator("Paste content from tag:") | ||
for tag in Global.current_project.animation_tags: | ||
var img = Image.new() | ||
img.create(5, 5, true, Image.FORMAT_RGBA8) | ||
img.fill(tag.color) | ||
var tex = ImageTexture.new() | ||
tex.create_from_image(img) | ||
var title = tag.name | ||
if title == "": | ||
title = "(Untitled)" | ||
add_icon_item(tex, title) | ||
var frame_idx = Global.current_project.current_frame + 2 | ||
add_separator(str("The pasted frames will start at (Frame ", frame_idx, ")")) | ||
popup(Rect2(get_global_mouse_position(), Vector2.ONE)) | ||
|
||
|
||
func _on_TagList_id_pressed(id: int) -> void: | ||
var tag: AnimationTag = Global.current_project.animation_tags[id - 1] | ||
var frames = [] | ||
for i in range(tag.from - 1, tag.to): | ||
frames.append(i) | ||
Global.animation_timeline.copy_frames(frames, Global.current_project.current_frame) |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that the changes in the AnimationTimeline scene in this PR are undoing the changes in commit 361fe36, which removed the custom theme for the AnimationToolsScrollContainer node. I'd recommend merging the latest master branch to your branch (or rebasing), then reverting AnimationTimeline.tscn (to be the same as the master branch's), and then re-adding the new PasteTagPopup node, to ensure no conflicts will occurr.