Skip to content
/ Slicer Public
forked from Slicer/Slicer

Commit

Permalink
ENH: Remove unneeded instance variable related to Endoscopy model export
Browse files Browse the repository at this point in the history
Following cc0ee37 (ENH: Update Endoscopy removing obsolete "model"
cursor type), there is no need to keep track of the model instance. User
may retrieve the model node by its name set as "Path-{curveName}".
  • Loading branch information
jcfr committed Dec 8, 2023
1 parent 8e6bb82 commit 76cb6af
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Modules/Scripted/Endoscopy/Endoscopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ def __init__(self, parent=None):

self.transform = None
self.cursor = None
self.model = None
self.skip = 0
self.logic = None
self.timer = qt.QTimer()
Expand Down Expand Up @@ -394,7 +393,7 @@ def onCreatePathButtonClicked(self):
# Hide the cursor, model and inputCurve from the main 3D view
EndoscopyWidget._hideOnlyInView(
EndoscopyWidget._viewNodeIDFromCameraNode(self.cameraNode),
[self.cursor, self.model, self.inputCurve],
[self.cursor, inputCurve],
)

# Update flythrough variables
Expand Down Expand Up @@ -491,12 +490,10 @@ def onSaveExportModelButtonClicked(self):
if self.transform:
model.model.SetNodeReferenceID("CameraTransform", self.transform.GetID())

self.model = model.model

# Hide the model from the main 3D view
EndoscopyWidget._hideOnlyInView(
EndoscopyWidget._viewNodeIDFromCameraNode(self.cameraNode),
[self.model],
[model.model],
)
logging.debug("-> Model created")

Expand Down

0 comments on commit 76cb6af

Please sign in to comment.