State:New|TargetRelease:No Target|icon_bug|database:public|icon_mari|Resolution:Fixed|BugID:580009|
Problem summary
Custom Slider for the Environment Light's Rotation doesn't update the Canvas while being dragged if Pause Canvas Rendering is enabled.
Instead, it only updates once the mouse click is released.
Customer reported version
Mari 7.0v2
Customer reported platform
Alma 9
Steps to reproduce
import maridef rotate(rotation): envlight = None for light in mari.lights.list(): if light.isEnvironmentLight(): envlight = light if not envlight: return envlight.setRotationUp(rotation)from PySide2 import QtWidgets, QtCoreslider = QtWidgets.QSlider()slider.setOrientation(QtCore.Qt.Horizontal)slider.setFixedWidth(150)slider.setRange(0, 360)slider.setSingleStep(1)slider.setTracking(True)slider.valueChanged.connect(rotate)toolbar = mari.app.createToolBar("Hello light Toolbar")toolbar.addWidget(slider) 5. Scrub the new slider.
Expected behaviour
The Mari Canvas should update as the slider is being moved, so that we can see the Rotation occur live.
This would be the same behaviour as what we see when we move the default Rotation slider in the Lights palette.
This would happen regardless of whether Pause Canvas Rendering is enabled or disabled.
Actual behaviour
The canvas only redraws once the mouse click is released.
This issue only occurs if Pause Canvas Rendering is enabled.
Workaround
If the slider is appropriately positioned, the user can hold the slider and hover over the canvas while dragging it. As the cursor is in the Canvas, it keeps redrawing.
Alternatively, add mari.canvases.current().repaint() after envlight.setRotationUp(rotation) in the script. repaint() is a Mari API function that triggers the Canvas to redraw, so this can be added to any custom tool which isn't currectly triggering a redraw.
Reproduced by support
This bug has been reproduced in:
Mari 7.0v2 - Windows 10 - Rocky 9
Mari 6.0v3 - Windows 10 - CentOS 7
Mari 4.6v4 - Windows 10 - CentOS 7
Unable to reproduce bug in:
Mari 4.6v3 - Windows 10 - CentOS 7
Earliest version tested
Mari 4.6v4 - This feature (Pause Canvas Rendering) did not exist before this version.
We're sorry to hear that
Please tell us why