# It is posible to modify a glyph after the actor creation?

**URL:** https://discourse.vtk.org/t/it-is-posible-to-modify-a-glyph-after-the-actor-creation/3727
**Category:** Support
**Created:** [July 8, 2020, 1:17pm UTC](https://discourse.vtk.org/t/it-is-posible-to-modify-a-glyph-after-the-actor-creation/3727 "2020-07-08T13:17:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![efdiloreto](https://discourse.vtk.org/user_avatar/discourse.vtk.org/efdiloreto/32/2059_2.png) [@efdiloreto](https://discourse.vtk.org/u/efdiloreto)
#### Post date: [July 8, 2020, 1:17pm UTC](https://discourse.vtk.org/t/it-is-posible-to-modify-a-glyph-after-the-actor-creation/3727/1 "2020-07-08T13:17:32Z")

</div>

For example, I created an arrow and I want to modify the scale and the orientation.

For the orientation I can use (before the actor creation) the vtkArrowSource “InvertOn” method, and for the scale the vtkGlyph3D “SetScaleFactor” method. But I don’t know if it’s possible to access to this method after the actor creation. I tried in many ways but I couldn’t do it.

```
def create_arrow():

    arrowSource = vtk.vtkArrowSource()
    arrowSource.InvertOn()

    glyph3D = vtk.vtkGlyph3D()
    glyph3D.SetSourceConnection(arrowSource.GetOutputPort())
    glyph3D.SetVectorModeToUseNormal()
    glyph3D.SetInputData(centro.GetOutput())
    glyph3D.SetScaleFactor(7)
    glyph3D.OrientOn()
    glyph3D.Update()

    mapper = vtk.vtkPolyDataMapper()
    mapper.SetInputConnection(glyph3D.GetOutputPort())

    actor = vtk.vtkActor()
    actor.SetMapper(mapper)

    return actor
```

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [July 8, 2020, 6:05pm UTC](https://discourse.vtk.org/t/it-is-posible-to-modify-a-glyph-after-the-actor-creation/3727/2 "2020-07-08T18:05:48Z")

</div>

The beauty of VTK’s pipeline architecture is that you can modify any parameters any time. All you need to do is to save the objects that you want to modify to a variable. I would recommend to create objects instead of just functions (and save VTK objects in member variables), but if you must use functions then one option is to return not just the actor but the glyph, source, etc. objects as well.

---

<div class="post-metadata">

### Author: ![efdiloreto](https://discourse.vtk.org/user_avatar/discourse.vtk.org/efdiloreto/32/2059_2.png) [@efdiloreto](https://discourse.vtk.org/u/efdiloreto)
#### Post date: [July 8, 2020, 6:22pm UTC](https://discourse.vtk.org/t/it-is-posible-to-modify-a-glyph-after-the-actor-creation/3727/3 "2020-07-08T18:22:39Z")

</div>

Perfect! Thanks for the response.
