[sldev] Another Technical question

Melinda Green melinda at superliminal.com
Sat May 16 12:41:51 PDT 2009


The permissions you care capable of setting on existing objects are 
sometimes different from what you can specify when creating new objects. 
There are lots of different kinds of objects and lots of different way 
in which they can be created. E.G. uploads, in-inventory, in-world, in 
object contents, etc. VWR-8049 
<http://jira.secondlife.com/browse/VWR-8049> is the meta task for 
rectifying these idiosyncrasies, and VWR-12121 
<http://jira.secondlife.com/browse/VWR-12121> is the sub-task that 
addresses script creation in particular. The only way to currently do 
what you're trying to do would be to trigger a callback when your newly 
created script shows up, which then attempts to set its permissions the 
way you want. That would be such a horrible hack that it's not worth 
attempting. Instead, the above tasks are meant to provide the back-end 
object creation API support such that the approach that you are assuming 
should work, can actually work.

To Stickman who wrote:
        "I seem to recall something about a default perm mask on 
uploaded files being available in 1.23. Was that not the case?",
That was VWR-8624 <http://jira.secondlife.com/browse/VWR-8624> which is 
indeed in 1.23 but which only deals with uploaded content.

I hope that helps.
-Melinda

Carlo Wood wrote:
> I tried to change the code of my viewer in order to
> create new scripts that are full permission by
> default. (The reason why I want that is explained
> below, but not really relevant).
>
> I changed in llpanelcontents.cpp, in function
> LLPanelContents::onClickNewScript, the call
>
>     LLPermissions perm;
>     perm.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null);
>     perm.initMasks(
> 	    PERM_ALL,
> 	    PERM_ALL,
> 	    PERM_NONE,
> 	    PERM_NONE,
> 	    PERM_MOVE | PERM_ITEM_UNRESTRICTED);
>
>
> Where the "PERM_ITEM_UNRESTRICTED" for the last parameter
> (next owner) was changed from PERM_ITEM_TRANSFER.
>
> However... all I get is a script that has ONLY
> the 'transfer' permission for next owner set :/.
>
> I can't seem to figure out why those permissions
> can't be set here-- or what goes wrong-- or even
> how to change this function to do whatever to
> set the permissions to another value.
>
> Ie, I looked at what happens if you click on
> the permission check boxes, and then added to
> the bottom of LLPanelContents::onClickNewScript:
>
>   perm.initMasks(PERM_ALL, PERM_ALL, PERM_NONE, PERM_NONE, PERM_ALL);
>   new_item->setPermissions(perm);
>   object->updateInventory(new_item, TASK_INVENTORY_ITEM_KEY, false);
>
> but even that doesn't change the permissions of
> the created script!?
>
> Can someone tell me what is going on here?
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/sldev/attachments/20090516/05e7a21e/attachment.htm 


More information about the SLDev mailing list