Thread: Adding a Nuke .nk files to a menu in the toolbar...

Reply to Thread
Results 1 to 10 of 10
  1. #1 Adding a Nuke .nk files to a menu in the toolbar... 
    Hi,

    I have made a very simple script that basically creates a 16:9 PAL safe frame.

    I've grouped it and saved the grouped script as palSafe.nk into the normal plugins folder.

    What I want to do is add a menu open off the toolbar which will run this script.

    I've tried this in menu.py but it doesnt work, can anyone help me out.

    nuke.menu("Nodes").addMenu("SphereVFX", icon="sphereIcon.png")
    nuke.toolbar("Nodes").addCommand("SphereVFX/palSafe", "palSafe.nk('palSafe')", icon="palSafe.png")

    When I click on the newly defined palSafe button in Nuke I get this error...

    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    NameError: name 'palSafe' is not defined


    I've attached my menu.py and palSafe.nk in case it helps

    Many thanks in advance,

    Matt
    Attached Files
    Last edited by mattdleonard; June 9th, 2008 at 03:59 PM.
    Reply With Quote  

  2. #2  
    Join Date
    May 2008
    Posts
    159
    what do you want to do ? You can chacne ur composition setting to pal 19:9
    Reply With Quote  

  3. #3  
    Join Date
    Nov 2006
    Location
    Costantinopol
    Posts
    677
    if you want to change your comp res. you can use reformat node for pal to anything or your comp format to any format or scale
    ________
    Maine Dispensary
    Last edited by Kyo; February 22nd, 2011 at 11:43 AM.
    Reply With Quote  

  4. #4  
    Hi,

    All I'm trying to do really is run a .nk script from a custom menu in the tool bar.
    The reform node I have got my head round way back

    Thanks

    Matt
    Reply With Quote  

  5. #5  
    Join Date
    Mar 2006
    Location
    London, UK
    Posts
    469
    Quote Originally Posted by mattdleonard View Post
    Hi,

    I have made a very simple script that basically creates a 16:9 PAL safe frame.

    I've grouped it and saved the grouped script as palSafe.nk into the normal plugins folder.

    What I want to do is add a menu open off the toolbar which will run this script.

    I've tried this in menu.py but it doesnt work, can anyone help me out.

    nuke.menu("Nodes").addMenu("SphereVFX", icon="sphereIcon.png")
    nuke.toolbar("Nodes").addCommand("SphereVFX/palSafe", "palSafe.nk('palSafe')", icon="palSafe.png")

    When I click on the newly defined palSafe button in Nuke I get this error...

    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    NameError: name 'palSafe' is not defined


    I've attached my menu.py and palSafe.nk in case it helps

    Many thanks in advance,

    Matt


    Just add these to the "toolbars.py" file

    # The "SphereVFX" menu
    m = toolbar.addMenu("SphereVFX", "sphereIcon.png")
    m.addCommand("SphereVFX/palSafe", "nuke.createNode(\"PAL169SafeFrame\")")



    It worked fine for me. Use the gizmo I made
    Attached Files
    Hugo Guerra
    Director / VFX Supervisor / Nuke Artist / Nuke training

    Portfolio Website
    Twitter: http://twitter.com/HugoCGuerra
    IMDB: http://www.imdb.com/name/nm1512412/
    Reply With Quote  

  6. #6  
    Join Date
    Nov 2006
    Location
    Costantinopol
    Posts
    677
    hogo, what is different between reformat and this gizmo ?
    ________
    Starcraft Ii Replay
    Last edited by Kyo; February 22nd, 2011 at 11:43 AM.
    Reply With Quote  

  7. #7 title safe 
    Join Date
    Mar 2006
    Location
    London, UK
    Posts
    469
    Quote Originally Posted by Kyo View Post
    hogo, what is different between reformat and this gizmo ?
    Well, these gizmo does not make a reformat, it is just graphic lines on top of the video to represent the 16:9 title safe. You have to perform the reformat before or you have to include it in the gizmo.
    Hugo Guerra
    Director / VFX Supervisor / Nuke Artist / Nuke training

    Portfolio Website
    Twitter: http://twitter.com/HugoCGuerra
    IMDB: http://www.imdb.com/name/nm1512412/
    Reply With Quote  

  8. #8 Thumbs up  
    Hugo,

    Thanks so much for your help, I've now got my head round both creating custom menu options and gizmos thanks to you.



    Thanks again,

    Matt

    Ps. can you recommend any good books on Python ?
    Reply With Quote  

  9. #9  
    Join Date
    Jun 2007
    Location
    London | Copenhagen
    Posts
    697
    I found that the "Dive into Python" which is free for download was of big help when learning the language... :-)
    Sofus Graae
    Compositor | 3D Generalist
    www.sgraae.net
    Reply With Quote  

  10. #10  
    Join Date
    Sep 2004
    Posts
    221
    http://oreilly.com/catalog/9781565924642/

    BIG fan of that book, and Programming Python, Mark's sequel to the above.
    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. Sphere VFX New Nuke Training
    By Kyo in forum Your News
    Replies: 7
    Last Post: February 21st, 2009, 05:39 PM
  2. Nuke In-Depth 3D
    By Kyo in forum NUKE from The Foundry
    Replies: 25
    Last Post: August 6th, 2008, 04:28 PM
  3. Nuke 5.0v2 released
    By shot_grable in forum NUKE from The Foundry
    Replies: 1
    Last Post: May 31st, 2008, 06:03 AM
  4. Run Script from Menu in Nuke 5
    By im.thatoneguy in forum NUKE from The Foundry
    Replies: 4
    Last Post: May 19th, 2008, 07:25 PM
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