mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Move set_nodes() logic to parent class ImageEffect
Also fixes a crash when trying to change the affected cels option in image effects that do not have animation options
This commit is contained in:
parent
0fe315d605
commit
118e2e7671
|
@ -122,7 +122,12 @@ func commit_action(_cel: Image, _project: Project = Global.current_project) -> v
|
||||||
|
|
||||||
|
|
||||||
func set_nodes() -> void:
|
func set_nodes() -> void:
|
||||||
pass
|
preview = $VBoxContainer/AspectRatioContainer/Preview
|
||||||
|
selection_checkbox = $VBoxContainer/OptionsContainer/SelectionCheckBox
|
||||||
|
affect_option_button = $VBoxContainer/OptionsContainer/AffectOptionButton
|
||||||
|
animate_options_container = $VBoxContainer/AnimationOptions
|
||||||
|
animate_menu = $"%AnimateMenu".get_popup()
|
||||||
|
initial_button = $"%InitalButton"
|
||||||
|
|
||||||
|
|
||||||
func set_animate_menu(elements: int) -> void:
|
func set_animate_menu(elements: int) -> void:
|
||||||
|
|
|
@ -14,12 +14,6 @@ func _ready() -> void:
|
||||||
preview.set_material(sm)
|
preview.set_material(sm)
|
||||||
|
|
||||||
|
|
||||||
func set_nodes() -> void:
|
|
||||||
preview = $VBoxContainer/AspectRatioContainer/Preview
|
|
||||||
selection_checkbox = $VBoxContainer/OptionsContainer/SelectionCheckBox
|
|
||||||
affect_option_button = $VBoxContainer/OptionsContainer/AffectOptionButton
|
|
||||||
|
|
||||||
|
|
||||||
func commit_action(cel: Image, project: Project = Global.current_project) -> void:
|
func commit_action(cel: Image, project: Project = Global.current_project) -> void:
|
||||||
var selection_tex := ImageTexture.new()
|
var selection_tex := ImageTexture.new()
|
||||||
if selection_checkbox.pressed and project.has_selection:
|
if selection_checkbox.pressed and project.has_selection:
|
||||||
|
|
|
@ -16,15 +16,6 @@ func _ready() -> void:
|
||||||
preview.set_material(sm)
|
preview.set_material(sm)
|
||||||
|
|
||||||
|
|
||||||
func set_nodes() -> void:
|
|
||||||
preview = $VBoxContainer/AspectRatioContainer/Preview
|
|
||||||
selection_checkbox = $VBoxContainer/OptionsContainer/SelectionCheckBox
|
|
||||||
affect_option_button = $VBoxContainer/OptionsContainer/AffectOptionButton
|
|
||||||
animate_options_container = $VBoxContainer/AnimationOptions
|
|
||||||
animate_menu = $"%AnimateMenu".get_popup()
|
|
||||||
initial_button = $"%InitalButton"
|
|
||||||
|
|
||||||
|
|
||||||
func set_animate_menu(_elements) -> void:
|
func set_animate_menu(_elements) -> void:
|
||||||
# set as in enum
|
# set as in enum
|
||||||
animate_menu.add_check_item("Offset X", Animate.OFFSET_X)
|
animate_menu.add_check_item("Offset X", Animate.OFFSET_X)
|
||||||
|
|
|
@ -4,12 +4,6 @@ onready var flip_h := $VBoxContainer/FlipOptions/FlipHorizontal as CheckBox
|
||||||
onready var flip_v := $VBoxContainer/FlipOptions/FlipVertical as CheckBox
|
onready var flip_v := $VBoxContainer/FlipOptions/FlipVertical as CheckBox
|
||||||
|
|
||||||
|
|
||||||
func set_nodes() -> void:
|
|
||||||
preview = $VBoxContainer/AspectRatioContainer/Preview
|
|
||||||
selection_checkbox = $VBoxContainer/OptionsContainer/SelectionCheckBox
|
|
||||||
affect_option_button = $VBoxContainer/OptionsContainer/AffectOptionButton
|
|
||||||
|
|
||||||
|
|
||||||
func commit_action(cel: Image, project: Project = Global.current_project) -> void:
|
func commit_action(cel: Image, project: Project = Global.current_project) -> void:
|
||||||
_flip_image(cel, selection_checkbox.pressed, project)
|
_flip_image(cel, selection_checkbox.pressed, project)
|
||||||
|
|
||||||
|
|
|
@ -45,12 +45,6 @@ func _ready() -> void:
|
||||||
dithering_option_button.add_item(matrix.name)
|
dithering_option_button.add_item(matrix.name)
|
||||||
|
|
||||||
|
|
||||||
func set_nodes() -> void:
|
|
||||||
preview = $VBoxContainer/AspectRatioContainer/Preview
|
|
||||||
selection_checkbox = $VBoxContainer/OptionsContainer/SelectionCheckBox
|
|
||||||
affect_option_button = $VBoxContainer/OptionsContainer/AffectOptionButton
|
|
||||||
|
|
||||||
|
|
||||||
func commit_action(cel: Image, project: Project = Global.current_project) -> void:
|
func commit_action(cel: Image, project: Project = Global.current_project) -> void:
|
||||||
var selection: Image
|
var selection: Image
|
||||||
var selection_tex := ImageTexture.new()
|
var selection_tex := ImageTexture.new()
|
||||||
|
|
|
@ -9,12 +9,6 @@ func _ready() -> void:
|
||||||
preview.set_material(sm)
|
preview.set_material(sm)
|
||||||
|
|
||||||
|
|
||||||
func set_nodes() -> void:
|
|
||||||
preview = $VBoxContainer/AspectRatioContainer/Preview
|
|
||||||
selection_checkbox = $VBoxContainer/OptionsContainer/SelectionCheckBox
|
|
||||||
affect_option_button = $VBoxContainer/OptionsContainer/AffectOptionButton
|
|
||||||
|
|
||||||
|
|
||||||
func commit_action(cel: Image, project: Project = Global.current_project) -> void:
|
func commit_action(cel: Image, project: Project = Global.current_project) -> void:
|
||||||
var selection_tex := ImageTexture.new()
|
var selection_tex := ImageTexture.new()
|
||||||
if selection_checkbox.pressed and project.has_selection:
|
if selection_checkbox.pressed and project.has_selection:
|
||||||
|
|
|
@ -19,15 +19,6 @@ func _about_to_show() -> void:
|
||||||
._about_to_show()
|
._about_to_show()
|
||||||
|
|
||||||
|
|
||||||
func set_nodes() -> void:
|
|
||||||
preview = $VBoxContainer/AspectRatioContainer/Preview
|
|
||||||
selection_checkbox = $VBoxContainer/OptionsContainer/SelectionCheckBox
|
|
||||||
affect_option_button = $VBoxContainer/OptionsContainer/AffectOptionButton
|
|
||||||
animate_options_container = $VBoxContainer/AnimationOptions
|
|
||||||
animate_menu = $"%AnimateMenu".get_popup()
|
|
||||||
initial_button = $"%InitalButton"
|
|
||||||
|
|
||||||
|
|
||||||
func set_animate_menu(_elements) -> void:
|
func set_animate_menu(_elements) -> void:
|
||||||
# set as in enum
|
# set as in enum
|
||||||
animate_menu.add_check_item("Hue", Animate.HUE)
|
animate_menu.add_check_item("Hue", Animate.HUE)
|
||||||
|
|
|
@ -14,12 +14,6 @@ func _ready() -> void:
|
||||||
preview.set_material(sm)
|
preview.set_material(sm)
|
||||||
|
|
||||||
|
|
||||||
func set_nodes() -> void:
|
|
||||||
preview = $VBoxContainer/AspectRatioContainer/Preview
|
|
||||||
selection_checkbox = $VBoxContainer/OptionsContainer/SelectionCheckBox
|
|
||||||
affect_option_button = $VBoxContainer/OptionsContainer/AffectOptionButton
|
|
||||||
|
|
||||||
|
|
||||||
func commit_action(cel: Image, project: Project = Global.current_project) -> void:
|
func commit_action(cel: Image, project: Project = Global.current_project) -> void:
|
||||||
var selection_tex := ImageTexture.new()
|
var selection_tex := ImageTexture.new()
|
||||||
if selection_checkbox.pressed and project.has_selection:
|
if selection_checkbox.pressed and project.has_selection:
|
||||||
|
|
|
@ -22,15 +22,6 @@ func _ready() -> void:
|
||||||
color = outline_color.color
|
color = outline_color.color
|
||||||
|
|
||||||
|
|
||||||
func set_nodes() -> void:
|
|
||||||
preview = $VBoxContainer/AspectRatioContainer/Preview
|
|
||||||
selection_checkbox = $VBoxContainer/OptionsContainer/SelectionCheckBox
|
|
||||||
affect_option_button = $VBoxContainer/OptionsContainer/AffectOptionButton
|
|
||||||
animate_options_container = $VBoxContainer/AnimationOptions
|
|
||||||
animate_menu = $"%AnimateMenu".get_popup()
|
|
||||||
initial_button = $"%InitalButton"
|
|
||||||
|
|
||||||
|
|
||||||
func set_animate_menu(_elements) -> void:
|
func set_animate_menu(_elements) -> void:
|
||||||
# set as in enum
|
# set as in enum
|
||||||
animate_menu.add_check_item("Thickness", Animate.THICKNESS)
|
animate_menu.add_check_item("Thickness", Animate.THICKNESS)
|
||||||
|
|
|
@ -11,12 +11,6 @@ func _ready() -> void:
|
||||||
preview.set_material(sm)
|
preview.set_material(sm)
|
||||||
|
|
||||||
|
|
||||||
func set_nodes() -> void:
|
|
||||||
preview = $VBoxContainer/AspectRatioContainer/Preview
|
|
||||||
selection_checkbox = $VBoxContainer/OptionsContainer/SelectionCheckBox
|
|
||||||
affect_option_button = $VBoxContainer/OptionsContainer/AffectOptionButton
|
|
||||||
|
|
||||||
|
|
||||||
func commit_action(cel: Image, project: Project = Global.current_project) -> void:
|
func commit_action(cel: Image, project: Project = Global.current_project) -> void:
|
||||||
var selection_tex := ImageTexture.new()
|
var selection_tex := ImageTexture.new()
|
||||||
if selection_checkbox.pressed and project.has_selection:
|
if selection_checkbox.pressed and project.has_selection:
|
||||||
|
|
|
@ -34,15 +34,6 @@ func _ready() -> void:
|
||||||
type_option_button.emit_signal("item_selected", 0)
|
type_option_button.emit_signal("item_selected", 0)
|
||||||
|
|
||||||
|
|
||||||
func set_nodes() -> void:
|
|
||||||
preview = $VBoxContainer/AspectRatioContainer/Preview
|
|
||||||
selection_checkbox = $VBoxContainer/OptionsContainer/SelectionCheckBox
|
|
||||||
affect_option_button = $VBoxContainer/OptionsContainer/AffectOptionButton
|
|
||||||
animate_options_container = $VBoxContainer/AnimationOptions
|
|
||||||
animate_menu = $"%AnimateMenu".get_popup()
|
|
||||||
initial_button = $"%InitalButton"
|
|
||||||
|
|
||||||
|
|
||||||
func set_animate_menu(_elements) -> void:
|
func set_animate_menu(_elements) -> void:
|
||||||
# set as in enum
|
# set as in enum
|
||||||
animate_menu.add_check_item("Angle", Animate.ANGLE)
|
animate_menu.add_check_item("Angle", Animate.ANGLE)
|
||||||
|
|
|
@ -10,7 +10,7 @@ window_title = "Rotate Image"
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
[node name="VBoxContainer" parent="." index="3"]
|
[node name="VBoxContainer" parent="." index="3"]
|
||||||
margin_bottom = 458.0
|
margin_bottom = 416.0
|
||||||
|
|
||||||
[node name="AspectRatioContainer" parent="VBoxContainer" index="0"]
|
[node name="AspectRatioContainer" parent="VBoxContainer" index="0"]
|
||||||
margin_right = 278.0
|
margin_right = 278.0
|
||||||
|
|
Loading…
Reference in a new issue