I need a script to jump to a folder

A few of the pose pack that I have are in the folder 'Genesis 8' (no 'Female' og 'Male'). I want to split these pose packs to their gendered folders. And add a 'Jump to corresponding female/male folder' script

Is that possible?

Comments

  • crosswindcrosswind Posts: 7,707
    edited January 15

    The reason why they go to Genesis 8 is that they're "group poses" for the interaction of at least 2 people (F/M). The only standard function that can make a "jump to corresponding folder" is to use Custom Action, i.e. you create Custom Actions on the folders (right-click on the folder > Create a Custom Action...) to Favorites or Scripts menu ~~

    A good product is : https://www.daz3d.com/mf-content-bookmarks

    Post edited by crosswind on
  • dash2128dash2128 Posts: 713

    Oh?  okay, thanks!  (Just noticed you post!)

     

  • jakobrhjakobrh Posts: 105

    I must say that I can't really accept this as the final answer.

    If any one has ever bought aniblocks. Then the file you double click in the Content Library is a script like this

    "App.getInterface().getPaneMgr().findPane("aniMate").addBlock(getScriptFileName());" Which loads a file with an idetical name

    Therefore there must be something like ".findPane("Content").GoToFolder( )"

  • crosswindcrosswind Posts: 7,707

    Of course you can write a script to do these things, e.g.:

    var oPaneMgr = MainWindow.getPaneMgr();
    var oPane = oPaneMgr.findPane("DzContentLibraryPane");
    oPane.browseToNativeFolder("X:/DAZ3D Library/PosePreset");

    But writing a fixed string of path/folder into a Script is not a good way. Besides, Create Custom Action just does the very same thing and you can easily Edit the action in F3 and assign a shortcut as needed for fast access, yada yada ~ Why do you have to write a Script ?

  • Richard HaseltineRichard Haseltine Posts: 102,027

    jakobrh said:

    I must say that I can't really accept this as the final answer.

    If any one has ever bought aniblocks. Then the file you double click in the Content Library is a script like this

    "App.getInterface().getPaneMgr().findPane("aniMate").addBlock(getScriptFileName());" Which loads a file with an idetical name

    Therefore there must be something like ".findPane("Content").GoToFolder( )"

    T here is no must - it depends on what is exposed to scripting. However, http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/specific_ui/set_content_library_container/start

  • Richard HaseltineRichard Haseltine Posts: 102,027

    crosswind said:

    Of course you can write a script to do these things, e.g.:

    var oPaneMgr = MainWindow.getPaneMgr();
    var oPane = oPaneMgr.findPane("DzContentLibraryPane");
    oPane.browseToNativeFolder("X:/DAZ3D Library/PosePreset");

    But writing a fixed string of path/folder into a Script is not a good way. Besides, Create Custom Action just does the very same thing and you can easily Edit the action in F3 and assign a shortcut as needed for fast access, yada yada ~ Why do you have to write a Script ?

    This is derived from http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/specific_ui/set_content_library_container/start#example_daz_studio_formats - please follow the license terms.

  • Richard HaseltineRichard Haseltine Posts: 102,027

    jakobrh said:

    I must say that I can't really accept this as the final answer.

    If any one has ever bought aniblocks. Then the file you double click in the Content Library is a script like this

    "App.getInterface().getPaneMgr().findPane("aniMate").addBlock(getScriptFileName());" Which loads a file with an idetical name

    That is, by the way, terrible code as it just strings everything together without any erro checking - I am occasionally guilty of that when writing a mini-scriptlet for throw-away use (and occasionaly suffer as a result) but it certainly shouldn't be taken as an exemplar.

    Therefore there must be something like ".findPane("Content").GoToFolder( )"

  • jakobrhjakobrh Posts: 105

    crosswind said:

    Of course you can write a script to do these things, e.g.:

    var oPaneMgr = MainWindow.getPaneMgr();
    var oPane = oPaneMgr.findPane("DzContentLibraryPane");
    oPane.browseToNativeFolder("X:/DAZ3D Library/PosePreset");

    But writing a fixed string of path/folder into a Script is not a good way. Besides, Create Custom Action just does the very same thing and you can easily Edit the action in F3 and assign a shortcut as needed for fast access, yada yada ~ Why do you have to write a Script ?

    Thanks that was exactly what my following research led me to.

     

  • jakobrhjakobrh Posts: 105

    Richard Haseltine said:

    That is, by the way, terrible code as it just strings everything together without any erro checking - I am occasionally guilty of that when writing a mini-scriptlet for throw-away use (and occasionaly suffer as a result) but it certainly shouldn't be taken as an exemplar.

    Yes. Agree. But as long as it's only on my computer it will do the trick

    please follow the license terms.

    Me? What terms? and where?

  • Richard HaseltineRichard Haseltine Posts: 102,027

    jakobrh said:

    Richard Haseltine said:

    That is, by the way, terrible code as it just strings everything together without any erro checking - I am occasionally guilty of that when writing a mini-scriptlet for throw-away use (and occasionaly suffer as a result) but it certainly shouldn't be taken as an exemplar.

    Yes. Agree. But as long as it's only on my computer it will do the trick

    please follow the license terms.

    Me? What terms? and where?

    Crosswind, as noted on the page for the script.

  • crosswindcrosswind Posts: 7,707
    edited 12:15AM

    Well, actually I didn't get the code from the sample page... but just in F3 > Actions List

    Then I didn't have to quote the licence terms ....

     

    SNAG-2025-1-22-016.png
    1407 x 1035 - 144K
    Post edited by crosswind at
Sign In or Register to comment.