A native asset that provides information for segmentation texture. Import with Editor.Model.AssetManager.createNativeAsset.

const model = pluginSystem.findInterface(Editor.Model.IModel);
const assetManager = model.project.assetManager;

const destination new Editor.Path('');
const segmentationType = Editor.Assets.SegmentationType.PortraitHair;

const result = assetManager.createNativeAsset('SegmentationTexture', 'Segmentation Texture', destination);
result.segmentationType = segmentationType;
interface SegmentationTexture {
    feathering: number;
    fileMeta: AssetImportMetadata;
    id: Uuid;
    invertMask: boolean;
    name: string;
    refineEdge: boolean;
    segmentationType: SegmentationType;
    type: string;
    getDirectlyReferencedEntities(): Entity[];
    getOwnedEntities(): Entity[];
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
    remapReferences(referenceMapping: object): void;
}

Hierarchy (view full)

Properties

feathering: number
id: Uuid

The unique id of the entity.

invertMask: boolean
name: string

The name of the asset.

refineEdge: boolean
segmentationType: SegmentationType
type: string

The entity's type.

Methods

  • Beta

    Parameters

    • type: string

    Returns boolean

  • Beta

    Swap this entity for another one based on a JSON of the current entity id and the target entity id.

    Parameters

    • referenceMapping: object

    Returns void