Editor.Assets.SegmentationType
EnumBuilt in segmentation textures to be used with Editor.Assets.SegmentationTexture.
Index
Enumeration Members
Example
const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
const assetManager = model.project.assetManager;
// Create a SegmentationTexture and configure its type
const seg = assetManager.createNativeAsset(
'SegmentationTexture', 'PortraitSeg', new Editor.Model.SourcePath(new Editor.Path(''), Editor.Model.SourceRootDirectory.Assets)
) as Editor.Assets.SegmentationTexture;
// Set to portrait segmentation (full body mask)
seg.segmentationType = Editor.Assets.SegmentationType.PortraitSegmentation;
seg.feathering = 0.5;
seg.refineEdge = true;
console.log(`"${seg.name}": type=Portrait, feathering=${seg.feathering}, refineEdge=${seg.refineEdge}`);
// Switch to hair segmentation
seg.segmentationType = Editor.Assets.SegmentationType.PortraitHair;
seg.invertMask = true;
console.log(`Switched to PortraitHair, invertMask=${seg.invertMask}`);
Enumeration Members
Body
Body:
number
Body region segmentation.
Footwear
Footwear:
number
Footwear segmentation.
FullGarment
FullGarment:
number
Full body clothing segmentation.
LowerGarment
LowerGarment:
number
Lower body clothing segmentation.
PortraitFace
PortraitFace:
number
Face region segmentation.
PortraitHair
PortraitHair:
number
Hair region segmentation.
PortraitHead
PortraitHead:
number
Head region segmentation.
PortraitSegmentation
PortraitSegmentation:
number
Full portrait segmentation mask.
PortraitShoulder
PortraitShoulder:
number
Shoulder region segmentation.
PortraitSkin
PortraitSkin:
number
Skin region segmentation.
Sky
Sky:
number
Sky region segmentation.
UpperGarment
UpperGarment:
number
Upper body clothing segmentation.