Skip to main content

smartbuild.import_and_place_mesh

Overview

  • Runtime-import a 3D mesh file (.glb/.gltf) and spawn it at the world location under the given screen pixel. Used by the file drag-and-drop controller for mesh drops. Import is asynchronous: the CLI returns immediately with status="import_started" and the spawn happens after Interchange completes (a few hundred ms typically). On a hit miss (e.g. drop on sky) the actor is not spawned and a log line is emitted. FBX is not supported in this version (no runtime FBX parser); convert to .glb first.

Metadata

FieldValue
DisplayImport And Place Mesh (Drop)
Categorysmartbuild
AccessScriptCheat
ScopeB1Standalone
TagsExperimental
Aliases

Parameters

NameTypeRequiredDefaultDescription
file_pathstringyesAbsolute path to a .glb or .gltf file.
xfloatyesScreen X pixel (viewport-local) where the user dropped the file.
yfloatyesScreen Y pixel (viewport-local) where the user dropped the file.
yawfloatno0Yaw rotation in degrees applied to the spawned actor (default 0).

Returns

  • Return shape is not declared for this command.

Usage

await inzoi.cli.execute('smartbuild.import_and_place_mesh', {
file_path: '',
x: 0.0,
y: 0.0,
yaw: 0, // optional
});