GUI scripting: setObjectColor does not work
Posted: Wed Aug 26, 2020 4:23 am
Hi, some commands don't seem to work in the scriptinshell window of the GUI:
I can get the model, a marker and a body fine:
Display/hide works (without updateDisplay()):
But changing the color or the opacity does not work on either of the two objects (with and without updateDisplay()):
Any clue?
Thanks!
I can get the model, a marker and a body fine:
Code: Select all
a = getCurrentModel()
thoraxBody = a.getBodySet().get("thorax")
randomMarker = a.getMarkerSet().get("ij")
Code: Select all
toggleObjectDisplay(thoraxbody,0)
toggleObjectDisplay(thoraxbody,1)
toggleObjectDisplay(randomMarker,0)
toggleObjectDisplay(randomMarker,1)
Code: Select all
setObjectOpacity(thoraxbody,0)
setObjectColor(thoraxbody,[51,255,51])
setObjectOpacity(randomMarker,0)
setObjectColor(randomMarker,[51,255,51])
Thanks!