Skip to content

AssetViewport3D ​

Inherits: VBoxContainer

A 3D preview of a scene you can turn around: the scene is shown in a world of its own (a ground grid, a light, a background), and you drag to orbit, turn the wheel to zoom and drag with the middle or right button to move. A row of buttons above it has Frame (fits the scene in the view), Reset, the grid, the floor (off: the parts of an effect under the ground show), the Figure to judge the size by, and the light (neutral, bright, dark: the glow of an effect shows in the dark). Every new scene starts from the Reset angle, framed. The FIGURE (a row under the buttons while it is on) is a skeleton of Model Scenes playing an animation of a set you choose (search the list), or the plain 1.8 m stand-in; with figure_attach_enabled what is shown can be put ON it (Attach: base, feet, chest, head, overhead, a hand, the weapon in either hand) and rides it as it moves. Used by the Model Scenes and VFX tabs (Entity Assets / Assets), and made to be put in the catalogs that choose a skeleton or an effect. It only draws while it is visible. Put your own controls in extra_bar (the row of buttons), or under the view. See docs: Entity Assets > Model Scenes.

Properties ​

floatview_height340.0:
floatmax_frame_radius40.0
boolshow_figure_by_defaultfalse
boolfigure_attach_enabledfalse:

Variables ​

intlast_look0
boolshow_floortrue
Nodecontentnull
Vector3targetVector3(0.0, 1.0, 0.0)
floatdistance5.0
floatyawDEFAULT_YAW
floatpitch0.35
HBoxContainerfigure_rownull
OptionButtonskeleton_optionnull
OptionButtonanimation_set_optionnull
LineEditanimation_searchnull
OptionButtonanimation_optionnull
OptionButtonattach_optionnull
Node3Dfigure_holdernull
Node3Dfigure_skeletonnull
AnimationPlayerfigure_playernull
Stringattach_key""
Callabletool_inputCallable()
Array[AxisGizmo3D]gizmos[]
CheckBoxlocal_axes_checknull
boolgizmo_localfalse
MeshInstance3Dmaterial_itemnull
Stringlocked_skeleton""

Methods ​

AssetViewport3Dattach_under( anchor: Control, height: float = 240.0 ) static
boolshow_scene( path: String )
boolshow_material( path: String )
voidset_material_item( node: MeshInstance3D )
boolmaterial_is_coat()
voidshow_node( node: Node )
voidclear()
voidshow_note( text: String )
AABBget_content_bounds()
voidframe()
voidreset_view()
voidturn_around()
Arrayray_through( point: Vector2 )
Vector2screen_point( world_point: Vector3 )
boolis_in_front( world_point: Vector3 )
boolis_attached()
Stringselected_animation_set()
Node3Dget_figure_point( key: String )
AxisGizmo3Dadd_gizmo()
voidremove_gizmo( gizmo: AxisGizmo3D )
voidlock_figure( skeleton_name: String )

Signals ​

content_loaded( instance: Node ) ​

A scene was put in the view (its instance)

content_cleared() ​

The view was emptied

figure_changed( skeleton: Node3D ) ​

The figure changed (a skeleton was put in, or the stand-in): skeleton is the GeneralSkeleton, null for the stand-in

