Join our discord community

Forum breadcrumbs - You are here:ForumPrism: GeneralPlugin help with Kwargs error
Please or Register to create posts and topics.

Plugin help with Kwargs error

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.

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.

Thank you very much. this list of preset is very handy

Is there an example of a hook that I can look to get an idea of how it works?

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.

Thank you