Assembly: Explode radially: prevent click on item
This commit is contained in:
committed by
Chris Hennes
parent
c6ede8614f
commit
bdec9f95c3
@@ -644,6 +644,7 @@ class TaskAssemblyCreateView(QtCore.QObject):
|
||||
self.blockSetDragger = False
|
||||
self.blockDraggerMove = True
|
||||
self.currentStep = None
|
||||
self.radialExplosion = False
|
||||
|
||||
def accept(self):
|
||||
self.deactivate()
|
||||
@@ -779,7 +780,7 @@ class TaskAssemblyCreateView(QtCore.QObject):
|
||||
self.blockSetDragger = False
|
||||
self.setDragger()
|
||||
|
||||
self.createExplodedStepObject(1) # 1 = type_index of "Radial"
|
||||
self.radialExplosion = True
|
||||
|
||||
def onAlignTo(self):
|
||||
self.alignMode = "Custom"
|
||||
@@ -838,7 +839,12 @@ class TaskAssemblyCreateView(QtCore.QObject):
|
||||
self.viewObj = Gui.doCommandEval("viewObj")
|
||||
Gui.doCommandGui("CommandCreateView.ViewProviderExplodedView(viewObj.ViewObject)")
|
||||
|
||||
def createExplodedStepObject(self, moveType_index=0):
|
||||
def createExplodedStepObject(self):
|
||||
moveType_index = 0
|
||||
if self.radialExplosion:
|
||||
self.radialExplosion = False
|
||||
moveType_index = 1 # 1 = type_index of "Radial"
|
||||
|
||||
commands = (
|
||||
f'assembly = App.ActiveDocument.getObject("{self.assembly.Name}")\n'
|
||||
'currentStep = assembly.newObject("App::FeaturePython", "Move")\n'
|
||||
|
||||
Reference in New Issue
Block a user