mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-21 21:13:14 +00:00
Fixed importing brushes and patterns by opening file
This commit is contained in:
parent
d099666abe
commit
b47685e857
1 changed files with 2 additions and 4 deletions
|
@ -57,8 +57,7 @@ func _on_PreviewDialog_confirmed() -> void:
|
||||||
elif current_import_option == ImageImportOptions.BRUSH:
|
elif current_import_option == ImageImportOptions.BRUSH:
|
||||||
var file_name : String = path.get_basename().get_file()
|
var file_name : String = path.get_basename().get_file()
|
||||||
image.convert(Image.FORMAT_RGBA8)
|
image.convert(Image.FORMAT_RGBA8)
|
||||||
Global.file_brushes.append(image)
|
Brushes.add_file_brush([image], file_name)
|
||||||
Global.create_brush_button(image, Global.Brush_Types.FILE, file_name)
|
|
||||||
|
|
||||||
# Copy the image file into the "pixelorama/Brushes" directory
|
# Copy the image file into the "pixelorama/Brushes" directory
|
||||||
var location := "Brushes".plus_file(path.get_file())
|
var location := "Brushes".plus_file(path.get_file())
|
||||||
|
@ -68,8 +67,7 @@ func _on_PreviewDialog_confirmed() -> void:
|
||||||
elif current_import_option == ImageImportOptions.PATTERN:
|
elif current_import_option == ImageImportOptions.PATTERN:
|
||||||
var file_name : String = path.get_basename().get_file()
|
var file_name : String = path.get_basename().get_file()
|
||||||
image.convert(Image.FORMAT_RGBA8)
|
image.convert(Image.FORMAT_RGBA8)
|
||||||
Global.patterns.append(image)
|
Global.patterns_popup.add(image, file_name)
|
||||||
Global.create_pattern_button(image, file_name)
|
|
||||||
|
|
||||||
# Copy the image file into the "pixelorama/Patterns" directory
|
# Copy the image file into the "pixelorama/Patterns" directory
|
||||||
var location := "Patterns".plus_file(path.get_file())
|
var location := "Patterns".plus_file(path.get_file())
|
||||||
|
|
Loading…
Add table
Reference in a new issue