An Alternative Entities Editor


#61

I need to test that the next time it happens.


#62

@ctrlaltdavid

Other problem, just checked it with the orginal edit.js it seems to work there.
I want to use userData to store settings. the read part works. but the change part is not tranferred to the entity script. The opposite happen the userData field get reset to the orginal setting.

{“volume”:0.5 , “reverse”:false,“doorOpenTimeSec”:15000}

(function()
{             
    this.clickDownOnEntity = function(entityID, mouseEvent) 
    {         
        var Ent = entityID;
        
        var userData = Entities.getEntityProperties(Ent, ["userData"]).userData;    
        var configDataOject = JSON.parse(userData);
        print(JSON.stringify(configDataOject));
    };
}
)
  • Put the above script in entity. (i load it from local disk)
  • Paste the json field from the script (line 1) into the userData field.
  • Click the entity, and the userData get printed in the log.
  • Change parameter in the field and click again.
  • You now see that the data is reset and also the change is not transferred to the script. Now i know why it failed for days. Now only a fix.

#63

@Richardus.Raymaker I just tested my edit.js and HiFi’s edit.js and they both exhibit the same behaviour: if you type in the user data field and change the text and leave your cursor there then click in-world, the user data is not updated to the entity. In other words, the user data field is not “submitted”. … If you edit the user data then click in another field the user data is submitted and the entity updated.

Arguably, the data should be automatically submitted when the form loses focus. This happens for some other fields (e.g., dimensions) in HiFi’s edit.js script but currently not mine. … I’ll look at making mine auto-submit when the dialog loses focus. Thanks!


#64

Release 0.1.4-53:

  • Remember entity search radius between program runs.
  • Submit any edit outstanding when change focus away from editor window.
  • Make manipulators respond to Ctrl and Shift key presses when editor window has focus.
  • Display most warning messages in footer and beep on warning.

#65

Not 100% sure.
But i get strange results when i use the scale % and the reset. Especially reset is not restoring it to the orginal size but makes one side wrong. it looks like the Z scale is half the size of what it need to be.

Do we have undo or not ? because it’s so easy to screw thigs in size. but i neve rcan undo it :frowning:

Is it possible to put in the entities window header or somewhere else the object you have slected. So you can always see on what tab you are that you still work on the correct object ?


#66

@Richardus.Raymaker Nice find on the Reset dimensions button! Yes there is a bug; will be fixed today.

There’s no undo at present but it’s what I’m currently working on.

Re displaying which objects you’re working on: need to cater for the multi-select case. I’m thinking maybe adding a “selected” tick column to the table and being able to sort on this.


#67

Release 0.1.5-54:

  • Added support for adding entities from the Examples dialog. *
  • Fix reset dimensions button not applying correct dimensions on all axes
  • Clear “add entity” state when close editor window.

*: Known issue: Models aren’t added with their base at the clicked elevation; this will work properly once the following PR is merged: https://github.com/highfidelity/hifi/pull/7973


#68

@ctrlaltdavid, The edit tool shortcut is broken :scream:
Pressing CTRL-E is opening the edit tool and instant close it. Lucky the menu option still works normal.

Other note, it looks like we still need the orginal edit.js when we need to create a json file for the marketplace. For now i keep both scripts running. also because HMD use that comes.


#69

Im doing some gardening I cant shift select multiple objects ?


#70

Yes, I’m getting same thing with Control-E - Opens and instantly closes, but fine from menu option.


#71

@Richardus.Raymaker, @OmegaHeron That’s really weird! I’ve tried it (loading from the Web) with both builds 4904 and 4968 on Windows with default scripts running; no problem.

I hesitate to ask, but have you tried reloading the script? Restarting Interface?

To help debug, it would be great if you could send me some program log info:

Thanks!


#72

I stopped all scripts, reload my default scripts. No luck.

[05/28 22:21:46] [DEBUG] Reload script http://ctrlaltstudio.com/downloads/hifi/scripts/edit.js
[05/28 22:21:46] [DEBUG] Delete script from cache: “http://ctrlaltstudio.com/downloads/hifi/scripts/edit.js
[05/28 22:21:46] [DEBUG] stopping script… QUrl(“http://ctrlaltstudio.com/downloads/hifi/scripts/edit.js”)
[05/28 22:21:46] [DEBUG] Script Engine stopping: “edit.js”
[05/28 22:21:47] [WARNING] Unable to find MenuUserData for object QAction(0x243ce6bb5e0)
[05/28 22:21:47] [WARNING] “”
[05/28 22:21:47] [WARNING] Attempted to remove menu action with no found QML object
[05/28 22:21:47] [DEBUG] Script Engine shutting down: “edit.js”
[05/28 22:21:47] [DEBUG] Done downloading script at: “http://ctrlaltstudio.com/downloads/hifi/scripts/edit.js
[05/28 22:21:47] [DEBUG] Logging activity “loaded_script”
[05/28 22:21:47] [DEBUG] script:print()<< [CtrlAltStudio edit.js] Version 0.1.5-54
[05/28 22:21:47] [WARNING] WebWindow views are deprecated. Use OverlayWebWindow instead

Also if i press CTR-E i get this warning in the log.

[05/28 22:23:00] [WARNING] Setting::Manager::registerHandle(): Key registered more than once, overriding: “play_notification_sounds_type_0”

But thiat error also appears when i open the window by choice it from the menu.
Intressting note, as long you keep holding CTRL-E the window stay, as soon you release the CTRL-R key the window disappear.


#73

@Richardus.Raymaker Yes, I haven’t worried too much about creating JSON files to date given that the marketplace hasn’t been, well, a marketplace of late. It is on my list to do, though.

@Judas Correct, there’s no “gardening mode” yet. Multiple entities is one of the top three big tasks on my list.


#74

@Richardus.Raymaker Thanks! Everything looks good except for the “key registered more than once” warning. I don’t get this, even if I turn notification sounds on. I can’t see any problems in noficatdions.js, though.

What eversion of Interface are you running?

Aha! … Managed to reproduce it: if you press Ctrl, then press E and hold it down a fraction rather than releasing it immediately … the window opens on the E key down then closes on the E key up. … I need to debounce that; probably much more noticeable on a fast PC such as yours. … Thanks!


#75

Just a update, the shortcut key is not work at all now.

[05/28 23:52:46] [WARNING] QAction::eventFilter: Ambiguous shortcut overload: Ctrl+E


#76

@Richardus.Raymaker That would indicate that you have two copies of the edit.js script running somehow … or another script that uses the same shortcut.


#77

Correct, this happens more times. soemthing is going wrong in Hifi when you stop all scripts and load a fresh new custom default script.

For some reason my deafultscript where running twice. Thanks.
But this get annoying because it happens more with me.

I supsect that this double script run problem is going to be a bigger problem with users.

The first shortcut bug still exist.


#78

Release 0.1.6-55:

  • Fixed Ctrl-E opening and immediately closing edit window on fast PCs.

#79

Works for me, also a nice pop-up appeared with a warning to reload the script because version mismatch.


#80

Release 0.1.7-56: New fields per new High Fidelity release.

  • Added new zone properties: flying allowed and ghosting allowed.
  • Added new shape type property (octahedron, etc. values).