Hello Johannes, I assume you are asking about .osb file io? You can create a class to handle reading of your container type, see e.g. Source/System/FileIO/OSB/OSGOSBGeometryElement.{h,cpp} and in theory there is a "version" value written (per FC IIRC), so that could be used to distinguish old/new files. I'm not sure that was ever used to change a field name, but the OSBGeometryElement uses it to load older style geometry. Another option would be to use the getSFType() accessor in generic code - that gives you the Field object instead of the value stored in it.
Cheers, Carsten On Thu, Mar 11, 2021 at 11:11 AM Johannes Brunen <jbru...@datasolid.de> wrote: > Hello Carsten, > > > I was forced to change the name of a field in a FieldContainer. Do you > know if it is possible to hook into the loading procedure to load the > content of the former field into the new field of the container? > > > Background: I have stupiditly named the light type multi field of the > MultiLighChunk just 'Type'. But that breaks in some template code with the > getType() function of the type system. The compiler can't resolve the > corretly to be used function and spills errors therefore. I think it is > best to rename the field and solve the loading issue introduced by that > change. > > > Hope you know what I can do here. > > > Best, > > Johannes > > > P.S. Beside, you have convinced me with the deepClone problem. > > > _______________________________________________ > Opensg-users mailing list > Opensg-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/opensg-users >
_______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users