diff options
78 files changed, 3551 insertions, 364 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py index 22d6a45c48c..92be05b92b3 100644 --- a/release/scripts/startup/bl_ui/properties_data_armature.py +++ b/release/scripts/startup/bl_ui/properties_data_armature.py @@ -331,7 +331,7 @@ class DATA_PT_motion_paths_display(MotionPathButtonsPanel_display, Panel): class DATA_PT_custom_props_arm(ArmatureButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} _context_path = "object.data" _property_type = bpy.types.Armature diff --git a/release/scripts/startup/bl_ui/properties_data_bone.py b/release/scripts/startup/bl_ui/properties_data_bone.py index 8e1808949b3..a01e17637bd 100644 --- a/release/scripts/startup/bl_ui/properties_data_bone.py +++ b/release/scripts/startup/bl_ui/properties_data_bone.py @@ -444,7 +444,7 @@ class BONE_PT_deform(BoneButtonsPanel, Panel): class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} _property_type = bpy.types.Bone, bpy.types.EditBone, bpy.types.PoseBone @property diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py index 963ffc60806..b348940a260 100644 --- a/release/scripts/startup/bl_ui/properties_data_camera.py +++ b/release/scripts/startup/bl_ui/properties_data_camera.py @@ -21,7 +21,7 @@ class CAMERA_PT_presets(PresetPanel, Panel): preset_subdir = "camera" preset_operator = "script.execute_preset" preset_add_operator = "camera.preset_add" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} class SAFE_AREAS_PT_presets(PresetPanel, Panel): @@ -29,13 +29,13 @@ class SAFE_AREAS_PT_presets(PresetPanel, Panel): preset_subdir = "safe_areas" preset_operator = "script.execute_preset" preset_add_operator = "safe_areas.preset_add" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} class DATA_PT_context_camera(CameraButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -52,7 +52,7 @@ class DATA_PT_context_camera(CameraButtonsPanel, Panel): class DATA_PT_lens(CameraButtonsPanel, Panel): bl_label = "Lens" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -100,7 +100,7 @@ class DATA_PT_lens(CameraButtonsPanel, Panel): col.prop(ccam, "fisheye_polynomial_k3", text="K3") col.prop(ccam, "fisheye_polynomial_k4", text="K4") - elif engine in {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'}: + elif engine in {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'}: if cam.lens_unit == 'MILLIMETERS': col.prop(cam, "lens") elif cam.lens_unit == 'FOV': @@ -122,7 +122,7 @@ class DATA_PT_lens(CameraButtonsPanel, Panel): class DATA_PT_camera_stereoscopy(CameraButtonsPanel, Panel): bl_label = "Stereoscopy" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -171,7 +171,7 @@ class DATA_PT_camera_stereoscopy(CameraButtonsPanel, Panel): class DATA_PT_camera(CameraButtonsPanel, Panel): bl_label = "Camera" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header_preset(self, _context): CAMERA_PT_presets.draw_panel_header(self.layout) @@ -201,7 +201,7 @@ class DATA_PT_camera(CameraButtonsPanel, Panel): class DATA_PT_camera_dof(CameraButtonsPanel, Panel): bl_label = "Depth of Field" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): cam = context.camera @@ -228,7 +228,7 @@ class DATA_PT_camera_dof(CameraButtonsPanel, Panel): class DATA_PT_camera_dof_aperture(CameraButtonsPanel, Panel): bl_label = "Aperture" bl_parent_id = "DATA_PT_camera_dof" - COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -252,7 +252,7 @@ class DATA_PT_camera_dof_aperture(CameraButtonsPanel, Panel): class DATA_PT_camera_background_image(CameraButtonsPanel, Panel): bl_label = "Background Images" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): cam = context.camera @@ -359,7 +359,7 @@ class DATA_PT_camera_background_image(CameraButtonsPanel, Panel): class DATA_PT_camera_display(CameraButtonsPanel, Panel): bl_label = "Viewport Display" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -392,7 +392,7 @@ class DATA_PT_camera_display_composition_guides(CameraButtonsPanel, Panel): bl_label = "Composition Guides" bl_parent_id = "DATA_PT_camera_display" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -419,7 +419,7 @@ class DATA_PT_camera_display_composition_guides(CameraButtonsPanel, Panel): class DATA_PT_camera_safe_areas(CameraButtonsPanel, Panel): bl_label = "Safe Areas" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): cam = context.camera @@ -449,7 +449,7 @@ class DATA_PT_camera_safe_areas_center_cut(CameraButtonsPanel, Panel): bl_label = "Center-Cut Safe Areas" bl_parent_id = "DATA_PT_camera_safe_areas" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): cam = context.camera @@ -473,7 +473,7 @@ class DATA_PT_camera_safe_areas_center_cut(CameraButtonsPanel, Panel): class DATA_PT_custom_props_camera(CameraButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} _context_path = "object.data" _property_type = bpy.types.Camera diff --git a/release/scripts/startup/bl_ui/properties_data_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py index 88dd3caaa74..fc02d15d267 100644 --- a/release/scripts/startup/bl_ui/properties_data_curve.py +++ b/release/scripts/startup/bl_ui/properties_data_curve.py @@ -116,7 +116,7 @@ class DATA_PT_shape_curve(CurveButtonsPanel, Panel): class DATA_PT_curve_texture_space(CurveButtonsPanel, Panel): bl_label = "Texture Space" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -475,7 +475,7 @@ class DATA_PT_text_boxes(CurveButtonsPanelText, Panel): class DATA_PT_custom_props_curve(CurveButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} _context_path = "object.data" _property_type = bpy.types.Curve diff --git a/release/scripts/startup/bl_ui/properties_data_curves.py b/release/scripts/startup/bl_ui/properties_data_curves.py index df80bdb4552..45a022bdbb4 100644 --- a/release/scripts/startup/bl_ui/properties_data_curves.py +++ b/release/scripts/startup/bl_ui/properties_data_curves.py @@ -18,7 +18,7 @@ class DataButtonsPanel: class DATA_PT_context_curves(DataButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -35,7 +35,7 @@ class DATA_PT_context_curves(DataButtonsPanel, Panel): class DATA_PT_curves_surface(DataButtonsPanel, Panel): bl_label = "Surface" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -110,7 +110,7 @@ class CURVES_UL_attributes(UIList): class DATA_PT_CURVES_attributes(DataButtonsPanel, Panel): bl_label = "Attributes" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): curves = context.curves @@ -135,7 +135,7 @@ class DATA_PT_CURVES_attributes(DataButtonsPanel, Panel): class DATA_PT_custom_props_curves(DataButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} _context_path = "object.data" _property_type = bpy.types.Curves if hasattr(bpy.types, "Curves") else None diff --git a/release/scripts/startup/bl_ui/properties_data_lattice.py b/release/scripts/startup/bl_ui/properties_data_lattice.py index e57b46989fe..acd83b08c6a 100644 --- a/release/scripts/startup/bl_ui/properties_data_lattice.py +++ b/release/scripts/startup/bl_ui/properties_data_lattice.py @@ -64,7 +64,7 @@ class DATA_PT_lattice(DataButtonsPanel, Panel): class DATA_PT_custom_props_lattice(DataButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} _context_path = "object.data" _property_type = bpy.types.Lattice diff --git a/release/scripts/startup/bl_ui/properties_data_light.py b/release/scripts/startup/bl_ui/properties_data_light.py index 2980592ee0b..db43b86834e 100644 --- a/release/scripts/startup/bl_ui/properties_data_light.py +++ b/release/scripts/startup/bl_ui/properties_data_light.py @@ -18,7 +18,7 @@ class DataButtonsPanel: class DATA_PT_context_light(DataButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE_NEXT', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE_NEXT', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -44,7 +44,7 @@ class DATA_PT_preview(DataButtonsPanel, Panel): class DATA_PT_light(DataButtonsPanel, Panel): bl_label = "Light" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -229,7 +229,7 @@ class DATA_PT_EEVEE_shadow_contact(DataButtonsPanel, Panel): class DATA_PT_area(DataButtonsPanel, Panel): bl_label = "Area Shape" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -256,7 +256,7 @@ class DATA_PT_area(DataButtonsPanel, Panel): class DATA_PT_spot(DataButtonsPanel, Panel): bl_label = "Spot Shape" bl_parent_id = "DATA_PT_EEVEE_light" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE_NEXT', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE_NEXT', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -301,7 +301,7 @@ class DATA_PT_falloff_curve(DataButtonsPanel, Panel): class DATA_PT_custom_props_light(DataButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE_NEXT', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE_NEXT', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} _context_path = "object.data" _property_type = bpy.types.Light diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index a6b97fbdc85..356eef1a36a 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -167,7 +167,7 @@ class MeshButtonsPanel: class DATA_PT_context_mesh(MeshButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -185,7 +185,7 @@ class DATA_PT_context_mesh(MeshButtonsPanel, Panel): class DATA_PT_normals(MeshButtonsPanel, Panel): bl_label = "Normals" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -207,7 +207,7 @@ class DATA_PT_normals(MeshButtonsPanel, Panel): class DATA_PT_texture_space(MeshButtonsPanel, Panel): bl_label = "Texture Space" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -227,7 +227,7 @@ class DATA_PT_texture_space(MeshButtonsPanel, Panel): class DATA_PT_vertex_groups(MeshButtonsPanel, Panel): bl_label = "Vertex Groups" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -284,7 +284,7 @@ class DATA_PT_vertex_groups(MeshButtonsPanel, Panel): class DATA_PT_face_maps(MeshButtonsPanel, Panel): bl_label = "Face Maps" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -327,7 +327,7 @@ class DATA_PT_face_maps(MeshButtonsPanel, Panel): class DATA_PT_shape_keys(MeshButtonsPanel, Panel): bl_label = "Shape Keys" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -424,7 +424,7 @@ class DATA_PT_shape_keys(MeshButtonsPanel, Panel): class DATA_PT_uv_texture(MeshButtonsPanel, Panel): bl_label = "UV Maps" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -444,7 +444,7 @@ class DATA_PT_uv_texture(MeshButtonsPanel, Panel): class DATA_PT_remesh(MeshButtonsPanel, Panel): bl_label = "Remesh" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -474,7 +474,7 @@ class DATA_PT_remesh(MeshButtonsPanel, Panel): class DATA_PT_customdata(MeshButtonsPanel, Panel): bl_label = "Geometry Data" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -515,7 +515,7 @@ class DATA_PT_customdata(MeshButtonsPanel, Panel): class DATA_PT_custom_props_mesh(MeshButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} _context_path = "object.data" _property_type = bpy.types.Mesh @@ -555,7 +555,7 @@ class MESH_UL_attributes(UIList): class DATA_PT_mesh_attributes(MeshButtonsPanel, Panel): bl_label = "Attributes" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): mesh = context.mesh @@ -673,7 +673,7 @@ class MESH_UL_color_attributes_selector(UIList, ColorAttributesListBase): class DATA_PT_vertex_colors(DATA_PT_mesh_attributes, Panel): bl_label = "Color Attributes" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): mesh = context.mesh diff --git a/release/scripts/startup/bl_ui/properties_data_metaball.py b/release/scripts/startup/bl_ui/properties_data_metaball.py index eba5676535f..1493e6177a6 100644 --- a/release/scripts/startup/bl_ui/properties_data_metaball.py +++ b/release/scripts/startup/bl_ui/properties_data_metaball.py @@ -56,7 +56,7 @@ class DATA_PT_metaball(DataButtonsPanel, Panel): class DATA_PT_mball_texture_space(DataButtonsPanel, Panel): bl_label = "Texture Space" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -111,7 +111,7 @@ class DATA_PT_metaball_element(DataButtonsPanel, Panel): class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} _context_path = "object.data" _property_type = bpy.types.MetaBall diff --git a/release/scripts/startup/bl_ui/properties_data_pointcloud.py b/release/scripts/startup/bl_ui/properties_data_pointcloud.py index d93adcdcc60..836dde58885 100644 --- a/release/scripts/startup/bl_ui/properties_data_pointcloud.py +++ b/release/scripts/startup/bl_ui/properties_data_pointcloud.py @@ -18,7 +18,7 @@ class DataButtonsPanel: class DATA_PT_context_pointcloud(DataButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -89,7 +89,7 @@ class POINTCLOUD_UL_attributes(UIList): class DATA_PT_pointcloud_attributes(DataButtonsPanel, Panel): bl_label = "Attributes" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): pointcloud = context.pointcloud @@ -114,7 +114,7 @@ class DATA_PT_pointcloud_attributes(DataButtonsPanel, Panel): class DATA_PT_custom_props_pointcloud(DataButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} _context_path = "object.data" _property_type = bpy.types.PointCloud if hasattr(bpy.types, "PointCloud") else None diff --git a/release/scripts/startup/bl_ui/properties_data_speaker.py b/release/scripts/startup/bl_ui/properties_data_speaker.py index 9bdf0e22c2f..4bdbc0ab7e3 100644 --- a/release/scripts/startup/bl_ui/properties_data_speaker.py +++ b/release/scripts/startup/bl_ui/properties_data_speaker.py @@ -18,7 +18,7 @@ class DataButtonsPanel: class DATA_PT_context_speaker(DataButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -35,7 +35,7 @@ class DATA_PT_context_speaker(DataButtonsPanel, Panel): class DATA_PT_speaker(DataButtonsPanel, Panel): bl_label = "Sound" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -57,7 +57,7 @@ class DATA_PT_speaker(DataButtonsPanel, Panel): class DATA_PT_distance(DataButtonsPanel, Panel): bl_label = "Distance" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -81,7 +81,7 @@ class DATA_PT_distance(DataButtonsPanel, Panel): class DATA_PT_cone(DataButtonsPanel, Panel): bl_label = "Cone" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -103,7 +103,7 @@ class DATA_PT_cone(DataButtonsPanel, Panel): class DATA_PT_custom_props_speaker(DataButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} _context_path = "object.data" _property_type = bpy.types.Speaker diff --git a/release/scripts/startup/bl_ui/properties_data_volume.py b/release/scripts/startup/bl_ui/properties_data_volume.py index 1aa2faad7b8..adcf6c80ac6 100644 --- a/release/scripts/startup/bl_ui/properties_data_volume.py +++ b/release/scripts/startup/bl_ui/properties_data_volume.py @@ -18,7 +18,7 @@ class DataButtonsPanel: class DATA_PT_context_volume(DataButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -35,7 +35,7 @@ class DATA_PT_context_volume(DataButtonsPanel, Panel): class DATA_PT_volume_file(DataButtonsPanel, Panel): bl_label = "OpenVDB File" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -80,7 +80,7 @@ class VOLUME_UL_grids(UIList): class DATA_PT_volume_grids(DataButtonsPanel, Panel): bl_label = "Grids" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -93,7 +93,7 @@ class DATA_PT_volume_grids(DataButtonsPanel, Panel): class DATA_PT_volume_render(DataButtonsPanel, Panel): bl_label = "Render" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -125,7 +125,7 @@ class DATA_PT_volume_render(DataButtonsPanel, Panel): class DATA_PT_volume_viewport_display(DataButtonsPanel, Panel): bl_label = "Viewport Display" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -149,7 +149,7 @@ class DATA_PT_volume_viewport_display(DataButtonsPanel, Panel): class DATA_PT_volume_viewport_display_slicing(DataButtonsPanel, Panel): bl_label = "" bl_parent_id = 'DATA_PT_volume_viewport_display' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): layout = self.layout @@ -175,7 +175,7 @@ class DATA_PT_volume_viewport_display_slicing(DataButtonsPanel, Panel): class DATA_PT_custom_props_volume(DataButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} _context_path = "object.data" _property_type = bpy.types.Volume diff --git a/release/scripts/startup/bl_ui/properties_freestyle.py b/release/scripts/startup/bl_ui/properties_freestyle.py index e74e1725aa2..2b948765943 100644 --- a/release/scripts/startup/bl_ui/properties_freestyle.py +++ b/release/scripts/startup/bl_ui/properties_freestyle.py @@ -21,7 +21,7 @@ class RENDER_PT_freestyle(RenderFreestyleButtonsPanel, Panel): bl_label = "Freestyle" bl_options = {'DEFAULT_CLOSED'} bl_order = 10 - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): rd = context.scene.render @@ -79,7 +79,7 @@ class ViewLayerFreestyleEditorButtonsPanel(ViewLayerFreestyleButtonsPanel): class ViewLayerFreestyleLineStyle(ViewLayerFreestyleEditorButtonsPanel): # Freestyle Linestyle Panels - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -123,7 +123,7 @@ class RENDER_MT_lineset_context_menu(Menu): class VIEWLAYER_PT_freestyle(ViewLayerFreestyleButtonsPanel, Panel): bl_label = "Freestyle" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): view_layer = context.view_layer @@ -153,7 +153,7 @@ class VIEWLAYER_PT_freestyle(ViewLayerFreestyleButtonsPanel, Panel): class VIEWLAYER_PT_freestyle_edge_detection(ViewLayerFreestyleButtonsPanel, Panel): bl_label = "Edge Detection" bl_parent_id = "VIEWLAYER_PT_freestyle" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -183,7 +183,7 @@ class VIEWLAYER_PT_freestyle_edge_detection(ViewLayerFreestyleButtonsPanel, Pane class VIEWLAYER_PT_freestyle_style_modules(ViewLayerFreestyleButtonsPanel, Panel): bl_label = "Style Modules" bl_parent_id = "VIEWLAYER_PT_freestyle" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -219,7 +219,7 @@ class VIEWLAYER_PT_freestyle_style_modules(ViewLayerFreestyleButtonsPanel, Panel class VIEWLAYER_PT_freestyle_lineset(ViewLayerFreestyleEditorButtonsPanel, Panel): bl_label = "Freestyle Line Set" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_edge_type_buttons(self, box, lineset, edge_type): # property names @@ -282,7 +282,7 @@ class VIEWLAYER_PT_freestyle_lineset(ViewLayerFreestyleEditorButtonsPanel, Panel class VIEWLAYER_PT_freestyle_lineset_visibilty(ViewLayerFreestyleLineStyle, Panel): bl_label = "Visibility" bl_parent_id = "VIEWLAYER_PT_freestyle_lineset" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): layout = self.layout @@ -316,7 +316,7 @@ class VIEWLAYER_PT_freestyle_lineset_visibilty(ViewLayerFreestyleLineStyle, Pane class VIEWLAYER_PT_freestyle_lineset_edgetype(ViewLayerFreestyleLineStyle, Panel): bl_label = "Edge Type" bl_parent_id = "VIEWLAYER_PT_freestyle_lineset" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): layout = self.layout @@ -366,7 +366,7 @@ class VIEWLAYER_PT_freestyle_lineset_edgetype(ViewLayerFreestyleLineStyle, Panel class VIEWLAYER_PT_freestyle_lineset_facemarks(ViewLayerFreestyleLineStyle, Panel): bl_label = "Face Marks" bl_parent_id = "VIEWLAYER_PT_freestyle_lineset" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} bl_options = {'DEFAULT_CLOSED'} def draw_header(self, context): @@ -395,7 +395,7 @@ class VIEWLAYER_PT_freestyle_lineset_facemarks(ViewLayerFreestyleLineStyle, Pane class VIEWLAYER_PT_freestyle_lineset_collection(ViewLayerFreestyleLineStyle, Panel): bl_label = "Collection" bl_parent_id = "VIEWLAYER_PT_freestyle_lineset" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} bl_options = {'DEFAULT_CLOSED'} def draw_header(self, context): @@ -1236,7 +1236,7 @@ class MaterialFreestyleButtonsPanel: class MATERIAL_PT_freestyle_line(MaterialFreestyleButtonsPanel, Panel): bl_label = "Freestyle Line" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py index afcd1b753d2..f9b9450277b 100644 --- a/release/scripts/startup/bl_ui/properties_material.py +++ b/release/scripts/startup/bl_ui/properties_material.py @@ -60,7 +60,7 @@ class MATERIAL_PT_preview(MaterialButtonsPanel, Panel): class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} _context_path = "material" _property_type = bpy.types.Material @@ -69,7 +69,7 @@ class EEVEE_MATERIAL_PT_context_material(MaterialButtonsPanel, Panel): bl_label = "" bl_context = "material" bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py index de1df732b7e..b0d717fa168 100644 --- a/release/scripts/startup/bl_ui/properties_material_gpencil.py +++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py @@ -228,7 +228,7 @@ class MATERIAL_PT_gpencil_preview(GPMaterialButtonsPanel, Panel): class MATERIAL_PT_gpencil_custom_props(GPMaterialButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} _context_path = "object.active_material" _property_type = bpy.types.Material diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py index 7afa2f81b97..85a90d61aa8 100644 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@ -366,7 +366,7 @@ class OBJECT_PT_motion_paths_display(MotionPathButtonsPanel_display, Panel): class OBJECT_PT_visibility(ObjectButtonsPanel, Panel): bl_label = "Visibility" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -395,7 +395,7 @@ class OBJECT_PT_visibility(ObjectButtonsPanel, Panel): class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} _context_path = "object" _property_type = bpy.types.Object diff --git a/release/scripts/startup/bl_ui/properties_output.py b/release/scripts/startup/bl_ui/properties_output.py index 61384f25afb..1408e08aa8f 100644 --- a/release/scripts/startup/bl_ui/properties_output.py +++ b/release/scripts/startup/bl_ui/properties_output.py @@ -42,7 +42,7 @@ class RenderOutputButtonsPanel: class RENDER_PT_format(RenderOutputButtonsPanel, Panel): bl_label = "Format" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} _frame_rate_args_prev = None _preset_class = None @@ -120,7 +120,7 @@ class RENDER_PT_format(RenderOutputButtonsPanel, Panel): class RENDER_PT_frame_range(RenderOutputButtonsPanel, Panel): bl_label = "Frame Range" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -139,7 +139,7 @@ class RENDER_PT_time_stretching(RenderOutputButtonsPanel, Panel): bl_label = "Time Stretching" bl_parent_id = "RENDER_PT_frame_range" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -156,7 +156,7 @@ class RENDER_PT_time_stretching(RenderOutputButtonsPanel, Panel): class RENDER_PT_post_processing(RenderOutputButtonsPanel, Panel): bl_label = "Post Processing" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -174,7 +174,7 @@ class RENDER_PT_post_processing(RenderOutputButtonsPanel, Panel): class RENDER_PT_stamp(RenderOutputButtonsPanel, Panel): bl_label = "Metadata" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -208,7 +208,7 @@ class RENDER_PT_stamp_note(RenderOutputButtonsPanel, Panel): bl_label = "Note" bl_parent_id = "RENDER_PT_stamp" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): rd = context.scene.render @@ -228,7 +228,7 @@ class RENDER_PT_stamp_burn(RenderOutputButtonsPanel, Panel): bl_label = "Burn Into Image" bl_parent_id = "RENDER_PT_stamp" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): rd = context.scene.render @@ -252,7 +252,7 @@ class RENDER_PT_stamp_burn(RenderOutputButtonsPanel, Panel): class RENDER_PT_output(RenderOutputButtonsPanel, Panel): bl_label = "Output" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -281,7 +281,7 @@ class RENDER_PT_output(RenderOutputButtonsPanel, Panel): class RENDER_PT_output_views(RenderOutputButtonsPanel, Panel): bl_label = "Views" bl_parent_id = "RENDER_PT_output" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -301,7 +301,7 @@ class RENDER_PT_output_color_management(RenderOutputButtonsPanel, Panel): bl_label = "Color Management" bl_options = {'DEFAULT_CLOSED'} bl_parent_id = "RENDER_PT_output" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): scene = context.scene @@ -336,7 +336,7 @@ class RENDER_PT_encoding(RenderOutputButtonsPanel, Panel): bl_label = "Encoding" bl_parent_id = "RENDER_PT_output" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header_preset(self, _context): RENDER_PT_ffmpeg_presets.draw_panel_header(self.layout) @@ -361,7 +361,7 @@ class RENDER_PT_encoding(RenderOutputButtonsPanel, Panel): class RENDER_PT_encoding_video(RenderOutputButtonsPanel, Panel): bl_label = "Video" bl_parent_id = "RENDER_PT_encoding" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -437,7 +437,7 @@ class RENDER_PT_encoding_video(RenderOutputButtonsPanel, Panel): class RENDER_PT_encoding_audio(RenderOutputButtonsPanel, Panel): bl_label = "Audio" bl_parent_id = "RENDER_PT_encoding" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -479,7 +479,7 @@ class RENDER_UL_renderviews(UIList): class RENDER_PT_stereoscopy(RenderOutputButtonsPanel, Panel): bl_label = "Stereoscopy" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} bl_options = {'DEFAULT_CLOSED'} def draw_header(self, context): diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index 8567ddb9372..0fbdb60900b 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -52,7 +52,7 @@ def particle_get_settings(context): class PARTICLE_MT_context_menu(Menu): bl_label = "Particle Specials" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -92,7 +92,7 @@ class PARTICLE_PT_hair_dynamics_presets(PresetPanel, Panel): preset_subdir = "hair_dynamics" preset_operator = "script.execute_preset" preset_add_operator = "particle.hair_dynamics_preset_add" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} class ParticleButtonsPanel: @@ -146,7 +146,7 @@ class PARTICLE_UL_particle_systems(bpy.types.UIList): class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -240,7 +240,7 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel): class PARTICLE_PT_emission(ParticleButtonsPanel, Panel): bl_label = "Emission" bl_translation_context = i18n_contexts.id_particlesettings - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -292,7 +292,7 @@ class PARTICLE_PT_emission_source(ParticleButtonsPanel, Panel): bl_label = "Source" bl_parent_id = "PARTICLE_PT_emission" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -329,7 +329,7 @@ class PARTICLE_PT_emission_source(ParticleButtonsPanel, Panel): class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel): bl_label = "Hair Dynamics" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -409,7 +409,7 @@ class PARTICLE_PT_hair_dynamics_collision(ParticleButtonsPanel, Panel): bl_label = "Collisions" bl_parent_id = "PARTICLE_PT_hair_dynamics" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -441,7 +441,7 @@ class PARTICLE_PT_hair_dynamics_structure(ParticleButtonsPanel, Panel): bl_label = "Structure" bl_parent_id = "PARTICLE_PT_hair_dynamics" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -472,7 +472,7 @@ class PARTICLE_PT_hair_dynamics_volume(ParticleButtonsPanel, Panel): bl_label = "Volume" bl_parent_id = "PARTICLE_PT_hair_dynamics" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -503,7 +503,7 @@ class PARTICLE_PT_hair_dynamics_volume(ParticleButtonsPanel, Panel): class PARTICLE_PT_cache(ParticleButtonsPanel, Panel): bl_label = "Cache" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -536,7 +536,7 @@ class PARTICLE_PT_cache(ParticleButtonsPanel, Panel): class PARTICLE_PT_velocity(ParticleButtonsPanel, Panel): bl_label = "Velocity" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -585,7 +585,7 @@ class PARTICLE_PT_velocity(ParticleButtonsPanel, Panel): class PARTICLE_PT_rotation(ParticleButtonsPanel, Panel): bl_label = "Rotation" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -640,7 +640,7 @@ class PARTICLE_PT_rotation_angular_velocity(ParticleButtonsPanel, Panel): bl_label = "Angular Velocity" bl_parent_id = "PARTICLE_PT_rotation" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -665,7 +665,7 @@ class PARTICLE_PT_rotation_angular_velocity(ParticleButtonsPanel, Panel): class PARTICLE_PT_physics(ParticleButtonsPanel, Panel): bl_label = "Physics" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -718,7 +718,7 @@ class PARTICLE_PT_physics_fluid_advanced(ParticleButtonsPanel, Panel): bl_label = "Advanced" bl_parent_id = "PARTICLE_PT_physics" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -763,7 +763,7 @@ class PARTICLE_PT_physics_fluid_springs(ParticleButtonsPanel, Panel): bl_label = "Springs" bl_parent_id = "PARTICLE_PT_physics" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -787,7 +787,7 @@ class PARTICLE_PT_physics_fluid_springs_viscoelastic(ParticleButtonsPanel, Panel bl_label = "Viscoelastic Springs" bl_parent_id = "PARTICLE_PT_physics_fluid_springs" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -823,7 +823,7 @@ class PARTICLE_PT_physics_fluid_springs_advanced(ParticleButtonsPanel, Panel): bl_label = "Advanced" bl_parent_id = "PARTICLE_PT_physics_fluid_springs" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -847,7 +847,7 @@ class PARTICLE_PT_physics_boids_movement(ParticleButtonsPanel, Panel): bl_label = "Movement" bl_parent_id = "PARTICLE_PT_physics" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -900,7 +900,7 @@ class PARTICLE_PT_physics_boids_battle(ParticleButtonsPanel, Panel): bl_label = "Battle" bl_parent_id = "PARTICLE_PT_physics" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -927,7 +927,7 @@ class PARTICLE_PT_physics_boids_misc(ParticleButtonsPanel, Panel): bl_label = "Misc" bl_parent_id = "PARTICLE_PT_physics" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -952,7 +952,7 @@ class PARTICLE_PT_physics_relations(ParticleButtonsPanel, Panel): bl_label = "Relations" bl_parent_id = "PARTICLE_PT_physics" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1007,7 +1007,7 @@ class PARTICLE_PT_physics_fluid_interaction(ParticleButtonsPanel, Panel): bl_label = "Fluid Interaction" bl_parent_id = "PARTICLE_PT_physics" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1048,7 +1048,7 @@ class PARTICLE_PT_physics_deflection(ParticleButtonsPanel, Panel): bl_label = "Deflection" bl_parent_id = "PARTICLE_PT_physics" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1074,7 +1074,7 @@ class PARTICLE_PT_physics_deflection(ParticleButtonsPanel, Panel): class PARTICLE_PT_physics_forces(ParticleButtonsPanel, Panel): bl_label = "Forces" bl_parent_id = "PARTICLE_PT_physics" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1101,7 +1101,7 @@ class PARTICLE_PT_physics_integration(ParticleButtonsPanel, Panel): bl_label = "Integration" bl_options = {'DEFAULT_CLOSED'} bl_parent_id = "PARTICLE_PT_physics" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1135,7 +1135,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel): bl_options = {'DEFAULT_CLOSED'} bl_parent_id = "PARTICLE_PT_physics" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1233,7 +1233,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel): class PARTICLE_PT_render(ParticleButtonsPanel, Panel): bl_label = "Render" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1280,7 +1280,7 @@ class PARTICLE_PT_render_extra(ParticleButtonsPanel, Panel): bl_label = "Extra" bl_parent_id = "PARTICLE_PT_render" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1304,7 +1304,7 @@ class PARTICLE_PT_render_extra(ParticleButtonsPanel, Panel): class PARTICLE_PT_render_path(ParticleButtonsPanel, Panel): bl_label = "Path" bl_parent_id = "PARTICLE_PT_render" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1326,7 +1326,7 @@ class PARTICLE_PT_render_path_timing(ParticleButtonsPanel, Panel): bl_label = "Timing" bl_parent_id = "PARTICLE_PT_render" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1354,7 +1354,7 @@ class PARTICLE_PT_render_path_timing(ParticleButtonsPanel, Panel): class PARTICLE_PT_render_object(ParticleButtonsPanel, Panel): bl_label = "Object" bl_parent_id = "PARTICLE_PT_render" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1379,7 +1379,7 @@ class PARTICLE_PT_render_object(ParticleButtonsPanel, Panel): class PARTICLE_PT_render_collection(ParticleButtonsPanel, Panel): bl_label = "Collection" bl_parent_id = "PARTICLE_PT_render" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1409,7 +1409,7 @@ class PARTICLE_PT_render_collection_use_count(ParticleButtonsPanel, Panel): bl_label = "Use Count" bl_parent_id = "PARTICLE_PT_render_collection" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1457,7 +1457,7 @@ class PARTICLE_PT_render_collection_use_count(ParticleButtonsPanel, Panel): class PARTICLE_PT_draw(ParticleButtonsPanel, Panel): bl_label = "Viewport Display" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1516,7 +1516,7 @@ class PARTICLE_PT_children(ParticleButtonsPanel, Panel): bl_label = "Children" bl_translation_context = i18n_contexts.id_particlesettings bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1569,7 +1569,7 @@ class PARTICLE_PT_children_parting(ParticleButtonsPanel, Panel): bl_label = "Parting" bl_parent_id = "PARTICLE_PT_children" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1600,7 +1600,7 @@ class PARTICLE_PT_children_clumping(ParticleButtonsPanel, Panel): bl_label = "Clumping" bl_parent_id = "PARTICLE_PT_children" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1636,7 +1636,7 @@ class PARTICLE_PT_children_clumping_noise(ParticleButtonsPanel, Panel): bl_label = "Clump Noise" bl_parent_id = "PARTICLE_PT_children_clumping" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): @@ -1660,7 +1660,7 @@ class PARTICLE_PT_children_roughness(ParticleButtonsPanel, Panel): bl_translation_context = i18n_contexts.id_particlesettings bl_parent_id = "PARTICLE_PT_children" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1701,7 +1701,7 @@ class PARTICLE_PT_children_kink(ParticleButtonsPanel, Panel): bl_label = "Kink" bl_parent_id = "PARTICLE_PT_children" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1751,7 +1751,7 @@ class PARTICLE_PT_children_kink(ParticleButtonsPanel, Panel): class PARTICLE_PT_field_weights(ParticleButtonsPanel, Panel): bl_label = "Field Weights" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1772,7 +1772,7 @@ class PARTICLE_PT_field_weights(ParticleButtonsPanel, Panel): class PARTICLE_PT_force_fields(ParticleButtonsPanel, Panel): bl_label = "Force Field Settings" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -1788,7 +1788,7 @@ class PARTICLE_PT_force_fields(ParticleButtonsPanel, Panel): class PARTICLE_PT_force_fields_type1(ParticleButtonsPanel, Panel): bl_label = "Type 1" bl_parent_id = "PARTICLE_PT_force_fields" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -1805,7 +1805,7 @@ class PARTICLE_PT_force_fields_type1(ParticleButtonsPanel, Panel): class PARTICLE_PT_force_fields_type2(ParticleButtonsPanel, Panel): bl_label = "Type 2" bl_parent_id = "PARTICLE_PT_force_fields" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -1823,7 +1823,7 @@ class PARTICLE_PT_force_fields_type1_falloff(ParticleButtonsPanel, Panel): bl_label = "Falloff" bl_options = {'DEFAULT_CLOSED'} bl_parent_id = "PARTICLE_PT_force_fields_type1" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -1839,7 +1839,7 @@ class PARTICLE_PT_force_fields_type2_falloff(ParticleButtonsPanel, Panel): bl_label = "Falloff" bl_options = {'DEFAULT_CLOSED'} bl_parent_id = "PARTICLE_PT_force_fields_type2" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -1854,7 +1854,7 @@ class PARTICLE_PT_force_fields_type2_falloff(ParticleButtonsPanel, Panel): class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, Panel): bl_label = "Vertex Groups" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1943,7 +1943,7 @@ class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, Panel): class PARTICLE_PT_textures(ParticleButtonsPanel, Panel): bl_label = "Textures" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1975,7 +1975,7 @@ class PARTICLE_PT_textures(ParticleButtonsPanel, Panel): class PARTICLE_PT_hair_shape(ParticleButtonsPanel, Panel): bl_label = "Hair Shape" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -2003,7 +2003,7 @@ class PARTICLE_PT_hair_shape(ParticleButtonsPanel, Panel): class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} _context_path = "particle_system.settings" _property_type = bpy.types.ParticleSettings diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py index e1d26fdcd69..7d36be34741 100644 --- a/release/scripts/startup/bl_ui/properties_physics_cloth.py +++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py @@ -35,7 +35,7 @@ class PhysicButtonsPanel: class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel): bl_label = "Cloth" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header_preset(self, _context): CLOTH_PT_presets.draw_panel_header(self.layout) @@ -60,7 +60,7 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel): class PHYSICS_PT_cloth_physical_properties(PhysicButtonsPanel, Panel): bl_label = "Physical Properties" bl_parent_id = 'PHYSICS_PT_cloth' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -84,7 +84,7 @@ class PHYSICS_PT_cloth_physical_properties(PhysicButtonsPanel, Panel): class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel): bl_label = "Stiffness" bl_parent_id = 'PHYSICS_PT_cloth_physical_properties' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -115,7 +115,7 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel): class PHYSICS_PT_cloth_damping(PhysicButtonsPanel, Panel): bl_label = "Damping" bl_parent_id = 'PHYSICS_PT_cloth_physical_properties' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -146,7 +146,7 @@ class PHYSICS_PT_cloth_damping(PhysicButtonsPanel, Panel): class PHYSICS_PT_cloth_internal_springs(PhysicButtonsPanel, Panel): bl_label = "Internal Springs" bl_parent_id = 'PHYSICS_PT_cloth_physical_properties' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): cloth = context.cloth.settings @@ -188,7 +188,7 @@ class PHYSICS_PT_cloth_internal_springs(PhysicButtonsPanel, Panel): class PHYSICS_PT_cloth_pressure(PhysicButtonsPanel, Panel): bl_label = "Pressure" bl_parent_id = 'PHYSICS_PT_cloth_physical_properties' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): cloth = context.cloth.settings @@ -232,7 +232,7 @@ class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel): bl_label = "Cache" bl_parent_id = 'PHYSICS_PT_cloth' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): md = context.cloth @@ -243,7 +243,7 @@ class PHYSICS_PT_cloth_shape(PhysicButtonsPanel, Panel): bl_label = "Shape" bl_parent_id = 'PHYSICS_PT_cloth' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -293,7 +293,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel): bl_label = "Collisions" bl_parent_id = 'PHYSICS_PT_cloth' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -313,7 +313,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel): class PHYSICS_PT_cloth_object_collision(PhysicButtonsPanel, Panel): bl_label = "Object Collisions" bl_parent_id = 'PHYSICS_PT_cloth_collision' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): cloth = context.cloth.collision_settings @@ -349,7 +349,7 @@ class PHYSICS_PT_cloth_object_collision(PhysicButtonsPanel, Panel): class PHYSICS_PT_cloth_self_collision(PhysicButtonsPanel, Panel): bl_label = "Self Collisions" bl_parent_id = 'PHYSICS_PT_cloth_collision' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): cloth = context.cloth.collision_settings @@ -386,7 +386,7 @@ class PHYSICS_PT_cloth_property_weights(PhysicButtonsPanel, Panel): bl_label = "Property Weights" bl_parent_id = 'PHYSICS_PT_cloth' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -440,7 +440,7 @@ class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, Panel): bl_label = "Field Weights" bl_parent_id = 'PHYSICS_PT_cloth' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): cloth = context.cloth.settings diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py index 60f384a3839..ffc9a6be418 100644 --- a/release/scripts/startup/bl_ui/properties_physics_common.py +++ b/release/scripts/startup/bl_ui/properties_physics_common.py @@ -50,7 +50,7 @@ def physics_add_special(layout, data, name, addop, removeop, typeicon): class PHYSICS_PT_add(PhysicButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py index f71fc56a9f0..40abbb825ee 100644 --- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py +++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py @@ -83,7 +83,7 @@ class PhysicButtonsPanel: class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel): bl_label = "Dynamic Paint" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -104,7 +104,7 @@ class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel): class PHYSICS_PT_dynamic_paint_settings(PhysicButtonsPanel, Panel): bl_label = "Settings" bl_parent_id = 'PHYSICS_PT_dynamic_paint' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -188,7 +188,7 @@ class PHYSICS_PT_dynamic_paint_settings(PhysicButtonsPanel, Panel): class PHYSICS_PT_dp_surface_canvas(PhysicButtonsPanel, Panel): bl_label = "Surface" bl_parent_id = "PHYSICS_PT_dynamic_paint" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -251,7 +251,7 @@ class PHYSICS_PT_dp_surface_canvas_paint_dry(PhysicButtonsPanel, Panel): bl_label = "Dry" bl_parent_id = "PHYSICS_PT_dp_surface_canvas" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -287,7 +287,7 @@ class PHYSICS_PT_dp_surface_canvas_paint_dissolve(PhysicButtonsPanel, Panel): bl_label = "Dissolve" bl_parent_id = "PHYSICS_PT_dp_surface_canvas" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -324,7 +324,7 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel): bl_label = "Output" bl_parent_id = "PHYSICS_PT_dynamic_paint" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -400,7 +400,7 @@ class PHYSICS_PT_dp_canvas_output_paintmaps(PhysicButtonsPanel, Panel): bl_label = "Paintmaps" bl_parent_id = "PHYSICS_PT_dp_canvas_output" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -430,7 +430,7 @@ class PHYSICS_PT_dp_canvas_output_wetmaps(PhysicButtonsPanel, Panel): bl_label = "Wetmaps" bl_parent_id = "PHYSICS_PT_dp_canvas_output" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -460,7 +460,7 @@ class PHYSICS_PT_dp_canvas_initial_color(PhysicButtonsPanel, Panel): bl_label = "Initial Color" bl_parent_id = "PHYSICS_PT_dynamic_paint" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -500,7 +500,7 @@ class PHYSICS_PT_dp_effects(PhysicButtonsPanel, Panel): bl_label = "Effects" bl_parent_id = 'PHYSICS_PT_dynamic_paint' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -517,7 +517,7 @@ class PHYSICS_PT_dp_effects_spread(PhysicButtonsPanel, Panel): bl_label = "Spread" bl_parent_id = "PHYSICS_PT_dp_effects" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -552,7 +552,7 @@ class PHYSICS_PT_dp_effects_drip(PhysicButtonsPanel, Panel): bl_label = "Drip" bl_parent_id = "PHYSICS_PT_dp_effects" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -588,7 +588,7 @@ class PHYSICS_PT_dp_effects_drip_weights(PhysicButtonsPanel, Panel): bl_label = "Weights" bl_parent_id = "PHYSICS_PT_dp_effects_drip" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -612,7 +612,7 @@ class PHYSICS_PT_dp_effects_shrink(PhysicButtonsPanel, Panel): bl_label = "Shrink" bl_parent_id = "PHYSICS_PT_dp_effects" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -642,7 +642,7 @@ class PHYSICS_PT_dp_cache(PhysicButtonsPanel, Panel): bl_label = "Cache" bl_parent_id = "PHYSICS_PT_dynamic_paint" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -662,7 +662,7 @@ class PHYSICS_PT_dp_cache(PhysicButtonsPanel, Panel): class PHYSICS_PT_dp_brush_source(PhysicButtonsPanel, Panel): bl_label = "Source" bl_parent_id = "PHYSICS_PT_dynamic_paint" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -725,7 +725,7 @@ class PHYSICS_PT_dp_brush_source(PhysicButtonsPanel, Panel): class PHYSICS_PT_dp_brush_source_color_ramp(PhysicButtonsPanel, Panel): bl_label = "Falloff Ramp" bl_parent_id = "PHYSICS_PT_dp_brush_source" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -752,7 +752,7 @@ class PHYSICS_PT_dp_brush_velocity(PhysicButtonsPanel, Panel): bl_label = "Velocity" bl_parent_id = "PHYSICS_PT_dynamic_paint" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -783,7 +783,7 @@ class PHYSICS_PT_dp_brush_velocity_color_ramp(PhysicButtonsPanel, Panel): bl_label = "Ramp" bl_parent_id = "PHYSICS_PT_dp_brush_velocity" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -804,7 +804,7 @@ class PHYSICS_PT_dp_brush_velocity_smudge(PhysicButtonsPanel, Panel): bl_label = "Smudge" bl_parent_id = "PHYSICS_PT_dp_brush_velocity" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -832,7 +832,7 @@ class PHYSICS_PT_dp_brush_wave(PhysicButtonsPanel, Panel): bl_label = "Waves" bl_parent_id = "PHYSICS_PT_dynamic_paint" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): diff --git a/release/scripts/startup/bl_ui/properties_physics_field.py b/release/scripts/startup/bl_ui/properties_physics_field.py index 36d5dc7f68d..4e3bff3640a 100644 --- a/release/scripts/startup/bl_ui/properties_physics_field.py +++ b/release/scripts/startup/bl_ui/properties_physics_field.py @@ -27,7 +27,7 @@ class PhysicButtonsPanel: class PHYSICS_PT_field(PhysicButtonsPanel, Panel): bl_label = "Force Fields" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -49,7 +49,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel, Panel): class PHYSICS_PT_field_settings(PhysicButtonsPanel, Panel): bl_label = "Settings" bl_parent_id = 'PHYSICS_PT_field' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -136,7 +136,7 @@ class PHYSICS_PT_field_settings(PhysicButtonsPanel, Panel): class PHYSICS_PT_field_settings_kink(PhysicButtonsPanel, Panel): bl_label = "Kink" bl_parent_id = 'PHYSICS_PT_field_settings' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -170,7 +170,7 @@ class PHYSICS_PT_field_settings_kink(PhysicButtonsPanel, Panel): class PHYSICS_PT_field_settings_texture_select(PhysicButtonsPanel, Panel): bl_label = "Texture" bl_parent_id = 'PHYSICS_PT_field_settings' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -192,7 +192,7 @@ class PHYSICS_PT_field_settings_texture_select(PhysicButtonsPanel, Panel): class PHYSICS_PT_field_falloff(PhysicButtonsPanel, Panel): bl_label = "Falloff" bl_parent_id = "PHYSICS_PT_field" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -217,7 +217,7 @@ class PHYSICS_PT_field_falloff(PhysicButtonsPanel, Panel): class PHYSICS_PT_field_falloff_angular(PhysicButtonsPanel, Panel): bl_label = "Angular" bl_parent_id = "PHYSICS_PT_field_falloff" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -256,7 +256,7 @@ class PHYSICS_PT_field_falloff_angular(PhysicButtonsPanel, Panel): class PHYSICS_PT_field_falloff_radial(PhysicButtonsPanel, Panel): bl_label = "Radial" bl_parent_id = "PHYSICS_PT_field_falloff" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -300,7 +300,7 @@ def collision_warning(layout): class PHYSICS_PT_collision(PhysicButtonsPanel, Panel): bl_label = "Collision" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -331,7 +331,7 @@ class PHYSICS_PT_collision(PhysicButtonsPanel, Panel): class PHYSICS_PT_collision_particle(PhysicButtonsPanel, Panel): bl_label = "Particle" bl_parent_id = "PHYSICS_PT_collision" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -377,7 +377,7 @@ class PHYSICS_PT_collision_particle(PhysicButtonsPanel, Panel): class PHYSICS_PT_collision_softbody(PhysicButtonsPanel, Panel): bl_label = "Softbody & Cloth" bl_parent_id = "PHYSICS_PT_collision" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 3cd4e8d2d0e..601da5d8168 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -98,7 +98,7 @@ class PhysicButtonsPanel: class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel): bl_label = "Fluid" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -122,7 +122,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel): class PHYSICS_PT_settings(PhysicButtonsPanel, Panel): bl_label = "Settings" bl_parent_id = 'PHYSICS_PT_fluid' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -285,7 +285,7 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel): class PHYSICS_PT_borders(PhysicButtonsPanel, Panel): bl_label = "Border Collisions" bl_parent_id = 'PHYSICS_PT_settings' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -318,7 +318,7 @@ class PHYSICS_PT_borders(PhysicButtonsPanel, Panel): class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel): bl_label = "Gas" bl_parent_id = 'PHYSICS_PT_fluid' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -351,7 +351,7 @@ class PHYSICS_PT_smoke_dissolve(PhysicButtonsPanel, Panel): bl_label = "Dissolve" bl_parent_id = 'PHYSICS_PT_smoke' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -395,7 +395,7 @@ class PHYSICS_PT_fire(PhysicButtonsPanel, Panel): bl_label = "Fire" bl_parent_id = 'PHYSICS_PT_smoke' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -434,7 +434,7 @@ class PHYSICS_PT_fire(PhysicButtonsPanel, Panel): class PHYSICS_PT_liquid(PhysicButtonsPanel, Panel): bl_label = "Liquid" bl_parent_id = 'PHYSICS_PT_fluid' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -497,7 +497,7 @@ class PHYSICS_PT_flow_source(PhysicButtonsPanel, Panel): bl_label = "Flow Source" bl_parent_id = 'PHYSICS_PT_settings' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -538,7 +538,7 @@ class PHYSICS_PT_flow_source(PhysicButtonsPanel, Panel): class PHYSICS_PT_flow_initial_velocity(PhysicButtonsPanel, Panel): bl_label = "Initial Velocity" bl_parent_id = 'PHYSICS_PT_settings' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -580,7 +580,7 @@ class PHYSICS_PT_flow_texture(PhysicButtonsPanel, Panel): bl_label = "Texture" bl_parent_id = 'PHYSICS_PT_settings' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -631,7 +631,7 @@ class PHYSICS_PT_adaptive_domain(PhysicButtonsPanel, Panel): bl_label = "Adaptive Domain" bl_parent_id = 'PHYSICS_PT_settings' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -683,7 +683,7 @@ class PHYSICS_PT_noise(PhysicButtonsPanel, Panel): bl_label = "Noise" bl_parent_id = 'PHYSICS_PT_smoke' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -763,7 +763,7 @@ class PHYSICS_PT_mesh(PhysicButtonsPanel, Panel): bl_label = "Mesh" bl_parent_id = 'PHYSICS_PT_liquid' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -858,7 +858,7 @@ class PHYSICS_PT_particles(PhysicButtonsPanel, Panel): bl_label = "Particles" bl_parent_id = 'PHYSICS_PT_liquid' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -989,7 +989,7 @@ class PHYSICS_PT_viscosity(PhysicButtonsPanel, Panel): bl_label = "Viscosity" bl_parent_id = 'PHYSICS_PT_liquid' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1029,7 +1029,7 @@ class PHYSICS_PT_diffusion(PhysicButtonsPanel, Panel): bl_label = "Diffusion" bl_parent_id = 'PHYSICS_PT_liquid' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1076,7 +1076,7 @@ class PHYSICS_PT_guide(PhysicButtonsPanel, Panel): bl_label = "Guides" bl_parent_id = 'PHYSICS_PT_fluid' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1142,7 +1142,7 @@ class PHYSICS_PT_collections(PhysicButtonsPanel, Panel): bl_label = "Collections" bl_parent_id = 'PHYSICS_PT_fluid' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1169,7 +1169,7 @@ class PHYSICS_PT_collections(PhysicButtonsPanel, Panel): class PHYSICS_PT_cache(PhysicButtonsPanel, Panel): bl_label = "Cache" bl_parent_id = 'PHYSICS_PT_fluid' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1253,7 +1253,7 @@ class PHYSICS_PT_export(PhysicButtonsPanel, Panel): bl_label = "Advanced" bl_parent_id = 'PHYSICS_PT_cache' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1298,7 +1298,7 @@ class PHYSICS_PT_field_weights(PhysicButtonsPanel, Panel): bl_label = "Field Weights" bl_parent_id = 'PHYSICS_PT_fluid' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -1487,7 +1487,7 @@ class PHYSICS_PT_fluid_domain_render(PhysicButtonsPanel, Panel): bl_label = "Render" bl_parent_id = 'PHYSICS_PT_fluid' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): diff --git a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py index 85d1c883b50..8df348026ea 100644 --- a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py +++ b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py @@ -19,7 +19,7 @@ class PHYSICS_PT_rigidbody_panel: class PHYSICS_PT_rigid_body(PHYSICS_PT_rigidbody_panel, Panel): bl_label = "Rigid Body" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -54,7 +54,7 @@ class PHYSICS_PT_rigid_body(PHYSICS_PT_rigidbody_panel, Panel): class PHYSICS_PT_rigid_body_settings(PHYSICS_PT_rigidbody_panel, Panel): bl_label = "Settings" bl_parent_id = 'PHYSICS_PT_rigid_body' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -86,7 +86,7 @@ class PHYSICS_PT_rigid_body_settings(PHYSICS_PT_rigidbody_panel, Panel): class PHYSICS_PT_rigid_body_collisions(PHYSICS_PT_rigidbody_panel, Panel): bl_label = "Collisions" bl_parent_id = 'PHYSICS_PT_rigid_body' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -136,7 +136,7 @@ class PHYSICS_PT_rigid_body_collisions_surface(PHYSICS_PT_rigidbody_panel, Panel bl_label = "Surface Response" bl_parent_id = 'PHYSICS_PT_rigid_body_collisions' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -164,7 +164,7 @@ class PHYSICS_PT_rigid_body_collisions_sensitivity(PHYSICS_PT_rigidbody_panel, P bl_label = "Sensitivity" bl_parent_id = 'PHYSICS_PT_rigid_body_collisions' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -201,7 +201,7 @@ class PHYSICS_PT_rigid_body_collisions_collections(PHYSICS_PT_rigidbody_panel, P bl_label = "Collections" bl_parent_id = 'PHYSICS_PT_rigid_body_collisions' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -223,7 +223,7 @@ class PHYSICS_PT_rigid_body_dynamics(PHYSICS_PT_rigidbody_panel, Panel): bl_label = "Dynamics" bl_parent_id = 'PHYSICS_PT_rigid_body' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -256,7 +256,7 @@ class PHYSICS_PT_rigid_body_dynamics_deactivation(PHYSICS_PT_rigidbody_panel, Pa bl_label = "Deactivation" bl_parent_id = 'PHYSICS_PT_rigid_body_dynamics' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): diff --git a/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py b/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py index 12b64abec8f..9e867b674e1 100644 --- a/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py +++ b/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py @@ -13,7 +13,7 @@ class PHYSICS_PT_rigidbody_constraint_panel: class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Panel): bl_label = "Rigid Body Constraint" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -33,7 +33,7 @@ class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Pa class PHYSICS_PT_rigid_body_constraint_settings(PHYSICS_PT_rigidbody_constraint_panel, Panel): bl_label = "Settings" bl_parent_id = 'PHYSICS_PT_rigid_body_constraint' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -64,7 +64,7 @@ class PHYSICS_PT_rigid_body_constraint_settings(PHYSICS_PT_rigidbody_constraint_ class PHYSICS_PT_rigid_body_constraint_objects(PHYSICS_PT_rigidbody_constraint_panel, Panel): bl_label = "Objects" bl_parent_id = 'PHYSICS_PT_rigid_body_constraint' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -85,7 +85,7 @@ class PHYSICS_PT_rigid_body_constraint_objects(PHYSICS_PT_rigidbody_constraint_p class PHYSICS_PT_rigid_body_constraint_override_iterations(PHYSICS_PT_rigidbody_constraint_panel, Panel): bl_label = "Override Iterations" bl_parent_id = 'PHYSICS_PT_rigid_body_constraint' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -111,7 +111,7 @@ class PHYSICS_PT_rigid_body_constraint_override_iterations(PHYSICS_PT_rigidbody_ class PHYSICS_PT_rigid_body_constraint_limits(PHYSICS_PT_rigidbody_constraint_panel, Panel): bl_label = "Limits" bl_parent_id = 'PHYSICS_PT_rigid_body_constraint' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -128,7 +128,7 @@ class PHYSICS_PT_rigid_body_constraint_limits(PHYSICS_PT_rigidbody_constraint_pa class PHYSICS_PT_rigid_body_constraint_limits_linear(PHYSICS_PT_rigidbody_constraint_panel, Panel): bl_label = "Linear" bl_parent_id = 'PHYSICS_PT_rigid_body_constraint_limits' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -185,7 +185,7 @@ class PHYSICS_PT_rigid_body_constraint_limits_linear(PHYSICS_PT_rigidbody_constr class PHYSICS_PT_rigid_body_constraint_limits_angular(PHYSICS_PT_rigidbody_constraint_panel, Panel): bl_label = "Angular" bl_parent_id = 'PHYSICS_PT_rigid_body_constraint_limits' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -251,7 +251,7 @@ class PHYSICS_PT_rigid_body_constraint_limits_angular(PHYSICS_PT_rigidbody_const class PHYSICS_PT_rigid_body_constraint_motor(PHYSICS_PT_rigidbody_constraint_panel, Panel): bl_label = "Motor" bl_parent_id = 'PHYSICS_PT_rigid_body_constraint' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -268,7 +268,7 @@ class PHYSICS_PT_rigid_body_constraint_motor(PHYSICS_PT_rigidbody_constraint_pan class PHYSICS_PT_rigid_body_constraint_motor_angular(PHYSICS_PT_rigidbody_constraint_panel, Panel): bl_label = "Angular" bl_parent_id = 'PHYSICS_PT_rigid_body_constraint_motor' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -304,7 +304,7 @@ class PHYSICS_PT_rigid_body_constraint_motor_angular(PHYSICS_PT_rigidbody_constr class PHYSICS_PT_rigid_body_constraint_motor_linear(PHYSICS_PT_rigidbody_constraint_panel, Panel): bl_label = "Linear" bl_parent_id = 'PHYSICS_PT_rigid_body_constraint_motor' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -340,7 +340,7 @@ class PHYSICS_PT_rigid_body_constraint_motor_linear(PHYSICS_PT_rigidbody_constra class PHYSICS_PT_rigid_body_constraint_springs(PHYSICS_PT_rigidbody_constraint_panel, Panel): bl_label = "Springs" bl_parent_id = 'PHYSICS_PT_rigid_body_constraint' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -364,7 +364,7 @@ class PHYSICS_PT_rigid_body_constraint_springs(PHYSICS_PT_rigidbody_constraint_p class PHYSICS_PT_rigid_body_constraint_springs_angular(PHYSICS_PT_rigidbody_constraint_panel, Panel): bl_label = "Angular" bl_parent_id = 'PHYSICS_PT_rigid_body_constraint_springs' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -412,7 +412,7 @@ class PHYSICS_PT_rigid_body_constraint_springs_angular(PHYSICS_PT_rigidbody_cons class PHYSICS_PT_rigid_body_constraint_springs_linear(PHYSICS_PT_rigidbody_constraint_panel, Panel): bl_label = "Linear" bl_parent_id = 'PHYSICS_PT_rigid_body_constraint_springs' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): diff --git a/release/scripts/startup/bl_ui/properties_physics_softbody.py b/release/scripts/startup/bl_ui/properties_physics_softbody.py index 14211d35261..0e6a65d82a7 100644 --- a/release/scripts/startup/bl_ui/properties_physics_softbody.py +++ b/release/scripts/startup/bl_ui/properties_physics_softbody.py @@ -28,7 +28,7 @@ class PhysicButtonsPanel: class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel): bl_label = "Soft Body" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -44,7 +44,7 @@ class PHYSICS_PT_softbody_object(PhysicButtonsPanel, Panel): bl_label = "Object" bl_parent_id = 'PHYSICS_PT_softbody' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -72,7 +72,7 @@ class PHYSICS_PT_softbody_simulation(PhysicButtonsPanel, Panel): bl_label = "Simulation" bl_parent_id = 'PHYSICS_PT_softbody' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -90,7 +90,7 @@ class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, Panel): bl_label = "Cache" bl_parent_id = 'PHYSICS_PT_softbody' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): md = context.soft_body @@ -101,7 +101,7 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, Panel): bl_label = "Goal" bl_parent_id = 'PHYSICS_PT_softbody' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): softbody = context.soft_body.settings @@ -126,7 +126,7 @@ class PHYSICS_PT_softbody_goal_strengths(PhysicButtonsPanel, Panel): bl_label = "Strengths" bl_parent_id = 'PHYSICS_PT_softbody_goal' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -152,7 +152,7 @@ class PHYSICS_PT_softbody_goal_settings(PhysicButtonsPanel, Panel): bl_label = "Settings" bl_parent_id = 'PHYSICS_PT_softbody_goal' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -175,7 +175,7 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, Panel): bl_label = "Edges" bl_parent_id = 'PHYSICS_PT_softbody' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): softbody = context.soft_body.settings @@ -222,7 +222,7 @@ class PHYSICS_PT_softbody_edge_aerodynamics(PhysicButtonsPanel, Panel): bl_label = "Aerodynamics" bl_parent_id = 'PHYSICS_PT_softbody_edge' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -245,7 +245,7 @@ class PHYSICS_PT_softbody_edge_stiffness(PhysicButtonsPanel, Panel): bl_label = "Stiffness" bl_parent_id = 'PHYSICS_PT_softbody_edge' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): softbody = context.soft_body.settings @@ -269,7 +269,7 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel): bl_label = "Self Collision" bl_parent_id = 'PHYSICS_PT_softbody' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): softbody = context.soft_body.settings @@ -304,7 +304,7 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, Panel): bl_label = "Solver" bl_parent_id = 'PHYSICS_PT_softbody' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -329,7 +329,7 @@ class PHYSICS_PT_softbody_solver_diagnostics(PhysicButtonsPanel, Panel): bl_label = "Diagnostics" bl_parent_id = 'PHYSICS_PT_softbody_solver' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -348,7 +348,7 @@ class PHYSICS_PT_softbody_solver_helpers(PhysicButtonsPanel, Panel): bl_label = "Helpers" bl_parent_id = 'PHYSICS_PT_softbody_solver' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -371,7 +371,7 @@ class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel, Panel): bl_label = "Field Weights" bl_parent_id = 'PHYSICS_PT_softbody' bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): md = context.soft_body diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index dafe32c5e5d..2d24918eb72 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -47,7 +47,7 @@ class RENDER_PT_color_management(RenderButtonsPanel, Panel): bl_label = "Color Management" bl_options = {'DEFAULT_CLOSED'} bl_order = 100 - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -80,7 +80,7 @@ class RENDER_PT_color_management_curves(RenderButtonsPanel, Panel): bl_label = "Use Curves" bl_parent_id = "RENDER_PT_color_management" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): @@ -640,7 +640,7 @@ class RENDER_PT_eevee_hair(RenderButtonsPanel, Panel): class RENDER_PT_eevee_performance(RenderButtonsPanel, Panel): bl_label = "Performance" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -661,7 +661,7 @@ class RENDER_PT_gpencil(RenderButtonsPanel, Panel): bl_label = "Grease Pencil" bl_options = {'DEFAULT_CLOSED'} bl_order = 10 - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -677,7 +677,7 @@ class RENDER_PT_gpencil(RenderButtonsPanel, Panel): class RENDER_PT_opengl_sampling(RenderButtonsPanel, Panel): bl_label = "Sampling" - COMPAT_ENGINES = {'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -699,7 +699,7 @@ class RENDER_PT_opengl_sampling(RenderButtonsPanel, Panel): class RENDER_PT_opengl_film(RenderButtonsPanel, Panel): bl_label = "Film" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -712,7 +712,7 @@ class RENDER_PT_opengl_film(RenderButtonsPanel, Panel): class RENDER_PT_opengl_lighting(RenderButtonsPanel, Panel): bl_label = "Lighting" - COMPAT_ENGINES = {'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -724,7 +724,7 @@ class RENDER_PT_opengl_lighting(RenderButtonsPanel, Panel): class RENDER_PT_opengl_color(RenderButtonsPanel, Panel): bl_label = "Color" - COMPAT_ENGINES = {'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -736,7 +736,7 @@ class RENDER_PT_opengl_color(RenderButtonsPanel, Panel): class RENDER_PT_opengl_options(RenderButtonsPanel, Panel): bl_label = "Options" - COMPAT_ENGINES = {'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -749,7 +749,7 @@ class RENDER_PT_opengl_options(RenderButtonsPanel, Panel): class RENDER_PT_simplify(RenderButtonsPanel, Panel): bl_label = "Simplify" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): rd = context.scene.render @@ -762,7 +762,7 @@ class RENDER_PT_simplify(RenderButtonsPanel, Panel): class RENDER_PT_simplify_viewport(RenderButtonsPanel, Panel): bl_label = "Viewport" bl_parent_id = "RENDER_PT_simplify" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -787,7 +787,7 @@ class RENDER_PT_simplify_viewport(RenderButtonsPanel, Panel): class RENDER_PT_simplify_render(RenderButtonsPanel, Panel): bl_label = "Render" bl_parent_id = "RENDER_PT_simplify" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -815,7 +815,7 @@ class RENDER_PT_simplify_greasepencil(RenderButtonsPanel, Panel, GreasePencilSim 'BLENDER_CLAY', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', - 'BLENDER_WORKBENCH', + 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT', } bl_options = {'DEFAULT_CLOSED'} diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py index d9c51397d6e..4d42e432cc8 100644 --- a/release/scripts/startup/bl_ui/properties_texture.py +++ b/release/scripts/startup/bl_ui/properties_texture.py @@ -67,7 +67,7 @@ class TextureButtonsPanel: class TEXTURE_PT_preview(TextureButtonsPanel, Panel): bl_label = "Preview" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -96,7 +96,7 @@ class TEXTURE_PT_context(TextureButtonsPanel, Panel): bl_label = "" bl_context = "texture" bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -135,7 +135,7 @@ class TEXTURE_PT_context(TextureButtonsPanel, Panel): class TEXTURE_PT_node(TextureButtonsPanel, Panel): bl_label = "Node" bl_context = "texture" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -164,7 +164,7 @@ class TextureTypePanel(TextureButtonsPanel): class TEXTURE_PT_clouds(TextureTypePanel, Panel): bl_label = "Clouds" tex_type = 'CLOUDS' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -196,7 +196,7 @@ class TEXTURE_PT_clouds(TextureTypePanel, Panel): class TEXTURE_PT_wood(TextureTypePanel, Panel): bl_label = "Wood" tex_type = 'WOOD' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -233,7 +233,7 @@ class TEXTURE_PT_wood(TextureTypePanel, Panel): class TEXTURE_PT_marble(TextureTypePanel, Panel): bl_label = "Marble" tex_type = 'MARBLE' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -267,7 +267,7 @@ class TEXTURE_PT_marble(TextureTypePanel, Panel): class TEXTURE_PT_magic(TextureTypePanel, Panel): bl_label = "Magic" tex_type = 'MAGIC' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -286,7 +286,7 @@ class TEXTURE_PT_magic(TextureTypePanel, Panel): class TEXTURE_PT_blend(TextureTypePanel, Panel): bl_label = "Blend" tex_type = 'BLEND' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -308,7 +308,7 @@ class TEXTURE_PT_blend(TextureTypePanel, Panel): class TEXTURE_PT_stucci(TextureTypePanel, Panel): bl_label = "Stucci" tex_type = 'STUCCI' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -339,7 +339,7 @@ class TEXTURE_PT_stucci(TextureTypePanel, Panel): class TEXTURE_PT_image(TextureTypePanel, Panel): bl_label = "Image" tex_type = 'IMAGE' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, _context): # TODO: maybe expose the template_ID from the template image here. @@ -351,7 +351,7 @@ class TEXTURE_PT_image_settings(TextureTypePanel, Panel): bl_label = "Settings" bl_parent_id = 'TEXTURE_PT_image' tex_type = 'IMAGE' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -506,7 +506,7 @@ class TEXTURE_PT_image_mapping_crop(TextureTypePanel, Panel): class TEXTURE_PT_musgrave(TextureTypePanel, Panel): bl_label = "Musgrave" tex_type = 'MUSGRAVE' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -551,7 +551,7 @@ class TEXTURE_PT_musgrave(TextureTypePanel, Panel): class TEXTURE_PT_voronoi(TextureTypePanel, Panel): bl_label = "Voronoi" tex_type = 'VORONOI' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -584,7 +584,7 @@ class TEXTURE_PT_voronoi_feature_weights(TextureTypePanel, Panel): bl_label = "Feature Weights" bl_parent_id = "TEXTURE_PT_voronoi" tex_type = 'VORONOI' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -605,7 +605,7 @@ class TEXTURE_PT_voronoi_feature_weights(TextureTypePanel, Panel): class TEXTURE_PT_distortednoise(TextureTypePanel, Panel): bl_label = "Distorted Noise" tex_type = 'DISTORTED_NOISE' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -630,7 +630,7 @@ class TEXTURE_PT_distortednoise(TextureTypePanel, Panel): class TextureSlotPanel(TextureButtonsPanel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -642,7 +642,7 @@ class TextureSlotPanel(TextureButtonsPanel): class TEXTURE_PT_mapping(TextureSlotPanel, Panel): bl_label = "Mapping" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -710,7 +710,7 @@ class TEXTURE_PT_mapping(TextureSlotPanel, Panel): class TEXTURE_PT_influence(TextureSlotPanel, Panel): bl_label = "Influence" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -792,7 +792,7 @@ class TextureColorsPoll: class TEXTURE_PT_colors(TextureButtonsPanel, TextureColorsPoll, Panel): bl_label = "Colors" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout @@ -821,7 +821,7 @@ class TEXTURE_PT_colors_ramp(TextureButtonsPanel, TextureColorsPoll, Panel): bl_label = "Color Ramp" bl_options = {'DEFAULT_CLOSED'} bl_parent_id = 'TEXTURE_PT_colors' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw_header(self, context): tex = context.texture @@ -842,7 +842,7 @@ class TEXTURE_PT_colors_ramp(TextureButtonsPanel, TextureColorsPoll, Panel): class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} _context_path = "texture" _property_type = Texture diff --git a/release/scripts/startup/bl_ui/properties_view_layer.py b/release/scripts/startup/bl_ui/properties_view_layer.py index c6d1ee2a065..b18734ea98a 100644 --- a/release/scripts/startup/bl_ui/properties_view_layer.py +++ b/release/scripts/startup/bl_ui/properties_view_layer.py @@ -26,7 +26,7 @@ class ViewLayerButtonsPanel: class VIEWLAYER_PT_layer(ViewLayerButtonsPanel, Panel): bl_label = "View Layer" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/properties_world.py b/release/scripts/startup/bl_ui/properties_world.py index b0ea36abd6b..8dd4e36b750 100644 --- a/release/scripts/startup/bl_ui/properties_world.py +++ b/release/scripts/startup/bl_ui/properties_world.py @@ -19,7 +19,7 @@ class WorldButtonsPanel: class WORLD_PT_context_world(WorldButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): @@ -63,7 +63,7 @@ class EEVEE_WORLD_PT_mist(WorldButtonsPanel, Panel): class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} _context_path = "world" _property_type = bpy.types.World diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index 593c6400529..3e7ba68c01d 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -583,7 +583,7 @@ class NODE_PT_texture_mapping(Panel): bl_category = "Node" bl_label = "Texture Mapping" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} @classmethod def poll(cls, context): diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index e703cf7f9c6..5f7b22ea926 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -2607,7 +2607,7 @@ class SEQUENCER_PT_annotation_onion(AnnotationOnionSkin, SequencerButtonsPanel_O class SEQUENCER_PT_custom_props(SequencerButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} _context_path = "active_sequence_strip" _property_type = (bpy.types.Sequence,) bl_category = "Strip" diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 53999f3c154..66213c12d97 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -2317,6 +2317,7 @@ class USERPREF_PT_experimental_prototypes(ExperimentalPanel, Panel): ({"property": "use_sculpt_texture_paint"}, "T96225"), ({"property": "use_full_frame_compositor"}, "T88150"), ({"property": "enable_eevee_next"}, "T93220"), + ({"property": "enable_workbench_next"}, ""), ({"property": "use_draw_manager_acquire_lock"}, "T98016"), ), ) diff --git a/source/blender/draw/CMakeLists.txt b/source/blender/draw/CMakeLists.txt index 4010b491141..b2317025199 100644 --- a/source/blender/draw/CMakeLists.txt +++ b/source/blender/draw/CMakeLists.txt @@ -156,15 +156,25 @@ set(SRC engines/eevee_next/eevee_world.cc engines/workbench/workbench_data.c engines/workbench/workbench_effect_antialiasing.c + engines/workbench/workbench_effect_antialiasing.cc engines/workbench/workbench_effect_cavity.c + engines/workbench/workbench_effect_cavity.cc engines/workbench/workbench_effect_dof.c + engines/workbench/workbench_effect_dof.cc engines/workbench/workbench_effect_outline.c + engines/workbench/workbench_effect_outline.cc engines/workbench/workbench_engine.c + engines/workbench/workbench_engine.cc engines/workbench/workbench_materials.c + engines/workbench/workbench_materials.cc + engines/workbench/workbench_mesh_passes.cc engines/workbench/workbench_opaque.c engines/workbench/workbench_render.c + engines/workbench/workbench_resources.cc engines/workbench/workbench_shader.cc + engines/workbench/workbench_shader_cache.cc engines/workbench/workbench_shadow.c + engines/workbench/workbench_state.cc engines/workbench/workbench_transparent.c engines/workbench/workbench_volume.c engines/external/external_engine.c @@ -455,6 +465,7 @@ set(GLSL_SRC engines/workbench/shaders/workbench_cavity_lib.glsl engines/workbench/shaders/workbench_common_lib.glsl + engines/workbench/shaders/workbench_composite_comp.glsl engines/workbench/shaders/workbench_composite_frag.glsl engines/workbench/shaders/workbench_curvature_lib.glsl engines/workbench/shaders/workbench_effect_cavity_frag.glsl @@ -467,6 +478,7 @@ set(GLSL_SRC engines/workbench/shaders/workbench_matcap_lib.glsl engines/workbench/shaders/workbench_material_lib.glsl engines/workbench/shaders/workbench_merge_infront_frag.glsl + engines/workbench/shaders/workbench_next_merge_depth_frag.glsl engines/workbench/shaders/workbench_prepass_frag.glsl engines/workbench/shaders/workbench_prepass_hair_vert.glsl engines/workbench/shaders/workbench_prepass_pointcloud_vert.glsl @@ -677,6 +689,7 @@ set(GLSL_SRC ) set(GLSL_C) + foreach(GLSL_FILE ${GLSL_SRC}) data_to_c_simple(${GLSL_FILE} GLSL_C) endforeach() @@ -688,6 +701,7 @@ list(APPEND LIB ) set(GLSL_SOURCE_CONTENT "") + foreach(GLSL_FILE ${GLSL_SRC}) get_filename_component(GLSL_FILE_NAME ${GLSL_FILE} NAME) string(REPLACE "." "_" GLSL_FILE_NAME_UNDERSCORES ${GLSL_FILE_NAME}) @@ -734,11 +748,13 @@ endif() if(WITH_TBB) add_definitions(-DWITH_TBB) + if(WIN32) # TBB includes Windows.h which will define min/max macros # that will collide with the stl versions. add_definitions(-DNOMINMAX) endif() + list(APPEND INC_SYS ${TBB_INCLUDE_DIRS} ) @@ -772,4 +788,3 @@ if(WITH_GTESTS) blender_add_test_lib(bf_draw_tests "${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${LIB};${TEST_LIB}") endif() endif() - diff --git a/source/blender/draw/engines/workbench/shaders/infos/workbench_composite_info.hh b/source/blender/draw/engines/workbench/shaders/infos/workbench_composite_info.hh index 2cd4a874b58..ffa1adea180 100644 --- a/source/blender/draw/engines/workbench/shaders/infos/workbench_composite_info.hh +++ b/source/blender/draw/engines/workbench/shaders/infos/workbench_composite_info.hh @@ -1,15 +1,16 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ #include "gpu_shader_create_info.hh" +#include "workbench_defines.hh" /* -------------------------------------------------------------------- */ /** \name Base Composite * \{ */ GPU_SHADER_CREATE_INFO(workbench_composite) - .sampler(0, ImageType::FLOAT_2D, "normalBuffer", Frequency::PASS) - .sampler(1, ImageType::FLOAT_2D, "materialBuffer", Frequency::PASS) - .uniform_buf(4, "WorldData", "world_data", Frequency::PASS) + .sampler(0, ImageType::FLOAT_2D, "normalBuffer") + .sampler(1, ImageType::FLOAT_2D, "materialBuffer") + .uniform_buf(WB_WORLD_SLOT, "WorldData", "world_data") .push_constant(Type::BOOL, "forceShadowing") .fragment_out(0, Type::VEC4, "fragColor") .typedef_source("workbench_shader_shared.h") @@ -23,20 +24,88 @@ GPU_SHADER_CREATE_INFO(workbench_composite) * \{ */ GPU_SHADER_CREATE_INFO(workbench_composite_studio) - .define("V3D_LIGHTING_STUDIO") + .define("WORKBENCH_LIGHTING_STUDIO") .additional_info("workbench_composite") .do_static_compilation(true); GPU_SHADER_CREATE_INFO(workbench_composite_matcap) - .define("V3D_LIGHTING_MATCAP") - .sampler(2, ImageType::FLOAT_2D, "matcap_diffuse_tx", Frequency::PASS) - .sampler(3, ImageType::FLOAT_2D, "matcap_specular_tx", Frequency::PASS) + .define("WORKBENCH_LIGHTING_MATCAP") + .sampler(2, ImageType::FLOAT_2D, "matcap_diffuse_tx") + .sampler(3, ImageType::FLOAT_2D, "matcap_specular_tx") .additional_info("workbench_composite") .do_static_compilation(true); GPU_SHADER_CREATE_INFO(workbench_composite_flat) - .define("V3D_LIGHTING_FLAT") + .define("WORKBENCH_LIGHTING_FLAT") .additional_info("workbench_composite") .do_static_compilation(true); /** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Workbench Next + * \{ */ + +GPU_SHADER_CREATE_INFO(workbench_next_composite) + .local_group_size(8, 8) + .sampler(3, ImageType::FLOAT_2D, "normal_tx") + .sampler(4, ImageType::FLOAT_2D, "material_tx") + .sampler(5, ImageType::DEPTH_2D, "depth_tx") + .uniform_buf(WB_WORLD_SLOT, "WorldData", "world_data") + .push_constant(Type::BOOL, "forceShadowing") + .image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "out_color_img") + .typedef_source("workbench_shader_shared.h") + .compute_source("workbench_composite_comp.glsl") + .additional_info("draw_view"); + +// Lighting + +GPU_SHADER_CREATE_INFO(workbench_next_resolve_opaque_studio).define("WORKBENCH_LIGHTING_STUDIO"); + +GPU_SHADER_CREATE_INFO(workbench_next_resolve_opaque_matcap) + .define("WORKBENCH_LIGHTING_MATCAP") + .sampler(WB_MATCAP_SLOT, ImageType::FLOAT_2D_ARRAY, "matcap_tx"); + +GPU_SHADER_CREATE_INFO(workbench_next_resolve_opaque_flat).define("WORKBENCH_LIGHTING_FLAT"); + +// Effects + +GPU_SHADER_CREATE_INFO(workbench_next_resolve_curvature) + .define("WORKBENCH_CURVATURE") + .sampler(6, ImageType::UINT_2D, "object_id_tx"); + +GPU_SHADER_CREATE_INFO(workbench_next_resolve_cavity) + .define("WORKBENCH_CAVITY") + .sampler(7, ImageType::FLOAT_2D, "jitter_tx") /* TODO(Miguel Pozo): GPU_SAMPLER_REPEAT is set + in CavityEffect, it doesn't work here ? */ + .uniform_buf(5, "float4", "cavity_samples[512]"); + +// Variations + +#define WORKBENCH_FINAL_VARIATION(name, ...) \ + GPU_SHADER_CREATE_INFO(name).additional_info(__VA_ARGS__).do_static_compilation(true); + +#define WORKBENCH_CURVATURE_VARIATIONS(prefix, ...) \ + WORKBENCH_FINAL_VARIATION(prefix##_curvature, "workbench_next_resolve_curvature", __VA_ARGS__) \ + WORKBENCH_FINAL_VARIATION(prefix##_no_curvature, __VA_ARGS__) + +#define WORKBENCH_CAVITY_VARIATIONS(prefix, ...) \ + WORKBENCH_CURVATURE_VARIATIONS(prefix##_cavity, "workbench_next_resolve_cavity", __VA_ARGS__) \ + WORKBENCH_CURVATURE_VARIATIONS(prefix##_no_cavity, __VA_ARGS__) + +#define WORKBENCH_LIGHTING_VARIATIONS(prefix, ...) \ + WORKBENCH_CAVITY_VARIATIONS( \ + prefix##_opaque_studio, "workbench_next_resolve_opaque_studio", __VA_ARGS__) \ + WORKBENCH_CAVITY_VARIATIONS( \ + prefix##_opaque_matcap, "workbench_next_resolve_opaque_matcap", __VA_ARGS__) \ + WORKBENCH_CAVITY_VARIATIONS( \ + prefix##_opaque_flat, "workbench_next_resolve_opaque_flat", __VA_ARGS__) + +WORKBENCH_LIGHTING_VARIATIONS(workbench_next_resolve, "workbench_next_composite"); + +#undef WORKBENCH_FINAL_VARIATION +#undef WORKBENCH_CURVATURE_VARIATIONS +#undef WORKBENCH_CAVITY_VARIATIONS +#undef WORKBENCH_LIGHTING_VARIATIONS + +/** \} */ diff --git a/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_cavity_info.hh b/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_cavity_info.hh index 089644d20bc..5a54afc6bff 100644 --- a/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_cavity_info.hh +++ b/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_cavity_info.hh @@ -5,7 +5,7 @@ GPU_SHADER_CREATE_INFO(workbench_effect_cavity_common) .fragment_out(0, Type::VEC4, "fragColor") .sampler(0, ImageType::FLOAT_2D, "normalBuffer") - .uniform_buf(4, "WorldData", "world_data", Frequency::PASS) + .uniform_buf(WB_WORLD_SLOT, "WorldData", "world_data") .typedef_source("workbench_shader_shared.h") .fragment_source("workbench_effect_cavity_frag.glsl") .additional_info("draw_fullscreen") diff --git a/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_outline_info.hh b/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_outline_info.hh index e76875b3fa5..fe4b6de7347 100644 --- a/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_outline_info.hh +++ b/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_outline_info.hh @@ -6,7 +6,7 @@ GPU_SHADER_CREATE_INFO(workbench_effect_outline) .typedef_source("workbench_shader_shared.h") .fragment_source("workbench_effect_outline_frag.glsl") .sampler(0, ImageType::UINT_2D, "objectIdBuffer") - .uniform_buf(4, "WorldData", "world_data", Frequency::PASS) + .uniform_buf(WB_WORLD_SLOT, "WorldData", "world_data") .fragment_out(0, Type::VEC4, "fragColor") .additional_info("draw_fullscreen") .do_static_compilation(true); diff --git a/source/blender/draw/engines/workbench/shaders/infos/workbench_merge_infront_info.hh b/source/blender/draw/engines/workbench/shaders/infos/workbench_merge_infront_info.hh index e5ba0390244..03dd3a266e4 100644 --- a/source/blender/draw/engines/workbench/shaders/infos/workbench_merge_infront_info.hh +++ b/source/blender/draw/engines/workbench/shaders/infos/workbench_merge_infront_info.hh @@ -8,3 +8,9 @@ GPU_SHADER_CREATE_INFO(workbench_merge_infront) .fragment_source("workbench_merge_infront_frag.glsl") .additional_info("draw_fullscreen") .do_static_compilation(true); + +GPU_SHADER_CREATE_INFO(workbench_next_merge_depth) + .sampler(0, ImageType::DEPTH_2D, "depth_tx") + .fragment_source("workbench_next_merge_depth_frag.glsl") + .additional_info("draw_fullscreen") + .do_static_compilation(true); diff --git a/source/blender/draw/engines/workbench/shaders/infos/workbench_prepass_info.hh b/source/blender/draw/engines/workbench/shaders/infos/workbench_prepass_info.hh index 735e7b6d867..92452eefed2 100644 --- a/source/blender/draw/engines/workbench/shaders/infos/workbench_prepass_info.hh +++ b/source/blender/draw/engines/workbench/shaders/infos/workbench_prepass_info.hh @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ #include "gpu_shader_create_info.hh" +#include "workbench_defines.hh" /* -------------------------------------------------------------------- */ /** \name Object Type @@ -30,6 +31,29 @@ GPU_SHADER_CREATE_INFO(workbench_pointcloud) /** \} */ /* -------------------------------------------------------------------- */ +/** \name Object Type + * \{ */ + +GPU_SHADER_CREATE_INFO(workbench_next_mesh) + .vertex_in(0, Type::VEC3, "pos") + .vertex_in(1, Type::VEC3, "nor") + .vertex_in(2, Type::VEC4, "ac") + .vertex_in(3, Type::VEC2, "au") + .vertex_source("workbench_prepass_vert.glsl") + .additional_info("draw_modelmat_new") + .additional_info("draw_resource_handle_new"); + +GPU_SHADER_CREATE_INFO(workbench_next_curves) + /* TODO Adding workbench_next_mesh to avoid shader compilation errors */ + .additional_info("workbench_next_mesh"); + +GPU_SHADER_CREATE_INFO(workbench_next_pointcloud) + /* TODO Adding workbench_next_mesh to avoid shader compilation errors */ + .additional_info("workbench_next_mesh"); + +/** \} */ + +/* -------------------------------------------------------------------- */ /** \name Texture Type * \{ */ @@ -39,15 +63,15 @@ GPU_SHADER_CREATE_INFO(workbench_texture_single) .sampler(2, ImageType::FLOAT_2D, "imageTexture", Frequency::BATCH) .push_constant(Type::BOOL, "imagePremult") .push_constant(Type::FLOAT, "imageTransparencyCutoff") - .define("V3D_SHADING_TEXTURE_COLOR"); + .define("WORKBENCH_COLOR_TEXTURE"); GPU_SHADER_CREATE_INFO(workbench_texture_tile) .sampler(2, ImageType::FLOAT_2D_ARRAY, "imageTileArray", Frequency::BATCH) .sampler(3, ImageType::FLOAT_1D_ARRAY, "imageTileData", Frequency::BATCH) .push_constant(Type::BOOL, "imagePremult") .push_constant(Type::FLOAT, "imageTransparencyCutoff") - .define("V3D_SHADING_TEXTURE_COLOR") - .define("TEXTURE_IMAGE_ARRAY"); + .define("WORKBENCH_COLOR_TEXTURE") + .define("WORKBENCH_TEXTURE_IMAGE_ARRAY"); /** \} */ @@ -55,12 +79,16 @@ GPU_SHADER_CREATE_INFO(workbench_texture_tile) /** \name Lighting Type (only for transparent) * \{ */ -GPU_SHADER_CREATE_INFO(workbench_lighting_flat).define("V3D_LIGHTING_FLAT"); -GPU_SHADER_CREATE_INFO(workbench_lighting_studio).define("V3D_LIGHTING_STUDIO"); +GPU_SHADER_CREATE_INFO(workbench_lighting_flat).define("WORKBENCH_LIGHTING_FLAT"); +GPU_SHADER_CREATE_INFO(workbench_lighting_studio).define("WORKBENCH_LIGHTING_STUDIO"); GPU_SHADER_CREATE_INFO(workbench_lighting_matcap) - .define("V3D_LIGHTING_MATCAP") - .sampler(4, ImageType::FLOAT_2D, "matcap_diffuse_tx", Frequency::PASS) - .sampler(5, ImageType::FLOAT_2D, "matcap_specular_tx", Frequency::PASS); + .define("WORKBENCH_LIGHTING_MATCAP") + .sampler(4, ImageType::FLOAT_2D, "matcap_diffuse_tx") + .sampler(5, ImageType::FLOAT_2D, "matcap_specular_tx"); + +GPU_SHADER_CREATE_INFO(workbench_next_lighting_matcap) + .define("WORKBENCH_LIGHTING_MATCAP") + .sampler(WB_MATCAP_SLOT, ImageType::FLOAT_2D_ARRAY, "matcap_tx"); /** \} */ @@ -78,12 +106,42 @@ GPU_SHADER_INTERFACE_INFO(workbench_material_iface, "") .flat(Type::FLOAT, "metallic"); GPU_SHADER_CREATE_INFO(workbench_material) - .uniform_buf(4, "WorldData", "world_data", Frequency::PASS) - .uniform_buf(5, "vec4", "materials_data[4096]", Frequency::PASS) + .uniform_buf(WB_WORLD_SLOT, "WorldData", "world_data") + .uniform_buf(5, "vec4", "materials_data[4096]") .push_constant(Type::INT, "materialIndex") .push_constant(Type::BOOL, "useMatcap") .vertex_out(workbench_material_iface); +GPU_SHADER_CREATE_INFO(workbench_next_prepass) + .define("WORKBENCH_NEXT") + .uniform_buf(WB_WORLD_SLOT, "WorldData", "world_data") + .vertex_out(workbench_material_iface) + .additional_info("draw_view"); + +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Material Interface + * \{ */ + +GPU_SHADER_CREATE_INFO(workbench_color_material) + .define("WORKBENCH_COLOR_MATERIAL") + .storage_buf(WB_MATERIAL_SLOT, Qualifier::READ, "vec4", "materials_data[]"); + +GPU_SHADER_CREATE_INFO(workbench_color_texture) + .define("WORKBENCH_COLOR_TEXTURE") + .define("WORKBENCH_TEXTURE_IMAGE_ARRAY") + .define("WORKBENCH_COLOR_MATERIAL") + .storage_buf(WB_MATERIAL_SLOT, Qualifier::READ, "vec4", "materials_data[]") + .sampler(1, ImageType::FLOAT_2D, "imageTexture", Frequency::BATCH) + .sampler(2, ImageType::FLOAT_2D_ARRAY, "imageTileArray", Frequency::BATCH) + .sampler(3, ImageType::FLOAT_1D_ARRAY, "imageTileData", Frequency::BATCH) + .push_constant(Type::BOOL, "isImageTile") + .push_constant(Type::BOOL, "imagePremult") + .push_constant(Type::FLOAT, "imageTransparencyCutoff"); + +GPU_SHADER_CREATE_INFO(workbench_color_vertex).define("WORKBENCH_COLOR_VERTEX"); + /** \} */ /* -------------------------------------------------------------------- */ @@ -93,17 +151,17 @@ GPU_SHADER_CREATE_INFO(workbench_material) GPU_SHADER_CREATE_INFO(workbench_transparent_accum) /* NOTE: Blending will be skipped on objectId because output is a * non-normalized integer buffer. */ - .fragment_out(0, Type::VEC4, "transparentAccum") - .fragment_out(1, Type::VEC4, "revealageAccum") - .fragment_out(2, Type::UINT, "objectId") + .fragment_out(0, Type::VEC4, "out_transparent_accum") + .fragment_out(1, Type::VEC4, "out_revealage_accum") + .fragment_out(2, Type::UINT, "out_object_id") .push_constant(Type::BOOL, "forceShadowing") .typedef_source("workbench_shader_shared.h") .fragment_source("workbench_transparent_accum_frag.glsl"); GPU_SHADER_CREATE_INFO(workbench_opaque) - .fragment_out(0, Type::VEC4, "materialData") - .fragment_out(1, Type::VEC2, "normalData") - .fragment_out(2, Type::UINT, "objectId") + .fragment_out(0, Type::VEC4, "out_material") + .fragment_out(1, Type::VEC2, "out_normal") + .fragment_out(2, Type::UINT, "out_object_id") .typedef_source("workbench_shader_shared.h") .fragment_source("workbench_prepass_frag.glsl"); @@ -147,4 +205,54 @@ GPU_SHADER_CREATE_INFO(workbench_opaque) WORKBENCH_PIPELINE_VARIATIONS(workbench, "workbench_material"); +#undef WORKBENCH_FINAL_VARIATION +#undef WORKBENCH_CLIPPING_VARIATIONS +#undef WORKBENCH_TEXTURE_VARIATIONS +#undef WORKBENCH_DATATYPE_VARIATIONS +#undef WORKBENCH_PIPELINE_VARIATIONS + +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Variations Declaration + * \{ */ + +GPU_SHADER_CREATE_INFO(workbench_flat).define("WORKBENCH_SHADING_FLAT"); +GPU_SHADER_CREATE_INFO(workbench_studio).define("WORKBENCH_SHADING_STUDIO"); +GPU_SHADER_CREATE_INFO(workbench_matcap).define("WORKBENCH_SHADING_MATCAP"); + +#define WORKBENCH_FINAL_VARIATION(name, ...) \ + GPU_SHADER_CREATE_INFO(name).additional_info(__VA_ARGS__).do_static_compilation(true); + +#define WORKBENCH_CLIPPING_VARIATIONS(prefix, ...) \ + WORKBENCH_FINAL_VARIATION(prefix##_clip, "drw_clipped", __VA_ARGS__) \ + WORKBENCH_FINAL_VARIATION(prefix##_no_clip, __VA_ARGS__) + +#define WORKBENCH_COLOR_VARIATIONS(prefix, ...) \ + WORKBENCH_CLIPPING_VARIATIONS(prefix##_material, "workbench_color_material", __VA_ARGS__) \ + WORKBENCH_CLIPPING_VARIATIONS(prefix##_texture, "workbench_color_texture", __VA_ARGS__) \ + WORKBENCH_CLIPPING_VARIATIONS(prefix##_vertex, "workbench_color_vertex", __VA_ARGS__) + +#define WORKBENCH_SHADING_VARIATIONS(prefix, ...) \ + WORKBENCH_COLOR_VARIATIONS(prefix##_flat, "workbench_lighting_flat", __VA_ARGS__) \ + WORKBENCH_COLOR_VARIATIONS(prefix##_studio, "workbench_lighting_studio", __VA_ARGS__) \ + WORKBENCH_COLOR_VARIATIONS(prefix##_matcap, "workbench_next_lighting_matcap", __VA_ARGS__) + +#define WORKBENCH_PIPELINE_VARIATIONS(prefix, ...) \ + WORKBENCH_SHADING_VARIATIONS(prefix##_transparent, "workbench_transparent_accum", __VA_ARGS__) \ + WORKBENCH_SHADING_VARIATIONS(prefix##_opaque, "workbench_opaque", __VA_ARGS__) + +#define WORKBENCH_GEOMETRY_VARIATIONS(prefix, ...) \ + WORKBENCH_PIPELINE_VARIATIONS(prefix##_mesh, "workbench_next_mesh", __VA_ARGS__) \ + WORKBENCH_PIPELINE_VARIATIONS(prefix##_curves, "workbench_next_curves", __VA_ARGS__) \ + WORKBENCH_PIPELINE_VARIATIONS(prefix##_ptcloud, "workbench_next_pointcloud", __VA_ARGS__) + +WORKBENCH_GEOMETRY_VARIATIONS(workbench_next_prepass, "workbench_next_prepass"); + +#undef WORKBENCH_FINAL_VARIATION +#undef WORKBENCH_CLIPPING_VARIATIONS +#undef WORKBENCH_TEXTURE_VARIATIONS +#undef WORKBENCH_DATATYPE_VARIATIONS +#undef WORKBENCH_PIPELINE_VARIATIONS + /** \} */ diff --git a/source/blender/draw/engines/workbench/shaders/workbench_cavity_lib.glsl b/source/blender/draw/engines/workbench/shaders/workbench_cavity_lib.glsl index e7ca868a4ff..0bdea739f35 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_cavity_lib.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_cavity_lib.glsl @@ -5,6 +5,12 @@ /* From The Alchemy screen-space ambient obscurance algorithm * http://graphics.cs.williams.edu/papers/AlchemyHPG11/VV11AlchemyAO.pdf */ +#ifdef WORKBENCH_CAVITY +# define USE_CAVITY +# define cavityJitter jitter_tx +# define samples_coords cavity_samples +#endif + #ifdef USE_CAVITY void cavity_compute(vec2 screenco, diff --git a/source/blender/draw/engines/workbench/shaders/workbench_composite_comp.glsl b/source/blender/draw/engines/workbench/shaders/workbench_composite_comp.glsl new file mode 100644 index 00000000000..c18d4ba843d --- /dev/null +++ b/source/blender/draw/engines/workbench/shaders/workbench_composite_comp.glsl @@ -0,0 +1,80 @@ + +#pragma BLENDER_REQUIRE(common_view_lib.glsl) +#pragma BLENDER_REQUIRE(workbench_common_lib.glsl) +#pragma BLENDER_REQUIRE(workbench_matcap_lib.glsl) +#pragma BLENDER_REQUIRE(workbench_world_light_lib.glsl) +#pragma BLENDER_REQUIRE(workbench_cavity_lib.glsl) +#pragma BLENDER_REQUIRE(workbench_curvature_lib.glsl) + +void main() +{ + ivec2 texel = ivec2(gl_GlobalInvocationID.xy); + vec2 uv = (vec2(texel) + 0.5) / vec2(textureSize(normal_tx, 0)); + /* Normal and Incident vector are in viewspace. Lighting is evaluated in viewspace. */ + vec3 V = get_view_vector_from_screen_uv(uv); + vec3 N = workbench_normal_decode(texture(normal_tx, uv)); + vec4 mat_data = texture(material_tx, uv); + float depth = texture(depth_tx, uv).r; + + vec3 base_color = mat_data.rgb; + vec4 color = world_data.background_color; + + /* Background pixels. */ + if (depth != 1.0) { +#ifdef WORKBENCH_LIGHTING_MATCAP + /* When using matcaps, mat_data.a is the back-face sign. */ + N = (mat_data.a > 0.0) ? N : -N; + color.rgb = get_matcap_lighting(matcap_tx, base_color, N, V); +#endif + +#ifdef WORKBENCH_LIGHTING_STUDIO + float roughness, metallic; + workbench_float_pair_decode(mat_data.a, roughness, metallic); + color.rgb = get_world_lighting(base_color, roughness, metallic, N, V); +#endif + +#ifdef WORKBENCH_LIGHTING_FLAT + color.rgb = base_color; +#endif + +#if defined(WORKBENCH_CAVITY) || defined(WORKBENCH_CURVATURE) + float cavity = 0.0, edges = 0.0, curvature = 0.0; + +# ifdef WORKBENCH_CAVITY + cavity_compute(uv, depth_tx, normal_tx, cavity, edges); + // color.rgb = vec3(cavity, edges, 0); +# endif + +# ifdef WORKBENCH_CURVATURE + curvature_compute(uv, object_id_tx, normal_tx, curvature); + // color.rgb = vec3(curvature); +# endif + + float final_cavity_factor = clamp( + (1.0 - cavity) * (1.0 + edges) * (1.0 + curvature), 0.0, 4.0); + + color.rgb *= final_cavity_factor; + // color.rgb *= vec3(0, 1, 0); + +#endif + + color.a = 1.0f; + } + +#ifdef WORKBENCH_OUTLINE + vec3 offset = vec3(world_data.viewport_size_inv, 0.0) * world_data.ui_scale; + + uint center_id = texture(object_id_tx, uv).r; + uvec4 adjacent_ids = uvec4(texture(object_id_tx, uv + offset.zy).r, + texture(object_id_tx, uv - offset.zy).r, + texture(object_id_tx, uv + offset.xz).r, + texture(object_id_tx, uv - offset.xz).r); + + float outline_opacity = 1.0 - dot(vec4(equal(uvec4(center_id), adjacent_ids)), vec4(0.25)); + color = mix(color, world_data.object_outline_color, outline_opacity); +#endif + + if (color != world_data.background_color) { + imageStore(out_color_img, texel, color); + } +} diff --git a/source/blender/draw/engines/workbench/shaders/workbench_composite_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_composite_frag.glsl index 5e43fe27f38..9fd74dc7713 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_composite_frag.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_composite_frag.glsl @@ -16,18 +16,18 @@ void main() float roughness, metallic; workbench_float_pair_decode(mat_data.a, roughness, metallic); -#ifdef V3D_LIGHTING_MATCAP +#ifdef WORKBENCH_LIGHTING_MATCAP /* When using matcaps, mat_data.a is the back-face sign. */ N = (mat_data.a > 0.0) ? N : -N; fragColor.rgb = get_matcap_lighting(matcap_diffuse_tx, matcap_specular_tx, base_color, N, I); #endif -#ifdef V3D_LIGHTING_STUDIO +#ifdef WORKBENCH_LIGHTING_STUDIO fragColor.rgb = get_world_lighting(base_color, roughness, metallic, N, I); #endif -#ifdef V3D_LIGHTING_FLAT +#ifdef WORKBENCH_LIGHTING_FLAT fragColor.rgb = base_color; #endif diff --git a/source/blender/draw/engines/workbench/shaders/workbench_curvature_lib.glsl b/source/blender/draw/engines/workbench/shaders/workbench_curvature_lib.glsl index a6f7a1f522a..5d120560671 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_curvature_lib.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_curvature_lib.glsl @@ -1,6 +1,10 @@ #pragma BLENDER_REQUIRE(workbench_common_lib.glsl) +#ifdef WORKBENCH_CURVATURE +# define USE_CURVATURE +#endif + #ifdef USE_CURVATURE float curvature_soft_clamp(float curvature, float control) diff --git a/source/blender/draw/engines/workbench/shaders/workbench_image_lib.glsl b/source/blender/draw/engines/workbench/shaders/workbench_image_lib.glsl index 78782bdc777..b107963575c 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_image_lib.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_image_lib.glsl @@ -27,10 +27,27 @@ bool node_tex_tile_lookup(inout vec3 co, sampler2DArray ima, sampler1DArray map) vec3 workbench_image_color(vec2 uvs) { -#ifdef V3D_SHADING_TEXTURE_COLOR +#ifdef WORKBENCH_COLOR_TEXTURE vec4 color; -# ifdef TEXTURE_IMAGE_ARRAY +# ifdef WORKBENCH_NEXT + + vec3 co = vec3(uvs, 0.0); + if (isImageTile) { + if (node_tex_tile_lookup(co, imageTileArray, imageTileData)) { + color = texture(imageTileArray, co); + } + else { + color = vec4(1.0, 0.0, 1.0, 1.0); + } + } + else { + color = texture(imageTexture, uvs); + } + +# else // WORKBENCH_NEXT + +# ifdef WORKBENCH_TEXTURE_IMAGE_ARRAY vec3 co = vec3(uvs, 0.0); if (node_tex_tile_lookup(co, imageTileArray, imageTileData)) { color = texture(imageTileArray, co); @@ -38,10 +55,12 @@ vec3 workbench_image_color(vec2 uvs) else { color = vec4(1.0, 0.0, 1.0, 1.0); } -# else +# else color = texture(imageTexture, uvs); -# endif +# endif + +# endif // WORKBENCH_NEXT /* Unpremultiply if stored multiplied, since straight alpha is expected by shaders. */ if (imagePremult && !(color.a == 0.0 || color.a == 1.0)) { diff --git a/source/blender/draw/engines/workbench/shaders/workbench_matcap_lib.glsl b/source/blender/draw/engines/workbench/shaders/workbench_matcap_lib.glsl index a0cec54251d..b40d20cf8bc 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_matcap_lib.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_matcap_lib.glsl @@ -24,3 +24,14 @@ vec3 get_matcap_lighting( return diffuse * base_color + specular * float(world_data.use_specular); } + +vec3 get_matcap_lighting(sampler2DArray matcap, vec3 base_color, vec3 N, vec3 I) +{ + bool flipped = world_data.matcap_orientation != 0; + vec2 uv = matcap_uv_compute(I, N, flipped); + + vec3 diffuse = textureLod(matcap, vec3(uv, 0.0), 0.0).rgb; + vec3 specular = textureLod(matcap, vec3(uv, 1.0), 0.0).rgb; + + return diffuse * base_color + specular * float(world_data.use_specular); +} diff --git a/source/blender/draw/engines/workbench/shaders/workbench_material_lib.glsl b/source/blender/draw/engines/workbench/shaders/workbench_material_lib.glsl index b6dc26ecc65..59e30b310bb 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_material_lib.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_material_lib.glsl @@ -1,10 +1,28 @@ -void workbench_material_data_get( - int handle, out vec3 color, out float alpha, out float roughness, out float metallic) + +void workbench_material_data_get(int handle, + vec3 vertex_color, + out vec3 color, + out float alpha, + out float roughness, + out float metallic) { +#ifndef WORKBENCH_NEXT handle = (materialIndex != -1) ? materialIndex : handle; vec4 data = materials_data[uint(handle) & 0xFFFu]; color = data.rgb; + if (materialIndex == 0) { + color_interp = vertex_color; + } +#else + +# ifdef WORKBENCH_COLOR_MATERIAL + vec4 data = materials_data[handle]; +# else + vec4 data = vec4(0.0); +# endif + color = (data.r == -1) ? vertex_color : data.rgb; +#endif uint encoded_data = floatBitsToUint(data.w); alpha = float((encoded_data >> 16u) & 0xFFu) * (1.0 / 255.0); diff --git a/source/blender/draw/engines/workbench/shaders/workbench_next_merge_depth_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_next_merge_depth_frag.glsl new file mode 100644 index 00000000000..70e4c3c5071 --- /dev/null +++ b/source/blender/draw/engines/workbench/shaders/workbench_next_merge_depth_frag.glsl @@ -0,0 +1,11 @@ + +void main() +{ + float depth = texture(depth_tx, uvcoordsvar.xy).r; + if (depth != 1.0) { + gl_FragDepth = depth; + } + else { + discard; + } +} diff --git a/source/blender/draw/engines/workbench/shaders/workbench_prepass_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_prepass_frag.glsl index 82fa65449eb..7758d6d421c 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_prepass_frag.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_prepass_frag.glsl @@ -3,20 +3,43 @@ #pragma BLENDER_REQUIRE(workbench_common_lib.glsl) #pragma BLENDER_REQUIRE(workbench_image_lib.glsl) +#ifdef WORKBENCH_NEXT + +void main() +{ + out_object_id = uint(object_id); + out_normal = workbench_normal_encode(gl_FrontFacing, normal_interp); + + out_material = vec4(color_interp, workbench_float_pair_encode(_roughness, metallic)); + +# ifdef WORKBENCH_COLOR_TEXTURE + out_material.rgb = workbench_image_color(uv_interp); +# endif + +# ifdef WORKBENCH_LIGHTING_MATCAP + /* For matcaps, save front facing in alpha channel. */ + out_material.a = float(gl_FrontFacing); +# endif +} + +#else + void main() { - normalData = workbench_normal_encode(gl_FrontFacing, normal_interp); + out_normal = workbench_normal_encode(gl_FrontFacing, normal_interp); - materialData = vec4(color_interp, workbench_float_pair_encode(_roughness, metallic)); + out_material = vec4(color_interp, workbench_float_pair_encode(_roughness, metallic)); - objectId = uint(object_id); + out_object_id = uint(object_id); if (useMatcap) { /* For matcaps, save front facing in alpha channel. */ - materialData.a = float(gl_FrontFacing); + out_material.a = float(gl_FrontFacing); } -#ifdef V3D_SHADING_TEXTURE_COLOR - materialData.rgb = workbench_image_color(uv_interp); -#endif +# ifdef WORKBENCH_COLOR_TEXTURE + out_material.rgb = workbench_image_color(uv_interp); +# endif } + +#endif diff --git a/source/blender/draw/engines/workbench/shaders/workbench_prepass_hair_vert.glsl b/source/blender/draw/engines/workbench/shaders/workbench_prepass_hair_vert.glsl index 04fef8d8b32..afbbca465d4 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_prepass_hair_vert.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_prepass_hair_vert.glsl @@ -68,11 +68,12 @@ void main() normal_interp = normalize(normal_world_to_view(nor)); - workbench_material_data_get(resource_handle, color_interp, alpha_interp, _roughness, metallic); - - if (materialIndex == 0) { - color_interp = hair_get_customdata_vec3(ac); - } + workbench_material_data_get(resource_handle, + hair_get_customdata_vec3(ac), + color_interp, + alpha_interp, + _roughness, + metallic); /* Hairs have lots of layer and can rapidly become the most prominent surface. * So we lower their alpha artificially. */ diff --git a/source/blender/draw/engines/workbench/shaders/workbench_prepass_pointcloud_vert.glsl b/source/blender/draw/engines/workbench/shaders/workbench_prepass_pointcloud_vert.glsl index 366bc2f9105..1551b1c8084 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_prepass_pointcloud_vert.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_prepass_pointcloud_vert.glsl @@ -19,11 +19,8 @@ void main() uv_interp = vec2(0.0); - workbench_material_data_get(resource_handle, color_interp, alpha_interp, _roughness, metallic); - - if (materialIndex == 0) { - color_interp = vec3(1.0); - } + workbench_material_data_get( + resource_handle, vec3(1.0), color_interp, alpha_interp, _roughness, metallic); object_id = int(uint(resource_handle) & 0xFFFFu) + 1; } diff --git a/source/blender/draw/engines/workbench/shaders/workbench_prepass_vert.glsl b/source/blender/draw/engines/workbench/shaders/workbench_prepass_vert.glsl index 0637f669961..7fcfb9b1c54 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_prepass_vert.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_prepass_vert.glsl @@ -16,11 +16,8 @@ void main() normal_interp = normalize(normal_object_to_view(nor)); - workbench_material_data_get(resource_handle, color_interp, alpha_interp, _roughness, metallic); - - if (materialIndex == 0) { - color_interp = ac.rgb; - } + workbench_material_data_get( + resource_handle, ac.rgb, color_interp, alpha_interp, _roughness, metallic); object_id = int(uint(resource_handle) & 0xFFFFu) + 1; } diff --git a/source/blender/draw/engines/workbench/shaders/workbench_transparent_accum_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_transparent_accum_frag.glsl index cd5ac21688c..791da284503 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_transparent_accum_frag.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_transparent_accum_frag.glsl @@ -45,6 +45,8 @@ float calculate_transparent_weight(void) return clamp(w, 1e-2, 3e2); } +#ifdef WORKBENCH_NEXT + void main() { /* Normal and Incident vector are in viewspace. Lighting is evaluated in viewspace. */ @@ -54,28 +56,68 @@ void main() vec3 color = color_interp; -#ifdef V3D_SHADING_TEXTURE_COLOR +# ifdef WORKBENCH_COLOR_TEXTURE color = workbench_image_color(uv_interp); -#endif +# endif + +# ifdef WORKBENCH_LIGHTING_MATCAP + vec3 shaded_color = get_matcap_lighting(matcap_tx, color, N, I); +# endif + +# ifdef WORKBENCH_LIGHTING_STUDIO + vec3 shaded_color = get_world_lighting(color, _roughness, metallic, N, I); +# endif + +# ifdef WORKBENCH_LIGHTING_FLAT + vec3 shaded_color = color; +# endif + + // shaded_color *= get_shadow(N, forceShadowing); + + /* Listing 4 */ + float alpha = alpha_interp * world_data.xray_alpha; + float weight = calculate_transparent_weight() * alpha; + out_transparent_accum = vec4(shaded_color * weight, alpha); + out_revealage_accum = vec4(weight); + + out_object_id = uint(object_id); +} + +#else + +void main() +{ + /* Normal and Incident vector are in viewspace. Lighting is evaluated in viewspace. */ + vec2 uv_viewport = gl_FragCoord.xy * world_data.viewport_size_inv; + vec3 I = get_view_vector_from_screen_uv(uv_viewport); + vec3 N = normalize(normal_interp); + + vec3 color = color_interp; -#ifdef V3D_LIGHTING_MATCAP +# ifdef WORKBENCH_COLOR_TEXTURE + color = workbench_image_color(uv_interp); +# endif + +# ifdef WORKBENCH_LIGHTING_MATCAP vec3 shaded_color = get_matcap_lighting(matcap_diffuse_tx, matcap_specular_tx, color, N, I); -#endif +# endif -#ifdef V3D_LIGHTING_STUDIO +# ifdef WORKBENCH_LIGHTING_STUDIO vec3 shaded_color = get_world_lighting(color, _roughness, metallic, N, I); -#endif +# endif -#ifdef V3D_LIGHTING_FLAT +# ifdef WORKBENCH_LIGHTING_FLAT vec3 shaded_color = color; -#endif +# endif shaded_color *= get_shadow(N, forceShadowing); /* Listing 4 */ float weight = calculate_transparent_weight() * alpha_interp; - transparentAccum = vec4(shaded_color * weight, alpha_interp); - revealageAccum = vec4(weight); + out_transparent_accum = vec4(shaded_color * weight, alpha_interp); + out_revealage_accum = vec4(weight); - objectId = uint(object_id); + out_object_id = uint(object_id); } + +#endif diff --git a/source/blender/draw/engines/workbench/workbench_defines.hh b/source/blender/draw/engines/workbench/workbench_defines.hh new file mode 100644 index 00000000000..4dfd69d9d50 --- /dev/null +++ b/source/blender/draw/engines/workbench/workbench_defines.hh @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#define WB_MATCAP_SLOT 0 +#define WB_TEXTURE_SLOT 1 +#define WB_TILE_ARRAY_SLOT 2 +#define WB_TILE_DATA_SLOT 3 +#define WB_MATERIAL_SLOT 0 +#define WB_WORLD_SLOT 4 + +#define WB_RESOLVE_GROUP_SIZE 8 diff --git a/source/blender/draw/engines/workbench/workbench_effect_antialiasing.cc b/source/blender/draw/engines/workbench/workbench_effect_antialiasing.cc new file mode 100644 index 00000000000..de0277e4320 --- /dev/null +++ b/source/blender/draw/engines/workbench/workbench_effect_antialiasing.cc @@ -0,0 +1,299 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include "workbench_private.hh" + +#include "BLI_jitter_2d.h" +#include "smaa_textures.h" + +namespace blender::workbench { + +class TaaSamples { + void init_samples(blender::Array<float2> &samples, const int size) + { + samples = blender::Array<float2>(size); + BLI_jitter_init((float(*)[2])samples.begin(), size); + + /* find closest element to center */ + int closest_index = 0; + float closest_squared_distance = 1.0f; + + for (int i : samples.index_range()) { + float2 sample = samples[i]; + const float squared_dist = len_squared_v2(sample); + if (squared_dist < closest_squared_distance) { + closest_squared_distance = squared_dist; + closest_index = i; + } + } + + float2 closest_sample = samples[closest_index]; + + for (float2 &sample : samples) { + /* move jitter samples so that closest sample is in center */ + sample -= closest_sample; + /* Avoid samples outside range (wrap around). */ + sample = {fmodf(sample.x + 0.5f, 1.0f), fmodf(sample.y + 0.5f, 1.0f)}; + /* Recenter the distribution[-1..1]. */ + sample = (sample * 2.0f) - 1.0f; + } + + /* swap center sample to the start of the array */ + if (closest_index != 0) { + swap_v2_v2(samples[0], samples[closest_index]); + } + + /* Sort list based on farthest distance with previous. */ + for (int i = 0; i < size - 2; i++) { + float squared_dist = 0.0; + int index = i; + for (int j = i + 1; j < size; j++) { + const float _squared_dist = len_squared_v2(samples[i] - samples[j]); + if (_squared_dist > squared_dist) { + squared_dist = _squared_dist; + index = j; + } + } + swap_v2_v2(samples[i + 1], samples[index]); + } + } + + public: + blender::Array<float2> x5; + blender::Array<float2> x8; + blender::Array<float2> x11; + blender::Array<float2> x16; + blender::Array<float2> x32; + + TaaSamples() + { + init_samples(x5, 5); + init_samples(x8, 8); + init_samples(x11, 11); + init_samples(x16, 16); + init_samples(x32, 32); + } +}; + +static TaaSamples TAA_SAMPLES = TaaSamples(); + +static float filter_blackman_harris(float x, const float width) +{ + if (x > width * 0.5f) { + return 0.0f; + } + x = 2.0f * M_PI * clamp_f((x / width + 0.5f), 0.0f, 1.0f); + return 0.35875f - 0.48829f * cosf(x) + 0.14128f * cosf(2.0f * x) - 0.01168f * cosf(3.0f * x); +} + +/* Compute weights for the 3x3 neighborhood using a 1.5px filter. */ +static void setup_taa_weights(const float2 offset, float r_weights[9], float &r_weight_sum) +{ + /* NOTE: If filter width is bigger than 2.0f, then we need to sample more neighborhood. */ + const float filter_width = 2.0f; + r_weight_sum = 0.0f; + int i = 0; + for (int x = -1; x <= 1; x++) { + for (int y = -1; y <= 1; y++, i++) { + float2 sample_co = float2(x, y) - offset; + float r = len_v2(sample_co); + /* fclem: is radial distance ok here? */ + float weight = filter_blackman_harris(r, filter_width); + r_weight_sum += weight; + r_weights[i] = weight; + } + } +} + +AntiAliasingPass::AntiAliasingPass() +{ + taa_accumulation_sh_ = GPU_shader_create_from_info_name("workbench_taa"); + smaa_edge_detect_sh_ = GPU_shader_create_from_info_name("workbench_smaa_stage_0"); + smaa_aa_weight_sh_ = GPU_shader_create_from_info_name("workbench_smaa_stage_1"); + smaa_resolve_sh_ = GPU_shader_create_from_info_name("workbench_smaa_stage_2"); + + smaa_search_tx_.ensure_2d(GPU_R8, {SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT}); + GPU_texture_update(smaa_search_tx_, GPU_DATA_UBYTE, searchTexBytes); + GPU_texture_filter_mode(smaa_search_tx_, true); + + smaa_area_tx_.ensure_2d(GPU_RG8, {AREATEX_WIDTH, AREATEX_HEIGHT}); + GPU_texture_update(smaa_area_tx_, GPU_DATA_UBYTE, areaTexBytes); + GPU_texture_filter_mode(smaa_area_tx_, true); +} + +AntiAliasingPass::~AntiAliasingPass() +{ + DRW_SHADER_FREE_SAFE(taa_accumulation_sh_); + DRW_SHADER_FREE_SAFE(smaa_edge_detect_sh_); + DRW_SHADER_FREE_SAFE(smaa_aa_weight_sh_); + DRW_SHADER_FREE_SAFE(smaa_resolve_sh_); +} + +void AntiAliasingPass::init(const SceneState &scene_state) +{ + enabled_ = scene_state.draw_aa; + sample_ = scene_state.sample; + samples_len_ = scene_state.samples_len; +} + +void AntiAliasingPass::sync(SceneResources &resources, int2 resolution) +{ + if (!enabled_) { + taa_accumulation_tx_.free(); + sample0_depth_tx_.free(); + return; + } + + taa_accumulation_tx_.ensure_2d(GPU_RGBA16F, resolution); + sample0_depth_tx_.ensure_2d(GPU_DEPTH24_STENCIL8, resolution); + + taa_accumulation_ps_.init(); + taa_accumulation_ps_.state_set(sample_ == 0 ? DRW_STATE_WRITE_COLOR : + DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ADD_FULL); + taa_accumulation_ps_.shader_set(taa_accumulation_sh_); + taa_accumulation_ps_.bind_texture("colorBuffer", &resources.color_tx); + taa_accumulation_ps_.push_constant("samplesWeights", weights_, 9); + taa_accumulation_ps_.draw_procedural(GPU_PRIM_TRIS, 1, 3); + + smaa_edge_detect_ps_.init(); + smaa_edge_detect_ps_.state_set(DRW_STATE_WRITE_COLOR); + smaa_edge_detect_ps_.shader_set(smaa_edge_detect_sh_); + smaa_edge_detect_ps_.bind_texture("colorTex", &taa_accumulation_tx_); + smaa_edge_detect_ps_.push_constant("viewportMetrics", &smaa_viewport_metrics_, 1); + smaa_edge_detect_ps_.clear_color(float4(0.0f)); + smaa_edge_detect_ps_.draw_procedural(GPU_PRIM_TRIS, 1, 3); + + smaa_aa_weight_ps_.init(); + smaa_aa_weight_ps_.state_set(DRW_STATE_WRITE_COLOR); + smaa_aa_weight_ps_.shader_set(smaa_aa_weight_sh_); + smaa_aa_weight_ps_.bind_texture("edgesTex", &smaa_edge_tx_); + smaa_aa_weight_ps_.bind_texture("areaTex", smaa_area_tx_); + smaa_aa_weight_ps_.bind_texture("searchTex", smaa_search_tx_); + smaa_aa_weight_ps_.push_constant("viewportMetrics", &smaa_viewport_metrics_, 1); + smaa_aa_weight_ps_.clear_color(float4(0.0f)); + smaa_aa_weight_ps_.draw_procedural(GPU_PRIM_TRIS, 1, 3); + + smaa_resolve_ps_.init(); + smaa_resolve_ps_.state_set(DRW_STATE_WRITE_COLOR); + smaa_resolve_ps_.shader_set(smaa_resolve_sh_); + smaa_resolve_ps_.bind_texture("blendTex", &smaa_weight_tx_); + smaa_resolve_ps_.bind_texture("colorTex", &taa_accumulation_tx_); + smaa_resolve_ps_.push_constant("viewportMetrics", &smaa_viewport_metrics_, 1); + smaa_resolve_ps_.push_constant("mixFactor", &smaa_mix_factor_, 1); + smaa_resolve_ps_.push_constant("taaAccumulatedWeight", &weight_accum_, 1); + smaa_resolve_ps_.clear_color(float4(0.0f)); + smaa_resolve_ps_.draw_procedural(GPU_PRIM_TRIS, 1, 3); +} + +void AntiAliasingPass::setup_view(View &view, int2 resolution) +{ + if (!enabled_) { + return; + } + + float2 sample_offset; + switch (samples_len_) { + default: + case 5: + sample_offset = TAA_SAMPLES.x5[sample_]; + break; + case 8: + sample_offset = TAA_SAMPLES.x8[sample_]; + break; + case 11: + sample_offset = TAA_SAMPLES.x11[sample_]; + break; + case 16: + sample_offset = TAA_SAMPLES.x16[sample_]; + break; + case 32: + sample_offset = TAA_SAMPLES.x32[sample_]; + break; + } + + setup_taa_weights(sample_offset, weights_, weights_sum_); + + /* TODO(Miguel Pozo): New API equivalent? */ + const DRWView *default_view = DRW_view_default_get(); + float4x4 winmat, viewmat, persmat; + /* construct new matrices from transform delta */ + DRW_view_winmat_get(default_view, winmat.ptr(), false); + DRW_view_viewmat_get(default_view, viewmat.ptr(), false); + DRW_view_persmat_get(default_view, persmat.ptr(), false); + + window_translate_m4( + winmat.ptr(), persmat.ptr(), sample_offset.x / resolution.x, sample_offset.y / resolution.y); + + view.sync(viewmat, winmat); +} + +void AntiAliasingPass::draw(Manager &manager, + View &view, + SceneResources &resources, + int2 resolution, + GPUTexture *depth_tx, + GPUTexture *color_tx) +{ + if (!enabled_) { + /* TODO(Miguel Pozo): Should render to the input color_tx and depth_tx in the first place */ + GPU_texture_copy(color_tx, resources.color_tx); + GPU_texture_copy(depth_tx, resources.depth_tx); + return; + } + + /** + * We always do SMAA on top of TAA accumulation, unless the number of samples of TAA is already + * high. This ensure a smoother transition. + * If TAA accumulation is finished, we only blit the result. + */ + const bool last_sample = sample_ + 1 == samples_len_; + const bool taa_finished = sample_ >= samples_len_; + + if (!taa_finished) { + if (sample_ == 0) { + weight_accum_ = 0; + } + /* Accumulate result to the TAA buffer. */ + taa_accumulation_fb_.ensure(GPU_ATTACHMENT_NONE, GPU_ATTACHMENT_TEXTURE(taa_accumulation_tx_)); + taa_accumulation_fb_.bind(); + manager.submit(taa_accumulation_ps_, view); + weight_accum_ += weights_sum_; + } + + if (sample_ == 0) { + if (sample0_depth_tx_.is_valid()) { + GPU_texture_copy(sample0_depth_tx_, resources.depth_tx); + } + /* TODO(Miguel Pozo): Should render to the input depth_tx in the first place */ + /* Copy back the saved depth buffer for correct overlays. */ + GPU_texture_copy(depth_tx, resources.depth_tx); + } + else { + /* Copy back the saved depth buffer for correct overlays. */ + GPU_texture_copy(depth_tx, sample0_depth_tx_); + } + + if (!DRW_state_is_image_render() || last_sample) { + smaa_weight_tx_.acquire(resolution, GPU_RGBA8); + smaa_mix_factor_ = 1.0f - clamp_f(sample_ / 4.0f, 0.0f, 1.0f); + smaa_viewport_metrics_ = float4(float2(1.0f / float2(resolution)), resolution); + + /* After a certain point SMAA is no longer necessary. */ + if (smaa_mix_factor_ > 0.0f) { + smaa_edge_tx_.acquire(resolution, GPU_RG8); + smaa_edge_fb_.ensure(GPU_ATTACHMENT_NONE, GPU_ATTACHMENT_TEXTURE(smaa_edge_tx_)); + smaa_edge_fb_.bind(); + manager.submit(smaa_edge_detect_ps_, view); + + smaa_weight_fb_.ensure(GPU_ATTACHMENT_NONE, GPU_ATTACHMENT_TEXTURE(smaa_weight_tx_)); + smaa_weight_fb_.bind(); + manager.submit(smaa_aa_weight_ps_, view); + smaa_edge_tx_.release(); + } + smaa_resolve_fb_.ensure(GPU_ATTACHMENT_NONE, GPU_ATTACHMENT_TEXTURE(color_tx)); + smaa_resolve_fb_.bind(); + manager.submit(smaa_resolve_ps_, view); + smaa_weight_tx_.release(); + } +} + +} // namespace blender::workbench diff --git a/source/blender/draw/engines/workbench/workbench_effect_cavity.cc b/source/blender/draw/engines/workbench/workbench_effect_cavity.cc new file mode 100644 index 00000000000..f2ec83fbf73 --- /dev/null +++ b/source/blender/draw/engines/workbench/workbench_effect_cavity.cc @@ -0,0 +1,90 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later + * Copyright 2020 Blender Foundation. */ + +/** \file + * \ingroup draw_engine + * + * Cavity Effect: + * + * We use Screen Space Ambient Occlusion (SSAO) to enhance geometric details of the surfaces. + * We also use a Curvature effect computed only using the surface normals. + * + * This is done after the opaque pass. It only affects the opaque surfaces. + */ + +#include "BLI_rand.h" +#include "workbench_private.hh" + +namespace blender::workbench { + +void CavityEffect::init(const SceneState &scene_state, SceneResources &resources) +{ + cavity_enabled_ = scene_state.draw_cavity; + curvature_enabled_ = scene_state.draw_curvature; + + const int ssao_samples = scene_state.scene->display.matcap_ssao_samples; + int sample_count = min_ii(scene_state.samples_len * ssao_samples, max_samples_); + const int max_iter_count = sample_count / ssao_samples; + + sample_ = scene_state.sample % max_iter_count; + + UniformBuffer<WorldData> &world_buf = resources.world_buf; + + world_buf.cavity_sample_start = ssao_samples * sample_; + world_buf.cavity_sample_end = ssao_samples * (sample_ + 1); + + world_buf.cavity_sample_count_inv = 1.0f / (world_buf.cavity_sample_end - + world_buf.cavity_sample_start); + world_buf.cavity_jitter_scale = 1.0f / 64.0f; + + world_buf.cavity_valley_factor = scene_state.shading.cavity_valley_factor; + world_buf.cavity_ridge_factor = scene_state.shading.cavity_ridge_factor; + world_buf.cavity_attenuation = scene_state.scene->display.matcap_ssao_attenuation; + world_buf.cavity_distance = scene_state.scene->display.matcap_ssao_distance; + + world_buf.curvature_ridge = 0.5f / + max_ff(square_f(scene_state.shading.curvature_ridge_factor), 1e-4f); + world_buf.curvature_valley = 0.7f / max_ff(square_f(scene_state.shading.curvature_valley_factor), + 1e-4f); + + if (cavity_enabled_ && sample_count_ != sample_count) { + sample_count_ = sample_count; + load_samples_buf(ssao_samples); + resources.load_jitter_tx(sample_count_); + } +} + +void CavityEffect::load_samples_buf(int ssao_samples) +{ + const float iteration_samples_inv = 1.0f / ssao_samples; + + /* Create disk samples using Hammersley distribution */ + for (int i : IndexRange(sample_count_)) { + float it_add = (i / ssao_samples) * 0.499f; + float r = fmodf((i + 0.5f + it_add) * iteration_samples_inv, 1.0f); + double dphi; + BLI_hammersley_1d(i, &dphi); + + float phi = (float)dphi * 2.0f * M_PI + it_add; + samples_buf[i].x = cosf(phi); + samples_buf[i].y = sinf(phi); + /* This deliberately distribute more samples + * at the center of the disk (and thus the shadow). */ + samples_buf[i].z = r; + } + + samples_buf.push_update(); +} + +void CavityEffect::setup_resolve_pass(PassSimple &pass, SceneResources &resources) +{ + if (cavity_enabled_) { + pass.bind_ubo("cavity_samples", samples_buf); + pass.bind_texture("jitter_tx", &resources.jitter_tx, eGPUSamplerState::GPU_SAMPLER_REPEAT); + } + if (curvature_enabled_) { + pass.bind_texture("object_id_tx", &resources.object_id_tx); + } +} + +} // namespace blender::workbench diff --git a/source/blender/draw/engines/workbench/workbench_effect_dof.cc b/source/blender/draw/engines/workbench/workbench_effect_dof.cc new file mode 100644 index 00000000000..b388c2d907e --- /dev/null +++ b/source/blender/draw/engines/workbench/workbench_effect_dof.cc @@ -0,0 +1,273 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later + * Copyright 2016 Blender Foundation. */ + +/** \file + * \ingroup draw_engine + * + * Depth of Field Effect: + * + * We use a gather approach by sampling a lowres version of the color buffer. + * The process can be summarized like this: + * - down-sample the color buffer using a COC (Circle of Confusion) aware down-sample algorithm. + * - do a gather pass using the COC computed in the previous pass. + * - do a median filter to reduce noise amount. + * - composite on top of main color buffer. + * + * This is done after all passes and affects every surfaces. + */ + +#include "workbench_private.hh" + +#include "BKE_camera.h" +#include "DEG_depsgraph_query.h" + +#include "DNA_camera_types.h" + +namespace blender::workbench { +/** + * Transform [-1..1] square to unit circle. + */ +static void square_to_circle(float x, float y, float &r, float &T) +{ + if (x > -y) { + if (x > y) { + r = x; + T = M_PI_4 * (y / x); + } + else { + r = y; + T = M_PI_4 * (2 - (x / y)); + } + } + else { + if (x < y) { + r = -x; + T = M_PI_4 * (4 + (y / x)); + } + else { + r = -y; + if (y != 0) { + T = M_PI_4 * (6 - (x / y)); + } + else { + T = 0.0f; + } + } + } +} + +void DofPass::setup_samples() +{ + float4 *sample = samples_buf_.begin(); + for (int i = 0; i <= kernel_radius_; i++) { + for (int j = -kernel_radius_; j <= kernel_radius_; j++) { + for (int k = -kernel_radius_; k <= kernel_radius_; k++) { + if (abs(j) > i || abs(k) > i) { + continue; + } + if (abs(j) < i && abs(k) < i) { + continue; + } + + float2 coord = float2(j, k) / float2(kernel_radius_); + float r = 0; + float T = 0; + square_to_circle(coord.x, coord.y, r, T); + sample->z = r; + + /* Bokeh shape parameterization. */ + if (blades_ > 1.0f) { + float denom = T - (2.0 * M_PI / blades_) * floorf((blades_ * T + M_PI) / (2.0 * M_PI)); + r *= cosf(M_PI / blades_) / cosf(denom); + } + + T += rotation_; + + sample->x = r * cosf(T) * ratio_; + sample->y = r * sinf(T); + sample->w = 0; + sample++; + } + } + } + samples_buf_.push_update(); +} + +void DofPass::init(const SceneState &scene_state) +{ + enabled_ = scene_state.draw_dof; + + if (!enabled_) { + source_tx_.free(); + coc_halfres_tx_.free(); + return; + } + + if (prepare_sh_ == nullptr) { + prepare_sh_ = GPU_shader_create_from_info_name("workbench_effect_dof_prepare"); + downsample_sh_ = GPU_shader_create_from_info_name("workbench_effect_dof_downsample"); + blur1_sh_ = GPU_shader_create_from_info_name("workbench_effect_dof_blur1"); + blur2_sh_ = GPU_shader_create_from_info_name("workbench_effect_dof_blur2"); + resolve_sh_ = GPU_shader_create_from_info_name("workbench_effect_dof_resolve"); + } + + offset_ = scene_state.sample / (float)scene_state.samples_len; + + int2 half_res = scene_state.resolution / 2; + half_res = {max_ii(half_res.x, 1), max_ii(half_res.y, 1)}; + + source_tx_.ensure_2d(GPU_RGBA16F, half_res, nullptr, 3); + source_tx_.ensure_mip_views(); + source_tx_.filter_mode(true); + coc_halfres_tx_.ensure_2d(GPU_RG8, half_res, nullptr, 3); + coc_halfres_tx_.ensure_mip_views(); + coc_halfres_tx_.filter_mode(true); + + Camera *camera = static_cast<Camera *>(scene_state.camera_object->data); + + /* Parameters */ + float fstop = camera->dof.aperture_fstop; + float sensor = BKE_camera_sensor_size(camera->sensor_fit, camera->sensor_x, camera->sensor_y); + float focus_dist = BKE_camera_object_dof_distance(scene_state.camera_object); + float focal_len = camera->lens; + + /* TODO(fclem): de-duplicate with EEVEE. */ + const float scale_camera = 0.001f; + /* We want radius here for the aperture number. */ + float aperture = 0.5f * scale_camera * focal_len / fstop; + float focal_len_scaled = scale_camera * focal_len; + float sensor_scaled = scale_camera * sensor; + + if (RegionView3D *rv3d = DRW_context_state_get()->rv3d) { + sensor_scaled *= rv3d->viewcamtexcofac[0]; + } + + aperture_size_ = aperture * fabsf(focal_len_scaled / (focus_dist - focal_len_scaled)); + distance_ = -focus_dist; + invsensor_size_ = scene_state.resolution.x / sensor_scaled; + + near_ = -camera->clip_start; + far_ = -camera->clip_end; + + float blades = camera->dof.aperture_blades; + float rotation = camera->dof.aperture_rotation; + float ratio = 1.0f / camera->dof.aperture_ratio; + + if (blades_ != blades || rotation_ != rotation || ratio_ != ratio) { + blades_ = blades; + rotation_ = rotation; + ratio_ = ratio; + setup_samples(); + } +} + +void DofPass::sync(SceneResources &resources) +{ + if (!enabled_) { + return; + } + + eGPUSamplerState sampler_state = GPU_SAMPLER_FILTER | GPU_SAMPLER_MIPMAP; + + down_ps_.init(); + down_ps_.state_set(DRW_STATE_WRITE_COLOR); + down_ps_.shader_set(prepare_sh_); + down_ps_.bind_texture("sceneColorTex", &resources.color_tx); + down_ps_.bind_texture("sceneDepthTex", &resources.depth_tx); + down_ps_.push_constant("invertedViewportSize", float2(DRW_viewport_invert_size_get())); + down_ps_.push_constant("dofParams", float3(aperture_size_, distance_, invsensor_size_)); + down_ps_.push_constant("nearFar", float2(near_, far_)); + down_ps_.draw_procedural(GPU_PRIM_TRIS, 1, 3); + + down2_ps_.init(); + down2_ps_.state_set(DRW_STATE_WRITE_COLOR); + down2_ps_.shader_set(downsample_sh_); + down2_ps_.bind_texture("sceneColorTex", &source_tx_, sampler_state); + down2_ps_.bind_texture("inputCocTex", &coc_halfres_tx_, sampler_state); + down2_ps_.draw_procedural(GPU_PRIM_TRIS, 1, 3); + + blur_ps_.init(); + blur_ps_.state_set(DRW_STATE_WRITE_COLOR); + blur_ps_.shader_set(blur1_sh_); + blur_ps_.bind_ubo("samples", samples_buf_); + blur_ps_.bind_texture("noiseTex", resources.jitter_tx); + blur_ps_.bind_texture("inputCocTex", &coc_halfres_tx_, sampler_state); + blur_ps_.bind_texture("halfResColorTex", &source_tx_, sampler_state); + blur_ps_.push_constant("invertedViewportSize", float2(DRW_viewport_invert_size_get())); + blur_ps_.push_constant("noiseOffset", offset_); + blur_ps_.draw_procedural(GPU_PRIM_TRIS, 1, 3); + + blur2_ps_.init(); + blur2_ps_.state_set(DRW_STATE_WRITE_COLOR); + blur2_ps_.shader_set(blur2_sh_); + blur2_ps_.bind_texture("inputCocTex", &coc_halfres_tx_, sampler_state); + blur2_ps_.bind_texture("blurTex", &blur_tx_); + blur2_ps_.push_constant("invertedViewportSize", float2(DRW_viewport_invert_size_get())); + blur2_ps_.draw_procedural(GPU_PRIM_TRIS, 1, 3); + + resolve_ps_.init(); + resolve_ps_.state_set(DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_CUSTOM); + resolve_ps_.shader_set(resolve_sh_); + resolve_ps_.bind_texture("halfResColorTex", &source_tx_, sampler_state); + resolve_ps_.bind_texture("sceneDepthTex", &resources.depth_tx); + resolve_ps_.push_constant("invertedViewportSize", float2(DRW_viewport_invert_size_get())); + resolve_ps_.push_constant("dofParams", float3(aperture_size_, distance_, invsensor_size_)); + resolve_ps_.push_constant("nearFar", float2(near_, far_)); + resolve_ps_.draw_procedural(GPU_PRIM_TRIS, 1, 3); +} + +void DofPass::draw(Manager &manager, View &view, SceneResources &resources, int2 resolution) +{ + if (!enabled_) { + return; + } + + DRW_stats_group_start("Depth Of Field"); + + int2 half_res = {max_ii(resolution.x / 2, 1), max_ii(resolution.y / 2, 1)}; + blur_tx_.acquire(half_res, GPU_RGBA16F); + + downsample_fb_.ensure(GPU_ATTACHMENT_NONE, + GPU_ATTACHMENT_TEXTURE(source_tx_), + GPU_ATTACHMENT_TEXTURE(coc_halfres_tx_)); + downsample_fb_.bind(); + manager.submit(down_ps_, view); + + struct CallbackData { + Manager &manager; + View &view; + PassSimple &pass; + }; + CallbackData callback_data = {manager, view, down2_ps_}; + + auto downsample_level = [](void *callback_data, int UNUSED(level)) { + CallbackData *cd = static_cast<CallbackData *>(callback_data); + cd->manager.submit(cd->pass, cd->view); + }; + + GPU_framebuffer_recursive_downsample( + downsample_fb_, 2, downsample_level, static_cast<void *>(&callback_data)); + + blur1_fb_.ensure(GPU_ATTACHMENT_NONE, GPU_ATTACHMENT_TEXTURE(blur_tx_)); + blur1_fb_.bind(); + manager.submit(blur_ps_, view); + + blur2_fb_.ensure(GPU_ATTACHMENT_NONE, GPU_ATTACHMENT_TEXTURE(source_tx_)); + blur2_fb_.bind(); + manager.submit(blur2_ps_, view); + + resolve_fb_.ensure(GPU_ATTACHMENT_NONE, GPU_ATTACHMENT_TEXTURE(resources.color_tx)); + resolve_fb_.bind(); + manager.submit(resolve_ps_, view); + + blur_tx_.release(); + + DRW_stats_group_end(); +} + +bool DofPass::is_enabled() +{ + return enabled_; +} + +} // namespace blender::workbench diff --git a/source/blender/draw/engines/workbench/workbench_effect_outline.cc b/source/blender/draw/engines/workbench/workbench_effect_outline.cc new file mode 100644 index 00000000000..4a060153618 --- /dev/null +++ b/source/blender/draw/engines/workbench/workbench_effect_outline.cc @@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later + * Copyright 2020 Blender Foundation. */ + +/** \file + * \ingroup draw_engine + * + * Outline Effect: + * + * Simple effect that just samples an object id buffer to detect objects outlines. + */ + +#include "workbench_private.hh" + +namespace blender::workbench { + +void OutlinePass::init(const SceneState &scene_state) +{ + enabled_ = scene_state.draw_outline; + if (!enabled_) { + return; + } + + if (sh_ == nullptr) { + sh_ = GPU_shader_create_from_info_name("workbench_effect_outline"); + } +} + +void OutlinePass::sync(SceneResources &resources) +{ + if (!enabled_) { + return; + } + + ps_.init(); + ps_.state_set(DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA_PREMUL); + ps_.shader_set(sh_); + ps_.bind_ubo("world_data", resources.world_buf); + ps_.bind_texture("objectIdBuffer", &resources.object_id_tx); + ps_.draw_procedural(GPU_PRIM_TRIS, 1, 3); +} + +void OutlinePass::draw(Manager &manager, View &view, SceneResources &resources, int2 resolution) +{ + if (!enabled_) { + return; + } + + fb_.ensure(GPU_ATTACHMENT_NONE, GPU_ATTACHMENT_TEXTURE(resources.color_tx)); + fb_.bind(); + manager.submit(ps_); +} + +} // namespace blender::workbench diff --git a/source/blender/draw/engines/workbench/workbench_engine.cc b/source/blender/draw/engines/workbench/workbench_engine.cc new file mode 100644 index 00000000000..74615a29320 --- /dev/null +++ b/source/blender/draw/engines/workbench/workbench_engine.cc @@ -0,0 +1,526 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include "BKE_editmesh.h" +#include "BKE_modifier.h" +#include "BKE_object.h" +#include "BKE_paint.h" +#include "BKE_particle.h" +#include "BKE_pbvh.h" +#include "DEG_depsgraph_query.h" +#include "DNA_fluid_types.h" +#include "ED_paint.h" +#include "ED_view3d.h" +#include "GPU_capabilities.h" + +#include "workbench_private.hh" + +namespace blender::workbench { + +using namespace draw; + +// Utils +GPUMaterial **get_dummy_gpu_materials(int material_count); + +class Instance { + public: + SceneState scene_state; + + SceneResources resources; + + OpaquePass opaque_ps; + TransparentPass transparent_ps; + TransparentDepthPass transparent_depth_ps; + + OutlinePass outline_ps; + DofPass dof_ps; + AntiAliasingPass anti_aliasing_ps; + + void init() + { + scene_state.init(); + resources.init(scene_state); + + outline_ps.init(scene_state); + dof_ps.init(scene_state); + anti_aliasing_ps.init(scene_state); + } + + void begin_sync() + { + opaque_ps.sync(scene_state, resources); + transparent_ps.sync(scene_state, resources); + transparent_depth_ps.sync(scene_state, resources); + + outline_ps.sync(resources); + dof_ps.sync(resources); + anti_aliasing_ps.sync(resources, scene_state.resolution); + } + + void end_sync() + { + resources.material_buf.push_update(); + } + + void object_sync(Manager &manager, ObjectRef &ob_ref) + { + if (scene_state.render_finished) { + return; + } + + Object *ob = ob_ref.object; + if (!DRW_object_is_renderable(ob)) { + return; + } + + const ObjectState object_state = ObjectState(scene_state, ob); + + /* Needed for mesh cache validation, to prevent two copies of + * of vertex color arrays from being sent to the GPU (e.g. + * when switching from eevee to workbench). + */ + if (ob_ref.object->sculpt && ob_ref.object->sculpt->pbvh) { + BKE_pbvh_is_drawing_set(ob_ref.object->sculpt->pbvh, object_state.sculpt_pbvh); + } + + if (ob->type == OB_MESH && ob->modifiers.first != nullptr) { + + LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { + if (md->type != eModifierType_ParticleSystem) { + continue; + } + ParticleSystem *psys = ((ParticleSystemModifierData *)md)->psys; + if (!DRW_object_is_visible_psys_in_active_context(ob, psys)) { + continue; + } + ParticleSettings *part = psys->part; + const int draw_as = (part->draw_as == PART_DRAW_REND) ? part->ren_as : part->draw_as; + + if (draw_as == PART_DRAW_PATH) { + /* TODO(Miguel Pozo): + workbench_cache_hair_populate( + wpd, ob, psys, md, object_state.color_type, object_state.texture_paint_mode, + part->omat); + */ + } + } + } + + if (!(ob->base_flag & BASE_FROM_DUPLI)) { + ModifierData *md = BKE_modifiers_findby_type(ob, eModifierType_Fluid); + if (md && BKE_modifier_is_enabled(scene_state.scene, md, eModifierMode_Realtime)) { + FluidModifierData *fmd = (FluidModifierData *)md; + if (fmd->domain) { + /* TODO(Miguel Pozo): + workbench_volume_cache_populate(vedata, wpd->scene, ob, md, V3D_SHADING_SINGLE_COLOR); + */ + if (fmd->domain->type == FLUID_DOMAIN_TYPE_GAS) { + return; /* Do not draw solid in this case. */ + } + } + } + } + + if (!(DRW_object_visibility_in_active_context(ob) & OB_VISIBLE_SELF)) { + return; + } + + if ((ob->dt < OB_SOLID) && !DRW_state_is_scene_render()) { + return; + } + + if (ELEM(ob->type, OB_MESH, OB_POINTCLOUD)) { + mesh_sync(manager, ob_ref, object_state); + } + else if (ob->type == OB_CURVES) { + /* TODO(Miguel Pozo): + DRWShadingGroup *grp = workbench_material_hair_setup( + wpd, ob, CURVES_MATERIAL_NR, object_state.color_type); + DRW_shgroup_curves_create_sub(ob, grp, NULL); + */ + } + else if (ob->type == OB_VOLUME) { + if (scene_state.shading.type != OB_WIRE) { + /* TODO(Miguel Pozo): + workbench_volume_cache_populate(vedata, wpd->scene, ob, NULL, object_state.color_type); + */ + } + } + } + + void mesh_sync(Manager &manager, ObjectRef &ob_ref, const ObjectState &object_state) + { + if (object_state.sculpt_pbvh) { + /* TODO(Miguel Pozo): + workbench_cache_sculpt_populate(wpd, ob, object_state.color_type); + */ + } + else { + /* workbench_cache_common_populate && workbench_cache_texpaint_populate */ + if (object_state.use_per_material_batches) { + const int material_count = DRW_cache_object_material_count_get(ob_ref.object); + + struct GPUBatch **batches; + if (object_state.color_type == V3D_SHADING_TEXTURE_COLOR) { + batches = DRW_cache_mesh_surface_texpaint_get(ob_ref.object); + } + else { + batches = DRW_cache_object_surface_material_get( + ob_ref.object, get_dummy_gpu_materials(material_count), material_count); + } + + if (batches) { + for (auto i : IndexRange(material_count)) { + if (batches[i] == nullptr) { + continue; + } + /* TODO(fclem): This create a cull-able instance for each sub-object. This is done + * for simplicity to reduce complexity. But this increase the overhead per object. + * Instead, we should use an indirection buffer to the material buffer. */ + + ResourceHandle handle = manager.resource_handle(ob_ref); + Material &mat = resources.material_buf.get_or_resize(handle.resource_index()); + + if (::Material *_mat = BKE_object_material_get_eval(ob_ref.object, i + 1)) { + mat = Material(*_mat); + } + else { + mat = Material(*BKE_material_default_empty()); + } + + ::Image *image = nullptr; + ImageUser *iuser = nullptr; + eGPUSamplerState sampler_state = eGPUSamplerState::GPU_SAMPLER_DEFAULT; + if (object_state.color_type == V3D_SHADING_TEXTURE_COLOR) { + get_material_image(ob_ref.object, i + 1, image, iuser, sampler_state); + } + + draw_mesh(ob_ref, mat, batches[i], handle, image, sampler_state, iuser); + } + } + } + else { + struct GPUBatch *batch; + if (object_state.color_type == V3D_SHADING_TEXTURE_COLOR) { + batch = DRW_cache_mesh_surface_texpaint_single_get(ob_ref.object); + } + else if (object_state.color_type == V3D_SHADING_VERTEX_COLOR) { + if (ob_ref.object->mode & OB_MODE_VERTEX_PAINT) { + batch = DRW_cache_mesh_surface_vertpaint_get(ob_ref.object); + } + else { + batch = DRW_cache_mesh_surface_sculptcolors_get(ob_ref.object); + } + } + else { + batch = DRW_cache_object_surface_get(ob_ref.object); + } + + if (batch) { + ResourceHandle handle = manager.resource_handle(ob_ref); + Material &mat = resources.material_buf.get_or_resize(handle.resource_index()); + + if (object_state.color_type == V3D_SHADING_OBJECT_COLOR) { + mat = Material(*ob_ref.object); + } + else if (object_state.color_type == V3D_SHADING_RANDOM_COLOR) { + mat = Material(*ob_ref.object, true); + } + else if (object_state.color_type == V3D_SHADING_SINGLE_COLOR) { + mat = scene_state.material_override; + } + else if (object_state.color_type == V3D_SHADING_VERTEX_COLOR) { + mat = scene_state.material_attribute_color; + } + else { + mat = Material(*BKE_material_default_empty()); + } + + draw_mesh(ob_ref, + mat, + batch, + handle, + object_state.image_paint_override, + object_state.override_sampler_state); + } + } + } + + if (object_state.draw_shadow) { + /* TODO(Miguel Pozo): + workbench_shadow_cache_populate(vedata, ob, has_transp_mat); + */ + } + } + + void draw_mesh(ObjectRef &ob_ref, + Material &material, + GPUBatch *batch, + ResourceHandle handle, + ::Image *image = nullptr, + eGPUSamplerState sampler_state = GPU_SAMPLER_DEFAULT, + ImageUser *iuser = nullptr) + { + const bool in_front = (ob_ref.object->dtx & OB_DRAW_IN_FRONT) != 0; + + auto draw = [&](MeshPass &pass) { + pass.sub_pass_get(ob_ref, image, sampler_state, iuser).draw(batch, handle); + }; + + if (scene_state.xray_mode || material.is_transparent()) { + if (in_front) { + draw(transparent_ps.accumulation_in_front_ps_); + if (scene_state.draw_transparent_depth) { + draw(transparent_depth_ps.in_front_ps_); + } + } + else { + draw(transparent_ps.accumulation_ps_); + if (scene_state.draw_transparent_depth) { + draw(transparent_depth_ps.main_ps_); + } + } + } + else { + if (in_front) { + draw(opaque_ps.gbuffer_in_front_ps_); + } + else { + draw(opaque_ps.gbuffer_ps_); + } + } + } + + void draw(Manager &manager, View &view, GPUTexture *depth_tx, GPUTexture *color_tx) + { + int2 resolution = scene_state.resolution; + + if (scene_state.render_finished) { + /* Just copy back the already rendered result */ + anti_aliasing_ps.draw(manager, view, resources, resolution, depth_tx, color_tx); + return; + } + + anti_aliasing_ps.setup_view(view, resolution); + + resources.color_tx.acquire(resolution, GPU_RGBA16F); + resources.color_tx.clear(resources.world_buf.background_color); + if (scene_state.draw_object_id) { + resources.object_id_tx.acquire(resolution, GPU_R16UI); + resources.object_id_tx.clear(uint4(0)); + } + + resources.depth_tx.acquire(resolution, GPU_DEPTH24_STENCIL8); + Framebuffer fb = Framebuffer("Workbench.Clear"); + fb.ensure(GPU_ATTACHMENT_TEXTURE(resources.depth_tx)); + fb.bind(); + GPU_framebuffer_clear_depth_stencil(fb, 1.0f, 0x00); + + if (!transparent_ps.accumulation_in_front_ps_.is_empty()) { + resources.depth_in_front_tx.acquire(resolution, GPU_DEPTH24_STENCIL8); + if (opaque_ps.gbuffer_in_front_ps_.is_empty()) { + /* Clear only if it wont be overwitten by opaque_ps */ + Framebuffer fb = Framebuffer("Workbench.Clear"); + fb.ensure(GPU_ATTACHMENT_TEXTURE(resources.depth_in_front_tx)); + fb.bind(); + GPU_framebuffer_clear_depth_stencil(fb, 1.0f, 0x00); + } + } + + opaque_ps.draw(manager, view, resources, resolution); + transparent_ps.draw(manager, view, resources, resolution); + transparent_depth_ps.draw(manager, view, resources, resolution); + + // volume_ps.draw_prepass(manager, view, resources.depth_tx); + + outline_ps.draw(manager, view, resources, resolution); + dof_ps.draw(manager, view, resources, resolution); + anti_aliasing_ps.draw(manager, view, resources, resolution, depth_tx, color_tx); + + resources.color_tx.release(); + resources.object_id_tx.release(); + resources.depth_tx.release(); + resources.depth_in_front_tx.release(); + } + + void draw_viewport(Manager &manager, View &view, GPUTexture *depth_tx, GPUTexture *color_tx) + { + this->draw(manager, view, depth_tx, color_tx); + + if (scene_state.sample + 1 < scene_state.samples_len) { + DRW_viewport_request_redraw(); + } + } +}; + +// Utils + +/* This returns an array of nullptr GPUMaterial pointers so we can call + * DRW_cache_object_surface_material_get. They never get actually used. + */ +GPUMaterial **get_dummy_gpu_materials(int material_count) +{ + static Vector<GPUMaterial *> dummy_gpu_materials(1, nullptr, {}); + if (material_count > dummy_gpu_materials.size()) { + dummy_gpu_materials.resize(material_count, nullptr); + } + return dummy_gpu_materials.begin(); +}; + +} // namespace blender::workbench + +/* -------------------------------------------------------------------- */ +/** \name Interface with legacy C DRW manager + * \{ */ + +using namespace blender; + +struct WORKBENCH_Data { + DrawEngineType *engine_type; + DRWViewportEmptyList *fbl; + DRWViewportEmptyList *txl; + DRWViewportEmptyList *psl; + DRWViewportEmptyList *stl; + workbench::Instance *instance; + + char info[GPU_INFO_SIZE]; +}; + +static void workbench_engine_init(void *vedata) +{ + /* TODO(fclem): Remove once it is minimum required. */ + if (!GPU_shader_storage_buffer_objects_support()) { + return; + } + + WORKBENCH_Data *ved = reinterpret_cast<WORKBENCH_Data *>(vedata); + if (ved->instance == nullptr) { + ved->instance = new workbench::Instance(); + } + + ved->instance->init(); +} + +static void workbench_cache_init(void *vedata) +{ + if (!GPU_shader_storage_buffer_objects_support()) { + return; + } + reinterpret_cast<WORKBENCH_Data *>(vedata)->instance->begin_sync(); +} + +static void workbench_cache_populate(void *vedata, Object *object) +{ + if (!GPU_shader_storage_buffer_objects_support()) { + return; + } + draw::Manager *manager = DRW_manager_get(); + + draw::ObjectRef ref; + ref.object = object; + ref.dupli_object = DRW_object_get_dupli(object); + ref.dupli_parent = DRW_object_get_dupli_parent(object); + + reinterpret_cast<WORKBENCH_Data *>(vedata)->instance->object_sync(*manager, ref); +} + +static void workbench_cache_finish(void *vedata) +{ + if (!GPU_shader_storage_buffer_objects_support()) { + return; + } + reinterpret_cast<WORKBENCH_Data *>(vedata)->instance->end_sync(); +} + +static void workbench_draw_scene(void *vedata) +{ + WORKBENCH_Data *ved = reinterpret_cast<WORKBENCH_Data *>(vedata); + if (!GPU_shader_storage_buffer_objects_support()) { + STRNCPY(ved->info, "Error: No shader storage buffer support"); + return; + } + DefaultTextureList *dtxl = DRW_viewport_texture_list_get(); + const DRWView *default_view = DRW_view_default_get(); + draw::Manager *manager = DRW_manager_get(); + draw::View view("DefaultView", default_view); + ved->instance->draw_viewport(*manager, view, dtxl->depth, dtxl->color); +} + +static void workbench_instance_free(void *instance) +{ + if (!GPU_shader_storage_buffer_objects_support()) { + return; + } + delete reinterpret_cast<workbench::Instance *>(instance); +} + +static void workbench_view_update(void *vedata) +{ + WORKBENCH_Data *ved = reinterpret_cast<WORKBENCH_Data *>(vedata); + if (ved->instance) { + ved->instance->scene_state.reset_taa_next_sample = true; + } +} + +static void workbench_id_update(void *vedata, struct ID *id) +{ + UNUSED_VARS(vedata, id); +} + +static void workbench_render_to_image(void *vedata, + struct RenderEngine *engine, + struct RenderLayer *layer, + const struct rcti *UNUSED(rect)) +{ + UNUSED_VARS(vedata, engine, layer); +} + +static void workbench_render_update_passes(RenderEngine *engine, + Scene *scene, + ViewLayer *view_layer) +{ + RE_engine_register_pass(engine, scene, view_layer, RE_PASSNAME_COMBINED, 4, "RGBA", SOCK_RGBA); +} + +extern "C" { + +static const DrawEngineDataSize workbench_data_size = DRW_VIEWPORT_DATA_SIZE(WORKBENCH_Data); + +DrawEngineType draw_engine_workbench_next = { + nullptr, + nullptr, + N_("Workbench"), + &workbench_data_size, + &workbench_engine_init, + nullptr, + &workbench_instance_free, + &workbench_cache_init, + &workbench_cache_populate, + &workbench_cache_finish, + &workbench_draw_scene, + &workbench_view_update, + &workbench_id_update, + &workbench_render_to_image, + nullptr, +}; + +RenderEngineType DRW_engine_viewport_workbench_next_type = { + nullptr, + nullptr, + "BLENDER_WORKBENCH_NEXT", + N_("Workbench Next"), + RE_INTERNAL | RE_USE_STEREO_VIEWPORT | RE_USE_GPU_CONTEXT, + nullptr, + &DRW_render_to_image, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + &workbench_render_update_passes, + &draw_engine_workbench_next, + {nullptr, nullptr, nullptr}, +}; +} + +/** \} */ diff --git a/source/blender/draw/engines/workbench/workbench_engine.h b/source/blender/draw/engines/workbench/workbench_engine.h index 6f6f2143868..1b48acd8054 100644 --- a/source/blender/draw/engines/workbench/workbench_engine.h +++ b/source/blender/draw/engines/workbench/workbench_engine.h @@ -8,3 +8,4 @@ #pragma once extern RenderEngineType DRW_engine_viewport_workbench_type; +extern RenderEngineType DRW_engine_viewport_workbench_next_type; diff --git a/source/blender/draw/engines/workbench/workbench_enums.hh b/source/blender/draw/engines/workbench/workbench_enums.hh new file mode 100644 index 00000000000..56f0c3accee --- /dev/null +++ b/source/blender/draw/engines/workbench/workbench_enums.hh @@ -0,0 +1,96 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include "BLI_assert.h" +#include "DNA_object_types.h" +#include "DNA_view3d_enums.h" + +namespace blender::workbench { + +enum class eGeometryType { + MESH = 0, + CURVES, + POINTCLOUD, +}; +static constexpr int geometry_type_len = static_cast<int>(eGeometryType::POINTCLOUD) + 1; + +static inline const char *get_name(eGeometryType type) +{ + switch (type) { + case eGeometryType::MESH: + return "Mesh"; + case eGeometryType::CURVES: + return "Curves"; + case eGeometryType::POINTCLOUD: + return "PointCloud"; + default: + BLI_assert_unreachable(); + return ""; + } +} + +static inline eGeometryType geometry_type_from_object(Object *ob) +{ + switch (ob->type) { + case OB_CURVES: + return eGeometryType::CURVES; + case OB_POINTCLOUD: + return eGeometryType::POINTCLOUD; + default: + return eGeometryType::MESH; + } +} + +enum class ePipelineType { + OPAQUE = 0, + TRANSPARENT, + SHADOW, +}; +static constexpr int pipeline_type_len = static_cast<int>(ePipelineType::SHADOW) + 1; + +enum class eLightingType { + FLAT = 0, + STUDIO, + MATCAP, +}; +static constexpr int lighting_type_len = static_cast<int>(eLightingType::MATCAP) + 1; + +static inline eLightingType lighting_type_from_v3d_lighting(char lighting) +{ + switch (lighting) { + case V3D_LIGHTING_FLAT: + return eLightingType::FLAT; + case V3D_LIGHTING_MATCAP: + return eLightingType::MATCAP; + case V3D_LIGHTING_STUDIO: + return eLightingType::STUDIO; + default: + BLI_assert_unreachable(); + return static_cast<eLightingType>(-1); + } +} + +enum class eShaderType { + MATERIAL = 0, + TEXTURE, +}; +static constexpr int shader_type_len = static_cast<int>(eShaderType::TEXTURE) + 1; + +static inline eShaderType shader_type_from_v3d_shading(char shading) +{ + return shading == V3D_SHADING_TEXTURE_COLOR ? eShaderType::TEXTURE : eShaderType::MATERIAL; +} + +static inline const char *get_name(eShaderType type) +{ + switch (type) { + case eShaderType::MATERIAL: + return "Material"; + case eShaderType::TEXTURE: + return "Texture"; + default: + BLI_assert_unreachable(); + return ""; + } +} + +} // namespace blender::workbench diff --git a/source/blender/draw/engines/workbench/workbench_materials.cc b/source/blender/draw/engines/workbench/workbench_materials.cc new file mode 100644 index 00000000000..8e49af04b02 --- /dev/null +++ b/source/blender/draw/engines/workbench/workbench_materials.cc @@ -0,0 +1,94 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include "workbench_private.hh" + +#include "BLI_hash.h" +/* get_image */ +#include "DNA_node_types.h" +#include "ED_uvedit.h" +//#include "BKE_image.h" +#include "BKE_node.h" +/* get_image */ + +namespace blender::workbench { + +Material::Material() = default; + +Material::Material(float3 color) +{ + base_color = color; + packed_data = Material::pack_data(0.0f, 0.4f, 1.0f); +} + +Material::Material(::Object &ob, bool random) +{ + if (random) { + uint hash = BLI_ghashutil_strhash_p_murmur(ob.id.name); + if (ob.id.lib) { + hash = (hash * 13) ^ BLI_ghashutil_strhash_p_murmur(ob.id.lib->filepath); + } + float3 hsv = float3(BLI_hash_int_01(hash), 0.5f, 0.8f); + hsv_to_rgb_v(hsv, base_color); + } + else { + base_color = ob.color; + } + packed_data = Material::pack_data(0.0f, 0.4f, ob.color[3]); +} + +Material::Material(::Material &mat) +{ + base_color = &mat.r; + packed_data = Material::pack_data(mat.metallic, mat.roughness, mat.a); +} + +bool Material::is_transparent() +{ + uint32_t full_alpha_ref = 0x00ff0000; + return (packed_data & full_alpha_ref) != full_alpha_ref; +} + +uint32_t Material::pack_data(float metallic, float roughness, float alpha) +{ + /* Remap to Disney roughness. */ + roughness = sqrtf(roughness); + uint32_t packed_roughness = unit_float_to_uchar_clamp(roughness); + uint32_t packed_metallic = unit_float_to_uchar_clamp(metallic); + uint32_t packed_alpha = unit_float_to_uchar_clamp(alpha); + return (packed_alpha << 16u) | (packed_roughness << 8u) | packed_metallic; +} + +void get_material_image(Object *ob, + int material_index, + ::Image *&image, + ImageUser *&iuser, + eGPUSamplerState &sampler_state) +{ + ::bNode *node = nullptr; + + ED_object_get_active_image(ob, material_index, &image, &iuser, &node, nullptr); + if (node && image) { + switch (node->type) { + case SH_NODE_TEX_IMAGE: { + NodeTexImage *storage = static_cast<NodeTexImage *>(node->storage); + const bool use_filter = (storage->interpolation != SHD_INTERP_CLOSEST); + const bool use_repeat = (storage->extension == SHD_IMAGE_EXTENSION_REPEAT); + const bool use_clip = (storage->extension == SHD_IMAGE_EXTENSION_CLIP); + SET_FLAG_FROM_TEST(sampler_state, use_filter, GPU_SAMPLER_FILTER); + SET_FLAG_FROM_TEST(sampler_state, use_repeat, GPU_SAMPLER_REPEAT); + SET_FLAG_FROM_TEST(sampler_state, use_clip, GPU_SAMPLER_CLAMP_BORDER); + break; + } + case SH_NODE_TEX_ENVIRONMENT: { + NodeTexEnvironment *storage = static_cast<NodeTexEnvironment *>(node->storage); + const bool use_filter = (storage->interpolation != SHD_INTERP_CLOSEST); + SET_FLAG_FROM_TEST(sampler_state, use_filter, GPU_SAMPLER_FILTER); + break; + } + default: + BLI_assert_msg(0, "Node type not supported by workbench"); + } + } +} + +} // namespace blender::workbench diff --git a/source/blender/draw/engines/workbench/workbench_mesh_passes.cc b/source/blender/draw/engines/workbench/workbench_mesh_passes.cc new file mode 100644 index 00000000000..32d5f77cac9 --- /dev/null +++ b/source/blender/draw/engines/workbench/workbench_mesh_passes.cc @@ -0,0 +1,322 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include "workbench_private.hh" + +namespace blender::workbench { + +MeshPass::MeshPass(const char *name) : PassMain(name){}; + +/* Move to draw::Pass */ +bool MeshPass::is_empty() const +{ + return is_empty_; +} + +void MeshPass::init_pass(SceneResources &resources, DRWState state, int clip_planes) +{ + is_empty_ = true; + PassMain::init(); + state_set(state, clip_planes); + bind_texture(WB_MATCAP_SLOT, resources.matcap_tx); + bind_ssbo(WB_MATERIAL_SLOT, &resources.material_buf); + bind_ubo(WB_WORLD_SLOT, resources.world_buf); + if (clip_planes > 0) { + bind_ubo(DRW_CLIPPING_UBO_SLOT, resources.clip_planes_buf); + } +} + +void MeshPass::init_subpasses(ePipelineType pipeline, + eLightingType lighting, + bool clip, + ShaderCache &shaders) +{ + texture_subpass_map_.clear(); + + for (auto geom : IndexRange(geometry_type_len)) { + for (auto shader : IndexRange(shader_type_len)) { + eGeometryType geom_type = static_cast<eGeometryType>(geom); + eShaderType shader_type = static_cast<eShaderType>(shader); + std::string name = std::string(get_name(geom_type)) + std::string(get_name(shader_type)); + GPUShader *sh = shaders.prepass_shader_get(pipeline, geom_type, shader_type, lighting, clip); + PassMain::Sub *pass = &sub(name.c_str()); + pass->shader_set(sh); + passes_[geom][shader] = pass; + } + } +} + +PassMain::Sub &MeshPass::sub_pass_get(ObjectRef &ref, + ::Image *image /* = nullptr */, + eGPUSamplerState sampler_state /* = GPU_SAMPLER_DEFAULT */, + ImageUser *iuser /* = nullptr */) +{ + /*TODO(Miguel Pozo): For now we assume retrieving a subpass means it's not empty anymore*/ + is_empty_ = false; + + eGeometryType geometry_type = geometry_type_from_object(ref.object); + if (image) { + GPUTexture *texture = nullptr; + GPUTexture *tilemap = nullptr; + if (image->source == IMA_SRC_TILED) { + texture = BKE_image_get_gpu_tiles(image, iuser, nullptr); + tilemap = BKE_image_get_gpu_tilemap(image, iuser, nullptr); + } + else { + texture = BKE_image_get_gpu_texture(image, iuser, nullptr); + } + if (texture) { + auto add_cb = [&] { + PassMain::Sub *sub_pass = + passes_[static_cast<int>(geometry_type)][static_cast<int>(eShaderType::TEXTURE)]; + sub_pass = &sub_pass->sub(image->id.name); + if (tilemap) { + sub_pass->bind_texture(WB_TILE_ARRAY_SLOT, texture, sampler_state); + sub_pass->bind_texture(WB_TILE_DATA_SLOT, tilemap); + } + else { + sub_pass->bind_texture(WB_TEXTURE_SLOT, texture, sampler_state); + } + sub_pass->push_constant("isImageTile", tilemap != nullptr); + sub_pass->push_constant("imagePremult", image && image->alpha_mode == IMA_ALPHA_PREMUL); + /* TODO(Miguel Pozo): This setting should be exposed on the user side, + * either as a global parameter (and set it here) + * or by reading the Material Clipping Threshold (and set it per material) */ + sub_pass->push_constant("imageTransparencyCutoff", 0.1f); + return sub_pass; + }; + + return *texture_subpass_map_.lookup_or_add_cb(TextureSubPassKey(texture, geometry_type), + add_cb); + } + } + return *passes_[static_cast<int>(geometry_type)][static_cast<int>(eShaderType::MATERIAL)]; +} + +void OpaquePass::sync(const SceneState &scene_state, SceneResources &resources) +{ + DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | + scene_state.cull_state; + + bool clip = scene_state.clip_planes.size() > 0; + + DRWState in_front_state = state | DRW_STATE_WRITE_STENCIL | DRW_STATE_STENCIL_ALWAYS; + gbuffer_in_front_ps_.init_pass(resources, in_front_state, scene_state.clip_planes.size()); + gbuffer_in_front_ps_.state_stencil(0xFF, 0xFF, 0x00); + gbuffer_in_front_ps_.init_subpasses( + ePipelineType::OPAQUE, scene_state.lighting_type, clip, resources.shader_cache); + + state |= DRW_STATE_STENCIL_NEQUAL; + gbuffer_ps_.init_pass(resources, state, scene_state.clip_planes.size()); + gbuffer_ps_.state_stencil(0x00, 0xFF, 0xFF); + gbuffer_ps_.init_subpasses( + ePipelineType::OPAQUE, scene_state.lighting_type, clip, resources.shader_cache); + + deferred_ps_.init(); + deferred_ps_.shader_set(resources.shader_cache.resolve_shader_get(ePipelineType::OPAQUE, + scene_state.lighting_type, + scene_state.draw_cavity, + scene_state.draw_curvature)); + deferred_ps_.bind_ubo(WB_WORLD_SLOT, resources.world_buf); + deferred_ps_.bind_texture(WB_MATCAP_SLOT, resources.matcap_tx); + deferred_ps_.bind_texture("normal_tx", &gbuffer_normal_tx); + deferred_ps_.bind_texture("material_tx", &gbuffer_material_tx); + deferred_ps_.bind_texture("depth_tx", &resources.depth_tx); + deferred_ps_.bind_image("out_color_img", &resources.color_tx); + resources.cavity.setup_resolve_pass(deferred_ps_, resources); + deferred_ps_.dispatch(math::divide_ceil(scene_state.resolution, int2(WB_RESOLVE_GROUP_SIZE))); + deferred_ps_.barrier(GPU_BARRIER_TEXTURE_FETCH); +} + +void OpaquePass::draw(Manager &manager, View &view, SceneResources &resources, int2 resolution) +{ + if (is_empty()) { + return; + } + gbuffer_material_tx.acquire(resolution, GPU_RGBA16F); + gbuffer_normal_tx.acquire(resolution, GPU_RG16F); + + GPUAttachment object_id_attachment = GPU_ATTACHMENT_NONE; + if (resources.object_id_tx.is_valid()) { + object_id_attachment = GPU_ATTACHMENT_TEXTURE(resources.object_id_tx); + } + + if (!gbuffer_in_front_ps_.is_empty()) { + opaque_fb.ensure(GPU_ATTACHMENT_TEXTURE(resources.depth_tx), + GPU_ATTACHMENT_TEXTURE(gbuffer_material_tx), + GPU_ATTACHMENT_TEXTURE(gbuffer_normal_tx), + object_id_attachment); + opaque_fb.bind(); + + manager.submit(gbuffer_in_front_ps_, view); + if (resources.depth_in_front_tx.is_valid()) { + /* Only needed when transparent infront is needed */ + GPU_texture_copy(resources.depth_in_front_tx, resources.depth_tx); + } + } + + if (!gbuffer_ps_.is_empty()) { + opaque_fb.ensure(GPU_ATTACHMENT_TEXTURE(resources.depth_tx), + GPU_ATTACHMENT_TEXTURE(gbuffer_material_tx), + GPU_ATTACHMENT_TEXTURE(gbuffer_normal_tx), + object_id_attachment); + opaque_fb.bind(); + + manager.submit(gbuffer_ps_, view); + } + + manager.submit(deferred_ps_, view); + + gbuffer_normal_tx.release(); + gbuffer_material_tx.release(); +} + +bool OpaquePass::is_empty() const +{ + return gbuffer_ps_.is_empty() && gbuffer_in_front_ps_.is_empty(); +} + +void TransparentPass::sync(const SceneState &scene_state, SceneResources &resources) +{ + DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND_OIT | + scene_state.cull_state; + + bool clip = scene_state.clip_planes.size() > 0; + + accumulation_ps_.init_pass( + resources, state | DRW_STATE_STENCIL_NEQUAL, scene_state.clip_planes.size()); + accumulation_ps_.state_stencil(0x00, 0xFF, 0xFF); + accumulation_ps_.clear_color(float4(0.0f, 0.0f, 0.0f, 1.0f)); + accumulation_ps_.init_subpasses( + ePipelineType::TRANSPARENT, scene_state.lighting_type, clip, resources.shader_cache); + + accumulation_in_front_ps_.init_pass(resources, state, scene_state.clip_planes.size()); + accumulation_in_front_ps_.clear_color(float4(0.0f, 0.0f, 0.0f, 1.0f)); + accumulation_in_front_ps_.init_subpasses( + ePipelineType::TRANSPARENT, scene_state.lighting_type, clip, resources.shader_cache); + + if (resolve_sh_ == nullptr) { + resolve_sh_ = GPU_shader_create_from_info_name("workbench_transparent_resolve"); + } + resolve_ps_.init(); + resolve_ps_.state_set(DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA); + resolve_ps_.shader_set(resolve_sh_); + resolve_ps_.bind_texture("transparentAccum", &accumulation_tx); + resolve_ps_.bind_texture("transparentRevealage", &reveal_tx); + resolve_ps_.draw_procedural(GPU_PRIM_TRIS, 1, 3); +} + +void TransparentPass::draw(Manager &manager, + View &view, + SceneResources &resources, + int2 resolution) +{ + if (is_empty()) { + return; + } + accumulation_tx.acquire(resolution, GPU_RGBA16F); + reveal_tx.acquire(resolution, GPU_R16F); + + resolve_fb.ensure(GPU_ATTACHMENT_NONE, GPU_ATTACHMENT_TEXTURE(resources.color_tx)); + + if (!accumulation_ps_.is_empty()) { + transparent_fb.ensure(GPU_ATTACHMENT_TEXTURE(resources.depth_tx), + GPU_ATTACHMENT_TEXTURE(accumulation_tx), + GPU_ATTACHMENT_TEXTURE(reveal_tx)); + transparent_fb.bind(); + manager.submit(accumulation_ps_, view); + resolve_fb.bind(); + manager.submit(resolve_ps_, view); + } + if (!accumulation_in_front_ps_.is_empty()) { + transparent_fb.ensure(GPU_ATTACHMENT_TEXTURE(resources.depth_in_front_tx), + GPU_ATTACHMENT_TEXTURE(accumulation_tx), + GPU_ATTACHMENT_TEXTURE(reveal_tx)); + transparent_fb.bind(); + manager.submit(accumulation_in_front_ps_, view); + resolve_fb.bind(); + manager.submit(resolve_ps_, view); + } + + accumulation_tx.release(); + reveal_tx.release(); +} + +bool TransparentPass::is_empty() const +{ + return accumulation_ps_.is_empty() && accumulation_in_front_ps_.is_empty(); +} + +void TransparentDepthPass::sync(const SceneState &scene_state, SceneResources &resources) +{ + DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | + scene_state.cull_state; + + bool clip = scene_state.clip_planes.size() > 0; + + DRWState in_front_state = state | DRW_STATE_WRITE_STENCIL | DRW_STATE_STENCIL_ALWAYS; + in_front_ps_.init_pass(resources, in_front_state, scene_state.clip_planes.size()); + in_front_ps_.state_stencil(0xFF, 0xFF, 0x00); + in_front_ps_.init_subpasses( + ePipelineType::OPAQUE, eLightingType::FLAT, clip, resources.shader_cache); + + if (merge_sh_ == nullptr) { + merge_sh_ = GPU_shader_create_from_info_name("workbench_next_merge_depth"); + } + merge_ps_.init(); + merge_ps_.shader_set(merge_sh_); + merge_ps_.state_set(DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_ALWAYS | DRW_STATE_WRITE_STENCIL | + DRW_STATE_STENCIL_ALWAYS); + merge_ps_.state_stencil(0xFF, 0xFF, 0x00); + merge_ps_.bind_texture("depth_tx", &resources.depth_in_front_tx); + merge_ps_.draw_procedural(GPU_PRIM_TRIS, 1, 3); + + state |= DRW_STATE_STENCIL_NEQUAL; + main_ps_.init_pass(resources, state, scene_state.clip_planes.size()); + main_ps_.state_stencil(0x00, 0xFF, 0xFF); + main_ps_.init_subpasses( + ePipelineType::OPAQUE, eLightingType::FLAT, clip, resources.shader_cache); +} + +void TransparentDepthPass::draw(Manager &manager, + View &view, + SceneResources &resources, + int2 resolution) +{ + if (is_empty()) { + return; + } + + GPUAttachment object_id_attachment = GPU_ATTACHMENT_NONE; + if (resources.object_id_tx.is_valid()) { + object_id_attachment = GPU_ATTACHMENT_TEXTURE(resources.object_id_tx); + } + + if (!in_front_ps_.is_empty()) { + in_front_fb.ensure(GPU_ATTACHMENT_TEXTURE(resources.depth_in_front_tx), + GPU_ATTACHMENT_NONE, + GPU_ATTACHMENT_NONE, + object_id_attachment); + in_front_fb.bind(); + manager.submit(in_front_ps_, view); + + merge_fb.ensure(GPU_ATTACHMENT_TEXTURE(resources.depth_tx)); + merge_fb.bind(); + manager.submit(merge_ps_, view); + } + + if (!main_ps_.is_empty()) { + main_fb.ensure(GPU_ATTACHMENT_TEXTURE(resources.depth_tx), + GPU_ATTACHMENT_NONE, + GPU_ATTACHMENT_NONE, + object_id_attachment); + main_fb.bind(); + manager.submit(main_ps_, view); + } +} + +bool TransparentDepthPass::is_empty() const +{ + return main_ps_.is_empty() && in_front_ps_.is_empty(); +} + +} // namespace blender::workbench diff --git a/source/blender/draw/engines/workbench/workbench_private.h b/source/blender/draw/engines/workbench/workbench_private.h index 4aedaf443b9..c6dbee68e58 100644 --- a/source/blender/draw/engines/workbench/workbench_private.h +++ b/source/blender/draw/engines/workbench/workbench_private.h @@ -200,8 +200,12 @@ typedef struct WORKBENCH_UBO_World { int matcap_orientation; int use_specular; /* Bools are 32bit ints in GLSL. */ - int _pad1; + float xray_alpha; /* Workbench Next */ int _pad2; + + /* Workbench Next data + * (Not used here, but needs to be kept in sync with workbench_shader_shared WorldData) */ + float background_color[4]; } WORKBENCH_UBO_World; BLI_STATIC_ASSERT_ALIGN(WORKBENCH_UBO_World, 16) diff --git a/source/blender/draw/engines/workbench/workbench_private.hh b/source/blender/draw/engines/workbench/workbench_private.hh new file mode 100644 index 00000000000..bdcceb5b1d4 --- /dev/null +++ b/source/blender/draw/engines/workbench/workbench_private.hh @@ -0,0 +1,349 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include "DRW_render.h" +#include "draw_manager.hh" +#include "draw_pass.hh" + +#include "workbench_defines.hh" +#include "workbench_enums.hh" +#include "workbench_shader_shared.h" + +namespace blender::workbench { + +using namespace draw; + +class ShaderCache { + private: + /* TODO(fclem): We might want to change to a Map since most shader will never be compiled. */ + GPUShader *prepass_shader_cache_[pipeline_type_len][geometry_type_len][shader_type_len] + [lighting_type_len][2] = {{{{{nullptr}}}}}; + GPUShader *resolve_shader_cache_[pipeline_type_len][lighting_type_len][2][2] = {{{{nullptr}}}}; + + public: + ~ShaderCache(); + + GPUShader *prepass_shader_get(ePipelineType pipeline_type, + eGeometryType geometry_type, + eShaderType shader_type, + eLightingType lighting_type, + bool clip); + + GPUShader *resolve_shader_get(ePipelineType pipeline_type, + eLightingType lighting_type, + bool cavity = false, + bool curvature = false); +}; + +struct Material { + float3 base_color; + /* Packed data into a int. Decoded in the shader. */ + uint packed_data; + + Material(); + Material(float3 color); + Material(::Object &ob, bool random = false); + Material(::Material &mat); + + bool is_transparent(); + + static uint32_t pack_data(float metallic, float roughness, float alpha); +}; + +void get_material_image(Object *ob, + int material_index, + ::Image *&image, + ImageUser *&iuser, + eGPUSamplerState &sampler_state); + +struct SceneState { + Scene *scene; + + Object *camera_object; + float4x4 view_projection_matrix; + int2 resolution; + + eContextObjectMode object_mode; + + View3DShading shading; + eLightingType lighting_type = eLightingType::STUDIO; + bool xray_mode; + + DRWState cull_state; + Vector<float4> clip_planes = {}; + + float4 background_color; + + bool draw_cavity; + bool draw_curvature; + bool draw_outline; + bool draw_dof; + bool draw_aa; + + bool draw_object_id; + bool draw_transparent_depth; + + int sample; + int samples_len; + bool reset_taa_next_sample; + bool render_finished; + + /** Used when material_type == eMaterialType::SINGLE */ + Material material_override = Material(float3(1.0f)); + /* When r == -1.0 the shader uses the vertex color */ + Material material_attribute_color = Material(float3(-1.0f)); + + void init(); +}; + +struct ObjectState { + eV3DShadingColorType color_type; + bool sculpt_pbvh; + bool texture_paint_mode; + ::Image *image_paint_override; + eGPUSamplerState override_sampler_state; + bool draw_shadow; + bool use_per_material_batches; + + ObjectState(const SceneState &scene_state, Object *ob); +}; + +class CavityEffect { + private: + int sample_; + int sample_count_; + bool curvature_enabled_; + bool cavity_enabled_; + + static const int max_samples_ = 512; // This value must be kept in sync with the one declared at + // workbench_composite_info.hh (cavity_samples) + UniformArrayBuffer<float4, max_samples_> samples_buf; + + void load_samples_buf(int ssao_samples); + + public: + void init(const SceneState &scene_state, struct SceneResources &resources); + + void setup_resolve_pass(PassSimple &pass, struct SceneResources &resources); +}; + +struct SceneResources { + ShaderCache shader_cache; + + StringRefNull current_matcap; + Texture matcap_tx = "matcap_tx"; + + TextureFromPool color_tx = "wb_color_tx"; + TextureFromPool object_id_tx = "wb_object_id_tx"; + TextureFromPool depth_tx = "wb_depth_tx"; + TextureFromPool depth_in_front_tx = "wb_depth_in_front_tx"; + + StorageVectorBuffer<Material> material_buf = {"material_buf"}; + UniformBuffer<WorldData> world_buf; + UniformArrayBuffer<float4, 6> clip_planes_buf; + + static const int jitter_tx_size = 64; + Texture jitter_tx = "wb_jitter_tx"; + void load_jitter_tx(int total_samples); + + CavityEffect cavity; + + void init(const SceneState &scene_state); +}; + +class MeshPass : public PassMain { + private: + PassMain::Sub *passes_[geometry_type_len][shader_type_len]; + + using TextureSubPassKey = std::pair<GPUTexture *, eGeometryType>; + Map<TextureSubPassKey, PassMain::Sub *> texture_subpass_map_; + + bool is_empty_; + + public: + MeshPass(const char *name); + + /* Move to draw::Pass */ + bool is_empty() const; + + void init_pass(SceneResources &resources, DRWState state, int clip_planes); + void init_subpasses(ePipelineType pipeline, + eLightingType lighting, + bool clip, + ShaderCache &shaders); + + PassMain::Sub &sub_pass_get( + ObjectRef &ref, + ::Image *image = nullptr, + eGPUSamplerState sampler_state = eGPUSamplerState::GPU_SAMPLER_DEFAULT, + ImageUser *iuser = nullptr); +}; + +class OpaquePass { + public: + TextureFromPool gbuffer_normal_tx = {"gbuffer_normal_tx"}; + TextureFromPool gbuffer_material_tx = {"gbuffer_material_tx"}; + Framebuffer opaque_fb; + + MeshPass gbuffer_ps_ = {"Opaque.Gbuffer"}; + MeshPass gbuffer_in_front_ps_ = {"Opaque.GbufferInFront"}; + PassSimple deferred_ps_ = {"Opaque.Deferred"}; + + void sync(const SceneState &scene_state, SceneResources &resources); + + void draw(Manager &manager, View &view, SceneResources &resources, int2 resolution); + + bool is_empty() const; +}; + +class TransparentPass { + private: + GPUShader *resolve_sh_; + + public: + TextureFromPool accumulation_tx = {"accumulation_accumulation_tx"}; + TextureFromPool reveal_tx = {"accumulation_reveal_tx"}; + Framebuffer transparent_fb; + + MeshPass accumulation_ps_ = {"Transparent.Accumulation"}; + MeshPass accumulation_in_front_ps_ = {"Transparent.AccumulationInFront"}; + PassSimple resolve_ps_ = {"Transparent.Resolve"}; + Framebuffer resolve_fb; + + void sync(const SceneState &scene_state, SceneResources &resources); + + void draw(Manager &manager, View &view, SceneResources &resources, int2 resolution); + + bool is_empty() const; +}; + +class TransparentDepthPass { + private: + GPUShader *merge_sh_; + + public: + MeshPass main_ps_ = {"TransparentDepth.Main"}; + Framebuffer main_fb = {"TransparentDepth.Main"}; + MeshPass in_front_ps_ = {"TransparentDepth.InFront"}; + Framebuffer in_front_fb = {"TransparentDepth.InFront"}; + PassSimple merge_ps_ = {"TransparentDepth.Merge"}; + Framebuffer merge_fb = {"TransparentDepth.Merge"}; + + void sync(const SceneState &scene_state, SceneResources &resources); + + void draw(Manager &manager, View &view, SceneResources &resources, int2 resolution); + + bool is_empty() const; +}; + +class OutlinePass { + bool enabled_; + + PassSimple ps_ = PassSimple("Workbench.Outline"); + GPUShader *sh_; + Framebuffer fb_ = Framebuffer("Workbench.Outline"); + + public: + void init(const SceneState &scene_state); + void sync(SceneResources &resources); + void draw(Manager &manager, View &view, SceneResources &resources, int2 resolution); +}; + +class DofPass { + bool enabled_; + + float offset_; + + static const int kernel_radius_ = 3; + static const int samples_len_ = (kernel_radius_ * 2 + 1) * (kernel_radius_ * 2 + 1); + + UniformArrayBuffer<float4, samples_len_> samples_buf_; + + Texture source_tx_; + Texture coc_halfres_tx_; + TextureFromPool blur_tx_; + + Framebuffer downsample_fb_, blur1_fb_, blur2_fb_, resolve_fb_; + + GPUShader *prepare_sh_, *downsample_sh_, *blur1_sh_, *blur2_sh_, *resolve_sh_; + + PassSimple down_ps_ = {"Workbench.DoF.DownSample"}; + PassSimple down2_ps_ = {"Workbench.DoF.DownSample2"}; + PassSimple blur_ps_ = {"Workbench.DoF.Blur"}; + PassSimple blur2_ps_ = {"Workbench.DoF.Blur2"}; + PassSimple resolve_ps_ = {"Workbench.DoF.Resolve"}; + + float aperture_size_; + float distance_; + float invsensor_size_; + float near_; + float far_; + float blades_; + float rotation_; + float ratio_; + + void setup_samples(); + + public: + void init(const SceneState &scene_state); + void sync(SceneResources &resources); + void draw(Manager &manager, View &view, SceneResources &resources, int2 resolution); + bool is_enabled(); +}; + +class AntiAliasingPass { + private: + bool enabled_; + /** Current TAA sample index in [0..samples_len_] range. */ + int sample_; + /** Total number of samples to after which TAA stops accumulating samples. */ + int samples_len_; + /** Weight accumulated. */ + float weight_accum_; + /** Samples weight for this iteration. */ + float weights_[9]; + /** Sum of weights. */ + float weights_sum_; + + Texture sample0_depth_tx_ = {"sample0_depth_tx"}; + + Texture taa_accumulation_tx_ = {"taa_accumulation_tx"}; + Texture smaa_search_tx_ = {"smaa_search_tx"}; + Texture smaa_area_tx_ = {"smaa_area_tx"}; + TextureFromPool smaa_edge_tx_ = {"smaa_edge_tx"}; + TextureFromPool smaa_weight_tx_ = {"smaa_weight_tx"}; + + Framebuffer taa_accumulation_fb_ = {"taa_accumulation_fb"}; + Framebuffer smaa_edge_fb_ = {"smaa_edge_fb"}; + Framebuffer smaa_weight_fb_ = {"smaa_weight_fb"}; + Framebuffer smaa_resolve_fb_ = {"smaa_resolve_fb"}; + + float4 smaa_viewport_metrics_ = {0.0f, 0.0f, 0.0f, 0.0f}; + float smaa_mix_factor_ = 0.0f; + + GPUShader *taa_accumulation_sh_ = nullptr; + GPUShader *smaa_edge_detect_sh_ = nullptr; + GPUShader *smaa_aa_weight_sh_ = nullptr; + GPUShader *smaa_resolve_sh_ = nullptr; + + PassSimple taa_accumulation_ps_ = {"TAA.Accumulation"}; + PassSimple smaa_edge_detect_ps_ = {"SMAA.EdgeDetect"}; + PassSimple smaa_aa_weight_ps_ = {"SMAA.BlendWeights"}; + PassSimple smaa_resolve_ps_ = {"SMAA.Resolve"}; + + public: + AntiAliasingPass(); + + ~AntiAliasingPass(); + + void init(const SceneState &scene_state); + void sync(SceneResources &resources, int2 resolution); + void setup_view(View &view, int2 resolution); + void draw(Manager &manager, + View &view, + SceneResources &resources, + int2 resolution, + GPUTexture *depth_tx, + GPUTexture *color_tx); +}; + +} // namespace blender::workbench diff --git a/source/blender/draw/engines/workbench/workbench_resources.cc b/source/blender/draw/engines/workbench/workbench_resources.cc new file mode 100644 index 00000000000..c890a5bdbb5 --- /dev/null +++ b/source/blender/draw/engines/workbench/workbench_resources.cc @@ -0,0 +1,172 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later + * Copyright 2020 Blender Foundation. */ + +#include "../eevee/eevee_lut.h" /* TODO: find somewhere to share blue noise Table. */ +#include "BKE_studiolight.h" +#include "IMB_imbuf_types.h" + +#include "workbench_private.hh" + +namespace blender::workbench { + +bool get_matcap_tx(Texture &matcap_tx, const StudioLight &studio_light) +{ + ImBuf *matcap_diffuse = studio_light.matcap_diffuse.ibuf; + ImBuf *matcap_specular = studio_light.matcap_specular.ibuf; + if (matcap_diffuse && matcap_diffuse->rect_float) { + int layers = 1; + float *buffer = matcap_diffuse->rect_float; + Vector<float> combined_buffer = {}; + + if (matcap_specular && matcap_specular->rect_float) { + int size = matcap_diffuse->x * matcap_diffuse->y * 4; + combined_buffer.extend(matcap_diffuse->rect_float, size); + combined_buffer.extend(matcap_specular->rect_float, size); + buffer = combined_buffer.begin(); + layers++; + } + + matcap_tx = Texture(studio_light.name, + GPU_RGBA16F, + int2(matcap_diffuse->x, matcap_diffuse->y), + layers, + buffer); + return true; + } + return false; +} + +float4x4 get_world_shading_rotation_matrix(float studiolight_rot_z) +{ + /* TODO(Miguel Pozo) C++ API ? */ + float V[4][4], R[4][4]; + DRW_view_viewmat_get(nullptr, V, false); + axis_angle_to_mat4_single(R, 'Z', -studiolight_rot_z); + mul_m4_m4m4(R, V, R); + swap_v3_v3(R[2], R[1]); + negate_v3(R[2]); + return float4x4(R); +} + +LightData get_light_data_from_studio_solidlight(const SolidLight *sl, + float4x4 world_shading_rotation) +{ + LightData light = {}; + if (sl && sl->flag) { + float3 direction = world_shading_rotation.ref_3x3() * float3(sl->vec); + light.direction = float4(direction, 0.0f); + /* We should pre-divide the power by PI but that makes the lights really dim. */ + light.specular_color = float4(float3(sl->spec), 0.0f); + light.diffuse_color_wrap = float4(float3(sl->col), sl->smooth); + } + else { + light.direction = float4(1.0f, 0.0f, 0.0f, 0.0f); + light.specular_color = float4(0.0f); + light.diffuse_color_wrap = float4(0.0f); + } + return light; +} + +void SceneResources::load_jitter_tx(int total_samples) +{ + printf("Load jitter | total samples: %d\n", total_samples); + const int texel_count = jitter_tx_size * jitter_tx_size; + static float4 jitter[texel_count]; + + const float total_samples_inv = 1.0f / total_samples; + + /* Create blue noise jitter texture */ + for (int i = 0; i < texel_count; i++) { + float phi = blue_noise[i][0] * 2.0f * M_PI; + /* This rotate the sample per pixels */ + jitter[i].x = cosf(phi); + jitter[i].y = sinf(phi); + /* This offset the sample along its direction axis (reduce banding) */ + float bn = blue_noise[i][1] - 0.5f; + bn = clamp_f(bn, -0.499f, 0.499f); /* fix fireflies */ + jitter[i].z = bn * total_samples_inv; + jitter[i].w = blue_noise[i][1]; + } + + jitter_tx.free(); + jitter_tx.ensure_2d(GPU_RGBA16F, int2(jitter_tx_size), jitter[0]); +} + +void SceneResources::init(const SceneState &scene_state) +{ + const View3DShading &shading = scene_state.shading; + + world_buf.viewport_size = DRW_viewport_size_get(); + world_buf.viewport_size_inv = DRW_viewport_invert_size_get(); + world_buf.xray_alpha = shading.xray_alpha; + world_buf.background_color = scene_state.background_color; + world_buf.object_outline_color = float4(float3(shading.object_outline_color), 1.0f); + world_buf.ui_scale = DRW_state_is_image_render() ? 1.0f : G_draw.block.size_pixel; + world_buf.matcap_orientation = (shading.flag & V3D_SHADING_MATCAP_FLIP_X) != 0; + + StudioLight *studio_light = nullptr; + if (U.edit_studio_light) { + studio_light = BKE_studiolight_studio_edit_get(); + } + else { + if (shading.light == V3D_LIGHTING_MATCAP) { + studio_light = BKE_studiolight_find(shading.matcap, STUDIOLIGHT_TYPE_MATCAP); + if (studio_light && studio_light->name != current_matcap) { + if (get_matcap_tx(matcap_tx, *studio_light)) { + current_matcap = studio_light->name; + } + } + } + /* If matcaps are missing, use this as fallback. */ + if (studio_light == nullptr) { + studio_light = BKE_studiolight_find(shading.studio_light, STUDIOLIGHT_TYPE_STUDIO); + } + } + if (!matcap_tx.is_valid()) { + matcap_tx.ensure_2d_array(GPU_RGBA16F, int2(1), 1); + } + + float4x4 world_shading_rotation = float4x4::identity(); + if (shading.flag & V3D_SHADING_WORLD_ORIENTATION) { + world_shading_rotation = get_world_shading_rotation_matrix(shading.studiolight_rot_z); + } + + for (int i = 0; i < 4; i++) { + SolidLight *sl = (studio_light) ? &studio_light->light[i] : nullptr; + world_buf.lights[i] = get_light_data_from_studio_solidlight(sl, world_shading_rotation); + } + + if (studio_light != nullptr) { + world_buf.ambient_color = float4(float3(studio_light->light_ambient), 0.0f); + world_buf.use_specular = shading.flag & V3D_SHADING_SPECULAR_HIGHLIGHT && + studio_light->flag & STUDIOLIGHT_SPECULAR_HIGHLIGHT_PASS; + } + else { + world_buf.ambient_color = float4(1.0f, 1.0f, 1.0f, 0.0f); + world_buf.use_specular = false; + } + + /* TODO(Miguel Pozo) volumes_do */ + + cavity.init(scene_state, *this); + + if (scene_state.draw_dof && !jitter_tx.is_valid()) { + /* We don't care about total_samples in this case */ + load_jitter_tx(1); + } + + world_buf.push_update(); + + for (int i : IndexRange(6)) { + if (i < scene_state.clip_planes.size()) { + clip_planes_buf[i] = scene_state.clip_planes[i]; + } + else { + clip_planes_buf[i] = float4(0); + } + } + + clip_planes_buf.push_update(); +} + +} // namespace blender::workbench diff --git a/source/blender/draw/engines/workbench/workbench_shader_cache.cc b/source/blender/draw/engines/workbench/workbench_shader_cache.cc new file mode 100644 index 00000000000..6720fc1702b --- /dev/null +++ b/source/blender/draw/engines/workbench/workbench_shader_cache.cc @@ -0,0 +1,132 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include "workbench_private.hh" + +namespace blender::workbench { + +ShaderCache::~ShaderCache() +{ + for (auto i : IndexRange(lighting_type_len)) { + for (auto j : IndexRange(shader_type_len)) { + for (auto k : IndexRange(geometry_type_len)) { + for (auto l : IndexRange(pipeline_type_len)) { + for (auto m : IndexRange(2)) { + DRW_SHADER_FREE_SAFE(prepass_shader_cache_[i][j][k][l][m]); + } + } + } + } + } + for (auto i : IndexRange(lighting_type_len)) { + for (auto j : IndexRange(pipeline_type_len)) { + for (auto k : IndexRange(2)) { + for (auto l : IndexRange(2)) { + DRW_SHADER_FREE_SAFE(resolve_shader_cache_[i][j][k][l]); + } + } + } + } +} + +GPUShader *ShaderCache::prepass_shader_get(ePipelineType pipeline_type, + eGeometryType geometry_type, + eShaderType shader_type, + eLightingType lighting_type, + bool clip) +{ + GPUShader *&shader_ptr = prepass_shader_cache_[static_cast<int>(pipeline_type)][static_cast<int>( + geometry_type)][static_cast<int>(shader_type)][static_cast<int>(lighting_type)] + [clip ? 1 : 0]; + + if (shader_ptr != nullptr) { + return shader_ptr; + } + std::string info_name = "workbench_next_prepass_"; + switch (geometry_type) { + case eGeometryType::MESH: + info_name += "mesh_"; + break; + case eGeometryType::CURVES: + info_name += "curves_"; + break; + case eGeometryType::POINTCLOUD: + info_name += "ptcloud_"; + break; + } + switch (pipeline_type) { + case ePipelineType::OPAQUE: + info_name += "opaque_"; + break; + case ePipelineType::TRANSPARENT: + info_name += "transparent_"; + break; + case ePipelineType::SHADOW: + info_name += "shadow_"; + break; + } + switch (lighting_type) { + case eLightingType::FLAT: + info_name += "flat_"; + break; + case eLightingType::STUDIO: + info_name += "studio_"; + break; + case eLightingType::MATCAP: + info_name += "matcap_"; + break; + } + switch (shader_type) { + case eShaderType::MATERIAL: + info_name += "material"; + break; + case eShaderType::TEXTURE: + info_name += "texture"; + break; + } + info_name += clip ? "_clip" : "_no_clip"; + shader_ptr = GPU_shader_create_from_info_name(info_name.c_str()); + return shader_ptr; +} + +GPUShader *ShaderCache::resolve_shader_get(ePipelineType pipeline_type, + eLightingType lighting_type, + bool cavity, + bool curvature) +{ + GPUShader *&shader_ptr = resolve_shader_cache_[static_cast<int>(pipeline_type)][static_cast<int>( + lighting_type)][cavity][curvature]; + + if (shader_ptr != nullptr) { + return shader_ptr; + } + std::string info_name = "workbench_next_resolve_"; + switch (pipeline_type) { + case ePipelineType::OPAQUE: + info_name += "opaque_"; + break; + case ePipelineType::TRANSPARENT: + info_name += "transparent_"; + break; + case ePipelineType::SHADOW: + BLI_assert_unreachable(); + break; + } + switch (lighting_type) { + case eLightingType::FLAT: + info_name += "flat"; + break; + case eLightingType::STUDIO: + info_name += "studio"; + break; + case eLightingType::MATCAP: + info_name += "matcap"; + break; + } + info_name += cavity ? "_cavity" : "_no_cavity"; + info_name += curvature ? "_curvature" : "_no_curvature"; + + shader_ptr = GPU_shader_create_from_info_name(info_name.c_str()); + return shader_ptr; +} + +} // namespace blender::workbench diff --git a/source/blender/draw/engines/workbench/workbench_shader_shared.h b/source/blender/draw/engines/workbench/workbench_shader_shared.h index b2e8fa30d85..de485e37917 100644 --- a/source/blender/draw/engines/workbench/workbench_shader_shared.h +++ b/source/blender/draw/engines/workbench/workbench_shader_shared.h @@ -13,7 +13,8 @@ struct LightData { }; struct WorldData { - float4 viewport_size; + float2 viewport_size; + float2 viewport_size_inv; float4 object_outline_color; float4 shadow_direction_vs; float shadow_focus; @@ -41,8 +42,8 @@ struct WorldData { int matcap_orientation; bool use_specular; + float xray_alpha; int _pad1; - int _pad2; -}; -#define viewport_size_inv viewport_size.zw + float4 background_color; +}; diff --git a/source/blender/draw/engines/workbench/workbench_state.cc b/source/blender/draw/engines/workbench/workbench_state.cc new file mode 100644 index 00000000000..b9ea9a92cbe --- /dev/null +++ b/source/blender/draw/engines/workbench/workbench_state.cc @@ -0,0 +1,303 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later + * Copyright 2020 Blender Foundation. */ + +#include "workbench_private.hh" + +#include "BKE_camera.h" +#include "BKE_editmesh.h" +#include "BKE_modifier.h" +#include "BKE_object.h" +#include "BKE_paint.h" +#include "BKE_particle.h" +#include "BKE_pbvh.h" +#include "DEG_depsgraph_query.h" +#include "DNA_camera_types.h" +#include "DNA_fluid_types.h" +#include "ED_paint.h" +#include "ED_view3d.h" +#include "GPU_capabilities.h" + +namespace blender::workbench { + +void SceneState::init() +{ + bool reset_taa = reset_taa_next_sample; + reset_taa_next_sample = false; + + const DRWContextState *context = DRW_context_state_get(); + View3D *v3d = context->v3d; + RegionView3D *rv3d = context->rv3d; + + scene = DEG_get_evaluated_scene(context->depsgraph); + + GPUTexture *viewport_tx = DRW_viewport_texture_list_get()->color; + resolution = int2(GPU_texture_width(viewport_tx), GPU_texture_height(viewport_tx)); + + camera_object = nullptr; + if (v3d && rv3d) { + camera_object = (rv3d->persp == RV3D_CAMOB) ? v3d->camera : nullptr; + } + else { + /*TODO(Miguel Pozo)*/ + // camera = wpd->cam_original_ob; + } + Camera *camera = camera_object ? static_cast<Camera *>(camera_object->data) : nullptr; + + object_mode = CTX_data_mode_enum_ex(context->object_edit, context->obact, context->object_mode); + + /* TODO(Miguel Pozo): + * Check why Workbench Next exposes OB_MATERIAL, and Workbench exposes OB_RENDER */ + bool is_render_mode = !v3d || ELEM(v3d->shading.type, OB_RENDER, OB_MATERIAL); + + const View3DShading previous_shading = shading; + shading = is_render_mode ? scene->display.shading : v3d->shading; + + cull_state = shading.flag & V3D_SHADING_BACKFACE_CULLING ? DRW_STATE_CULL_BACK : + DRW_STATE_NO_DRAW; + + /* FIXME: This reproduce old behavior when workbench was separated in 2 engines. + * But this is a workaround for a missing update tagging. */ + DRWState new_clip_state = RV3D_CLIPPING_ENABLED(v3d, rv3d) ? DRW_STATE_CLIP_PLANES : + DRW_STATE_NO_DRAW; + DRWState old_clip_state = clip_planes.size() > 0 ? DRW_STATE_CLIP_PLANES : DRW_STATE_NO_DRAW; + if (new_clip_state != old_clip_state) { + reset_taa = true; + } + clip_planes.clear(); + if (new_clip_state & DRW_STATE_CLIP_PLANES) { + int plane_len = (RV3D_LOCK_FLAGS(rv3d) & RV3D_BOXCLIP) ? 4 : 6; + for (auto i : IndexRange(plane_len)) { + clip_planes.append(rv3d->clip[i]); + } + } + + if (!is_render_mode) { + if (shading.type < OB_SOLID) { + shading.light = V3D_LIGHTING_FLAT; + shading.color_type = V3D_SHADING_OBJECT_COLOR; + shading.xray_alpha = 0.0f; + } + else if (SHADING_XRAY_ENABLED(shading)) { + shading.xray_alpha = SHADING_XRAY_ALPHA(shading); + } + else { + shading.xray_alpha = 1.0f; + } + } + xray_mode = !is_render_mode && shading.xray_alpha != 1.0f; + + if (SHADING_XRAY_FLAG_ENABLED(shading)) { + /* Disable shading options that aren't supported in transparency mode. */ + shading.flag &= ~(V3D_SHADING_SHADOW | V3D_SHADING_CAVITY | V3D_SHADING_DEPTH_OF_FIELD); + } + if (SHADING_XRAY_ENABLED(shading) != SHADING_XRAY_ENABLED(previous_shading) || + shading.flag != previous_shading.flag) { + reset_taa = true; + } + + lighting_type = lighting_type_from_v3d_lighting(shading.light); + material_override = Material(shading.single_color); + + background_color = float4(0.0f); + if (is_render_mode && scene->r.alphamode != R_ALPHAPREMUL) { + if (World *w = scene->world) { + background_color = float4(w->horr, w->horg, w->horb, 1.0f); + } + } + + if (rv3d && rv3d->rflag & RV3D_GPULIGHT_UPDATE) { + reset_taa = true; + /* FIXME: This reproduce old behavior when workbench was separated in 2 engines. + * But this is a workaround for a missing update tagging. */ + rv3d->rflag &= ~RV3D_GPULIGHT_UPDATE; + } + + float4x4 matrix; + /*TODO(Miguel Pozo): New API ?*/ + DRW_view_persmat_get(nullptr, matrix.ptr(), false); + if (matrix != view_projection_matrix) { + view_projection_matrix = matrix; + reset_taa = true; + } + + bool is_playback = DRW_state_is_playback(); + bool is_navigating = DRW_state_is_navigating(); + + /* Reset complete drawing when navigating or during viewport playback or when + * leaving one of those states. In case of multires modifier the navigation + * mesh differs from the viewport mesh, so we need to be sure to restart. */ + if (is_playback || is_navigating) { + reset_taa = true; + reset_taa_next_sample = true; + } + + int _samples_len = U.viewport_aa; + if (v3d && ELEM(v3d->shading.type, OB_RENDER, OB_MATERIAL)) { + _samples_len = scene->display.viewport_aa; + } + else if (DRW_state_is_image_render()) { + _samples_len = scene->display.render_aa; + } + if (is_navigating || is_playback) { + /* Only draw using SMAA or no AA when navigating. */ + _samples_len = min_ii(_samples_len, 1); + } + /* 0 samples means no AA */ + draw_aa = _samples_len > 0; + _samples_len = max_ii(_samples_len, 1); + + /* Reset the TAA when we have already draw a sample, but the sample count differs from previous + * time. This removes render artifacts when the viewport anti-aliasing in the user preferences + * is set to a lower value. */ + if (samples_len != _samples_len) { + samples_len = _samples_len; + reset_taa = true; + } + + if (reset_taa || samples_len <= 1) { + sample = 0; + } + else { + sample++; + } + render_finished = sample >= samples_len && samples_len > 1; + + /* TODO(Miguel Pozo) volumes_do */ + + draw_cavity = shading.flag & V3D_SHADING_CAVITY && + ELEM(shading.cavity_type, V3D_SHADING_CAVITY_SSAO, V3D_SHADING_CAVITY_BOTH); + draw_curvature = shading.flag & V3D_SHADING_CAVITY && ELEM(shading.cavity_type, + V3D_SHADING_CAVITY_CURVATURE, + V3D_SHADING_CAVITY_BOTH); + draw_outline = shading.flag & V3D_SHADING_OBJECT_OUTLINE; + draw_dof = camera && camera->dof.flag & CAM_DOF_ENABLED && + shading.flag & V3D_SHADING_DEPTH_OF_FIELD; + + draw_transparent_depth = draw_outline || draw_dof; + draw_object_id = draw_outline || draw_curvature; +}; + +static const CustomData *get_loop_custom_data(const Mesh *mesh) +{ + if (mesh->runtime->wrapper_type == ME_WRAPPER_TYPE_BMESH) { + BLI_assert(mesh->edit_mesh != nullptr); + BLI_assert(mesh->edit_mesh->bm != nullptr); + return &mesh->edit_mesh->bm->ldata; + } + return &mesh->ldata; +} + +static const CustomData *get_vert_custom_data(const Mesh *mesh) +{ + if (mesh->runtime->wrapper_type == ME_WRAPPER_TYPE_BMESH) { + BLI_assert(mesh->edit_mesh != nullptr); + BLI_assert(mesh->edit_mesh->bm != nullptr); + return &mesh->edit_mesh->bm->vdata; + } + return &mesh->vdata; +} + +ObjectState::ObjectState(const SceneState &scene_state, Object *ob) +{ + sculpt_pbvh = false; + texture_paint_mode = false; + image_paint_override = nullptr; + override_sampler_state = GPU_SAMPLER_DEFAULT; + draw_shadow = false; + + const DRWContextState *draw_ctx = DRW_context_state_get(); + const Mesh *me = (ob->type == OB_MESH) ? static_cast<Mesh *>(ob->data) : nullptr; + const bool is_active = (ob == draw_ctx->obact); + /* TODO(Miguel Pozo) Is the double check needed? + * If it is, wouldn't be needed for sculpt_pbvh too? + */ + const bool is_render = DRW_state_is_image_render() && (draw_ctx->v3d == nullptr); + + color_type = (eV3DShadingColorType)scene_state.shading.color_type; + if (!(is_active && DRW_object_use_hide_faces(ob))) { + draw_shadow = (ob->dtx & OB_DRAW_NO_SHADOW_CAST) == 0 && + scene_state.shading.flag & V3D_SHADING_SHADOW; + } + if (me == nullptr) { + if (color_type == V3D_SHADING_TEXTURE_COLOR) { + color_type = V3D_SHADING_MATERIAL_COLOR; + } + else if (color_type == V3D_SHADING_VERTEX_COLOR) { + color_type = V3D_SHADING_OBJECT_COLOR; + } + use_per_material_batches = color_type == V3D_SHADING_MATERIAL_COLOR; + /* Early return */ + return; + } + + sculpt_pbvh = BKE_sculptsession_use_pbvh_draw(ob, draw_ctx->rv3d) && + !DRW_state_is_image_render(); + + if (sculpt_pbvh) { + /* Shadows are unsupported in sculpt mode. We could revert to the slow + * method in this case but I'm not sure if it's a good idea given that + * sculpted meshes are heavy to begin with. */ + draw_shadow = false; + + if (color_type == V3D_SHADING_TEXTURE_COLOR && BKE_pbvh_type(ob->sculpt->pbvh) != PBVH_FACES) { + /* Force use of material color for sculpt. */ + color_type = V3D_SHADING_MATERIAL_COLOR; + } + + /* Bad call C is required to access the tool system that is context aware. Cast to non-const + * due to current API. */ + bContext *C = (bContext *)DRW_context_state_get()->evil_C; + if (C != NULL) { + color_type = ED_paint_shading_color_override( + C, &scene_state.scene->toolsettings->paint_mode, ob, color_type); + } + } + else { + const CustomData *cd_vdata = get_vert_custom_data(me); + const CustomData *cd_ldata = get_loop_custom_data(me); + + bool has_color = (CustomData_has_layer(cd_vdata, CD_PROP_COLOR) || + CustomData_has_layer(cd_vdata, CD_PROP_BYTE_COLOR) || + CustomData_has_layer(cd_ldata, CD_PROP_COLOR) || + CustomData_has_layer(cd_ldata, CD_PROP_BYTE_COLOR)); + + if (color_type == V3D_SHADING_TEXTURE_COLOR) { + if (ob->dt < OB_TEXTURE || !CustomData_has_layer(cd_ldata, CD_MLOOPUV)) { + color_type = V3D_SHADING_MATERIAL_COLOR; + } + } + else if (color_type == V3D_SHADING_VERTEX_COLOR && !has_color) { + color_type = V3D_SHADING_OBJECT_COLOR; + } + + if (!is_render) { + /* Force texture or vertex mode if object is in paint mode. */ + const bool is_vertpaint_mode = is_active && + (scene_state.object_mode == CTX_MODE_PAINT_VERTEX); + const bool is_texpaint_mode = is_active && + (scene_state.object_mode == CTX_MODE_PAINT_TEXTURE); + if (is_vertpaint_mode && has_color) { + color_type = V3D_SHADING_VERTEX_COLOR; + } + else if (is_texpaint_mode && CustomData_has_layer(cd_ldata, CD_MLOOPUV)) { + color_type = V3D_SHADING_TEXTURE_COLOR; + texture_paint_mode = true; + + const ImagePaintSettings *imapaint = &scene_state.scene->toolsettings->imapaint; + if (imapaint->mode == IMAGEPAINT_MODE_IMAGE) { + image_paint_override = imapaint->canvas; + override_sampler_state = GPU_SAMPLER_REPEAT; + SET_FLAG_FROM_TEST(override_sampler_state, + imapaint->interp == IMAGEPAINT_INTERP_LINEAR, + GPU_SAMPLER_FILTER); + } + } + } + } + + use_per_material_batches = image_paint_override == nullptr && ELEM(color_type, + V3D_SHADING_TEXTURE_COLOR, + V3D_SHADING_MATERIAL_COLOR); +} + +} // namespace blender::workbench diff --git a/source/blender/draw/intern/DRW_gpu_wrapper.hh b/source/blender/draw/intern/DRW_gpu_wrapper.hh index 3be50d471e2..6442f2d9837 100644 --- a/source/blender/draw/intern/DRW_gpu_wrapper.hh +++ b/source/blender/draw/intern/DRW_gpu_wrapper.hh @@ -1014,6 +1014,16 @@ class Framebuffer : NonCopyable { &fb_, {depth, color1, color2, color3, color4, color5, color6, color7, color8}); } + void bind() + { + GPU_framebuffer_bind(fb_); + } + + void clear_depth(float depth) + { + GPU_framebuffer_clear_depth(fb_, depth); + } + Framebuffer &operator=(Framebuffer &&a) { if (*this != a) { diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index 4fcfec833eb..22b656a31c5 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -1182,6 +1182,11 @@ static void drw_engines_enable_from_engine(const RenderEngineType *engine_type, switch (drawtype) { case OB_WIRE: case OB_SOLID: + if (U.experimental.enable_workbench_next && + strcmp(engine_type->idname, "BLENDER_WORKBENCH_NEXT") == 0) { + use_drw_engine(DRW_engine_viewport_workbench_next_type.draw_engine); + break; + } use_drw_engine(DRW_engine_viewport_workbench_type.draw_engine); break; case OB_MATERIAL: @@ -2990,6 +2995,9 @@ void DRW_engines_register_experimental(void) if (U.experimental.enable_eevee_next) { RE_engines_register(&DRW_engine_viewport_eevee_next_type); } + if (U.experimental.enable_workbench_next) { + RE_engines_register(&DRW_engine_viewport_workbench_next_type); + } } void DRW_engines_register(void) diff --git a/source/blender/draw/intern/draw_pass.hh b/source/blender/draw/intern/draw_pass.hh index 2c1fd16928e..3750caac713 100644 --- a/source/blender/draw/intern/draw_pass.hh +++ b/source/blender/draw/intern/draw_pass.hh @@ -246,6 +246,7 @@ class PassBase { /** * Record a compute dispatch call. */ + void dispatch(int2 group_len); void dispatch(int3 group_len); void dispatch(int3 *group_len); void dispatch(StorageBuffer<DispatchCommand> &indirect_buffer); @@ -665,6 +666,12 @@ inline void PassBase<T>::draw_procedural_indirect( /** \name Compute Dispatch Implementation * \{ */ +template<class T> inline void PassBase<T>::dispatch(int2 group_len) +{ + BLI_assert(shader_); + create_command(Type::Dispatch).dispatch = {int3(group_len.x, group_len.y, 1)}; +} + template<class T> inline void PassBase<T>::dispatch(int3 group_len) { BLI_assert(shader_); diff --git a/source/blender/draw/intern/shaders/draw_view_info.hh b/source/blender/draw/intern/shaders/draw_view_info.hh index 23892a39062..ef0ef0827d7 100644 --- a/source/blender/draw/intern/shaders/draw_view_info.hh +++ b/source/blender/draw/intern/shaders/draw_view_info.hh @@ -188,6 +188,9 @@ GPU_SHADER_CREATE_INFO(draw_resource_id_fallback) .define("UNIFORM_RESOURCE_ID_NEW") .vertex_in(15, Type::INT, "drw_ResourceID"); +/** TODO mask view id bits. */ +GPU_SHADER_CREATE_INFO(draw_resource_handle_new).define("resource_handle", "drw_ResourceID"); + /** \} */ /* -------------------------------------------------------------------- */ diff --git a/source/blender/draw/intern/smaa_textures.h b/source/blender/draw/intern/smaa_textures.h index a6541f6b164..f9a0bef7047 100644 --- a/source/blender/draw/intern/smaa_textures.h +++ b/source/blender/draw/intern/smaa_textures.h @@ -7,6 +7,10 @@ #pragma once +#ifdef __cplusplus +extern "C" { +#endif + #define AREATEX_WIDTH 160 #define AREATEX_HEIGHT 560 #define AREATEX_PITCH (AREATEX_WIDTH * 2) @@ -28,3 +32,8 @@ extern const unsigned char areaTexBytes[]; * - DX10: DXGI_FORMAT_R8_UNORM */ extern const unsigned char searchTexBytes[]; + +#ifdef __cplusplus +} +#endif + diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 52aa5f56fee..9f994f9d244 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -1294,13 +1294,21 @@ void ED_scene_draw_fps(const struct Scene *scene, int xoffset, int *yoffset); void ED_view3d_stop_render_preview(struct wmWindowManager *wm, struct ARegion *region); void ED_view3d_shade_update(struct Main *bmain, struct View3D *v3d, struct ScrArea *area); -#define XRAY_ALPHA(v3d) \ - (((v3d)->shading.type == OB_WIRE) ? (v3d)->shading.xray_alpha_wire : (v3d)->shading.xray_alpha) -#define XRAY_FLAG(v3d) \ - (((v3d)->shading.type == OB_WIRE) ? V3D_SHADING_XRAY_WIREFRAME : V3D_SHADING_XRAY) -#define XRAY_FLAG_ENABLED(v3d) (((v3d)->shading.flag & XRAY_FLAG(v3d)) != 0) -#define XRAY_ENABLED(v3d) (XRAY_FLAG_ENABLED(v3d) && (XRAY_ALPHA(v3d) < 1.0f)) -#define XRAY_ACTIVE(v3d) (XRAY_ENABLED(v3d) && ((v3d)->shading.type < OB_MATERIAL)) +#define SHADING_XRAY_ALPHA(shading) \ + (((shading).type == OB_WIRE) ? (shading).xray_alpha_wire : (shading).xray_alpha) +#define SHADING_XRAY_FLAG(shading) \ + (((shading).type == OB_WIRE) ? V3D_SHADING_XRAY_WIREFRAME : V3D_SHADING_XRAY) +#define SHADING_XRAY_FLAG_ENABLED(shading) (((shading).flag & SHADING_XRAY_FLAG(shading)) != 0) +#define SHADING_XRAY_ENABLED(shading) \ + (SHADING_XRAY_FLAG_ENABLED(shading) && (SHADING_XRAY_ALPHA(shading) < 1.0f)) +#define SHADING_XRAY_ACTIVE(shading) \ + (SHADING_XRAY_ENABLED(shading) && ((shading).type < OB_MATERIAL)) + +#define XRAY_ALPHA(v3d) SHADING_XRAY_ALPHA((v3d)->shading) +#define XRAY_FLAG(v3d) SHADING_XRAY_FLAG((v3d)->shading) +#define XRAY_FLAG_ENABLED(v3d) SHADING_XRAY_FLAG_ENABLED((v3d)->shading) +#define XRAY_ENABLED(v3d) SHADING_XRAY_ENABLED((v3d)->shading) +#define XRAY_ACTIVE(v3d) SHADING_XRAY_ACTIVE((v3d)->shading) /* view3d_draw_legacy.c */ diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt index 8da17720339..e7f4eda5c40 100644 --- a/source/blender/gpu/CMakeLists.txt +++ b/source/blender/gpu/CMakeLists.txt @@ -29,6 +29,7 @@ set(INC # For *_info.hh includes. ../compositor/realtime_compositor ../draw/engines/eevee_next + ../draw/engines/workbench ../draw/intern # For node muting stuff. diff --git a/source/blender/gpu/intern/gpu_texture_private.hh b/source/blender/gpu/intern/gpu_texture_private.hh index 124b1751b96..2518f2d3c38 100644 --- a/source/blender/gpu/intern/gpu_texture_private.hh +++ b/source/blender/gpu/intern/gpu_texture_private.hh @@ -41,7 +41,7 @@ typedef enum eGPUTextureType { GPU_TEXTURE_CUBE_ARRAY = (GPU_TEXTURE_CUBE | GPU_TEXTURE_ARRAY), } eGPUTextureType; -ENUM_OPERATORS(eGPUTextureType, GPU_TEXTURE_CUBE_ARRAY) +ENUM_OPERATORS(eGPUTextureType, GPU_TEXTURE_BUFFER) #ifdef DEBUG # define DEBUG_NAME_LEN 64 diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 9d8b75450ca..1bd93988714 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -653,7 +653,8 @@ typedef struct UserDef_Experimental { char use_sculpt_texture_paint; char use_draw_manager_acquire_lock; char use_realtime_compositor; - char _pad[7]; + char enable_workbench_next; + char _pad[6]; /** `makesdna` does not allow empty structs. */ } UserDef_Experimental; diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 58189ab2478..289e0656703 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -6389,6 +6389,13 @@ static void rna_def_userdef_experimental(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "enable_eevee_next", 1); RNA_def_property_ui_text(prop, "EEVEE Next", "Enable the new EEVEE codebase, requires restart"); + prop = RNA_def_property(srna, "enable_workbench_next", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "enable_workbench_next", 1); + RNA_def_property_ui_text(prop, + "Workbench Next", + "Enable the new Workbench codebase, requires " + "restart"); + prop = RNA_def_property(srna, "use_viewport_debug", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "use_viewport_debug", 1); RNA_def_property_ui_text(prop, |