Find figures?

Seven193Seven193 Posts: 1,080
How can loop through all nodes in a scene, and only find figures of type "Genesis8Female" ?
What function must I call that contains that particular substring?
Post edited by Seven193 on

Comments

  • ChoholeChohole Posts: 33,604

    I am tol that it is 


    DzScene::getSkeletonList()
    QObject::name
     
  • Seven193Seven193 Posts: 1,080
    Thanks, but, can't a name property be renamed by the user? Is there another built-in property that tells me this figure is "Genesis8Female" ?
  • Richard HaseltineRichard Haseltine Posts: 100,961
    edited November 2018

    You could try node.assetID (a property, not a method, so it doesn't take parentheses) which returns a string. Note that the user-accessible string, in the Scene pane, is the label not the name.

    Post edited by Richard Haseltine on
  • Seven193Seven193 Posts: 1,080
    Thanks, node.assetId works. I read that ids are unique, so I assume they would be better than names for identification purposes.
  • Seven193Seven193 Posts: 1,080
    edited November 2018
    But, I also see "name" and "id" properties are usually identical, and the possibility that someone else would use "Genesis8Female" as a name elsewhere would be extremely remote, so either node.name or node.assetId would work out fine here. Thanks.
    Post edited by Seven193 on
  • Seven193Seven193 Posts: 1,080
    edited November 2018
    But, let's say someone exports Genesis8Female out as a Wavefront .obj file, or something else and calls the filename "Genesis8Female". Then they import it back into DazStudio. I think DS uses imported filename as assetID.

    Even though the imported file is a prop and not a figure, it's assetID is the same, so assetID by itself is still not reliable. Maybe node.assetUri is better than node.assetId or node.name for stricter identification.

    #imported prop
    assetID: Genesis8Female
    assetUri: #Genesis8Female
    numNodes: 0

    #original figure
    assetID: Genesis8Female
    assetUri: /data/DAZ%203D/Genesis%208/Female/Genesis8Female.dsf#Genesis8Female
    numNodes: 234
    isFigure: 1

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