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,730
    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: 714

    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,730

    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,045

    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,045

    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,045

    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,045

    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,730
    edited January 22

    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 on
  • Richard HaseltineRichard Haseltine Posts: 102,045

    That isn't the script DS creates (DS calls an encrypted script from the application folder, passing the target folder as a paramater, so it may well use similar code but that isn't visible to us), the only public place that the pane name has been documented is in the sample script.

  • crosswindcrosswind Posts: 7,730

    Well, I do know about that: dzCustomActionShowContentLibraryContainer.dse is used from the scripts folder but that's not a user's problem. If Daz 3D, Inc does care about the copyright, they should've also added copyright / license terms to all the visible Script containers that show their script code in DS.

  • Richard HaseltineRichard Haseltine Posts: 102,045

    crosswind said:

    Well, I do know about that: dzCustomActionShowContentLibraryContainer.dse is used from the scripts folder but that's not a user's problem. If Daz 3D, Inc does care about the copyright, they should've also added copyright / license terms to all the visible Script containers that show their script code in DS.

    That is rather besides the point - the available script in Daz Studio is not the one from your screenshot and does not show the pane name, so presumably the scriptlet you showed got the pane name from elsewhere.

  • crosswindcrosswind Posts: 7,730
    edited January 22

    Richard Haseltine said:

    crosswind said:

    Well, I do know about that: dzCustomActionShowContentLibraryContainer.dse is used from the scripts folder but that's not a user's problem. If Daz 3D, Inc does care about the copyright, they should've also added copyright / license terms to all the visible Script containers that show their script code in DS.

    That is rather besides the point - the available script in Daz Studio is not the one from your screenshot and does not show the pane name, so presumably the scriptlet you showed got the pane name from elsewhere.

    I dbl-checked again, it was not the standard one. The script I posted was created by Visual Menu product. The script from standard action is like the one attached.

    SNAG-2025-1-23-031.png
    808 x 698 - 55K
    Post edited by crosswind on
  • Richard HaseltineRichard Haseltine Posts: 102,045

    And the Visual Menu script in its turn is derived from the sample, so still subject to the same terms.

  • crosswindcrosswind Posts: 7,730

    Okay, fair enough ~

  • barbultbarbult Posts: 24,633

    Richard Haseltine said:

    And the Visual Menu script in its turn is derived from the sample, so still subject to the same terms.

    How would a customer know that Visual Menu scripts were derived from sample scripts? I don't see that acknowledged in the user guide or readme. How did you determine that?

  • crosswindcrosswind Posts: 7,730

    barbult said:

    Richard Haseltine said:

    And the Visual Menu script in its turn is derived from the sample, so still subject to the same terms.

    How would a customer know that Visual Menu scripts were derived from sample scripts? I don't see that acknowledged in the user guide or readme. How did you determine that?

    A good question ~~

Sign In or Register to comment.