Help Grabable is griefing me


I have a grabable problem on my domain
Prettymuch everything is grabable

Can one of you code wizzards help me out, i tried doing a find replace on the domain gz turning all the trues to false and got nowhere.

I want a script i can run that will go through everything in my domain and uncheck grabable for everything


try this that I wrote on my lunch break.I havent tested it, so remember to backup your stuff, they may explode. No Guarantees as I have not yet tested it in world

var entities = Entities.findEntities(Vec3.ZERO, 1000000);
for (var entityIndex in entities) {
    var entity = Entities.getEntityProperties(entities[entityIndex]);
    Entities.editEntity(, {"locked":false});
    if (entity.userData) {
        var userData = JSON.parse(entity.userData);

        if(userData.grabbableKey && userData.grabbableKey.grabbable){
            console.log("Found a Grabbable Object", entity.locked);
        userData["grabbableKey"] = { "grabbable": false };
        Entities.editEntity(, { "userData": JSON.stringify(userData) });
    } else {
        Entities.editEntity(, { "userData": JSON.stringify({ "grabbableKey": { "grabbable": false } }) });
    Entities.editEntity(, {"locked":entity.locked});


hahahahahahahaha, I wrote it on my lunch break.
Would have to take a few days off…actually, I can read that script…getting scared.


Be carefull lots of your stuff will explode as Menithal warns, I mentioned this before, the fact that the grabbable is in the userdata, means that any hard change to the grabbable will wipe all your user data, so anything that has doors closing or clocks ticking or lighting or music data or audio urls and such, or whatever, I have loads of stuff that depends on userdata, it will all just break with this kind of global override.
There needs to be a more complex script that takes your existing usedata and preserves it and just changes the grabbable to false and then replaces any other userdata component that was there other than grabbable.
I havent had time to write this complex script yet.


Im trying it on a sandboxed version, its not quite happening as yet

when does anything menithal makes not explode , its why we keep him around :smiley:

i dont have anything thats animated or scripted um sound emitters and particles is about all

but as i said im testing it on a back up copy

loving the new sandbox domain back up features btw


Which Is why I wrote it only to effect the grabbable part…


Also forgot about the locked entities, added those to the script, just run it straight from the console…

at your own risk


This has caused no end to issues for me… oops grabbed the ground … aahhh… good luck trying to align it again , enter 0 , 0 , 0 in rotation and place it again with those dumb handles (now fixed yaya!)

I think i saw a checkbox to turn off grabbable on rez in interface, I cant see a use case on desktop where this would be a good thing.


@Menithal Ok I didnt use your code, i see what you are saying now. In the past I have simply checked the grabbable checkbox and it wipes all my UserData.

@whyroc the problem is that checkbox setting reverts itself at every relog, so you have to remember to check it at every login.


My only informed critisizm of the script was the clashing blue and red colours used in the sample


runs it with menithals word as a sly old fox as guarantee

[UncaughtException evaluate] Error: Unable to parse JSON string in about:console:4 [Backtrace] () at about:console:4

SyntaxError: Unable to parse JSON string


goes to to feel more involved


Fixed it, ive been spending too much time in python


Fixed and working great
Thanks @Menithal