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

SG painting on image object #2011

Open
wants to merge 96 commits into
base: master
Choose a base branch
from
Open

SG painting on image object #2011

wants to merge 96 commits into from

Conversation

ghost
Copy link

@ghost ghost commented May 25, 2020

Feature description

The feature allows drawing on image objects in the shot-generator scene. It allows drawing on multiple images at the same time, by selecting the brush tab in image object it enables drawing mode in which you can't interact with objects (moving them and selecting them) but you can draw on images. Drawing on images updates image objects across the apps(shot-explorer and XR).
Changed image geometry to rounded plane geometry.

Solution description

To easily control all images and drawing on them their drawing material is stored in SceneManager. When image created it creates a specific drawing material that has a canvas, and it passes this object to SceneManager. SceneManager has all mouse events which is necessary for drawing, the drawing is only allowed when drawing mode is enabled. In order to change image texture( saving current drawing), each image uses a temp texture while the scene isn't saved. If the scene was saved image temp texture changes to original texture with new drawing in it, if the scene wasn't saved the temp texture file gets cleaned up.

Task

  • Create drawing material logic which changes default image material and allows to draw on it
  • Create 2 brushes( simple and eraser)
  • Add brush tab and drawing mode
  • Create temp image saving logic
  • Update images across apps(XR and shot-explorer)
  • Create pencil icon @setpixel

Future Plans

  1. The simple brushes should be improved to draw smoother
  2. Implement continuous drawing for an image( currently, if you move the mouse too fast it breaks a line)
  3. Add the ability to draw on images to XR

Vlad Stepura added 30 commits May 15, 2020 15:30
@audionerd audionerd assigned audionerd and setpixel and unassigned audionerd Sep 3, 2020
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Vlad Stepura seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants