EditorSceneFormatImporter
Imports scenes from third-parties' 3D files.
Imports scenes from third-parties' 3D files.
EditorSceneFormatImporter allows to define an importer script for a third-party 3D format.
To use EditorSceneFormatImporter, register it using the EditorPlugin.AddSceneFormatImporterPlugin method first.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
EditorSceneFormatImporterConstructor
public EditorSceneFormatImporter();Methods6
AddImportOptionvoid
public void AddImportOption(string name, Variant value);Add a specific import option (name and default value only). This function can only be called from EditorSceneFormatImporter._GetImportOptions.
| Name | Type | Default |
|---|---|---|
name | string | — |
value | Variant | — |
AddImportOptionAdvancedvoid
public void AddImportOptionAdvanced(Variant.Type type, string name, Variant defaultValue, PropertyHint hint = PropertyHint.None, string hintString = "", int usageFlags = 6);Add a specific import option. This function can only be called from EditorSceneFormatImporter._GetImportOptions.
| Name | Type | Default |
|---|---|---|
type | Variant.Type | — |
name | string | — |
defaultValue | Variant | — |
hint | PropertyHint | PropertyHint.None |
hintString | string | "" |
usageFlags | int | 6 |
_GetExtensionsstring[]
public virtual string[] _GetExtensions();Return supported file extensions for this scene importer.
string[]_GetImportOptionsvoid
public virtual void _GetImportOptions(string path);Override to add general import options. These will appear in the main import dock on the editor. Add options via EditorSceneFormatImporter.AddImportOption and EditorSceneFormatImporter.AddImportOptionAdvanced.
Note: All EditorSceneFormatImporter and EditorScenePostImportPlugin instances will add options for all files. It is good practice to check the file extension when path is non-empty.
When the user is editing project settings, path will be empty. It is recommended to add all options when path is empty to allow the user to customize Import Defaults.
| Name | Type | Default |
|---|---|---|
path | string | — |
_GetOptionVisibilityVariant
public virtual Variant _GetOptionVisibility(string path, bool forAnimation, string option);Should return true to show the given option, false to hide the given option, or null to ignore.
| Name | Type | Default |
|---|---|---|
path | string | — |
forAnimation | bool | — |
option | string | — |
Variant_ImportSceneReckfellObject
public virtual ReckfellObject _ImportScene(string path, uint flags, Reckfell.Collections.Dictionary options);Perform the bulk of the scene import logic here, for example using GltfDocument or FbxDocument.
| Name | Type | Default |
|---|---|---|
path | string | — |
flags | uint | — |
options | Reckfell.Collections.Dictionary | — |
ReckfellObjectEditorSceneFormatImporter.ImportFlags
| Value | Description |
|---|---|
Animation = 2 | Import animations from the 3D scene. When importing a scene as an |
DiscardMeshesAndMaterials = 32 | Ignore meshes and materials on import. When importing a scene as an |
FailOnMissingDependencies = 4 | Unused flag (this has no effect when enabled). |
ForceDisableMeshCompression = 64 | If |
GenerateTangentArrays = 8 | If |
Scene = 1 | Unused flag (this has no effect when enabled). |
UseNamedSkinBinds = 16 | If checked, use named
|