forked from bartvdbraak/blender
Render: add "OpenGL" render engine.
This is intended for quick renders for previsualization, animation previews or sequencer previews. It provides the same settings as found in the 3D view Shading popover in solid display mode, but in the scene render properties. The "Workbench" engine was removed, and this name no longer appears in the user interface, it's purely an internal name. We might come up with a better name for this OpenGL engine still, but it's good to be consistent with the OpenGL Render operator name since this has a similar purpose.
This commit is contained in:
parent
7b3a18f0aa
commit
644fadf2f0
@ -328,7 +328,7 @@ class DATA_PT_onion_skinning(OnionSkinButtonsPanel): # , Panel): # inherit from
|
|||||||
|
|
||||||
|
|
||||||
class DATA_PT_custom_props_arm(ArmatureButtonsPanel, PropertyPanel, Panel):
|
class DATA_PT_custom_props_arm(ArmatureButtonsPanel, PropertyPanel, Panel):
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
_context_path = "object.data"
|
_context_path = "object.data"
|
||||||
_property_type = bpy.types.Armature
|
_property_type = bpy.types.Armature
|
||||||
|
|
||||||
|
@ -402,7 +402,7 @@ class BONE_PT_deform(BoneButtonsPanel, Panel):
|
|||||||
|
|
||||||
|
|
||||||
class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel, Panel):
|
class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel, Panel):
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
_property_type = bpy.types.Bone, bpy.types.EditBone, bpy.types.PoseBone
|
_property_type = bpy.types.Bone, bpy.types.EditBone, bpy.types.PoseBone
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -39,7 +39,7 @@ class CAMERA_PT_presets(PresetMenu):
|
|||||||
preset_subdir = "camera"
|
preset_subdir = "camera"
|
||||||
preset_operator = "script.execute_preset"
|
preset_operator = "script.execute_preset"
|
||||||
preset_add_operator = "camera.preset_add"
|
preset_add_operator = "camera.preset_add"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
|
|
||||||
class SAFE_AREAS_PT_presets(PresetMenu):
|
class SAFE_AREAS_PT_presets(PresetMenu):
|
||||||
@ -47,13 +47,13 @@ class SAFE_AREAS_PT_presets(PresetMenu):
|
|||||||
preset_subdir = "safe_areas"
|
preset_subdir = "safe_areas"
|
||||||
preset_operator = "script.execute_preset"
|
preset_operator = "script.execute_preset"
|
||||||
preset_add_operator = "safe_areas.preset_add"
|
preset_add_operator = "safe_areas.preset_add"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
|
|
||||||
class DATA_PT_context_camera(CameraButtonsPanel, Panel):
|
class DATA_PT_context_camera(CameraButtonsPanel, Panel):
|
||||||
bl_label = ""
|
bl_label = ""
|
||||||
bl_options = {'HIDE_HEADER'}
|
bl_options = {'HIDE_HEADER'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -70,7 +70,7 @@ class DATA_PT_context_camera(CameraButtonsPanel, Panel):
|
|||||||
|
|
||||||
class DATA_PT_lens(CameraButtonsPanel, Panel):
|
class DATA_PT_lens(CameraButtonsPanel, Panel):
|
||||||
bl_label = "Lens"
|
bl_label = "Lens"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -111,7 +111,7 @@ class DATA_PT_lens(CameraButtonsPanel, Panel):
|
|||||||
sub = col.column(align=True)
|
sub = col.column(align=True)
|
||||||
sub.prop(ccam, "longitude_min", text="Longiture Min")
|
sub.prop(ccam, "longitude_min", text="Longiture Min")
|
||||||
sub.prop(ccam, "longitude_max", text="Max")
|
sub.prop(ccam, "longitude_max", text="Max")
|
||||||
elif engine in {'BLENDER_RENDER', 'BLENDER_EEVEE'}:
|
elif engine in {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}:
|
||||||
if cam.lens_unit == 'MILLIMETERS':
|
if cam.lens_unit == 'MILLIMETERS':
|
||||||
col.prop(cam, "lens")
|
col.prop(cam, "lens")
|
||||||
elif cam.lens_unit == 'FOV':
|
elif cam.lens_unit == 'FOV':
|
||||||
@ -133,7 +133,7 @@ class DATA_PT_lens(CameraButtonsPanel, Panel):
|
|||||||
|
|
||||||
class DATA_PT_camera_stereoscopy(CameraButtonsPanel, Panel):
|
class DATA_PT_camera_stereoscopy(CameraButtonsPanel, Panel):
|
||||||
bl_label = "Stereoscopy"
|
bl_label = "Stereoscopy"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -181,7 +181,7 @@ class DATA_PT_camera_stereoscopy(CameraButtonsPanel, Panel):
|
|||||||
|
|
||||||
class DATA_PT_camera(CameraButtonsPanel, Panel):
|
class DATA_PT_camera(CameraButtonsPanel, Panel):
|
||||||
bl_label = "Camera"
|
bl_label = "Camera"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw_header_preset(self, context):
|
def draw_header_preset(self, context):
|
||||||
CAMERA_PT_presets.draw_panel_header(self.layout)
|
CAMERA_PT_presets.draw_panel_header(self.layout)
|
||||||
@ -264,7 +264,7 @@ class DATA_PT_camera_dof_aperture(CameraButtonsPanel, Panel):
|
|||||||
class DATA_PT_camera_background_image(CameraButtonsPanel, Panel):
|
class DATA_PT_camera_background_image(CameraButtonsPanel, Panel):
|
||||||
bl_label = "Background Images"
|
bl_label = "Background Images"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
cam = context.camera
|
cam = context.camera
|
||||||
@ -365,7 +365,7 @@ class DATA_PT_camera_background_image(CameraButtonsPanel, Panel):
|
|||||||
class DATA_PT_camera_display(CameraButtonsPanel, Panel):
|
class DATA_PT_camera_display(CameraButtonsPanel, Panel):
|
||||||
bl_label = "Viewport Display"
|
bl_label = "Viewport Display"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -398,7 +398,7 @@ class DATA_PT_camera_display(CameraButtonsPanel, Panel):
|
|||||||
class DATA_PT_camera_safe_areas(CameraButtonsPanel, Panel):
|
class DATA_PT_camera_safe_areas(CameraButtonsPanel, Panel):
|
||||||
bl_label = "Safe Areas"
|
bl_label = "Safe Areas"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
cam = context.camera
|
cam = context.camera
|
||||||
@ -417,7 +417,7 @@ class DATA_PT_camera_safe_areas(CameraButtonsPanel, Panel):
|
|||||||
|
|
||||||
|
|
||||||
class DATA_PT_custom_props_camera(CameraButtonsPanel, PropertyPanel, Panel):
|
class DATA_PT_custom_props_camera(CameraButtonsPanel, PropertyPanel, Panel):
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
_context_path = "object.data"
|
_context_path = "object.data"
|
||||||
_property_type = bpy.types.Camera
|
_property_type = bpy.types.Camera
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ class DATA_PT_shape_curve(CurveButtonsPanel, Panel):
|
|||||||
class DATA_PT_curve_texture_space(CurveButtonsPanel, Panel):
|
class DATA_PT_curve_texture_space(CurveButtonsPanel, Panel):
|
||||||
bl_label = "Texture Space"
|
bl_label = "Texture Space"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -459,7 +459,7 @@ class DATA_PT_text_boxes(CurveButtonsPanelText, Panel):
|
|||||||
|
|
||||||
|
|
||||||
class DATA_PT_custom_props_curve(CurveButtonsPanel, PropertyPanel, Panel):
|
class DATA_PT_custom_props_curve(CurveButtonsPanel, PropertyPanel, Panel):
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
_context_path = "object.data"
|
_context_path = "object.data"
|
||||||
_property_type = bpy.types.Curve
|
_property_type = bpy.types.Curve
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ class DATA_PT_lattice(DataButtonsPanel, Panel):
|
|||||||
|
|
||||||
|
|
||||||
class DATA_PT_custom_props_lattice(DataButtonsPanel, PropertyPanel, Panel):
|
class DATA_PT_custom_props_lattice(DataButtonsPanel, PropertyPanel, Panel):
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
_context_path = "object.data"
|
_context_path = "object.data"
|
||||||
_property_type = bpy.types.Lattice
|
_property_type = bpy.types.Lattice
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ class DataButtonsPanel:
|
|||||||
class DATA_PT_context_light(DataButtonsPanel, Panel):
|
class DATA_PT_context_light(DataButtonsPanel, Panel):
|
||||||
bl_label = ""
|
bl_label = ""
|
||||||
bl_options = {'HIDE_HEADER'}
|
bl_options = {'HIDE_HEADER'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -62,7 +62,7 @@ class DATA_PT_preview(DataButtonsPanel, Panel):
|
|||||||
|
|
||||||
class DATA_PT_light(DataButtonsPanel, Panel):
|
class DATA_PT_light(DataButtonsPanel, Panel):
|
||||||
bl_label = "Light"
|
bl_label = "Light"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -71,38 +71,6 @@ class DATA_PT_light(DataButtonsPanel, Panel):
|
|||||||
|
|
||||||
layout.row().prop(light, "type", expand=True)
|
layout.row().prop(light, "type", expand=True)
|
||||||
|
|
||||||
layout.use_property_split = True
|
|
||||||
|
|
||||||
col = col.column()
|
|
||||||
col.prop(light, "color")
|
|
||||||
col.prop(light, "energy")
|
|
||||||
|
|
||||||
if light.type in {'POINT', 'SPOT'}:
|
|
||||||
|
|
||||||
col = col.column()
|
|
||||||
col.label(text="Falloff")
|
|
||||||
col.prop(light, "falloff_type")
|
|
||||||
col.prop(light, "distance")
|
|
||||||
col.prop(light, "shadow_soft_size")
|
|
||||||
|
|
||||||
if light.falloff_type == 'LINEAR_QUADRATIC_WEIGHTED':
|
|
||||||
sub = col.column(align=True)
|
|
||||||
sub.prop(light, "linear_attenuation", slider=True, text="Linear")
|
|
||||||
sub.prop(light, "quadratic_attenuation", slider=True, text="Quadratic")
|
|
||||||
|
|
||||||
elif light.falloff_type == 'INVERSE_COEFFICIENTS':
|
|
||||||
col.label(text="Inverse Coefficients")
|
|
||||||
sub = col.column(align=True)
|
|
||||||
sub.prop(light, "constant_coefficient", text="Constant")
|
|
||||||
sub.prop(light, "linear_coefficient", text="Linear")
|
|
||||||
sub.prop(light, "quadratic_coefficient", text="Quadratic")
|
|
||||||
|
|
||||||
if light.type == 'AREA':
|
|
||||||
col.prop(light, "distance")
|
|
||||||
|
|
||||||
col = split.column()
|
|
||||||
col.label()
|
|
||||||
|
|
||||||
|
|
||||||
class DATA_PT_EEVEE_light(DataButtonsPanel, Panel):
|
class DATA_PT_EEVEE_light(DataButtonsPanel, Panel):
|
||||||
bl_label = "Light"
|
bl_label = "Light"
|
||||||
@ -234,7 +202,7 @@ class DATA_PT_EEVEE_shadow_contact(DataButtonsPanel, Panel):
|
|||||||
|
|
||||||
class DATA_PT_area(DataButtonsPanel, Panel):
|
class DATA_PT_area(DataButtonsPanel, Panel):
|
||||||
bl_label = "Area Shape"
|
bl_label = "Area Shape"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -258,45 +226,10 @@ class DATA_PT_area(DataButtonsPanel, Panel):
|
|||||||
sub.prop(light, "size_y", text="Size Y")
|
sub.prop(light, "size_y", text="Size Y")
|
||||||
|
|
||||||
|
|
||||||
class DATA_PT_spot(DataButtonsPanel, Panel):
|
|
||||||
bl_label = "Spot Shape"
|
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def poll(cls, context):
|
|
||||||
light = context.light
|
|
||||||
engine = context.engine
|
|
||||||
return (light and light.type == 'SPOT') and (engine in cls.COMPAT_ENGINES)
|
|
||||||
|
|
||||||
def draw(self, context):
|
|
||||||
layout = self.layout
|
|
||||||
|
|
||||||
light = context.light
|
|
||||||
|
|
||||||
split = layout.split()
|
|
||||||
|
|
||||||
col = split.column()
|
|
||||||
sub = col.column()
|
|
||||||
sub.prop(light, "spot_size", text="Size")
|
|
||||||
sub.prop(light, "spot_blend", text="Blend", slider=True)
|
|
||||||
col.prop(light, "use_square")
|
|
||||||
col.prop(light, "show_cone")
|
|
||||||
|
|
||||||
col = split.column()
|
|
||||||
|
|
||||||
col.active = (light.shadow_method != 'BUFFER_SHADOW' or light.shadow_buffer_type != 'DEEP')
|
|
||||||
col.prop(light, "use_halo")
|
|
||||||
sub = col.column(align=True)
|
|
||||||
sub.active = light.use_halo
|
|
||||||
sub.prop(light, "halo_intensity", text="Intensity")
|
|
||||||
if light.shadow_method == 'BUFFER_SHADOW':
|
|
||||||
sub.prop(light, "halo_step", text="Step")
|
|
||||||
|
|
||||||
|
|
||||||
class DATA_PT_spot(DataButtonsPanel, Panel):
|
class DATA_PT_spot(DataButtonsPanel, Panel):
|
||||||
bl_label = "Spot Shape"
|
bl_label = "Spot Shape"
|
||||||
bl_parent_id = "DATA_PT_EEVEE_light"
|
bl_parent_id = "DATA_PT_EEVEE_light"
|
||||||
COMPAT_ENGINES = {'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -337,7 +270,7 @@ class DATA_PT_falloff_curve(DataButtonsPanel, Panel):
|
|||||||
|
|
||||||
|
|
||||||
class DATA_PT_custom_props_light(DataButtonsPanel, PropertyPanel, Panel):
|
class DATA_PT_custom_props_light(DataButtonsPanel, PropertyPanel, Panel):
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
_context_path = "object.data"
|
_context_path = "object.data"
|
||||||
_property_type = bpy.types.Light
|
_property_type = bpy.types.Light
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@ from rna_prop_ui import PropertyPanel
|
|||||||
|
|
||||||
class MESH_MT_vertex_group_specials(Menu):
|
class MESH_MT_vertex_group_specials(Menu):
|
||||||
bl_label = "Vertex Group Specials"
|
bl_label = "Vertex Group Specials"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -48,7 +47,6 @@ class MESH_MT_vertex_group_specials(Menu):
|
|||||||
|
|
||||||
class MESH_MT_shape_key_specials(Menu):
|
class MESH_MT_shape_key_specials(Menu):
|
||||||
bl_label = "Shape Key Specials"
|
bl_label = "Shape Key Specials"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -137,7 +135,7 @@ class MeshButtonsPanel:
|
|||||||
class DATA_PT_context_mesh(MeshButtonsPanel, Panel):
|
class DATA_PT_context_mesh(MeshButtonsPanel, Panel):
|
||||||
bl_label = ""
|
bl_label = ""
|
||||||
bl_options = {'HIDE_HEADER'}
|
bl_options = {'HIDE_HEADER'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -154,7 +152,7 @@ class DATA_PT_context_mesh(MeshButtonsPanel, Panel):
|
|||||||
|
|
||||||
class DATA_PT_normals(MeshButtonsPanel, Panel):
|
class DATA_PT_normals(MeshButtonsPanel, Panel):
|
||||||
bl_label = "Normals"
|
bl_label = "Normals"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -174,7 +172,7 @@ class DATA_PT_normals(MeshButtonsPanel, Panel):
|
|||||||
class DATA_PT_texture_space(MeshButtonsPanel, Panel):
|
class DATA_PT_texture_space(MeshButtonsPanel, Panel):
|
||||||
bl_label = "Texture Space"
|
bl_label = "Texture Space"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -194,7 +192,7 @@ class DATA_PT_texture_space(MeshButtonsPanel, Panel):
|
|||||||
|
|
||||||
class DATA_PT_vertex_groups(MeshButtonsPanel, Panel):
|
class DATA_PT_vertex_groups(MeshButtonsPanel, Panel):
|
||||||
bl_label = "Vertex Groups"
|
bl_label = "Vertex Groups"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -241,7 +239,7 @@ class DATA_PT_vertex_groups(MeshButtonsPanel, Panel):
|
|||||||
|
|
||||||
class DATA_PT_face_maps(MeshButtonsPanel, Panel):
|
class DATA_PT_face_maps(MeshButtonsPanel, Panel):
|
||||||
bl_label = "Face Maps"
|
bl_label = "Face Maps"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -283,7 +281,7 @@ class DATA_PT_face_maps(MeshButtonsPanel, Panel):
|
|||||||
|
|
||||||
class DATA_PT_shape_keys(MeshButtonsPanel, Panel):
|
class DATA_PT_shape_keys(MeshButtonsPanel, Panel):
|
||||||
bl_label = "Shape Keys"
|
bl_label = "Shape Keys"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -373,7 +371,7 @@ class DATA_PT_shape_keys(MeshButtonsPanel, Panel):
|
|||||||
|
|
||||||
class DATA_PT_uv_texture(MeshButtonsPanel, Panel):
|
class DATA_PT_uv_texture(MeshButtonsPanel, Panel):
|
||||||
bl_label = "UV Maps"
|
bl_label = "UV Maps"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -392,7 +390,7 @@ class DATA_PT_uv_texture(MeshButtonsPanel, Panel):
|
|||||||
|
|
||||||
class DATA_PT_vertex_colors(MeshButtonsPanel, Panel):
|
class DATA_PT_vertex_colors(MeshButtonsPanel, Panel):
|
||||||
bl_label = "Vertex Colors"
|
bl_label = "Vertex Colors"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -412,7 +410,7 @@ class DATA_PT_vertex_colors(MeshButtonsPanel, Panel):
|
|||||||
class DATA_PT_customdata(MeshButtonsPanel, Panel):
|
class DATA_PT_customdata(MeshButtonsPanel, Panel):
|
||||||
bl_label = "Geometry Data"
|
bl_label = "Geometry Data"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -439,7 +437,7 @@ class DATA_PT_customdata(MeshButtonsPanel, Panel):
|
|||||||
|
|
||||||
|
|
||||||
class DATA_PT_custom_props_mesh(MeshButtonsPanel, PropertyPanel, Panel):
|
class DATA_PT_custom_props_mesh(MeshButtonsPanel, PropertyPanel, Panel):
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
_context_path = "object.data"
|
_context_path = "object.data"
|
||||||
_property_type = bpy.types.Mesh
|
_property_type = bpy.types.Mesh
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ class DATA_PT_metaball(DataButtonsPanel, Panel):
|
|||||||
class DATA_PT_mball_texture_space(DataButtonsPanel, Panel):
|
class DATA_PT_mball_texture_space(DataButtonsPanel, Panel):
|
||||||
bl_label = "Texture Space"
|
bl_label = "Texture Space"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -125,7 +125,7 @@ class DATA_PT_metaball_element(DataButtonsPanel, Panel):
|
|||||||
|
|
||||||
|
|
||||||
class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, Panel):
|
class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, Panel):
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
_context_path = "object.data"
|
_context_path = "object.data"
|
||||||
_property_type = bpy.types.MetaBall
|
_property_type = bpy.types.MetaBall
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ class DataButtonsPanel:
|
|||||||
class DATA_PT_context_speaker(DataButtonsPanel, Panel):
|
class DATA_PT_context_speaker(DataButtonsPanel, Panel):
|
||||||
bl_label = ""
|
bl_label = ""
|
||||||
bl_options = {'HIDE_HEADER'}
|
bl_options = {'HIDE_HEADER'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -55,7 +55,7 @@ class DATA_PT_context_speaker(DataButtonsPanel, Panel):
|
|||||||
|
|
||||||
class DATA_PT_speaker(DataButtonsPanel, Panel):
|
class DATA_PT_speaker(DataButtonsPanel, Panel):
|
||||||
bl_label = "Sound"
|
bl_label = "Sound"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -76,7 +76,7 @@ class DATA_PT_speaker(DataButtonsPanel, Panel):
|
|||||||
|
|
||||||
class DATA_PT_distance(DataButtonsPanel, Panel):
|
class DATA_PT_distance(DataButtonsPanel, Panel):
|
||||||
bl_label = "Distance"
|
bl_label = "Distance"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -99,7 +99,7 @@ class DATA_PT_distance(DataButtonsPanel, Panel):
|
|||||||
|
|
||||||
class DATA_PT_cone(DataButtonsPanel, Panel):
|
class DATA_PT_cone(DataButtonsPanel, Panel):
|
||||||
bl_label = "Cone"
|
bl_label = "Cone"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -121,7 +121,7 @@ class DATA_PT_cone(DataButtonsPanel, Panel):
|
|||||||
|
|
||||||
|
|
||||||
class DATA_PT_custom_props_speaker(DataButtonsPanel, PropertyPanel, Panel):
|
class DATA_PT_custom_props_speaker(DataButtonsPanel, PropertyPanel, Panel):
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
_context_path = "object.data"
|
_context_path = "object.data"
|
||||||
_property_type = bpy.types.Speaker
|
_property_type = bpy.types.Speaker
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ class MATERIAL_PT_preview(MaterialButtonsPanel, Panel):
|
|||||||
|
|
||||||
|
|
||||||
class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel, Panel):
|
class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel, Panel):
|
||||||
COMPAT_ENGINES = {'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
_context_path = "material"
|
_context_path = "material"
|
||||||
_property_type = bpy.types.Material
|
_property_type = bpy.types.Material
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ class EEVEE_MATERIAL_PT_context_material(MaterialButtonsPanel, Panel):
|
|||||||
bl_label = ""
|
bl_label = ""
|
||||||
bl_context = "material"
|
bl_context = "material"
|
||||||
bl_options = {'HIDE_HEADER'}
|
bl_options = {'HIDE_HEADER'}
|
||||||
COMPAT_ENGINES = {'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
@ -359,7 +359,7 @@ class OBJECT_PT_onion_skinning(OnionSkinButtonsPanel): # , Panel): # inherit fr
|
|||||||
|
|
||||||
|
|
||||||
class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel, Panel):
|
class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel, Panel):
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
_context_path = "object"
|
_context_path = "object"
|
||||||
_property_type = bpy.types.Object
|
_property_type = bpy.types.Object
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ def particle_get_settings(context):
|
|||||||
|
|
||||||
class PARTICLE_MT_specials(Menu):
|
class PARTICLE_MT_specials(Menu):
|
||||||
bl_label = "Particle Specials"
|
bl_label = "Particle Specials"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -88,7 +88,7 @@ class PARTICLE_PT_hair_dynamics_presets(PresetMenu):
|
|||||||
preset_subdir = "hair_dynamics"
|
preset_subdir = "hair_dynamics"
|
||||||
preset_operator = "script.execute_preset"
|
preset_operator = "script.execute_preset"
|
||||||
preset_add_operator = "particle.hair_dynamics_preset_add"
|
preset_add_operator = "particle.hair_dynamics_preset_add"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
|
|
||||||
class ParticleButtonsPanel:
|
class ParticleButtonsPanel:
|
||||||
@ -132,7 +132,7 @@ class PARTICLE_UL_particle_systems(bpy.types.UIList):
|
|||||||
class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
|
class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
|
||||||
bl_label = ""
|
bl_label = ""
|
||||||
bl_options = {'HIDE_HEADER'}
|
bl_options = {'HIDE_HEADER'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -235,7 +235,7 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
|
|||||||
|
|
||||||
class PARTICLE_PT_emission(ParticleButtonsPanel, Panel):
|
class PARTICLE_PT_emission(ParticleButtonsPanel, Panel):
|
||||||
bl_label = "Emission"
|
bl_label = "Emission"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -287,7 +287,7 @@ class PARTICLE_PT_emission_source(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Source"
|
bl_label = "Source"
|
||||||
bl_parent_id = "PARTICLE_PT_emission"
|
bl_parent_id = "PARTICLE_PT_emission"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -325,7 +325,7 @@ class PARTICLE_PT_emission_source(ParticleButtonsPanel, Panel):
|
|||||||
class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel):
|
class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel):
|
||||||
bl_label = "Hair Dynamics"
|
bl_label = "Hair Dynamics"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -406,7 +406,7 @@ class PARTICLE_PT_hair_dynamics_structure(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Structure"
|
bl_label = "Structure"
|
||||||
bl_parent_id = "PARTICLE_PT_hair_dynamics"
|
bl_parent_id = "PARTICLE_PT_hair_dynamics"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -438,7 +438,7 @@ class PARTICLE_PT_hair_dynamics_volume(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Volume"
|
bl_label = "Volume"
|
||||||
bl_parent_id = "PARTICLE_PT_hair_dynamics"
|
bl_parent_id = "PARTICLE_PT_hair_dynamics"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -470,7 +470,7 @@ class PARTICLE_PT_hair_dynamics_volume(ParticleButtonsPanel, Panel):
|
|||||||
class PARTICLE_PT_cache(ParticleButtonsPanel, Panel):
|
class PARTICLE_PT_cache(ParticleButtonsPanel, Panel):
|
||||||
bl_label = "Cache"
|
bl_label = "Cache"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -501,7 +501,7 @@ class PARTICLE_PT_cache(ParticleButtonsPanel, Panel):
|
|||||||
class PARTICLE_PT_velocity(ParticleButtonsPanel, Panel):
|
class PARTICLE_PT_velocity(ParticleButtonsPanel, Panel):
|
||||||
bl_label = "Velocity"
|
bl_label = "Velocity"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -550,7 +550,7 @@ class PARTICLE_PT_velocity(ParticleButtonsPanel, Panel):
|
|||||||
class PARTICLE_PT_rotation(ParticleButtonsPanel, Panel):
|
class PARTICLE_PT_rotation(ParticleButtonsPanel, Panel):
|
||||||
bl_label = "Rotation"
|
bl_label = "Rotation"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -603,7 +603,7 @@ class PARTICLE_PT_rotation_angular_velocity(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Angular Velocity"
|
bl_label = "Angular Velocity"
|
||||||
bl_parent_id = "PARTICLE_PT_rotation"
|
bl_parent_id = "PARTICLE_PT_rotation"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -628,7 +628,7 @@ class PARTICLE_PT_rotation_angular_velocity(ParticleButtonsPanel, Panel):
|
|||||||
class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
|
class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
|
||||||
bl_label = "Physics"
|
bl_label = "Physics"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -826,7 +826,7 @@ class PARTICLE_PT_physics_deflection(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Deflection"
|
bl_label = "Deflection"
|
||||||
bl_parent_id = "PARTICLE_PT_physics"
|
bl_parent_id = "PARTICLE_PT_physics"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -852,7 +852,7 @@ class PARTICLE_PT_physics_deflection(ParticleButtonsPanel, Panel):
|
|||||||
class PARTICLE_PT_physics_forces(ParticleButtonsPanel, Panel):
|
class PARTICLE_PT_physics_forces(ParticleButtonsPanel, Panel):
|
||||||
bl_label = "Forces"
|
bl_label = "Forces"
|
||||||
bl_parent_id = "PARTICLE_PT_physics"
|
bl_parent_id = "PARTICLE_PT_physics"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -879,7 +879,7 @@ class PARTICLE_PT_physics_integration(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Integration"
|
bl_label = "Integration"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
bl_parent_id = "PARTICLE_PT_physics"
|
bl_parent_id = "PARTICLE_PT_physics"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -911,7 +911,7 @@ class PARTICLE_PT_physics_integration(ParticleButtonsPanel, Panel):
|
|||||||
|
|
||||||
class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel):
|
class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel):
|
||||||
bl_label = "Boid Brain"
|
bl_label = "Boid Brain"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1015,7 +1015,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel):
|
|||||||
class PARTICLE_PT_render(ParticleButtonsPanel, Panel):
|
class PARTICLE_PT_render(ParticleButtonsPanel, Panel):
|
||||||
bl_label = "Render"
|
bl_label = "Render"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1055,7 +1055,7 @@ class PARTICLE_PT_render_extra(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Extra"
|
bl_label = "Extra"
|
||||||
bl_parent_id = "PARTICLE_PT_render"
|
bl_parent_id = "PARTICLE_PT_render"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1082,7 +1082,7 @@ class PARTICLE_PT_render_line(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Line"
|
bl_label = "Line"
|
||||||
bl_parent_id = "PARTICLE_PT_render"
|
bl_parent_id = "PARTICLE_PT_render"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1110,7 +1110,7 @@ class PARTICLE_PT_render_path(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Path"
|
bl_label = "Path"
|
||||||
bl_parent_id = "PARTICLE_PT_render"
|
bl_parent_id = "PARTICLE_PT_render"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1145,7 +1145,7 @@ class PARTICLE_PT_render_path_timing(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Timing"
|
bl_label = "Timing"
|
||||||
bl_parent_id = "PARTICLE_PT_render"
|
bl_parent_id = "PARTICLE_PT_render"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1177,7 +1177,7 @@ class PARTICLE_PT_render_object(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Object"
|
bl_label = "Object"
|
||||||
bl_parent_id = "PARTICLE_PT_render"
|
bl_parent_id = "PARTICLE_PT_render"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1205,7 +1205,7 @@ class PARTICLE_PT_render_collection(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Collection"
|
bl_label = "Collection"
|
||||||
bl_parent_id = "PARTICLE_PT_render"
|
bl_parent_id = "PARTICLE_PT_render"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1237,7 +1237,7 @@ class PARTICLE_PT_render_collection_use_count(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Use Count"
|
bl_label = "Use Count"
|
||||||
bl_parent_id = "PARTICLE_PT_render_collection"
|
bl_parent_id = "PARTICLE_PT_render_collection"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1288,7 +1288,7 @@ class PARTICLE_PT_render_billboards_alignment(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Billboard Alignment"
|
bl_label = "Billboard Alignment"
|
||||||
bl_parent_id = "PARTICLE_PT_render"
|
bl_parent_id = "PARTICLE_PT_render"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1314,7 +1314,7 @@ class PARTICLE_PT_render_billboards_tilt(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Billboard Tilt"
|
bl_label = "Billboard Tilt"
|
||||||
bl_parent_id = "PARTICLE_PT_render"
|
bl_parent_id = "PARTICLE_PT_render"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1348,7 +1348,7 @@ class PARTICLE_PT_render_billboards_uv(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Billboard UVs"
|
bl_label = "Billboard UVs"
|
||||||
bl_parent_id = "PARTICLE_PT_render"
|
bl_parent_id = "PARTICLE_PT_render"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1384,7 +1384,7 @@ class PARTICLE_PT_render_trails(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Trails"
|
bl_label = "Trails"
|
||||||
bl_parent_id = "PARTICLE_PT_render"
|
bl_parent_id = "PARTICLE_PT_render"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1412,7 +1412,7 @@ class PARTICLE_PT_render_trails(ParticleButtonsPanel, Panel):
|
|||||||
class PARTICLE_PT_draw(ParticleButtonsPanel, Panel):
|
class PARTICLE_PT_draw(ParticleButtonsPanel, Panel):
|
||||||
bl_label = "Viewport Display"
|
bl_label = "Viewport Display"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1474,7 +1474,7 @@ class PARTICLE_PT_draw(ParticleButtonsPanel, Panel):
|
|||||||
class PARTICLE_PT_children(ParticleButtonsPanel, Panel):
|
class PARTICLE_PT_children(ParticleButtonsPanel, Panel):
|
||||||
bl_label = "Children"
|
bl_label = "Children"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1530,7 +1530,7 @@ class PARTICLE_PT_children_parting(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Parting"
|
bl_label = "Parting"
|
||||||
bl_parent_id = "PARTICLE_PT_children"
|
bl_parent_id = "PARTICLE_PT_children"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1555,7 +1555,7 @@ class PARTICLE_PT_children_clumping(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Clumping"
|
bl_label = "Clumping"
|
||||||
bl_parent_id = "PARTICLE_PT_children"
|
bl_parent_id = "PARTICLE_PT_children"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1597,7 +1597,7 @@ class PARTICLE_PT_children_roughness(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Roughness"
|
bl_label = "Roughness"
|
||||||
bl_parent_id = "PARTICLE_PT_children"
|
bl_parent_id = "PARTICLE_PT_children"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1639,7 +1639,7 @@ class PARTICLE_PT_children_kink(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Kink"
|
bl_label = "Kink"
|
||||||
bl_parent_id = "PARTICLE_PT_children"
|
bl_parent_id = "PARTICLE_PT_children"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1690,7 +1690,7 @@ class PARTICLE_PT_children_kink(ParticleButtonsPanel, Panel):
|
|||||||
class PARTICLE_PT_field_weights(ParticleButtonsPanel, Panel):
|
class PARTICLE_PT_field_weights(ParticleButtonsPanel, Panel):
|
||||||
bl_label = "Field Weights"
|
bl_label = "Field Weights"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1711,7 +1711,7 @@ class PARTICLE_PT_field_weights(ParticleButtonsPanel, Panel):
|
|||||||
class PARTICLE_PT_force_fields(ParticleButtonsPanel, Panel):
|
class PARTICLE_PT_force_fields(ParticleButtonsPanel, Panel):
|
||||||
bl_label = "Force Field Settings"
|
bl_label = "Force Field Settings"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -1727,7 +1727,7 @@ class PARTICLE_PT_force_fields(ParticleButtonsPanel, Panel):
|
|||||||
class PARTICLE_PT_force_fields_type1(ParticleButtonsPanel, Panel):
|
class PARTICLE_PT_force_fields_type1(ParticleButtonsPanel, Panel):
|
||||||
bl_label = "Type 1"
|
bl_label = "Type 1"
|
||||||
bl_parent_id = "PARTICLE_PT_force_fields"
|
bl_parent_id = "PARTICLE_PT_force_fields"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -1743,7 +1743,7 @@ class PARTICLE_PT_force_fields_type1(ParticleButtonsPanel, Panel):
|
|||||||
class PARTICLE_PT_force_fields_type2(ParticleButtonsPanel, Panel):
|
class PARTICLE_PT_force_fields_type2(ParticleButtonsPanel, Panel):
|
||||||
bl_label = "Type 2"
|
bl_label = "Type 2"
|
||||||
bl_parent_id = "PARTICLE_PT_force_fields"
|
bl_parent_id = "PARTICLE_PT_force_fields"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -1760,7 +1760,7 @@ class PARTICLE_PT_force_fields_type1_falloff(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Falloff"
|
bl_label = "Falloff"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
bl_parent_id = "PARTICLE_PT_force_fields_type1"
|
bl_parent_id = "PARTICLE_PT_force_fields_type1"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -1775,7 +1775,7 @@ class PARTICLE_PT_force_fields_type2_falloff(ParticleButtonsPanel, Panel):
|
|||||||
bl_label = "Falloff"
|
bl_label = "Falloff"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
bl_parent_id = "PARTICLE_PT_force_fields_type2"
|
bl_parent_id = "PARTICLE_PT_force_fields_type2"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -1789,7 +1789,7 @@ class PARTICLE_PT_force_fields_type2_falloff(ParticleButtonsPanel, Panel):
|
|||||||
class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, Panel):
|
class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, Panel):
|
||||||
bl_label = "Vertex Groups"
|
bl_label = "Vertex Groups"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1862,7 +1862,7 @@ class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, Panel):
|
|||||||
class PARTICLE_PT_textures(ParticleButtonsPanel, Panel):
|
class PARTICLE_PT_textures(ParticleButtonsPanel, Panel):
|
||||||
bl_label = "Textures"
|
bl_label = "Textures"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1894,7 +1894,7 @@ class PARTICLE_PT_textures(ParticleButtonsPanel, Panel):
|
|||||||
class PARTICLE_PT_hair_shape(ParticleButtonsPanel, Panel):
|
class PARTICLE_PT_hair_shape(ParticleButtonsPanel, Panel):
|
||||||
bl_label = "Hair Shape"
|
bl_label = "Hair Shape"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -1921,7 +1921,7 @@ class PARTICLE_PT_hair_shape(ParticleButtonsPanel, Panel):
|
|||||||
|
|
||||||
|
|
||||||
class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel, Panel):
|
class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel, Panel):
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
_context_path = "particle_system.settings"
|
_context_path = "particle_system.settings"
|
||||||
_property_type = bpy.types.ParticleSettings
|
_property_type = bpy.types.ParticleSettings
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ class PhysicButtonsPanel:
|
|||||||
|
|
||||||
class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
|
class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
|
||||||
bl_label = "Cloth"
|
bl_label = "Cloth"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw_header_preset(self, context):
|
def draw_header_preset(self, context):
|
||||||
CLOTH_PT_presets.draw_panel_header(self.layout)
|
CLOTH_PT_presets.draw_panel_header(self.layout)
|
||||||
@ -129,7 +129,7 @@ class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Cache"
|
bl_label = "Cache"
|
||||||
bl_parent_id = 'PHYSICS_PT_cloth'
|
bl_parent_id = 'PHYSICS_PT_cloth'
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
md = context.cloth
|
md = context.cloth
|
||||||
@ -140,7 +140,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Collision"
|
bl_label = "Collision"
|
||||||
bl_parent_id = 'PHYSICS_PT_cloth'
|
bl_parent_id = 'PHYSICS_PT_cloth'
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
cloth = context.cloth.collision_settings
|
cloth = context.cloth.collision_settings
|
||||||
@ -181,7 +181,7 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Stiffness Scaling"
|
bl_label = "Stiffness Scaling"
|
||||||
bl_parent_id = 'PHYSICS_PT_cloth'
|
bl_parent_id = 'PHYSICS_PT_cloth'
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
cloth = context.cloth.settings
|
cloth = context.cloth.settings
|
||||||
@ -215,7 +215,7 @@ class PHYSICS_PT_cloth_sewing(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Sewing Springs"
|
bl_label = "Sewing Springs"
|
||||||
bl_parent_id = 'PHYSICS_PT_cloth'
|
bl_parent_id = 'PHYSICS_PT_cloth'
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
cloth = context.cloth.settings
|
cloth = context.cloth.settings
|
||||||
@ -250,7 +250,7 @@ class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Field Weights"
|
bl_label = "Field Weights"
|
||||||
bl_parent_id = 'PHYSICS_PT_cloth'
|
bl_parent_id = 'PHYSICS_PT_cloth'
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
cloth = context.cloth.settings
|
cloth = context.cloth.settings
|
||||||
|
@ -56,7 +56,7 @@ def physics_add_special(self, layout, data, name, addop, removeop, typeicon):
|
|||||||
class PHYSICS_PT_add(PhysicButtonsPanel, Panel):
|
class PHYSICS_PT_add(PhysicButtonsPanel, Panel):
|
||||||
bl_label = ""
|
bl_label = ""
|
||||||
bl_options = {'HIDE_HEADER'}
|
bl_options = {'HIDE_HEADER'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
obj = context.object
|
obj = context.object
|
||||||
|
@ -60,7 +60,7 @@ class PhysicButtonsPanel:
|
|||||||
|
|
||||||
class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel):
|
class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel):
|
||||||
bl_label = "Dynamic Paint"
|
bl_label = "Dynamic Paint"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -129,7 +129,7 @@ class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel):
|
|||||||
class PHYSICS_PT_dp_advanced_canvas(PhysicButtonsPanel, Panel):
|
class PHYSICS_PT_dp_advanced_canvas(PhysicButtonsPanel, Panel):
|
||||||
bl_label = "Advanced"
|
bl_label = "Advanced"
|
||||||
bl_parent_id = "PHYSICS_PT_dynamic_paint"
|
bl_parent_id = "PHYSICS_PT_dynamic_paint"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -206,7 +206,7 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Output"
|
bl_label = "Output"
|
||||||
bl_parent_id = "PHYSICS_PT_dynamic_paint"
|
bl_parent_id = "PHYSICS_PT_dynamic_paint"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -300,7 +300,7 @@ class PHYSICS_PT_dp_canvas_initial_color(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Initial Color"
|
bl_label = "Initial Color"
|
||||||
bl_parent_id = "PHYSICS_PT_dynamic_paint"
|
bl_parent_id = "PHYSICS_PT_dynamic_paint"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -337,7 +337,7 @@ class PHYSICS_PT_dp_effects(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Effects"
|
bl_label = "Effects"
|
||||||
bl_parent_id = "PHYSICS_PT_dynamic_paint"
|
bl_parent_id = "PHYSICS_PT_dynamic_paint"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -387,7 +387,7 @@ class PHYSICS_PT_dp_cache(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Cache"
|
bl_label = "Cache"
|
||||||
bl_parent_id = "PHYSICS_PT_dynamic_paint"
|
bl_parent_id = "PHYSICS_PT_dynamic_paint"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -409,7 +409,7 @@ class PHYSICS_PT_dp_cache(PhysicButtonsPanel, Panel):
|
|||||||
class PHYSICS_PT_dp_brush_source(PhysicButtonsPanel, Panel):
|
class PHYSICS_PT_dp_brush_source(PhysicButtonsPanel, Panel):
|
||||||
bl_label = "Source"
|
bl_label = "Source"
|
||||||
bl_parent_id = "PHYSICS_PT_dynamic_paint"
|
bl_parent_id = "PHYSICS_PT_dynamic_paint"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -463,7 +463,7 @@ class PHYSICS_PT_dp_brush_velocity(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Velocity"
|
bl_label = "Velocity"
|
||||||
bl_parent_id = "PHYSICS_PT_dynamic_paint"
|
bl_parent_id = "PHYSICS_PT_dynamic_paint"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -500,7 +500,7 @@ class PHYSICS_PT_dp_brush_wave(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Waves"
|
bl_label = "Waves"
|
||||||
bl_parent_id = "PHYSICS_PT_dynamic_paint"
|
bl_parent_id = "PHYSICS_PT_dynamic_paint"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
@ -38,7 +38,7 @@ class PhysicButtonsPanel:
|
|||||||
|
|
||||||
class PHYSICS_PT_field(PhysicButtonsPanel, Panel):
|
class PHYSICS_PT_field(PhysicButtonsPanel, Panel):
|
||||||
bl_label = "Force Fields"
|
bl_label = "Force Fields"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -112,7 +112,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel, Panel):
|
|||||||
class PHYSICS_PT_field_falloff(PhysicButtonsPanel, Panel):
|
class PHYSICS_PT_field_falloff(PhysicButtonsPanel, Panel):
|
||||||
bl_label = "Falloff"
|
bl_label = "Falloff"
|
||||||
bl_parent_id = "PHYSICS_PT_field"
|
bl_parent_id = "PHYSICS_PT_field"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -170,7 +170,7 @@ class PHYSICS_PT_field_falloff(PhysicButtonsPanel, Panel):
|
|||||||
|
|
||||||
class PHYSICS_PT_collision(PhysicButtonsPanel, Panel):
|
class PHYSICS_PT_collision(PhysicButtonsPanel, Panel):
|
||||||
bl_label = "Collision"
|
bl_label = "Collision"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -199,7 +199,7 @@ class PHYSICS_PT_collision(PhysicButtonsPanel, Panel):
|
|||||||
class PHYSICS_PT_collision_particle(PhysicButtonsPanel, Panel):
|
class PHYSICS_PT_collision_particle(PhysicButtonsPanel, Panel):
|
||||||
bl_label = "Particle"
|
bl_label = "Particle"
|
||||||
bl_parent_id = "PHYSICS_PT_collision"
|
bl_parent_id = "PHYSICS_PT_collision"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -241,7 +241,7 @@ class PHYSICS_PT_collision_particle(PhysicButtonsPanel, Panel):
|
|||||||
class PHYSICS_PT_collision_softbody(PhysicButtonsPanel, Panel):
|
class PHYSICS_PT_collision_softbody(PhysicButtonsPanel, Panel):
|
||||||
bl_label = "Softbody"
|
bl_label = "Softbody"
|
||||||
bl_parent_id = "PHYSICS_PT_collision"
|
bl_parent_id = "PHYSICS_PT_collision"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
@ -29,7 +29,7 @@ class PHYSICS_PT_rigidbody_panel:
|
|||||||
|
|
||||||
class PHYSICS_PT_rigid_body(PHYSICS_PT_rigidbody_panel, Panel):
|
class PHYSICS_PT_rigid_body(PHYSICS_PT_rigidbody_panel, Panel):
|
||||||
bl_label = "Rigid Body"
|
bl_label = "Rigid Body"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -57,7 +57,7 @@ class PHYSICS_PT_rigid_body(PHYSICS_PT_rigidbody_panel, Panel):
|
|||||||
class PHYSICS_PT_rigid_body_collisions(PHYSICS_PT_rigidbody_panel, Panel):
|
class PHYSICS_PT_rigid_body_collisions(PHYSICS_PT_rigidbody_panel, Panel):
|
||||||
bl_label = "Collisions"
|
bl_label = "Collisions"
|
||||||
bl_parent_id = 'PHYSICS_PT_rigid_body'
|
bl_parent_id = 'PHYSICS_PT_rigid_body'
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -103,7 +103,7 @@ class PHYSICS_PT_rigid_body_dynamics(PHYSICS_PT_rigidbody_panel, Panel):
|
|||||||
bl_label = "Dynamics"
|
bl_label = "Dynamics"
|
||||||
bl_parent_id = 'PHYSICS_PT_rigid_body'
|
bl_parent_id = 'PHYSICS_PT_rigid_body'
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
@ -29,7 +29,7 @@ class PHYSICS_PT_rigidbody_constraint_panel:
|
|||||||
|
|
||||||
class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Panel):
|
class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Panel):
|
||||||
bl_label = "Rigid Body Constraint"
|
bl_label = "Rigid Body Constraint"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
@ -39,7 +39,7 @@ class PhysicButtonsPanel:
|
|||||||
|
|
||||||
class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel):
|
class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel):
|
||||||
bl_label = "Smoke"
|
bl_label = "Smoke"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -138,7 +138,7 @@ class PHYSICS_PT_smoke_flow_advanced(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Advanced"
|
bl_label = "Advanced"
|
||||||
bl_parent_id = 'PHYSICS_PT_smoke'
|
bl_parent_id = 'PHYSICS_PT_smoke'
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -174,7 +174,7 @@ class PHYSICS_PT_smoke_fire(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Flames"
|
bl_label = "Flames"
|
||||||
bl_parent_id = 'PHYSICS_PT_smoke'
|
bl_parent_id = 'PHYSICS_PT_smoke'
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -205,7 +205,7 @@ class PHYSICS_PT_smoke_adaptive_domain(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Adaptive Domain"
|
bl_label = "Adaptive Domain"
|
||||||
bl_parent_id = 'PHYSICS_PT_smoke'
|
bl_parent_id = 'PHYSICS_PT_smoke'
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -240,7 +240,7 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "High Resolution"
|
bl_label = "High Resolution"
|
||||||
bl_parent_id = 'PHYSICS_PT_smoke'
|
bl_parent_id = 'PHYSICS_PT_smoke'
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -280,7 +280,7 @@ class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Groups"
|
bl_label = "Groups"
|
||||||
bl_parent_id = 'PHYSICS_PT_smoke'
|
bl_parent_id = 'PHYSICS_PT_smoke'
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -309,7 +309,7 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Cache"
|
bl_label = "Cache"
|
||||||
bl_parent_id = 'PHYSICS_PT_smoke'
|
bl_parent_id = 'PHYSICS_PT_smoke'
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -346,7 +346,7 @@ class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Field Weights"
|
bl_label = "Field Weights"
|
||||||
bl_parent_id = 'PHYSICS_PT_smoke'
|
bl_parent_id = 'PHYSICS_PT_smoke'
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
@ -46,7 +46,7 @@ class PhysicButtonsPanel:
|
|||||||
|
|
||||||
class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel):
|
class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel):
|
||||||
bl_label = "Soft Body"
|
bl_label = "Soft Body"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -77,7 +77,7 @@ class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Cache"
|
bl_label = "Cache"
|
||||||
bl_parent_id = 'PHYSICS_PT_softbody'
|
bl_parent_id = 'PHYSICS_PT_softbody'
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
md = context.soft_body
|
md = context.soft_body
|
||||||
@ -88,7 +88,7 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Goal"
|
bl_label = "Goal"
|
||||||
bl_parent_id = 'PHYSICS_PT_softbody'
|
bl_parent_id = 'PHYSICS_PT_softbody'
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
softbody = context.soft_body.settings
|
softbody = context.soft_body.settings
|
||||||
@ -129,7 +129,7 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Edges"
|
bl_label = "Edges"
|
||||||
bl_parent_id = 'PHYSICS_PT_softbody'
|
bl_parent_id = 'PHYSICS_PT_softbody'
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
softbody = context.soft_body.settings
|
softbody = context.soft_body.settings
|
||||||
@ -180,7 +180,7 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Self Collision"
|
bl_label = "Self Collision"
|
||||||
bl_parent_id = 'PHYSICS_PT_softbody'
|
bl_parent_id = 'PHYSICS_PT_softbody'
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
softbody = context.soft_body.settings
|
softbody = context.soft_body.settings
|
||||||
@ -210,7 +210,7 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Solver"
|
bl_label = "Solver"
|
||||||
bl_parent_id = 'PHYSICS_PT_softbody'
|
bl_parent_id = 'PHYSICS_PT_softbody'
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -244,7 +244,7 @@ class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel, Panel):
|
|||||||
bl_label = "Field Weights"
|
bl_label = "Field Weights"
|
||||||
bl_parent_id = 'PHYSICS_PT_softbody'
|
bl_parent_id = 'PHYSICS_PT_softbody'
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
md = context.soft_body
|
md = context.soft_body
|
||||||
|
@ -21,6 +21,11 @@
|
|||||||
import bpy
|
import bpy
|
||||||
from bpy.types import Menu, Panel, UIList
|
from bpy.types import Menu, Panel, UIList
|
||||||
from bl_operators.presets import PresetMenu
|
from bl_operators.presets import PresetMenu
|
||||||
|
from .space_view3d import (
|
||||||
|
VIEW3D_PT_shading_lighting,
|
||||||
|
VIEW3D_PT_shading_color,
|
||||||
|
VIEW3D_PT_shading_options,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class RENDER_PT_presets(PresetMenu):
|
class RENDER_PT_presets(PresetMenu):
|
||||||
@ -79,7 +84,7 @@ class RENDER_PT_context(Panel):
|
|||||||
|
|
||||||
class RENDER_PT_dimensions(RenderButtonsPanel, Panel):
|
class RENDER_PT_dimensions(RenderButtonsPanel, Panel):
|
||||||
bl_label = "Dimensions"
|
bl_label = "Dimensions"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
_frame_rate_args_prev = None
|
_frame_rate_args_prev = None
|
||||||
_preset_class = None
|
_preset_class = None
|
||||||
@ -166,7 +171,7 @@ class RENDER_PT_frame_remapping(RenderButtonsPanel, Panel):
|
|||||||
bl_label = "Time Remapping"
|
bl_label = "Time Remapping"
|
||||||
bl_parent_id = "RENDER_PT_dimensions"
|
bl_parent_id = "RENDER_PT_dimensions"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -183,7 +188,7 @@ class RENDER_PT_frame_remapping(RenderButtonsPanel, Panel):
|
|||||||
class RENDER_PT_post_processing(RenderButtonsPanel, Panel):
|
class RENDER_PT_post_processing(RenderButtonsPanel, Panel):
|
||||||
bl_label = "Post Processing"
|
bl_label = "Post Processing"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -201,7 +206,7 @@ class RENDER_PT_post_processing(RenderButtonsPanel, Panel):
|
|||||||
class RENDER_PT_stamp(RenderButtonsPanel, Panel):
|
class RENDER_PT_stamp(RenderButtonsPanel, Panel):
|
||||||
bl_label = "Metadata"
|
bl_label = "Metadata"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -242,7 +247,7 @@ class RENDER_PT_stamp_burn(RenderButtonsPanel, Panel):
|
|||||||
bl_label = "Burn Into Image"
|
bl_label = "Burn Into Image"
|
||||||
bl_parent_id = "RENDER_PT_stamp"
|
bl_parent_id = "RENDER_PT_stamp"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
rd = context.scene.render
|
rd = context.scene.render
|
||||||
@ -266,7 +271,7 @@ class RENDER_PT_stamp_burn(RenderButtonsPanel, Panel):
|
|||||||
|
|
||||||
class RENDER_PT_output(RenderButtonsPanel, Panel):
|
class RENDER_PT_output(RenderButtonsPanel, Panel):
|
||||||
bl_label = "Output"
|
bl_label = "Output"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -298,7 +303,7 @@ class RENDER_PT_output(RenderButtonsPanel, Panel):
|
|||||||
class RENDER_PT_encoding(RenderButtonsPanel, Panel):
|
class RENDER_PT_encoding(RenderButtonsPanel, Panel):
|
||||||
bl_label = "Encoding"
|
bl_label = "Encoding"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw_header_preset(self, context):
|
def draw_header_preset(self, context):
|
||||||
RENDER_PT_ffmpeg_presets.draw_panel_header(self.layout)
|
RENDER_PT_ffmpeg_presets.draw_panel_header(self.layout)
|
||||||
@ -395,7 +400,7 @@ class RENDER_UL_renderviews(UIList):
|
|||||||
|
|
||||||
class RENDER_PT_stereoscopy(RenderButtonsPanel, Panel):
|
class RENDER_PT_stereoscopy(RenderButtonsPanel, Panel):
|
||||||
bl_label = "Stereoscopy"
|
bl_label = "Stereoscopy"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
@ -777,7 +782,7 @@ class RENDER_PT_eevee_film(RenderButtonsPanel, Panel):
|
|||||||
col.prop(rd, "alpha_mode", text="Alpha")
|
col.prop(rd, "alpha_mode", text="Alpha")
|
||||||
|
|
||||||
|
|
||||||
class RENDER_PT_hair(RenderButtonsPanel, Panel):
|
class RENDER_PT_eevee_hair(RenderButtonsPanel, Panel):
|
||||||
bl_label = "Hair"
|
bl_label = "Hair"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_EEVEE'}
|
||||||
@ -798,6 +803,60 @@ class RENDER_PT_hair(RenderButtonsPanel, Panel):
|
|||||||
layout.prop(rd, "hair_subdiv")
|
layout.prop(rd, "hair_subdiv")
|
||||||
|
|
||||||
|
|
||||||
|
class RENDER_PT_opengl_film(RenderButtonsPanel, Panel):
|
||||||
|
bl_label = "Film"
|
||||||
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
|
COMPAT_ENGINES = {'BLENDER_OPENGL'}
|
||||||
|
|
||||||
|
def draw(self, context):
|
||||||
|
layout = self.layout
|
||||||
|
layout.use_property_split = True
|
||||||
|
layout.use_property_decorate = False # No animation.
|
||||||
|
|
||||||
|
rd = context.scene.render
|
||||||
|
|
||||||
|
layout.prop(rd, "use_antialiasing")
|
||||||
|
|
||||||
|
layout.prop(rd, "antialiasing_samples")
|
||||||
|
layout.prop(rd, "alpha_mode")
|
||||||
|
|
||||||
|
|
||||||
|
class RENDER_PT_opengl_lighting(RenderButtonsPanel, Panel):
|
||||||
|
bl_label = "Lighting"
|
||||||
|
COMPAT_ENGINES = {'BLENDER_OPENGL'}
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def poll(cls, context):
|
||||||
|
return (context.engine in cls.COMPAT_ENGINES)
|
||||||
|
|
||||||
|
def draw(self, context):
|
||||||
|
VIEW3D_PT_shading_lighting.draw(self, context)
|
||||||
|
|
||||||
|
|
||||||
|
class RENDER_PT_opengl_color(RenderButtonsPanel, Panel):
|
||||||
|
bl_label = "Color"
|
||||||
|
COMPAT_ENGINES = {'BLENDER_OPENGL'}
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def poll(cls, context):
|
||||||
|
return (context.engine in cls.COMPAT_ENGINES)
|
||||||
|
|
||||||
|
def draw(self, context):
|
||||||
|
VIEW3D_PT_shading_color.draw(self, context)
|
||||||
|
|
||||||
|
|
||||||
|
class RENDER_PT_opengl_options(RenderButtonsPanel, Panel):
|
||||||
|
bl_label = "Options"
|
||||||
|
COMPAT_ENGINES = {'BLENDER_OPENGL'}
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def poll(cls, context):
|
||||||
|
return (context.engine in cls.COMPAT_ENGINES)
|
||||||
|
|
||||||
|
def draw(self, context):
|
||||||
|
VIEW3D_PT_shading_options.draw(self, context)
|
||||||
|
|
||||||
|
|
||||||
classes = (
|
classes = (
|
||||||
RENDER_PT_presets,
|
RENDER_PT_presets,
|
||||||
RENDER_PT_ffmpeg_presets,
|
RENDER_PT_ffmpeg_presets,
|
||||||
@ -812,7 +871,7 @@ classes = (
|
|||||||
RENDER_PT_stamp_burn,
|
RENDER_PT_stamp_burn,
|
||||||
RENDER_UL_renderviews,
|
RENDER_UL_renderviews,
|
||||||
RENDER_PT_stereoscopy,
|
RENDER_PT_stereoscopy,
|
||||||
RENDER_PT_hair,
|
RENDER_PT_eevee_hair,
|
||||||
RENDER_PT_eevee_sampling,
|
RENDER_PT_eevee_sampling,
|
||||||
RENDER_PT_eevee_film,
|
RENDER_PT_eevee_film,
|
||||||
RENDER_PT_eevee_shadows,
|
RENDER_PT_eevee_shadows,
|
||||||
@ -824,6 +883,10 @@ classes = (
|
|||||||
RENDER_PT_eevee_motion_blur,
|
RENDER_PT_eevee_motion_blur,
|
||||||
RENDER_PT_eevee_depth_of_field,
|
RENDER_PT_eevee_depth_of_field,
|
||||||
RENDER_PT_eevee_bloom,
|
RENDER_PT_eevee_bloom,
|
||||||
|
RENDER_PT_opengl_film,
|
||||||
|
RENDER_PT_opengl_lighting,
|
||||||
|
RENDER_PT_opengl_color,
|
||||||
|
RENDER_PT_opengl_options,
|
||||||
)
|
)
|
||||||
|
|
||||||
if __name__ == "__main__": # only for live edit.
|
if __name__ == "__main__": # only for live edit.
|
||||||
|
@ -66,7 +66,7 @@ class SceneButtonsPanel:
|
|||||||
|
|
||||||
class SCENE_PT_scene(SceneButtonsPanel, Panel):
|
class SCENE_PT_scene(SceneButtonsPanel, Panel):
|
||||||
bl_label = "Scene"
|
bl_label = "Scene"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -81,7 +81,7 @@ class SCENE_PT_scene(SceneButtonsPanel, Panel):
|
|||||||
|
|
||||||
class SCENE_PT_unit(SceneButtonsPanel, Panel):
|
class SCENE_PT_unit(SceneButtonsPanel, Panel):
|
||||||
bl_label = "Units"
|
bl_label = "Units"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw_header_preset(self, context):
|
def draw_header_preset(self, context):
|
||||||
SCENE_PT_units_length_presets.draw_panel_header(self.layout)
|
SCENE_PT_units_length_presets.draw_panel_header(self.layout)
|
||||||
@ -163,7 +163,7 @@ class SceneKeyingSetsPanel:
|
|||||||
class SCENE_PT_keying_sets(SceneButtonsPanel, SceneKeyingSetsPanel, Panel):
|
class SCENE_PT_keying_sets(SceneButtonsPanel, SceneKeyingSetsPanel, Panel):
|
||||||
bl_label = "Keying Sets"
|
bl_label = "Keying Sets"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -234,7 +234,7 @@ class SCENE_PT_keyframing_settings(SceneButtonsPanel, SceneKeyingSetsPanel, Pane
|
|||||||
class SCENE_PT_keying_set_paths(SceneButtonsPanel, SceneKeyingSetsPanel, Panel):
|
class SCENE_PT_keying_set_paths(SceneButtonsPanel, SceneKeyingSetsPanel, Panel):
|
||||||
bl_label = "Active Keying Set"
|
bl_label = "Active Keying Set"
|
||||||
bl_parent_id = "SCENE_PT_keying_sets"
|
bl_parent_id = "SCENE_PT_keying_sets"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -297,7 +297,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, SceneKeyingSetsPanel, Panel):
|
|||||||
class SCENE_PT_color_management(SceneButtonsPanel, Panel):
|
class SCENE_PT_color_management(SceneButtonsPanel, Panel):
|
||||||
bl_label = "Color Management"
|
bl_label = "Color Management"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -329,7 +329,7 @@ class SCENE_PT_color_management_curves(SceneButtonsPanel, Panel):
|
|||||||
bl_label = "Use Curves"
|
bl_label = "Use Curves"
|
||||||
bl_parent_id = "SCENE_PT_color_management"
|
bl_parent_id = "SCENE_PT_color_management"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
|
|
||||||
@ -353,7 +353,7 @@ class SCENE_PT_color_management_curves(SceneButtonsPanel, Panel):
|
|||||||
class SCENE_PT_audio(SceneButtonsPanel, Panel):
|
class SCENE_PT_audio(SceneButtonsPanel, Panel):
|
||||||
bl_label = "Audio"
|
bl_label = "Audio"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -392,7 +392,7 @@ class SCENE_PT_audio(SceneButtonsPanel, Panel):
|
|||||||
class SCENE_PT_physics(SceneButtonsPanel, Panel):
|
class SCENE_PT_physics(SceneButtonsPanel, Panel):
|
||||||
bl_label = "Gravity"
|
bl_label = "Gravity"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
self.layout.prop(context.scene, "use_gravity", text="")
|
self.layout.prop(context.scene, "use_gravity", text="")
|
||||||
@ -411,7 +411,7 @@ class SCENE_PT_physics(SceneButtonsPanel, Panel):
|
|||||||
class SCENE_PT_rigid_body_world(SceneButtonsPanel, Panel):
|
class SCENE_PT_rigid_body_world(SceneButtonsPanel, Panel):
|
||||||
bl_label = "Rigid Body World"
|
bl_label = "Rigid Body World"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -479,7 +479,7 @@ class SCENE_PT_rigid_body_cache(SceneButtonsPanel, Panel):
|
|||||||
bl_label = "Cache"
|
bl_label = "Cache"
|
||||||
bl_parent_id = "SCENE_PT_rigid_body_world"
|
bl_parent_id = "SCENE_PT_rigid_body_world"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -497,7 +497,7 @@ class SCENE_PT_rigid_body_field_weights(SceneButtonsPanel, Panel):
|
|||||||
bl_label = "Field Weights"
|
bl_label = "Field Weights"
|
||||||
bl_parent_id = "SCENE_PT_rigid_body_world"
|
bl_parent_id = "SCENE_PT_rigid_body_world"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -514,7 +514,7 @@ class SCENE_PT_rigid_body_field_weights(SceneButtonsPanel, Panel):
|
|||||||
class SCENE_PT_simplify(SceneButtonsPanel, Panel):
|
class SCENE_PT_simplify(SceneButtonsPanel, Panel):
|
||||||
bl_label = "Simplify"
|
bl_label = "Simplify"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
rd = context.scene.render
|
rd = context.scene.render
|
||||||
@ -527,7 +527,7 @@ class SCENE_PT_simplify(SceneButtonsPanel, Panel):
|
|||||||
class SCENE_PT_simplify_viewport(SceneButtonsPanel, Panel):
|
class SCENE_PT_simplify_viewport(SceneButtonsPanel, Panel):
|
||||||
bl_label = "Viewport"
|
bl_label = "Viewport"
|
||||||
bl_parent_id = "SCENE_PT_simplify"
|
bl_parent_id = "SCENE_PT_simplify"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -549,7 +549,7 @@ class SCENE_PT_simplify_viewport(SceneButtonsPanel, Panel):
|
|||||||
class SCENE_PT_simplify_render(SceneButtonsPanel, Panel):
|
class SCENE_PT_simplify_render(SceneButtonsPanel, Panel):
|
||||||
bl_label = "Render"
|
bl_label = "Render"
|
||||||
bl_parent_id = "SCENE_PT_simplify"
|
bl_parent_id = "SCENE_PT_simplify"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -569,7 +569,7 @@ class SCENE_PT_simplify_render(SceneButtonsPanel, Panel):
|
|||||||
|
|
||||||
|
|
||||||
class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, Panel):
|
class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, Panel):
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
_context_path = "scene"
|
_context_path = "scene"
|
||||||
_property_type = bpy.types.Scene
|
_property_type = bpy.types.Scene
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ class TextureButtonsPanel:
|
|||||||
|
|
||||||
class TEXTURE_PT_preview(TextureButtonsPanel, Panel):
|
class TEXTURE_PT_preview(TextureButtonsPanel, Panel):
|
||||||
bl_label = "Preview"
|
bl_label = "Preview"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -112,7 +112,7 @@ class TEXTURE_PT_context(TextureButtonsPanel, Panel):
|
|||||||
bl_label = ""
|
bl_label = ""
|
||||||
bl_context = "texture"
|
bl_context = "texture"
|
||||||
bl_options = {'HIDE_HEADER'}
|
bl_options = {'HIDE_HEADER'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -151,7 +151,7 @@ class TEXTURE_PT_context(TextureButtonsPanel, Panel):
|
|||||||
class TEXTURE_PT_node(TextureButtonsPanel, Panel):
|
class TEXTURE_PT_node(TextureButtonsPanel, Panel):
|
||||||
bl_label = "Node"
|
bl_label = "Node"
|
||||||
bl_context = "texture"
|
bl_context = "texture"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -169,7 +169,7 @@ class TEXTURE_PT_node(TextureButtonsPanel, Panel):
|
|||||||
class TEXTURE_PT_node_mapping(TextureButtonsPanel, Panel):
|
class TEXTURE_PT_node_mapping(TextureButtonsPanel, Panel):
|
||||||
bl_label = "Mapping"
|
bl_label = "Mapping"
|
||||||
bl_context = "texture"
|
bl_context = "texture"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -212,7 +212,7 @@ class TextureTypePanel(TextureButtonsPanel):
|
|||||||
class TEXTURE_PT_clouds(TextureTypePanel, Panel):
|
class TEXTURE_PT_clouds(TextureTypePanel, Panel):
|
||||||
bl_label = "Clouds"
|
bl_label = "Clouds"
|
||||||
tex_type = 'CLOUDS'
|
tex_type = 'CLOUDS'
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -236,7 +236,7 @@ class TEXTURE_PT_clouds(TextureTypePanel, Panel):
|
|||||||
class TEXTURE_PT_wood(TextureTypePanel, Panel):
|
class TEXTURE_PT_wood(TextureTypePanel, Panel):
|
||||||
bl_label = "Wood"
|
bl_label = "Wood"
|
||||||
tex_type = 'WOOD'
|
tex_type = 'WOOD'
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -265,7 +265,7 @@ class TEXTURE_PT_wood(TextureTypePanel, Panel):
|
|||||||
class TEXTURE_PT_marble(TextureTypePanel, Panel):
|
class TEXTURE_PT_marble(TextureTypePanel, Panel):
|
||||||
bl_label = "Marble"
|
bl_label = "Marble"
|
||||||
tex_type = 'MARBLE'
|
tex_type = 'MARBLE'
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -292,7 +292,7 @@ class TEXTURE_PT_marble(TextureTypePanel, Panel):
|
|||||||
class TEXTURE_PT_magic(TextureTypePanel, Panel):
|
class TEXTURE_PT_magic(TextureTypePanel, Panel):
|
||||||
bl_label = "Magic"
|
bl_label = "Magic"
|
||||||
tex_type = 'MAGIC'
|
tex_type = 'MAGIC'
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -307,7 +307,7 @@ class TEXTURE_PT_magic(TextureTypePanel, Panel):
|
|||||||
class TEXTURE_PT_blend(TextureTypePanel, Panel):
|
class TEXTURE_PT_blend(TextureTypePanel, Panel):
|
||||||
bl_label = "Blend"
|
bl_label = "Blend"
|
||||||
tex_type = 'BLEND'
|
tex_type = 'BLEND'
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -325,7 +325,7 @@ class TEXTURE_PT_blend(TextureTypePanel, Panel):
|
|||||||
class TEXTURE_PT_stucci(TextureTypePanel, Panel):
|
class TEXTURE_PT_stucci(TextureTypePanel, Panel):
|
||||||
bl_label = "Stucci"
|
bl_label = "Stucci"
|
||||||
tex_type = 'STUCCI'
|
tex_type = 'STUCCI'
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -345,7 +345,7 @@ class TEXTURE_PT_stucci(TextureTypePanel, Panel):
|
|||||||
class TEXTURE_PT_image(TextureTypePanel, Panel):
|
class TEXTURE_PT_image(TextureTypePanel, Panel):
|
||||||
bl_label = "Image"
|
bl_label = "Image"
|
||||||
tex_type = 'IMAGE'
|
tex_type = 'IMAGE'
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -475,7 +475,7 @@ class TEXTURE_PT_image_mapping(TextureTypePanel, Panel):
|
|||||||
class TEXTURE_PT_musgrave(TextureTypePanel, Panel):
|
class TEXTURE_PT_musgrave(TextureTypePanel, Panel):
|
||||||
bl_label = "Musgrave"
|
bl_label = "Musgrave"
|
||||||
tex_type = 'MUSGRAVE'
|
tex_type = 'MUSGRAVE'
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -511,7 +511,7 @@ class TEXTURE_PT_musgrave(TextureTypePanel, Panel):
|
|||||||
class TEXTURE_PT_voronoi(TextureTypePanel, Panel):
|
class TEXTURE_PT_voronoi(TextureTypePanel, Panel):
|
||||||
bl_label = "Voronoi"
|
bl_label = "Voronoi"
|
||||||
tex_type = 'VORONOI'
|
tex_type = 'VORONOI'
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -547,7 +547,7 @@ class TEXTURE_PT_voronoi(TextureTypePanel, Panel):
|
|||||||
class TEXTURE_PT_distortednoise(TextureTypePanel, Panel):
|
class TEXTURE_PT_distortednoise(TextureTypePanel, Panel):
|
||||||
bl_label = "Distorted Noise"
|
bl_label = "Distorted Noise"
|
||||||
tex_type = 'DISTORTED_NOISE'
|
tex_type = 'DISTORTED_NOISE'
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@ -567,7 +567,7 @@ class TEXTURE_PT_distortednoise(TextureTypePanel, Panel):
|
|||||||
|
|
||||||
|
|
||||||
class TextureSlotPanel(TextureButtonsPanel):
|
class TextureSlotPanel(TextureButtonsPanel):
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -579,7 +579,7 @@ class TextureSlotPanel(TextureButtonsPanel):
|
|||||||
|
|
||||||
class TEXTURE_PT_mapping(TextureSlotPanel, Panel):
|
class TEXTURE_PT_mapping(TextureSlotPanel, Panel):
|
||||||
bl_label = "Mapping"
|
bl_label = "Mapping"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -657,7 +657,7 @@ class TEXTURE_PT_mapping(TextureSlotPanel, Panel):
|
|||||||
|
|
||||||
class TEXTURE_PT_influence(TextureSlotPanel, Panel):
|
class TEXTURE_PT_influence(TextureSlotPanel, Panel):
|
||||||
bl_label = "Influence"
|
bl_label = "Influence"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -745,7 +745,7 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel):
|
|||||||
class TEXTURE_PT_colors(TextureButtonsPanel, Panel):
|
class TEXTURE_PT_colors(TextureButtonsPanel, Panel):
|
||||||
bl_label = "Colors"
|
bl_label = "Colors"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -776,7 +776,7 @@ class TEXTURE_PT_colors(TextureButtonsPanel, Panel):
|
|||||||
|
|
||||||
|
|
||||||
class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel, Panel):
|
class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel, Panel):
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
_context_path = "texture"
|
_context_path = "texture"
|
||||||
_property_type = Texture
|
_property_type = Texture
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ class ViewLayerButtonsPanel:
|
|||||||
|
|
||||||
class VIEWLAYER_PT_layer(ViewLayerButtonsPanel, Panel):
|
class VIEWLAYER_PT_layer(ViewLayerButtonsPanel, Panel):
|
||||||
bl_label = "View Layer"
|
bl_label = "View Layer"
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
@ -37,7 +37,7 @@ class WorldButtonsPanel:
|
|||||||
class WORLD_PT_context_world(WorldButtonsPanel, Panel):
|
class WORLD_PT_context_world(WorldButtonsPanel, Panel):
|
||||||
bl_label = ""
|
bl_label = ""
|
||||||
bl_options = {'HIDE_HEADER'}
|
bl_options = {'HIDE_HEADER'}
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -83,7 +83,7 @@ class EEVEE_WORLD_PT_mist(WorldButtonsPanel, Panel):
|
|||||||
|
|
||||||
|
|
||||||
class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, Panel):
|
class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, Panel):
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
_context_path = "world"
|
_context_path = "world"
|
||||||
_property_type = bpy.types.World
|
_property_type = bpy.types.World
|
||||||
|
|
||||||
|
@ -1289,7 +1289,7 @@ class SEQUENCER_PT_grease_pencil_tools(GreasePencilToolsPanel, SequencerButtonsP
|
|||||||
|
|
||||||
|
|
||||||
class SEQUENCER_PT_custom_props(SequencerButtonsPanel, PropertyPanel, Panel):
|
class SEQUENCER_PT_custom_props(SequencerButtonsPanel, PropertyPanel, Panel):
|
||||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||||
_context_path = "scene.sequence_editor.active_strip"
|
_context_path = "scene.sequence_editor.active_strip"
|
||||||
_property_type = (bpy.types.Sequence,)
|
_property_type = (bpy.types.Sequence,)
|
||||||
bl_category = "Strip"
|
bl_category = "Strip"
|
||||||
|
@ -3748,6 +3748,15 @@ class VIEW3D_PT_shading(Panel):
|
|||||||
bl_label = "Shading"
|
bl_label = "Shading"
|
||||||
bl_ui_units_x = 11
|
bl_ui_units_x = 11
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_shading(cls, context):
|
||||||
|
# Get settings from 3D viewport or OpenGL render engine
|
||||||
|
view = context.space_data
|
||||||
|
if view.type == 'VIEW_3D':
|
||||||
|
return view.shading
|
||||||
|
else:
|
||||||
|
return context.scene.display.shading
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -3760,9 +3769,7 @@ class VIEW3D_PT_shading_lighting(Panel):
|
|||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
shading = VIEW3D_PT_shading.get_shading(context)
|
||||||
view = context.space_data
|
|
||||||
shading = view.shading
|
|
||||||
|
|
||||||
col = layout.column()
|
col = layout.column()
|
||||||
split = col.split(0.9)
|
split = col.split(0.9)
|
||||||
@ -3824,15 +3831,13 @@ class VIEW3D_PT_shading_color(Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
view = context.space_data
|
shading = VIEW3D_PT_shading.get_shading(context)
|
||||||
shading = view.shading
|
|
||||||
return shading.type == 'SOLID'
|
return shading.type == 'SOLID'
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
view = context.space_data
|
shading = VIEW3D_PT_shading.get_shading(context)
|
||||||
shading = view.shading
|
|
||||||
|
|
||||||
layout.row().prop(shading, "color_type", expand=True)
|
layout.row().prop(shading, "color_type", expand=True)
|
||||||
|
|
||||||
@ -3848,15 +3853,13 @@ class VIEW3D_PT_shading_options(Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
view = context.space_data
|
shading = VIEW3D_PT_shading.get_shading(context)
|
||||||
shading = view.shading
|
|
||||||
return shading.type == 'SOLID'
|
return shading.type == 'SOLID'
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
view = context.space_data
|
shading = VIEW3D_PT_shading.get_shading(context)
|
||||||
shading = view.shading
|
|
||||||
|
|
||||||
col = layout.column()
|
col = layout.column()
|
||||||
|
|
||||||
@ -3909,7 +3912,9 @@ class VIEW3D_PT_shading_options(Panel):
|
|||||||
if not shading.light == 'MATCAP':
|
if not shading.light == 'MATCAP':
|
||||||
col.prop(shading, "show_specular_highlight")
|
col.prop(shading, "show_specular_highlight")
|
||||||
|
|
||||||
col.prop(view, "show_world")
|
view = context.space_data
|
||||||
|
if view.type == 'VIEW_3D':
|
||||||
|
col.prop(view, "show_world")
|
||||||
|
|
||||||
|
|
||||||
class VIEW3D_PT_shading_options_shadow(Panel):
|
class VIEW3D_PT_shading_options_shadow(Panel):
|
||||||
|
@ -156,6 +156,7 @@ bool BKE_scene_use_shading_nodes_custom(struct Scene *scene);
|
|||||||
bool BKE_scene_use_spherical_stereo(struct Scene *scene);
|
bool BKE_scene_use_spherical_stereo(struct Scene *scene);
|
||||||
|
|
||||||
bool BKE_scene_uses_blender_eevee(const struct Scene *scene);
|
bool BKE_scene_uses_blender_eevee(const struct Scene *scene);
|
||||||
|
bool BKE_scene_uses_blender_opengl(const struct Scene *scene);
|
||||||
bool BKE_scene_uses_cycles(const struct Scene *scene);
|
bool BKE_scene_uses_cycles(const struct Scene *scene);
|
||||||
|
|
||||||
void BKE_scene_disable_color_management(struct Scene *scene);
|
void BKE_scene_disable_color_management(struct Scene *scene);
|
||||||
|
@ -45,6 +45,7 @@ struct ScrVert;
|
|||||||
struct SpaceType;
|
struct SpaceType;
|
||||||
struct TransformOrientation;
|
struct TransformOrientation;
|
||||||
struct View3D;
|
struct View3D;
|
||||||
|
struct View3DShading;
|
||||||
struct bContext;
|
struct bContext;
|
||||||
struct bContextDataResult;
|
struct bContextDataResult;
|
||||||
struct bScreen;
|
struct bScreen;
|
||||||
@ -355,6 +356,8 @@ bool BKE_screen_is_used(const struct bScreen *screen) ATTR_WARN_UNUSED_RESULT AT
|
|||||||
float BKE_screen_view3d_zoom_to_fac(float camzoom);
|
float BKE_screen_view3d_zoom_to_fac(float camzoom);
|
||||||
float BKE_screen_view3d_zoom_from_fac(float zoomfac);
|
float BKE_screen_view3d_zoom_from_fac(float zoomfac);
|
||||||
|
|
||||||
|
void BKE_screen_view3d_shading_init(struct View3DShading *shading);
|
||||||
|
|
||||||
/* screen */
|
/* screen */
|
||||||
void BKE_screen_free(struct bScreen *sc);
|
void BKE_screen_free(struct bScreen *sc);
|
||||||
void BKE_screen_area_map_free(struct ScrAreaMap *area_map) ATTR_NONNULL();
|
void BKE_screen_area_map_free(struct ScrAreaMap *area_map) ATTR_NONNULL();
|
||||||
|
@ -113,7 +113,7 @@
|
|||||||
#include "bmesh.h"
|
#include "bmesh.h"
|
||||||
|
|
||||||
const char *RE_engine_id_BLENDER_EEVEE = "BLENDER_EEVEE";
|
const char *RE_engine_id_BLENDER_EEVEE = "BLENDER_EEVEE";
|
||||||
const char *RE_engine_id_BLENDER_WORKBENCH = "BLENDER_WORKBENCH";
|
const char *RE_engine_id_BLENDER_OPENGL = "BLENDER_OPENGL";
|
||||||
const char *RE_engine_id_CYCLES = "CYCLES";
|
const char *RE_engine_id_CYCLES = "CYCLES";
|
||||||
|
|
||||||
void free_avicodecdata(AviCodecData *acd)
|
void free_avicodecdata(AviCodecData *acd)
|
||||||
@ -361,6 +361,9 @@ Scene *BKE_scene_copy(Main *bmain, Scene *sce, int type)
|
|||||||
|
|
||||||
curvemapping_copy_data(&sce_copy->r.mblur_shutter_curve, &sce->r.mblur_shutter_curve);
|
curvemapping_copy_data(&sce_copy->r.mblur_shutter_curve, &sce->r.mblur_shutter_curve);
|
||||||
|
|
||||||
|
/* viewport display settings */
|
||||||
|
sce_copy->display = sce->display;
|
||||||
|
|
||||||
/* tool settings */
|
/* tool settings */
|
||||||
sce_copy->toolsettings = BKE_toolsettings_copy(sce->toolsettings, 0);
|
sce_copy->toolsettings = BKE_toolsettings_copy(sce->toolsettings, 0);
|
||||||
|
|
||||||
@ -820,6 +823,9 @@ void BKE_scene_init(Scene *sce)
|
|||||||
sce->display.matcap_ssao_attenuation = 1.0f;
|
sce->display.matcap_ssao_attenuation = 1.0f;
|
||||||
sce->display.matcap_ssao_samples = 16;
|
sce->display.matcap_ssao_samples = 16;
|
||||||
|
|
||||||
|
/* OpenGL Render. */
|
||||||
|
BKE_screen_view3d_shading_init(&sce->display.shading);
|
||||||
|
|
||||||
/* SceneEEVEE */
|
/* SceneEEVEE */
|
||||||
sce->eevee.gi_diffuse_bounces = 3;
|
sce->eevee.gi_diffuse_bounces = 3;
|
||||||
sce->eevee.gi_cubemap_resolution = 512;
|
sce->eevee.gi_cubemap_resolution = 512;
|
||||||
@ -1541,6 +1547,11 @@ bool BKE_scene_uses_blender_eevee(const Scene *scene)
|
|||||||
return STREQ(scene->r.engine, RE_engine_id_BLENDER_EEVEE);
|
return STREQ(scene->r.engine, RE_engine_id_BLENDER_EEVEE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool BKE_scene_uses_blender_opengl(const Scene *scene)
|
||||||
|
{
|
||||||
|
return STREQ(scene->r.engine, RE_engine_id_BLENDER_OPENGL);
|
||||||
|
}
|
||||||
|
|
||||||
bool BKE_scene_uses_cycles(const Scene *scene)
|
bool BKE_scene_uses_cycles(const Scene *scene)
|
||||||
{
|
{
|
||||||
return STREQ(scene->r.engine, RE_engine_id_CYCLES);
|
return STREQ(scene->r.engine, RE_engine_id_CYCLES);
|
||||||
|
@ -45,9 +45,10 @@
|
|||||||
#include "DNA_view3d_types.h"
|
#include "DNA_view3d_types.h"
|
||||||
#include "DNA_workspace_types.h"
|
#include "DNA_workspace_types.h"
|
||||||
|
|
||||||
|
#include "BLI_math_vector.h"
|
||||||
#include "BLI_listbase.h"
|
#include "BLI_listbase.h"
|
||||||
#include "BLI_utildefines.h"
|
|
||||||
#include "BLI_rect.h"
|
#include "BLI_rect.h"
|
||||||
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
#include "BKE_icons.h"
|
#include "BKE_icons.h"
|
||||||
#include "BKE_idprop.h"
|
#include "BKE_idprop.h"
|
||||||
@ -855,6 +856,21 @@ void BKE_screen_view3d_scene_sync(bScreen *sc, Scene *scene)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BKE_screen_view3d_shading_init(View3DShading *shading)
|
||||||
|
{
|
||||||
|
memset(shading, 0, sizeof(*shading));
|
||||||
|
|
||||||
|
shading->type = OB_SOLID;
|
||||||
|
shading->prev_type = OB_SOLID;
|
||||||
|
shading->flag = V3D_SHADING_SPECULAR_HIGHLIGHT;
|
||||||
|
shading->light = V3D_LIGHTING_STUDIO;
|
||||||
|
shading->shadow_intensity = 0.5f;
|
||||||
|
shading->xray_alpha = 0.5f;
|
||||||
|
shading->cavity_valley_factor = 1.0f;
|
||||||
|
shading->cavity_ridge_factor = 1.0f;
|
||||||
|
copy_v3_fl(shading->single_color, 0.8f);
|
||||||
|
}
|
||||||
|
|
||||||
/* magic zoom calculation, no idea what
|
/* magic zoom calculation, no idea what
|
||||||
* it signifies, if you find out, tell me! -zr
|
* it signifies, if you find out, tell me! -zr
|
||||||
*/
|
*/
|
||||||
|
@ -1615,5 +1615,11 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!DNA_struct_elem_find(fd->filesdna, "SceneDisplay", "View3DShading", "shading")) {
|
||||||
|
for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) {
|
||||||
|
BKE_screen_view3d_shading_init(&scene->display.shading);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -117,6 +117,7 @@ set(SRC
|
|||||||
engines/workbench/workbench_effect_taa.c
|
engines/workbench/workbench_effect_taa.c
|
||||||
engines/workbench/workbench_forward.c
|
engines/workbench/workbench_forward.c
|
||||||
engines/workbench/workbench_materials.c
|
engines/workbench/workbench_materials.c
|
||||||
|
engines/workbench/workbench_render.c
|
||||||
engines/workbench/workbench_studiolight.c
|
engines/workbench/workbench_studiolight.c
|
||||||
engines/workbench/workbench_volume.c
|
engines/workbench/workbench_volume.c
|
||||||
engines/workbench/solid_mode.c
|
engines/workbench/solid_mode.c
|
||||||
|
@ -30,6 +30,8 @@
|
|||||||
|
|
||||||
#include "GPU_shader.h"
|
#include "GPU_shader.h"
|
||||||
|
|
||||||
|
#include "RE_pipeline.h"
|
||||||
|
|
||||||
#include "workbench_private.h"
|
#include "workbench_private.h"
|
||||||
|
|
||||||
/* Functions */
|
/* Functions */
|
||||||
@ -69,6 +71,7 @@ static void workbench_solid_draw_scene(void *vedata)
|
|||||||
{
|
{
|
||||||
WORKBENCH_Data *data = vedata;
|
WORKBENCH_Data *data = vedata;
|
||||||
workbench_deferred_draw_scene(data);
|
workbench_deferred_draw_scene(data);
|
||||||
|
workbench_deferred_draw_finish(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void workbench_solid_engine_free(void)
|
static void workbench_solid_engine_free(void)
|
||||||
@ -82,6 +85,11 @@ static void workbench_solid_view_update(void *vedata)
|
|||||||
workbench_taa_view_updated(data);
|
workbench_taa_view_updated(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void workbench_render_to_image(void *vedata, RenderEngine *engine, RenderLayer *render_layer, const rcti *rect)
|
||||||
|
{
|
||||||
|
workbench_render(vedata, engine, render_layer, rect);
|
||||||
|
}
|
||||||
|
|
||||||
static const DrawEngineDataSize workbench_data_size = DRW_VIEWPORT_DATA_SIZE(WORKBENCH_Data);
|
static const DrawEngineDataSize workbench_data_size = DRW_VIEWPORT_DATA_SIZE(WORKBENCH_Data);
|
||||||
|
|
||||||
DrawEngineType draw_engine_workbench_solid = {
|
DrawEngineType draw_engine_workbench_solid = {
|
||||||
@ -97,5 +105,5 @@ DrawEngineType draw_engine_workbench_solid = {
|
|||||||
&workbench_solid_draw_scene,
|
&workbench_solid_draw_scene,
|
||||||
&workbench_solid_view_update,
|
&workbench_solid_view_update,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
&workbench_render_to_image,
|
||||||
};
|
};
|
||||||
|
@ -19,37 +19,37 @@ void workbench_private_data_init(WORKBENCH_PrivateData *wpd)
|
|||||||
wpd->user_preferences = &U;
|
wpd->user_preferences = &U;
|
||||||
|
|
||||||
View3D *v3d = draw_ctx->v3d;
|
View3D *v3d = draw_ctx->v3d;
|
||||||
if (v3d) {
|
if (!v3d) {
|
||||||
wpd->shading = v3d->shading;
|
wpd->shading = scene->display.shading;
|
||||||
if (wpd->shading.light == V3D_LIGHTING_MATCAP) {
|
}
|
||||||
wpd->studio_light = BKE_studiolight_find(
|
else if (v3d->shading.type == OB_RENDER &&
|
||||||
wpd->shading.matcap, STUDIOLIGHT_ORIENTATION_VIEWNORMAL);
|
BKE_scene_uses_blender_opengl(scene))
|
||||||
}
|
{
|
||||||
else {
|
wpd->shading = scene->display.shading;
|
||||||
wpd->studio_light = BKE_studiolight_find(
|
|
||||||
wpd->shading.studio_light, STUDIOLIGHT_ORIENTATION_CAMERA | STUDIOLIGHT_ORIENTATION_WORLD);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
memset(&wpd->shading, 0, sizeof(wpd->shading));
|
wpd->shading = v3d->shading;
|
||||||
wpd->shading.light = V3D_LIGHTING_STUDIO;
|
}
|
||||||
wpd->shading.shadow_intensity = 0.5;
|
|
||||||
copy_v3_fl(wpd->shading.single_color, 0.8f);
|
if (wpd->shading.light == V3D_LIGHTING_MATCAP) {
|
||||||
wpd->studio_light = BKE_studiolight_find_first(STUDIOLIGHT_INTERNAL);
|
wpd->studio_light = BKE_studiolight_find(
|
||||||
|
wpd->shading.matcap, STUDIOLIGHT_ORIENTATION_VIEWNORMAL);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
wpd->studio_light = BKE_studiolight_find(
|
||||||
|
wpd->shading.studio_light, STUDIOLIGHT_ORIENTATION_CAMERA | STUDIOLIGHT_ORIENTATION_WORLD);
|
||||||
}
|
}
|
||||||
wpd->shadow_multiplier = 1.0 - wpd->shading.shadow_intensity;
|
wpd->shadow_multiplier = 1.0 - wpd->shading.shadow_intensity;
|
||||||
|
|
||||||
WORKBENCH_UBO_World *wd = &wpd->world_data;
|
WORKBENCH_UBO_World *wd = &wpd->world_data;
|
||||||
wd->matcap_orientation = (wpd->shading.flag & V3D_SHADING_MATCAP_FLIP_X) != 0;
|
wd->matcap_orientation = (wpd->shading.flag & V3D_SHADING_MATCAP_FLIP_X) != 0;
|
||||||
wd->background_alpha = 1.0f;
|
wd->background_alpha = (v3d || scene->r.alphamode == R_ADDSKY) ? 1.0f : 0.0f;
|
||||||
|
|
||||||
if ((v3d->flag3 & V3D_SHOW_WORLD) &&
|
if (!v3d || ((v3d->flag3 & V3D_SHOW_WORLD) && (scene->world != NULL))) {
|
||||||
(scene->world != NULL))
|
|
||||||
{
|
|
||||||
copy_v3_v3(wd->background_color_low, &scene->world->horr);
|
copy_v3_v3(wd->background_color_low, &scene->world->horr);
|
||||||
copy_v3_v3(wd->background_color_high, &scene->world->horr);
|
copy_v3_v3(wd->background_color_high, &scene->world->horr);
|
||||||
}
|
}
|
||||||
else {
|
else if (v3d) {
|
||||||
UI_GetThemeColor3fv(UI_GetThemeValue(TH_SHOW_BACK_GRAD) ? TH_LOW_GRAD : TH_HIGH_GRAD, wd->background_color_low);
|
UI_GetThemeColor3fv(UI_GetThemeValue(TH_SHOW_BACK_GRAD) ? TH_LOW_GRAD : TH_HIGH_GRAD, wd->background_color_low);
|
||||||
UI_GetThemeColor3fv(TH_HIGH_GRAD, wd->background_color_high);
|
UI_GetThemeColor3fv(TH_HIGH_GRAD, wd->background_color_high);
|
||||||
|
|
||||||
@ -58,6 +58,10 @@ void workbench_private_data_init(WORKBENCH_PrivateData *wpd)
|
|||||||
srgb_to_linearrgb_v3_v3(wd->background_color_high, wd->background_color_high);
|
srgb_to_linearrgb_v3_v3(wd->background_color_high, wd->background_color_high);
|
||||||
srgb_to_linearrgb_v3_v3(wd->background_color_low, wd->background_color_low);
|
srgb_to_linearrgb_v3_v3(wd->background_color_low, wd->background_color_low);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
zero_v3(wd->background_color_low);
|
||||||
|
zero_v3(wd->background_color_high);
|
||||||
|
}
|
||||||
|
|
||||||
studiolight_update_world(wpd->studio_light, wd);
|
studiolight_update_world(wpd->studio_light, wd);
|
||||||
|
|
||||||
|
@ -842,6 +842,7 @@ void workbench_deferred_draw_scene(WORKBENCH_Data *vedata)
|
|||||||
WORKBENCH_PrivateData *wpd = stl->g_data;
|
WORKBENCH_PrivateData *wpd = stl->g_data;
|
||||||
DefaultFramebufferList *dfbl = DRW_viewport_framebuffer_list_get();
|
DefaultFramebufferList *dfbl = DRW_viewport_framebuffer_list_get();
|
||||||
|
|
||||||
|
/* TODO. */
|
||||||
if (TAA_ENABLED(wpd)) {
|
if (TAA_ENABLED(wpd)) {
|
||||||
workbench_taa_draw_scene_start(vedata);
|
workbench_taa_draw_scene_start(vedata);
|
||||||
}
|
}
|
||||||
@ -885,7 +886,15 @@ void workbench_deferred_draw_scene(WORKBENCH_Data *vedata)
|
|||||||
DRW_draw_pass(psl->volume_pass);
|
DRW_draw_pass(psl->volume_pass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO */
|
||||||
workbench_aa_draw_pass(vedata, e_data.composite_buffer_tx);
|
workbench_aa_draw_pass(vedata, e_data.composite_buffer_tx);
|
||||||
|
}
|
||||||
|
|
||||||
|
void workbench_deferred_draw_finish(WORKBENCH_Data *vedata)
|
||||||
|
{
|
||||||
|
WORKBENCH_StorageList *stl = vedata->stl;
|
||||||
|
WORKBENCH_PrivateData *wpd = stl->g_data;
|
||||||
|
|
||||||
workbench_private_data_free(wpd);
|
workbench_private_data_free(wpd);
|
||||||
workbench_volume_smoke_textures_free(wpd);
|
workbench_volume_smoke_textures_free(wpd);
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,18 @@ void workbench_aa_create_pass(WORKBENCH_Data *vedata, GPUTexture **tx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void workspace_aa_draw_transform(GPUTexture *tx)
|
||||||
|
{
|
||||||
|
if (DRW_state_is_image_render()) {
|
||||||
|
/* Linear result for render. */
|
||||||
|
DRW_transform_none(tx);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* Display space result for viewport. */
|
||||||
|
DRW_transform_to_display(tx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void workbench_aa_draw_pass(WORKBENCH_Data *vedata, GPUTexture *tx)
|
void workbench_aa_draw_pass(WORKBENCH_Data *vedata, GPUTexture *tx)
|
||||||
{
|
{
|
||||||
WORKBENCH_StorageList *stl = vedata->stl;
|
WORKBENCH_StorageList *stl = vedata->stl;
|
||||||
@ -56,7 +68,7 @@ void workbench_aa_draw_pass(WORKBENCH_Data *vedata, GPUTexture *tx)
|
|||||||
DefaultFramebufferList *dfbl = DRW_viewport_framebuffer_list_get();
|
DefaultFramebufferList *dfbl = DRW_viewport_framebuffer_list_get();
|
||||||
if (FXAA_ENABLED(wpd)) {
|
if (FXAA_ENABLED(wpd)) {
|
||||||
GPU_framebuffer_bind(fbl->effect_fb);
|
GPU_framebuffer_bind(fbl->effect_fb);
|
||||||
DRW_transform_to_display(tx);
|
workspace_aa_draw_transform(tx);
|
||||||
GPU_framebuffer_bind(dfbl->color_only_fb);
|
GPU_framebuffer_bind(dfbl->color_only_fb);
|
||||||
DRW_draw_pass(psl->effect_aa_pass);
|
DRW_draw_pass(psl->effect_aa_pass);
|
||||||
}
|
}
|
||||||
@ -69,11 +81,11 @@ void workbench_aa_draw_pass(WORKBENCH_Data *vedata, GPUTexture *tx)
|
|||||||
*/
|
*/
|
||||||
if (effect_info->jitter_index == 1) {
|
if (effect_info->jitter_index == 1) {
|
||||||
GPU_framebuffer_bind(dfbl->color_only_fb);
|
GPU_framebuffer_bind(dfbl->color_only_fb);
|
||||||
DRW_transform_to_display(tx);
|
workspace_aa_draw_transform(tx);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
GPU_framebuffer_bind(fbl->effect_fb);
|
GPU_framebuffer_bind(fbl->effect_fb);
|
||||||
DRW_transform_to_display(tx);
|
workspace_aa_draw_transform(tx);
|
||||||
GPU_framebuffer_bind(dfbl->color_only_fb);
|
GPU_framebuffer_bind(dfbl->color_only_fb);
|
||||||
DRW_draw_pass(psl->effect_aa_pass);
|
DRW_draw_pass(psl->effect_aa_pass);
|
||||||
}
|
}
|
||||||
@ -81,6 +93,6 @@ void workbench_aa_draw_pass(WORKBENCH_Data *vedata, GPUTexture *tx)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
GPU_framebuffer_bind(dfbl->color_only_fb);
|
GPU_framebuffer_bind(dfbl->color_only_fb);
|
||||||
DRW_transform_to_display(tx);
|
workspace_aa_draw_transform(tx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,15 +93,19 @@ int workbench_taa_calculate_num_iterations(WORKBENCH_Data *vedata)
|
|||||||
WORKBENCH_PrivateData *wpd = stl->g_data;
|
WORKBENCH_PrivateData *wpd = stl->g_data;
|
||||||
int result = 1;
|
int result = 1;
|
||||||
if (TAA_ENABLED(wpd)) {
|
if (TAA_ENABLED(wpd)) {
|
||||||
if (IN_RANGE_INCL(
|
if (DRW_state_is_image_render()) {
|
||||||
|
const Scene *scene = DRW_context_state_get()->scene;
|
||||||
|
result = (scene->r.mode & R_OSA) ? scene->r.osa : 1;
|
||||||
|
}
|
||||||
|
else if (IN_RANGE_INCL(
|
||||||
wpd->user_preferences->gpu_viewport_quality,
|
wpd->user_preferences->gpu_viewport_quality,
|
||||||
GPU_VIEWPORT_QUALITY_TAA8, GPU_VIEWPORT_QUALITY_TAA16))
|
GPU_VIEWPORT_QUALITY_TAA8, GPU_VIEWPORT_QUALITY_TAA16))
|
||||||
{
|
{
|
||||||
result = 8;
|
result = 8;
|
||||||
}
|
}
|
||||||
else if (IN_RANGE_INCL(
|
else if (IN_RANGE_INCL(
|
||||||
wpd->user_preferences->gpu_viewport_quality,
|
wpd->user_preferences->gpu_viewport_quality,
|
||||||
GPU_VIEWPORT_QUALITY_TAA16, GPU_VIEWPORT_QUALITY_TAA32))
|
GPU_VIEWPORT_QUALITY_TAA16, GPU_VIEWPORT_QUALITY_TAA32))
|
||||||
{
|
{
|
||||||
result = 16;
|
result = 16;
|
||||||
}
|
}
|
||||||
@ -276,10 +280,12 @@ void workbench_taa_draw_scene_end(WORKBENCH_Data *vedata)
|
|||||||
|
|
||||||
GPU_framebuffer_blit(dfbl->color_only_fb, 0, fbl->effect_taa_fb, 0, GPU_COLOR_BIT);
|
GPU_framebuffer_blit(dfbl->color_only_fb, 0, fbl->effect_taa_fb, 0, GPU_COLOR_BIT);
|
||||||
|
|
||||||
DRW_viewport_matrix_override_unset_all();
|
if (!DRW_state_is_image_render()) {
|
||||||
|
DRW_viewport_matrix_override_unset_all();
|
||||||
|
}
|
||||||
|
|
||||||
copy_m4_m4(effect_info->last_mat, effect_info->curr_mat);
|
copy_m4_m4(effect_info->last_mat, effect_info->curr_mat);
|
||||||
if (effect_info->jitter_index != 0) {
|
if (effect_info->jitter_index != 0 && !DRW_state_is_image_render()) {
|
||||||
DRW_viewport_request_redraw();
|
DRW_viewport_request_redraw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,16 +29,16 @@
|
|||||||
#include "DRW_render.h"
|
#include "DRW_render.h"
|
||||||
|
|
||||||
#include "workbench_engine.h"
|
#include "workbench_engine.h"
|
||||||
/* Shaders */
|
#include "workbench_private.h"
|
||||||
|
|
||||||
#define WORKBENCH_ENGINE "BLENDER_WORKBENCH"
|
|
||||||
|
|
||||||
|
#define OPENGL_ENGINE "BLENDER_OPENGL"
|
||||||
|
|
||||||
/* Note: currently unused, we may want to register so we can see this when debugging the view. */
|
/* Note: currently unused, we may want to register so we can see this when debugging the view. */
|
||||||
RenderEngineType DRW_engine_viewport_workbench_type = {
|
RenderEngineType DRW_engine_viewport_opengl_type = {
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
WORKBENCH_ENGINE, N_("Workbench"), RE_INTERNAL,
|
OPENGL_ENGINE, N_("OpenGL"), RE_INTERNAL,
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
NULL, &DRW_render_to_image, NULL, NULL, NULL, NULL,
|
||||||
|
&workbench_render_update_passes,
|
||||||
&draw_engine_workbench_solid,
|
&draw_engine_workbench_solid,
|
||||||
{NULL, NULL, NULL}
|
{NULL, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
@ -28,6 +28,6 @@
|
|||||||
|
|
||||||
extern DrawEngineType draw_engine_workbench_solid;
|
extern DrawEngineType draw_engine_workbench_solid;
|
||||||
extern DrawEngineType draw_engine_workbench_transparent;
|
extern DrawEngineType draw_engine_workbench_transparent;
|
||||||
extern RenderEngineType DRW_engine_viewport_workbench_type;
|
extern RenderEngineType DRW_engine_viewport_opengl_type;
|
||||||
|
|
||||||
#endif /* __WORKBENCH_ENGINE_H__ */
|
#endif /* __WORKBENCH_ENGINE_H__ */
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
#include "DRW_render.h"
|
#include "DRW_render.h"
|
||||||
|
|
||||||
|
#include "workbench_engine.h"
|
||||||
|
|
||||||
#define WORKBENCH_ENGINE "BLENDER_WORKBENCH"
|
#define WORKBENCH_ENGINE "BLENDER_WORKBENCH"
|
||||||
#define M_GOLDEN_RATION_CONJUGATE 0.618033988749895
|
#define M_GOLDEN_RATION_CONJUGATE 0.618033988749895
|
||||||
@ -51,7 +52,7 @@
|
|||||||
#define CAVITY_ENABLED(wpd) (wpd->shading.flag & V3D_SHADING_CAVITY)
|
#define CAVITY_ENABLED(wpd) (wpd->shading.flag & V3D_SHADING_CAVITY)
|
||||||
#define SHADOW_ENABLED(wpd) (wpd->shading.flag & V3D_SHADING_SHADOW)
|
#define SHADOW_ENABLED(wpd) (wpd->shading.flag & V3D_SHADING_SHADOW)
|
||||||
|
|
||||||
#define IS_NAVIGATING(wpd) (DRW_context_state_get()->rv3d->rflag & RV3D_NAVIGATING)
|
#define IS_NAVIGATING(wpd) ((DRW_context_state_get()->rv3d) && (DRW_context_state_get()->rv3d->rflag & RV3D_NAVIGATING))
|
||||||
#define FXAA_ENABLED(wpd) ((!DRW_state_is_opengl_render()) && (IN_RANGE(wpd->user_preferences->gpu_viewport_quality, GPU_VIEWPORT_QUALITY_FXAA, GPU_VIEWPORT_QUALITY_TAA8) || ((wpd->user_preferences->gpu_viewport_quality >= GPU_VIEWPORT_QUALITY_TAA8) && IS_NAVIGATING(wpd))))
|
#define FXAA_ENABLED(wpd) ((!DRW_state_is_opengl_render()) && (IN_RANGE(wpd->user_preferences->gpu_viewport_quality, GPU_VIEWPORT_QUALITY_FXAA, GPU_VIEWPORT_QUALITY_TAA8) || ((wpd->user_preferences->gpu_viewport_quality >= GPU_VIEWPORT_QUALITY_TAA8) && IS_NAVIGATING(wpd))))
|
||||||
#define TAA_ENABLED(wpd) (wpd->user_preferences->gpu_viewport_quality >= GPU_VIEWPORT_QUALITY_TAA8 && !IS_NAVIGATING(wpd))
|
#define TAA_ENABLED(wpd) (wpd->user_preferences->gpu_viewport_quality >= GPU_VIEWPORT_QUALITY_TAA8 && !IS_NAVIGATING(wpd))
|
||||||
#define SPECULAR_HIGHLIGHT_ENABLED(wpd) ((wpd->shading.flag & V3D_SHADING_SPECULAR_HIGHLIGHT) && (!STUDIOLIGHT_ORIENTATION_VIEWNORMAL_ENABLED(wpd)))
|
#define SPECULAR_HIGHLIGHT_ENABLED(wpd) ((wpd->shading.flag & V3D_SHADING_SPECULAR_HIGHLIGHT) && (!STUDIOLIGHT_ORIENTATION_VIEWNORMAL_ENABLED(wpd)))
|
||||||
@ -61,6 +62,11 @@
|
|||||||
#define NORMAL_ENCODING_ENABLED() (true)
|
#define NORMAL_ENCODING_ENABLED() (true)
|
||||||
|
|
||||||
|
|
||||||
|
struct RenderEngine;
|
||||||
|
struct RenderLayer;
|
||||||
|
struct rcti;
|
||||||
|
|
||||||
|
|
||||||
typedef struct WORKBENCH_FramebufferList {
|
typedef struct WORKBENCH_FramebufferList {
|
||||||
/* Deferred render buffers */
|
/* Deferred render buffers */
|
||||||
struct GPUFrameBuffer *prepass_fb;
|
struct GPUFrameBuffer *prepass_fb;
|
||||||
@ -231,6 +237,7 @@ void workbench_deferred_engine_init(WORKBENCH_Data *vedata);
|
|||||||
void workbench_deferred_engine_free(void);
|
void workbench_deferred_engine_free(void);
|
||||||
void workbench_deferred_draw_background(WORKBENCH_Data *vedata);
|
void workbench_deferred_draw_background(WORKBENCH_Data *vedata);
|
||||||
void workbench_deferred_draw_scene(WORKBENCH_Data *vedata);
|
void workbench_deferred_draw_scene(WORKBENCH_Data *vedata);
|
||||||
|
void workbench_deferred_draw_finish(WORKBENCH_Data *vedata);
|
||||||
void workbench_deferred_cache_init(WORKBENCH_Data *vedata);
|
void workbench_deferred_cache_init(WORKBENCH_Data *vedata);
|
||||||
void workbench_deferred_solid_cache_populate(WORKBENCH_Data *vedata, Object *ob);
|
void workbench_deferred_solid_cache_populate(WORKBENCH_Data *vedata, Object *ob);
|
||||||
void workbench_deferred_cache_finish(WORKBENCH_Data *vedata);
|
void workbench_deferred_cache_finish(WORKBENCH_Data *vedata);
|
||||||
@ -293,8 +300,8 @@ void workbench_volume_cache_init(WORKBENCH_Data *vedata);
|
|||||||
void workbench_volume_cache_populate(WORKBENCH_Data *vedata, Scene *scene, Object *ob, struct ModifierData *md);
|
void workbench_volume_cache_populate(WORKBENCH_Data *vedata, Scene *scene, Object *ob, struct ModifierData *md);
|
||||||
void workbench_volume_smoke_textures_free(WORKBENCH_PrivateData *wpd);
|
void workbench_volume_smoke_textures_free(WORKBENCH_PrivateData *wpd);
|
||||||
|
|
||||||
|
/* workbench_render.c */
|
||||||
extern DrawEngineType draw_engine_workbench_solid;
|
void workbench_render(WORKBENCH_Data *vedata, struct RenderEngine *engine, struct RenderLayer *render_layer, const struct rcti *rect);
|
||||||
extern DrawEngineType draw_engine_workbench_transparent;
|
void workbench_render_update_passes(struct RenderEngine *engine, struct Scene *scene, struct ViewLayer *view_layer);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
172
source/blender/draw/engines/workbench/workbench_render.c
Normal file
172
source/blender/draw/engines/workbench/workbench_render.c
Normal file
@ -0,0 +1,172 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2016, Blender Foundation.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*
|
||||||
|
* Contributor(s): Blender Institute
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** \file workbench_render.c
|
||||||
|
* \ingroup draw_engine
|
||||||
|
*
|
||||||
|
* Render functions for final render output.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "BLI_rect.h"
|
||||||
|
|
||||||
|
#include "BKE_report.h"
|
||||||
|
|
||||||
|
#include "DRW_render.h"
|
||||||
|
|
||||||
|
#include "GPU_shader.h"
|
||||||
|
|
||||||
|
#include "DEG_depsgraph.h"
|
||||||
|
#include "DEG_depsgraph_query.h"
|
||||||
|
|
||||||
|
#include "RE_pipeline.h"
|
||||||
|
|
||||||
|
#include "workbench_private.h"
|
||||||
|
|
||||||
|
static void workbench_render_cache(
|
||||||
|
void *vedata, struct Object *ob,
|
||||||
|
struct RenderEngine *UNUSED(engine), struct Depsgraph *UNUSED(depsgraph))
|
||||||
|
{
|
||||||
|
workbench_deferred_solid_cache_populate(vedata, ob);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void workbench_render_matrices_init(RenderEngine *engine, Depsgraph *depsgraph)
|
||||||
|
{
|
||||||
|
/* TODO(sergey): Shall render hold pointer to an evaluated camera instead? */
|
||||||
|
Scene *scene = DEG_get_evaluated_scene(depsgraph);
|
||||||
|
struct Object *ob_camera_eval = DEG_get_evaluated_object(depsgraph, RE_GetCamera(engine->re));
|
||||||
|
float frame = BKE_scene_frame_get(scene);
|
||||||
|
|
||||||
|
/* Set the persective, view and window matrix. */
|
||||||
|
float winmat[4][4], wininv[4][4];
|
||||||
|
float viewmat[4][4], viewinv[4][4];
|
||||||
|
float persmat[4][4], persinv[4][4];
|
||||||
|
|
||||||
|
RE_GetCameraWindow(engine->re, ob_camera_eval, frame, winmat);
|
||||||
|
RE_GetCameraModelMatrix(engine->re, ob_camera_eval, viewinv);
|
||||||
|
|
||||||
|
invert_m4_m4(viewmat, viewinv);
|
||||||
|
mul_m4_m4m4(persmat, winmat, viewmat);
|
||||||
|
invert_m4_m4(persinv, persmat);
|
||||||
|
invert_m4_m4(wininv, winmat);
|
||||||
|
|
||||||
|
DRW_viewport_matrix_override_set(persmat, DRW_MAT_PERS);
|
||||||
|
DRW_viewport_matrix_override_set(persinv, DRW_MAT_PERSINV);
|
||||||
|
DRW_viewport_matrix_override_set(winmat, DRW_MAT_WIN);
|
||||||
|
DRW_viewport_matrix_override_set(wininv, DRW_MAT_WININV);
|
||||||
|
DRW_viewport_matrix_override_set(viewmat, DRW_MAT_VIEW);
|
||||||
|
DRW_viewport_matrix_override_set(viewinv, DRW_MAT_VIEWINV);
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool workbench_render_framebuffers_init(void)
|
||||||
|
{
|
||||||
|
/* For image render, allocate own buffers because we don't have a viewport. */
|
||||||
|
const float *viewport_size = DRW_viewport_size_get();
|
||||||
|
const int size[2] = {(int)viewport_size[0], (int)viewport_size[1]};
|
||||||
|
|
||||||
|
DefaultTextureList *dtxl = DRW_viewport_texture_list_get();
|
||||||
|
dtxl->color = GPU_texture_create_2D(size[0], size[1], GPU_RGBA8, NULL, NULL);
|
||||||
|
dtxl->depth = GPU_texture_create_2D(size[0], size[1], GPU_DEPTH24_STENCIL8, NULL, NULL);
|
||||||
|
|
||||||
|
if (!(dtxl->depth && dtxl->color)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
DefaultFramebufferList *dfbl = DRW_viewport_framebuffer_list_get();
|
||||||
|
|
||||||
|
GPU_framebuffer_ensure_config(&dfbl->default_fb, {
|
||||||
|
GPU_ATTACHMENT_TEXTURE(dtxl->depth),
|
||||||
|
GPU_ATTACHMENT_TEXTURE(dtxl->color)
|
||||||
|
});
|
||||||
|
|
||||||
|
GPU_framebuffer_ensure_config(&dfbl->depth_only_fb, {
|
||||||
|
GPU_ATTACHMENT_TEXTURE(dtxl->depth),
|
||||||
|
GPU_ATTACHMENT_NONE
|
||||||
|
});
|
||||||
|
|
||||||
|
GPU_framebuffer_ensure_config(&dfbl->color_only_fb, {
|
||||||
|
GPU_ATTACHMENT_NONE,
|
||||||
|
GPU_ATTACHMENT_TEXTURE(dtxl->color)
|
||||||
|
});
|
||||||
|
|
||||||
|
bool ok = true;
|
||||||
|
ok = ok && GPU_framebuffer_check_valid(dfbl->default_fb, NULL);
|
||||||
|
ok = ok && GPU_framebuffer_check_valid(dfbl->color_only_fb, NULL);
|
||||||
|
ok = ok && GPU_framebuffer_check_valid(dfbl->depth_only_fb, NULL);
|
||||||
|
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void workbench_render_framebuffers_finish(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void workbench_render(WORKBENCH_Data *data, RenderEngine *engine, RenderLayer *render_layer, const rcti *rect)
|
||||||
|
{
|
||||||
|
const DRWContextState *draw_ctx = DRW_context_state_get();
|
||||||
|
|
||||||
|
Depsgraph *depsgraph = draw_ctx->depsgraph;
|
||||||
|
workbench_render_matrices_init(engine, depsgraph);
|
||||||
|
|
||||||
|
if (!workbench_render_framebuffers_init()) {
|
||||||
|
RE_engine_report(engine, RPT_ERROR, "Failed to allocate OpenGL buffers");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Init engine. */
|
||||||
|
workbench_deferred_engine_init(data);
|
||||||
|
|
||||||
|
/* Init objects. */
|
||||||
|
workbench_deferred_cache_init(data);
|
||||||
|
DRW_render_object_iter(data, engine, depsgraph, workbench_render_cache);
|
||||||
|
workbench_deferred_cache_finish(data);
|
||||||
|
DRW_render_instance_buffer_finish();
|
||||||
|
|
||||||
|
/* Draw. */
|
||||||
|
int num_samples = workbench_taa_calculate_num_iterations(data);
|
||||||
|
for (int sample = 0; sample < num_samples; sample++) {
|
||||||
|
if (RE_engine_test_break(engine)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
workbench_deferred_draw_background(data);
|
||||||
|
workbench_deferred_draw_scene(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
workbench_deferred_draw_finish(data);
|
||||||
|
|
||||||
|
/* Write render output. */
|
||||||
|
const char *viewname = RE_GetActiveRenderView(engine->re);
|
||||||
|
RenderPass *rp = RE_pass_find_by_name(render_layer, RE_PASSNAME_COMBINED, viewname);
|
||||||
|
|
||||||
|
DefaultFramebufferList *dfbl = DRW_viewport_framebuffer_list_get();
|
||||||
|
GPU_framebuffer_bind(dfbl->color_only_fb);
|
||||||
|
GPU_framebuffer_read_color(dfbl->color_only_fb,
|
||||||
|
rect->xmin, rect->ymin,
|
||||||
|
BLI_rcti_size_x(rect), BLI_rcti_size_y(rect),
|
||||||
|
4, 0, rp->rect);
|
||||||
|
|
||||||
|
workbench_render_framebuffers_finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
@ -226,6 +226,7 @@ void DRW_uniformbuffer_free(struct GPUUniformBuffer *ubo);
|
|||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
void DRW_transform_to_display(struct GPUTexture *tex);
|
void DRW_transform_to_display(struct GPUTexture *tex);
|
||||||
|
void DRW_transform_none(struct GPUTexture *tex);
|
||||||
void DRW_multisamples_resolve(
|
void DRW_multisamples_resolve(
|
||||||
struct GPUTexture *src_depth, struct GPUTexture *src_color);
|
struct GPUTexture *src_depth, struct GPUTexture *src_color);
|
||||||
|
|
||||||
|
@ -51,6 +51,7 @@ static struct DRWShapeCache {
|
|||||||
Gwn_Batch *drw_cursor;
|
Gwn_Batch *drw_cursor;
|
||||||
Gwn_Batch *drw_cursor_only_circle;
|
Gwn_Batch *drw_cursor_only_circle;
|
||||||
Gwn_Batch *drw_fullscreen_quad;
|
Gwn_Batch *drw_fullscreen_quad;
|
||||||
|
Gwn_Batch *drw_fullscreen_quad_texcoord;
|
||||||
Gwn_Batch *drw_quad;
|
Gwn_Batch *drw_quad;
|
||||||
Gwn_Batch *drw_sphere;
|
Gwn_Batch *drw_sphere;
|
||||||
Gwn_Batch *drw_screenspace_circle;
|
Gwn_Batch *drw_screenspace_circle;
|
||||||
@ -287,6 +288,35 @@ Gwn_Batch *DRW_cache_fullscreen_quad_get(void)
|
|||||||
return SHC.drw_fullscreen_quad;
|
return SHC.drw_fullscreen_quad;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Gwn_Batch *DRW_cache_fullscreen_quad_texcoord_get(void)
|
||||||
|
{
|
||||||
|
if (!SHC.drw_fullscreen_quad_texcoord) {
|
||||||
|
/* Use a triangle instead of a real quad */
|
||||||
|
/* https://www.slideshare.net/DevCentralAMD/vertex-shader-tricks-bill-bilodeau - slide 14 */
|
||||||
|
float pos[3][2] = {{-1.0f, -1.0f}, { 3.0f, -1.0f}, {-1.0f, 3.0f}};
|
||||||
|
float texCoord[3][2] = {{ 0.0f, 0.0f}, { 2.0f, 0.0f}, { 0.0f, 2.0f}};
|
||||||
|
|
||||||
|
/* Position Only 2D format */
|
||||||
|
static Gwn_VertFormat format = { 0 };
|
||||||
|
static struct { uint pos, texCoord; } attr_id;
|
||||||
|
if (format.attr_len == 0) {
|
||||||
|
attr_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
|
||||||
|
attr_id.texCoord = GWN_vertformat_attr_add(&format, "texCoord", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
|
||||||
|
}
|
||||||
|
|
||||||
|
Gwn_VertBuf *vbo = GWN_vertbuf_create_with_format(&format);
|
||||||
|
GWN_vertbuf_data_alloc(vbo, 3);
|
||||||
|
|
||||||
|
for (int i = 0; i < 3; ++i) {
|
||||||
|
GWN_vertbuf_attr_set(vbo, attr_id.pos, i, pos[i]);
|
||||||
|
GWN_vertbuf_attr_set(vbo, attr_id.texCoord, i, texCoord[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
SHC.drw_fullscreen_quad_texcoord = GWN_batch_create_ex(GWN_PRIM_TRIS, vbo, NULL, GWN_BATCH_OWNS_VBO);
|
||||||
|
}
|
||||||
|
return SHC.drw_fullscreen_quad_texcoord;
|
||||||
|
}
|
||||||
|
|
||||||
/* Just a regular quad with 4 vertices. */
|
/* Just a regular quad with 4 vertices. */
|
||||||
Gwn_Batch *DRW_cache_quad_get(void)
|
Gwn_Batch *DRW_cache_quad_get(void)
|
||||||
{
|
{
|
||||||
|
@ -40,6 +40,7 @@ struct Gwn_Batch *DRW_cache_cursor_get(bool crosshair_lines);
|
|||||||
|
|
||||||
/* Common Shapes */
|
/* Common Shapes */
|
||||||
struct Gwn_Batch *DRW_cache_fullscreen_quad_get(void);
|
struct Gwn_Batch *DRW_cache_fullscreen_quad_get(void);
|
||||||
|
struct Gwn_Batch *DRW_cache_fullscreen_quad_texcoord_get(void);
|
||||||
struct Gwn_Batch *DRW_cache_quad_get(void);
|
struct Gwn_Batch *DRW_cache_quad_get(void);
|
||||||
struct Gwn_Batch *DRW_cache_cube_get(void);
|
struct Gwn_Batch *DRW_cache_cube_get(void);
|
||||||
struct Gwn_Batch *DRW_cache_sphere_get(void);
|
struct Gwn_Batch *DRW_cache_sphere_get(void);
|
||||||
|
@ -283,6 +283,29 @@ void DRW_transform_to_display(GPUTexture *tex)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Draw texture to framebuffer without any color transforms */
|
||||||
|
void DRW_transform_none(GPUTexture *tex)
|
||||||
|
{
|
||||||
|
/* Draw as texture for final render (without immediate mode). */
|
||||||
|
Gwn_Batch *geom = DRW_cache_fullscreen_quad_texcoord_get();
|
||||||
|
GWN_batch_program_set_builtin(geom, GPU_SHADER_2D_IMAGE_COLOR);
|
||||||
|
|
||||||
|
GPU_texture_bind(tex, 0);
|
||||||
|
|
||||||
|
const float white[4] = {1.0f, 1.0f, 1.0f, 1.0f};
|
||||||
|
GWN_batch_uniform_4fv(geom, "color", white);
|
||||||
|
|
||||||
|
float mat[4][4];
|
||||||
|
unit_m4(mat);
|
||||||
|
GWN_batch_uniform_mat4(geom, "ModelViewProjectionMatrix", mat);
|
||||||
|
|
||||||
|
GWN_batch_program_use_begin(geom);
|
||||||
|
GWN_batch_draw_range_ex(geom, 0, 0, false);
|
||||||
|
GWN_batch_program_use_end(geom);
|
||||||
|
|
||||||
|
GPU_texture_unbind(tex);
|
||||||
|
}
|
||||||
|
|
||||||
/** \} */
|
/** \} */
|
||||||
|
|
||||||
|
|
||||||
@ -2217,8 +2240,8 @@ void DRW_engine_register(DrawEngineType *draw_engine_type)
|
|||||||
|
|
||||||
void DRW_engines_register(void)
|
void DRW_engines_register(void)
|
||||||
{
|
{
|
||||||
|
RE_engines_register(&DRW_engine_viewport_opengl_type);
|
||||||
RE_engines_register(&DRW_engine_viewport_eevee_type);
|
RE_engines_register(&DRW_engine_viewport_eevee_type);
|
||||||
RE_engines_register(&DRW_engine_viewport_workbench_type);
|
|
||||||
|
|
||||||
DRW_engine_register(&draw_engine_workbench_solid);
|
DRW_engine_register(&draw_engine_workbench_solid);
|
||||||
DRW_engine_register(&draw_engine_workbench_transparent);
|
DRW_engine_register(&draw_engine_workbench_transparent);
|
||||||
|
@ -324,15 +324,7 @@ static SpaceLink *view3d_new(const ScrArea *UNUSED(sa), const Scene *scene)
|
|||||||
v3d->grid = 1.0f;
|
v3d->grid = 1.0f;
|
||||||
v3d->gridlines = 16;
|
v3d->gridlines = 16;
|
||||||
v3d->gridsubdiv = 10;
|
v3d->gridsubdiv = 10;
|
||||||
v3d->shading.type = OB_SOLID;
|
BKE_screen_view3d_shading_init(&v3d->shading);
|
||||||
v3d->shading.prev_type = OB_SOLID;
|
|
||||||
v3d->shading.flag = V3D_SHADING_SPECULAR_HIGHLIGHT;
|
|
||||||
v3d->shading.light = V3D_LIGHTING_STUDIO;
|
|
||||||
v3d->shading.shadow_intensity = 0.5f;
|
|
||||||
v3d->shading.xray_alpha = 0.5f;
|
|
||||||
v3d->shading.cavity_valley_factor = 1.0f;
|
|
||||||
v3d->shading.cavity_ridge_factor = 1.0f;
|
|
||||||
copy_v3_fl(v3d->shading.single_color, 0.8f);
|
|
||||||
|
|
||||||
v3d->overlay.wireframe_threshold = 0.5f;
|
v3d->overlay.wireframe_threshold = 0.5f;
|
||||||
v3d->overlay.bone_select_alpha = 0.5f;
|
v3d->overlay.bone_select_alpha = 0.5f;
|
||||||
|
@ -1381,6 +1381,9 @@ typedef struct SceneDisplay {
|
|||||||
float matcap_ssao_attenuation;
|
float matcap_ssao_attenuation;
|
||||||
int matcap_ssao_samples;
|
int matcap_ssao_samples;
|
||||||
int pad;
|
int pad;
|
||||||
|
|
||||||
|
/* OpenGL render engine settings. */
|
||||||
|
View3DShading shading;
|
||||||
} SceneDisplay;
|
} SceneDisplay;
|
||||||
|
|
||||||
typedef struct SceneEEVEE {
|
typedef struct SceneEEVEE {
|
||||||
@ -1707,7 +1710,7 @@ enum {
|
|||||||
|
|
||||||
/* RenderData.engine (scene.c) */
|
/* RenderData.engine (scene.c) */
|
||||||
extern const char *RE_engine_id_BLENDER_EEVEE;
|
extern const char *RE_engine_id_BLENDER_EEVEE;
|
||||||
extern const char *RE_engine_id_BLENDER_WORKBENCH;
|
extern const char *RE_engine_id_BLENDER_OPENGL;
|
||||||
extern const char *RE_engine_id_CYCLES;
|
extern const char *RE_engine_id_CYCLES;
|
||||||
|
|
||||||
/* **************** SCENE ********************* */
|
/* **************** SCENE ********************* */
|
||||||
|
@ -5753,6 +5753,10 @@ static void rna_def_scene_display(BlenderRNA *brna)
|
|||||||
RNA_def_property_int_default(prop, 16);
|
RNA_def_property_int_default(prop, 16);
|
||||||
RNA_def_property_ui_text(prop, "Samples", "Number of samples");
|
RNA_def_property_ui_text(prop, "Samples", "Number of samples");
|
||||||
RNA_def_property_range(prop, 1, 500);
|
RNA_def_property_range(prop, 1, 500);
|
||||||
|
|
||||||
|
/* OpenGL render engine settings. */
|
||||||
|
prop = RNA_def_property(srna, "shading", PROP_POINTER, PROP_NONE);
|
||||||
|
RNA_def_property_ui_text(prop, "Shading Settings", "Shading settings for OpenGL render engine");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rna_def_scene_eevee(BlenderRNA *brna)
|
static void rna_def_scene_eevee(BlenderRNA *brna)
|
||||||
|
@ -679,8 +679,12 @@ static void rna_RegionView3D_view_matrix_set(PointerRNA *ptr, const float *value
|
|||||||
|
|
||||||
static void rna_3DViewShading_type_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
|
static void rna_3DViewShading_type_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
|
||||||
{
|
{
|
||||||
bScreen *screen = ptr->id.data;
|
ID *id = ptr->id.data;
|
||||||
|
if (GS(id->name) == ID_SCE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
bScreen *screen = ptr->id.data;
|
||||||
for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
|
for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
|
||||||
for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
|
for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
|
||||||
if (sl->spacetype == SPACE_VIEW3D) {
|
if (sl->spacetype == SPACE_VIEW3D) {
|
||||||
@ -694,20 +698,40 @@ static void rna_3DViewShading_type_update(Main *bmain, Scene *UNUSED(scene), Poi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Scene *rna_3DViewShading_scene(PointerRNA *ptr)
|
||||||
|
{
|
||||||
|
/* Get scene, depends if using 3D view or OpenGL render settings. */
|
||||||
|
ID *id = ptr->id.data;
|
||||||
|
if (GS(id->name) == ID_SCE) {
|
||||||
|
return (Scene *)id;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
bScreen *screen = ptr->id.data;
|
||||||
|
return WM_windows_scene_get_from_screen(G_MAIN->wm.first, screen);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int rna_3DViewShading_type_get(PointerRNA *ptr)
|
static int rna_3DViewShading_type_get(PointerRNA *ptr)
|
||||||
{
|
{
|
||||||
bScreen *screen = ptr->id.data;
|
/* Available shading types depend on render engine. */
|
||||||
Scene *scene = WM_windows_scene_get_from_screen(G_MAIN->wm.first, screen);
|
Scene *scene = rna_3DViewShading_scene(ptr);
|
||||||
RenderEngineType *type = RE_engines_find(scene->r.engine);
|
RenderEngineType *type = RE_engines_find(scene->r.engine);
|
||||||
View3DShading *shading = (View3DShading *)ptr->data;
|
View3DShading *shading = (View3DShading *)ptr->data;
|
||||||
|
|
||||||
if (!BKE_scene_uses_blender_eevee(scene) && shading->type == OB_RENDER) {
|
if (BKE_scene_uses_blender_eevee(scene)) {
|
||||||
if (!(type && type->view_draw)) {
|
return shading->type;
|
||||||
|
}
|
||||||
|
else if (BKE_scene_uses_blender_opengl(scene)) {
|
||||||
|
return (shading->type == OB_MATERIAL) ? OB_RENDER : shading->type;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (shading->type == OB_RENDER && !(type && type->view_draw)) {
|
||||||
return OB_MATERIAL;
|
return OB_MATERIAL;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
return shading->type;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return shading->type;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rna_3DViewShading_type_set(PointerRNA *ptr, int value)
|
static void rna_3DViewShading_type_set(PointerRNA *ptr, int value)
|
||||||
@ -720,11 +744,10 @@ static void rna_3DViewShading_type_set(PointerRNA *ptr, int value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const EnumPropertyItem *rna_3DViewShading_type_itemf(
|
static const EnumPropertyItem *rna_3DViewShading_type_itemf(
|
||||||
bContext *C, PointerRNA *UNUSED(ptr),
|
bContext *UNUSED(C), PointerRNA *ptr,
|
||||||
PropertyRNA *UNUSED(prop), bool *r_free)
|
PropertyRNA *UNUSED(prop), bool *r_free)
|
||||||
{
|
{
|
||||||
wmWindow *win = CTX_wm_window(C);
|
Scene *scene = rna_3DViewShading_scene(ptr);
|
||||||
Scene *scene = WM_window_get_active_scene(win);
|
|
||||||
RenderEngineType *type = RE_engines_find(scene->r.engine);
|
RenderEngineType *type = RE_engines_find(scene->r.engine);
|
||||||
|
|
||||||
EnumPropertyItem *item = NULL;
|
EnumPropertyItem *item = NULL;
|
||||||
@ -736,6 +759,9 @@ static const EnumPropertyItem *rna_3DViewShading_type_itemf(
|
|||||||
RNA_enum_items_add_value(&item, &totitem, rna_enum_shading_type_items, OB_MATERIAL);
|
RNA_enum_items_add_value(&item, &totitem, rna_enum_shading_type_items, OB_MATERIAL);
|
||||||
RNA_enum_items_add_value(&item, &totitem, rna_enum_shading_type_items, OB_RENDER);
|
RNA_enum_items_add_value(&item, &totitem, rna_enum_shading_type_items, OB_RENDER);
|
||||||
}
|
}
|
||||||
|
else if (BKE_scene_uses_blender_opengl(scene)) {
|
||||||
|
RNA_enum_items_add_value(&item, &totitem, rna_enum_shading_type_items, OB_RENDER);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
RNA_enum_items_add_value(&item, &totitem, rna_enum_shading_type_items, OB_MATERIAL);
|
RNA_enum_items_add_value(&item, &totitem, rna_enum_shading_type_items, OB_MATERIAL);
|
||||||
if (type && type->view_draw) {
|
if (type && type->view_draw) {
|
||||||
@ -2401,6 +2427,8 @@ static void rna_def_space_view3d_shading(BlenderRNA *brna)
|
|||||||
StructRNA *srna;
|
StructRNA *srna;
|
||||||
PropertyRNA *prop;
|
PropertyRNA *prop;
|
||||||
|
|
||||||
|
/* Note these settings are used for both 3D viewport and the OpenGL render
|
||||||
|
* engine in the scene, so can't assume to always be part of a screen. */
|
||||||
srna = RNA_def_struct(brna, "View3DShading", NULL);
|
srna = RNA_def_struct(brna, "View3DShading", NULL);
|
||||||
RNA_def_struct_path_func(srna, "rna_View3DShading_path");
|
RNA_def_struct_path_func(srna, "rna_View3DShading_path");
|
||||||
RNA_def_struct_ui_text(srna, "3D View Shading Settings", "Settings for shading in the 3D viewport");
|
RNA_def_struct_ui_text(srna, "3D View Shading Settings", "Settings for shading in the 3D viewport");
|
||||||
|
Loading…
Reference in New Issue
Block a user