Class
WrapLayer
The WrapLayer object defines a 3D accessory's inner and outer surfaces and other properties related to layering accessories. These surfaces, or the Inner Cage and Outer Cage, are similar to collision boxes, and describe the surfaces of which other 3D accessories can be placed without clipping or breaking.
The WrapLayer object defines a 3D accessory's inner and outer surfaces and other properties related to layering accessories. These surfaces, or the Inner Cage and Outer Cage, are similar to collision boxes, and describe the surfaces of which other 3D accessories can be placed without clipping or breaking.
Internally, WrapLayer also uses the UV layout of the Inner and Outer cages to match coordinates to another 3D object's cage. This powers the deformation of objects around differently shaped avatars and underlying accessories.
Properties 12#
AutoSkinWrapLayerAutoSkin | Determines whether this WrapLayer automatically transfers skinning data from the underlying body mesh to the clothing mesh.ReadSafe |
BindOffsetCFrame | CFrame is used to adjust a binding point for clothing item
mesh. Could be used to move and rotate clothing items. This property is
intended for fine-tuning only and it is heavily optional.Write: PluginSecurityReadSafe |
ColorColor3 | Sets color used for the debug rendering. See WrapTarget.DebugMode.ReadSafeNotReplicatedNotScriptable |
DebugModeWrapLayerDebugMode | Allows switching between different debugging visualization modes for cage meshes.ReadSafeNotReplicatedNotScriptable |
Enabledboolean | Allows for disabling of the WrapLayer object as if it does not
exist.ReadSafe |
Orderint | Controls the composition order for layered clothing.ReadSafe |
Puffinessfloat | Controls how much underlying clothing items inflate the current clothing item.ReadSafe |
ReferenceMeshContentContent | The reference mesh that defines the Inner Cage of the WrapLayer,
stored as a Content value.Write: PluginSecurityReadSafe |
ReferenceMeshIdContentId | AssetID for reference mesh used to define Inner Cage of a 3D object.Write: PluginSecurityReadSafe |
ReferenceOriginCFrame | Reference mesh offset relative to parent MeshPart (in the parent MeshPart
space)
Note: this property is set up automatically by the FBX importer.Write: PluginSecurityReadSafe |
ReferenceOriginWorldCFrame | Reference mesh offset relative to parent MeshPart (in the world space)
Note: this property is set up automatically by the FBX importer.ReadSafeReadOnlyNotReplicated |
ShrinkFactorfloat | Allows slight shrinking/expanding of the resulting render mesh, without affecting any other layers.Write: PluginSecurityReadSafe |
AutoSkin: WrapLayerAutoSkin#
ReadSafe
Determines whether this WrapLayer automatically transfers skinning data
from the underlying body mesh to the clothing mesh. When set to
EnabledOverride, skinning is
applied regardless of whether the clothing mesh already has skinning data.
When set to EnabledPreserve,
skinning is only applied if the mesh does not already have skinning data.
This property requires StarterPlayer.LoadCharacterLayeredClothing
to be set to Enabled (or Default) in order to function. When layered
clothing is disabled, the auto-skinning pipeline does not run and this
property has no effect.
For more information, see Automatic Skinning Transfer.
BindOffset: CFrame#
Write: PluginSecurityReadSafe
This property is intended for fine-tuning purposes and is highly optional.
CFrame to adjust a binding point for a clothing item mesh.
Allows for fine-tuning of clothing items (slight adjustment of
position/rotation to get a unique look) in contexts such as community-made
avatar editors.
Color: Color3#
NotReplicatedNotScriptableReadSafe
Sets color used for the debug rendering. See WrapTarget.DebugMode
DebugMode: WrapLayerDebugMode#
NotReplicatedNotScriptableReadSafe
Allows switching between different debugging visualization modes for cage meshes.
Enabled: boolean#
ReadSafe
Allows for disabling of the WrapLayer object as if it does not
exist.
Order: int#
ReadSafe
Controls the composition order for layered clothing. Clothing items with higher order will appear on top of clothing items with lower order. If two items have the same order, the deformer composition order is ambiguous and depends on serialization order. Default value is 1.
Puffiness: float#
DeprecatedReadSafe
Controls how much underlying clothing items inflate the current clothing item.
Valid range is -1 to 1. A value of -1 compresses the clothing, body, and all underlying layers such that the clothing itself takes the shape of the body. A value of 0 makes the clothing item fit as if it was the only piece of clothing being worn, compressing all underlying layers. A value of 1 (default) never compresses anything and infinitely inflates over underlying clothing items.
ReferenceMeshContent: Content#
Write: PluginSecurityReadSafe
The reference mesh that defines the inner cage of a WrapLayer,
stored as a Content value. Together with the outer cage from
CageMeshContent, the inner cage describes
the surfaces used to fit and deform the accessory around an avatar and
underlying accessories without clipping. A WrapLayer is only
considered valid once both its cage mesh and its reference mesh are set.
The reference mesh establishes the standard topology and UV coordinates used for index matching. It is expected that for all catalog avatars this points to one of the 15 standard reference meshes provided by Roblox, but for some NPCs or a custom avatar system it might point to a different mesh. This property is normally set up automatically by the Importer.
This Content-typed property is the successor to
WrapLayer.ReferenceMeshId and reads and writes the same underlying
storage. Defaults to an empty Content.
ReferenceMeshId: ContentId#
Write: PluginSecurityReadSafe
AssetID for reference mesh used to define Inner Cage of a 3D object
Reference mesh is used to define standard topology and UV coordinates for index matching. It is expected that for all catalog avatars, this will point to one of 15 standard reference meshes provided by Roblox. But for some NPCs or a custom avatar system, this might point to other meshes.
Note: this property is set up automatically by the FBX importer
ReferenceOrigin: CFrame#
Write: PluginSecurityReadSafe
Reference mesh offset relative to parent MeshPart (in the parent MeshPart space)
Note: this property is set up automatically by the FBX importer
ReferenceOriginWorld: CFrame#
ReadOnlyNotReplicatedReadSafe
Reference mesh offset relative to parent MeshPart (in the world space)
Note: this property is set up automatically by the FBX importer
ShrinkFactor: float#
DeprecatedWrite: PluginSecurityReadSafe
This property is intended for fine-tuning purposes and is highly optional.
Allows slight shrinking/expanding of the resulting render mesh, without affecting any other layers. This is useful in rare cases when the clothing mesh does not precisely fit the underlying clothing layers (the cage is usually slightly overestimated atop the real shape to avoid layer interpenetration). Even slight overestimation has the tendency to accumulate, especially when there are a lot of layers. While this is usually not critical, some items like backpacks may be problematic.
Valid range is -1 to 1. A value of -1 will maximally expand while a value of 1 will maximally shrink. A value of 0 (default) has no effect.
Inherited members#
Inherited from BaseWrap 8
Properties (8)
CageMeshContent, CageMeshId, CageOrigin, CageOriginWorld, HSRAssetId, HSRContent, ImportOrigin, ImportOriginWorld
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild