-
Notifications
You must be signed in to change notification settings - Fork 129
General: Define query functions #3288
General: Define query functions #3288
Conversation
Task linked: OP-3292 Map where database queries and changes |
) | ||
from openpype.pipeline import HeroVersionType | ||
from .models import TreeModel | ||
from . import lib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module level import not at top of file
get_hero_versions, | ||
) | ||
from openpype.pipeline import HeroVersionType | ||
from .models import TreeModel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module level import not at top of file
get_versions, | ||
get_hero_versions, | ||
) | ||
from openpype.pipeline import HeroVersionType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module level import not at top of file
if Qt.__binding__ == "PySide": | ||
from PySide.QtGui import QStyleOptionViewItemV4 | ||
elif Qt.__binding__ == "PyQt4": | ||
from PyQt4.QtGui import QStyleOptionViewItemV4 | ||
|
||
from openpype.client import ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module level import not at top of file
…rsion_by_subset_id'
…id' and 'get_last_version_by_subset_name'
I'll just add that this is part of the continuous work towards a properly defined V4 API on the client side as well as server. To be able to make the move, we first need to unify what's going on with the DB call across the codebase. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should work now |
- versions | ||
|
||
### Standalone publisher | ||
- openpype/hosts/standalonepublisher/plugins/publish/collect_bulk_mov_instances.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (82 > 79 characters)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I've tested it works for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested in AE/PS.
Tested Loader and Site Sync.
So far it works fine.
Brief description
Define basic query functions to replace direct mongo queries for project specific entities.
Description
We need to define functions that will cover all direct mongo queries in code and use only functions in a way that functions logic can be changed to work with any other database system, or at least as much as possible. This is first step of the change by defying basic query functions which are used (for now) only in tools.
AvalonMongoDB
objects andlegacy_io
have new functionsactive_project
andcurrent_project
(difference is thatcurrent_project
does not require installation).Additional information
At this stage all tools should work as they did. Content of
openpype.client
must be self contained so there is no place to useany other context then context passed to functions which are called there.
Some functions can be split into more, some functions can be merged into one, some are missing completely because there was not a use case for them in tools.
Future goals
openpype.lib
toopenpype.client
(with backwards compatibility).Testing notes: