Hi, i can’t find the script to switch to sphere brush (or edit in 3d views as well),
i tried this but it doesen’t seem to work:
paramnode = EditorLib.EditUtil.EditUtil().getParameterNode()
Thanks for any inputs
Please do not use the legacy Editor module but switch to Segment Editor module. Parameter names controlling paint effect are described here. Examples of scripting Segment Editor effects are available here.
Thanks, that worked well, however i got another problem while using this to enable sphere brush; the checkbox on Segment Editor gets “stuck” and doesen’t work as a switch anymore:
editor = slicer.modules.segmenteditor.widgetRepresentation().self().editor
paint = editor.effectByName("Paint")
As you can see in the code that I linked above, BrushSphere is a “common” parameter (so that the same setting can be used in paint and erase effects) and has to be set accordingly using
setParameter would override the parameter value for a particular effect and so Segment Editor module GUI (that adjusts the common parameter value) would not have an effect anymore.
Thanks a lot, it works fine.