Plugin help with Kwargs error
Quote from UserJ on 12. November 2020, 20:28Hello, i'm not very good at coding but i've been hacking things together so far.....
So in postExport im trying to gather the shotcam export path from prism
before in older version of prism i was able gather these with below code, but after i updated to 1.3.0.49 I started gettings errors, (attached picture of error)
its a simple plugin where im just duplicating the Shotcam, moving it out of camera Rig group bake animation then export as FBX to shotcam Folder.
in the Def postExport im trying to access these information
prismOutput = kwargs["outputName"].split("\\")
camDir = "\\".join(prismOutput[:-1])
shotCam = state.ui.curCam.split("|")[-1]
frameRange = (kwargs["startFrame"], kwargs["endFrame"])hmmm im open to suggestions maybe there is a better way for me to do this?
Hello, i'm not very good at coding but i've been hacking things together so far.....
So in postExport im trying to gather the shotcam export path from prism
before in older version of prism i was able gather these with below code, but after i updated to 1.3.0.49 I started gettings errors, (attached picture of error)
its a simple plugin where im just duplicating the Shotcam, moving it out of camera Rig group bake animation then export as FBX to shotcam Folder.
in the Def postExport im trying to access these information
prismOutput = kwargs["outputName"].split("\\")
camDir = "\\".join(prismOutput[:-1])
shotCam = state.ui.curCam.split("|")[-1]
frameRange = (kwargs["startFrame"], kwargs["endFrame"])
hmmm im open to suggestions maybe there is a better way for me to do this?
Uploaded files:- You need to login to have access to uploads.
Quote from RichardF on 16. November 2020, 1:13In v1.3.0.48 the naming convention changed to be more consistent with other scripts.
Take a looks at the updated preset: https://github.com/RichardFrangenberg/Prism/blob/development/Prism/ProjectFiles/Hooks/postExport.py
Instead of kwargs["outputName"] use kwargs["outputpath"].
Also "startFrame" and "endFrame" were changed to all lowercase.
In v1.3.0.48 the naming convention changed to be more consistent with other scripts.
Take a looks at the updated preset: https://github.com/RichardFrangenberg/Prism/blob/development/Prism/ProjectFiles/Hooks/postExport.py
Instead of kwargs["outputName"] use kwargs["outputpath"].
Also "startFrame" and "endFrame" were changed to all lowercase.
Quote from jeremy howdin on 3. February 2021, 1:30Is there an example of a hook that I can look to get an idea of how it works?
Is there an example of a hook that I can look to get an idea of how it works?
Quote from RichardF on 4. February 2021, 11:44In the hook files there are a few lines, which show how to access some variables. Unfortunately there are no full production examples of hooks yet.
It really depends on what you are trying to do. Since you can access every function from Prism from inside a hook there are many different possibilities.
In the hook files there are a few lines, which show how to access some variables. Unfortunately there are no full production examples of hooks yet.
It really depends on what you are trying to do. Since you can access every function from Prism from inside a hook there are many different possibilities.