Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Project manager #1396

Merged
merged 222 commits into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
222 commits
Select commit Hold shift + click to select a range
528fa8d
initial commit
iLLiCiTiT Apr 22, 2021
f6f779e
removed develop code
iLLiCiTiT Apr 22, 2021
3a13925
task item has basic implementation
iLLiCiTiT Apr 22, 2021
0ba22be
remove not needed debug
iLLiCiTiT Apr 22, 2021
81958d7
added ability to create task with ctrl+shift+enter
iLLiCiTiT Apr 22, 2021
dcb51bf
columns definitions per line
iLLiCiTiT Apr 22, 2021
57ba2a5
replaced chidCount with rowCount
iLLiCiTiT Apr 23, 2021
e4282ba
cleanup unused parts
iLLiCiTiT Apr 23, 2021
5e48a87
added basic icons
iLLiCiTiT Apr 23, 2021
b224216
it is possible to add asset directly under current selection
iLLiCiTiT Apr 23, 2021
e88f7c3
avoid moving task under project
iLLiCiTiT Apr 23, 2021
f32cd5c
added some kind of check of editability
iLLiCiTiT Apr 23, 2021
c45af6c
init commit asset name duplicity validation
iLLiCiTiT Apr 23, 2021
7ea8a62
asset names has duplicated information
iLLiCiTiT Apr 26, 2021
eb6ece6
avoid adding children to TaskItem
iLLiCiTiT Apr 27, 2021
7c78a9a
always expand parent of moved item
iLLiCiTiT Apr 27, 2021
31145de
added index_moved signal to model
iLLiCiTiT Apr 27, 2021
cdaa067
added row moved callback
iLLiCiTiT Apr 27, 2021
a36048c
move up/dowm works for multiselection
iLLiCiTiT Apr 27, 2021
82634e6
Merge branch 'develop' into feature/project_manager
iLLiCiTiT Apr 30, 2021
33c86ae
use extended selection
iLLiCiTiT Apr 30, 2021
77fa75e
move vertically multiple items
iLLiCiTiT Apr 30, 2021
77488bb
items have editable columns definition
iLLiCiTiT Apr 30, 2021
21620f7
small tweaks of columns and editable columns
iLLiCiTiT Apr 30, 2021
f79d497
red color only for name column
iLLiCiTiT Apr 30, 2021
8ebf7f9
added project model
iLLiCiTiT Apr 30, 2021
f13d8c7
dbconection is passed from window
iLLiCiTiT Apr 30, 2021
00b1f35
renmamed variables in window
iLLiCiTiT Apr 30, 2021
64e4d3b
added project combobox to window
iLLiCiTiT Apr 30, 2021
9250939
project item has more columns and has convertor from project document
iLLiCiTiT Apr 30, 2021
eb8380a
model expect project name in set_project method
iLLiCiTiT Apr 30, 2021
135d811
window can load and change projects
iLLiCiTiT Apr 30, 2021
f8ef837
added simple refresh button for projects
iLLiCiTiT Apr 30, 2021
533adaf
removed unused parts
iLLiCiTiT Apr 30, 2021
27eb318
project is changed on combobox change
iLLiCiTiT Apr 30, 2021
b7efe9b
removed checkbox without logic
iLLiCiTiT Apr 30, 2021
108666c
added hardcoded min/max for number delegate
iLLiCiTiT Apr 30, 2021
6e578ee
items have defined query projections
iLLiCiTiT Apr 30, 2021
7d3132f
add existing asset docs to hierarchy
iLLiCiTiT Apr 30, 2021
df179af
AssetItem has convertor from document to data
iLLiCiTiT Apr 30, 2021
d08fbcc
added ability to add multiple items under same parent
iLLiCiTiT Apr 30, 2021
b8e500c
fix project combobox refresh
iLLiCiTiT Apr 30, 2021
ab54913
modified asset query projection
iLLiCiTiT Apr 30, 2021
558ca50
load also task items
iLLiCiTiT Apr 30, 2021
e771d4b
different way how to define delegates with more abilities
iLLiCiTiT Apr 30, 2021
f5bbe2a
remove debug print
iLLiCiTiT Apr 30, 2021
5509459
added more columns
iLLiCiTiT Apr 30, 2021
16f7bd9
adde ProjectHelper which helps to keep track with project document
iLLiCiTiT May 6, 2021
00b7b45
adde type delegate for task types
iLLiCiTiT May 6, 2021
3028e61
use task type delegate creating combobox
iLLiCiTiT May 6, 2021
72c2d66
fixed TypeDelegate
iLLiCiTiT May 6, 2021
3e25075
added multiselection combobox
iLLiCiTiT May 6, 2021
948212c
implemented ToolsDelegate
iLLiCiTiT May 6, 2021
e802fd2
changed variable name
iLLiCiTiT May 6, 2021
09a9247
added tools delegate
iLLiCiTiT May 6, 2021
4d737e4
separated global data getter
iLLiCiTiT May 6, 2021
1d0058d
fix asset name duplications
iLLiCiTiT May 6, 2021
b5bd9e5
tools_env data can be changed
iLLiCiTiT May 6, 2021
9813597
added base of save mechanism
iLLiCiTiT May 6, 2021
ce95ee2
implemented few necessary properties
iLLiCiTiT May 6, 2021
c2e6c97
task can be converted to data
iLLiCiTiT May 6, 2021
df75e05
added conversion of asset item to doc data
iLLiCiTiT May 6, 2021
7d56929
it is possible to get update changes for mongo from asset item
iLLiCiTiT May 6, 2021
feb64e7
added child_parents method
iLLiCiTiT May 6, 2021
e60aa9e
modified how AssetItem is created
iLLiCiTiT May 6, 2021
dc76e91
add id to doc data
iLLiCiTiT May 6, 2021
bc532fa
AssetItem requires at least empty dictionary
iLLiCiTiT May 6, 2021
1c1c116
added schema to query projection
iLLiCiTiT May 6, 2021
e124d08
implemented save method
iLLiCiTiT May 6, 2021
234a57c
Merge branch 'develop' into feature/project_manager
iLLiCiTiT May 7, 2021
5eb439b
changed imports and main definition location
iLLiCiTiT May 7, 2021
70ed7ab
added projectmanager to openpype cli commands
iLLiCiTiT May 7, 2021
f561e1a
added validation of number values in number delegate
iLLiCiTiT May 7, 2021
0a273b2
added _add_task to hierarchy view
iLLiCiTiT May 10, 2021
96d8079
type is edited as first thing on task creation
iLLiCiTiT May 10, 2021
1e79141
added type to persisten columns
iLLiCiTiT May 10, 2021
acb7ea3
TaskItem does not have default values prefilled
iLLiCiTiT May 10, 2021
048f856
do not set keys that are not in editable keys
iLLiCiTiT May 10, 2021
35e7cb7
defined new role defying if asset item is modifiable
iLLiCiTiT May 10, 2021
c9202e2
asset item can handle new role defying if is editable
iLLiCiTiT May 10, 2021
9a0203b
store information about loaded asset documents form database if can b…
iLLiCiTiT May 10, 2021
6b940ae
added few checks
iLLiCiTiT May 10, 2021
41f21bc
added REMOVED_ROLE
iLLiCiTiT May 10, 2021
b877539
minor changes and fixes
iLLiCiTiT May 10, 2021
72508c7
added validations on add item which may not be successfull
iLLiCiTiT May 10, 2021
0a764ac
items have is_new properties
iLLiCiTiT May 10, 2021
146a99b
items can be tagged as removed
iLLiCiTiT May 10, 2021
656c0f8
set red background on removed items
iLLiCiTiT May 10, 2021
15c5361
use is_new attribute
iLLiCiTiT May 10, 2021
7d225a2
added default value for removed role
iLLiCiTiT May 10, 2021
8488708
don't allow adding items under removed items
iLLiCiTiT May 10, 2021
c84e37c
store origin data of task item
iLLiCiTiT May 10, 2021
335c107
modified delete index method
iLLiCiTiT May 10, 2021
a000c51
force name validation on remove
iLLiCiTiT May 10, 2021
b271161
added bg color for new items
iLLiCiTiT May 10, 2021
d76fae0
added filtrable combobox widget
iLLiCiTiT May 11, 2021
342fd59
use filter combobox for type editor
iLLiCiTiT May 11, 2021
6b8002f
Text input may have set text regex
iLLiCiTiT May 11, 2021
586f8fa
changed string delegate to name delegate
iLLiCiTiT May 11, 2021
6daec25
skip not allowed symbols and keep position
iLLiCiTiT May 11, 2021
fb09eb8
AssetItem cares about children task duplications
iLLiCiTiT May 11, 2021
94dedde
check for type changes if name is not set
iLLiCiTiT May 11, 2021
964f7b2
store duplicated task names
iLLiCiTiT May 11, 2021
ad50d5b
added base of item validations
iLLiCiTiT May 11, 2021
5fa0bb5
use data method to get asset values
iLLiCiTiT May 11, 2021
c26c141
fix super call
iLLiCiTiT May 11, 2021
53027f6
store origin data of asset and task
iLLiCiTiT May 11, 2021
2bc7951
implemented delegate that can resize editor to required sizes
iLLiCiTiT May 11, 2021
1c9c616
fix TaskItem new item detection
iLLiCiTiT May 11, 2021
675aac1
model has defined multiselection columns
iLLiCiTiT May 11, 2021
db10512
clear selection on adding new item
iLLiCiTiT May 11, 2021
8b30c7a
added `_add_asset` method
iLLiCiTiT May 11, 2021
54e7a47
dont remove tasks if it's parent was not removed and task is not sele…
iLLiCiTiT May 12, 2021
e31a268
added method remove multiple indexes at once
iLLiCiTiT May 12, 2021
44cc3d4
implemeted method that cares about removing single item
iLLiCiTiT May 12, 2021
188cf1e
remove indexes implemented remove_indexes content
iLLiCiTiT May 12, 2021
c1a8d59
view send all selected indexes to model on remove
iLLiCiTiT May 12, 2021
15a1533
added ability to unset delete flags by item ids
iLLiCiTiT May 12, 2021
439876d
hierarchy view has ability to show context menu
iLLiCiTiT May 12, 2021
196c2bc
added action to unsed remove tag
iLLiCiTiT May 12, 2021
40ac5af
fix task removement validation order
iLLiCiTiT May 12, 2021
85f0117
fix remove_delete_flag method
iLLiCiTiT May 12, 2021
0739ee5
save can remove tasks and change type of asset to archived_asset
iLLiCiTiT May 12, 2021
1d4dd10
refresh project after save
iLLiCiTiT May 12, 2021
30bc0c8
items have item_type
iLLiCiTiT May 12, 2021
6f8a57d
context menu has add task and add asset actions
iLLiCiTiT May 12, 2021
4319136
assets and task are loaded sorted by name
iLLiCiTiT May 12, 2021
6e16479
auto refill selected value of filter combobox on focus out
iLLiCiTiT May 12, 2021
9b65ef8
shuffle methods order
iLLiCiTiT May 12, 2021
434db48
fix horizontal/vertical naming
iLLiCiTiT May 12, 2021
d01cd88
change `key` argument order for `data` and `setData` methods
iLLiCiTiT May 12, 2021
0c779b7
not possible to move with deleted or not hierachy changeable items
iLLiCiTiT May 12, 2021
31077bd
added restrictions to vertical movement into removed items
iLLiCiTiT May 12, 2021
dab7a53
vertical movement can go to next parents across the board
iLLiCiTiT May 13, 2021
1bdae76
simplified parent resolving function
iLLiCiTiT May 13, 2021
1e59f2f
it is possible to jump with items in both ways
iLLiCiTiT May 13, 2021
d3f66d2
easier horizontal movement
iLLiCiTiT May 13, 2021
e999b1a
fix task remove and name validations
iLLiCiTiT May 13, 2021
8a10289
return no flags if item is None
iLLiCiTiT May 13, 2021
9268f5b
jump from type to name index on type commit
iLLiCiTiT May 13, 2021
9042e66
change method name to match plural
iLLiCiTiT May 13, 2021
f6019b2
added collapse and expand actions
iLLiCiTiT May 13, 2021
64c6414
implemented copy/paste of tasks
iLLiCiTiT May 13, 2021
6f68b95
added basic message showing
iLLiCiTiT May 13, 2021
2d4a218
fix variable usage
iLLiCiTiT May 13, 2021
275bf78
faster remove deletion tag
iLLiCiTiT May 13, 2021
bc3c392
renamed remove_index to delete_index
iLLiCiTiT May 13, 2021
890f612
fixed typo
iLLiCiTiT May 13, 2021
6b2548b
implemented new item AddAssetItem
iLLiCiTiT May 13, 2021
c1a7a18
each AssetItem and ProjectItem have AddAssetItem
iLLiCiTiT May 13, 2021
c4854c0
make sure AddAsseItem is visible
iLLiCiTiT May 13, 2021
2e70323
fix model method on items
iLLiCiTiT May 13, 2021
9e40246
AddAssetItem are skipped on remove
iLLiCiTiT May 13, 2021
8493274
AssetItem and ProjectItem know if it's add asset item is visible
iLLiCiTiT May 13, 2021
1dd4067
implemented delete_add_asset_item to remove AddAssetItem
iLLiCiTiT May 13, 2021
a66a924
use one row less if AddAssetItem is visible on item
iLLiCiTiT May 13, 2021
2e5bec2
AssetItem handle for adding removing AddAssetItem on change of remove…
iLLiCiTiT May 13, 2021
2a4b4eb
HierarchicalModel has project_item property
iLLiCiTiT May 13, 2021
300c7a2
HierarchicalView collapse all except project on project load
iLLiCiTiT May 13, 2021
f053323
keep name resized to content
iLLiCiTiT May 13, 2021
8db22fb
added initial styles
iLLiCiTiT May 13, 2021
5390658
removed AddAssetItem
iLLiCiTiT May 13, 2021
4f2e82a
asset is created under passed asset
iLLiCiTiT May 13, 2021
12a7ae0
validate new name instead of passed name
iLLiCiTiT May 13, 2021
2ce685d
asset name duplications are handled by item id
iLLiCiTiT May 13, 2021
cc0cbbf
small changes
iLLiCiTiT May 13, 2021
03cb11d
hide spinbox buttons
iLLiCiTiT May 13, 2021
3e58532
added none project to project model
iLLiCiTiT May 13, 2021
68aa6b2
added cache of resources
iLLiCiTiT May 13, 2021
93c5f27
refresh button has icon
iLLiCiTiT May 13, 2021
a993504
changed order of refresh button
iLLiCiTiT May 13, 2021
fe52e24
added delete action to context menu
iLLiCiTiT May 13, 2021
924dbe4
use icons defined in style
iLLiCiTiT May 13, 2021
b388441
don't change background of items
iLLiCiTiT May 13, 2021
4f68e95
a little bit faster expanding
iLLiCiTiT May 13, 2021
b0f0f94
expand/collapse event faster
iLLiCiTiT May 13, 2021
4439805
fix adding new asset
iLLiCiTiT May 14, 2021
0f40eb6
all assets can be marked for deletion
iLLiCiTiT May 14, 2021
5a9b45f
assets without published content are removed from mongo
iLLiCiTiT May 14, 2021
80dbf6a
add exclamation mark to duplicated
iLLiCiTiT May 14, 2021
f85ecfa
added one more level of asset/task creation
iLLiCiTiT May 14, 2021
d0c3a3d
added buttons to add asset and task
iLLiCiTiT May 14, 2021
b382d5e
TaskItem and AssetItem have custom is_valid property
iLLiCiTiT May 14, 2021
c2d5afb
use is_valid property in code
iLLiCiTiT May 14, 2021
3e51be7
change invalid tooltips based on issue
iLLiCiTiT May 14, 2021
cda522d
task may have different edit and display role value
iLLiCiTiT May 14, 2021
b86ab86
task will store empty name as None
iLLiCiTiT May 14, 2021
c2aef84
use EditRole to get value of name and type
iLLiCiTiT May 14, 2021
cf9cf62
asset and task items know if should return display role
iLLiCiTiT May 14, 2021
0699d8d
view gives model items info if should return display role
iLLiCiTiT May 14, 2021
b318387
added some styles to qtreeview
iLLiCiTiT May 14, 2021
382febe
renamed icon keys
iLLiCiTiT May 14, 2021
354ea1d
unified color source
iLLiCiTiT May 14, 2021
d5201b7
modified color a little bit
iLLiCiTiT May 14, 2021
1c1b077
properly handle duplicated asset names on remove and un-remove
iLLiCiTiT May 14, 2021
57dc929
moved header definition to HierarchicalView
iLLiCiTiT May 14, 2021
3ddefad
it is possible to force project change even if current project name i…
iLLiCiTiT May 14, 2021
b3aa86b
view has defined some default widths of columns
iLLiCiTiT May 14, 2021
d2bb8e2
fixed removing of asset items
iLLiCiTiT May 14, 2021
ab35d00
added name and icon to window
iLLiCiTiT May 14, 2021
1477dad
renamed class from Window to ProjectManagerWindow
iLLiCiTiT May 14, 2021
ced7686
create add asset/task buttons in one step
iLLiCiTiT May 14, 2021
d17a030
defined CURRENT_DOC_SCHEMAS constant in openpype.lib
iLLiCiTiT May 17, 2021
85f812b
define project regex in code
iLLiCiTiT May 17, 2021
29040d4
implemented function to create new project
iLLiCiTiT May 17, 2021
7d6741f
use CURRENT_DOC_SCHEMAS in hierarchy model
iLLiCiTiT May 17, 2021
cc55952
implemented CreateProjectDialog to be able create projects
iLLiCiTiT May 17, 2021
8ec20d1
use CreateProjectDialog in project manager
iLLiCiTiT May 17, 2021
6fe0804
make visualParent not required on asset doc
iLLiCiTiT May 17, 2021
1850687
added CreateProjectDialog to init of project manager module
iLLiCiTiT May 17, 2021
376c3df
add filling of style data to stylesheets
iLLiCiTiT May 17, 2021
77108c5
added base of resources
iLLiCiTiT May 17, 2021
807eefe
hide project name messages without text
iLLiCiTiT May 17, 2021
0b15947
removed debug prints
iLLiCiTiT May 17, 2021
5134ae7
hound fixes
iLLiCiTiT May 17, 2021
3600686
a little bit more cleanup
iLLiCiTiT May 17, 2021
63c3482
Merge branch 'develop' into feature/project_manager
iLLiCiTiT May 17, 2021
42c950a
fix new asset name validation
iLLiCiTiT May 17, 2021
229b2a1
even more fixes of name getting
iLLiCiTiT May 17, 2021
0795df3
shift + enter create asset as sibling
iLLiCiTiT May 18, 2021
84b4258
added value cleanup to filter combobox
iLLiCiTiT May 18, 2021
c5525ab
set last value if current is invalid
iLLiCiTiT May 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions openpype/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,11 @@ def launch(app, project, asset, task,
PypeCommands().run_application(app, project, asset, task, tools, arguments)


@main.command(context_settings={"ignore_unknown_options": True})
def projectmanager():
PypeCommands().launch_project_manager()


@main.command(
context_settings=dict(
ignore_unknown_options=True,
Expand Down
8 changes: 8 additions & 0 deletions openpype/lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
)

from .avalon_context import (
CURRENT_DOC_SCHEMAS,
PROJECT_NAME_ALLOWED_SYMBOLS,
PROJECT_NAME_REGEX,
create_project,
is_latest,
any_outdated,
get_asset,
Expand Down Expand Up @@ -163,6 +167,10 @@
"recursive_bases_from_class",
"classes_from_module",

"CURRENT_DOC_SCHEMAS",
"PROJECT_NAME_ALLOWED_SYMBOLS",
"PROJECT_NAME_REGEX",
"create_project",
"is_latest",
"any_outdated",
"get_asset",
Expand Down
93 changes: 93 additions & 0 deletions openpype/lib/avalon_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,99 @@
log = logging.getLogger("AvalonContext")


CURRENT_DOC_SCHEMAS = {
"project": "openpype:project-3.0",
"asset": "openpype:asset-3.0",
"config": "openpype:config-2.0"
}
PROJECT_NAME_ALLOWED_SYMBOLS = "a-zA-Z0-9_"
PROJECT_NAME_REGEX = re.compile(
"^[{}]+$".format(PROJECT_NAME_ALLOWED_SYMBOLS)
)


def create_project(
project_name, project_code, library_project=False, dbcon=None
):
"""Create project using OpenPype settings.

This project creation function is not validating project document on
creation. It is because project document is created blindly with only
minimum required information about project which is it's name, code, type
and schema.

Entered project name must be unique and project must not exist yet.

Args:
project_name(str): New project name. Should be unique.
project_code(str): Project's code should be unique too.
library_project(bool): Project is library project.
dbcon(AvalonMongoDB): Object of connection to MongoDB.

Raises:
ValueError: When project name already exists in MongoDB.

Returns:
dict: Created project document.
"""

from openpype.settings import ProjectSettings, SaveWarningExc
from avalon.api import AvalonMongoDB
from avalon.schema import validate

if dbcon is None:
dbcon = AvalonMongoDB()

if not PROJECT_NAME_REGEX.match(project_name):
raise ValueError((
"Project name \"{}\" contain invalid characters"
).format(project_name))

database = dbcon.database
project_doc = database[project_name].find_one(
{"type": "project"},
{"name": 1}
)
if project_doc:
raise ValueError("Project with name \"{}\" already exists".format(
project_name
))

project_doc = {
"type": "project",
"name": project_name,
"data": {
"code": project_code,
"library_project": library_project
},
"schema": CURRENT_DOC_SCHEMAS["project"]
}
# Insert document with basic data
database[project_name].insert_one(project_doc)
# Load ProjectSettings for the project and save it to store all attributes
# and Anatomy
try:
project_settings_entity = ProjectSettings(project_name)
project_settings_entity.save()
except SaveWarningExc as exc:
print(str(exc))
except Exception:
database[project_name].delete_one({"type": "project"})
raise

project_doc = database[project_name].find_one({"type": "project"})

try:
# Validate created project document
validate(project_doc)
except Exception:
# Remove project if is not valid
database[project_name].delete_one({"type": "project"})
raise

return project_doc


def with_avalon(func):
@functools.wraps(func)
def wrap_avalon(*args, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@

BaseEvent
)
from openpype.modules.ftrack.lib.avalon_sync import (
EntitySchemas
)
from openpype.lib import CURRENT_DOC_SCHEMAS


class SyncToAvalonEvent(BaseEvent):
Expand Down Expand Up @@ -1128,7 +1126,7 @@ def create_entity_in_avalon(self, ftrack_ent, parent_avalon):
"_id": mongo_id,
"name": name,
"type": "asset",
"schema": EntitySchemas["asset"],
"schema": CURRENT_DOC_SCHEMAS["asset"],
"parent": proj["_id"],
"data": {
"ftrackId": ftrack_ent["id"],
Expand Down
8 changes: 4 additions & 4 deletions openpype/modules/ftrack/lib/avalon_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@


# Current schemas for avalon types
EntitySchemas = {
CURRENT_DOC_SCHEMAS = {
"project": "openpype:project-3.0",
"asset": "openpype:asset-3.0",
"config": "openpype:config-2.0"
Expand Down Expand Up @@ -1862,7 +1862,7 @@ def create_avalon_entity(self, ftrack_id):

item["_id"] = new_id
item["parent"] = self.avalon_project_id
item["schema"] = EntitySchemas["asset"]
item["schema"] = CURRENT_DOC_SCHEMAS["asset"]
item["data"]["visualParent"] = avalon_parent

new_id_str = str(new_id)
Expand Down Expand Up @@ -2003,8 +2003,8 @@ def create_avalon_project(self):

project_item["_id"] = new_id
project_item["parent"] = None
project_item["schema"] = EntitySchemas["project"]
project_item["config"]["schema"] = EntitySchemas["config"]
project_item["schema"] = CURRENT_DOC_SCHEMAS["project"]
project_item["config"]["schema"] = CURRENT_DOC_SCHEMAS["config"]

self.ftrack_avalon_mapper[self.ft_project_id] = new_id
self.avalon_ftrack_mapper[new_id] = self.ft_project_id
Expand Down
6 changes: 6 additions & 0 deletions openpype/pype_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ def extractenvironments(output_json_path, project, asset, task, app):
with open(output_json_path, "w") as file_stream:
json.dump(env, file_stream, indent=4)

@staticmethod
def launch_project_manager():
from openpype.tools import project_manager

project_manager.main()

def texture_copy(self, project, asset, path):
pass

Expand Down
10 changes: 10 additions & 0 deletions openpype/tools/project_manager/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from .project_manager import (
ProjectManagerWindow,
main
)


__all__ = (
"ProjectManagerWindow",
"main"
)
5 changes: 5 additions & 0 deletions openpype/tools/project_manager/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from project_manager import main


if __name__ == "__main__":
main()
50 changes: 50 additions & 0 deletions openpype/tools/project_manager/project_manager/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
__all__ = (
"IDENTIFIER_ROLE",

"HierarchyView",

"ProjectModel",
"CreateProjectDialog",

"HierarchyModel",
"HierarchySelectionModel",
"BaseItem",
"RootItem",
"ProjectItem",
"AssetItem",
"TaskItem",

"ProjectManagerWindow",
"main"
)


from .constants import (
IDENTIFIER_ROLE
)
from .widgets import CreateProjectDialog
from .view import HierarchyView
from .model import (
ProjectModel,

HierarchyModel,
HierarchySelectionModel,
BaseItem,
RootItem,
ProjectItem,
AssetItem,
TaskItem
)
from .window import ProjectManagerWindow


def main():
import sys
from Qt import QtWidgets

app = QtWidgets.QApplication([])

window = ProjectManagerWindow()
window.show()

sys.exit(app.exec_())
13 changes: 13 additions & 0 deletions openpype/tools/project_manager/project_manager/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import re
from Qt import QtCore


IDENTIFIER_ROLE = QtCore.Qt.UserRole + 1
DUPLICATED_ROLE = QtCore.Qt.UserRole + 2
HIERARCHY_CHANGE_ABLE_ROLE = QtCore.Qt.UserRole + 3
REMOVED_ROLE = QtCore.Qt.UserRole + 4
ITEM_TYPE_ROLE = QtCore.Qt.UserRole + 5
EDITOR_OPENED_ROLE = QtCore.Qt.UserRole + 6

NAME_ALLOWED_SYMBOLS = "a-zA-Z0-9_"
NAME_REGEX = re.compile("^[" + NAME_ALLOWED_SYMBOLS + "]*$")
Loading