Thread: using nuke library in python gui

Reply to Thread
Results 1 to 6 of 6
  1. #1 using nuke library in python gui 
    Join Date
    Jun 2007
    Posts
    38
    hi,

    i like to write a small py app to build a nuke script.

    i'm using under xp the IDLE (Python GUI). but when i import nuke i get the message:

    Traceback (most recent call last):
    File "C:\Program Files\Python25\test_delete.py", line 7, in <module>
    import nuke
    ImportError: No module named nuke


    i have a environment variable PYTHONPATH C:\Program Files\OpenLibraries\python;C:\Program Files\Nuke5.0v1\python25.zip;C:\Program Files\Nuke5.0v1\DLLs;C:\Program Files\Nuke5.0v1\lib;C:\Program Files\Nuke5.0v1\lib\plat-win;C:\Program Files\Nuke5.0v1\lib\lib-tk;C:\Program Files\Nuke5.0v1;C:\Program Files\Nuke5.0v1\lib\site-packages;C:\temp\python;C:\Program Files\Nuke5.0v1\plugins;C:\Program Files\Nuke5.0v1\;C:\Program Files\Autodesk\Maya2008\Python\lib\site-packages



    in maya it works just fine. i have to
    import maya.standalone
    maya.standalone.initialize()
    import maya.cmds as mc
    and with this i can use every module of the maya py library ... but how can i use the nuke py library??????

    thanks in advanced.
    Reply With Quote  

  2. #2  
    Join Date
    Jun 2008
    Location
    Sunnyvale
    Posts
    6
    Hi wolft, By any chance you got it solved. I am in the same boat. I have appended the paths to the site-packages within the Nuke application. Still facing the same issue as you mentioned. Any suggestions from anyone in this domain would be helpful ! Cheers, Adarsh
    Reply With Quote  

  3. #3  
    Join Date
    Jun 2007
    Posts
    38
    Quote Originally Posted by adarsh View Post
    Hi wolft, By any chance you got it solved. I am in the same boat. I have appended the paths to the site-packages within the Nuke application. Still facing the same issue as you mentioned. Any suggestions from anyone in this domain would be helpful ! Cheers, Adarsh
    hi
    sorry, bad news.
    i also asked foundry ... they said it's impossible due to license issues ... what ever that means!?!?!?!

    but you can do the most things in the nuke idl or write your stuff in a more fancy app and copy paste it in nuke. it's not perfect but for the moment it's ok.

    it will get better ... i hope!

    all the best
    Reply With Quote  

  4. #4  
    Join Date
    Sep 2004
    Posts
    221
    Yeah when the Nuke interface is running (either with GUI up, or using Nuke -t in the terminal) then your license is active and you can import nuke, BUT you can't have both an active IDLE interactive session and Nuke at the same time, because essentially the Script Editor is always running as part of Nuke, and is commandeering the interactive session.

    The Script Editor is essentially a dumbed down IDLE anyway, so all I do is run python's IDLE as a smarter text editor, then copy and paste to the Script Editor window to run ... I keep two Script Editor panels open in Nuke, one for my main script and one for help(nuke.blahblah) type queries.

    Everyone's been asking them for some sort of hookup to IDLE with Nuke running, and hopefully it'll happen ... or Script Editor will be expanded to a full fledged IDLE.
    Reply With Quote  

  5. #5  
    Join Date
    Nov 2006
    Location
    Vancouver, B.C
    Posts
    32
    Quote Originally Posted by michaelmovies View Post
    Yeah when the Nuke interface is running (either with GUI up, or using Nuke -t in the terminal) then your license is active and you can import nuke, BUT you can't have both an active IDLE interactive session and Nuke at the same time, because essentially the Script Editor is always running as part of Nuke, and is commandeering the interactive session.

    The Script Editor is essentially a dumbed down IDLE anyway, so all I do is run python's IDLE as a smarter text editor, then copy and paste to the Script Editor window to run ... I keep two Script Editor panels open in Nuke, one for my main script and one for help(nuke.blahblah) type queries.

    Everyone's been asking them for some sort of hookup to IDLE with Nuke running, and hopefully it'll happen ... or Script Editor will be expanded to a full fledged IDLE.
    Has this been sorted out or is it still not possible to control Nuke from IDLE?
    Reply With Quote  

  6. #6 Question  
    Join Date
    Nov 2006
    Location
    Vancouver, B.C
    Posts
    32
    What's this, no python users here that knows how? (or if it is possible)

    In the manual it says on page 381 that..
    You can also run an interactive Python session outside of Nuke. However, on Mac OS X the Python
    interpreter and other applications that are bundled with Nuke (such as IDLE) can only be run from
    inside the directory where they are located.
    But it doesn't say how to get it started...
    Reply With Quote  

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Maya to Nuke With Mocon
    By Kyo in forum NUKE from The Foundry
    Replies: 11
    Last Post: March 22nd, 2008, 07:00 AM
  2. Customizing Nuke 5 : custom python scripts
    By donat in forum NUKE from The Foundry
    Replies: 15
    Last Post: March 21st, 2008, 09:07 AM
  3. The Foundry launches NUKE 5
    By CGnews in forum Industry News
    Replies: 0
    Last Post: February 25th, 2008, 05:54 PM
  4. Nuke gets Fired Up
    By CGnews in forum Industry News
    Replies: 5
    Last Post: June 27th, 2007, 01:48 AM
Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts