vtkActor management

Hi everybody,
I’m trying to create a python module which permits to display an image and different other features for a VR project purpose. To achieve this goal i decided to code functions creating the vtkActor(s) that would be added in the Slicer Renderer. I reached the renderer using those lines :

lm = slicer.app.layoutManager()
renderer = lm.threeDWidget(0).threeDView().renderWindow().GetRenderers().GetFirstRenderer()

My issue is that i would want the user to be able to add or remove the different volume rendered that match with the vtkActors(s) i mentionned. So i used checkboxes and adding the actors works fine and render what i wanted but i cannot update any of them or remove them. I would like to know if it is possible to get the different actors from the renderer precisely or if there is another method to track what i add in order to be able to manage it at will.

If you insert objects into the scene as model nodes (slicer.modules.models.logic().AddModel(somVtkPolyDataObject)) then you can grab and move them using VR controllers.

To be honest i don’t really have to use VR for now. I just want to display everything correctly and to be able to have control over it with the UI. Can I remove or update this model with a simple function too ?
I didn’t find a RemoveModel() function.

You can remove the node by using slicer.mrmlScene.RemoveNode method. You can move around a model if you apply a transform to it and show the transform interactor in Transforms module / Display / Interaction.

Ok, thank you, i’ll try it.