Looking for scripting help with Combo Boxes
Miss Animated
Posts: 54
Hello-
I am looking for a way to populate a combo box with a list of figures (G8M, G8F, etc). What container is this part of?
Once that item is selected, I would like to populate the tree of nodes (head, neck upper, neck lower, etc...) in another combo box.
Does anyone know of another forum or the way to do this? Thanks! :)
Comments
To be specific, I want to work with only the items in my current scene.
Is the problem getting the list of items or showing them in the combobox?
Hi again Richard (I have your attention on two threads now!)
So the issue is actually accessing the list of items. I think I have a handle on the loader once I get them.
If there is a second problem, it's that the second combo box (with the nodes), will be dependent on the first combo box with the figures. I am assuming that a human-type figure will have a different structure than say a vehicle... to that effect once I get the container for the figures, I will need the container for the nodes in that figure; hope that makes sense.
Thanks!
To get a list of figures in the scene you need DzScene.getSkeletonList(), DzScene being the Scene object, which wil give you an array. Iterate through that getting the labels.
To interactively update the bone list you will need to connect the signal for an entry in the list being selected to a function that gets the list of child bones for the figure (e.g. DzSkeleton getAllBones(), which again returns an array through which you can iterate to get labels).
getSkeletonList() http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/scene_dz#a_1ad720638fc6cd39c1bb5b285a12d19e7c
Combo Box item selected http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/combobox_dz#a_1ab96e992c71de44e9a033b66df2f84ab2
getAllBones() http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/skeleton_dz#a_1a1dbd08c5e890b7958397f7096ed6ca3e
I don't know that it is the most informative, but this sample script shows connecting functions to dialogue actions http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/general_ui/simple_image_map_dialog/start
PERFECT! I will check it out and see if I can do this. I'm a VB programmer so I shouldn't have too much trouble it's just the syntax that keeps getting to me. No real GUI has frozen me...guess I'm spoiled by it.
THANK YOU Richard!