ImporterMesh

Inherits: Resource < RefCounted < Object

A Resource that contains vertex array-based geometry during the import process.

Description

ImporterMesh is a type of Resource analogous to ArrayMesh. It contains vertex array-based geometry, divided in surfaces. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials.

Unlike its runtime counterpart, ImporterMesh contains mesh data before various import steps, such as lod and shadow mesh generation, have taken place. Modify surface data by calling clear, followed by add_surface for each surface.

Properties

Dictionary

_data

{ "surfaces": [] }

Methods

void

add_blend_shape ( String name )

void

add_surface ( PrimitiveType primitive, Array arrays, Array[] blend_shapes=[], Dictionary lods={}, Material material=null, String name="", int flags=0 )

void

clear ( )

void

generate_lods ( float normal_merge_angle, float normal_split_angle, Array bone_transform_array )

int

get_blend_shape_count ( ) const

BlendShapeMode

get_blend_shape_mode ( ) const

String

get_blend_shape_name ( int blend_shape_idx ) const

Vector2i

get_lightmap_size_hint ( ) const

ArrayMesh

get_mesh ( ArrayMesh base_mesh=null )

Array

get_surface_arrays ( int surface_idx ) const

Array

get_surface_blend_shape_arrays ( int surface_idx, int blend_shape_idx ) const

int

get_surface_count ( ) const

int

get_surface_format ( int surface_idx ) const

int

get_surface_lod_count ( int surface_idx ) const

PackedInt32Array

get_surface_lod_indices ( int surface_idx, int lod_idx ) const

float

get_surface_lod_size ( int surface_idx, int lod_idx ) const

Material

get_surface_material ( int surface_idx ) const

String

get_surface_name ( int surface_idx ) const

PrimitiveType

get_surface_primitive_type ( int surface_idx )

void

set_blend_shape_mode ( BlendShapeMode mode )

void

set_lightmap_size_hint ( Vector2i size )

void

set_surface_material ( int surface_idx, Material material )

void

set_surface_name ( int surface_idx, String name )


Property Descriptions

Dictionary _data = { "surfaces": [] }

There is currently no description for this property. Please help us by contributing one!


Method Descriptions

void