Install ssf_import in Nuke 6 in user

Home Page forums Applications Nuke Install ssf_import in Nuke 6 in user

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #203275
    Anonymous
    Inactive

    I have been trying to install import_ssf.tcl in Nuke 6 without any luck…
    I have to install it in my user since it is not possible for me to modify the toolbars.py neither to write any files to Nuke’s “plugins” folder since I’m in a facility…

    So I created a folder called tcl inside my user .nuke folder.
    Then, I added this command to my init.py in order to have the .tcl source when Nuke launch…:
    nuke.pluginAddPath(‘C:Documents and Settingsdanny.nuketcl’)

    Anybody know what has to be done next???

    thx in advance!

    D

    #218573
    Dejan
    Participant

    if it’s inside your .nuke (user) folder and it’s a TCL script it should already be sourced by Nuke. TCL files don’t need a “install” as Python scripts do, so all you need to do is drop that tcl script in a folder which Nuke is sourcing.

    What you need inside that is a menu.py are lines to add the “Import .ssf” entry to your menu.

    import nuke

    menu = nuke.menu( ‘Nuke’ )
    m = menu.findItem( ‘File’ )

    def import_ssf():
    files = nuke.getClipname( ‘Import ssf (Shake Shape Format)’, ‘*.ssf’, multiple=True )
    if files:
    for f in files:
    try:
    ssf = ‘import_ssf “%s”‘ % f
    nuke.tcl( ssf )
    except:
    raise RuntimeError( ‘To read ssf file you need the ssf_import.tcl installednGet it a http://www.fxshare.com/nuke’ )

    m.addCommand( ‘Import ssf’, ‘import_ssf()’, index=8 )[/CODE]

    Just paste the above into a text editor and save it as a “menu.py” file inside your “.nuke” (user) folder.

    Once Nuke is started you should now see a entry “import ssf” on the File menu that if clicked prompts you to select the ssf files you want to import.

    Hope this helps.

    cheers,[CODE]import nuke

    menu = nuke.menu( ‘Nuke’ )
    m = menu.findItem( ‘File’ )

    def import_ssf():
    files = nuke.getClipname( ‘Import ssf (Shake Shape Format)’, ‘*.ssf’, multiple=True )
    if files:
    for f in files:
    try:
    ssf = ‘import_ssf “%s”‘ % f
    nuke.tcl( ssf )
    except:
    raise RuntimeError( ‘To read ssf file you need the ssf_import.tcl installednGet it a http://www.fxshare.com/nuke’ )

    m.addCommand( ‘Import ssf’, ‘import_ssf()’, index=8 )[/CODE]

    Just paste the above into a text editor and save it as a “menu.py” file inside your “.nuke” (user) folder.

    Once Nuke is started you should now see a entry “import ssf” on the File menu that if clicked prompts you to select the ssf files you want to import.

    Hope this helps.

    cheers,

    #218576
    Joe Henderson
    Participant

    Well, if I do a “nukepluginPath()” in the script editor Nuke tells me it is sourcing:
    C:Documents and Settingsdanny.nuketcl
    which contains import_ssf.tcl

    If I press X and and type “import_ssf”, I get this error message:

    import_ssf: Unknown command
    while executing
    “import_ssf”

    Something I don’t get right there…

    #218574
    Dejan
    Participant

    Try moving the import_ssf.tcl to the root of that folder and see if the problem persists.

    #218577
    Joe Henderson
    Participant

    Ok now I got it to work when it is at the root of my .nuke folder… but I would like to have it to work from the “tcl” folder… I’ll show you everything so you understand the current setup and help me further…

    here is a screenshot of my Danny menu:
    menu.jpg

    here is my init.py:

    nuke.pluginAddPath(‘.gizmos’)
    nuke.pluginAddPath(‘.icons’)
    nuke.pluginAddPath(‘.python’)
    nuke.pluginAddPath(‘.tcl’)

    here is my menu.py:

    import autobackdrop
    import mocha_import

    toolbar = nuke.menu(‘Nodes’)

    dannyMenu = toolbar.addMenu(‘Danny’, icon=’homefx.png’)
    toolbar.addCommand(‘Danny/Auto Backdrop’, ‘autobackdrop.autoBackdrop()’, ‘alt+b’, icon=’Backdrop.png’)
    toolbar.addCommand(‘Danny/Bleach Bypass’, ‘nuke.createNode(“bleachbypass”)’, icon=’bleachbypass.png’)
    toolbar.addCommand(‘Danny/Boujou Lens Distortion’, ‘nuke.createNode(“boujoulens”)’, icon=’boujoulens.png’)
    toolbar.addCommand(‘Danny/CamQuake’, ‘nuke.createNode(“camquake”)’, icon=’camquake.png’)
    toolbar.addCommand(‘Danny/Edge Blender’, ‘nuke.createNode(“edgeblender”)’, icon=’Backdrop.png’)
    toolbar.addCommand(‘Danny/FieldsKit’, ‘nuke.createNode(“fieldskit”)’, icon=’fieldskit.png’)
    toolbar.addCommand(‘Danny/Film Look’, ‘nuke.createNode(“filmlook”)’, icon=’filmlook.png’)
    toolbar.addCommand(‘Danny/Fix 4:1:1 Color Sampling’, ‘nuke.createNode(“fix411cs”)’, icon=’fix411cs.png’)
    toolbar.addCommand(‘Danny/Guides’, ‘nuke.createNode(“guides”)’, icon=’guides.png’)
    toolbar.addCommand(‘Danny/Heat Haze’, ‘nuke.createNode(“heathaze”)’, icon=’Backdrop.png’)
    toolbar.addCommand(‘Danny/iFilter’, ‘nuke.createNode(“ifilter”)’, icon=’Backdrop.png’)
    toolbar.addCommand(‘Danny/Import ssf’, ‘import_ssf()’, icon=’Bezier.png’, index=8 )
    toolbar.addCommand(‘Danny/Letterbox’, ‘nuke.createNode(“letterbox”)’, icon=’letterbox.png’)
    toolbar.addCommand(‘Danny/Mocha Import’, ‘mocha_import.mocha_import()’, icon=’mocha_import.png’)
    toolbar.addCommand(‘Danny/Slice Tool’, ‘nuke.createNode(“slicetool”)’, icon=’slicetool.png’)
    toolbar.addCommand(‘Danny/Technicolor’, ‘nuke.createNode(“technicolor”)’, icon=’Backdrop.png’)

    def import_ssf():
    files = nuke.getClipname( ‘Import ssf (Shake Shape Format)’, ‘*.ssf’, multiple=True )
    if files:
    for f in files:
    try:
    ssf = ‘import_ssf “%s”‘ % f
    nuke.tcl( ssf )
    except:
    raise RuntimeError( ‘To read ssf file you need the ssf_import.tcl installednGet it a http://www.fxshare.com/nuke’ )

    what do I need to do in order to have it running from that folder???:
    C:Documents and Settingsdanny.nuketcl

    thx!

    D

    #218578
    Joe Henderson
    Participant

    Also, if you see something wrong, or something that could be optimized in my currect setup, feel free to let me know…

    D

    #218575
    Dejan
    Participant

    Try changing these lines

    nuke.pluginAddPath(‘.gizmos’)
    nuke.pluginAddPath(‘.icons’)
    nuke.pluginAddPath(‘.python’)
    nuke.pluginAddPath(‘.tcl’)[/CODE]

    to

    [CODE]
    nuke.pluginAddPath(‘./gizmos’)
    nuke.pluginAddPath(‘./icons’)
    nuke.pluginAddPath(‘./python’)
    nuke.pluginAddPath(‘./tcl’)
    [/CODE]

    And check if the import_ssf.tcl now works from inside your “tcl” folder.[CODE]nuke.pluginAddPath(‘.gizmos’)
    nuke.pluginAddPath(‘.icons’)
    nuke.pluginAddPath(‘.python’)
    nuke.pluginAddPath(‘.tcl’)[/CODE]

    to

    nuke.pluginAddPath(‘./gizmos’)
    nuke.pluginAddPath(‘./icons’)
    nuke.pluginAddPath(‘./python’)
    nuke.pluginAddPath(‘./tcl’)
    [/CODE]

    And check if the import_ssf.tcl now works from inside your “tcl” folder.[CODE]
    nuke.pluginAddPath(‘./gizmos’)
    nuke.pluginAddPath(‘./icons’)
    nuke.pluginAddPath(‘./python’)
    nuke.pluginAddPath(‘./tcl’)
    [/CODE]

    And check if the import_ssf.tcl now works from inside your “tcl” folder.

    #218579
    Joe Henderson
    Participant

    You nailed it!

    An other question… Is it bad to have that code in the menu.py???:

    def import_ssf():
    files = nuke.getClipname( ‘Import ssf (Shake Shape Format)’, ‘*.ssf’, multiple=True )
    if files:
    for f in files:
    try:
    ssf = ‘import_ssf “%s”‘ % f
    nuke.tcl( ssf )
    except:
    raise RuntimeError( ‘To read ssf file you need the ssf_import.tcl installednGet it a http://www.fxshare.com/nuke’ )

    In one of the new Nuke Python Essentials tutorials on The Foundry’s website, Frank Rueter talks about not having anything else other than menus related code in the menu.py… he mention something regarding command line render I think…

    Are these lines compliant with command line rendering?

    thx!

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Copy link
Powered by Social Snap