Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Create app use Ctrl key to duplicate entities instead of Alt #15921

Merged
merged 2 commits into from Jul 23, 2019

Conversation

@ctrlaltdavid
Copy link
Collaborator

commented Jul 12, 2019

Changes:

  1. Make Create use Ctrl key to duplicate entities instead of Alt
    The reason to do this is because using Alt conflicts with the inspect.js script (and 3rd party derivatives).
    The effect is that entities are often unexpectedly duplicated in desktop mode when the Create app is running and you use inspect.js to move your camera view.

  2. Disable Create's entity transforms (translate, rotate, scale handles; x-z body translation) when the Alt key is pressed.
    The reason to do this is the same: both the transform is done and the camera view is moved by inspect.js unless the Alt key is disabled.

@ctrlaltdavid

This comment has been minimized.

Copy link
Collaborator Author

commented Jul 12, 2019

TEST PLAN

Create app per default scripts.

inspect.js run from the Running Scripts dialog.

  • Alt + mouse up/down: zooms in / out.
  • Alt + mouse left/right: orbits left / right.
  • Alt + Ctrl + mouse up/down/left/right: orbits over / under / left / right.
  • Alt + Ctrl + Shift + mouse up/down/left/right: pans down / up / right / left.

Note: The inspect.js supplied with Interface snaps the camera back to original location as soon as you release the Alt key.
If you want the camera to stay where it's positioned, you can use the script from the following URL: http://ctrlaltstudio.com/downloads/hifi-dev/scripts/inspect.js
This alternative version of inspect.js is the 16 Jun 2019 version of the script per http://ctrlaltstudio.com/hifi/inspect/change-log .

A: Test Ctrl, Alt, etc. mouse and keyboard behavior.

Test set-up:

  • Desktop mode.
  • inspect.js running.
  • Activate the Create app.
  • Click and release on an unlocked entity to select it for editing.

Tests:

  1. Alt-mouse-down no longer duplicates entities.
  • Alt-mouse-down and hold on the body of the entity (i.e., not any edit handles), and move your mouse to orbit and zoom your camera about the entity.
  • On master: The entity is duplicated as well as your camera moving (somewhat unpredictably).
  • With this PR: The entity is not duplicated, and the entity is not x-z translated, and your camera moves the same as if you Alt-mouse-downed on an entity not selected for editing.
  1. Ctrl-mouse-down duplicates entities.
  • Ctrl-mouse-down and hold on the body of the entity, and move your mouse.
  • On master: The entity x-z translates the same as if the Ctrl key is not pressed.
  • With this PR: The entity is duplicated (the same as how it is duplicated
  1. Shift-mouse-down still activates the translation "rails"
  • Shift-mouse-down and hold on the body of the entity, and move your mouse.
  • On master: Translation x-z "rails" are displayed and your entity moves along rails.
  • With this PR: No change in behavior.
  1. Alt-mouse-down on Create translate, rotate, etc. handles has no effect.
  • Alt-mouse-down and hold on the different Create handles for the selected entity, and move your mouse.
  • On master: The handle adjusts the entity in addition to the camera moving (somewhat unpredictably).
  • With this PR: No translation, rotation, etc. is done (i.e., the handle doesn't work).
  1. Alt + Ctrl and Alt + Ctrl + Shift moves camera without unexpected Create effects
  • Alt-mouse-down and hold on the body of the entity.
  • Use all the inspect.js camera controls and check that nothing untoward happens when orbiting the selected entity.
  • Ditto when orbiting another entity (with the original selection still selected).
  1. Pressing the Ctrl key when rotating an entity using the rotate handle, still snaps the rotation angle with this PR.

B: General test of Create's mouse and keyboard control

The Create app should function the same as before, the exception being that Ctrl is now used to duplicate entities instead of Alt.

@hifi-gustavo

This comment has been minimized.

@hifi-gustavo

This comment has been minimized.

@hifi-gustavo

This comment has been minimized.

@hifi-gustavo

This comment has been minimized.

@hifi-gustavo

This comment has been minimized.

Copy link
Contributor

commented Jul 12, 2019

Android build is available here. Quest build is available here

@shanzzam shanzzam requested a review from huffman Jul 12, 2019

@ZappoMan
Copy link
Contributor

left a comment

PA

@huffman huffman merged commit 8b2c935 into highfidelity:master Jul 23, 2019

2 checks passed

default Build finished.
Details
license/cla Contributor License Agreement is signed.
Details

@ctrlaltdavid ctrlaltdavid deleted the ctrlaltdavid:ctrl-duplicate branch Jul 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.