Draft: Fixed move/rotate of objects inside PArt containers - fixes #3485
This commit is contained in:
@@ -613,6 +613,14 @@ class ghostTracker(Tracker):
|
||||
sep = coin.SoSeparator()
|
||||
try:
|
||||
sep.addChild(obj.ViewObject.RootNode.copy())
|
||||
# add Part container offset
|
||||
if hasattr(obj,"getGlobalPlacement"):
|
||||
if obj.Placement != obj.getGlobalPlacement():
|
||||
if sep.getChild(0).getNumChildren() > 0:
|
||||
if isinstance(sep.getChild(0).getChild(0),coin.SoTransform):
|
||||
gpl = obj.getGlobalPlacement()
|
||||
sep.getChild(0).getChild(0).translation.setValue(tuple(gpl.Base))
|
||||
sep.getChild(0).getChild(0).rotation.setValue(gpl.Rotation.Q)
|
||||
except:
|
||||
print("ghostTracker: Error retrieving coin node (full)")
|
||||
return sep
|
||||
|
||||
Reference in New Issue
Block a user