flattenStrong Question

If I were to load up two models ModA and ModB, call flatttenStrong on both models: ModA.flattenStrong(), ModB.flattenStrong() and then reparent both models to a parent node: ModA.reparentTo(self.ParentNode), ModB.reparentTo(self.ParentNode)…

Would flattenStrong somehow be undone because I didn’t reparent both models to the parent node and call flatten on the parent node?

I some situations you might want to flatten multiple objects individually and attach them to a parent object (but NOT flattening the parent because that would attempt to merge all models under that node and if multiple texture mats were used for the models fps could possible break…I’ve seen it happen).

I think it didn’t to be undone because it’s changing internal geometry structure, and flatten didn’t saves information about changes.

Why not do somethin like this?

for child in parent.getChildren():
    child.flattenStrong()

Since flattenStrong does not save permanent data about the flattening operation (it simply merges and/or removes nodes) and is not reversible it is not undone when reparenting. Since you flattened ModA and ModB separately, they will still behave as individual nodes, even after reparenting them.