An Alternative Entities Editor


#1

Hi! Here’s a first, “alpha” pass at an alternative entities editor: http://ctrlaltstudio.com/downloads/hifi/scripts/edit.js

It’s aimed at the desktop use case:

  • The editor window can be positioned outside the Interface window.
  • It has a compact dialog layout so that related entity properties are easily viewed.

There are various features missing and isn’t styled to the nth degree; I have a list of ideas but would like to see what people think the most pressing features, modifications, and bug fixes needed are.

Note: You should run the script from the URL.

Usage instructions …
.

Open/Close the Editor

Edit > Edit… menu item or Ctrl-E shortcut to open and start editing.

Click the window “x” or press Esc to close and exit editing.
.

Dialog Window

Tabs across the top: “Entities” is the entities list plus editing controls; other tabs are groups of properties for selected entity.

Entities tab:

  • “Model+” … “Zone+”: Click to select an entity type to add then click in-world to add the entity. Click the button again to cancel adding.
  • “Delete”: Deletes the currently selected entity. Alternatively, press the “Del” key (not the backspace key).
  • Filter: Searches the entity list.
    Search is conducted over the entity type, name, and model filename.
    Multiple terms are ANDed together, i.e., if you search for “tree fbx” only entities that have both “tree” and “fbx” somehere within their type, name, and filename strings are displayed.
    Search is case-insensitive.
  • Distance and “Refresh”: Controls which entities are listed.
  • Entities list: Click on a row to select that entity. Alternatively, click the entity in-world.
  • “Clear Selection”: Unselects current entity so that you have none selected. Alternatively, click in space in-world.
  • “Stretch: Single”: When stretching an object with the GUI controls, stretch only the selected face or corner. Click to toggle to “Stretch: Both”, which makes opposite sides or corners stretch.
  • “Axes: World”: Moving or rotating an object with the GUI controls is done relative to the world axes. Click to toggle to “Axes: Local”, and have translations and rotations happen relative to the entity’s local coordinates.
    .

GUI Manipulators

When an entity is selected, axes are drawn through the entity’s registration point. And the following GUI controls are available:

  1. Entity selected, Axes: World set: Hover and drag the balls to translate the entity in the direction of the world axes.
  2. Entity selected, Axes: Local set: Per 1) except along the entity’s local axes.
  3. Entity selected, Ctrl key pressed, Axes: World set: Hover and drag around a circle to rotate the entity around the world axes.
  4. Entity selected, Ctrl key pressed, Axes: Local set: Per 3) except around the entity’s local axes.
  5. Entity selected, Ctrl + Shift keys pressed: Hover and drag a box to stretch the entity in that direction. The single side/corner is stretched if Stretch: Single is set; the opposite side/corner is also stretched if Stretch: Both is set.

To duplicate an entity: press Shift while translating per 1) or 2).
.

Adding an Entity

  1. When one of the “+” buttons in the Entities tab is pressed, a grid is displayed at the level of the surface your avatar is standing on. If your avatar is flying, the grid is displayed at the approximate level of your feet.
  2. Click on the grid to add an entity at that position. The entity is placed so that it sits on the grid.

Alternatively, click in the air above the grid to add an entity 10m away in that direction.
.

Camera Control

The Entities Editor does not control your camera. Instead, for camera control, you can use my modified version of inspect.js:

This version of inspect.js leaves your camera where it is after you’ve moved it. So you can position your camera wherever you like to best suit what you’re editing.
.

Many thanks to @Adrian for pre-alpha testing feedback.

Update 21 May 2016: Documented search filter, added in release 0.1.3-51


How to import an object with its position and rotation?
View / Navigation
#2

Some Known Bugs

  • If you rez a “model” type entity too far away from your camera position it ends up with dimensions { 0.1, 0.1, 0.1 } rather than its proper natural dimensions. This is a bug in Interface which I have reported.

  • Once in a while Interface may crash with a heap corruption when using the GUI elements. There seems to be no rhyme or reason to when. I’ve also lodged bug reports on these crashes.


#3

I’ve been using this for a few days now, and I really like it, its more intuitive and seems more reliable because I can always grab the handles.
Movement is smooth and I have yet to lose an object off the horizon because it hits the eye-level vortex, having axis cross-hairs aids in understand where the thing is going to go so you have more control in your hands. I can duplicate perfectly along any axis, and place things with precision.

I can actually get under an object and edit it naturally, the movement doesnt invert to a non intuitive mirror reflection of what your actually doing as in the Hifi editor when the object is above eye level.

Several of the issues that plague editing in Hifi have been addressed here and I want to congratulate @ctrlaltdavid for his efforts in bringing some long awaited improvement to a critical feature.


#4

You don’t like anything I want a second opinion :slight_smile:


#5

Not looked at the script, but it looks good. But are external windows not always set to a default tiny font ? That’s the big improvement ôn the qml one. it readable.

I like it that the pile of icons are gone from the screen and moved into the edit window. On the picture i like more things.

Checking the script later !


#6

It’s not your fault @ctrlaltdavid , it’s interface problem.
but the QML fonts are better readable then the ones QT use. The font’s in your editor are harder to read for me. The are thin and different. I hav ethe same problem with the log window and script editor. Mabye the color combinations to.

But i blame the QT font, not you @ctrlaltdavid

To compare it, this my windows classic shell menu font.

.
Curious, can interface not use by default a better QT font ? and a bit bigger


#7

Ok Just tried it and apart from the initial RTFM problem relating to me not being able to open the script I REALLY like it
I await the “ALTDAVID tm Viewer” with great anticipation.

the grab rotate scale controls all feel intuitive to use ^sorta agrees with richardus on the font I’m on a 4k screen and its kinda squinty however I blame the Roman Empire for this.

What I do want is for the data input boxes to work like blenders :stuck_out_tongue: these are the same type in a number or click the uppy downy arrows but you can also drag slide on them to use them like faders.

Very nice work tho :slight_smile:


#8

Would be nice to have the blender default colors and font (except the cursor in the save dialog) and dpi option for high fidelity or at least the QT windows.


#9

It’s really a shame I can’t keep clicking the like button - once isn’t enough.


#10

Very nice alternative on first impressions, I did notice a bug though.
If you press Ctrl and start rotating then press Shift after it will throw an exception.

I couldn’t find a way to select multiple entities either.


#11

Why do i get the impression that the screen capture and QT font looks better on my tablet ? makes no sense.


#12

Thanks very much for your comments, everyone.

@Richardus.Raymaker : What resolution is your monitor?

@Triplelexx : Multiple entities selection is missing at the moment. Good to know which missing features people use so that I can implement the most important ones first.
And thanks very much for the bug report - I’ll investigate.


#13

1920x1080 - the taskbar on the right side. high fidelity report 1820x1080 as picture size. font size set to 125DPI in windows.


#14

Great job @ctrlaltdavid!

I add my vote for multiple entity selection and more important, at least to me is: unlimited undo (ctrl Z).

Nice work!


#15

I like it!

Any plans on adding an orbit camera (or similar)?
Have you thought about making the scaling tools similar to the translation tools that you implemented? One benefit of this type of manipulation tool is that you can keep the tools the same size in screen space, so they are still usable at any zoom level. This has long been a gripe of mine with the edit.js tools in general.


#16

Nice work David! I fully support the notion of people building their own custom tools and sharing them with the community. Heck… I’d even support you selling it as an add on!


#17

I just found time to try out your version of edit.js. I’ve now dumped the old one as yours is far closer to what I expected entity editing to be like. Yes, a few warts (and I’ll offer suggestions in another post), but this is miles better than what was there before.

I can also see how an HMD version would be done too, having that window become an in-world pane attached to my avatar’s wrist.

Well done!

And now to try out your inspect.js.


#18

Really like to use/try ctrlaltdavid one. but i need to wait for font and size fix.


#19

Hi! No orbit camera is built into the entities editor: it’s intentionally left out in favour of using my modified inspect.js which leaves the camera at its last position. Thus you can position the camera wherever it best suits you for what you want to edit. (See link etc. at the bottom of the “user guide” above). … Though I have thought that perhaps double-clicking an entity in the list could reorient the camera to look at it, and perhaps double-clicking the entity list item again could move your camera and/or avatar to the vicinity of the entity.

If you use inspect.js (or just move your avatar) the GUI tools remain pretty constant sizes in screen space, though there is some room for improvement for the resize handles on the far side of the entity are currently a bit smaller than the near side which could probably be improved upon.


#20

I was going to say something before but Yes… CADavid’s inspect.js script works well with this edit.js. I have used the inspect.js for many months now and would not edit in HiFi without it.

I encourage everyone to make their own version of defaultScripts.js and put their fav scripts in it. There are some issues with doing it, but hopes it will all get ironed out eventually.