mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Rename get_animated_values
to get_animated_value
This commit is contained in:
parent
605461e968
commit
6dc07d0ca2
|
@ -25,8 +25,8 @@ func _ready() -> void:
|
|||
|
||||
|
||||
func commit_action(cel: Image, project: Project = Global.current_project) -> void:
|
||||
var offset_x = animate_panel.get_animated_values(commit_idx, Animate.OFFSET_X)
|
||||
var offset_y = animate_panel.get_animated_values(commit_idx, Animate.OFFSET_Y)
|
||||
var offset_x = animate_panel.get_animated_value(commit_idx, Animate.OFFSET_X)
|
||||
var offset_y = animate_panel.get_animated_value(commit_idx, Animate.OFFSET_Y)
|
||||
var selection_tex := ImageTexture.new()
|
||||
if selection_checkbox.pressed and project.has_selection:
|
||||
selection_tex.create_from_image(project.selection_map, 0)
|
||||
|
|
|
@ -24,9 +24,9 @@ func _about_to_show() -> void:
|
|||
|
||||
|
||||
func commit_action(cel: Image, project: Project = Global.current_project) -> void:
|
||||
var hue = animate_panel.get_animated_values(commit_idx, Animate.HUE) / 360
|
||||
var sat = animate_panel.get_animated_values(commit_idx, Animate.SATURATION) / 100
|
||||
var val = animate_panel.get_animated_values(commit_idx, Animate.VALUE) / 100
|
||||
var hue = animate_panel.get_animated_value(commit_idx, Animate.HUE) / 360
|
||||
var sat = animate_panel.get_animated_value(commit_idx, Animate.SATURATION) / 100
|
||||
var val = animate_panel.get_animated_value(commit_idx, Animate.VALUE) / 100
|
||||
var selection_tex := ImageTexture.new()
|
||||
if selection_checkbox.pressed and project.has_selection:
|
||||
selection_tex.create_from_image(project.selection_map, 0)
|
||||
|
|
|
@ -25,7 +25,7 @@ func _ready() -> void:
|
|||
|
||||
|
||||
func commit_action(cel: Image, project: Project = Global.current_project) -> void:
|
||||
var anim_thickness = animate_panel.get_animated_values(commit_idx, Animate.THICKNESS)
|
||||
var anim_thickness = animate_panel.get_animated_value(commit_idx, Animate.THICKNESS)
|
||||
|
||||
if !shader: # Web version
|
||||
DrawingAlgos.generate_outline(
|
||||
|
|
|
@ -85,8 +85,8 @@ func _calculate_pivot() -> void:
|
|||
|
||||
|
||||
func commit_action(cel: Image, _project: Project = Global.current_project) -> void:
|
||||
var angle: float = deg2rad(animate_panel.get_animated_values(commit_idx, Animate.ANGLE))
|
||||
var init_angle: float = animate_panel.get_animated_values(commit_idx, Animate.INITIAL_ANGLE)
|
||||
var angle: float = deg2rad(animate_panel.get_animated_value(commit_idx, Animate.ANGLE))
|
||||
var init_angle: float = animate_panel.get_animated_value(commit_idx, Animate.INITIAL_ANGLE)
|
||||
|
||||
var selection_size := cel.get_size()
|
||||
var selection_tex := ImageTexture.new()
|
||||
|
|
|
@ -2,7 +2,7 @@ class_name AnimatePanel
|
|||
extends PanelContainer
|
||||
|
||||
var image_effect_node: ConfirmationDialog
|
||||
var frames := [] # Set this value before calling "get_animated_values"
|
||||
var frames := [] # Set this value before calling "get_animated_value"
|
||||
var properties := [] # Contains dictionary of properties
|
||||
var resetter_values := [] # Contains the Original properties without any change
|
||||
var _current_id := 0 # The property currently selected in "property_list"
|
||||
|
@ -42,7 +42,7 @@ func add_float_property(prop_name: String, property_node: Range):
|
|||
property_node.connect("value_changed", self, "_on_range_node_value_changed")
|
||||
|
||||
|
||||
func get_animated_values(frame_idx: int, property_idx := 0) -> float:
|
||||
func get_animated_value(frame_idx: int, property_idx := 0) -> float:
|
||||
var tween := SceneTreeTween.new()
|
||||
if property_idx <= 0 or property_idx < properties.size():
|
||||
if frame_idx in frames:
|
||||
|
|
Loading…
Reference in a new issue