-
-
Notifications
You must be signed in to change notification settings - Fork 397
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* better onion part (1/3) changed code and added scripts * better onion part (2/3) added some onion variables * better onion part (3/3) Added to onion dialog * removed whitespace that gave static error
- Loading branch information
1 parent
246f6f9
commit 159a821
Showing
7 changed files
with
143 additions
and
49 deletions.
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
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,22 @@ | ||
extends Node2D | ||
|
||
|
||
func _draw() -> void: | ||
if Global.onion_skinning: | ||
if Global.onion_skinning_future_rate > 0: | ||
var color : Color | ||
if Global.onion_skinning_blue_red: | ||
color = Color.red | ||
else: | ||
color = Color.white | ||
for i in range(1, Global.onion_skinning_future_rate + 1): | ||
if Global.current_project.current_frame < Global.current_project.frames.size() - i: | ||
var layer_i := 0 | ||
for layer in Global.current_project.frames[Global.current_project.current_frame + i].cels: | ||
if Global.current_project.layers[layer_i].visible: | ||
#ignore layer if it has "onion_ignore" in its name (case in-sensitive). | ||
if not "ignore_onion" in Global.current_project.layers[layer_i].name.to_lower(): | ||
color.a = 0.6 / i | ||
draw_texture(layer.image_texture, Vector2.ZERO, color) | ||
update() | ||
layer_i += 1 |
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,22 @@ | ||
extends Node2D | ||
|
||
|
||
func _draw() -> void: | ||
if Global.onion_skinning: | ||
if Global.onion_skinning_past_rate > 0: | ||
var color: Color | ||
if Global.onion_skinning_blue_red: | ||
color = Color.blue | ||
else: | ||
color = Color.white | ||
for i in range(1, Global.onion_skinning_past_rate + 1): | ||
if Global.current_project.current_frame >= i: | ||
var layer_i := 0 | ||
for layer in Global.current_project.frames[Global.current_project.current_frame - i].cels: | ||
if Global.current_project.layers[layer_i].visible: | ||
#ignore layer if it has "onion_ignore" in its name (case in-sensitive). | ||
if not "ignore_onion" in Global.current_project.layers[layer_i].name.to_lower(): | ||
color.a = 0.6 / i | ||
draw_texture(layer.image_texture, Vector2.ZERO, color) | ||
update() | ||
layer_i += 1 |
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