BrowseToCategory

MehdiZangenehBarMehdiZangenehBar Posts: 139

How we can change category of the product pane? this code dosn't work:
 

var pane_manager = MainWindow.getPaneMgr();
var smart_content_pane = pane_manager.findPane("DzSmartContentPane");
var products_pane = smart_content_pane.getSubPane(0);
products_pane.browseToCategory("Default/All Files");

 

 

Post edited by MehdiZangenehBar on

Comments

  • At what point does it fail? Try adding print lines between each step to confirm that everything is working up to the last step.

  • MehdiZangenehBarMehdiZangenehBar Posts: 139
    edited September 13

    Richard Haseltine said:

    At what point does it fail? Try adding print lines between each step to confirm that everything is working up to the last step.

    Script will be executed without error, but UI will not show that category, while similar code works for the Files Pane:
     

    var pane_manager = MainWindow.getPaneMgr();
    var smart_content_pane = pane_manager.findPane("DzSmartContentPane");
    var files_pane = smart_content_pane.getSubPane(1);
    files_pane.browseToCategory("Default/All Files");
    
    Post edited by MehdiZangenehBar on
  • Bear in mind that you are using undocumented features (both Smart Content and sub-panes), even if you get it working now any future update could very well break it without notice.

  • Richard Haseltine said:

    Bear in mind that you are using undocumented features (both Smart Content and sub-panes), even if you get it working now any future update could very well break it without notice.

    undrstand, If there is a built-in function, I would love to use, otherwise we have to deal with what we have. But I should remind again, initial code still dosn't work.

  • MehdiZangenehBar said:

    Richard Haseltine said:

    Bear in mind that you are using undocumented features (both Smart Content and sub-panes), even if you get it working now any future update could very well break it without notice.

    undrstand, If there is a built-in function, I would love to use, otherwise we have to deal with what we have. But I should remind again, initial code still dosn't work.

    This is not a supported thing, I am not going to be given a route to do it in the current build (assuming there is one) that may well break in the next, causing confusion and frustration for those who visit the thread at a later date, and if I had the knowledge myself I would hesitate to share it for the same reason once aware of the situation.

  • MehdiZangenehBarMehdiZangenehBar Posts: 139
    edited September 15

    I am not agree with your point of view, there is so many samples that are NOT documented! for example you can't find ANYTHING about "DzContentLibraryPane", but sample used it:
    http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/specific_ui/set_content_library_container/start
    so sample can be created for the "DazSmartContentPane" as well, right?

    Post edited by MehdiZangenehBar on
  • MehdiZangenehBar said:

    I am not agree with your point of view, there is so many samples that are NOT documented! for example you can't find ANYTHING about "DzContentLibraryPane", but sample used it:
    http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/specific_ui/set_content_library_container/start
    so sample can be created for the "DazSmartContentPane" as well, right?

    It is documented there, presumably meaning that it is expected to remain stable. If other panes are not used in a sample or the object definitions then they have to be taken as undocumented, and any attempt to use them is at your own risk (as well, probably, as a breach of the no reverse engineering section of the EULA).

Sign In or Register to comment.