Reuse check inventory versions for loader colors YN - #364
Conversation
|
Something went wrong here? This has a massive diff and conflicts that it shouldn't have? |
working on it |
|
@copilot fix linking and make sure code changes will be minimal required |
Co-authored-by: jakubjezek001 <40640033+jakubjezek001@users.noreply.github.com>
Fixed in 04b1a72: the merge had left |
|
@BigRoy would you agree, this is better? |
Can you describe what you did different than the source PR? Just so I can focus my attention on that. |
| # Set all workfile settings.' | ||
| nuke.addOnCreate(on_root_create, nodeClass="Root") | ||
| # set checker for last versions on loaded containers | ||
| nuke.addOnScriptLoad(check_inventory_versions) | ||
| # fix ffmpeg settings on script |
moonyuet
left a comment
There was a problem hiding this comment.
I tested the code and it is working as it is intended. I only have a comment above and it's good to go for approval after it is resolved. Should we support the changes of the color from addon settings?
adoption of #278
Changelog Description
refactor the tile_color logic to be shared between loaders. Updated the
check_inventory_versionsto use the same logic as the loader for consistent color codingAdditional review information
before:
is_latestchecks to update the node colorscheck_inventory_versionsruns on scriptSave and uses its own logic and own color values to update the node colorslatestcolorafter:
plugin.NukeLoader.get_node_colorsreturns a map of "container_status/categories" to colorsnode_color_<status>variables on the LoaderClassget_node_colorsand return different valuesplugin.NukeLoader.update_node_color(self, node)a helper method to update the tile color for a given node. Loaders should use this onloadandupdatecheck_inventory_versionsnow uses the colors defined by each containersget_node_colorsTodo:
LoadClipandLoadImageloaders as examples. If the general approach is approved I'm happy to roll out the updates to other loaders too.Testing notes:
LoadCliporLoadImageloaderonScriptSavecallback:check_inventory_versions