2011-04-27 11:58:34 +00:00
|
|
|
#
|
|
|
|
# Copyright 2011, Blender Foundation.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
#
|
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
# <pep8 compliant>
|
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
import bpy
|
|
|
|
|
2011-08-29 17:55:14 +00:00
|
|
|
from bpy.types import Panel, Menu
|
2011-08-29 13:59:11 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
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
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
class CyclesButtonsPanel():
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_space_type = "PROPERTIES"
|
|
|
|
bl_region_type = "WINDOW"
|
|
|
|
bl_context = "render"
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
rd = context.scene.render
|
|
|
|
return rd.engine == 'CYCLES'
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2012-06-13 11:44:48 +00:00
|
|
|
class CyclesRender_PT_sampling(CyclesButtonsPanel, Panel):
|
|
|
|
bl_label = "Sampling"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
cscene = scene.cycles
|
2012-09-12 10:54:25 +00:00
|
|
|
device_type = context.user_preferences.system.compute_device_type
|
2012-06-13 11:44:48 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2012-06-14 08:58:23 +00:00
|
|
|
sub = col.column()
|
2012-09-29 23:45:35 +00:00
|
|
|
sub.active = (device_type == 'NONE' or cscene.device == 'CPU')
|
2012-06-13 11:44:48 +00:00
|
|
|
sub.prop(cscene, "progressive")
|
|
|
|
|
|
|
|
sub = col.column(align=True)
|
|
|
|
sub.prop(cscene, "seed")
|
|
|
|
sub.prop(cscene, "sample_clamp")
|
|
|
|
|
2012-09-12 10:54:25 +00:00
|
|
|
if cscene.progressive or (device_type != 'NONE' and cscene.device == 'GPU'):
|
2012-06-14 08:58:23 +00:00
|
|
|
col = split.column()
|
2012-06-13 11:44:48 +00:00
|
|
|
col.label(text="Samples:")
|
|
|
|
sub = col.column(align=True)
|
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")
|
|
|
|
sub.prop(cscene, "preview_aa_samples", text="Preview")
|
|
|
|
|
2012-06-14 08:58:23 +00:00
|
|
|
col = split.column()
|
2012-06-13 11:44:48 +00:00
|
|
|
col.label(text="Samples:")
|
2012-06-14 08:58:23 +00:00
|
|
|
sub = col.column(align=True)
|
|
|
|
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")
|
|
|
|
sub.prop(cscene, "mesh_light_samples", text="Mesh Light")
|
2012-06-13 11:44:48 +00:00
|
|
|
|
2012-06-19 22:17:19 +00:00
|
|
|
|
2012-06-13 11:44:48 +00:00
|
|
|
class CyclesRender_PT_light_paths(CyclesButtonsPanel, Panel):
|
|
|
|
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")
|
|
|
|
sub.prop(cscene, "transparent_min_bounces", text="Min")
|
2011-10-16 17:54:43 +00:00
|
|
|
sub.prop(cscene, "use_transparent_shadows", text="Shadows")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2012-06-13 11:44:48 +00:00
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col.prop(cscene, "no_caustics")
|
|
|
|
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")
|
|
|
|
sub.prop(cscene, "min_bounces", text="Min")
|
|
|
|
|
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")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2012-04-30 12:49:26 +00:00
|
|
|
class CyclesRender_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
|
|
|
|
|
|
|
|
rd = context.scene.render
|
|
|
|
layout.active = rd.use_motion_blur
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.prop(rd, "motion_blur_shutter")
|
|
|
|
|
|
|
|
|
2011-08-29 13:59:11 +00:00
|
|
|
class CyclesRender_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")
|
|
|
|
col.prop(cscene, "film_transparent")
|
2011-08-28 13:55:59 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2011-08-29 10:21:10 +00:00
|
|
|
sub = col.column(align=True)
|
|
|
|
sub.prop(cscene, "filter_type", text="")
|
2011-08-28 13:55:59 +00:00
|
|
|
if cscene.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
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-08-29 13:59:11 +00:00
|
|
|
class CyclesRender_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:")
|
|
|
|
col.row().prop(rd, "threads_mode", expand=True)
|
|
|
|
sub = col.column()
|
|
|
|
sub.enabled = rd.threads_mode == 'FIXED'
|
|
|
|
sub.prop(rd, "threads")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
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
|
|
|
|
2012-10-13 12:38:32 +00:00
|
|
|
sub.prop(cscene, "use_progressive_refine")
|
|
|
|
|
2012-09-04 13:29:07 +00:00
|
|
|
subsub = sub.column()
|
|
|
|
subsub.enabled = not rd.use_border
|
|
|
|
subsub.prop(rd, "use_save_buffers")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
col = split.column()
|
2011-08-24 10:44:04 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
sub = col.column(align=True)
|
|
|
|
sub.label(text="Acceleration structure:")
|
|
|
|
sub.prop(cscene, "debug_bvh_type", text="")
|
|
|
|
sub.prop(cscene, "debug_use_spatial_splits")
|
2012-01-16 13:13:37 +00:00
|
|
|
sub.prop(cscene, "use_cache")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2012-09-04 13:29:07 +00:00
|
|
|
sub = col.column(align=True)
|
|
|
|
sub.label(text="Viewport:")
|
2012-09-17 10:55:18 +00:00
|
|
|
sub.prop(cscene, "preview_start_resolution")
|
2012-09-04 13:29:07 +00:00
|
|
|
|
2012-11-09 08:46:53 +00:00
|
|
|
sub = col.column(align=True)
|
|
|
|
sub.label(text="Final Render:")
|
2012-11-09 23:54:58 +00:00
|
|
|
sub.prop(rd, "use_persistent_data", text="Persistent Images")
|
2012-11-09 08:46:53 +00:00
|
|
|
|
2012-01-17 18:01:16 +00:00
|
|
|
|
2011-09-12 13:13:56 +00:00
|
|
|
class CyclesRender_PT_layers(CyclesButtonsPanel, Panel):
|
|
|
|
bl_label = "Layers"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
rd = scene.render
|
|
|
|
|
2011-12-21 20:51:55 +00:00
|
|
|
row = layout.row()
|
2012-12-28 14:46:43 +00:00
|
|
|
row.template_list("RENDER_UL_renderlayers", "", rd, "layers", rd.layers, "active_index", rows=2)
|
2011-09-12 13:13:56 +00:00
|
|
|
|
2011-12-21 20:51:55 +00:00
|
|
|
col = row.column(align=True)
|
|
|
|
col.operator("scene.render_layer_add", icon='ZOOMIN', text="")
|
|
|
|
col.operator("scene.render_layer_remove", icon='ZOOMOUT', text="")
|
2011-09-12 13:13:56 +00:00
|
|
|
|
|
|
|
row = layout.row()
|
2011-12-21 20:51:55 +00:00
|
|
|
rl = rd.layers.active
|
2011-09-12 13:13:56 +00:00
|
|
|
row.prop(rl, "name")
|
2011-12-21 20:51:55 +00:00
|
|
|
row.prop(rd, "use_single_layer", text="", icon_only=True)
|
2011-09-12 13:13:56 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.prop(scene, "layers", text="Scene")
|
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
|
|
|
col.prop(rl, "layers_exclude", text="Exclude")
|
2012-04-13 12:58:12 +00:00
|
|
|
|
2011-09-12 13:13:56 +00:00
|
|
|
col = split.column()
|
|
|
|
col.prop(rl, "layers", text="Layer")
|
2012-02-28 16:44:45 +00:00
|
|
|
col.label(text="Mask Layers:")
|
|
|
|
col.prop(rl, "layers_zmask", text="")
|
2011-09-12 13:13:56 +00:00
|
|
|
|
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
|
|
|
split = layout.split()
|
|
|
|
|
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
|
|
|
col = split.column()
|
|
|
|
col.label(text="Material:")
|
|
|
|
col.prop(rl, "material_override", text="")
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.prop(rl, "samples")
|
|
|
|
col.prop(rl, "use_sky", "Use Environment")
|
|
|
|
|
|
|
|
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()
|
|
|
|
col.label(text="Passes:")
|
|
|
|
col.prop(rl, "use_pass_combined")
|
|
|
|
col.prop(rl, "use_pass_z")
|
|
|
|
col.prop(rl, "use_pass_normal")
|
2012-04-30 12:49:26 +00:00
|
|
|
col.prop(rl, "use_pass_vector")
|
|
|
|
col.prop(rl, "use_pass_uv")
|
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.prop(rl, "use_pass_object_index")
|
|
|
|
col.prop(rl, "use_pass_material_index")
|
2012-02-28 16:45:08 +00:00
|
|
|
col.prop(rl, "use_pass_ambient_occlusion")
|
2012-03-28 10:39:21 +00:00
|
|
|
col.prop(rl, "use_pass_shadow")
|
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()
|
|
|
|
col.label(text="Diffuse:")
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(rl, "use_pass_diffuse_direct", text="Direct", toggle=True)
|
|
|
|
row.prop(rl, "use_pass_diffuse_indirect", text="Indirect", toggle=True)
|
|
|
|
row.prop(rl, "use_pass_diffuse_color", text="Color", toggle=True)
|
|
|
|
col.label(text="Glossy:")
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(rl, "use_pass_glossy_direct", text="Direct", toggle=True)
|
|
|
|
row.prop(rl, "use_pass_glossy_indirect", text="Indirect", toggle=True)
|
|
|
|
row.prop(rl, "use_pass_glossy_color", text="Color", toggle=True)
|
|
|
|
col.label(text="Transmission:")
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(rl, "use_pass_transmission_direct", text="Direct", toggle=True)
|
|
|
|
row.prop(rl, "use_pass_transmission_indirect", text="Indirect", toggle=True)
|
|
|
|
row.prop(rl, "use_pass_transmission_color", text="Color", toggle=True)
|
|
|
|
|
2012-04-30 12:49:26 +00:00
|
|
|
col.prop(rl, "use_pass_emit", text="Emission")
|
|
|
|
col.prop(rl, "use_pass_environment")
|
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-08-29 13:59:11 +00: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
|
|
|
|
2011-09-16 13:14:02 +00:00
|
|
|
class CyclesCamera_PT_dof(CyclesButtonsPanel, Panel):
|
|
|
|
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
|
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")
|
|
|
|
|
|
|
|
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")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-08-29 13:59:11 +00: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:
|
|
|
|
row = layout.row()
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2012-12-28 14:46:43 +00:00
|
|
|
row.template_list("MATERIAL_UL_matslots", "", ob, "material_slots", ob, "active_material_index", rows=2)
|
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
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
if ob.mode == 'EDIT':
|
|
|
|
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
|
|
|
|
2011-08-29 13:59:11 +00:00
|
|
|
class Cycles_PT_mesh_displacement(CyclesButtonsPanel, Panel):
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_label = "Displacement"
|
|
|
|
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-12-01 16:33:21 +00:00
|
|
|
if CyclesButtonsPanel.poll(context):
|
|
|
|
if context.mesh or context.curve or context.meta_ball:
|
|
|
|
if context.scene.cycles.feature_set == 'EXPERIMENTAL':
|
|
|
|
return True
|
|
|
|
|
|
|
|
return False
|
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
|
|
|
mesh = context.mesh
|
|
|
|
curve = context.curve
|
|
|
|
mball = context.meta_ball
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
if mesh:
|
|
|
|
cdata = mesh.cycles
|
|
|
|
elif curve:
|
|
|
|
cdata = curve.cycles
|
|
|
|
elif mball:
|
|
|
|
cdata = mball.cycles
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
layout.prop(cdata, "displacement_method", text="Method")
|
2011-11-15 02:58:01 +00:00
|
|
|
layout.prop(cdata, "use_subdivision")
|
|
|
|
layout.prop(cdata, "dicing_rate")
|
|
|
|
|
2012-09-26 21:19:51 +00:00
|
|
|
|
2012-09-24 14:36:20 +00:00
|
|
|
class Cycles_PT_mesh_normals(CyclesButtonsPanel, Panel):
|
|
|
|
bl_label = "Normals"
|
|
|
|
bl_context = "data"
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
return CyclesButtonsPanel.poll(context) and context.mesh
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
mesh = context.mesh
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.prop(mesh, "show_double_sided")
|
|
|
|
|
|
|
|
col = split.column()
|
2012-09-26 19:23:06 +00:00
|
|
|
col.label()
|
2012-09-24 14:36:20 +00:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-09-01 15:53:36 +00:00
|
|
|
class CyclesObject_PT_ray_visibility(CyclesButtonsPanel, Panel):
|
|
|
|
bl_label = "Ray Visibility"
|
|
|
|
bl_context = "object"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
ob = context.object
|
2011-11-27 03:49:09 +00:00
|
|
|
return CyclesButtonsPanel.poll(context) and ob and ob.type in {'MESH', 'CURVE', 'CURVE', 'SURFACE', 'FONT', 'META'} # todo: 'LAMP'
|
2011-09-01 15:53:36 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
ob = context.object
|
|
|
|
visibility = ob.cycles_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")
|
|
|
|
flow.prop(visibility, "shadow")
|
2011-09-01 15:53:36 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
def find_node(material, nodetype):
|
2011-08-28 13:55:59 +00:00
|
|
|
if material and material.node_tree:
|
|
|
|
ntree = material.node_tree
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
for node in ntree.nodes:
|
2011-11-24 19:36:12 +00:00
|
|
|
if getattr(node, "type", None) == nodetype:
|
2011-08-28 13:55:59 +00:00
|
|
|
return node
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
return None
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
def find_node_input(node, name):
|
2011-08-28 13:55:59 +00:00
|
|
|
for input in node.inputs:
|
|
|
|
if input.name == name:
|
|
|
|
return input
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
return None
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-11-24 19:36:12 +00:00
|
|
|
def panel_node_draw(layout, id_data, output_type, input_name):
|
2012-03-08 19:53:01 +00:00
|
|
|
if not id_data.use_nodes:
|
2011-11-24 19:36:12 +00:00
|
|
|
layout.prop(id_data, "use_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
|
|
|
|
2011-11-24 19:36:12 +00:00
|
|
|
node = find_node(id_data, output_type)
|
2011-08-28 13:55:59 +00:00
|
|
|
if not node:
|
|
|
|
layout.label(text="No output node.")
|
|
|
|
else:
|
|
|
|
input = find_node_input(node, input_name)
|
2011-11-15 02:58:01 +00:00
|
|
|
layout.template_node_view(ntree, node, input)
|
|
|
|
|
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
|
|
|
|
2011-08-29 13:59:11 +00:00
|
|
|
class CyclesLamp_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
|
2012-06-13 11:44:48 +00:00
|
|
|
cscene = context.scene.cycles
|
2012-09-21 13:32:52 +00:00
|
|
|
device_type = context.user_preferences.system.compute_device_type
|
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")
|
|
|
|
|
2012-09-21 13:32:52 +00:00
|
|
|
if not cscene.progressive and (device_type == 'NONE' or cscene.device == 'CPU'):
|
2012-06-13 11:44:48 +00:00
|
|
|
col.prop(clamp, "samples")
|
|
|
|
|
2011-09-27 20:37:24 +00:00
|
|
|
col = split.column()
|
|
|
|
col.prop(clamp, "cast_shadow")
|
|
|
|
|
2012-06-04 17:17:10 +00:00
|
|
|
if lamp.type == 'HEMI':
|
2011-09-27 20:37:24 +00:00
|
|
|
layout.label(text="Not supported, interpreted as sun lamp.")
|
2011-11-15 02:58:01 +00:00
|
|
|
|
|
|
|
|
2011-10-12 23:03:12 +00:00
|
|
|
class CyclesLamp_PT_nodes(CyclesButtonsPanel, Panel):
|
|
|
|
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):
|
|
|
|
return context.lamp 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
|
|
|
|
if not panel_node_draw(layout, lamp, 'OUTPUT_LAMP', 'Surface'):
|
|
|
|
layout.prop(lamp, "color")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2012-06-19 22:17:19 +00:00
|
|
|
|
2012-06-04 17:17:10 +00:00
|
|
|
class CyclesLamp_PT_spot(CyclesButtonsPanel, Panel):
|
|
|
|
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
|
|
|
|
2011-10-12 23:03:12 +00:00
|
|
|
class CyclesWorld_PT_surface(CyclesButtonsPanel, Panel):
|
|
|
|
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
|
|
|
|
2011-11-10 13:00:53 +00:00
|
|
|
if not panel_node_draw(layout, world, 'OUTPUT_WORLD', 'Surface'):
|
|
|
|
layout.prop(world, "horizon_color", text="Color")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2012-03-08 05:36:05 +00:00
|
|
|
|
2012-02-28 16:45:08 +00:00
|
|
|
class CyclesWorld_PT_volume(CyclesButtonsPanel, Panel):
|
|
|
|
bl_label = "Volume"
|
2012-01-20 17:49:17 +00:00
|
|
|
bl_context = "world"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2012-02-28 16:45:08 +00:00
|
|
|
# world = context.world
|
|
|
|
# world and world.node_tree and CyclesButtonsPanel.poll(context)
|
|
|
|
return False
|
2012-01-20 17:49:17 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2012-02-28 16:45:08 +00:00
|
|
|
layout.active = False
|
2012-01-20 17:49:17 +00:00
|
|
|
|
|
|
|
world = context.world
|
2012-02-28 16:45:08 +00: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
|
|
|
|
2012-02-28 16:45:08 +00:00
|
|
|
class CyclesWorld_PT_ambient_occlusion(CyclesButtonsPanel, Panel):
|
|
|
|
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
|
|
|
|
light = context.world.light_settings
|
|
|
|
|
|
|
|
layout.active = light.use_ambient_occlusion
|
|
|
|
|
2012-03-11 16:25:58 +00:00
|
|
|
row = layout.row()
|
|
|
|
row.prop(light, "ao_factor", text="Factor")
|
|
|
|
row.prop(light, "distance", text="Distance")
|
2012-02-28 16:45:08 +00:00
|
|
|
|
2012-03-08 05:36:05 +00:00
|
|
|
|
2012-02-28 16:45:08 +00:00
|
|
|
class CyclesWorld_PT_settings(CyclesButtonsPanel, Panel):
|
|
|
|
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
|
2012-06-13 11:44:48 +00:00
|
|
|
cscene = context.scene.cycles
|
2012-09-21 13:32:52 +00:00
|
|
|
device_type = context.user_preferences.system.compute_device_type
|
2011-10-12 23:03:12 +00:00
|
|
|
|
2012-02-28 16:45:08 +00:00
|
|
|
col = layout.column()
|
|
|
|
|
|
|
|
col.prop(cworld, "sample_as_light")
|
2012-06-13 11:44:48 +00:00
|
|
|
sub = col.row(align=True)
|
|
|
|
sub.active = cworld.sample_as_light
|
|
|
|
sub.prop(cworld, "sample_map_resolution")
|
2012-09-21 13:32:52 +00:00
|
|
|
if not cscene.progressive and (device_type == 'NONE' or cscene.device == 'CPU'):
|
2012-06-13 11:44:48 +00:00
|
|
|
sub.prop(cworld, "samples")
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2012-03-08 05:36:05 +00:00
|
|
|
|
2011-10-12 23:03:12 +00:00
|
|
|
class CyclesMaterial_PT_surface(CyclesButtonsPanel, Panel):
|
|
|
|
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
|
2011-11-10 13:00:53 +00:00
|
|
|
if not panel_node_draw(layout, mat, 'OUTPUT_MATERIAL', 'Surface'):
|
|
|
|
layout.prop(mat, "diffuse_color")
|
2011-10-12 23:03:12 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-10-12 23:03:12 +00:00
|
|
|
class CyclesMaterial_PT_volume(CyclesButtonsPanel, Panel):
|
|
|
|
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):
|
2011-11-16 16:38:37 +00:00
|
|
|
# mat = context.material
|
2011-11-27 03:49:09 +00:00
|
|
|
# mat and mat.node_tree and CyclesButtonsPanel.poll(context)
|
|
|
|
return False
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2011-10-12 23:03:12 +00:00
|
|
|
layout.active = False
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
mat = context.material
|
2011-10-12 23:03:12 +00:00
|
|
|
cmat = mat.cycles
|
|
|
|
|
|
|
|
panel_node_draw(layout, mat, 'OUTPUT_MATERIAL', 'Volume')
|
|
|
|
|
|
|
|
layout.prop(cmat, "homogeneous_volume")
|
2011-09-27 20:37:24 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-08-29 13:59:11 +00:00
|
|
|
class CyclesMaterial_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
|
|
|
|
panel_node_draw(layout, mat, 'OUTPUT_MATERIAL', 'Displacement')
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-08-29 13:59:11 +00:00
|
|
|
class CyclesMaterial_PT_settings(CyclesButtonsPanel, Panel):
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_label = "Settings"
|
|
|
|
bl_context = "material"
|
|
|
|
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):
|
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()
|
2011-10-15 23:49:01 +00:00
|
|
|
|
2011-09-27 20:37:24 +00:00
|
|
|
col = split.column()
|
2011-10-15 23:49:01 +00:00
|
|
|
col.prop(mat, "diffuse_color", text="Viewport Color")
|
2011-09-27 20:37:24 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2011-10-15 23:49:01 +00:00
|
|
|
col.prop(cmat, "sample_as_light")
|
2012-02-01 13:38:23 +00:00
|
|
|
col.prop(mat, "pass_index")
|
2011-06-08 23:36:06 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-08-29 13:59:11 +00:00
|
|
|
class CyclesTexture_PT_context(CyclesButtonsPanel, Panel):
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_label = ""
|
|
|
|
bl_context = "texture"
|
|
|
|
bl_options = {'HIDE_HEADER'}
|
|
|
|
COMPAT_ENGINES = {'CYCLES'}
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
tex = context.texture
|
|
|
|
space = context.space_data
|
|
|
|
pin_id = space.pin_id
|
2011-11-15 02:58:01 +00:00
|
|
|
use_pin_id = space.use_pin_id
|
2011-08-28 13:55:59 +00:00
|
|
|
user = context.texture_user
|
|
|
|
|
|
|
|
if not use_pin_id or not isinstance(pin_id, bpy.types.Texture):
|
|
|
|
pin_id = None
|
|
|
|
|
|
|
|
if not pin_id:
|
|
|
|
layout.template_texture_user()
|
|
|
|
|
|
|
|
if user:
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
split = layout.split(percentage=0.65)
|
|
|
|
col = split.column()
|
|
|
|
|
|
|
|
if pin_id:
|
|
|
|
col.template_ID(space, "pin_id")
|
|
|
|
elif user:
|
|
|
|
col.template_ID(user, "texture", new="texture.new")
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
if tex:
|
2012-01-22 22:59:21 +00:00
|
|
|
split = layout.split(percentage=0.2)
|
|
|
|
split.label(text="Type:")
|
|
|
|
split.prop(tex, "type", text="")
|
2011-06-14 16:05:21 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-08-29 13:59:11 +00:00
|
|
|
class CyclesTexture_PT_nodes(CyclesButtonsPanel, Panel):
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_label = "Nodes"
|
|
|
|
bl_context = "texture"
|
2011-06-14 16:05:21 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
tex = context.texture
|
|
|
|
return (tex and tex.use_nodes) and CyclesButtonsPanel.poll(context)
|
2011-06-14 16:05:21 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2011-06-14 16:05:21 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
tex = context.texture
|
|
|
|
panel_node_draw(layout, tex, 'OUTPUT_TEXTURE', 'Color')
|
2011-06-14 16:05:21 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-08-29 13:59:11 +00:00
|
|
|
class CyclesTexture_PT_node(CyclesButtonsPanel, Panel):
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_label = "Node"
|
|
|
|
bl_context = "texture"
|
2011-06-27 17:10:50 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
node = context.texture_node
|
|
|
|
return node and CyclesButtonsPanel.poll(context)
|
2011-06-27 17:10:50 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2011-06-27 17:10:50 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
node = context.texture_node
|
|
|
|
ntree = node.id_data
|
|
|
|
layout.template_node_view(ntree, node, None)
|
2011-06-27 17:10:50 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-08-29 13:59:11 +00:00
|
|
|
class CyclesTexture_PT_mapping(CyclesButtonsPanel, Panel):
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_label = "Mapping"
|
|
|
|
bl_context = "texture"
|
2011-06-14 16:05:21 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
tex = context.texture
|
|
|
|
node = context.texture_node
|
|
|
|
return (node or (tex and tex.use_nodes)) and CyclesButtonsPanel.poll(context)
|
2011-06-14 16:05:21 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2011-06-14 16:05:21 +00:00
|
|
|
|
2011-11-16 16:38:37 +00:00
|
|
|
# tex = context.texture
|
2011-11-04 20:58:00 +00:00
|
|
|
node = context.texture_node
|
|
|
|
|
|
|
|
mapping = node.texture_mapping
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
2012-04-04 16:11:39 +00:00
|
|
|
row.column().prop(mapping, "translation")
|
2011-11-04 20:58:00 +00:00
|
|
|
row.column().prop(mapping, "rotation")
|
|
|
|
row.column().prop(mapping, "scale")
|
|
|
|
|
|
|
|
layout.label(text="Projection:")
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.prop(mapping, "mapping_x", text="")
|
|
|
|
row.prop(mapping, "mapping_y", text="")
|
|
|
|
row.prop(mapping, "mapping_z", text="")
|
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-11-04 20:58:00 +00:00
|
|
|
class CyclesTexture_PT_colors(CyclesButtonsPanel, Panel):
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_label = "Color"
|
|
|
|
bl_context = "texture"
|
2011-11-04 20:58:00 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2011-08-28 13:55:59 +00:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2011-11-16 16:38:37 +00:00
|
|
|
# tex = context.texture
|
|
|
|
# node = context.texture_node
|
2011-11-04 20:58:00 +00:00
|
|
|
return False
|
|
|
|
#return (node or (tex and tex.use_nodes)) and CyclesButtonsPanel.poll(context)
|
2011-08-28 13:55:59 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2011-11-04 20:58:00 +00:00
|
|
|
|
2011-11-16 16:38:37 +00:00
|
|
|
# tex = context.texture
|
2011-11-04 20:58:00 +00:00
|
|
|
node = context.texture_node
|
|
|
|
|
|
|
|
mapping = node.color_mapping
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.label(text="Blend:")
|
|
|
|
col.prop(mapping, "blend_type", text="")
|
|
|
|
col.prop(mapping, "blend_factor", text="Factor")
|
|
|
|
col.prop(mapping, "blend_color", text="")
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.label(text="Adjust:")
|
|
|
|
col.prop(mapping, "brightness")
|
|
|
|
col.prop(mapping, "contrast")
|
|
|
|
col.prop(mapping, "saturation")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
layout.prop(mapping, "use_color_ramp", text="Ramp")
|
|
|
|
if mapping.use_color_ramp:
|
|
|
|
layout.template_color_ramp(mapping, "color_ramp", expand=True)
|
2011-09-16 13:14:02 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2012-12-16 12:55:52 +00:00
|
|
|
class CyclesParticle_PT_textures(CyclesButtonsPanel, Panel):
|
|
|
|
bl_label = "Textures"
|
|
|
|
bl_context = "particle"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
psys = context.particle_system
|
|
|
|
return psys and CyclesButtonsPanel.poll(context)
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
psys = context.particle_system
|
|
|
|
part = psys.settings
|
|
|
|
|
|
|
|
row = layout.row()
|
2012-12-28 14:46:43 +00:00
|
|
|
row.template_list("TEXTURE_UL_texslots", "", part, "texture_slots", part, "active_texture_index", rows=2)
|
2012-12-16 12:55:52 +00:00
|
|
|
|
|
|
|
col = row.column(align=True)
|
|
|
|
col.operator("texture.slot_move", text="", icon='TRIA_UP').type = 'UP'
|
|
|
|
col.operator("texture.slot_move", text="", icon='TRIA_DOWN').type = 'DOWN'
|
|
|
|
col.menu("TEXTURE_MT_specials", icon='DOWNARROW_HLT', text="")
|
|
|
|
|
|
|
|
if not part.active_texture:
|
|
|
|
layout.template_ID(part, "active_texture", new="texture.new")
|
|
|
|
else:
|
|
|
|
slot = part.texture_slots[part.active_texture_index]
|
|
|
|
layout.template_ID(slot, "texture", new="texture.new")
|
2012-12-28 16:25:41 +00:00
|
|
|
|
|
|
|
class CyclesRender_PT_CurveRendering(CyclesButtonsPanel, Panel):
|
|
|
|
bl_label = "Cycles Hair Rendering"
|
2012-12-28 14:21:30 +00:00
|
|
|
bl_context = "particle"
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
psys = context.particle_system
|
|
|
|
device_type = context.user_preferences.system.compute_device_type
|
2012-12-28 16:25:41 +00:00
|
|
|
experimental = context.scene.cycles.feature_set == 'EXPERIMENTAL' and (context.scene.cycles.device == 'CPU' or device_type == 'NONE')
|
|
|
|
return CyclesButtonsPanel.poll(context) and experimental and psys
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
cscene = context.scene.cycles_curves
|
|
|
|
self.layout.prop(cscene, "use_curves", text="")
|
|
|
|
|
2012-12-28 14:21:30 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2012-12-28 16:25:41 +00:00
|
|
|
scene = context.scene
|
|
|
|
cscene = scene.cycles_curves
|
2012-12-28 14:21:30 +00:00
|
|
|
|
2012-12-28 16:25:41 +00:00
|
|
|
layout.active = cscene.use_curves
|
2012-12-28 14:21:30 +00:00
|
|
|
|
2012-12-28 16:25:41 +00:00
|
|
|
layout.prop(cscene, "preset", text="Mode")
|
|
|
|
|
|
|
|
if cscene.preset == 'CUSTOM':
|
|
|
|
layout.prop(cscene, "primitive", text="Primitive")
|
|
|
|
|
|
|
|
if cscene.primitive == 'TRIANGLES':
|
|
|
|
layout.prop(cscene, "triangle_method", text="Method")
|
2013-01-15 19:44:41 +00:00
|
|
|
if cscene.triangle_method == 'TESSELLATED_TRIANGLES':
|
2012-12-28 16:25:41 +00:00
|
|
|
layout.prop(cscene, "resolution", text="Resolution")
|
|
|
|
layout.prop(cscene, "use_smooth", text="Smooth")
|
|
|
|
elif cscene.primitive == 'LINE_SEGMENTS':
|
|
|
|
layout.prop(cscene, "use_backfacing", text="Check back-faces")
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.prop(cscene, "use_encasing", text="Exclude encasing")
|
|
|
|
sub = row.row()
|
|
|
|
sub.active = cscene.use_encasing
|
|
|
|
sub.prop(cscene, "encasing_ratio", text="Ratio for encasing")
|
|
|
|
|
|
|
|
layout.prop(cscene, "line_method", text="Method")
|
|
|
|
layout.prop(cscene, "use_tangent_normal", text="Use tangent normal as default")
|
|
|
|
layout.prop(cscene, "use_tangent_normal_geometry", text="Use tangent normal geometry")
|
|
|
|
layout.prop(cscene, "use_tangent_normal_correction", text="Correct tangent normal for slope")
|
|
|
|
layout.prop(cscene, "interpolation", text="Interpolation")
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.prop(cscene, "segments", text="Segments")
|
|
|
|
row.prop(cscene, "normalmix", text="Ray Mix")
|
2013-01-15 19:44:41 +00:00
|
|
|
elif cscene.primitive == 'CURVE_SEGMENTS' or cscene.primitive == 'CURVE_RIBBONS':
|
|
|
|
layout.prop(cscene, "subdivisions", text="Curve subdivisions")
|
|
|
|
layout.prop(cscene, "use_backfacing", text="Check back-faces")
|
|
|
|
|
|
|
|
layout.prop(cscene, "interpolation", text="Interpolation")
|
|
|
|
row = layout.row()
|
|
|
|
row.prop(cscene, "segments", text="Segments")
|
2012-12-28 16:25:41 +00:00
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.prop(cscene, "use_cache", text="Export cache with children")
|
|
|
|
if cscene.use_cache:
|
|
|
|
row.prop(cscene, "use_parents", text="Include parents")
|
|
|
|
|
|
|
|
class CyclesParticle_PT_CurveSettings(CyclesButtonsPanel, Panel):
|
|
|
|
bl_label = "Cycles Hair Settings"
|
2012-12-28 14:21:30 +00:00
|
|
|
bl_context = "particle"
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2012-12-29 01:14:03 +00:00
|
|
|
use_curves = context.scene.cycles_curves.use_curves and context.particle_system
|
2012-12-28 14:21:30 +00:00
|
|
|
device_type = context.user_preferences.system.compute_device_type
|
2012-12-28 16:25:41 +00:00
|
|
|
experimental = context.scene.cycles.feature_set == 'EXPERIMENTAL' and (context.scene.cycles.device == 'CPU' or device_type == 'NONE')
|
|
|
|
return CyclesButtonsPanel.poll(context) and experimental and use_curves
|
2012-12-16 12:55:52 +00:00
|
|
|
|
2012-12-28 14:21:30 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2012-12-28 16:25:41 +00:00
|
|
|
psys = context.particle_settings
|
|
|
|
cpsys = psys.cycles
|
2012-12-28 14:21:30 +00:00
|
|
|
|
2012-12-28 16:25:41 +00:00
|
|
|
row = layout.row()
|
|
|
|
row.prop(cpsys, "shape", text="Shape")
|
|
|
|
row.prop(cpsys, "use_closetip", text="Close tip")
|
2012-12-28 14:21:30 +00:00
|
|
|
|
2012-12-28 16:25:41 +00:00
|
|
|
layout.label(text="Width multiplier:")
|
|
|
|
row = layout.row()
|
|
|
|
row.prop(cpsys, "root_width", text="Root")
|
|
|
|
row.prop(cpsys, "tip_width", text="Tip")
|
|
|
|
|
2012-12-16 12:55:52 +00:00
|
|
|
|
2012-04-26 12:13:26 +00:00
|
|
|
class CyclesScene_PT_simplify(CyclesButtonsPanel, Panel):
|
|
|
|
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
|
|
|
|
|
|
|
|
rd = context.scene.render
|
|
|
|
|
|
|
|
layout.active = rd.use_simplify
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.prop(rd, "simplify_subdivision", text="Subdivision")
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.prop(rd, "simplify_child_particles", text="Child Particles")
|
|
|
|
|
|
|
|
|
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
|
|
|
|
2012-01-17 18:01:16 +00:00
|
|
|
if scene.render.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
|
|
|
|
2011-12-01 16:33:21 +00:00
|
|
|
layout.prop(cscene, "feature_set")
|
2011-09-01 19:43:57 +00:00
|
|
|
|
2012-01-09 16:58:01 +00:00
|
|
|
device_type = context.user_preferences.system.compute_device_type
|
|
|
|
if device_type == 'CUDA':
|
|
|
|
layout.prop(cscene, "device")
|
|
|
|
elif device_type == 'OPENCL' and cscene.feature_set == 'EXPERIMENTAL':
|
2011-08-28 13:55:59 +00:00
|
|
|
layout.prop(cscene, "device")
|
2012-09-26 21:19:51 +00:00
|
|
|
|
2012-11-09 22:01:37 +00:00
|
|
|
if engine.with_osl() and (cscene.device == 'CPU' or device_type == 'NONE'):
|
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
|
|
|
|
|
|
|
|
if scene.render.engine == "CYCLES":
|
|
|
|
view = context.space_data
|
|
|
|
|
2012-01-17 18:01:16 +00:00
|
|
|
if view.viewport_shade == 'RENDERED':
|
2011-08-29 16:54:13 +00:00
|
|
|
cscene = scene.cycles
|
2012-03-28 09:07:35 +00:00
|
|
|
layername = scene.render.layers.active.name
|
2011-08-29 16:54:13 +00:00
|
|
|
layout.prop(cscene, "preview_pause", icon="PAUSE", text="")
|
2012-03-28 09:07:35 +00:00
|
|
|
layout.prop(cscene, "preview_active_layer", icon="RENDERLAYERS", text=layername)
|
2011-08-29 16:54:13 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
def get_panels():
|
2011-11-27 03:49:09 +00:00
|
|
|
return (
|
2011-08-28 13:55:59 +00:00
|
|
|
bpy.types.RENDER_PT_render,
|
|
|
|
bpy.types.RENDER_PT_output,
|
|
|
|
bpy.types.RENDER_PT_encoding,
|
|
|
|
bpy.types.RENDER_PT_dimensions,
|
|
|
|
bpy.types.RENDER_PT_stamp,
|
2011-12-22 22:34:23 +00:00
|
|
|
bpy.types.SCENE_PT_scene,
|
|
|
|
bpy.types.SCENE_PT_audio,
|
|
|
|
bpy.types.SCENE_PT_unit,
|
|
|
|
bpy.types.SCENE_PT_keying_sets,
|
|
|
|
bpy.types.SCENE_PT_keying_set_paths,
|
|
|
|
bpy.types.SCENE_PT_physics,
|
2011-08-28 13:55:59 +00:00
|
|
|
bpy.types.WORLD_PT_context_world,
|
|
|
|
bpy.types.DATA_PT_context_mesh,
|
|
|
|
bpy.types.DATA_PT_context_camera,
|
|
|
|
bpy.types.DATA_PT_context_lamp,
|
2012-10-21 05:23:58 +00:00
|
|
|
bpy.types.DATA_PT_context_speaker,
|
2011-08-28 13:55:59 +00:00
|
|
|
bpy.types.DATA_PT_texture_space,
|
|
|
|
bpy.types.DATA_PT_curve_texture_space,
|
|
|
|
bpy.types.DATA_PT_mball_texture_space,
|
|
|
|
bpy.types.DATA_PT_vertex_groups,
|
|
|
|
bpy.types.DATA_PT_shape_keys,
|
|
|
|
bpy.types.DATA_PT_uv_texture,
|
|
|
|
bpy.types.DATA_PT_vertex_colors,
|
|
|
|
bpy.types.DATA_PT_camera,
|
|
|
|
bpy.types.DATA_PT_camera_display,
|
2011-11-05 11:11:06 +00:00
|
|
|
bpy.types.DATA_PT_lens,
|
2012-10-21 05:23:58 +00:00
|
|
|
bpy.types.DATA_PT_speaker,
|
|
|
|
bpy.types.DATA_PT_distance,
|
|
|
|
bpy.types.DATA_PT_cone,
|
2012-09-21 13:56:10 +00:00
|
|
|
bpy.types.DATA_PT_customdata,
|
2011-08-28 13:55:59 +00:00
|
|
|
bpy.types.DATA_PT_custom_props_mesh,
|
|
|
|
bpy.types.DATA_PT_custom_props_camera,
|
|
|
|
bpy.types.DATA_PT_custom_props_lamp,
|
2012-10-21 05:23:58 +00:00
|
|
|
bpy.types.DATA_PT_custom_props_speaker,
|
2011-08-28 13:55:59 +00:00
|
|
|
bpy.types.TEXTURE_PT_clouds,
|
|
|
|
bpy.types.TEXTURE_PT_wood,
|
|
|
|
bpy.types.TEXTURE_PT_marble,
|
|
|
|
bpy.types.TEXTURE_PT_magic,
|
|
|
|
bpy.types.TEXTURE_PT_blend,
|
|
|
|
bpy.types.TEXTURE_PT_stucci,
|
|
|
|
bpy.types.TEXTURE_PT_image,
|
|
|
|
bpy.types.TEXTURE_PT_image_sampling,
|
|
|
|
bpy.types.TEXTURE_PT_image_mapping,
|
|
|
|
bpy.types.TEXTURE_PT_musgrave,
|
|
|
|
bpy.types.TEXTURE_PT_voronoi,
|
|
|
|
bpy.types.TEXTURE_PT_distortednoise,
|
|
|
|
bpy.types.TEXTURE_PT_voxeldata,
|
|
|
|
bpy.types.TEXTURE_PT_pointdensity,
|
2011-11-10 16:02:46 +00:00
|
|
|
bpy.types.TEXTURE_PT_pointdensity_turbulence,
|
2012-12-07 11:30:40 +00:00
|
|
|
bpy.types.TEXTURE_PT_mapping,
|
|
|
|
bpy.types.TEXTURE_PT_influence,
|
2012-12-16 12:55:52 +00:00
|
|
|
bpy.types.TEXTURE_PT_colors,
|
2011-11-10 16:02:46 +00:00
|
|
|
bpy.types.PARTICLE_PT_context_particles,
|
|
|
|
bpy.types.PARTICLE_PT_emission,
|
|
|
|
bpy.types.PARTICLE_PT_hair_dynamics,
|
|
|
|
bpy.types.PARTICLE_PT_cache,
|
|
|
|
bpy.types.PARTICLE_PT_velocity,
|
|
|
|
bpy.types.PARTICLE_PT_rotation,
|
|
|
|
bpy.types.PARTICLE_PT_physics,
|
|
|
|
bpy.types.PARTICLE_PT_boidbrain,
|
|
|
|
bpy.types.PARTICLE_PT_render,
|
|
|
|
bpy.types.PARTICLE_PT_draw,
|
|
|
|
bpy.types.PARTICLE_PT_children,
|
|
|
|
bpy.types.PARTICLE_PT_field_weights,
|
|
|
|
bpy.types.PARTICLE_PT_force_fields,
|
|
|
|
bpy.types.PARTICLE_PT_vertexgroups,
|
2011-11-27 03:49:09 +00:00
|
|
|
bpy.types.PARTICLE_PT_custom_props,
|
|
|
|
)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
def register():
|
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
|
|
|
|
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
def unregister():
|
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():
|
|
|
|
panel.COMPAT_ENGINES.remove('CYCLES')
|