Assembly: Joint edition : Fix bug when changing offset while only one part is selected

This commit is contained in:
PaddleStroke
2024-03-12 18:44:55 +01:00
committed by Yorik van Havre
parent 27bb619323
commit 94a45ae097
2 changed files with 6 additions and 0 deletions

View File

@@ -282,6 +282,9 @@ class Joint:
self.updateJCSPlacements(joint)
obj1 = UtilsAssembly.getObjectInPart(joint.Object1, joint.Part1)
obj2 = UtilsAssembly.getObjectInPart(joint.Object2, joint.Part2)
if obj1 is None or obj2 is None:
return
presolved = self.preSolve(
joint,
obj1,

View File

@@ -241,6 +241,9 @@ def getContainingPart(full_name, selected_object, activeAssemblyOrPart=None):
def getObjectInPart(objName, part):
if part is None:
return None
if part.Name == objName:
return part