I have a code similar to this, that creates a custom property for objects and then assigns a data from file to it but it stops working in Blender 2.93. I tested it in 2.79 and 2.80 with no problems but 2.93 shows only "<_PropertyDeferred, , {'options': {'HIDDEN'}, 'subtype': 'BYTE_STRING'}>"
import bpy
class MyImportedItem(bpy.types.PropertyGroup):
data = bpy.props.StringProperty(options={'HIDDEN'}, subtype='BYTE_STRING')
def register():
bpy.utils.register_class(MyImportedItem)
bpy.types.Object.my_imported_item = bpy.props.PointerProperty(type=MyImportedItem)
def unregister():
bpy.utils.unregister_class(MyImportedItem)
bpy.types.Object.my_imported_item = bpy.props.PointerProperty(type=MyImportedItem)
if __name__ == "__main__":
register()
file_path = "C:\\test.data"
with open(file_path, 'rb') as f:
data = f.read()
print("file data is {}".format(data))
obj = bpy.data.objects.new("test", None)
obj.my_imported_item['data'] = data
print("object data is {}".format(obj.my_imported_item.data))
data = ...
withdata : ...
$\endgroup$