mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
main structure to generate shelves
This commit is contained in:
parent
a006b5df63
commit
cdd90ad2a7
2 changed files with 49 additions and 2 deletions
|
|
@ -14,7 +14,7 @@ from openpype.pipeline import (
|
|||
)
|
||||
from openpype.pipeline.load import any_outdated_containers
|
||||
import openpype.hosts.houdini
|
||||
from openpype.hosts.houdini.api import lib
|
||||
from openpype.hosts.houdini.api import lib, shelves
|
||||
|
||||
from openpype.lib import (
|
||||
register_event_callback,
|
||||
|
|
@ -74,6 +74,7 @@ def install():
|
|||
# so it initializes into the correct scene FPS, Frame Range, etc.
|
||||
# todo: make sure this doesn't trigger when opening with last workfile
|
||||
_set_context_settings()
|
||||
shelves.generate_shelves()
|
||||
|
||||
|
||||
def uninstall():
|
||||
|
|
@ -321,7 +322,6 @@ def _set_context_settings():
|
|||
lib.set_scene_fps(fps)
|
||||
|
||||
lib.reset_framerange()
|
||||
lib.create_shelf()
|
||||
|
||||
|
||||
def on_pyblish_instance_toggled(instance, new_value, old_value):
|
||||
|
|
|
|||
47
openpype/hosts/houdini/api/shelves.py
Normal file
47
openpype/hosts/houdini/api/shelves.py
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
import os
|
||||
import logging
|
||||
|
||||
from openpype.settings import get_project_settings
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def generate_shelves():
|
||||
# load configuration of custom menu
|
||||
project_settings = get_project_settings(os.getenv("AVALON_PROJECT"))
|
||||
shelves_set_config = project_settings["houdini"]["shelves"]
|
||||
|
||||
if not shelves_set_config:
|
||||
log.warning("No custom shelves found.")
|
||||
return
|
||||
|
||||
# run the shelf generator for Houdini
|
||||
for shelf_set in shelves_set_config:
|
||||
pass
|
||||
# if shelf_set_source_path is not None we load the source path and return
|
||||
|
||||
# if the shelf set name already exists, do nothing, else, create a new one
|
||||
|
||||
# go through each shelf
|
||||
# if shelf_file_path exists, load the shelf and return
|
||||
# if the shelf name already exists, do nothing, else, create a new one
|
||||
|
||||
# go through each tool
|
||||
# if filepath exists, load the tool, add it to the shelf and continue
|
||||
# create the tool
|
||||
# add it to a list of tools
|
||||
|
||||
# add the tools list to the shelf with the tools already in it
|
||||
# add the shelf to the shelf set with the shelfs already in it
|
||||
|
||||
|
||||
def get_or_create_shelf_set():
|
||||
pass
|
||||
|
||||
|
||||
def get_or_create_shelf():
|
||||
pass
|
||||
|
||||
|
||||
def get_or_create_tool():
|
||||
pass
|
||||
Loading…
Add table
Add a link
Reference in a new issue