Skip to content

Unique string generation system#119

Merged
maxbrundev merged 1 commit intodevelopfrom
feature/new_asset_duplication_naming_system
Sep 27, 2020
Merged

Unique string generation system#119
maxbrundev merged 1 commit intodevelopfrom
feature/new_asset_duplication_naming_system

Conversation

@adriengivry
Copy link
Copy Markdown
Member

Sumary

This PR adds a unique string generation system, applied to asset and actor duplication.

Description

Previously, the asset duplication naming system was adding (Copy) after the name of each duplicated asset. However, like in our previous actor duplication naming system, this nomenclature was very heavy and caused relatively long asset names after multiple duplications.

In order to avoid code duplication, the actor duplication naming system has been generalized in OvTools::Utils::String as a function able to generate a unique string satisfying a predicate.

This new function (Responsible of adding integer suffixes between parentheses) is based on the previous actor duplication naming system.

It is now used by both the asset browser and the hierarchy to generate unique names for actors and assets.

Screenshots

GeneralizedDuplicationNamingSystem
Both of these windows (AssetBrowser and Hierarchy) are using the new string generation system

Related to #99
Fixes #109

@adriengivry adriengivry added QoL Quality of Life : Something that can improve users productivity Feature Editor Something relative with the editor Refactoring Something that needs a refactoring labels Jun 17, 2020
Previously, the asset duplication naming system was adding `(Copy)`
after the name of each duplicated asset. However, like in our previous
actor duplication naming system, this nomenclature was very heavy and
caused relatively long asset names after multiple duplications.

In order to avoid code duplication, the actor duplication naming system
has been generalized in OvTools::Utils::String as a function able to
generate a unique string satisfying a predicate.

This new function (Responsible of adding integer suffixes between
parentheses) is based on the previous actor duplication naming system.

It is now used by both the asset browser and the hierarchy to generate
unique names for actors and assets.
@adriengivry adriengivry force-pushed the feature/new_asset_duplication_naming_system branch from 7f8202d to ad3cbfc Compare June 17, 2020 04:09
@maxbrundev maxbrundev merged commit f81a2ba into develop Sep 27, 2020
@maxbrundev maxbrundev deleted the feature/new_asset_duplication_naming_system branch September 27, 2020 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Editor Something relative with the editor QoL Quality of Life : Something that can improve users productivity Refactoring Something that needs a refactoring

Development

Successfully merging this pull request may close these issues.

Asset duplication should use the new actor duplication naming system

2 participants