mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-19 01:29:49 +00:00
Fix memory leak when applying image effects
This commit is contained in:
parent
d7f6432bb7
commit
786cc39e89
|
@ -29,7 +29,6 @@ func commit_action(cel: Image, project := Global.current_project) -> void:
|
||||||
else:
|
else:
|
||||||
var gen := ShaderImageEffect.new()
|
var gen := ShaderImageEffect.new()
|
||||||
gen.generate_image(cel, shader, params, project.size)
|
gen.generate_image(cel, shader, params, project.size)
|
||||||
await gen.done
|
|
||||||
|
|
||||||
|
|
||||||
func _on_RButton_toggled(button_pressed: bool) -> void:
|
func _on_RButton_toggled(button_pressed: bool) -> void:
|
||||||
|
|
|
@ -42,7 +42,6 @@ func commit_action(cel: Image, project := Global.current_project) -> void:
|
||||||
else:
|
else:
|
||||||
var gen := ShaderImageEffect.new()
|
var gen := ShaderImageEffect.new()
|
||||||
gen.generate_image(cel, shader, params, project.size)
|
gen.generate_image(cel, shader, params, project.size)
|
||||||
await gen.done
|
|
||||||
|
|
||||||
|
|
||||||
func _on_OffsetSliders_value_changed(_value: Vector2) -> void:
|
func _on_OffsetSliders_value_changed(_value: Vector2) -> void:
|
||||||
|
|
|
@ -108,7 +108,6 @@ func commit_action(cel: Image, project := Global.current_project) -> void:
|
||||||
else:
|
else:
|
||||||
var gen := ShaderImageEffect.new()
|
var gen := ShaderImageEffect.new()
|
||||||
gen.generate_image(cel, shader, params, project.size)
|
gen.generate_image(cel, shader, params, project.size)
|
||||||
await gen.done
|
|
||||||
|
|
||||||
|
|
||||||
func _on_ShapeOptionButton_item_selected(index: int) -> void:
|
func _on_ShapeOptionButton_item_selected(index: int) -> void:
|
||||||
|
|
|
@ -23,7 +23,6 @@ func commit_action(cel: Image, project := Global.current_project) -> void:
|
||||||
else:
|
else:
|
||||||
var gen := ShaderImageEffect.new()
|
var gen := ShaderImageEffect.new()
|
||||||
gen.generate_image(cel, shader, params, project.size)
|
gen.generate_image(cel, shader, params, project.size)
|
||||||
await gen.done
|
|
||||||
|
|
||||||
|
|
||||||
func _on_GradientEdit_updated(_gradient: Gradient, _cc: bool) -> void:
|
func _on_GradientEdit_updated(_gradient: Gradient, _cc: bool) -> void:
|
||||||
|
|
|
@ -39,7 +39,6 @@ func commit_action(cel: Image, project := Global.current_project) -> void:
|
||||||
else:
|
else:
|
||||||
var gen := ShaderImageEffect.new()
|
var gen := ShaderImageEffect.new()
|
||||||
gen.generate_image(cel, shader, params, project.size)
|
gen.generate_image(cel, shader, params, project.size)
|
||||||
await gen.done
|
|
||||||
|
|
||||||
|
|
||||||
func _reset() -> void:
|
func _reset() -> void:
|
||||||
|
|
|
@ -30,7 +30,6 @@ func commit_action(cel: Image, project := Global.current_project) -> void:
|
||||||
else:
|
else:
|
||||||
var gen := ShaderImageEffect.new()
|
var gen := ShaderImageEffect.new()
|
||||||
gen.generate_image(cel, shader, params, project.size)
|
gen.generate_image(cel, shader, params, project.size)
|
||||||
await gen.done
|
|
||||||
|
|
||||||
|
|
||||||
func _on_RButton_toggled(button_pressed: bool) -> void:
|
func _on_RButton_toggled(button_pressed: bool) -> void:
|
||||||
|
|
|
@ -43,7 +43,6 @@ func commit_action(cel: Image, project := Global.current_project) -> void:
|
||||||
else:
|
else:
|
||||||
var gen := ShaderImageEffect.new()
|
var gen := ShaderImageEffect.new()
|
||||||
gen.generate_image(cel, shader, params, project.size)
|
gen.generate_image(cel, shader, params, project.size)
|
||||||
await gen.done
|
|
||||||
|
|
||||||
|
|
||||||
func _on_OffsetSliders_value_changed(_value: Vector2) -> void:
|
func _on_OffsetSliders_value_changed(_value: Vector2) -> void:
|
||||||
|
|
|
@ -40,7 +40,6 @@ func commit_action(cel: Image, project := Global.current_project) -> void:
|
||||||
else:
|
else:
|
||||||
var gen := ShaderImageEffect.new()
|
var gen := ShaderImageEffect.new()
|
||||||
gen.generate_image(cel, shader, params, project.size)
|
gen.generate_image(cel, shader, params, project.size)
|
||||||
await gen.done
|
|
||||||
|
|
||||||
|
|
||||||
func _on_ThickValue_value_changed(value: int) -> void:
|
func _on_ThickValue_value_changed(value: int) -> void:
|
||||||
|
|
|
@ -25,7 +25,6 @@ func commit_action(cel: Image, project := Global.current_project) -> void:
|
||||||
else:
|
else:
|
||||||
var gen := ShaderImageEffect.new()
|
var gen := ShaderImageEffect.new()
|
||||||
gen.generate_image(cel, shader, params, project.size)
|
gen.generate_image(cel, shader, params, project.size)
|
||||||
await gen.done
|
|
||||||
|
|
||||||
|
|
||||||
func _on_LevelsSlider_value_changed(value: float) -> void:
|
func _on_LevelsSlider_value_changed(value: float) -> void:
|
||||||
|
|
|
@ -130,7 +130,6 @@ func commit_action(cel: Image, _project := Global.current_project) -> void:
|
||||||
params["preview"] = false
|
params["preview"] = false
|
||||||
var gen := ShaderImageEffect.new()
|
var gen := ShaderImageEffect.new()
|
||||||
gen.generate_image(cel, shader, params, _project.size)
|
gen.generate_image(cel, shader, params, _project.size)
|
||||||
await gen.done
|
|
||||||
else:
|
else:
|
||||||
match type_option_button.get_selected_id():
|
match type_option_button.get_selected_id():
|
||||||
ROTXEL:
|
ROTXEL:
|
||||||
|
|
|
@ -28,7 +28,6 @@ func commit_action(cel: Image, project := Global.current_project) -> void:
|
||||||
params[param] = param_data
|
params[param] = param_data
|
||||||
var gen := ShaderImageEffect.new()
|
var gen := ShaderImageEffect.new()
|
||||||
gen.generate_image(cel, shader, params, project.size)
|
gen.generate_image(cel, shader, params, project.size)
|
||||||
await gen.done
|
|
||||||
|
|
||||||
|
|
||||||
func _on_ChooseShader_pressed() -> void:
|
func _on_ChooseShader_pressed() -> void:
|
||||||
|
|
Loading…
Reference in a new issue