-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: Fix warnings when vtkMRMLModelNode has no mesh data #7750
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, it looks good, I just added one comment inline.
Libs/MRML/DisplayableManager/vtkMRMLModelDisplayableManager.cxx
Outdated
Show resolved
Hide resolved
59c162e
to
7033cc8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you!
Fixes warnings during rendering such as: > Algorithm vtkPassThrough (00000223357FFBC0) returned failure for request: vtkInformation (000002233CEA6520) Fixed by enabling AllowNullInput on the vtkPassThrough in vtkMRMLModelDisplayNode. This commit also fixes an issue where the views would not be immediately rendered when vtkMRMLModelNode::SetAndObserveMesh(nullptr) was called for a model node that previously had a mesh. Fixed by not returning early and accounting for IsModelDisplayable in OnMRMLDisplayableModelNodeModifiedEvent.
7033cc8
to
f5c60c1
Compare
continue; | ||
{ | ||
// Optimization: no need to search any further. | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed an issue that I just noticed in IsModelDisplayable. Should be break not continue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. All looks good.
Fixes warnings during rendering such as:
Fixed by enabling AllowNullInput on the vtkPassThrough in vtkMRMLModelDisplayNode.
This commit also fixes an issue where the views would not be immediately rendered when vtkMRMLModelNode::SetAndObserveMesh(nullptr) was called for a model node that previously had a mesh. Fixed by requesting a render in vtkMRMLModelDisplayableManager whenever an actor that was previously visible is no longer displayable.