realthunder wrote: ↑Tue Aug 27, 2019 6:33 am
Any concrete example of having an extra Shape property breaking anything? I mean I have already modified the logic so that if Part.getShape() can't get anything, it won't provide the default 'Shape'. But if it can, will it break anything?
From my perspective, not much. I have found only one place in my addons, where having a Shape attribute on Part object breaks something: MuxAssembly feature of Part-o-magic. which is essentially a replacement of that missing .Shape property, except it isn't affected by visibility, and has a few options such as flattening the resulting compound.
In there, the main use of hasattr(.., 'Shape') was to a) pick the objects to include in the compound, and b) tell apart Bodies (which totally have a useful Shape and should not be explored inside), from Parts, which didn't have a useful shape, and should be explored by the tool.
Fixing it shouldn't be a problem, I guess, as I can use something like
'Shape' in .PropertiesList instead. Or even leave it as is (but I'm not a fan of Part's Shape being affected by visibility of stuff inside; there should be another Visibility-like property for that, like child.Enable, or aPart.Tip)
Since my two addons are very shape-centric, having Shape property on Parts is generally a new feature for the workbench, not a problem.