FxVoxelCapsule ​
This module contains functions for nodes that inherit from VoxelCapsule, which are nodes of type VoxelSceneReference, VoxelHeightmapReference and VoxelMovieReference.
Load ​
FxVoxelCapsule = require "FxVoxelCapsule";Functions ​
| Function | Description |
|---|---|
| Convert (NodeID) | Converts a VoxelCapsule node into a VoxelLayer node. |
| Flip (NodeID, Axis) | Flips the voxel grids of a voxel capsule node |
| Rotate90 (NodeID, Axis, Steps) | Rotates the voxel grids of a voxel capsule node in 90° steps. |
Convert (NodeID) ​
This function converts the given VoxelCapsule node into a VoxelLayer node, making its voxel grids editable. The NodeID of the converted node remains the same.
Parameters ​
- NodeID: The NodeID of the VoxelCapsule node to convert
Errors ​
Possible errors include FX_REQUIRED_ASSET_UNAVAILABLE, FX_NODE_NOT_FOUND
Since ​
Version 1.0
Example ​
-- convert "Reference1" to a VoxelLayer
FxVoxelCapsule.Convert("Reference1");Flip (NodeID, Axis) ​
This function flips the voxel grids of the given VoxelCapsule node along the given axis.
Parameters ​
Errors ​
Possible errors include FX_REQUIRED_ASSET_UNAVAILABLE, FX_NODE_NOT_FOUND, FX_VALUE_INVALID
Since ​
Version 1.0
Example ​
-- flip along y-axis
FxVoxelCapsule.Flip("Reference1", 1);Rotate90 (NodeID, Axis, Steps) ​
This function rotates the voxel grid of the given VoxelCapsule node around the given axis in 90° steps.
Parameters ​
- NodeID: The NodeID to identify the VoxelCapsule nodes to rotate
- Axis: The rotation Axis3D
- Steps: The number of 90° rotation steps
Errors ​
Possible errors include FX_REQUIRED_ASSET_UNAVAILABLE, FX_NODE_NOT_FOUND, FX_VALUE_INVALID
Since ​
Version 1.0
Example ​
-- rotate 90° counter clockwise around z-axis
FxVoxelCapsule.Rotate90("Reference1", 2, -1);