Message 1 of 5
StringList property data not saved
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey, i'm running into some problems when adding StringList properties to take-nodes:
I am able to add the property and set data on it, but when saving the file and opening it again, the data is gone.
It works when i use other property-types (tested with bool-properties)
It also works when i test on a cube with StringList-properties
""" Creates a box, adds a bool and a string-list properties to box and take01 and sets data on them. To recreate bug save the file after running script, reopen it, and notice the take stringList property doesn't have any data""" import pyfbsdk def add_string_list(node): str_list = node.PropertyCreate( "str_list", pyfbsdk.FBPropertyType.kFBPT_stringlist, "StringList", False, True, None) enum_list = str_list.GetEnumStringList(True) enum_list.Add("hello") str_list.NotifyEnumStringListChanged() def add_bool_property(node): bool_prop = node.PropertyCreate( "bool_prop", pyfbsdk.FBPropertyType.kFBPT_bool, "bool", False, True, None) bool_prop.Data = True def add_properties(node): add_string_list(node) add_bool_property(node) cube = pyfbsdk.FBModelCube("my_cube") cube.Show = True for take in pyfbsdk.FBSystem().Scene.Takes: add_properties(take) add_properties(cube)