Hey all,
I tried to create a combo box that will list mesh models, which i know fall under the general classification of ModelNode class, like this
modelNodeSelector = slicer.qMRMLNodeComboBox()
modelNodeSelector.objectName = ‘modelNodeSelector’
modelNodeSelector.toolTip = “Select a model.”
modelNodeSelector.nodeTypes = [‘vtkMRMLModelNode’]
modelNodeSelector.noneEnabled = True
modelNodeSelector.addEnabled = True
modelNodeSelector.removeEnabled = True
self.pathFormLayout.addRow(“Input Model:”, modelNodeSelector)
self.parent.connect(‘mrmlSceneChanged(vtkMRMLScene*)’, modelNodeSelector, ‘setMRMLScene(vtkMRMLScene*)’)
however the UI is grayed out and i cannot select anything. i suspect it has something to do with specifying the nodeTypes but im not sure. I have imported an STL model into the scene and it is visible in the Models viewer.