(from, to, mesh)
| 2138 | // Exit 3D displacement preview when a masking tool is activated |
| 2139 | if (exclusionTool && settings.useDisplacement) { |
| 2140 | settings.useDisplacement = false; |
| 2141 | dispPreviewToggle.checked = false; |
| 2142 | toggleDisplacementPreview(false); |
| 2143 | } |
| 2144 | exclBrushBtn.classList.toggle('active', exclusionTool === 'brush'); |
| 2145 | exclBucketBtn.classList.toggle('active', exclusionTool === 'bucket'); |
| 2146 | // Show brush-type row only while brush is active |
| 2147 | exclBrushTypeRow.classList.toggle('hidden', exclusionTool !== 'brush'); |
| 2148 | // Show radius row only while brush + radius mode is active |
| 2149 | exclRadiusRow.classList.toggle('hidden', !(exclusionTool === 'brush' && brushIsRadius)); |
| 2150 | exclHardnessRow.classList.toggle('hidden', !(exclusionTool === 'brush' && brushIsRadius)); |
| 2151 | // Show threshold row only while bucket is active |
| 2152 | exclThresholdRow.classList.toggle('hidden', exclusionTool !== 'bucket'); |
| 2153 | canvas.style.cursor = (exclusionTool === 'brush' && brushIsRadius) ? 'none' : exclusionTool ? 'crosshair' : ''; |
| 2154 | // Clear hover preview whenever the tool changes or is deactivated |
| 2155 | _lastHoverTriIdx = -1; |
| 2156 | setHoverPreview(null); |
| 2157 | // Hide brush cursor if tool deactivated or switched away from radius brush |
| 2158 | if (!(exclusionTool === 'brush' && brushIsRadius)) { |
| 2159 | brushCursorEl.style.display = 'none'; |
| 2160 | } |
no test coverage detected