Urgent Code Needed Script IDE code

BlossomStudiosBlossomStudios Posts: 83

I'm trying to make a basic window where you can dock the window to the side of daz3d tabs

i need the code where i can get a list of objects within the scene tab and able to select different objects
and save as a dll

Post edited by Richard Haseltine on

Comments

  • ArtiniArtini Posts: 9,510
  • Richard HaseltineRichard Haseltine Posts: 101,482

    Moved to the SDK forum.

  • You want to use DAZ to do the selections - not in your tab. It is easy to tell in your plugin what is currently selected.

    The sceneinfo example checks for selection, among other things.

  • hphoenixhphoenix Posts: 1,335
    edited April 2016

    I'm trying to make a basic window where you can dock the window to the side of daz3d tabs

    i need the code where i can get a list of objects within the scene tab and able to select different objects
    and save as a dll

    If you are talking about a plugin dll, you'll want to base your plugin off the "DzSceneIfo" plugin sample (in the samples directory of the 4.5 SDK).  This will create a dockable pane window.

    To get the list of objects in the scene tab, you can use something along the lines of:

    DzNodeListIterator	nodeIt( dzScene->nodeListIterator() );while( nodeIt.hasNext() ){    DzNode *n = nodeIt.next();    // do stuff with each node here}

    even if it is only storing them in an array.  You can also check each node to see if it is a root node, if you only want root nodes ( ... if(n->isRootNode()) { ... } ... )

    If you want to have them multi-select nodes in the pane, you'll have to do the above, then provide some widget interface to list them and allow them to be selected.

    If you just want to operate on what is already selected in the scene pane, just use dzScene->selectedNodeListIterator() in the above instead of dzScene->nodeListIterator().

     

    If you are talking about doing this in Daz Script, instead of as a plugin DLL (not sure how you'd save something as a DLL file from within a script?) you will still do much the same, but I'm not sure you can build pane objects in script, as they are persistent.....you probably can, but it would be pretty tricky and a bit slow.  You won't use iterators, but instead loop through a list obtained with dzScene->getNodeList()  or  dzScene->getSelectedNodeList() respectively.....

     

     

    Post edited by hphoenix on
Sign In or Register to comment.