EditorScenePostImport

Post-processes 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
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(EditorScenePostImport other)
opEquals
bool opEquals(typeof(null) n)
postImport
GodotObject postImport(GodotObject scene)

Called after the scene was imported. This method must return the modified version of the scene.

toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Static functions

_new
EditorScenePostImport _new()

Construct a new instance of EditorScenePostImport. Note: use memnew!EditorScenePostImport instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
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
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(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