Found the issue with the property system. When using the following line:
node.SetProperty("Homer", null);
The property can no longer be reassigned. When saved into fbx and loaded again, the property has a null value despite being reassigned.
After the above null set, the following lines have no effect on the output file:
node.SetProperty("Homer", "Smart");
or
var property = node.FindProperty( "Homer" );
property.Value = "Smart";
Ive attached an .sln with a unit test. Please see the PropertyValueNotBeingUpdated.cs file. Other file is from a previous bug report, please ignore.
PropertyIssue.zip (3.3 KB)
See test case:
[ Test ]
[ TestCaseSource( nameof(FormatsSupportingNodeProperties) ) ]
public void Set_property_value_with_value_property_saves_and_loads_correctly( FileFormat format )
{
Scene scene = new Scene();
Node node = scene.RootNode.CreateChildNode( "Child" );
// Set property to null for later assignment
node.SetProperty("Homer", null);
var property = node.FindProperty( "Homer" );
Assert.NotNull( property );
node.SetProperty("Homer", "Smart");
Assert.AreEqual( "Smart", node.GetProperty( "Homer" ) );
var outScene = SaveAndOpenNewInstance( scene, format );
var outNode = outScene.RootNode.ChildNodes.Single();
Assert.NotNull( outNode.FindProperty( "Homer" ) );
Assert.AreEqual( "Smart", outNode.GetProperty( "Homer" ) );
}