summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-07-24 17:12:42 +0200
committerGitHub <noreply@github.com>2018-07-24 17:12:42 +0200
commit4bf9031e528ee79270f7ca9a1d5e25518feb9925 (patch)
tree5d23936e24aeb23e9b2d0560e0e9cef94f806bb7
parenta2f9ce2569bf2e16b3b4c5d2376a2e1fb0def90e (diff)
parent817f315eae55008bb05279fbda428bbba1b9dd30 (diff)
Merge pull request #20278 from Noshyaar/0
Fix example code for EditorImportPlugin
-rw-r--r--doc/classes/EditorImportPlugin.xml11
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index e48eb82691..b21d402468 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -35,19 +35,20 @@
func get_import_options(i):
return [{"name": "my_option", "default_value": false}]
- func load(src, dst, opts, r_platform_variants, r_gen_files):
+ func import(source_file, save_path, options, r_platform_variants, r_gen_files):
var file = File.new()
- if file.open(src, File.READ) != OK:
+ if file.open(source_file, File.READ) != OK:
return FAILED
var mesh = Mesh.new()
- var save = dst + "." + get_save_extension()
- ResourceSaver.save(file, mesh)
+ var filename = save_path + "." + get_save_extension()
+ ResourceSaver.save(filename, mesh)
return OK
[/codeblock]
</description>
<tutorials>
+ <link>http://docs.godotengine.org/en/3.0/tutorials/plugins/editor/import_plugins.html</link>
</tutorials>
<demos>
</demos>
@@ -119,7 +120,7 @@
<return type="String">
</return>
<description>
- Get the godot resource type associated with this loader. e.g. "Mesh" or "Animation".
+ Get the Godot resource type associated with this loader. e.g. "Mesh" or "Animation".
</description>
</method>
<method name="get_save_extension" qualifiers="virtual">