Constants ​

  • Array[Dictionary] LOOKS = [ - The light of the world of the view: the name, the colour of the background, the ambient light and the strength of the sun
  • float PARTICLE_FRAME_SIZE = 3.0 - How big the box of one particle node counts when a scene is framed (metres across, at most)
  • String SCENE = "res://addons/chroniclenode/editor_components/controls/asset_viewport_3d.tscn" - The scene of the control
  • Array ATTACH_POINTS = [["None", ""], ["Base", "base"], ["Feet", "feet"], ["Chest", "chest"], ["Head... - The places the scene can be put on the figure: [what it is called, its key] (the VFX locations, and the two weapons)
  • String STAND_IN = "None" - The first entry of the Skeleton list: the plain 1.8 m figure (2026-11-14, the user: no skeleton and no animation set at first, None in both lists; a set that does not suit the skeleton floods the output with track warnings)
  • String NO_SET = "None"
  • String SETTINGS_SECTION = "asset_viewport_figure" - Where the choices of the figure are kept (per project, per person: the editor's project metadata)
  • float DEFAULT_YAW = 0.6 + PI - The first angle: the camera is in front of a character (a character of Godot faces -Z, so the camera is on the -Z side), a little to its right
  • float DEFAULT_PITCH = 0.35

Property descriptions ​

float view_height = 340.0: ​

How tall the view is at least

float max_frame_radius = 40.0 ​

The size of the biggest thing Frame fits in the view: a scene bigger than this (a weather over a whole sky) is framed as if it were this big

bool show_figure_by_default = false ​

Is the 1.8 m figure shown to begin with?

bool figure_attach_enabled = false: ​

Can what is in the view be put ON the figure (Attach: a hand, the head, the weapon in its hand ...)? The VFX preview and the Equipment Mesh editor turn it on

Variable descriptions ​

int last_look = 0 ​

The look every view opens with (the one you chose last)

bool show_floor = true ​

Is the solid floor shown (the one you chose last, in every view)? Off shows the parts of an effect under the ground

Node content = null ​

The scene in the view (null when there is none)

Vector3 target = Vector3(0.0, 1.0, 0.0) ​

Where the camera looks, how far it is, and the angles it is turned to (radians; the pitch is up positive)

float distance = 5.0 ​

No description yet.

float yaw = DEFAULT_YAW ​

No description yet.

float pitch = 0.35 ​

No description yet.

HBoxContainer figure_row = null ​

THE FIGURE (2026-11-14, the user: a real skeleton playing an animation in place of the 1.8 m stand-in, and what is shown can be put on it) The row under the buttons (shown while Figure is on)

OptionButton skeleton_option = null ​

No description yet.

OptionButton animation_set_option = null ​

No description yet.

No description yet.

OptionButton animation_option = null ​

No description yet.

OptionButton attach_option = null ​

No description yet.

Node3D figure_holder = null ​

What holds the skeleton and its AnimationPlayer (its root node is this holder, as character creation does)

Node3D figure_skeleton = null ​

The GeneralSkeleton of the figure (null: the stand-in)

AnimationPlayer figure_player = null ​

No description yet.

String attach_key = "" ​

Where the scene is put on the figure ("" none)

Callable tool_input = Callable() ​

A TOOL of an editor that works in the view (handles you drag, a click on a mesh): it gets the mouse first, and when it returns true the camera does not move. func(event: InputEvent) -> bool

Array[AxisGizmo3D] gizmos = [] ​

THE MOVE GIZMOS in the view (2026-11-14: AxisGizmo3D, an X, a Y and a Z arrow on a point; add_gizmo()): they get the mouse before the tool and the camera

CheckBox local_axes_check = null ​

The Local axes switch of the toolbar (shown while the view has a gizmo): the arrows along the axes of the bone or mesh the point is in, not the world's

bool gizmo_local = false ​

(the choice of the last view, in every view)

MeshInstance3D material_item = null ​

the weapon a coat (a material for "The Enchanted Item") is shown on, set by the VFX tab's Weapon row (in the figure's hand or a mesh of its own); null: the weapon in the figure's main hand

String locked_skeleton = "" ​

The skeleton the figure is held to ("" none: the Skeleton list chooses)

Method descriptions ​

AssetViewport3D attach_under( anchor: Control, height: float = 240.0 ) ​

Makes a view and puts it under a control (the row of a picker that chooses a scene), for the editors that show what was chosen

bool show_scene( path: String ) ​

Puts the scene of a file in the view (the one in it goes) and fits it in the view. A file that holds a mesh is shown as a mesh. False (and a message) when the file is not a scene or a mesh that loads

bool show_material( path: String ) ​

Shows a material on a capsule (1.8 m tall, the size of a character) as its material override, so an effect that changes the look of a creature can be judged. False when the file is not a material

void set_material_item( node: MeshInstance3D ) ​

The weapon a coat is shown on (null: none picked); the material is put on again

bool material_is_coat() ​

True when the material shown goes on a weapon (a coat)

void show_node( node: Node ) ​

Puts a node you made in the view (the one in it goes) and fits it

void clear() ​

Empties the view

void show_note( text: String ) ​

Says something in the view in place of a scene (the view stays empty)

AABB get_content_bounds() ​

The box around everything the scene draws (an empty box when it draws nothing)

void frame() ​

Fits the scene in the view: the camera looks at the middle of it from far enough to see all of it

void reset_view() ​

Turns the camera back to its first angle and frames the scene

void turn_around() ​

Goes to the other side of the scene (half a turn): for a model that faces the other way

Array ray_through( point: Vector2 ) ​

The ray of the camera through a point of the view (the position of a mouse event on it): [origin, direction] in the world of the view

Vector2 screen_point( world_point: Vector3 ) ​

Where a point of the world is on the view (pixels), and is it in front of the camera?

bool is_in_front( world_point: Vector3 ) ​

No description yet.

bool is_attached() ​

Is what is shown put on the figure?

String selected_animation_set() ​

The animation set chosen ("" for None)

Node3D get_figure_point( key: String ) ​

The node of the figure an attach key names (null: none, or the stand-in)

AxisGizmo3D add_gizmo() ​

Makes a move gizmo in the view (three arrows; AxisGizmo3D): it gets the mouse first, keeps its size on the screen, and the toolbar shows Local axes. Listen to its dragged; set its follow (or its position)

void remove_gizmo( gizmo: AxisGizmo3D ) ​

Takes a move gizmo out of the view

void lock_figure( skeleton_name: String ) ​

Shows one skeleton as the figure and hides the Skeleton list (the Skeletons tab shows the skeleton it edits); "" gives the list back. The animation set and the animation stay to choose