2011-04-27 11:58:34 +00:00
|
|
|
#
|
2013-08-18 14:16:15 +00:00
|
|
|
# Copyright 2011-2013 Blender Foundation
|
2011-04-27 11:58:34 +00:00
|
|
|
#
|
2013-08-18 14:16:15 +00:00
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
|
# You may obtain a copy of the License at
|
2011-04-27 11:58:34 +00:00
|
|
|
#
|
2013-08-18 14:16:15 +00:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2011-04-27 11:58:34 +00:00
|
|
|
#
|
2013-08-18 14:16:15 +00:00
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
# See the License for the specific language governing permissions and
|
2014-12-25 02:50:24 +01:00
|
|
|
# limitations under the License.
|
2011-04-27 11:58:34 +00:00
|
|
|
#
|
|
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
# <pep8 compliant>
|
|
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
import bpy
|
2017-05-30 17:15:58 +02:00
|
|
|
from bpy_extras.node_utils import find_node_input, find_output_node
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2015-05-17 17:17:31 +10:00
|
|
|
from bpy.types import (
|
|
|
|
|
Panel,
|
|
|
|
|
Menu,
|
|
|
|
|
Operator,
|
|
|
|
|
)
|
2011-08-29 13:59:11 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2013-07-19 23:59:40 +00:00
|
|
|
class CYCLES_MT_sampling_presets(Menu):
|
|
|
|
|
bl_label = "Sampling Presets"
|
|
|
|
|
preset_subdir = "cycles/sampling"
|
|
|
|
|
preset_operator = "script.execute_preset"
|
|
|
|
|
COMPAT_ENGINES = {'CYCLES'}
|
|
|
|
|
draw = Menu.draw_preset
|
|
|
|
|
|
|
|
|
|
|
2011-08-29 17:55:14 +00:00
|
|
|
class CYCLES_MT_integrator_presets(Menu):
|
|
|
|
|
bl_label = "Integrator Presets"
|
|
|
|
|
preset_subdir = "cycles/integrator"
|
|
|
|
|
preset_operator = "script.execute_preset"
|
|
|
|
|
COMPAT_ENGINES = {'CYCLES'}
|
|
|
|
|
draw = Menu.draw_preset
|
|
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2015-01-29 15:35:06 +11:00
|
|
|
class CyclesButtonsPanel:
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_space_type = "PROPERTIES"
|
|
|
|
|
bl_region_type = "WINDOW"
|
|
|
|
|
bl_context = "render"
|
2014-02-09 13:53:58 +01:00
|
|
|
COMPAT_ENGINES = {'CYCLES'}
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2018-04-03 14:04:59 +02:00
|
|
|
return context.engine in cls.COMPAT_ENGINES
|
2014-04-15 13:11:48 +10:00
|
|
|
|
|
|
|
|
|
Cycles: Refactor Device selection to allow individual GPU compute device selection
Previously, it was only possible to choose a single GPU or all of that type (CUDA or OpenCL).
Now, a toggle button is displayed for every device.
These settings are tied to the PCI Bus ID of the devices, so they're consistent across hardware addition and removal (but not when swapping/moving cards).
From the code perspective, the more important change is that now, the compute device properties are stored in the Addon preferences of the Cycles addon, instead of directly in the User Preferences.
This allows for a cleaner implementation, removing the Cycles C API functions that were called by the RNA code to specify the enum items.
Note that this change is neither backwards- nor forwards-compatible, but since it's only a User Preference no existing files are broken.
Reviewers: #cycles, brecht
Reviewed By: #cycles, brecht
Subscribers: brecht, juicyfruit, mib2berlin, Blendify
Differential Revision: https://developer.blender.org/D2338
2016-11-07 02:33:53 +01:00
|
|
|
def get_device_type(context):
|
|
|
|
|
return context.user_preferences.addons[__package__].preferences.compute_device_type
|
|
|
|
|
|
|
|
|
|
|
2014-04-05 12:31:59 +02:00
|
|
|
def use_cpu(context):
|
|
|
|
|
cscene = context.scene.cycles
|
2014-04-15 13:11:48 +10:00
|
|
|
|
Cycles: Refactor Device selection to allow individual GPU compute device selection
Previously, it was only possible to choose a single GPU or all of that type (CUDA or OpenCL).
Now, a toggle button is displayed for every device.
These settings are tied to the PCI Bus ID of the devices, so they're consistent across hardware addition and removal (but not when swapping/moving cards).
From the code perspective, the more important change is that now, the compute device properties are stored in the Addon preferences of the Cycles addon, instead of directly in the User Preferences.
This allows for a cleaner implementation, removing the Cycles C API functions that were called by the RNA code to specify the enum items.
Note that this change is neither backwards- nor forwards-compatible, but since it's only a User Preference no existing files are broken.
Reviewers: #cycles, brecht
Reviewed By: #cycles, brecht
Subscribers: brecht, juicyfruit, mib2berlin, Blendify
Differential Revision: https://developer.blender.org/D2338
2016-11-07 02:33:53 +01:00
|
|
|
return (get_device_type(context) == 'NONE' or cscene.device == 'CPU')
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2015-05-17 17:17:31 +10:00
|
|
|
|
2016-01-10 21:50:44 +01:00
|
|
|
def use_opencl(context):
|
|
|
|
|
cscene = context.scene.cycles
|
|
|
|
|
|
Cycles: Refactor Device selection to allow individual GPU compute device selection
Previously, it was only possible to choose a single GPU or all of that type (CUDA or OpenCL).
Now, a toggle button is displayed for every device.
These settings are tied to the PCI Bus ID of the devices, so they're consistent across hardware addition and removal (but not when swapping/moving cards).
From the code perspective, the more important change is that now, the compute device properties are stored in the Addon preferences of the Cycles addon, instead of directly in the User Preferences.
This allows for a cleaner implementation, removing the Cycles C API functions that were called by the RNA code to specify the enum items.
Note that this change is neither backwards- nor forwards-compatible, but since it's only a User Preference no existing files are broken.
Reviewers: #cycles, brecht
Reviewed By: #cycles, brecht
Subscribers: brecht, juicyfruit, mib2berlin, Blendify
Differential Revision: https://developer.blender.org/D2338
2016-11-07 02:33:53 +01:00
|
|
|
return (get_device_type(context) == 'OPENCL' and cscene.device == 'GPU')
|
2016-01-10 21:50:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def use_cuda(context):
|
|
|
|
|
cscene = context.scene.cycles
|
|
|
|
|
|
Cycles: Refactor Device selection to allow individual GPU compute device selection
Previously, it was only possible to choose a single GPU or all of that type (CUDA or OpenCL).
Now, a toggle button is displayed for every device.
These settings are tied to the PCI Bus ID of the devices, so they're consistent across hardware addition and removal (but not when swapping/moving cards).
From the code perspective, the more important change is that now, the compute device properties are stored in the Addon preferences of the Cycles addon, instead of directly in the User Preferences.
This allows for a cleaner implementation, removing the Cycles C API functions that were called by the RNA code to specify the enum items.
Note that this change is neither backwards- nor forwards-compatible, but since it's only a User Preference no existing files are broken.
Reviewers: #cycles, brecht
Reviewed By: #cycles, brecht
Subscribers: brecht, juicyfruit, mib2berlin, Blendify
Differential Revision: https://developer.blender.org/D2338
2016-11-07 02:33:53 +01:00
|
|
|
return (get_device_type(context) == 'CUDA' and cscene.device == 'GPU')
|
2016-01-10 21:50:44 +01:00
|
|
|
|
|
|
|
|
|
2015-05-10 12:55:30 +02:00
|
|
|
def use_branched_path(context):
|
|
|
|
|
cscene = context.scene.cycles
|
|
|
|
|
|
2017-03-20 22:31:54 -04:00
|
|
|
return (cscene.progressive == 'BRANCHED_PATH')
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2015-05-10 12:55:30 +02:00
|
|
|
|
2016-01-21 09:00:10 +01:00
|
|
|
def use_sample_all_lights(context):
|
|
|
|
|
cscene = context.scene.cycles
|
|
|
|
|
|
|
|
|
|
return cscene.sample_all_lights_direct or cscene.sample_all_lights_indirect
|
|
|
|
|
|
2017-03-12 06:45:29 +01:00
|
|
|
def show_device_active(context):
|
|
|
|
|
cscene = context.scene.cycles
|
|
|
|
|
if cscene.device != 'GPU':
|
Cycles: Refactor Device selection to allow individual GPU compute device selection
Previously, it was only possible to choose a single GPU or all of that type (CUDA or OpenCL).
Now, a toggle button is displayed for every device.
These settings are tied to the PCI Bus ID of the devices, so they're consistent across hardware addition and removal (but not when swapping/moving cards).
From the code perspective, the more important change is that now, the compute device properties are stored in the Addon preferences of the Cycles addon, instead of directly in the User Preferences.
This allows for a cleaner implementation, removing the Cycles C API functions that were called by the RNA code to specify the enum items.
Note that this change is neither backwards- nor forwards-compatible, but since it's only a User Preference no existing files are broken.
Reviewers: #cycles, brecht
Reviewed By: #cycles, brecht
Subscribers: brecht, juicyfruit, mib2berlin, Blendify
Differential Revision: https://developer.blender.org/D2338
2016-11-07 02:33:53 +01:00
|
|
|
return True
|
|
|
|
|
return context.user_preferences.addons[__package__].preferences.has_active_device()
|
|
|
|
|
|
2016-01-21 09:00:10 +01:00
|
|
|
|
2015-05-10 12:55:30 +02:00
|
|
|
def draw_samples_info(layout, context):
|
|
|
|
|
cscene = context.scene.cycles
|
2013-08-23 14:34:34 +00:00
|
|
|
integrator = cscene.progressive
|
2013-08-23 14:08:40 +00:00
|
|
|
|
2013-08-22 19:57:56 +00:00
|
|
|
# Calculate sample values
|
2013-08-23 14:08:40 +00:00
|
|
|
if integrator == 'PATH':
|
2013-08-22 19:57:56 +00:00
|
|
|
aa = cscene.samples
|
2017-08-20 23:46:05 +02:00
|
|
|
if cscene.use_square_samples:
|
|
|
|
|
aa = aa * aa
|
2013-08-22 19:57:56 +00:00
|
|
|
else:
|
|
|
|
|
aa = cscene.aa_samples
|
|
|
|
|
d = cscene.diffuse_samples
|
|
|
|
|
g = cscene.glossy_samples
|
|
|
|
|
t = cscene.transmission_samples
|
|
|
|
|
ao = cscene.ao_samples
|
|
|
|
|
ml = cscene.mesh_light_samples
|
|
|
|
|
sss = cscene.subsurface_samples
|
2014-01-07 15:55:01 +01:00
|
|
|
vol = cscene.volume_samples
|
2013-08-23 04:04:46 +00:00
|
|
|
|
2017-08-20 23:46:05 +02:00
|
|
|
if cscene.use_square_samples:
|
|
|
|
|
aa = aa * aa
|
|
|
|
|
d = d * d
|
|
|
|
|
g = g * g
|
|
|
|
|
t = t * t
|
|
|
|
|
ao = ao * ao
|
|
|
|
|
ml = ml * ml
|
|
|
|
|
sss = sss * sss
|
|
|
|
|
vol = vol * vol
|
|
|
|
|
|
2013-08-22 19:57:56 +00:00
|
|
|
# Draw interface
|
2013-08-23 11:39:48 +00:00
|
|
|
# Do not draw for progressive, when Square Samples are disabled
|
2017-08-20 23:46:05 +02:00
|
|
|
if use_branched_path(context) or (cscene.use_square_samples and integrator == 'PATH'):
|
2013-08-23 11:39:48 +00:00
|
|
|
col = layout.column(align=True)
|
|
|
|
|
col.scale_y = 0.6
|
|
|
|
|
col.label("Total Samples:")
|
2013-08-22 19:57:56 +00:00
|
|
|
col.separator()
|
2013-08-23 14:08:40 +00:00
|
|
|
if integrator == 'PATH':
|
2013-08-23 11:39:48 +00:00
|
|
|
col.label("%s AA" % aa)
|
|
|
|
|
else:
|
|
|
|
|
col.label("%s AA, %s Diffuse, %s Glossy, %s Transmission" %
|
|
|
|
|
(aa, d * aa, g * aa, t * aa))
|
|
|
|
|
col.separator()
|
2014-01-07 15:55:01 +01:00
|
|
|
col.label("%s AO, %s Mesh Light, %s Subsurface, %s Volume" %
|
|
|
|
|
(ao * aa, ml * aa, sss * aa, vol * aa))
|
2013-08-22 19:57:56 +00:00
|
|
|
|
|
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_RENDER_PT_sampling(CyclesButtonsPanel, Panel):
|
2012-06-13 11:44:48 +00:00
|
|
|
bl_label = "Sampling"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
2013-08-23 04:04:46 +00:00
|
|
|
|
2013-07-19 23:59:40 +00:00
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.menu("CYCLES_MT_sampling_presets", text=bpy.types.CYCLES_MT_sampling_presets.bl_label)
|
|
|
|
|
row.operator("render.cycles_sampling_preset_add", text="", icon="ZOOMIN")
|
|
|
|
|
row.operator("render.cycles_sampling_preset_add", text="", icon="ZOOMOUT").remove_active = True
|
2013-08-23 04:04:46 +00:00
|
|
|
|
2013-07-19 23:59:40 +00:00
|
|
|
row = layout.row()
|
2015-05-10 12:55:30 +02:00
|
|
|
sub = row.row()
|
|
|
|
|
sub.prop(cscene, "progressive", text="")
|
2017-08-20 23:46:05 +02:00
|
|
|
row.prop(cscene, "use_square_samples")
|
2013-08-23 04:04:46 +00:00
|
|
|
|
2013-07-19 23:59:40 +00:00
|
|
|
split = layout.split()
|
2013-08-23 04:04:46 +00:00
|
|
|
|
2013-07-19 23:59:40 +00:00
|
|
|
col = split.column()
|
2012-06-13 11:44:48 +00:00
|
|
|
sub = col.column(align=True)
|
2013-07-19 23:59:40 +00:00
|
|
|
sub.label("Settings:")
|
2015-05-15 13:49:17 +02:00
|
|
|
|
|
|
|
|
seed_sub = sub.row(align=True)
|
|
|
|
|
seed_sub.prop(cscene, "seed")
|
|
|
|
|
seed_sub.prop(cscene, "use_animated_seed", text="", icon="TIME")
|
|
|
|
|
|
2014-02-10 21:44:49 +01:00
|
|
|
sub.prop(cscene, "sample_clamp_direct")
|
|
|
|
|
sub.prop(cscene, "sample_clamp_indirect")
|
2016-10-29 23:47:30 +02:00
|
|
|
sub.prop(cscene, "light_sampling_threshold")
|
2012-06-13 11:44:48 +00:00
|
|
|
|
2016-02-01 00:47:10 +11:00
|
|
|
if cscene.progressive == 'PATH' or use_branched_path(context) is False:
|
2012-06-14 08:58:23 +00:00
|
|
|
col = split.column()
|
2012-06-13 11:44:48 +00:00
|
|
|
sub = col.column(align=True)
|
2013-07-19 23:59:40 +00:00
|
|
|
sub.label(text="Samples:")
|
2012-06-14 08:58:23 +00:00
|
|
|
sub.prop(cscene, "samples", text="Render")
|
|
|
|
|
sub.prop(cscene, "preview_samples", text="Preview")
|
|
|
|
|
else:
|
2012-06-13 11:44:48 +00:00
|
|
|
sub.label(text="AA Samples:")
|
|
|
|
|
sub.prop(cscene, "aa_samples", text="Render")
|
2017-03-29 09:12:26 +02:00
|
|
|
sub.prop(cscene, "preview_aa_samples", text="Preview")
|
|
|
|
|
|
2012-06-14 08:58:23 +00:00
|
|
|
col = split.column()
|
|
|
|
|
sub = col.column(align=True)
|
2013-07-19 23:59:40 +00:00
|
|
|
sub.label(text="Samples:")
|
2012-06-14 08:58:23 +00:00
|
|
|
sub.prop(cscene, "diffuse_samples", text="Diffuse")
|
|
|
|
|
sub.prop(cscene, "glossy_samples", text="Glossy")
|
|
|
|
|
sub.prop(cscene, "transmission_samples", text="Transmission")
|
|
|
|
|
sub.prop(cscene, "ao_samples", text="AO")
|
2016-01-21 09:00:10 +01:00
|
|
|
|
|
|
|
|
subsub = sub.row(align=True)
|
|
|
|
|
subsub.active = use_sample_all_lights(context)
|
|
|
|
|
subsub.prop(cscene, "mesh_light_samples", text="Mesh Light")
|
|
|
|
|
|
2013-04-01 20:26:52 +00:00
|
|
|
sub.prop(cscene, "subsurface_samples", text="Subsurface")
|
2013-12-29 15:40:43 +01:00
|
|
|
sub.prop(cscene, "volume_samples", text="Volume")
|
2012-06-13 11:44:48 +00:00
|
|
|
|
2017-03-28 16:29:20 -04:00
|
|
|
col = layout.column(align=True)
|
|
|
|
|
col.prop(cscene, "sample_all_lights_direct")
|
|
|
|
|
col.prop(cscene, "sample_all_lights_indirect")
|
|
|
|
|
|
2017-04-20 23:14:34 -04:00
|
|
|
layout.row().prop(cscene, "sampling_pattern", text="Pattern")
|
2015-05-10 12:55:30 +02:00
|
|
|
draw_samples_info(layout, context)
|
2013-04-16 16:18:14 +00:00
|
|
|
|
2012-06-19 22:17:19 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_RENDER_PT_geometry(CyclesButtonsPanel, Panel):
|
2016-04-17 20:15:50 +02:00
|
|
|
bl_label = "Geometry"
|
2013-12-29 22:19:38 +01:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
2016-10-11 16:33:07 +02:00
|
|
|
ccscene = scene.cycles_curves
|
2013-12-29 22:19:38 +01:00
|
|
|
|
2018-01-12 00:50:34 +01:00
|
|
|
row = layout.row()
|
|
|
|
|
row.label("Volume Sampling:")
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(cscene, "volume_step_size")
|
|
|
|
|
row.prop(cscene, "volume_max_steps")
|
|
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
2016-04-17 20:15:50 +02:00
|
|
|
if cscene.feature_set == 'EXPERIMENTAL':
|
2018-01-12 00:50:34 +01:00
|
|
|
layout.label("Subdivision Rate:")
|
2016-04-17 20:15:50 +02:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
|
sub = col.column(align=True)
|
2018-01-12 00:50:34 +01:00
|
|
|
sub.prop(cscene, "dicing_rate", text="Render")
|
|
|
|
|
sub.prop(cscene, "preview_dicing_rate", text="Preview")
|
2016-04-17 20:15:50 +02:00
|
|
|
|
|
|
|
|
col = split.column()
|
2018-01-12 00:50:34 +01:00
|
|
|
col.prop(cscene, "offscreen_dicing_scale", text="Offscreen Scale")
|
|
|
|
|
col.prop(cscene, "max_subdivisions")
|
2016-04-17 20:15:50 +02:00
|
|
|
|
2018-01-12 00:50:34 +01:00
|
|
|
layout.prop(cscene, "dicing_camera")
|
|
|
|
|
|
|
|
|
|
layout.separator()
|
2013-12-29 22:19:38 +01:00
|
|
|
|
2018-01-12 00:50:34 +01:00
|
|
|
layout.label("Hair:")
|
2016-10-11 16:33:07 +02:00
|
|
|
layout.prop(ccscene, "use_curves", text="Use Hair")
|
|
|
|
|
col = layout.column()
|
|
|
|
|
col.active = ccscene.use_curves
|
|
|
|
|
|
|
|
|
|
col.prop(ccscene, "primitive", text="Primitive")
|
|
|
|
|
col.prop(ccscene, "shape", text="Shape")
|
|
|
|
|
|
|
|
|
|
if not (ccscene.primitive in {'CURVE_SEGMENTS', 'LINE_SEGMENTS'} and ccscene.shape == 'RIBBONS'):
|
|
|
|
|
col.prop(ccscene, "cull_backfacing", text="Cull back-faces")
|
|
|
|
|
|
|
|
|
|
if ccscene.primitive == 'TRIANGLES' and ccscene.shape == 'THICK':
|
|
|
|
|
col.prop(ccscene, "resolution", text="Resolution")
|
|
|
|
|
elif ccscene.primitive == 'CURVE_SEGMENTS':
|
|
|
|
|
col.prop(ccscene, "subdivisions", text="Curve subdivisions")
|
|
|
|
|
|
|
|
|
|
row = col.row()
|
|
|
|
|
row.prop(ccscene, "minimum_width", text="Min Pixels")
|
2017-03-27 21:59:29 +02:00
|
|
|
row.prop(ccscene, "maximum_width", text="Max Extension")
|
2016-10-11 16:33:07 +02:00
|
|
|
|
2013-12-29 22:19:38 +01:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_RENDER_PT_light_paths(CyclesButtonsPanel, Panel):
|
2012-06-13 11:44:48 +00:00
|
|
|
bl_label = "Light Paths"
|
2011-09-01 15:53:36 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-08-29 17:55:14 +00:00
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.menu("CYCLES_MT_integrator_presets", text=bpy.types.CYCLES_MT_integrator_presets.bl_label)
|
|
|
|
|
row.operator("render.cycles_integrator_preset_add", text="", icon="ZOOMIN")
|
|
|
|
|
row.operator("render.cycles_integrator_preset_add", text="", icon="ZOOMOUT").remove_active = True
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
split = layout.split()
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
col = split.column()
|
2011-09-01 15:53:36 +00:00
|
|
|
|
|
|
|
|
sub = col.column(align=True)
|
2011-09-27 21:05:33 +00:00
|
|
|
sub.label("Transparency:")
|
2011-09-01 15:53:36 +00:00
|
|
|
sub.prop(cscene, "transparent_max_bounces", text="Max")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2012-06-13 11:44:48 +00:00
|
|
|
col.separator()
|
|
|
|
|
|
2014-09-05 20:39:35 +02:00
|
|
|
col.prop(cscene, "caustics_reflective")
|
|
|
|
|
col.prop(cscene, "caustics_refractive")
|
2012-06-13 11:44:48 +00:00
|
|
|
col.prop(cscene, "blur_glossy")
|
|
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
col = split.column()
|
2011-09-01 15:53:36 +00:00
|
|
|
|
|
|
|
|
sub = col.column(align=True)
|
|
|
|
|
sub.label(text="Bounces:")
|
|
|
|
|
sub.prop(cscene, "max_bounces", text="Max")
|
|
|
|
|
|
2011-08-29 10:21:10 +00:00
|
|
|
sub = col.column(align=True)
|
2011-09-01 15:53:36 +00:00
|
|
|
sub.prop(cscene, "diffuse_bounces", text="Diffuse")
|
|
|
|
|
sub.prop(cscene, "glossy_bounces", text="Glossy")
|
|
|
|
|
sub.prop(cscene, "transmission_bounces", text="Transmission")
|
2013-12-29 15:40:43 +01:00
|
|
|
sub.prop(cscene, "volume_bounces", text="Volume")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_RENDER_PT_motion_blur(CyclesButtonsPanel, Panel):
|
2012-10-16 10:48:19 +00:00
|
|
|
bl_label = "Motion Blur"
|
2012-04-30 12:49:26 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
|
rd = context.scene.render
|
|
|
|
|
|
|
|
|
|
self.layout.prop(rd, "use_motion_blur", text="")
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
2015-06-29 17:40:13 +02:00
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
rd = scene.render
|
2012-04-30 12:49:26 +00:00
|
|
|
layout.active = rd.use_motion_blur
|
|
|
|
|
|
2015-06-29 17:40:13 +02:00
|
|
|
col = layout.column()
|
|
|
|
|
col.prop(cscene, "motion_blur_position", text="Position")
|
|
|
|
|
col.prop(rd, "motion_blur_shutter")
|
2012-04-30 12:49:26 +00:00
|
|
|
|
2015-10-27 19:00:51 +05:00
|
|
|
col = layout.column()
|
|
|
|
|
col.label("Shutter curve:")
|
|
|
|
|
col.template_curve_mapping(rd, "motion_blur_shutter_curve")
|
|
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
|
row = col.row(align=True)
|
|
|
|
|
row.operator("render.shutter_curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH'
|
|
|
|
|
row.operator("render.shutter_curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND'
|
|
|
|
|
row.operator("render.shutter_curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT'
|
|
|
|
|
row.operator("render.shutter_curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP'
|
|
|
|
|
row.operator("render.shutter_curve_preset", icon='LINCURVE', text="").shape = 'LINE'
|
|
|
|
|
row.operator("render.shutter_curve_preset", icon='NOCURVE', text="").shape = 'MAX'
|
|
|
|
|
|
2015-11-20 14:42:34 +05:00
|
|
|
col = layout.column()
|
|
|
|
|
col.prop(cscene, "rolling_shutter_type")
|
|
|
|
|
row = col.row()
|
|
|
|
|
row.active = cscene.rolling_shutter_type != 'NONE'
|
|
|
|
|
row.prop(cscene, "rolling_shutter_duration")
|
|
|
|
|
|
2012-04-30 12:49:26 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_RENDER_PT_film(CyclesButtonsPanel, Panel):
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_label = "Film"
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
split = layout.split()
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
col = split.column()
|
2011-09-01 15:53:36 +00:00
|
|
|
col.prop(cscene, "film_exposure")
|
2018-01-11 20:03:31 +01:00
|
|
|
col.separator()
|
2011-08-29 10:21:10 +00:00
|
|
|
sub = col.column(align=True)
|
2016-02-10 04:00:29 +05:00
|
|
|
sub.prop(cscene, "pixel_filter_type", text="")
|
|
|
|
|
if cscene.pixel_filter_type != 'BOX':
|
2011-08-29 10:21:10 +00:00
|
|
|
sub.prop(cscene, "filter_width", text="Width")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2018-01-11 20:03:31 +01:00
|
|
|
col = split.column()
|
|
|
|
|
col.prop(cscene, "film_transparent")
|
|
|
|
|
sub = col.row()
|
|
|
|
|
sub.prop(cscene, "film_transparent_glass", text="Transparent Glass")
|
|
|
|
|
sub.active = cscene.film_transparent
|
|
|
|
|
sub = col.row()
|
|
|
|
|
sub.prop(cscene, "film_transparent_roughness", text="Roughness Threshold")
|
|
|
|
|
sub.active = cscene.film_transparent and cscene.film_transparent_glass
|
|
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_RENDER_PT_performance(CyclesButtonsPanel, Panel):
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_label = "Performance"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
scene = context.scene
|
|
|
|
|
rd = scene.render
|
|
|
|
|
cscene = scene.cycles
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
split = layout.split()
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
col = split.column(align=True)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
col.label(text="Threads:")
|
2013-08-23 20:41:21 +00:00
|
|
|
col.row(align=True).prop(rd, "threads_mode", expand=True)
|
|
|
|
|
sub = col.column(align=True)
|
2011-08-28 13:55:59 +00:00
|
|
|
sub.enabled = rd.threads_mode == 'FIXED'
|
|
|
|
|
sub.prop(rd, "threads")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2017-08-21 15:09:03 +02:00
|
|
|
col.separator()
|
|
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
sub = col.column(align=True)
|
2013-01-07 19:55:49 +00:00
|
|
|
sub.label(text="Tiles:")
|
|
|
|
|
sub.prop(cscene, "tile_order", text="")
|
2012-09-04 13:29:07 +00:00
|
|
|
|
2012-11-05 08:05:14 +00:00
|
|
|
sub.prop(rd, "tile_x", text="X")
|
|
|
|
|
sub.prop(rd, "tile_y", text="Y")
|
2012-09-04 13:29:07 +00:00
|
|
|
|
2017-10-10 02:28:23 +02:00
|
|
|
subsub = sub.column()
|
|
|
|
|
subsub.active = not rd.use_save_buffers
|
2017-11-22 10:52:39 -02:00
|
|
|
for view_layer in scene.view_layers:
|
|
|
|
|
if view_layer.cycles.use_denoising:
|
2017-10-10 02:28:23 +02:00
|
|
|
subsub.active = False
|
|
|
|
|
subsub.prop(cscene, "use_progressive_refine")
|
2012-10-13 12:38:32 +00:00
|
|
|
|
2017-08-21 15:09:03 +02:00
|
|
|
col = split.column()
|
2012-09-04 13:29:07 +00:00
|
|
|
|
2013-07-12 00:08:55 +00:00
|
|
|
col.label(text="Final Render:")
|
2017-08-21 15:09:03 +02:00
|
|
|
col.prop(rd, "use_save_buffers")
|
2013-07-12 00:08:55 +00:00
|
|
|
col.prop(rd, "use_persistent_data", text="Persistent Images")
|
|
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
|
2013-08-23 04:04:46 +00:00
|
|
|
col.label(text="Acceleration structure:")
|
2013-07-12 00:08:55 +00:00
|
|
|
col.prop(cscene, "debug_use_spatial_splits")
|
2016-07-07 18:04:16 +02:00
|
|
|
col.prop(cscene, "debug_use_hair_bvh")
|
2012-11-09 08:46:53 +00:00
|
|
|
|
2017-01-17 14:37:32 +01:00
|
|
|
row = col.row()
|
|
|
|
|
row.active = not cscene.debug_use_spatial_splits
|
|
|
|
|
row.prop(cscene, "debug_bvh_time_steps")
|
|
|
|
|
|
2017-08-21 15:09:03 +02:00
|
|
|
col = layout.column()
|
|
|
|
|
col.label(text="Viewport Resolution:")
|
|
|
|
|
split = col.split()
|
|
|
|
|
split.prop(rd, "preview_pixel_size", text="")
|
|
|
|
|
split.prop(cscene, "preview_start_resolution")
|
|
|
|
|
|
2013-03-28 19:33:14 +00:00
|
|
|
|
2018-04-24 15:20:17 +02:00
|
|
|
class CYCLES_RENDER_PT_filter(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Filter"
|
2017-11-22 10:52:39 -02:00
|
|
|
bl_context = "view_layer"
|
2013-04-06 23:05:32 +00:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2018-02-09 02:46:20 +09:00
|
|
|
with_freestyle = bpy.app.build_options.freestyle
|
2013-04-06 23:05:32 +00:00
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
rd = scene.render
|
2018-04-24 15:20:17 +02:00
|
|
|
view_layer = context.view_layer
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
|
2017-11-16 13:39:25 -02:00
|
|
|
col = layout.column()
|
2017-11-22 10:52:39 -02:00
|
|
|
col.prop(view_layer, "use_sky", "Use Environment")
|
|
|
|
|
col.prop(view_layer, "use_ao", "Use AO")
|
|
|
|
|
col.prop(view_layer, "use_solid", "Use Surfaces")
|
|
|
|
|
col.prop(view_layer, "use_strand", "Use Hair")
|
2018-02-09 02:46:20 +09:00
|
|
|
if with_freestyle:
|
|
|
|
|
row = col.row()
|
2018-02-09 03:00:20 +09:00
|
|
|
row.prop(view_layer, "use_freestyle", "Use Freestyle")
|
2018-02-09 02:46:20 +09:00
|
|
|
row.active = rd.use_freestyle
|
2013-04-07 01:38:03 +00:00
|
|
|
|
|
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_RENDER_PT_layer_passes(CyclesButtonsPanel, Panel):
|
2013-04-07 08:42:08 +00:00
|
|
|
bl_label = "Passes"
|
2017-11-22 10:52:39 -02:00
|
|
|
bl_context = "view_layer"
|
2013-04-07 08:42:08 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2013-04-06 23:05:32 +00:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
Render API/Cycles: Identify Render Passes by their name instead of a type flag
Previously, every RenderPass would have a bitfield that specified its type. That limits the number of passes to 32, which was reached a while ago.
However, most of the code already supported arbitrary RenderPasses since they were also used to store Multilayer EXR images.
Therefore, this commit completely removes the passflag from RenderPass and changes all code to use the unique pass name for identification.
Since Blender Internal relies on hardcoded passes and to preserve compatibility, 32 pass names are reserved for the old hardcoded passes.
To support these arbitrary passes, the Render Result compositor node now adds dynamic sockets. For compatibility, the old hardcoded sockets are always stored and just hidden when the corresponding pass isn't available.
To use these changes, the Render Engine API now includes a function that allows render engines to add arbitrary passes to the render result. To be able to add options for these passes, addons can now add their own properties to SceneRenderLayers.
To keep the compositor input node updated, render engine plugins have to implement a callback that registers all the passes that will be generated.
From a user perspective, nothing should change with this commit.
Differential Revision: https://developer.blender.org/D2443
Differential Revision: https://developer.blender.org/D2444
2017-05-03 00:21:18 +02:00
|
|
|
import _cycles
|
|
|
|
|
|
2013-04-06 23:05:32 +00:00
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
rd = scene.render
|
2018-04-24 15:20:17 +02:00
|
|
|
view_layer = context.view_layer
|
2017-11-22 10:52:39 -02:00
|
|
|
cycles_view_layer = view_layer.cycles
|
Cycles: merging features from tomato branch.
=== BVH build time optimizations ===
* BVH building was multithreaded. Not all building is multithreaded, packing
and the initial bounding/splitting is still single threaded, but recursive
splitting is, which was the main bottleneck.
* Object splitting now uses binning rather than sorting of all elements, using
code from the Embree raytracer from Intel.
http://software.intel.com/en-us/articles/embree-photo-realistic-ray-tracing-kernels/
* Other small changes to avoid allocations, pack memory more tightly, avoid
some unnecessary operations, ...
These optimizations do not work yet when Spatial Splits are enabled, for that
more work is needed. There's also other optimizations still needed, in
particular for the case of many low poly objects, the packing step and node
memory allocation.
BVH raytracing time should remain about the same, but BVH build time should be
significantly reduced, test here show speedup of about 5x to 10x on a dual core
and 5x to 25x on an 8-core machine, depending on the scene.
=== Threads ===
Centralized task scheduler for multithreading, which is basically the
CPU device threading code wrapped into something reusable.
Basic idea is that there is a single TaskScheduler that keeps a pool of threads,
one for each core. Other places in the code can then create a TaskPool that they
can drop Tasks in to be executed by the scheduler, and wait for them to complete
or cancel them early.
=== Normal ====
Added a Normal output to the texture coordinate node. This currently
gives the object space normal, which is the same under object animation.
In the future this might become a "generated" normal so it's also stable for
deforming objects, but for now it's already useful for non-deforming objects.
=== Render Layers ===
Per render layer Samples control, leaving it to 0 will use the common scene
setting.
Environment pass will now render environment even if film is set to transparent.
Exclude Layers" added. Scene layers (all object that influence the render,
directly or indirectly) are shared between all render layers. However sometimes
it's useful to leave out some object influence for a particular render layer.
That's what this option allows you to do.
=== Filter Glossy ===
When using a value higher than 0.0, this will blur glossy reflections after
blurry bounces, to reduce noise at the cost of accuracy. 1.0 is a good
starting value to tweak.
Some light paths have a low probability of being found while contributing much
light to the pixel. As a result these light paths will be found in some pixels
and not in others, causing fireflies. An example of such a difficult path might
be a small light that is causing a small specular highlight on a sharp glossy
material, which we are seeing through a rough glossy material. With path tracing
it is difficult to find the specular highlight, but if we increase the roughness
on the material the highlight gets bigger and softer, and so easier to find.
Often this blurring will be hardly noticeable, because we are seeing it through
a blurry material anyway, but there are also cases where this will lead to a
loss of detail in lighting.
2012-04-28 08:53:59 +00:00
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
col = split.column()
|
2017-11-22 10:52:39 -02:00
|
|
|
col.prop(view_layer, "use_pass_combined")
|
|
|
|
|
col.prop(view_layer, "use_pass_z")
|
|
|
|
|
col.prop(view_layer, "use_pass_mist")
|
|
|
|
|
col.prop(view_layer, "use_pass_normal")
|
2016-07-21 01:02:21 +02:00
|
|
|
row = col.row()
|
2017-11-22 10:52:39 -02:00
|
|
|
row.prop(view_layer, "use_pass_vector")
|
2016-07-21 01:02:21 +02:00
|
|
|
row.active = not rd.use_motion_blur
|
2017-11-22 10:52:39 -02:00
|
|
|
col.prop(view_layer, "use_pass_uv")
|
|
|
|
|
col.prop(view_layer, "use_pass_object_index")
|
|
|
|
|
col.prop(view_layer, "use_pass_material_index")
|
2013-08-09 19:55:45 +00:00
|
|
|
col.separator()
|
2017-11-22 10:52:39 -02:00
|
|
|
col.prop(view_layer, "use_pass_shadow")
|
|
|
|
|
col.prop(view_layer, "use_pass_ambient_occlusion")
|
2014-02-06 15:18:34 +01:00
|
|
|
col.separator()
|
2017-11-22 10:52:39 -02:00
|
|
|
col.prop(view_layer, "pass_alpha_threshold")
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
|
col.label(text="Diffuse:")
|
|
|
|
|
row = col.row(align=True)
|
2017-11-22 10:52:39 -02:00
|
|
|
row.prop(view_layer, "use_pass_diffuse_direct", text="Direct", toggle=True)
|
|
|
|
|
row.prop(view_layer, "use_pass_diffuse_indirect", text="Indirect", toggle=True)
|
|
|
|
|
row.prop(view_layer, "use_pass_diffuse_color", text="Color", toggle=True)
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
col.label(text="Glossy:")
|
|
|
|
|
row = col.row(align=True)
|
2017-11-22 10:52:39 -02:00
|
|
|
row.prop(view_layer, "use_pass_glossy_direct", text="Direct", toggle=True)
|
|
|
|
|
row.prop(view_layer, "use_pass_glossy_indirect", text="Indirect", toggle=True)
|
|
|
|
|
row.prop(view_layer, "use_pass_glossy_color", text="Color", toggle=True)
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
col.label(text="Transmission:")
|
|
|
|
|
row = col.row(align=True)
|
2017-11-22 10:52:39 -02:00
|
|
|
row.prop(view_layer, "use_pass_transmission_direct", text="Direct", toggle=True)
|
|
|
|
|
row.prop(view_layer, "use_pass_transmission_indirect", text="Indirect", toggle=True)
|
|
|
|
|
row.prop(view_layer, "use_pass_transmission_color", text="Color", toggle=True)
|
2013-08-03 13:12:09 +00:00
|
|
|
col.label(text="Subsurface:")
|
|
|
|
|
row = col.row(align=True)
|
2017-11-22 10:52:39 -02:00
|
|
|
row.prop(view_layer, "use_pass_subsurface_direct", text="Direct", toggle=True)
|
|
|
|
|
row.prop(view_layer, "use_pass_subsurface_indirect", text="Indirect", toggle=True)
|
|
|
|
|
row.prop(view_layer, "use_pass_subsurface_color", text="Color", toggle=True)
|
2017-11-14 07:21:07 +01:00
|
|
|
col.label(text="Volume:")
|
|
|
|
|
row = col.row(align=True)
|
2017-11-22 10:52:39 -02:00
|
|
|
row.prop(cycles_view_layer, "use_pass_volume_direct", text="Direct", toggle=True)
|
|
|
|
|
row.prop(cycles_view_layer, "use_pass_volume_indirect", text="Indirect", toggle=True)
|
2013-08-23 04:04:46 +00:00
|
|
|
|
2013-08-03 13:12:09 +00:00
|
|
|
col.separator()
|
2017-11-22 10:52:39 -02:00
|
|
|
col.prop(view_layer, "use_pass_emit", text="Emission")
|
|
|
|
|
col.prop(view_layer, "use_pass_environment")
|
2012-04-30 12:49:26 +00:00
|
|
|
|
2017-05-07 14:40:58 +02:00
|
|
|
if context.scene.cycles.feature_set == 'EXPERIMENTAL':
|
2017-06-12 13:35:00 +10:00
|
|
|
col.separator()
|
|
|
|
|
sub = col.column()
|
2017-11-22 10:52:39 -02:00
|
|
|
sub.active = cycles_view_layer.use_denoising
|
|
|
|
|
sub.prop(cycles_view_layer, "denoising_store_passes", text="Denoising")
|
2017-05-07 14:40:58 +02:00
|
|
|
|
2017-11-17 14:23:48 +01:00
|
|
|
col = layout.column()
|
2017-11-22 10:52:39 -02:00
|
|
|
col.prop(cycles_view_layer, "pass_debug_render_time")
|
Render API/Cycles: Identify Render Passes by their name instead of a type flag
Previously, every RenderPass would have a bitfield that specified its type. That limits the number of passes to 32, which was reached a while ago.
However, most of the code already supported arbitrary RenderPasses since they were also used to store Multilayer EXR images.
Therefore, this commit completely removes the passflag from RenderPass and changes all code to use the unique pass name for identification.
Since Blender Internal relies on hardcoded passes and to preserve compatibility, 32 pass names are reserved for the old hardcoded passes.
To support these arbitrary passes, the Render Result compositor node now adds dynamic sockets. For compatibility, the old hardcoded sockets are always stored and just hidden when the corresponding pass isn't available.
To use these changes, the Render Engine API now includes a function that allows render engines to add arbitrary passes to the render result. To be able to add options for these passes, addons can now add their own properties to SceneRenderLayers.
To keep the compositor input node updated, render engine plugins have to implement a callback that registers all the passes that will be generated.
From a user perspective, nothing should change with this commit.
Differential Revision: https://developer.blender.org/D2443
Differential Revision: https://developer.blender.org/D2444
2017-05-03 00:21:18 +02:00
|
|
|
if _cycles.with_cycles_debug:
|
2017-11-22 10:52:39 -02:00
|
|
|
col.prop(cycles_view_layer, "pass_debug_bvh_traversed_nodes")
|
|
|
|
|
col.prop(cycles_view_layer, "pass_debug_bvh_traversed_instances")
|
|
|
|
|
col.prop(cycles_view_layer, "pass_debug_bvh_intersections")
|
|
|
|
|
col.prop(cycles_view_layer, "pass_debug_ray_bounces")
|
2015-06-11 11:27:39 +02:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_RENDER_PT_denoising(CyclesButtonsPanel, Panel):
|
2017-05-07 14:40:58 +02:00
|
|
|
bl_label = "Denoising"
|
2017-11-22 10:52:39 -02:00
|
|
|
bl_context = "view_layer"
|
2017-05-07 14:40:58 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
2017-11-16 13:39:25 -02:00
|
|
|
scene = context.scene
|
2018-04-24 15:20:17 +02:00
|
|
|
view_layer = context.view_layer
|
2017-11-22 10:52:39 -02:00
|
|
|
cycles_view_layer = view_layer.cycles
|
2017-11-16 13:39:25 -02:00
|
|
|
cscene = scene.cycles
|
2017-05-07 14:40:58 +02:00
|
|
|
layout = self.layout
|
|
|
|
|
|
2017-11-22 10:52:39 -02:00
|
|
|
layout.prop(cycles_view_layer, "use_denoising", text="")
|
2017-05-07 14:40:58 +02:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
2018-04-24 15:20:17 +02:00
|
|
|
view_layer = context.view_layer
|
2017-11-22 10:52:39 -02:00
|
|
|
cycles_view_layer = view_layer.cycles
|
2017-05-07 14:40:58 +02:00
|
|
|
|
2017-11-22 10:52:39 -02:00
|
|
|
layout.active = cycles_view_layer.use_denoising
|
2017-05-07 14:40:58 +02:00
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
|
sub = col.column(align=True)
|
2017-11-22 10:52:39 -02:00
|
|
|
sub.prop(cycles_view_layer, "denoising_radius", text="Radius")
|
|
|
|
|
sub.prop(cycles_view_layer, "denoising_strength", slider=True, text="Strength")
|
2017-05-07 14:40:58 +02:00
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
|
sub = col.column(align=True)
|
2017-11-22 10:52:39 -02:00
|
|
|
sub.prop(cycles_view_layer, "denoising_feature_strength", slider=True, text="Feature Strength")
|
|
|
|
|
sub.prop(cycles_view_layer, "denoising_relative_pca")
|
2017-05-07 14:40:58 +02:00
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.label(text="Diffuse:")
|
|
|
|
|
sub = row.row(align=True)
|
2017-11-22 10:52:39 -02:00
|
|
|
sub.prop(cycles_view_layer, "denoising_diffuse_direct", text="Direct", toggle=True)
|
|
|
|
|
sub.prop(cycles_view_layer, "denoising_diffuse_indirect", text="Indirect", toggle=True)
|
2017-05-07 14:40:58 +02:00
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.label(text="Glossy:")
|
|
|
|
|
sub = row.row(align=True)
|
2017-11-22 10:52:39 -02:00
|
|
|
sub.prop(cycles_view_layer, "denoising_glossy_direct", text="Direct", toggle=True)
|
|
|
|
|
sub.prop(cycles_view_layer, "denoising_glossy_indirect", text="Indirect", toggle=True)
|
2017-05-07 14:40:58 +02:00
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.label(text="Transmission:")
|
|
|
|
|
sub = row.row(align=True)
|
2017-11-22 10:52:39 -02:00
|
|
|
sub.prop(cycles_view_layer, "denoising_transmission_direct", text="Direct", toggle=True)
|
|
|
|
|
sub.prop(cycles_view_layer, "denoising_transmission_indirect", text="Indirect", toggle=True)
|
2017-05-07 14:40:58 +02:00
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.label(text="Subsurface:")
|
|
|
|
|
sub = row.row(align=True)
|
2017-11-22 10:52:39 -02:00
|
|
|
sub.prop(cycles_view_layer, "denoising_subsurface_direct", text="Direct", toggle=True)
|
|
|
|
|
sub.prop(cycles_view_layer, "denoising_subsurface_indirect", text="Indirect", toggle=True)
|
2017-05-07 14:40:58 +02:00
|
|
|
|
|
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_PT_post_processing(CyclesButtonsPanel, Panel):
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_label = "Post Processing"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
rd = context.scene.render
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
split = layout.split()
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
col = split.column()
|
|
|
|
|
col.prop(rd, "use_compositing")
|
|
|
|
|
col.prop(rd, "use_sequencer")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
col = split.column()
|
|
|
|
|
col.prop(rd, "dither_intensity", text="Dither", slider=True)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_CAMERA_PT_dof(CyclesButtonsPanel, Panel):
|
2011-09-16 13:14:02 +00:00
|
|
|
bl_label = "Depth of Field"
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_context = "data"
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2011-09-16 13:14:02 +00:00
|
|
|
return context.camera and CyclesButtonsPanel.poll(context)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-09-16 13:14:02 +00:00
|
|
|
cam = context.camera
|
|
|
|
|
ccam = cam.cycles
|
2015-02-12 19:35:32 +01:00
|
|
|
dof_options = cam.gpu_dof
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-09-16 13:14:02 +00:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
|
col.label("Focus:")
|
|
|
|
|
col.prop(cam, "dof_object", text="")
|
|
|
|
|
|
|
|
|
|
sub = col.row()
|
|
|
|
|
sub.active = cam.dof_object is None
|
|
|
|
|
sub.prop(cam, "dof_distance", text="Distance")
|
2015-03-30 12:47:37 +02:00
|
|
|
|
|
|
|
|
hq_support = dof_options.is_hq_supported
|
2015-03-23 12:48:09 +01:00
|
|
|
sub = col.column(align=True)
|
|
|
|
|
sub.label("Viewport:")
|
2015-03-30 12:47:37 +02:00
|
|
|
subhq = sub.column()
|
2015-05-17 17:17:31 +10:00
|
|
|
subhq.active = hq_support
|
2015-03-30 12:47:37 +02:00
|
|
|
subhq.prop(dof_options, "use_high_quality")
|
2015-03-23 12:48:09 +01:00
|
|
|
sub.prop(dof_options, "fstop")
|
2015-03-30 12:47:37 +02:00
|
|
|
if dof_options.use_high_quality and hq_support:
|
2015-03-23 12:48:09 +01:00
|
|
|
sub.prop(dof_options, "blades")
|
2015-05-17 17:17:31 +10:00
|
|
|
|
2011-09-16 13:14:02 +00:00
|
|
|
col = split.column()
|
|
|
|
|
|
|
|
|
|
col.label("Aperture:")
|
2012-03-07 13:01:30 +00:00
|
|
|
sub = col.column(align=True)
|
|
|
|
|
sub.prop(ccam, "aperture_type", text="")
|
|
|
|
|
if ccam.aperture_type == 'RADIUS':
|
|
|
|
|
sub.prop(ccam, "aperture_size", text="Size")
|
|
|
|
|
elif ccam.aperture_type == 'FSTOP':
|
|
|
|
|
sub.prop(ccam, "aperture_fstop", text="Number")
|
2011-09-16 13:14:02 +00:00
|
|
|
|
|
|
|
|
sub = col.column(align=True)
|
|
|
|
|
sub.prop(ccam, "aperture_blades", text="Blades")
|
|
|
|
|
sub.prop(ccam, "aperture_rotation", text="Rotation")
|
2014-08-27 10:51:50 +02:00
|
|
|
sub.prop(ccam, "aperture_ratio", text="Ratio")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_PT_context_material(CyclesButtonsPanel, Panel):
|
2012-01-24 20:10:37 +00:00
|
|
|
bl_label = ""
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_context = "material"
|
|
|
|
|
bl_options = {'HIDE_HEADER'}
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
return (context.material or context.object) and CyclesButtonsPanel.poll(context)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
mat = context.material
|
|
|
|
|
ob = context.object
|
|
|
|
|
slot = context.material_slot
|
|
|
|
|
space = context.space_data
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
if ob:
|
2016-02-10 10:34:19 +01:00
|
|
|
is_sortable = len(ob.material_slots) > 1
|
2015-05-15 01:25:03 +02:00
|
|
|
rows = 1
|
|
|
|
|
if (is_sortable):
|
|
|
|
|
rows = 4
|
|
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
row = layout.row()
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2015-05-15 01:25:03 +02:00
|
|
|
row.template_list("MATERIAL_UL_matslots", "", ob, "material_slots", ob, "active_material_index", rows=rows)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
col = row.column(align=True)
|
|
|
|
|
col.operator("object.material_slot_add", icon='ZOOMIN', text="")
|
|
|
|
|
col.operator("object.material_slot_remove", icon='ZOOMOUT', text="")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
col.menu("MATERIAL_MT_specials", icon='DOWNARROW_HLT', text="")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2015-05-15 01:25:03 +02:00
|
|
|
if is_sortable:
|
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
|
|
col.operator("object.material_slot_move", icon='TRIA_UP', text="").direction = 'UP'
|
|
|
|
|
col.operator("object.material_slot_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
|
|
|
|
|
|
2018-04-06 18:31:32 +02:00
|
|
|
if ob.mode == 'EDIT':
|
2011-08-28 13:55:59 +00:00
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.operator("object.material_slot_assign", text="Assign")
|
|
|
|
|
row.operator("object.material_slot_select", text="Select")
|
|
|
|
|
row.operator("object.material_slot_deselect", text="Deselect")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
split = layout.split(percentage=0.65)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
if ob:
|
|
|
|
|
split.template_ID(ob, "active_material", new="material.new")
|
|
|
|
|
row = split.row()
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
if slot:
|
|
|
|
|
row.prop(slot, "link", text="")
|
|
|
|
|
else:
|
|
|
|
|
row.label()
|
|
|
|
|
elif mat:
|
|
|
|
|
split.template_ID(space, "pin_id")
|
|
|
|
|
split.separator()
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_OBJECT_PT_motion_blur(CyclesButtonsPanel, Panel):
|
2014-03-29 13:03:47 +01:00
|
|
|
bl_label = "Motion Blur"
|
|
|
|
|
bl_context = "object"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
ob = context.object
|
2015-06-12 13:54:17 +02:00
|
|
|
if CyclesButtonsPanel.poll(context) and ob:
|
2018-03-10 01:36:09 +01:00
|
|
|
if ob.type in {'MESH', 'CURVE', 'CURVE', 'SURFACE', 'FONT', 'META', 'CAMERA'}:
|
2015-06-12 13:54:17 +02:00
|
|
|
return True
|
|
|
|
|
if ob.dupli_type == 'GROUP' and ob.dupli_group:
|
|
|
|
|
return True
|
|
|
|
|
# TODO(sergey): More duplicator types here?
|
|
|
|
|
return False
|
2014-04-03 09:24:09 +11:00
|
|
|
|
2014-03-29 13:03:47 +01:00
|
|
|
def draw_header(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
rd = context.scene.render
|
2014-09-17 18:36:17 +10:00
|
|
|
# scene = context.scene
|
2014-03-29 13:03:47 +01:00
|
|
|
|
2014-03-31 02:18:29 +02:00
|
|
|
layout.active = rd.use_motion_blur
|
2014-03-29 13:03:47 +01:00
|
|
|
|
|
|
|
|
ob = context.object
|
|
|
|
|
cob = ob.cycles
|
|
|
|
|
|
|
|
|
|
layout.prop(cob, "use_motion_blur", text="")
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
rd = context.scene.render
|
2014-09-17 18:36:17 +10:00
|
|
|
# scene = context.scene
|
2014-03-29 13:03:47 +01:00
|
|
|
|
|
|
|
|
ob = context.object
|
|
|
|
|
cob = ob.cycles
|
|
|
|
|
|
2014-03-31 02:18:29 +02:00
|
|
|
layout.active = (rd.use_motion_blur and cob.use_motion_blur)
|
2014-03-29 13:03:47 +01:00
|
|
|
|
|
|
|
|
row = layout.row()
|
2018-03-10 01:36:09 +01:00
|
|
|
if ob.type != 'CAMERA':
|
|
|
|
|
row.prop(cob, "use_deform_motion", text="Deformation")
|
|
|
|
|
row.prop(cob, "motion_steps", text="Steps")
|
2014-03-29 13:03:47 +01:00
|
|
|
|
|
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_OBJECT_PT_cycles_settings(CyclesButtonsPanel, Panel):
|
2015-04-10 18:09:58 +05:00
|
|
|
bl_label = "Cycles Settings"
|
2011-09-01 15:53:36 +00:00
|
|
|
bl_context = "object"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
ob = context.object
|
2013-08-23 04:04:46 +00:00
|
|
|
return (CyclesButtonsPanel.poll(context) and
|
2015-06-12 13:54:17 +02:00
|
|
|
ob and ((ob.type in {'MESH', 'CURVE', 'SURFACE', 'FONT', 'META', 'LAMP'}) or
|
|
|
|
|
(ob.dupli_type == 'GROUP' and ob.dupli_group)))
|
2011-09-01 15:53:36 +00:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
2015-04-10 18:09:58 +05:00
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
2011-09-01 15:53:36 +00:00
|
|
|
ob = context.object
|
2015-04-10 18:09:58 +05:00
|
|
|
cob = ob.cycles
|
2011-09-01 15:53:36 +00:00
|
|
|
visibility = ob.cycles_visibility
|
|
|
|
|
|
2015-04-10 18:09:58 +05:00
|
|
|
layout.label(text="Ray Visibility:")
|
2012-01-22 22:43:21 +00:00
|
|
|
flow = layout.column_flow()
|
2012-02-04 11:10:41 +00:00
|
|
|
|
2012-01-22 22:43:21 +00:00
|
|
|
flow.prop(visibility, "camera")
|
|
|
|
|
flow.prop(visibility, "diffuse")
|
|
|
|
|
flow.prop(visibility, "glossy")
|
|
|
|
|
flow.prop(visibility, "transmission")
|
2014-09-05 16:17:24 +02:00
|
|
|
flow.prop(visibility, "scatter")
|
2013-06-10 20:34:34 +00:00
|
|
|
|
|
|
|
|
if ob.type != 'LAMP':
|
|
|
|
|
flow.prop(visibility, "shadow")
|
2011-09-01 15:53:36 +00:00
|
|
|
|
2017-11-18 06:06:27 +01:00
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(cob, "is_shadow_catcher")
|
|
|
|
|
row.prop(cob, "is_holdout")
|
2017-03-27 21:51:56 +02:00
|
|
|
|
2015-04-10 18:09:58 +05:00
|
|
|
col = layout.column()
|
|
|
|
|
col.label(text="Performance:")
|
|
|
|
|
row = col.row()
|
2017-01-20 10:58:03 +01:00
|
|
|
sub = row.row()
|
|
|
|
|
sub.active = scene.render.use_simplify and cscene.use_camera_cull
|
|
|
|
|
sub.prop(cob, "use_camera_cull")
|
|
|
|
|
|
|
|
|
|
sub = row.row()
|
|
|
|
|
sub.active = scene.render.use_simplify and cscene.use_distance_cull
|
|
|
|
|
sub.prop(cob, "use_distance_cull")
|
2015-04-10 18:09:58 +05:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2013-06-25 16:38:40 +00:00
|
|
|
class CYCLES_OT_use_shading_nodes(Operator):
|
|
|
|
|
"""Enable nodes on a material, world or lamp"""
|
|
|
|
|
bl_idname = "cycles.use_shading_nodes"
|
|
|
|
|
bl_label = "Use Nodes"
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2014-08-16 22:42:02 +02:00
|
|
|
return (getattr(context, "material", False) or getattr(context, "world", False) or
|
|
|
|
|
getattr(context, "lamp", False))
|
2013-06-25 16:38:40 +00:00
|
|
|
|
|
|
|
|
def execute(self, context):
|
|
|
|
|
if context.material:
|
|
|
|
|
context.material.use_nodes = True
|
|
|
|
|
elif context.world:
|
|
|
|
|
context.world.use_nodes = True
|
|
|
|
|
elif context.lamp:
|
|
|
|
|
context.lamp.use_nodes = True
|
|
|
|
|
|
|
|
|
|
return {'FINISHED'}
|
|
|
|
|
|
|
|
|
|
|
2017-08-01 18:03:16 +02:00
|
|
|
def panel_node_draw(layout, id_data, output_types, input_name):
|
2012-03-08 19:53:01 +00:00
|
|
|
if not id_data.use_nodes:
|
2013-06-25 16:38:40 +00:00
|
|
|
layout.operator("cycles.use_shading_nodes", icon='NODETREE')
|
2011-11-10 13:00:53 +00:00
|
|
|
return False
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-24 19:36:12 +00:00
|
|
|
ntree = id_data.node_tree
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2017-08-01 18:03:16 +02:00
|
|
|
node = find_output_node(ntree, output_types)
|
|
|
|
|
if node:
|
2011-08-28 13:55:59 +00:00
|
|
|
input = find_node_input(node, input_name)
|
2017-08-01 18:03:16 +02:00
|
|
|
if input:
|
|
|
|
|
layout.template_node_view(ntree, node, input)
|
|
|
|
|
else:
|
|
|
|
|
layout.label(text="Incompatible output node")
|
|
|
|
|
else:
|
|
|
|
|
layout.label(text="No output node")
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-11-10 13:00:53 +00:00
|
|
|
return True
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_LAMP_PT_preview(CyclesButtonsPanel, Panel):
|
2013-01-29 17:30:26 +00:00
|
|
|
bl_label = "Preview"
|
|
|
|
|
bl_context = "data"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
Cycles: Added support for light portals
This patch adds support for light portals: objects that help sampling the
environment light, therefore improving convergence. Using them tor other
lights in a unidirectional pathtracer is virtually useless.
The sampling is done with the area-preserving code already used for area lamps.
MIS is used both for combination of different portals and for combining portal-
and envmap-sampling.
The direction of portals is considered, they aren't used if the sampling point
is behind them.
Reviewers: sergey, dingto, #cycles
Reviewed By: dingto, #cycles
Subscribers: Lapineige, nutel, jtheninja, dsisco11, januz, vitorbalbio, candreacchio, TARDISMaker, lichtwerk, ace_dragon, marcog, mib2berlin, Tunge, lopataasdf, lordodin, sergey, dingto
Differential Revision: https://developer.blender.org/D1133
2015-04-28 00:51:55 +05:00
|
|
|
return context.lamp and \
|
|
|
|
|
not (context.lamp.type == 'AREA' and
|
|
|
|
|
context.lamp.cycles.is_portal) \
|
|
|
|
|
and CyclesButtonsPanel.poll(context)
|
2013-01-29 17:30:26 +00:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
self.layout.template_preview(context.lamp)
|
|
|
|
|
|
|
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_LAMP_PT_lamp(CyclesButtonsPanel, Panel):
|
2011-09-27 20:37:24 +00:00
|
|
|
bl_label = "Lamp"
|
|
|
|
|
bl_context = "data"
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2011-10-15 23:49:01 +00:00
|
|
|
return context.lamp and CyclesButtonsPanel.poll(context)
|
2011-09-27 20:37:24 +00:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
lamp = context.lamp
|
|
|
|
|
clamp = lamp.cycles
|
2016-08-01 11:54:02 +10:00
|
|
|
# cscene = context.scene.cycles
|
2011-09-27 20:37:24 +00:00
|
|
|
|
|
|
|
|
layout.prop(lamp, "type", expand=True)
|
|
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
col = split.column(align=True)
|
|
|
|
|
|
2011-11-27 03:49:09 +00:00
|
|
|
if lamp.type in {'POINT', 'SUN', 'SPOT'}:
|
2011-09-27 20:37:24 +00:00
|
|
|
col.prop(lamp, "shadow_soft_size", text="Size")
|
|
|
|
|
elif lamp.type == 'AREA':
|
|
|
|
|
col.prop(lamp, "shape", text="")
|
|
|
|
|
sub = col.column(align=True)
|
|
|
|
|
|
|
|
|
|
if lamp.shape == 'SQUARE':
|
|
|
|
|
sub.prop(lamp, "size")
|
|
|
|
|
elif lamp.shape == 'RECTANGLE':
|
|
|
|
|
sub.prop(lamp, "size", text="Size X")
|
|
|
|
|
sub.prop(lamp, "size_y", text="Size Y")
|
|
|
|
|
|
Cycles: Added support for light portals
This patch adds support for light portals: objects that help sampling the
environment light, therefore improving convergence. Using them tor other
lights in a unidirectional pathtracer is virtually useless.
The sampling is done with the area-preserving code already used for area lamps.
MIS is used both for combination of different portals and for combining portal-
and envmap-sampling.
The direction of portals is considered, they aren't used if the sampling point
is behind them.
Reviewers: sergey, dingto, #cycles
Reviewed By: dingto, #cycles
Subscribers: Lapineige, nutel, jtheninja, dsisco11, januz, vitorbalbio, candreacchio, TARDISMaker, lichtwerk, ace_dragon, marcog, mib2berlin, Tunge, lopataasdf, lordodin, sergey, dingto
Differential Revision: https://developer.blender.org/D1133
2015-04-28 00:51:55 +05:00
|
|
|
if not (lamp.type == 'AREA' and clamp.is_portal):
|
|
|
|
|
sub = col.column(align=True)
|
2015-05-10 12:55:30 +02:00
|
|
|
if use_branched_path(context):
|
2016-01-21 09:00:10 +01:00
|
|
|
subsub = sub.row(align=True)
|
|
|
|
|
subsub.active = use_sample_all_lights(context)
|
|
|
|
|
subsub.prop(clamp, "samples")
|
Cycles: Added support for light portals
This patch adds support for light portals: objects that help sampling the
environment light, therefore improving convergence. Using them tor other
lights in a unidirectional pathtracer is virtually useless.
The sampling is done with the area-preserving code already used for area lamps.
MIS is used both for combination of different portals and for combining portal-
and envmap-sampling.
The direction of portals is considered, they aren't used if the sampling point
is behind them.
Reviewers: sergey, dingto, #cycles
Reviewed By: dingto, #cycles
Subscribers: Lapineige, nutel, jtheninja, dsisco11, januz, vitorbalbio, candreacchio, TARDISMaker, lichtwerk, ace_dragon, marcog, mib2berlin, Tunge, lopataasdf, lordodin, sergey, dingto
Differential Revision: https://developer.blender.org/D1133
2015-04-28 00:51:55 +05:00
|
|
|
sub.prop(clamp, "max_bounces")
|
2012-06-13 11:44:48 +00:00
|
|
|
|
2011-09-27 20:37:24 +00:00
|
|
|
col = split.column()
|
Cycles: Added support for light portals
This patch adds support for light portals: objects that help sampling the
environment light, therefore improving convergence. Using them tor other
lights in a unidirectional pathtracer is virtually useless.
The sampling is done with the area-preserving code already used for area lamps.
MIS is used both for combination of different portals and for combining portal-
and envmap-sampling.
The direction of portals is considered, they aren't used if the sampling point
is behind them.
Reviewers: sergey, dingto, #cycles
Reviewed By: dingto, #cycles
Subscribers: Lapineige, nutel, jtheninja, dsisco11, januz, vitorbalbio, candreacchio, TARDISMaker, lichtwerk, ace_dragon, marcog, mib2berlin, Tunge, lopataasdf, lordodin, sergey, dingto
Differential Revision: https://developer.blender.org/D1133
2015-04-28 00:51:55 +05:00
|
|
|
|
|
|
|
|
sub = col.column(align=True)
|
|
|
|
|
sub.active = not (lamp.type == 'AREA' and clamp.is_portal)
|
|
|
|
|
sub.prop(clamp, "cast_shadow")
|
|
|
|
|
sub.prop(clamp, "use_multiple_importance_sampling", text="Multiple Importance")
|
|
|
|
|
|
|
|
|
|
if lamp.type == 'AREA':
|
|
|
|
|
col.prop(clamp, "is_portal", text="Portal")
|
2013-01-30 15:57:15 +00:00
|
|
|
|
2012-06-04 17:17:10 +00:00
|
|
|
if lamp.type == 'HEMI':
|
2013-02-28 15:31:20 +00:00
|
|
|
layout.label(text="Not supported, interpreted as sun lamp")
|
2011-11-15 02:58:01 +00:00
|
|
|
|
|
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_LAMP_PT_nodes(CyclesButtonsPanel, Panel):
|
2011-10-12 23:03:12 +00:00
|
|
|
bl_label = "Nodes"
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_context = "data"
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
Cycles: Added support for light portals
This patch adds support for light portals: objects that help sampling the
environment light, therefore improving convergence. Using them tor other
lights in a unidirectional pathtracer is virtually useless.
The sampling is done with the area-preserving code already used for area lamps.
MIS is used both for combination of different portals and for combining portal-
and envmap-sampling.
The direction of portals is considered, they aren't used if the sampling point
is behind them.
Reviewers: sergey, dingto, #cycles
Reviewed By: dingto, #cycles
Subscribers: Lapineige, nutel, jtheninja, dsisco11, januz, vitorbalbio, candreacchio, TARDISMaker, lichtwerk, ace_dragon, marcog, mib2berlin, Tunge, lopataasdf, lordodin, sergey, dingto
Differential Revision: https://developer.blender.org/D1133
2015-04-28 00:51:55 +05:00
|
|
|
return context.lamp and not (context.lamp.type == 'AREA' and
|
|
|
|
|
context.lamp.cycles.is_portal) and \
|
|
|
|
|
CyclesButtonsPanel.poll(context)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-10 13:00:53 +00:00
|
|
|
lamp = context.lamp
|
2017-08-02 07:53:58 +10:00
|
|
|
if not panel_node_draw(layout, lamp, ('OUTPUT_LAMP',), 'Surface'):
|
2011-11-10 13:00:53 +00:00
|
|
|
layout.prop(lamp, "color")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2012-06-19 22:17:19 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_LAMP_PT_spot(CyclesButtonsPanel, Panel):
|
2012-06-04 17:17:10 +00:00
|
|
|
bl_label = "Spot Shape"
|
|
|
|
|
bl_context = "data"
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
lamp = context.lamp
|
|
|
|
|
return (lamp and lamp.type == 'SPOT') and CyclesButtonsPanel.poll(context)
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
lamp = context.lamp
|
|
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
|
sub = col.column()
|
|
|
|
|
sub.prop(lamp, "spot_size", text="Size")
|
|
|
|
|
sub.prop(lamp, "spot_blend", text="Blend", slider=True)
|
|
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
|
col.prop(lamp, "show_cone")
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2012-06-19 22:17:19 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_WORLD_PT_preview(CyclesButtonsPanel, Panel):
|
2013-01-29 17:30:26 +00:00
|
|
|
bl_label = "Preview"
|
|
|
|
|
bl_context = "world"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
return context.world and CyclesButtonsPanel.poll(context)
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
self.layout.template_preview(context.world)
|
|
|
|
|
|
|
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_WORLD_PT_surface(CyclesButtonsPanel, Panel):
|
2011-10-12 23:03:12 +00:00
|
|
|
bl_label = "Surface"
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_context = "world"
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
return context.world and CyclesButtonsPanel.poll(context)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-10 13:00:53 +00:00
|
|
|
world = context.world
|
2012-01-20 17:49:17 +00:00
|
|
|
|
2017-08-02 07:53:58 +10:00
|
|
|
if not panel_node_draw(layout, world, ('OUTPUT_WORLD',), 'Surface'):
|
2011-11-10 13:00:53 +00:00
|
|
|
layout.prop(world, "horizon_color", text="Color")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2012-03-08 05:36:05 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_WORLD_PT_volume(CyclesButtonsPanel, Panel):
|
2012-02-28 16:45:08 +00:00
|
|
|
bl_label = "Volume"
|
2012-01-20 17:49:17 +00:00
|
|
|
bl_context = "world"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2013-12-28 16:56:19 +01:00
|
|
|
world = context.world
|
|
|
|
|
return world and world.node_tree and CyclesButtonsPanel.poll(context)
|
2012-01-20 17:49:17 +00:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
world = context.world
|
2017-08-02 07:53:58 +10:00
|
|
|
panel_node_draw(layout, world, ('OUTPUT_WORLD',), 'Volume')
|
2012-01-20 17:49:17 +00:00
|
|
|
|
2012-03-08 05:36:05 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_WORLD_PT_ambient_occlusion(CyclesButtonsPanel, Panel):
|
2012-02-28 16:45:08 +00:00
|
|
|
bl_label = "Ambient Occlusion"
|
|
|
|
|
bl_context = "world"
|
2012-01-20 17:49:17 +00:00
|
|
|
|
2012-02-28 16:45:08 +00:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
return context.world and CyclesButtonsPanel.poll(context)
|
2012-01-20 17:49:17 +00:00
|
|
|
|
2012-02-28 16:45:08 +00:00
|
|
|
def draw_header(self, context):
|
|
|
|
|
light = context.world.light_settings
|
|
|
|
|
self.layout.prop(light, "use_ambient_occlusion", text="")
|
2012-01-20 17:49:17 +00:00
|
|
|
|
2012-02-28 16:45:08 +00:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
2013-09-13 10:26:20 +00:00
|
|
|
light = context.world.light_settings
|
2016-11-25 18:59:43 +01:00
|
|
|
scene = context.scene
|
2012-02-28 16:45:08 +00:00
|
|
|
|
2012-03-11 16:25:58 +00:00
|
|
|
row = layout.row()
|
2013-09-13 10:26:20 +00:00
|
|
|
sub = row.row()
|
2016-11-25 18:59:43 +01:00
|
|
|
sub.active = light.use_ambient_occlusion or scene.render.use_simplify
|
2013-09-13 10:26:20 +00:00
|
|
|
sub.prop(light, "ao_factor", text="Factor")
|
2012-03-11 16:25:58 +00:00
|
|
|
row.prop(light, "distance", text="Distance")
|
2012-02-28 16:45:08 +00:00
|
|
|
|
2013-06-27 04:32:44 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_WORLD_PT_mist(CyclesButtonsPanel, Panel):
|
2013-06-07 12:45:26 +00:00
|
|
|
bl_label = "Mist Pass"
|
|
|
|
|
bl_context = "world"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
if CyclesButtonsPanel.poll(context):
|
2014-04-05 17:52:06 -03:00
|
|
|
if context.world:
|
2017-11-22 10:52:39 -02:00
|
|
|
for view_layer in context.scene.view_layers:
|
|
|
|
|
if view_layer.use_pass_mist:
|
2014-04-05 17:52:06 -03:00
|
|
|
return True
|
2013-06-07 12:45:26 +00:00
|
|
|
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
world = context.world
|
|
|
|
|
|
|
|
|
|
split = layout.split(align=True)
|
|
|
|
|
split.prop(world.mist_settings, "start")
|
|
|
|
|
split.prop(world.mist_settings, "depth")
|
|
|
|
|
|
|
|
|
|
layout.prop(world.mist_settings, "falloff")
|
|
|
|
|
|
2012-03-08 05:36:05 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_WORLD_PT_ray_visibility(CyclesButtonsPanel, Panel):
|
2013-06-10 20:34:34 +00:00
|
|
|
bl_label = "Ray Visibility"
|
|
|
|
|
bl_context = "world"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
return CyclesButtonsPanel.poll(context) and context.world
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
world = context.world
|
|
|
|
|
visibility = world.cycles_visibility
|
|
|
|
|
|
|
|
|
|
flow = layout.column_flow()
|
|
|
|
|
|
|
|
|
|
flow.prop(visibility, "camera")
|
|
|
|
|
flow.prop(visibility, "diffuse")
|
|
|
|
|
flow.prop(visibility, "glossy")
|
|
|
|
|
flow.prop(visibility, "transmission")
|
2014-09-05 16:17:24 +02:00
|
|
|
flow.prop(visibility, "scatter")
|
2013-06-10 20:34:34 +00:00
|
|
|
|
|
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_WORLD_PT_settings(CyclesButtonsPanel, Panel):
|
2012-02-28 16:45:08 +00:00
|
|
|
bl_label = "Settings"
|
2011-10-12 23:03:12 +00:00
|
|
|
bl_context = "world"
|
2011-10-19 00:13:41 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2011-10-12 23:03:12 +00:00
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2012-02-28 16:45:08 +00:00
|
|
|
return context.world and CyclesButtonsPanel.poll(context)
|
2011-10-12 23:03:12 +00:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
world = context.world
|
2012-02-28 16:45:08 +00:00
|
|
|
cworld = world.cycles
|
2016-08-01 11:54:02 +10:00
|
|
|
# cscene = context.scene.cycles
|
2011-10-12 23:03:12 +00:00
|
|
|
|
2014-06-07 18:47:14 +02:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
|
|
|
|
|
|
col.label(text="Surface:")
|
|
|
|
|
col.prop(cworld, "sample_as_light", text="Multiple Importance")
|
2012-02-28 16:45:08 +00:00
|
|
|
|
2014-06-07 18:47:14 +02:00
|
|
|
sub = col.column(align=True)
|
2012-06-13 11:44:48 +00:00
|
|
|
sub.active = cworld.sample_as_light
|
|
|
|
|
sub.prop(cworld, "sample_map_resolution")
|
2015-05-10 12:55:30 +02:00
|
|
|
if use_branched_path(context):
|
2016-01-21 09:00:10 +01:00
|
|
|
subsub = sub.row(align=True)
|
|
|
|
|
subsub.active = use_sample_all_lights(context)
|
|
|
|
|
subsub.prop(cworld, "samples")
|
2015-07-12 17:56:54 +02:00
|
|
|
sub.prop(cworld, "max_bounces")
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2014-06-07 18:47:14 +02:00
|
|
|
col = split.column()
|
|
|
|
|
col.label(text="Volume:")
|
2014-08-24 14:54:48 +02:00
|
|
|
sub = col.column()
|
|
|
|
|
sub.active = use_cpu(context)
|
|
|
|
|
sub.prop(cworld, "volume_sampling", text="")
|
2017-10-08 02:36:05 +02:00
|
|
|
col.prop(cworld, "volume_interpolation", text="")
|
2014-06-07 18:47:14 +02:00
|
|
|
col.prop(cworld, "homogeneous_volume", text="Homogeneous")
|
|
|
|
|
|
2012-03-08 05:36:05 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_MATERIAL_PT_preview(CyclesButtonsPanel, Panel):
|
2013-01-29 17:30:26 +00:00
|
|
|
bl_label = "Preview"
|
|
|
|
|
bl_context = "material"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
return context.material and CyclesButtonsPanel.poll(context)
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
self.layout.template_preview(context.material)
|
|
|
|
|
|
|
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_MATERIAL_PT_surface(CyclesButtonsPanel, Panel):
|
2011-10-12 23:03:12 +00:00
|
|
|
bl_label = "Surface"
|
|
|
|
|
bl_context = "material"
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
return context.material and CyclesButtonsPanel.poll(context)
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
mat = context.material
|
2017-08-02 07:53:58 +10:00
|
|
|
if not panel_node_draw(layout, mat, ('OUTPUT_MATERIAL', 'OUTPUT_EEVEE_MATERIAL'), 'Surface'):
|
2011-11-10 13:00:53 +00:00
|
|
|
layout.prop(mat, "diffuse_color")
|
2011-10-12 23:03:12 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_MATERIAL_PT_volume(CyclesButtonsPanel, Panel):
|
2011-10-12 23:03:12 +00:00
|
|
|
bl_label = "Volume"
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_context = "material"
|
2011-10-19 00:13:41 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2013-12-28 16:56:19 +01:00
|
|
|
mat = context.material
|
|
|
|
|
return mat and mat.node_tree and CyclesButtonsPanel.poll(context)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
mat = context.material
|
2014-09-17 18:36:17 +10:00
|
|
|
# cmat = mat.cycles
|
2011-10-12 23:03:12 +00:00
|
|
|
|
2017-08-02 07:53:58 +10:00
|
|
|
panel_node_draw(layout, mat, ('OUTPUT_MATERIAL', 'OUTPUT_EEVEE_MATERIAL'), 'Volume')
|
2011-10-12 23:03:12 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_MATERIAL_PT_displacement(CyclesButtonsPanel, Panel):
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_label = "Displacement"
|
|
|
|
|
bl_context = "material"
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2011-10-22 18:51:45 +00:00
|
|
|
mat = context.material
|
|
|
|
|
return mat and mat.node_tree and CyclesButtonsPanel.poll(context)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
mat = context.material
|
2017-08-02 07:53:58 +10:00
|
|
|
panel_node_draw(layout, mat, ('OUTPUT_MATERIAL', 'OUTPUT_EEVEE_MATERIAL'), 'Displacement')
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_MATERIAL_PT_settings(CyclesButtonsPanel, Panel):
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_label = "Settings"
|
|
|
|
|
bl_context = "material"
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2011-10-12 15:48:26 +00:00
|
|
|
return context.material and CyclesButtonsPanel.poll(context)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
mat = context.material
|
2011-09-27 20:37:24 +00:00
|
|
|
cmat = mat.cycles
|
|
|
|
|
|
|
|
|
|
split = layout.split()
|
2014-06-07 18:47:14 +02:00
|
|
|
col = split.column()
|
2014-11-22 20:21:18 +01:00
|
|
|
col.label(text="Surface:")
|
|
|
|
|
col.prop(cmat, "sample_as_light", text="Multiple Importance")
|
2013-06-18 09:36:00 +00:00
|
|
|
col.prop(cmat, "use_transparent_shadow")
|
2011-06-08 23:36:06 +00:00
|
|
|
|
2018-01-25 15:38:46 +01:00
|
|
|
col.separator()
|
|
|
|
|
col.label(text="Geometry:")
|
|
|
|
|
col.prop(cmat, "displacement_method", text="")
|
2016-08-02 05:13:58 -04:00
|
|
|
|
2014-06-07 18:47:14 +02:00
|
|
|
col = split.column()
|
|
|
|
|
col.label(text="Volume:")
|
2014-08-24 14:54:48 +02:00
|
|
|
sub = col.column()
|
|
|
|
|
sub.active = use_cpu(context)
|
|
|
|
|
sub.prop(cmat, "volume_sampling", text="")
|
2017-10-08 02:36:05 +02:00
|
|
|
col.prop(cmat, "volume_interpolation", text="")
|
2014-06-07 18:47:14 +02:00
|
|
|
col.prop(cmat, "homogeneous_volume", text="Homogeneous")
|
|
|
|
|
|
2018-01-25 15:38:46 +01:00
|
|
|
col.separator()
|
|
|
|
|
col.prop(mat, "pass_index")
|
2018-01-25 14:08:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class CYCLES_MATERIAL_PT_viewport(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Viewport"
|
|
|
|
|
bl_context = "material"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
return context.material and CyclesButtonsPanel.poll(context)
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
mat = context.material
|
|
|
|
|
|
|
|
|
|
layout = self.layout
|
2014-11-21 14:07:25 +01:00
|
|
|
split = layout.split()
|
|
|
|
|
|
2014-11-22 20:21:18 +01:00
|
|
|
col = split.column(align=True)
|
2018-01-25 14:08:56 +01:00
|
|
|
col.label("Color:")
|
2014-11-21 14:07:25 +01:00
|
|
|
col.prop(mat, "diffuse_color", text="")
|
2014-11-22 20:21:18 +01:00
|
|
|
col.prop(mat, "alpha")
|
|
|
|
|
|
|
|
|
|
col = split.column(align=True)
|
2018-01-25 14:08:56 +01:00
|
|
|
col.label("Specular:")
|
2014-11-21 14:07:25 +01:00
|
|
|
col.prop(mat, "specular_color", text="")
|
2014-11-22 20:21:18 +01:00
|
|
|
col.prop(mat, "specular_hardness", text="Hardness")
|
2014-11-21 14:07:25 +01:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_RENDER_PT_bake(CyclesButtonsPanel, Panel):
|
2014-01-02 19:05:07 -02:00
|
|
|
bl_label = "Bake"
|
|
|
|
|
bl_context = "render"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
COMPAT_ENGINES = {'CYCLES'}
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
cbk = scene.render.bake
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
rd = scene.render
|
2014-07-22 12:03:15 +10:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
if rd.use_bake_multires:
|
|
|
|
|
layout.operator("object.bake_image", icon='RENDER_STILL')
|
|
|
|
|
else:
|
|
|
|
|
layout.operator("object.bake", icon='RENDER_STILL').type = cscene.bake_type
|
2014-07-22 12:03:15 +10:00
|
|
|
|
2014-01-02 19:05:07 -02:00
|
|
|
col = layout.column()
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
col.prop(rd, "use_bake_multires")
|
|
|
|
|
if rd.use_bake_multires:
|
|
|
|
|
col.prop(rd, "bake_type")
|
2014-01-02 19:05:07 -02:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
split = layout.split()
|
2014-01-02 19:05:07 -02:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
col = split.column()
|
|
|
|
|
col.prop(rd, "bake_margin")
|
|
|
|
|
col.prop(rd, "use_bake_clear")
|
2014-01-02 19:05:07 -02:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
col = split.column()
|
|
|
|
|
if rd.bake_type == 'DISPLACEMENT':
|
|
|
|
|
col.prop(rd, "use_bake_lores_mesh")
|
|
|
|
|
else:
|
|
|
|
|
col.prop(cscene, "bake_type")
|
2014-01-02 19:05:07 -02:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
col = layout.column()
|
2016-01-15 13:00:56 -02:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
if cscene.bake_type == 'NORMAL':
|
|
|
|
|
col.prop(cbk, "normal_space", text="Space")
|
2016-01-15 13:00:56 -02:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
row = col.row(align=True)
|
|
|
|
|
row.label(text="Swizzle:")
|
|
|
|
|
row.prop(cbk, "normal_r", text="")
|
|
|
|
|
row.prop(cbk, "normal_g", text="")
|
|
|
|
|
row.prop(cbk, "normal_b", text="")
|
2016-01-15 13:00:56 -02:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
elif cscene.bake_type == 'COMBINED':
|
|
|
|
|
row = col.row(align=True)
|
|
|
|
|
row.prop(cbk, "use_pass_direct", toggle=True)
|
|
|
|
|
row.prop(cbk, "use_pass_indirect", toggle=True)
|
2016-01-15 13:00:56 -02:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
split = col.split()
|
|
|
|
|
split.active = cbk.use_pass_direct or cbk.use_pass_indirect
|
2016-01-15 13:00:56 -02:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
col = split.column()
|
|
|
|
|
col.prop(cbk, "use_pass_diffuse")
|
|
|
|
|
col.prop(cbk, "use_pass_glossy")
|
|
|
|
|
col.prop(cbk, "use_pass_transmission")
|
2016-02-09 19:44:15 +01:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
col = split.column()
|
|
|
|
|
col.prop(cbk, "use_pass_subsurface")
|
|
|
|
|
col.prop(cbk, "use_pass_ambient_occlusion")
|
|
|
|
|
col.prop(cbk, "use_pass_emit")
|
2016-02-09 19:44:15 +01:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
elif cscene.bake_type in {'DIFFUSE', 'GLOSSY', 'TRANSMISSION', 'SUBSURFACE'}:
|
|
|
|
|
row = col.row(align=True)
|
|
|
|
|
row.prop(cbk, "use_pass_direct", toggle=True)
|
|
|
|
|
row.prop(cbk, "use_pass_indirect", toggle=True)
|
|
|
|
|
row.prop(cbk, "use_pass_color", toggle=True)
|
2016-02-09 19:44:15 +01:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
layout.separator()
|
2016-02-09 19:44:15 +01:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
|
col.prop(cbk, "margin")
|
|
|
|
|
col.prop(cbk, "use_clear")
|
|
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
|
col.prop(cbk, "use_selected_to_active")
|
|
|
|
|
sub = col.column()
|
|
|
|
|
sub.active = cbk.use_selected_to_active
|
|
|
|
|
sub.prop(cbk, "use_cage", text="Cage")
|
|
|
|
|
if cbk.use_cage:
|
|
|
|
|
sub.prop(cbk, "cage_extrusion", text="Extrusion")
|
|
|
|
|
sub.prop_search(cbk, "cage_object", scene, "objects", text="")
|
|
|
|
|
else:
|
|
|
|
|
sub.prop(cbk, "cage_extrusion", text="Ray Distance")
|
2014-01-02 19:05:07 -02:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_RENDER_PT_debug(CyclesButtonsPanel, Panel):
|
2016-01-12 16:00:48 +05:00
|
|
|
bl_label = "Debug"
|
|
|
|
|
bl_context = "render"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
COMPAT_ENGINES = {'CYCLES'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2016-03-25 19:59:18 +01:00
|
|
|
return CyclesButtonsPanel.poll(context) and bpy.app.debug_value == 256
|
2016-01-12 16:00:48 +05:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
|
|
|
|
|
col.label('CPU Flags:')
|
2016-01-19 18:38:41 +01:00
|
|
|
row = col.row(align=True)
|
2016-01-12 16:00:48 +05:00
|
|
|
row.prop(cscene, "debug_use_cpu_sse2", toggle=True)
|
|
|
|
|
row.prop(cscene, "debug_use_cpu_sse3", toggle=True)
|
|
|
|
|
row.prop(cscene, "debug_use_cpu_sse41", toggle=True)
|
|
|
|
|
row.prop(cscene, "debug_use_cpu_avx", toggle=True)
|
|
|
|
|
row.prop(cscene, "debug_use_cpu_avx2", toggle=True)
|
2018-01-19 10:59:58 +01:00
|
|
|
col.prop(cscene, "debug_bvh_layout")
|
2017-02-14 06:20:48 -05:00
|
|
|
col.prop(cscene, "debug_use_cpu_split_kernel")
|
2016-01-12 16:00:48 +05:00
|
|
|
|
2017-08-21 15:09:03 +02:00
|
|
|
col.separator()
|
|
|
|
|
|
2016-05-06 22:34:15 +02:00
|
|
|
col = layout.column()
|
|
|
|
|
col.label('CUDA Flags:')
|
|
|
|
|
col.prop(cscene, "debug_use_cuda_adaptive_compile")
|
2017-02-14 05:50:29 -05:00
|
|
|
col.prop(cscene, "debug_use_cuda_split_kernel")
|
2016-05-06 22:34:15 +02:00
|
|
|
|
2017-08-21 15:09:03 +02:00
|
|
|
col.separator()
|
|
|
|
|
|
2016-01-12 16:00:48 +05:00
|
|
|
col = layout.column()
|
|
|
|
|
col.label('OpenCL Flags:')
|
|
|
|
|
col.prop(cscene, "debug_opencl_kernel_type", text="Kernel")
|
|
|
|
|
col.prop(cscene, "debug_opencl_device_type", text="Device")
|
2017-03-08 17:56:06 +01:00
|
|
|
col.prop(cscene, "debug_opencl_kernel_single_program", text="Single Program")
|
2016-01-12 16:00:48 +05:00
|
|
|
col.prop(cscene, "debug_use_opencl_debug", text="Debug")
|
2017-07-05 20:16:41 -04:00
|
|
|
col.prop(cscene, "debug_opencl_mem_limit")
|
2016-01-12 16:00:48 +05:00
|
|
|
|
2017-08-21 15:09:03 +02:00
|
|
|
col.separator()
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
col.prop(cscene, "debug_bvh_type")
|
|
|
|
|
|
2016-01-12 16:00:48 +05:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_PARTICLE_PT_curve_settings(CyclesButtonsPanel, Panel):
|
2016-12-28 17:30:58 +01:00
|
|
|
bl_label = "Cycles Hair Settings"
|
|
|
|
|
bl_context = "particle"
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
scene = context.scene
|
|
|
|
|
ccscene = scene.cycles_curves
|
|
|
|
|
psys = context.particle_system
|
|
|
|
|
use_curves = ccscene.use_curves and psys
|
|
|
|
|
return CyclesButtonsPanel.poll(context) and use_curves and psys.settings.type == 'HAIR'
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
psys = context.particle_settings
|
|
|
|
|
cpsys = psys.cycles
|
|
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(cpsys, "shape", text="Shape")
|
|
|
|
|
|
|
|
|
|
layout.label(text="Thickness:")
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(cpsys, "root_width", text="Root")
|
|
|
|
|
row.prop(cpsys, "tip_width", text="Tip")
|
|
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(cpsys, "radius_scale", text="Scaling")
|
|
|
|
|
row.prop(cpsys, "use_closetip", text="Close tip")
|
|
|
|
|
|
|
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_SCENE_PT_simplify(CyclesButtonsPanel, Panel):
|
2012-04-26 12:13:26 +00:00
|
|
|
bl_label = "Simplify"
|
|
|
|
|
bl_context = "scene"
|
|
|
|
|
COMPAT_ENGINES = {'CYCLES'}
|
|
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
|
rd = context.scene.render
|
|
|
|
|
self.layout.prop(rd, "use_simplify", text="")
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
2015-04-10 18:09:58 +05:00
|
|
|
scene = context.scene
|
|
|
|
|
rd = scene.render
|
|
|
|
|
cscene = scene.cycles
|
2012-04-26 12:13:26 +00:00
|
|
|
|
|
|
|
|
layout.active = rd.use_simplify
|
|
|
|
|
|
2016-11-17 12:13:22 +01:00
|
|
|
col = layout.column(align=True)
|
|
|
|
|
col.label(text="Subdivision")
|
|
|
|
|
row = col.row(align=True)
|
|
|
|
|
row.prop(rd, "simplify_subdivision", text="Viewport")
|
|
|
|
|
row.prop(rd, "simplify_subdivision_render", text="Render")
|
2015-05-04 16:26:28 +05:00
|
|
|
|
2012-04-26 12:13:26 +00:00
|
|
|
|
2016-12-28 17:30:58 +01:00
|
|
|
col = layout.column(align=True)
|
|
|
|
|
col.label(text="Child Particles")
|
|
|
|
|
row = col.row(align=True)
|
|
|
|
|
row.prop(rd, "simplify_child_particles", text="Viewport")
|
|
|
|
|
row.prop(rd, "simplify_child_particles_render", text="Render")
|
|
|
|
|
|
2016-11-17 12:13:22 +01:00
|
|
|
col = layout.column(align=True)
|
|
|
|
|
split = col.split()
|
|
|
|
|
sub = split.column()
|
|
|
|
|
sub.label(text="Texture Limit Viewport")
|
|
|
|
|
sub.prop(cscene, "texture_limit", text="")
|
|
|
|
|
sub = split.column()
|
|
|
|
|
sub.label(text="Texture Limit Render")
|
|
|
|
|
sub.prop(cscene, "texture_limit_render", text="")
|
2016-11-13 00:16:50 +01:00
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
col = split.column()
|
2015-04-10 18:09:58 +05:00
|
|
|
col.prop(cscene, "use_camera_cull")
|
2016-11-17 12:13:22 +01:00
|
|
|
row = col.row()
|
|
|
|
|
row.active = cscene.use_camera_cull
|
|
|
|
|
row.prop(cscene, "camera_cull_margin")
|
2015-04-10 18:09:58 +05:00
|
|
|
|
2016-11-13 00:16:50 +01:00
|
|
|
col = split.column()
|
|
|
|
|
col.prop(cscene, "use_distance_cull")
|
2016-11-17 12:13:22 +01:00
|
|
|
row = col.row()
|
|
|
|
|
row.active = cscene.use_distance_cull
|
|
|
|
|
row.prop(cscene, "distance_cull_margin", text="Distance")
|
2012-04-26 12:13:26 +00:00
|
|
|
|
2016-11-25 18:59:43 +01:00
|
|
|
split = layout.split()
|
|
|
|
|
col = split.column()
|
|
|
|
|
col.prop(cscene, "ao_bounces")
|
|
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
|
col.prop(cscene, "ao_bounces_render")
|
|
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
def draw_device(self, context):
|
2011-08-28 13:55:59 +00:00
|
|
|
scene = context.scene
|
|
|
|
|
layout = self.layout
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2017-10-16 17:15:03 -02:00
|
|
|
if context.engine == 'CYCLES':
|
2012-12-13 08:45:55 +00:00
|
|
|
from . import engine
|
2011-08-28 13:55:59 +00:00
|
|
|
cscene = scene.cycles
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2018-04-21 13:03:16 +02:00
|
|
|
split = layout.split(percentage=1 / 3)
|
|
|
|
|
split.label("Feature Set:")
|
|
|
|
|
split.prop(cscene, "feature_set", text="")
|
2011-09-01 19:43:57 +00:00
|
|
|
|
2017-06-12 13:35:00 +10:00
|
|
|
split = layout.split(percentage=1 / 3)
|
Cycles: Refactor Device selection to allow individual GPU compute device selection
Previously, it was only possible to choose a single GPU or all of that type (CUDA or OpenCL).
Now, a toggle button is displayed for every device.
These settings are tied to the PCI Bus ID of the devices, so they're consistent across hardware addition and removal (but not when swapping/moving cards).
From the code perspective, the more important change is that now, the compute device properties are stored in the Addon preferences of the Cycles addon, instead of directly in the User Preferences.
This allows for a cleaner implementation, removing the Cycles C API functions that were called by the RNA code to specify the enum items.
Note that this change is neither backwards- nor forwards-compatible, but since it's only a User Preference no existing files are broken.
Reviewers: #cycles, brecht
Reviewed By: #cycles, brecht
Subscribers: brecht, juicyfruit, mib2berlin, Blendify
Differential Revision: https://developer.blender.org/D2338
2016-11-07 02:33:53 +01:00
|
|
|
split.label("Device:")
|
2016-11-19 01:15:08 +01:00
|
|
|
row = split.row()
|
2017-03-12 06:45:29 +01:00
|
|
|
row.active = show_device_active(context)
|
2016-11-19 01:15:08 +01:00
|
|
|
row.prop(cscene, "device", text="")
|
2012-09-26 21:19:51 +00:00
|
|
|
|
2014-04-05 12:31:59 +02:00
|
|
|
if engine.with_osl() and use_cpu(context):
|
2012-09-03 12:35:32 +00:00
|
|
|
layout.prop(cscene, "shading_system")
|
2011-12-05 22:19:30 +00:00
|
|
|
|
2012-01-17 18:01:16 +00:00
|
|
|
|
2011-08-29 16:54:13 +00:00
|
|
|
def draw_pause(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
scene = context.scene
|
|
|
|
|
|
2017-10-16 17:15:03 -02:00
|
|
|
if context.engine == "CYCLES":
|
2011-08-29 16:54:13 +00:00
|
|
|
view = context.space_data
|
|
|
|
|
|
2017-05-01 14:55:59 +02:00
|
|
|
cscene = scene.cycles
|
|
|
|
|
layout.prop(cscene, "preview_pause", icon="PAUSE", text="")
|
|
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
def get_panels():
|
2016-07-05 22:26:15 +02:00
|
|
|
exclude_panels = {
|
|
|
|
|
'DATA_PT_area',
|
|
|
|
|
'DATA_PT_camera_dof',
|
|
|
|
|
'DATA_PT_falloff_curve',
|
|
|
|
|
'DATA_PT_lamp',
|
|
|
|
|
'DATA_PT_preview',
|
|
|
|
|
'DATA_PT_spot',
|
|
|
|
|
'MATERIAL_PT_context_material',
|
|
|
|
|
'MATERIAL_PT_preview',
|
2018-04-24 15:20:17 +02:00
|
|
|
'VIEWLAYER_PT_filter',
|
2017-11-22 10:52:39 -02:00
|
|
|
'VIEWLAYER_PT_layer_passes',
|
2016-07-05 22:26:15 +02:00
|
|
|
'RENDER_PT_post_processing',
|
|
|
|
|
'SCENE_PT_simplify',
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
panels = []
|
2016-07-06 21:43:55 +02:00
|
|
|
for panel in bpy.types.Panel.__subclasses__():
|
|
|
|
|
if hasattr(panel, 'COMPAT_ENGINES') and 'BLENDER_RENDER' in panel.COMPAT_ENGINES:
|
|
|
|
|
if panel.__name__ not in exclude_panels:
|
|
|
|
|
panels.append(panel)
|
2016-07-05 22:26:15 +02:00
|
|
|
|
|
|
|
|
return panels
|
2014-02-13 08:51:33 +11:00
|
|
|
|
2017-03-20 12:16:51 +11:00
|
|
|
|
|
|
|
|
classes = (
|
|
|
|
|
CYCLES_MT_sampling_presets,
|
|
|
|
|
CYCLES_MT_integrator_presets,
|
2017-09-01 16:08:25 +10:00
|
|
|
CYCLES_RENDER_PT_sampling,
|
|
|
|
|
CYCLES_RENDER_PT_geometry,
|
|
|
|
|
CYCLES_RENDER_PT_light_paths,
|
|
|
|
|
CYCLES_RENDER_PT_motion_blur,
|
|
|
|
|
CYCLES_RENDER_PT_film,
|
|
|
|
|
CYCLES_RENDER_PT_performance,
|
2018-04-24 15:20:17 +02:00
|
|
|
CYCLES_RENDER_PT_filter,
|
2017-09-01 16:08:25 +10:00
|
|
|
CYCLES_RENDER_PT_layer_passes,
|
|
|
|
|
CYCLES_RENDER_PT_denoising,
|
|
|
|
|
CYCLES_PT_post_processing,
|
|
|
|
|
CYCLES_CAMERA_PT_dof,
|
|
|
|
|
CYCLES_PT_context_material,
|
|
|
|
|
CYCLES_OBJECT_PT_motion_blur,
|
|
|
|
|
CYCLES_OBJECT_PT_cycles_settings,
|
2017-03-20 12:16:51 +11:00
|
|
|
CYCLES_OT_use_shading_nodes,
|
2017-09-01 16:08:25 +10:00
|
|
|
CYCLES_LAMP_PT_preview,
|
|
|
|
|
CYCLES_LAMP_PT_lamp,
|
|
|
|
|
CYCLES_LAMP_PT_nodes,
|
|
|
|
|
CYCLES_LAMP_PT_spot,
|
|
|
|
|
CYCLES_WORLD_PT_preview,
|
|
|
|
|
CYCLES_WORLD_PT_surface,
|
|
|
|
|
CYCLES_WORLD_PT_volume,
|
|
|
|
|
CYCLES_WORLD_PT_ambient_occlusion,
|
|
|
|
|
CYCLES_WORLD_PT_mist,
|
|
|
|
|
CYCLES_WORLD_PT_ray_visibility,
|
|
|
|
|
CYCLES_WORLD_PT_settings,
|
|
|
|
|
CYCLES_MATERIAL_PT_preview,
|
|
|
|
|
CYCLES_MATERIAL_PT_surface,
|
|
|
|
|
CYCLES_MATERIAL_PT_volume,
|
|
|
|
|
CYCLES_MATERIAL_PT_displacement,
|
|
|
|
|
CYCLES_MATERIAL_PT_settings,
|
2018-01-25 14:08:56 +01:00
|
|
|
CYCLES_MATERIAL_PT_viewport,
|
2017-09-01 16:08:25 +10:00
|
|
|
CYCLES_RENDER_PT_bake,
|
|
|
|
|
CYCLES_RENDER_PT_debug,
|
|
|
|
|
CYCLES_PARTICLE_PT_curve_settings,
|
|
|
|
|
CYCLES_SCENE_PT_simplify,
|
2017-03-20 12:16:51 +11:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
def register():
|
2017-03-20 12:16:51 +11:00
|
|
|
from bpy.utils import register_class
|
|
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
bpy.types.RENDER_PT_render.append(draw_device)
|
2011-08-29 16:54:13 +00:00
|
|
|
bpy.types.VIEW3D_HT_header.append(draw_pause)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
for panel in get_panels():
|
|
|
|
|
panel.COMPAT_ENGINES.add('CYCLES')
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2017-03-20 12:16:51 +11:00
|
|
|
for cls in classes:
|
|
|
|
|
register_class(cls)
|
|
|
|
|
|
|
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
def unregister():
|
2017-03-20 12:16:51 +11:00
|
|
|
from bpy.utils import unregister_class
|
|
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
bpy.types.RENDER_PT_render.remove(draw_device)
|
2011-08-29 16:54:13 +00:00
|
|
|
bpy.types.VIEW3D_HT_header.remove(draw_pause)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
for panel in get_panels():
|
2016-07-06 21:43:55 +02:00
|
|
|
if 'CYCLES' in panel.COMPAT_ENGINES:
|
|
|
|
|
panel.COMPAT_ENGINES.remove('CYCLES')
|
2017-03-20 12:16:51 +11:00
|
|
|
|
|
|
|
|
for cls in classes:
|
|
|
|
|
unregister_class(cls)
|