1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Compare commits

..

4 commits

Author SHA1 Message Date
Emmanouil Papadeas ebf0f846ca
Merge c1ed6b53ed into 60c54601ce 2025-01-06 21:11:55 +00:00
Emmanouil Papadeas c1ed6b53ed New translations translations.pot (Danish) 2025-01-06 23:11:52 +02:00
Variable 60c54601ce
fix crash when importing (not-yet) supported layers from one project to the other (#1161) 2025-01-05 20:46:30 +02:00
Variable d3f287347a
add api 5 to the list of legacy versions (#1162) 2025-01-04 23:12:03 +02:00
3 changed files with 28 additions and 21 deletions

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Danish\n" "Language-Team: Danish\n"
"Language: da_DK\n" "Language: da_DK\n"
"PO-Revision-Date: 2025-01-03 19:19\n" "PO-Revision-Date: 2025-01-06 21:11\n"
msgid "OK" msgid "OK"
msgstr "OK" msgstr "OK"
@ -355,17 +355,17 @@ msgid "Add Layout"
msgstr "Tilføj Layout" msgstr "Tilføj Layout"
msgid "Copy from" msgid "Copy from"
msgstr "" msgstr "Kopiér fra"
msgid "Rename" msgid "Rename"
msgstr "" msgstr "Omdøb"
msgid "Rename Layout" msgid "Rename Layout"
msgstr "" msgstr "Omdøb layout"
#. Refers to the current layout of the user interface. #. Refers to the current layout of the user interface.
msgid "Current layout" msgid "Current layout"
msgstr "" msgstr "Nuværende layout"
msgid "Are you sure you want to delete this layout?" msgid "Are you sure you want to delete this layout?"
msgstr "Er du sikker på, at du vil slette dette layout?" msgstr "Er du sikker på, at du vil slette dette layout?"
@ -613,7 +613,7 @@ msgstr "Tilpas størrelse:"
#. Found in the export dialog, when exporting a jpeg file. Refers to the quality of the exported file. #. Found in the export dialog, when exporting a jpeg file. Refers to the quality of the exported file.
msgid "Quality:" msgid "Quality:"
msgstr "" msgstr "Kvalitet:"
msgid "Cancel Export" msgid "Cancel Export"
msgstr "Annullér Eksport" msgstr "Annullér Eksport"
@ -694,13 +694,13 @@ msgid "Export dimensions:"
msgstr "" msgstr ""
msgid "Save a File" msgid "Save a File"
msgstr "" msgstr "Gem en fil"
msgid "Go to previous folder." msgid "Go to previous folder."
msgstr "" msgstr "Gå til forrige mappe."
msgid "Go to next folder." msgid "Go to next folder."
msgstr "" msgstr "Gå til næste mappe."
msgid "Go to parent folder." msgid "Go to parent folder."
msgstr "" msgstr ""
@ -897,11 +897,11 @@ msgstr ""
#. Refers to the font of a text. #. Refers to the font of a text.
msgid "Font:" msgid "Font:"
msgstr "" msgstr "Skrifttype:"
#. Found in the preferences, under the interface section. Allows users to set the size of the font, ie the text. #. Found in the preferences, under the interface section. Allows users to set the size of the font, ie the text.
msgid "Font size:" msgid "Font size:"
msgstr "" msgstr "Skriftstørrelse:"
msgid "Dim interface on dialog popup" msgid "Dim interface on dialog popup"
msgstr "Dæmp brugerflades lysstyrke ved popup-dialog" msgstr "Dæmp brugerflades lysstyrke ved popup-dialog"
@ -1183,10 +1183,10 @@ msgid "Channel:"
msgstr "" msgstr ""
msgid "Red" msgid "Red"
msgstr "" msgstr "Rød"
msgid "Green" msgid "Green"
msgstr "" msgstr "Grøn"
#. Refers to the value (as in HSV) of the colors of an image. #. Refers to the value (as in HSV) of the colors of an image.
msgid "Value" msgid "Value"
@ -1270,7 +1270,7 @@ msgstr "Hjemmeside"
#. Found in the About dialog. A button that, when you click it, it opens the URL of Pixelorama's source code. #. Found in the About dialog. A button that, when you click it, it opens the URL of Pixelorama's source code.
msgid "Source Code" msgid "Source Code"
msgstr "" msgstr "Kildekode"
msgid "Donate" msgid "Donate"
msgstr "Donér" msgstr "Donér"
@ -1382,7 +1382,7 @@ msgstr "Belarussisk"
#. Found in the About dialog. #. Found in the About dialog.
msgid "Lead Developer" msgid "Lead Developer"
msgstr "" msgstr "Hovedudvikler"
#. Found in the About dialog. #. Found in the About dialog.
msgid "UI Designer" msgid "UI Designer"
@ -1390,7 +1390,7 @@ msgstr "UI-designer"
#. Found in the About dialog. Refers to the people who have contributed code to the project. #. Found in the About dialog. Refers to the people who have contributed code to the project.
msgid "Authors" msgid "Authors"
msgstr "" msgstr "Udviklere"
msgid "Art by: %s" msgid "Art by: %s"
msgstr "Kunst af: %s" msgstr "Kunst af: %s"

View file

@ -13,6 +13,8 @@ const BIN_ACTION := "trash"
var extensions := {} ## Extension name: Extension class var extensions := {} ## Extension name: Extension class
var extension_selected := -1 var extension_selected := -1
var damaged_extension: String var damaged_extension: String
## Extensions built using the versions in this array are considered compatible with the current Api
var legacy_api_versions = [5, 4]
class Extension: class Extension:
@ -157,14 +159,17 @@ func _load_extension(extension_file_or_folder_name: StringName, internal := fals
if extension_json.has("supported_api_versions"): if extension_json.has("supported_api_versions"):
var supported_api_versions = extension_json["supported_api_versions"] var supported_api_versions = extension_json["supported_api_versions"]
var current_api_version = ExtensionsApi.get_api_version()
if typeof(supported_api_versions) == TYPE_ARRAY: if typeof(supported_api_versions) == TYPE_ARRAY:
supported_api_versions = PackedInt32Array(supported_api_versions) supported_api_versions = PackedInt32Array(supported_api_versions)
# Extensions that support API version 4 are backwards compatible with version 5. # Extensions that support API version 4 are backwards compatible with version 5.
# Version 5 only adds new methods and does not break compatibility. # Version 5 only adds new methods and does not break compatibility.
# TODO: Find a better way to determine which API versions # TODO: Find a better way to determine which API versions
# have backwards compatibility with each other. # have backwards compatibility with each other.
if 4 in supported_api_versions and not 5 in supported_api_versions: if not current_api_version in supported_api_versions:
supported_api_versions.append(5) for legacy_version: int in legacy_api_versions:
if legacy_version in supported_api_versions:
supported_api_versions.append(current_api_version)
if not ExtensionsApi.get_api_version() in supported_api_versions: if not ExtensionsApi.get_api_version() in supported_api_versions:
var err_text := ( var err_text := (
"The extension %s will not work on this version of Pixelorama \n" "The extension %s will not work on this version of Pixelorama \n"
@ -173,7 +178,7 @@ func _load_extension(extension_file_or_folder_name: StringName, internal := fals
var required_text := str( var required_text := str(
"Extension works on API versions: %s" % str(supported_api_versions), "Extension works on API versions: %s" % str(supported_api_versions),
"\n", "\n",
"But Pixelorama's API version is: %s" % ExtensionsApi.get_api_version() "But Pixelorama's API version is: %s" % current_api_version
) )
Global.popup_error(str(err_text, required_text)) Global.popup_error(str(err_text, required_text))
print("Incompatible API") print("Incompatible API")

View file

@ -141,6 +141,8 @@ func add_animation(indices: Array, destination: int, from_tag: AnimationTag = nu
l = GroupLayer.new(project) l = GroupLayer.new(project)
Global.LayerTypes.THREE_D: Global.LayerTypes.THREE_D:
l = Layer3D.new(project) l = Layer3D.new(project)
if l == null: # Ignore copying this layer if it isn't supported
continue
var cels := [] var cels := []
for f in project.frames: for f in project.frames:
cels.append(l.new_empty_cel()) cels.append(l.new_empty_cel())
@ -185,8 +187,8 @@ func add_animation(indices: Array, destination: int, from_tag: AnimationTag = nu
# add more types here if they have a copy_content() method # add more types here if they have a copy_content() method
if src_cel is PixelCel: if src_cel is PixelCel:
var src_img = src_cel.copy_content() var src_img: ImageExtended = src_cel.copy_content()
var copy := project.new_empty_image() var copy: ImageExtended = new_cel.create_empty_content()
copy.blit_rect( copy.blit_rect(
src_img, Rect2(Vector2.ZERO, src_img.get_size()), Vector2.ZERO src_img, Rect2(Vector2.ZERO, src_img.get_size()), Vector2.ZERO
) )