@addoutfit is a restriction that stops the user from putting on clothing and body parts. With an option it
applies only to one wearable layer; without one it applies to every layer. Things already being worn stay on (removing them is
governed by @remoutfit). It is the counterpart of @addattach, which does
the same for attachments.
The same name sent with =force is something entirely different: an undocumented alias of
@attach (force-wear a shared folder). See Force form.
@addoutfit[:<layer>]=<y/n> (also =add / =rem)
@addoutfit:<folder1/.../folderN>=force (alias of @attach)
gloves, jacket, pants, shirt, shoes, skirt, socks, underpants, undershirt, skin, eyes, hair, shape, alpha, tattoo, physics, universal. The comparison is exact (after lower-casing the whole command). An unknown
layer name is stored without complaint but never matches anything.canWear()).addoutfit (including
addoutfit:shirt) blocks them entirely, not just the one layer.#RLV/~) are exempt from this restriction (isInventoryItemNew(), matched by item or parent-folder name).
This name-based check also exempts any other item that happens to share that name.@addoutfit:skin=n effectively freezes the current skin.
In Marine's code the body-part branch of the COF wear routine only checks canUnwear()
(@remoutfit), not canWear(); whether other wear paths catch body parts under @addoutfit should be confirmed in-world.on_rez/attach.// No new clothes at all
llOwnerSay("@addoutfit=n");
// Only forbid putting on a shirt or a jacket
llOwnerSay("@addoutfit:shirt=n,addoutfit:jacket=n");
// Lift the shirt restriction
llOwnerSay("@addoutfit:shirt=y");
@addoutfit:<path>=force runs exactly the same code as @attach:<path>=force
in both clients. Every other attach… force command has a matching addoutfit… alias:
@addoutfitover, @addoutfitoverorreplace, @addoutfitall, @addoutfitallover, @addoutfitalloverorreplace, @addoutfitthis, @addoutfitthisover, @addoutfitthisoverorreplace, @addoutfitallthis, @addoutfitallthisover, @addoutfitallthisoverorreplace. None of them is documented in the spec. Sending one of these alias names with =n just stores an inert restriction,
except that in Marine's viewer the prefix checks described above will see it (for example @addoutfitover=n blocks folder
drag-and-drop wearing).
universal; the code accepts it.addoutfit or
addoutfit:<layer>.RRInterface::add()/remove() (RRInterface.cpp:1240-1482); there is no
validation of the name or option.canWear(LLWearableType::EType) RRInterface.cpp:5922-5957 (exact contains("addoutfit") and
contains("addoutfit:"+layer)), called from canWear(LLInventoryItem*) :5877-5920, which also applies the
new-item exemption and folder locks. Layer names: getOutfitLayerAsString() :2505-2527, constants in
RRInterface.h:46-63.llappearancemgr.cpp:1556 (clothing), :2871 (category wear filtering);
lltooldraganddrop.cpp:3008-3014 and llviewermenu.cpp:9001-9020 use containsSubstr("addoutfit").RRInterface.cpp:2199-2201.canWear() (mkrlinterface.cpp:7020-7068) skips all checks while “restoring outfit” (RLV disabled,
avatar cloud or outfit restore at login) and has no new-item exemption (compiled out).contains("addoutfit")
(lltooldraganddrop.cpp:2893-2896, llviewermenu.cpp:3886,3902), so a single-layer restriction does not block
dropping a whole folder there, whereas in Marine's viewer it does.addoutfit explicitly in its wear routine (llappearancemgr.cpp:740-752) for both clothing and
body parts.addoutfit (restriction) in its command table (mkrlinterface.cpp:436); the force
aliases work but are not listed.This command works differently from RLVa's @addoutfit; see the comparison.