Wiki says MASK_OWNER shows current owner permissions: http://wiki.secondlife.com/wiki/LlGetObjectPermMask
Running a script in a box in which I have (A) items that i can't copy (they are non-copiable for me, made by somebody else) and (B) some prims I have just made, leaving next-owner perms as no copy -- but these prims are still copiable in my hands, of course.
I want to make a list of only the ones that are non-copiable for me. That would be Group A above.
My expection was that the filter:
(~PERM_COPY & llGetInventoryPermMask(myitem,MASK_OWNER) )
would pick the Group A ones up, and ignore the Group B ones.
But it doesn't ignore the Group B ones; it adds them in, even though my owner permissions on them are copy.
I must be doing something wrong; bleary eyes I guess. Can anyone spot what I'm doing wrong?
integer i;
integer type = INVENTORY_ALL;
list non-copiables = [];
string myitem;
n = llGetInventoryNumber(type);
for (i = 0; i < n; ++i) {
myitem = llGetInventoryName(type, i);
if (~PERM_COPY & llGetInventoryPermMask(myitem, MASK_OWNER) ) {
llSay(0, "adding to non-copiables " + myitem);
non-copiables = non-copiables + [myitem];
}
}
