![]() Registered Member ![]()
|
Good day everyone,
Trying to set the visibility of a layer through python script. So I setup a quick document with "Layer 1", "Layer 2", and "Layer 3" nodes/layers. On "Layer 3", I had some brush strokes scattered across the canvas. Then I run this script:
The "Layer 3" visibility is turning off without a problem but the weird part is, I can still see my strokes on the canvas. Now on a different scenario, I set my "Layer 3" off by default and I run the code again, only this time, I set:
to turn the layer's visibility on. The weird part is still weird, now the strokes won't appear in the canvas, but as I make new strokes on top of the old ones, the strokes magically appears and after undoing my new strokes, the old strokes are now displaying correctly. It appears I need something to refresh my screen or something? do the same things happen to you guys? anyone knows how to fix this display problem? |
![]() KDE Developer ![]()
|
You need to run Document.refreshProjection() after changing layers or the like.
|
![]() Registered Member ![]()
|
Perfect! Just what I needed ![]() |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]