I have a generated a new model derived from a source model. I want the new display properties (including selected scalars) of the target model to be the same as the source model. I tried various Copy functions with no success.
modelDisplayNode = modelNode.GetDisplayNode()
newModel1 = slicer.vtkMRMLModelNode()
newModel1.SetAndObservePolyData(surfaceFilter1.GetOutput())
newDisplayNode1 = slicer.vtkMRMLModelDisplayNode()
newDisplayNode1.CopyWithScene(modelDisplayNode)
slicer.mrmlScene.AddNode(newDisplayNode1)
newModel1.SetAndObserveDisplayNodeID(newDisplayNode1.GetID())
slicer.mrmlScene.AddNode(newModel1)