Skip to content

Emojis and Transform Improvements #3366

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

Merged
merged 61 commits into from
May 25, 2020
Merged
Show file tree
Hide file tree
Changes from 49 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
2ab54f1
Initial checkin of emojis in OpenShot! Added new model/view/ui elemen…
jonoomph Mar 31, 2020
5690011
Convert transitions model to use proxy filter and sort class, with cu…
jonoomph Apr 1, 2020
1a6b8b7
Convert effects model to use proxy class for sorting and filtering.
jonoomph Apr 1, 2020
cfc1750
Convert files to use new proxy class, and a global shared model. No l…
jonoomph Apr 2, 2020
de7c789
Convert transitions to no longer delete widgets, but rather create bo…
jonoomph Apr 2, 2020
40a068b
Convert effects to no longer delete widgets, but rather share a model…
jonoomph Apr 2, 2020
be91f43
Process qt events every 2 files added (so emoji doesn't glitch when a…
jonoomph Apr 2, 2020
ad02c73
Added emoji group drop-down filter, to better sort and filter, and a …
jonoomph Apr 2, 2020
32d4c74
Adding @emojis path replacement, when saving and loading *.osp files.…
jonoomph Apr 2, 2020
c4d80fa
Adding emojis to translation template. Splitting "transitions" and "e…
jonoomph Apr 2, 2020
92da642
Adding emojis from open-moji project.
jonoomph Apr 2, 2020
4c44e2a
Integrated proxy class into models, and only refresh proxy on ListVie…
jonoomph Apr 4, 2020
fa9f227
Adding cache for emojis (for fast loading of icons)
jonoomph Apr 4, 2020
f06f8be
Adding cache for emojis (for fast loading of icons)
jonoomph Apr 5, 2020
f4c95d1
HUGE overhaul of the transform tool.
jonoomph Apr 9, 2020
e3ca40b
Create 8 custom cursors, white middles with black stroke, for Transfo…
jonoomph Apr 10, 2020
4fcd140
Fixing emoji listview currentIndexChanged connection, since it passes…
jonoomph Apr 10, 2020
72a5d8d
Hack to fix Travis failure
jonoomph Apr 10, 2020
3af06b7
Updated emoji model proxy filter to be waaay faster, using Qt regex.
jonoomph Apr 10, 2020
a49989d
Protect cursor when transform is happening, so it doesn't keep switch…
jonoomph Apr 10, 2020
4e88c37
Updated shear and rotation logic to use Keyframable origin point (x,y…
jonoomph Apr 13, 2020
b0aa859
emojis: A bunch of model/view tweaks
ferdnyc Apr 14, 2020
2095644
Restore drag pixmap
ferdnyc Apr 14, 2020
134d7af
Remove debug logging
ferdnyc Apr 14, 2020
dcee7c1
Adding new hand cursor for the origin point
jonoomph Apr 14, 2020
8cbe4ba
Adding auto-transform selection feature, where selected clips automat…
jonoomph Apr 15, 2020
e143d24
Removing extra emojis for performance reasons
jonoomph Apr 16, 2020
da2aa2d
Added script to "optimize emojis" and remove extra/unused ones, and u…
jonoomph Apr 16, 2020
b6e1414
Updating cache, removing many cached emoji
jonoomph Apr 16, 2020
046f8c1
Merge branch 'develop' into emojis
jonoomph Apr 16, 2020
6cddc85
Shortening 'group filter' name for emojis to 1-word, updating transla…
jonoomph Apr 16, 2020
ec0428b
Split out blender translations into it's own POT template
jonoomph Apr 16, 2020
5d704fc
Fixed rotation transform logic to correctly adjust around the origin …
jonoomph Apr 17, 2020
bc02736
Updating all 4 translation templates
jonoomph Apr 17, 2020
2bbc486
Adding 'translator-credits' to additional POT template files
jonoomph Apr 19, 2020
8d0dc6e
Adding filter group to emoji tooltip
jonoomph Apr 19, 2020
bbe811b
Updating translation tester script for multiple POT templates
jonoomph Apr 20, 2020
aebcf40
Merge branch 'emojis' into emoji
jonoomph Apr 24, 2020
48156e8
Merge pull request #3377 from ferdnyc/emoji
jonoomph Apr 24, 2020
bc25a7f
Fix saving/loading selected emoji filter group
jonoomph May 9, 2020
2cc7040
Merge branch 'develop' into emojis
jonoomph May 10, 2020
3d67fb0
Prevent crash on launch during a backup.osp recovery
jonoomph May 14, 2020
660b902
Adding no-cache paramater support for thumbnail HTTP server, so it wi…
jonoomph May 14, 2020
76bffaf
Add new signal for updating a file (such as editing a title), that re…
jonoomph May 14, 2020
b314151
Fixing regresion from https://github.com/OpenShot/openshot-qt/commit/…
jonoomph May 15, 2020
91ea99a
Merge branch 'develop' into emojis
jonoomph May 15, 2020
7e5ef0f
Merge branch 'develop' into emojis
jonoomph May 16, 2020
be3c280
Removing CTRL modify from scrollwheel support on video widget. Making…
jonoomph May 16, 2020
1d3a4b6
Models: Persistence enhancements
ferdnyc May 17, 2020
55b9468
Eliminate main_window's self.selected_files list
ferdnyc May 17, 2020
1a996a5
Files: Move add_file, get_image_seq() into model
ferdnyc May 17, 2020
30d1a2a
Merge branch 'develop' into emojis
jonoomph May 18, 2020
02ee15a
Fix dragging for all views
ferdnyc May 19, 2020
57d3229
Fix "Edit Title" action
ferdnyc May 19, 2020
ece947b
Merge branch 'emojis' into emojis-mods2
ferdnyc May 19, 2020
424f56e
Properties: Use main data models for context menu
ferdnyc May 19, 2020
726e5d3
Add --test-models flag to launcher
ferdnyc May 19, 2020
dc18a20
Blender: Use files model add_files()
ferdnyc May 21, 2020
a9c40d1
Titles: Use files model add_files(), new counter
ferdnyc May 21, 2020
da09062
main_win: Remove actionImportImageSequence_trigger
ferdnyc May 21, 2020
ef88182
Merge pull request #3497 from ferdnyc/emojis-mods2
jonoomph May 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ Fonts:
Canonical / Ubuntu (Ubuntu-R.ttf font)


Emoji:

OpenMoji (http://openmoji.org/). All emojis designed by OpenMoji,
the open-source emoji and icon project. License: CC BY-SA 4.0


Supporters

A big thanks to all the financial backers and supporters from PayPay,
Expand Down
4 changes: 2 additions & 2 deletions src/classes/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
BLENDER_PATH = os.path.join(USER_PATH, "blender")
TITLE_PATH = os.path.join(USER_PATH, "title")
TRANSITIONS_PATH = os.path.join(USER_PATH, "transitions")
EMOJIS_PATH = os.path.join(USER_PATH, "emojis")
PREVIEW_CACHE_PATH = os.path.join(USER_PATH, "preview-cache")
USER_PROFILES_PATH = os.path.join(USER_PATH, "profiles")
USER_PRESETS_PATH = os.path.join(USER_PATH, "presets")
Expand All @@ -69,8 +70,7 @@
for folder in [
USER_PATH, BACKUP_PATH, RECOVERY_PATH, THUMBNAIL_PATH, CACHE_PATH,
BLENDER_PATH, TITLE_PATH, TRANSITIONS_PATH, PREVIEW_CACHE_PATH,
USER_PROFILES_PATH, USER_PRESETS_PATH, USER_TITLES_PATH,
]:
USER_PROFILES_PATH, USER_PRESETS_PATH, USER_TITLES_PATH, EMOJIS_PATH ]:
if not os.path.exists(os.fsencode(folder)):
os.makedirs(folder, exist_ok=True)

Expand Down
17 changes: 15 additions & 2 deletions src/classes/json_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ def replace_string_to_absolute(self, match):
new_path = json.dumps(new_path, ensure_ascii=False)
return '"%s": %s' % (key, new_path)

elif "@emojis" in path:
new_path = path.replace("@emojis", os.path.join(info.PATH, "emojis", "color", "svg"))
new_path = json.dumps(new_path, ensure_ascii=False)
return '"%s": %s' % (key, new_path)

elif "@assets" in path:
new_path = path.replace("@assets", path_context["new_project_assets"])
new_path = json.dumps(new_path, ensure_ascii=False)
Expand Down Expand Up @@ -268,20 +273,28 @@ def replace_string_to_relative(self, match):

# Determine if @transitions path is found
elif os.path.join(info.PATH, "transitions") in folder_path:
# Yes, this is an OpenShot transitions
# Yes, this is an OpenShot transition
folder_path, category_path = os.path.split(folder_path)

# Convert path to @transitions/ path
new_path = os.path.join("@transitions", category_path, file_path).replace("\\", "/")
new_path = json.dumps(new_path, ensure_ascii=False)
return '"%s": %s' % (key, new_path)

# Determine if @emojis path is found
elif os.path.join(info.PATH, "emojis") in folder_path:
# Yes, this is an OpenShot emoji
# Convert path to @emojis/ path
new_path = os.path.join("@emojis", file_path).replace("\\", "/")
new_path = json.dumps(new_path, ensure_ascii=False)
return '"%s": %s' % (key, new_path)

# Determine if @assets path is found
elif path_context["new_project_assets"] in folder_path:
# Yes, this is an OpenShot transitions
folder_path = folder_path.replace(path_context["new_project_assets"], "@assets")

# Convert path to @transitions/ path
# Convert path to @assets/ path
new_path = os.path.join(folder_path, file_path).replace("\\", "/")
new_path = json.dumps(new_path, ensure_ascii=False)
return '"%s": %s' % (key, new_path)
Expand Down
17 changes: 13 additions & 4 deletions src/classes/thumbnail.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@
from http.server import BaseHTTPRequestHandler, HTTPServer
from socketserver import ThreadingMixIn

REGEX_THUMBNAIL_URL = re.compile(r"/thumbnails/(?P<file_id>.+?)/(?P<file_frame>\d+)(?P<only_path>/path/)?")
# Regex for parsing URLs: (examples)
# http://127.0.0.1:33723/thumbnails/9ATJTBQ71V/1/path/no-cache/
# http://127.0.0.1:33723/thumbnails/9ATJTBQ71V/1/path/
# http://127.0.0.1:33723/thumbnails/9ATJTBQ71V/1/path
# http://127.0.0.1:33723/thumbnails/9ATJTBQ71V/1/
# http://127.0.0.1:33723/thumbnails/9ATJTBQ71V/1
REGEX_THUMBNAIL_URL = re.compile(r"/thumbnails/(?P<file_id>.+?)/(?P<file_frame>\d+)/*(?P<only_path>path)?/*(?P<no_cache>no-cache)?")


def GenerateThumbnail(file_path, thumb_path, thumbnail_frame, width, height, mask, overlay):
Expand Down Expand Up @@ -124,10 +130,12 @@ def do_GET(self):
""" Process each GET request and return a value (image or file path)"""
# Parse URL
url_output = REGEX_THUMBNAIL_URL.match(self.path)
if url_output and len(url_output.groups()) == 3:
if url_output and len(url_output.groups()) == 4:
# Path is expected to have 3 matched components (third is optional though)
# /thumbnails/FILE-ID/FRAME-NUMBER/ or
# /thumbnails/FILE-ID/FRAME-NUMBER/path/
# /thumbnails/FILE-ID/FRAME-NUMBER/path/ or
# /thumbnails/FILE-ID/FRAME-NUMBER/no-cache/ or
# /thumbnails/FILE-ID/FRAME-NUMBER/path/no-cache/
self.send_response_only(200)
else:
self.send_error(404)
Expand All @@ -137,6 +145,7 @@ def do_GET(self):
file_id = url_output.group('file_id')
file_frame = int(url_output.group('file_frame'))
only_path = url_output.group('only_path')
no_cache = url_output.group('no_cache')

try:
# Look up file data
Expand Down Expand Up @@ -165,7 +174,7 @@ def do_GET(self):
# Try with ID and frame # in filename (for backwards compatibility)
thumb_path = os.path.join(info.THUMBNAIL_PATH, "%s-%s.png" % (file_id, file_frame))

if not os.path.exists(thumb_path):
if not os.path.exists(thumb_path) or no_cache:
# Generate thumbnail (since we can't find it)

# Determine if video overlay should be applied to thumbnail
Expand Down
74 changes: 74 additions & 0 deletions src/emojis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
OpenMoji
========

<img width="1157" alt="openmoji-github-keyvisual" src="https://user-images.githubusercontent.com/480224/71999652-1a60c000-3242-11ea-974a-96fef098147b.png">

Open-source emojis for designers, developers and everyone else! OpenMoji is an open-source project of the HfG Schwäbisch Gmünd by Benedikt Groß, Daniel Utz, 50+ students and external contributors.

👉 [OpenMoji.org/](http://openmoji.org/)

Interact, create, save, and share your work! 🌈`#openmoji`

This GitHub repository contains all of the source files and exported png/svg files of the OpenMoji project.

⚠️ Please note that the master branch is in active development, so if you're looking for stable production version please use one of the releases.


## Table of Contents

- [Styleguide](http://openmoji.org/styleguide) our beloved styleguide.
- [FAQ](FAQ.md) Check if your question has already been answered
- [Contributing](CONTRIBUTING.md) Pull Requests are welcome!
- [Developer Setup](CONTRIBUTING.md#developer-setup) how to setup node.js.
- [Font](font) infos on the OpenMoji-Color and OpenMoji-Black fonts.
- [Team](http://openmoji.org/about/#team) list of all authors and contributors.
- [Acknowledgements](http://openmoji.org/about/#acknowledgement) Thanks!


## Downloads & Distribution Channels
You can download, use and "consume" OpenMoji in various ways:

- [SVG](https://github.com/hfg-gmuend/openmoji/releases/latest): Color & Black (production ready)
- [Fonts](https://github.com/hfg-gmuend/openmoji/releases/latest): Color & Black (experimental)
- [PNG 618x618](https://github.com/hfg-gmuend/openmoji/releases/latest): Color & Black (production ready)
- [PNG 72x72](https://github.com/hfg-gmuend/openmoji/releases/latest): Color & Black (production ready)
- [OpenMoji app](https://itunes.apple.com/us/app/openmoji/id1462636288): for iOS with emoji picker
- [OpenMoji Stickers](https://itunes.apple.com/us/app/openmoji/id1462636288): for iOS Messages app
- [OpenMoji Github](https://github.com/hfg-gmuend/openmoji/): `git clone --dept 1 https://github.com/hfg-gmuend/openmoji.git` The OpenMoji repo is big! It is recommended to clone it without the entire history, note the --dept flag.
- [OpenMoji NPM Package](https://www.npmjs.com/package/openmoji): `npm install openmoji`. You can also get individual files via [UNPKG](https://unpkg.com/) direclty e.g.: unpkg.com/[email protected]/color/svg/1F64B.svg
- [OpenMoji Jekyll Plugin](https://github.com/azadeh-afzar/OpenMoji-Jekyll-Plugin): `gem install jekyll-openmoji`


## Attribution Requirements
As an open source project, attribution is critical from a legal, practical and motivational perspective. Please give us credits! Common places for attribution are for example: to mention us in your project README, the 'About' section or the footer on a website/in mobile apps.

Attribution suggestion:

> All emojis designed by [OpenMoji](https://openmoji.org/) – the open-source emoji and icon project. License: [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/#)


## Anatomy of the OpenMoji Repository

`black/` and `color/` Contains all exported .png and .svg files ¹

`data/` Contains the central openmoji.json with all meta informations for each emoji ¹

`font/` Contains the exported OpenMoji fonts ¹

`guidelines/` Contains various template files related to the styleguide ¹

`helpers/` Contains various helper scripts e.g. to export to .png and .svg, generate skintones variants, enforce the OpenMoji color palette etc. ²

`src/` Contains all source .svg files of OpenMoji. The files are broken up into folders and files corresponding with the Unicode groups and sub-groups ¹

`test/` Automated unit tests to ensure consistency across all source .svg files ²


## License
¹ OpenMoji graphics are licensed under the Creative Commons Share Alike License 4.0 ([CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/))

[![License: CC BY-SA 4.0](https://img.shields.io/badge/License-CC%20BY--SA%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-sa/4.0/)

² Code licensed under the GNU Lesser General Public License v3 ([LGPL-3.0](https://www.gnu.org/licenses/lgpl-3.0.en.html))

[![License: LGPL-3.0](https://img.shields.io/badge/License-LGPL%20v3-lightgrey.svg)](https://www.gnu.org/licenses/lgpl-3.0.en.html)
14 changes: 14 additions & 0 deletions src/emojis/color/svg/1F004.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions src/emojis/color/svg/1F0CF.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/emojis/color/svg/1F300.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions src/emojis/color/svg/1F301.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/emojis/color/svg/1F302.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading