EditorScenePostImport

Post process scenes after import

Imported scenes can be automatically modified right after import by setting their Custom Script Import property to a tool script that inherits from this class. The postImport callback receives the imported scene's root node and returns the modified version of the scene. Usage example:

More...

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

getSourceFile
String getSourceFile()

Returns the source file path which got imported (e.g. res://scene.dae).

getSourceFolder
String getSourceFolder()

Returns the resource folder the imported scene file is located in.

opAssign
EditorScenePostImport opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(EditorScenePostImport other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
postImport
GodotObject postImport(GodotObject scene)

Gets called after the scene got imported and has to return the modified version of the scene.

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Static functions

_new
EditorScenePostImport _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
ToRef as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Detailed Description

tool # needed so it runs in editor extends EditorScenePostImport

This sample changes all node names

# Called right after the scene is imported and gets the root node func post_import(scene): # change all node names to "modified_oldnodename" iterate(scene) return scene # remember to return the imported scene

func iterate(node): if node != null: node.name = "modified_"+node.name for child in node.get_children(): iterate(child)

Meta