mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
classref: Sync with current 4.0 branch (d0c0d44)
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
.. DO NOT EDIT THIS FILE!!!
|
||||
.. Generated automatically from Godot engine sources.
|
||||
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
|
||||
.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/EditorResourceConversionPlugin.xml.
|
||||
.. Generator: https://github.com/godotengine/godot/tree/4.0/doc/tools/make_rst.py.
|
||||
.. XML source: https://github.com/godotengine/godot/tree/4.0/doc/classes/EditorResourceConversionPlugin.xml.
|
||||
|
||||
.. _class_EditorResourceConversionPlugin:
|
||||
|
||||
@@ -30,13 +30,13 @@ Below shows an example of a basic plugin that will convert an :ref:`ImageTexture
|
||||
|
||||
extends EditorResourceConversionPlugin
|
||||
|
||||
func _handles(resource : Resource):
|
||||
func _handles(resource: Resource):
|
||||
return resource is ImageTexture
|
||||
|
||||
func _converts_to():
|
||||
return "PortableCompressedTexture2D"
|
||||
|
||||
func _convert(itex : Resource):
|
||||
func _convert(itex: Resource):
|
||||
var ptex = PortableCompressedTexture2D.new()
|
||||
ptex.create_from_image(itex.get_image(), PortableCompressedTexture2D.COMPRESSION_MODE_LOSSLESS)
|
||||
return ptex
|
||||
|
||||
Reference in New Issue
Block a user