DzNodeProperty not saving values

shoei321shoei321 Posts: 113
edited December 1969 in Daz SDK Developer Discussion

I've created a class that extends DzNode and has DzNode property on it. When I assign the property a value (another node in the scene), then save and reload the scene, the value is lost. Other custom properties (Float/Enum/etc) on the same object persist just fine, but the DzNodeProperty does not. I've also tried DzNumericNodeProperty with the same results.

Any idea why this might be happening? I'm experimented making the property a user property, private property, changed its path, etc, nothing seems to make the property value persist across save/reload.

Thanks

Comments

  • V3DigitimesV3Digitimes Posts: 3,172
    edited December 1969

    shoei321 said:
    I've created a class that extends DzNode and has DzNode property on it. When I assign the property a value (another node in the scene), then save and reload the scene, the value is lost. Other custom properties (Float/Enum/etc) on the same object persist just fine, but the DzNodeProperty does not. I've also tried DzNumericNodeProperty with the same results.

    Any idea why this might be happening? I'm experimented making the property a user property, private property, changed its path, etc, nothing seems to make the property value persist across save/reload.

    Thanks

    Does the log file says it can not find something or does it just say nothing special when loading your scene.
    Or you can just have a look (via text editing) at your .duf scene file to see if it is written somewhere in it. If not this is not saved. If yes this is not loaded. This is not the solution but already a clue.
    I guess some people here will have much more precise answer.

  • dtammdtamm Posts: 126
    edited July 2014

    Its working for me: I changed the sample MyCustomNode to use a DzNodeProperty instead of DzFloatProperty and it saves and loads fine. Attached is a screenshot of the CustomNode selected and its nodeProperty having the value after saving and then loading the scene.

    Here is the code changes in the cpp/

    
    
    MyCustomNode::MyCustomNode()
    {
     // This keeps track of which number this custom node was created since launch
     // for something to save that is not a property.
     m_myInt = ++s_ticket;
    
     // Create a property and add it to the node
     m_property = new DzNodeProperty( "MyCustomDzNodeProperty", true, false);
     m_property->setLabel( "Custom Float" );
     m_property->setPath( "General/Custom" );
    
     addProperty( m_property );
    }
    ss.png
    1213 x 491 - 70K
    Post edited by dtamm on
Sign In or Register to comment.