Sorry, I said "My method" and "Your method" just to differentiate between the two methods. I don't said that my method is better I'm just searching a legal method that allow me to obtain a similar result as the method that I'm using now.
in the method that I'm using the preset is loaded in document only one time. So, for example when I move the object handle points the change is applied into the previous loaded object.
The loaded object has a python tag that contain all object controls.
here is an example of python tag content:
obj = op.GetObject()
parent = obj.GetUp()
scale = parent[c4d.PRIMITIVEOBJECTS_GLOBAL_SCALE]
# Objects scale
But with second method at each change the preset object is reloaded from disc or cache with the new changes (the preset object is removed then reloaded with the new changes) and that result that the object is becomes not visible in the View during a few thousandths of a second.
I'm thinking about another alternative, is the following code cause the same problem:
def GetVirtualObjects(self, op, hierarchyhelp):
doc = documents.GetActiveDocument()
path = os.path.join(os.path.dirname(__file__), "res", "my_scene.c4d")
load = c4d.documents.MergeDocument(doc, path, c4d.SCENEFILTER_OBJECTS)
if load is False: