Moduprint/API/Methods: Difference between revisions

From Resonite Wiki
< Moduprint‎ | API
NewTab, NewActiveTab, NewTabWithContent
SetTabActive, NewPrint, NewPrintAt
Line 1: Line 1:
All methods listed here are accessible through slot [[Component:DynamicReferenceVariable|Dynamic Reference Variables]] named <code>Manager/Method.<i>name</i></code>.
All methods listed here are accessible through slot [[Component:DynamicReferenceVariable|Dynamic Reference Variables]] named <code>Manager/Method.<i>name</i></code>.
=== NewPrint ===
Creates a new print under the local user's space. Use <code>NewPrintTab</code> if you need the print to be created at a specific location.
{| class="wikitable"
|+Result
|-
! Name !! Type !! Purpose
|-
| <code>Manager/Local.Result</code> || {{Template:TypeColorCard|Slot}} || The created print.
|}
=== NewPrintAt ===
Creates a new print.
{| class="wikitable"
|+Context
|-
! Name !! Type !! !! Purpose
|-
| <code>Parent</code> || {{Template:TypeColorCard|Slot}} || Optional || The parent of the print, defaults to local user space.
|-
| <code>Position</code> || {{Template:TypeColorCard|float3}} || Optional || Global Position.
|-
| <code>Rotation</code> || {{Template:TypeColorCard|floatQ}} || Optional || Global Rotation.
|-
| <code>Scale</code> || {{Template:TypeColorCard|float3}} || Optional || Global Scale, defaults to <code>1</code>.
|}
{| class="wikitable"
|+Result
|-
! Name !! Type !! Purpose
|-
| <code>Manager/Local.Result</code> || {{Template:TypeColorCard|Slot}} || The created print.
|}


=== NewTab, NewActiveTab ===
=== NewTab, NewActiveTab ===
Line 18: Line 56:
| <code>Manager/Local.Result</code> || {{Template:TypeColorCard|Slot}} || The created tab.
| <code>Manager/Local.Result</code> || {{Template:TypeColorCard|Slot}} || The created tab.
|}
|}


=== NewTabWithContent ===
=== NewTabWithContent ===
Line 42: Line 79:
|-
|-
| <code>Manager/Local.Result</code> || {{Template:TypeColorCard|Slot}} || The created tab.
| <code>Manager/Local.Result</code> || {{Template:TypeColorCard|Slot}} || The created tab.
|}
=== SetTabActive ===
{| class="wikitable"
|+Context
|-
! Name !! Type !! !! Purpose
|-
| <code>Tab</code>/<code>Print</code> || {{Template:TypeColorCard|Slot}} || Required || The tab to set active or the print itself to set no tab active.
|}
|}



Revision as of 16:11, 4 August 2025

All methods listed here are accessible through slot Dynamic Reference Variables named Manager/Method.name.

NewPrint

Creates a new print under the local user's space. Use NewPrintTab if you need the print to be created at a specific location.

Result
Name Type Purpose
Manager/Local.Result Slot The created print.

NewPrintAt

Creates a new print.

Context
Name Type Purpose
Parent Slot Optional The parent of the print, defaults to local user space.
Position float3 Optional Global Position.
Rotation floatQ Optional Global Rotation.
Scale float3 Optional Global Scale, defaults to 1.
Result
Name Type Purpose
Manager/Local.Result Slot The created print.

NewTab, NewActiveTab

Context
Name Type Purpose
Print Slot Required The print to create a new tab on.
Result
Name Type Purpose
Manager/Local.Result Slot The created tab.

NewTabWithContent

The tab content holder is created directly under the provided pack target slot.

Context
Name Type Purpose
Print Slot Required The print to create a new tab on.
Content Slot Required The content slot of the tab.
PackTarget Slot Optional Where the tab is parented to.
Result
Name Type Purpose
Manager/Local.Result Slot The created tab.

SetTabActive

Context
Name Type Purpose
Tab/Print Slot Required The tab to set active or the print itself to set no tab active.

Snap

Context
Name Type Purpose
Print Slot Required The print to snap to.
Target Slot Required Object to snap to the print.
Result
Name Type Purpose
Manager/Local.Result String Default, Drop, Handled.