State:Closed|TargetRelease:No Target|icon_bug|icon_katana|database:public|Resolution:Duplicate|BugID:343622|
1) Setup Callback script for testing
A) Navigate to '.katana/UIPlugins' (Create folder if it does not exist)
B) Create a Python script file and open it within a IDE editor.
C) Copy the following into the script:
from Katana import Callbacksdef main(): Callbacks.addCallback(Callbacks.Type.onSceneLoad, on_sceneload)def on_sceneload(**kwargs): print('on_scene_load callback running') main() D) Save the script.
2) Add the shelve script for testing
A) Navigate to '.katana/Shelves/Test_Shelves' (Create folder if it does not exist)
B) Create a Python script file and open it within a IDE editor.
C) Copy the following into the script:
"""NAME: Load_Shelve_ProjectICON: Icons/LiveGroup/Group256.pngLoad specific project file with asset file browser"""import osfrom Katana import KatanaFiledef LoadProject(): filename = UI4.Util.AssetId.BrowseForAsset('','Select Project File',False,{'fileTypes':'katana *.livegroup'}) if filename is not None: KatanaFile.Load(filename)LoadProject() D) Save the script.
3) Test the shelve script
A) Open Katana
B) Select your new Shelve option from within the Shelves
C) Select any .katana file and press Ok.
D) Open your Terminal window
1) Follow the first step from test 1 (Copy the callback script into the '.katana/UIPlugins' location)
2) Copy the following into the Python tab within Katana:
def LoadProject(): filename = UI4.Util.AssetId.BrowseForAsset('','Select Project File',False,{'fileTypes':'katana *.livegroup'}) if filename is not None: KatanaFile.Load(filename)LoadProject() 2) Select any .katana file and press Ok.
We're sorry to hear that
Please tell us why