Cycles: Gray out hardware raytracing checkboxes when not available #117904

Merged
Nikita Sirgienko merged 2 commits from Sirgienko/blender:ui_setting_rthw_checkbox_unification into main 2024-02-06 20:06:22 +01:00

HWRT checkboxes visibility in the Cycles settings wasn't uniform across devices.
With this change, we unify it and gray out these in case HWRT isn't available.

HWRT checkboxes visibility in the Cycles settings wasn't uniform across devices. With this change, we unify it and gray out these in case HWRT isn't available.
Nikita Sirgienko added 1 commit 2024-02-06 15:26:35 +01:00
23e610d837 Cycles: Gray out hardware raytracing checkboxes when not available
HWRT checkboxes visibility in the Cycles settings wasn't uniform across devices.
With this change, we unify it and gray out these in case HWRT isn't available.
Nikita Sirgienko requested review from Brecht Van Lommel 2024-02-06 15:26:45 +01:00
Nikita Sirgienko added the
Module
Render & Cycles
label 2024-02-06 15:26:52 +01:00
Nikita Sirgienko added this to the 4.1 milestone 2024-02-06 15:26:57 +01:00
Nikita Sirgienko added this to the Render & Cycles project 2024-02-06 15:27:02 +01:00
Author
Member
  • @Stefan_Werner @xavierh for avereness.
    @brecht , this is quite simple change, but I have wanted to give you a chance to review this, as it is changing UI behavior a bit.
+ @Stefan_Werner @xavierh for avereness. @brecht , this is quite simple change, but I have wanted to give you a chance to review this, as it is changing UI behavior a bit.
Author
Member

UI Example - RT HW checkbox is available, when device or one of the devices is supporting this type of functionality:
image
UI Example - But gray out, if none of selected device(s) are supporting this functionality:
image

UI Example - RT HW checkbox is available, when device or one of the devices is supporting this type of functionality: ![image](/attachments/af8f1bd9-68cb-45a8-aee6-7c4b10477c27) UI Example - But gray out, if none of selected device(s) are supporting this functionality: ![image](/attachments/ca2fdc15-f3b9-4679-b2f1-08230ff5e564)
Brecht Van Lommel reviewed 2024-02-06 16:57:54 +01:00
@ -1723,3 +1724,2 @@
has_cuda, has_optix, has_hip, has_metal, has_oneapi, has_hiprt = _cycles.get_device_types()
row = layout.row()
row.enabled = has_hiprt
row.enabled = has_rt_api_support['HIP']

Use row.active. No reason to disallow toggling the option entirely, just graying out is enough.

Use `row.active`. No reason to disallow toggling the option entirely, just graying out is enough.
Sirgienko marked this conversation as resolved
@ -1727,3 +1727,4 @@
elif compute_device_type == 'ONEAPI' and _cycles.with_embree_gpu:
row = layout.row()
row.enabled = has_rt_api_support['ONEAPI']

Same comment.

Same comment.
Sirgienko marked this conversation as resolved
Nikita Sirgienko added 1 commit 2024-02-06 17:36:27 +01:00
Brecht Van Lommel approved these changes 2024-02-06 19:35:57 +01:00
Brecht Van Lommel reviewed 2024-02-06 19:36:41 +01:00
@ -1715,3 +1716,3 @@
if is_arm64:
col.prop(self, "kernel_optimization_level")
if has_rt_api_support:
if has_rt_api_support['METAL']:

We could gray out here too for consistency, as you mentioned.

We could gray out here too for consistency, as you mentioned.
Author
Member

I could, but I have decided to leave this change to the Apple people - maybe they have some strong opinion why this option should disappear on MacOS instead of being gray out.

I could, but I have decided to leave this change to the Apple people - maybe they have some strong opinion why this option should disappear on MacOS instead of being gray out.

Ok, does not need to be done as part of this PR.

Ok, does not need to be done as part of this PR.
Nikita Sirgienko merged commit 0100547515 into main 2024-02-06 20:06:22 +01:00
Nikita Sirgienko deleted branch ui_setting_rthw_checkbox_unification 2024-02-06 20:06:25 +01:00
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#117904
No description provided.