# How to change Segment Editor Paint effect options from Python script

**URL:** <https://discourse.slicer.org/t/how-to-change-segment-editor-paint-effect-options-from-python-script/17944>\
**Category:** Development\
**Tags:** segmentation\
**Created:** [June 4, 2021, 2:28am UTC](https://discourse.slicer.org/t/how-to-change-segment-editor-paint-effect-options-from-python-script/17944 "2021-06-04T02:28:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chintha\_Siva\_Prasad](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chintha_siva_prasad/32/7766_2.png) [@Chintha\_Siva\_Prasad](https://discourse.slicer.org/u/Chintha_Siva_Prasad)\
**Post date:** [June 4, 2021, 2:28am UTC](https://discourse.slicer.org/t/how-to-change-segment-editor-paint-effect-options-from-python-script/17944/1 "2021-06-04T02:28:24Z")

</div>

How can I enable the sphere brush for 3d view in ‘erase’ option and control the sphere radius through the script?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 4, 2021, 4:00am UTC](https://discourse.slicer.org/t/how-to-change-segment-editor-paint-effect-options-from-python-script/17944/2 "2021-06-04T04:00:25Z")

</div>

You can find code examples to all commonly needed operations in the script repository - see how to adjust brush parameters [here](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#create-keyboard-shortcut-for-toggling-sphere-brush-for-paint-and-erase-effects). List of all built-in Segment Editor effect parameters is available [here](https://slicer.readthedocs.io/en/latest/developer_guide/modules/segmenteditor.html#effect-parameters).
