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

Project manager #1396

merged 222 commits into from
May 19, 2021

Conversation

iLLiCiTiT
Copy link
Member

@iLLiCiTiT iLLiCiTiT commented Apr 22, 2021

Description

Project manager to create assets and tasks with ability to modify attribute values based on UI elements (Simple as possible).

Current state

Only UI testing elements preparation to check if all minimum requirements are available.

TODO

  • create dynamically assets and move them in hierarchy
  • create dynamically tasks and move them in hierarchy
  • set values for multiselection
  • unique asset name validation
  • unique task name validation
  • define columns and their definition
    • items are editable and their values definition e.g. number has min/max and decimal point or enumerator has values
  • project selection
  • load of existing assets from mongo
  • commit changes - save them to db
  • disable rename and move of assets if the asset or it's children has published content

Changes

  • implemented Project manager tool which can create new projects and create/modify it's content
  • implemented basic create_project function which can create projects with passed project name and code
    • other data are filled with project defaults
    • project document is validated at the end
    • project document should be deleted if any part (after insertion empty doc) will crash
  • added constant CURRENT_DOC_SCHEMAS which hold currently used doc schemas

Resolves: #874

@BigRoy
Copy link
Collaborator

BigRoy commented Apr 22, 2021

Is there a specific reason the project_manager code is nested in openpype/tools/project_manager/project_manager? :) Looking at the other tools those files should be in openpype/tools/project_manager/

I can fix on my end if needed.

@iLLiCiTiT
Copy link
Member Author

iLLiCiTiT commented Apr 22, 2021

Is there a specific reason the project_manager code is nested

If it will be tool launched outside of pype tray than yes it has a reason as it can be used and launched as module project_manager<module>/project_manager<code>.
Current stage is UI testing, it's far away from final version so I actually don't care about these details when everything from current version will probably change over time.

@BigRoy
Copy link
Collaborator

BigRoy commented Apr 28, 2021

I know this is a work in progress, but I'm getting this error:

*** WRN: >>> { TrayModulesManager }: [  Module "launcher_tool" crashed on `tray_init`.  ]
==============
'use_python_2'
==============
Traceback (most recent call last):
  File "S:\test\pype\openpype\modules\base.py", line 690, in tray_init
    module.tray_init()
  File "S:\test\pype\openpype\modules\launcher_action.py", line 16, in tray_init
    self.create_window()
  File "S:\test\pype\openpype\modules\launcher_action.py", line 35, in create_window
    self.window = LauncherWindow()
  File "S:\test\pype\openpype\tools\launcher\window.py", line 301, in __init__
    actions_bar = ActionBar(self.dbcon, self)
  File "S:\test\pype\openpype\tools\launcher\widgets.py", line 113, in __init__
    model = ActionModel(self.dbcon, self)
  File "S:\test\pype\openpype\tools\launcher\models.py", line 123, in __init__
    self.application_manager = ApplicationManager()
  File "S:\test\pype\openpype\lib\applications.py", line 273, in __init__
    self.refresh()
  File "S:\test\pype\openpype\lib\applications.py", line 291, in refresh
    group = ApplicationGroup(group_name, variant_defs, self)
  File "S:\test\pype\openpype\lib\applications.py", line 141, in __init__
    variant_name, variant_data, self
  File "S:\test\pype\openpype\lib\applications.py", line 182, in __init__
    self.use_python_2 = data[ "use_python_2" ]
KeyERROR: 'use_python_2'

Should that be a data.get("use_python_2", False)? or am I missing some crucial setup on my end?

@iLLiCiTiT
Copy link
Member Author

I know this is a work in progress, but I'm getting this error

This is error because use_python_2 key was added to application settings and it seems that you probably have studio overrides of application settings from previous version. Open settings UI and Save System settings.

Should that be a data.get("use_python_2", False)?

It is required key so not really. It's annoying for development but using default value here is more dangerous.

@iLLiCiTiT iLLiCiTiT marked this pull request as ready for review May 17, 2021 19:00
@iLLiCiTiT
Copy link
Member Author

Currently has tool basic implementation and basic styles. Tool was not added to tray as we have to resolve who should be able do changes and when.

@iLLiCiTiT iLLiCiTiT self-assigned this May 17, 2021
@iLLiCiTiT iLLiCiTiT requested a review from a team May 17, 2021 19:20
@mkolar
Copy link
Member

mkolar commented May 17, 2021

I would start of with having the tool available in the same fashion as settings GUI, only for admins or for everyone until we have proper user management.

Some general comments.

  • when using hotkeys. Shift + Enter should be creating asset as siblings of currently selected. This was original behaviours and I assume it was accidentally changed when the button and right-click were made to create children of selection.
  • when you type start of a task type and hit enter, instead of picking the best match, it will add the partial entry to the task types list :)
    image
  • we should somehow highlight attributes that have explicit values and will therefore not receive any changes from parent anymore, currently, it's really hard to tell that ep01sh020 is set explicitly.
    image

@mkolar mkolar added the type: enhancement Enhancements to existing functionality label May 18, 2021
Copy link
Member

@mkolar mkolar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would call this ready for gathering feedback from the community now. Lot's of work to be done, but with current functionality OpenPype is able to operate independently which is the key point at the moment.

@mkolar mkolar added this to the 3.0.0 milestone May 19, 2021
@mkolar mkolar merged commit 2b8233d into develop May 19, 2021
@mkolar mkolar deleted the feature/project_manager branch May 19, 2021 08:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement Enhancements to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unified schema definition
3 participants