The forum is active for archival purposes only.

Join our discord community for new topics.

Forum Navigation
You need to log in to create posts and topics.

best way to use pcore funtionality in natron / nuke ( python ) custom scripts

Hi,

i am trying to upgrade old process (python scripts) that works within nuke / natron to include (work with prism).
i see my old libs works in nuke / natron as lmLib and also feel that in same console, i can use pcore  as well.
how exactly i can import pcore in my own python script / modules.?? i need pcore.projectPath working in my scripts.

thanks in advance. regards,haseeb

Hey Haseeb,

pcore is defined in the .nuke/menu.py. If you are loading your tools from the same file or the script editor you can simply do something like this in the menu.py:

import myTool
myTool.init(pcore)

Alternatively you could create a new PrismCore instance in your tool (But I'd prefer the first way).

import PrismCore
pcore = PrismCore.PrismCore(app="Nuke")

thankyou sir, it really helps.