Error saving storage with OpenCV Subdiv2D object

Hi,
I am not sure if this is a bug or expected behavior, but I thought I might post it here in case it should behave differently. Based on documentation about operator storage I thought it is possible to store any python object:

Storage can hold any python object type

However when I try to save scene with stored Subdiv2D object, I get following error.

I wanted to store this object inside of Script SOP storage in order to minimize overhead introduced by its generation. Even though I don’t need to store it inside of toe file, I felt like this is the easiest method.
(2020.25380, Win10)

It sounds like it’s attempting to store session specific data, which will fail.

Instead:

“Storage can hold any python object type (not just strings as in Tscript variables). Storage elements can also have optional startup values, specified separately. Use these startup values for example, to avoid saving and loading some session specific object, and instead save or load a well defined object like None .”

To do this see:

storeStartupValue(key, value)

Hope that helps,
Cheers,
Rob

Aha, I see, that makes sense. Thank you very much for explanation!

Hello, I’m having a similar problem, but I’m not entirely sure what you mean by session specific data. I’m trying to store an instance of a class that acts as a wrapper around Par and ParGroup objects. Part of the class is a __getattr__ method, and it’s only when this method is added that I start getting the error. It’s a fairly simple method:

	def __getattr__(self, _name):
		return self.children[_name]

where self.children is a dictionary of td.Par’s keyed by name.