Closed BigRoy closed 5 years ago
With this last commit I checked out the pipeline features in Maya and ran through:
This now all worked so I consider this testable for others.
Ah, backward compatibility, but do we need to do that for this kind of low level refactoring ?
I have some script/tools that, for example, used projectmanager.model.TreeModel
. But since these doesn't count as part of api
nor other higher level things, so maybe we won't need to support this ?
I have some script/tools that, for example, used projectmanager.model.TreeModel. But since these doesn't count as part of api nor other higher level things, so maybe we won't need to support this ?
Exactly, as those have never been exposed to any public facing API these changes are in the realm of "allowed to change". So, those don't need to be backwards compatible and you'll have to refactor in-house code that used it to change along. We had some internal tools referencing things too. ;)
Anyway, anything not exposed in the API is allowed to change without being fully backwards compatible. (e.g. a function name may behave differently, be renamed, moved, etc.). And the recommendation is not to reference those methods, but of course... you can if you really need to at your own risk, like now.
I suppose that "Approved" should have been "Requesting changed", as I think we should address my comments before merging. I'll let @davidlatwe hit the Merge button for this PR on my behalf. Great work guys.
This should be ready to go if I understood @mottosso correctly here then there are now no open comments anymore as I refactored the columns
to Columns
which was the last remark.
I'd say, give it one other test run and feel free to merge @davidlatwe 🚀
Thanks all!
Ah, I believe we should bump the version to 5.4.0
, :wave: @BigRoy :)
I will merge this PR and draft a ~pre-release~ release after verison bumped !
@davidlatwe this hasn't been merged yet. Do you want me to quickly bump version? :)
Yes, please do ! It seems that I could not bump it myself into this PR :P
Note: This is a big PR as it refactors locations of models, views, delegates and functions. It's this big because unfortunately it needs to be.
Problems
Node
, which is wrong terminology as Qt refers toQAbstractItemModel
where it is anItem
loader.lib
are actually caches reused across multiple tools. This is unclear from the variable and function naming. (This "global state" is a problem of its own, but this PR will not try to solve that as it would require even more changes.) It only solves the cross-referencing across tools.lowerCamelCase
where they should besnake_case
as per #437AssetView
class exists which purely exists for one-time use and only sets 3 small view tweaks - it's redundant complexity.TreeModel
defines an attribute calledCOLUMNS
which should be lowercasecolumns
.ExactMatchesFilterProxyModel
which is redundant lines of code.What's changed?
avalon.tools.models
,avalon.tools.views
,avalon.tools.delegates
,avalon.tools.widgets
andavalon.tools.lib
Node
is refactored toItem
, including variablesnode
and alike that I could find are refactored toitem
.snake_case
.AssetView
class has been removed and the related lines of code can now directly be found in theAssetWidget
.TreeModel.COLUMNS
refactored toTreeModel.Columns
ExactMatchesFilterProxyModel
.This is a work in progress PR and has not been tested yet. However I'm opening this to kickstart the discussion about any faulty choices I'm making. Plus, since it's a lengthy PR it gives others time to go through what is being changed.
I'll clearly state in a comment when I have been able to thoroughly test changes and feel it's in a good state for others to test too.
This PR acts as a replacement to #414 trying to do some similar things yet now along the new Contribution guidelines. Additionally it tries to describe the problems that we faced before and how they have been resolved.