diff options
Diffstat (limited to 'intern/cycles/blender/addon/ui.py')
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 214 |
1 files changed, 110 insertions, 104 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 4ed3ccd9a2c..7ab47455c49 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -139,7 +139,7 @@ def draw_samples_info(layout, context): (ao * aa, ml * aa, sss * aa, vol * aa)) -class CyclesRender_PT_sampling(CyclesButtonsPanel, Panel): +class CYCLES_RENDER_PT_sampling(CyclesButtonsPanel, Panel): bl_label = "Sampling" bl_options = {'DEFAULT_CLOSED'} @@ -214,7 +214,7 @@ class CyclesRender_PT_sampling(CyclesButtonsPanel, Panel): draw_samples_info(layout, context) -class CyclesRender_PT_geometry(CyclesButtonsPanel, Panel): +class CYCLES_RENDER_PT_geometry(CyclesButtonsPanel, Panel): bl_label = "Geometry" bl_options = {'DEFAULT_CLOSED'} @@ -270,7 +270,7 @@ class CyclesRender_PT_geometry(CyclesButtonsPanel, Panel): row.prop(ccscene, "maximum_width", text="Max Extension") -class CyclesRender_PT_light_paths(CyclesButtonsPanel, Panel): +class CYCLES_RENDER_PT_light_paths(CyclesButtonsPanel, Panel): bl_label = "Light Paths" bl_options = {'DEFAULT_CLOSED'} @@ -292,8 +292,6 @@ class CyclesRender_PT_light_paths(CyclesButtonsPanel, Panel): sub = col.column(align=True) sub.label("Transparency:") sub.prop(cscene, "transparent_max_bounces", text="Max") - sub.prop(cscene, "transparent_min_bounces", text="Min") - sub.prop(cscene, "use_transparent_shadows", text="Shadows") col.separator() @@ -306,7 +304,6 @@ class CyclesRender_PT_light_paths(CyclesButtonsPanel, Panel): sub = col.column(align=True) sub.label(text="Bounces:") sub.prop(cscene, "max_bounces", text="Max") - sub.prop(cscene, "min_bounces", text="Min") sub = col.column(align=True) sub.prop(cscene, "diffuse_bounces", text="Diffuse") @@ -315,7 +312,7 @@ class CyclesRender_PT_light_paths(CyclesButtonsPanel, Panel): sub.prop(cscene, "volume_bounces", text="Volume") -class CyclesRender_PT_motion_blur(CyclesButtonsPanel, Panel): +class CYCLES_RENDER_PT_motion_blur(CyclesButtonsPanel, Panel): bl_label = "Motion Blur" bl_options = {'DEFAULT_CLOSED'} @@ -356,7 +353,7 @@ class CyclesRender_PT_motion_blur(CyclesButtonsPanel, Panel): row.prop(cscene, "rolling_shutter_duration") -class CyclesRender_PT_film(CyclesButtonsPanel, Panel): +class CYCLES_RENDER_PT_film(CyclesButtonsPanel, Panel): bl_label = "Film" def draw(self, context): @@ -378,7 +375,7 @@ class CyclesRender_PT_film(CyclesButtonsPanel, Panel): sub.prop(cscene, "filter_width", text="Width") -class CyclesRender_PT_performance(CyclesButtonsPanel, Panel): +class CYCLES_RENDER_PT_performance(CyclesButtonsPanel, Panel): bl_label = "Performance" bl_options = {'DEFAULT_CLOSED'} @@ -399,6 +396,8 @@ class CyclesRender_PT_performance(CyclesButtonsPanel, Panel): sub.enabled = rd.threads_mode == 'FIXED' sub.prop(rd, "threads") + col.separator() + sub = col.column(align=True) sub.label(text="Tiles:") sub.prop(cscene, "tile_order", text="") @@ -408,19 +407,10 @@ class CyclesRender_PT_performance(CyclesButtonsPanel, Panel): sub.prop(cscene, "use_progressive_refine") - subsub = sub.column(align=True) - subsub.prop(rd, "use_save_buffers") - - col = split.column(align=True) - - col.label(text="Viewport:") - col.prop(cscene, "debug_bvh_type", text="") - col.separator() - col.prop(cscene, "preview_start_resolution") - - col.separator() + col = split.column() col.label(text="Final Render:") + col.prop(rd, "use_save_buffers") col.prop(rd, "use_persistent_data", text="Persistent Images") col.separator() @@ -433,8 +423,14 @@ class CyclesRender_PT_performance(CyclesButtonsPanel, Panel): row.active = not cscene.debug_use_spatial_splits row.prop(cscene, "debug_bvh_time_steps") + col = layout.column() + col.label(text="Viewport Resolution:") + split = col.split() + split.prop(rd, "preview_pixel_size", text="") + split.prop(cscene, "preview_start_resolution") -class CyclesRender_PT_layer_options(CyclesButtonsPanel, Panel): + +class CYCLES_RENDER_PT_layer_options(CyclesButtonsPanel, Panel): bl_label = "Layer" bl_context = "render_layer" @@ -470,7 +466,7 @@ class CyclesRender_PT_layer_options(CyclesButtonsPanel, Panel): col.prop(rl, "use_strand", "Use Hair") -class CyclesRender_PT_layer_passes(CyclesButtonsPanel, Panel): +class CYCLES_RENDER_PT_layer_passes(CyclesButtonsPanel, Panel): bl_label = "Passes" bl_context = "render_layer" bl_options = {'DEFAULT_CLOSED'} @@ -531,20 +527,20 @@ class CyclesRender_PT_layer_passes(CyclesButtonsPanel, Panel): col.prop(rl, "use_pass_environment") if context.scene.cycles.feature_set == 'EXPERIMENTAL': - col.separator() - sub = col.column() - sub.active = crl.use_denoising - sub.prop(crl, "denoising_store_passes", text="Denoising") + col.separator() + sub = col.column() + sub.active = crl.use_denoising + sub.prop(crl, "denoising_store_passes", text="Denoising") if _cycles.with_cycles_debug: - col = layout.column() - col.prop(crl, "pass_debug_bvh_traversed_nodes") - col.prop(crl, "pass_debug_bvh_traversed_instances") - col.prop(crl, "pass_debug_bvh_intersections") - col.prop(crl, "pass_debug_ray_bounces") + col = layout.column() + col.prop(crl, "pass_debug_bvh_traversed_nodes") + col.prop(crl, "pass_debug_bvh_traversed_instances") + col.prop(crl, "pass_debug_bvh_intersections") + col.prop(crl, "pass_debug_ray_bounces") -class CyclesRender_PT_views(CyclesButtonsPanel, Panel): +class CYCLES_RENDER_PT_views(CyclesButtonsPanel, Panel): bl_label = "Views" bl_context = "render_layer" bl_options = {'DEFAULT_CLOSED'} @@ -587,7 +583,7 @@ class CyclesRender_PT_views(CyclesButtonsPanel, Panel): row.prop(rv, "camera_suffix", text="") -class CyclesRender_PT_denoising(CyclesButtonsPanel, Panel): +class CYCLES_RENDER_PT_denoising(CyclesButtonsPanel, Panel): bl_label = "Denoising" bl_context = "render_layer" bl_options = {'DEFAULT_CLOSED'} @@ -652,7 +648,7 @@ class CyclesRender_PT_denoising(CyclesButtonsPanel, Panel): sub.prop(crl, "denoising_subsurface_indirect", text="Indirect", toggle=True) -class Cycles_PT_post_processing(CyclesButtonsPanel, Panel): +class CYCLES_PT_post_processing(CyclesButtonsPanel, Panel): bl_label = "Post Processing" bl_options = {'DEFAULT_CLOSED'} @@ -671,7 +667,7 @@ class Cycles_PT_post_processing(CyclesButtonsPanel, Panel): col.prop(rd, "dither_intensity", text="Dither", slider=True) -class CyclesCamera_PT_dof(CyclesButtonsPanel, Panel): +class CYCLES_CAMERA_PT_dof(CyclesButtonsPanel, Panel): bl_label = "Depth of Field" bl_context = "data" @@ -722,7 +718,7 @@ class CyclesCamera_PT_dof(CyclesButtonsPanel, Panel): sub.prop(ccam, "aperture_ratio", text="Ratio") -class Cycles_PT_context_material(CyclesButtonsPanel, Panel): +class CYCLES_PT_context_material(CyclesButtonsPanel, Panel): bl_label = "" bl_context = "material" bl_options = {'HIDE_HEADER'} @@ -782,7 +778,7 @@ class Cycles_PT_context_material(CyclesButtonsPanel, Panel): split.separator() -class CyclesObject_PT_motion_blur(CyclesButtonsPanel, Panel): +class CYCLES_OBJECT_PT_motion_blur(CyclesButtonsPanel, Panel): bl_label = "Motion Blur" bl_context = "object" bl_options = {'DEFAULT_CLOSED'} @@ -830,7 +826,7 @@ class CyclesObject_PT_motion_blur(CyclesButtonsPanel, Panel): sub.prop(cob, "motion_steps", text="Steps") -class CyclesObject_PT_cycles_settings(CyclesButtonsPanel, Panel): +class CYCLES_OBJECT_PT_cycles_settings(CyclesButtonsPanel, Panel): bl_label = "Cycles Settings" bl_context = "object" bl_options = {'DEFAULT_CLOSED'} @@ -939,7 +935,7 @@ def panel_node_draw(layout, id_data, output_type, input_name): return True -class CyclesLamp_PT_preview(CyclesButtonsPanel, Panel): +class CYCLES_LAMP_PT_preview(CyclesButtonsPanel, Panel): bl_label = "Preview" bl_context = "data" bl_options = {'DEFAULT_CLOSED'} @@ -955,7 +951,7 @@ class CyclesLamp_PT_preview(CyclesButtonsPanel, Panel): self.layout.template_preview(context.lamp) -class CyclesLamp_PT_lamp(CyclesButtonsPanel, Panel): +class CYCLES_LAMP_PT_lamp(CyclesButtonsPanel, Panel): bl_label = "Lamp" bl_context = "data" @@ -1009,7 +1005,7 @@ class CyclesLamp_PT_lamp(CyclesButtonsPanel, Panel): layout.label(text="Not supported, interpreted as sun lamp") -class CyclesLamp_PT_nodes(CyclesButtonsPanel, Panel): +class CYCLES_LAMP_PT_nodes(CyclesButtonsPanel, Panel): bl_label = "Nodes" bl_context = "data" @@ -1027,7 +1023,7 @@ class CyclesLamp_PT_nodes(CyclesButtonsPanel, Panel): layout.prop(lamp, "color") -class CyclesLamp_PT_spot(CyclesButtonsPanel, Panel): +class CYCLES_LAMP_PT_spot(CyclesButtonsPanel, Panel): bl_label = "Spot Shape" bl_context = "data" @@ -1052,7 +1048,7 @@ class CyclesLamp_PT_spot(CyclesButtonsPanel, Panel): col.prop(lamp, "show_cone") -class CyclesWorld_PT_preview(CyclesButtonsPanel, Panel): +class CYCLES_WORLD_PT_preview(CyclesButtonsPanel, Panel): bl_label = "Preview" bl_context = "world" bl_options = {'DEFAULT_CLOSED'} @@ -1065,7 +1061,7 @@ class CyclesWorld_PT_preview(CyclesButtonsPanel, Panel): self.layout.template_preview(context.world) -class CyclesWorld_PT_surface(CyclesButtonsPanel, Panel): +class CYCLES_WORLD_PT_surface(CyclesButtonsPanel, Panel): bl_label = "Surface" bl_context = "world" @@ -1082,7 +1078,7 @@ class CyclesWorld_PT_surface(CyclesButtonsPanel, Panel): layout.prop(world, "horizon_color", text="Color") -class CyclesWorld_PT_volume(CyclesButtonsPanel, Panel): +class CYCLES_WORLD_PT_volume(CyclesButtonsPanel, Panel): bl_label = "Volume" bl_context = "world" bl_options = {'DEFAULT_CLOSED'} @@ -1099,7 +1095,7 @@ class CyclesWorld_PT_volume(CyclesButtonsPanel, Panel): panel_node_draw(layout, world, 'OUTPUT_WORLD', 'Volume') -class CyclesWorld_PT_ambient_occlusion(CyclesButtonsPanel, Panel): +class CYCLES_WORLD_PT_ambient_occlusion(CyclesButtonsPanel, Panel): bl_label = "Ambient Occlusion" bl_context = "world" @@ -1124,7 +1120,7 @@ class CyclesWorld_PT_ambient_occlusion(CyclesButtonsPanel, Panel): row.prop(light, "distance", text="Distance") -class CyclesWorld_PT_mist(CyclesButtonsPanel, Panel): +class CYCLES_WORLD_PT_mist(CyclesButtonsPanel, Panel): bl_label = "Mist Pass" bl_context = "world" bl_options = {'DEFAULT_CLOSED'} @@ -1151,7 +1147,7 @@ class CyclesWorld_PT_mist(CyclesButtonsPanel, Panel): layout.prop(world.mist_settings, "falloff") -class CyclesWorld_PT_ray_visibility(CyclesButtonsPanel, Panel): +class CYCLES_WORLD_PT_ray_visibility(CyclesButtonsPanel, Panel): bl_label = "Ray Visibility" bl_context = "world" bl_options = {'DEFAULT_CLOSED'} @@ -1175,7 +1171,7 @@ class CyclesWorld_PT_ray_visibility(CyclesButtonsPanel, Panel): flow.prop(visibility, "scatter") -class CyclesWorld_PT_settings(CyclesButtonsPanel, Panel): +class CYCLES_WORLD_PT_settings(CyclesButtonsPanel, Panel): bl_label = "Settings" bl_context = "world" bl_options = {'DEFAULT_CLOSED'} @@ -1216,7 +1212,7 @@ class CyclesWorld_PT_settings(CyclesButtonsPanel, Panel): col.prop(cworld, "homogeneous_volume", text="Homogeneous") -class CyclesMaterial_PT_preview(CyclesButtonsPanel, Panel): +class CYCLES_MATERIAL_PT_preview(CyclesButtonsPanel, Panel): bl_label = "Preview" bl_context = "material" bl_options = {'DEFAULT_CLOSED'} @@ -1229,7 +1225,7 @@ class CyclesMaterial_PT_preview(CyclesButtonsPanel, Panel): self.layout.template_preview(context.material) -class CyclesMaterial_PT_surface(CyclesButtonsPanel, Panel): +class CYCLES_MATERIAL_PT_surface(CyclesButtonsPanel, Panel): bl_label = "Surface" bl_context = "material" @@ -1245,7 +1241,7 @@ class CyclesMaterial_PT_surface(CyclesButtonsPanel, Panel): layout.prop(mat, "diffuse_color") -class CyclesMaterial_PT_volume(CyclesButtonsPanel, Panel): +class CYCLES_MATERIAL_PT_volume(CyclesButtonsPanel, Panel): bl_label = "Volume" bl_context = "material" bl_options = {'DEFAULT_CLOSED'} @@ -1264,7 +1260,7 @@ class CyclesMaterial_PT_volume(CyclesButtonsPanel, Panel): panel_node_draw(layout, mat, 'OUTPUT_MATERIAL', 'Volume') -class CyclesMaterial_PT_displacement(CyclesButtonsPanel, Panel): +class CYCLES_MATERIAL_PT_displacement(CyclesButtonsPanel, Panel): bl_label = "Displacement" bl_context = "material" @@ -1280,7 +1276,7 @@ class CyclesMaterial_PT_displacement(CyclesButtonsPanel, Panel): panel_node_draw(layout, mat, 'OUTPUT_MATERIAL', 'Displacement') -class CyclesMaterial_PT_settings(CyclesButtonsPanel, Panel): +class CYCLES_MATERIAL_PT_settings(CyclesButtonsPanel, Panel): bl_label = "Settings" bl_context = "material" bl_options = {'DEFAULT_CLOSED'} @@ -1335,7 +1331,7 @@ class CyclesMaterial_PT_settings(CyclesButtonsPanel, Panel): col.prop(mat, "pass_index") -class CyclesTexture_PT_context(CyclesButtonsPanel, Panel): +class CYCLES_TEXTURE_PT_context(CyclesButtonsPanel, Panel): bl_label = "" bl_context = "texture" bl_options = {'HIDE_HEADER'} @@ -1376,7 +1372,7 @@ class CyclesTexture_PT_context(CyclesButtonsPanel, Panel): split.prop(tex, "type", text="") -class CyclesTexture_PT_node(CyclesButtonsPanel, Panel): +class CYCLES_TEXTURE_PT_node(CyclesButtonsPanel, Panel): bl_label = "Node" bl_context = "texture" @@ -1393,7 +1389,7 @@ class CyclesTexture_PT_node(CyclesButtonsPanel, Panel): layout.template_node_view(ntree, node, None) -class CyclesTexture_PT_mapping(CyclesButtonsPanel, Panel): +class CYCLES_TEXTURE_PT_mapping(CyclesButtonsPanel, Panel): bl_label = "Mapping" bl_context = "texture" @@ -1426,7 +1422,7 @@ class CyclesTexture_PT_mapping(CyclesButtonsPanel, Panel): row.prop(mapping, "mapping_z", text="") -class CyclesTexture_PT_colors(CyclesButtonsPanel, Panel): +class CYCLES_TEXTURE_PT_colors(CyclesButtonsPanel, Panel): bl_label = "Color" bl_context = "texture" bl_options = {'DEFAULT_CLOSED'} @@ -1465,7 +1461,7 @@ class CyclesTexture_PT_colors(CyclesButtonsPanel, Panel): layout.template_color_ramp(mapping, "color_ramp", expand=True) -class CyclesParticle_PT_textures(CyclesButtonsPanel, Panel): +class CYCLES_PARTICLE_PT_textures(CyclesButtonsPanel, Panel): bl_label = "Textures" bl_context = "particle" bl_options = {'DEFAULT_CLOSED'} @@ -1496,7 +1492,7 @@ class CyclesParticle_PT_textures(CyclesButtonsPanel, Panel): layout.template_ID(slot, "texture", new="texture.new") -class CyclesRender_PT_bake(CyclesButtonsPanel, Panel): +class CYCLES_RENDER_PT_bake(CyclesButtonsPanel, Panel): bl_label = "Bake" bl_context = "render" bl_options = {'DEFAULT_CLOSED'} @@ -1569,7 +1565,7 @@ class CyclesRender_PT_bake(CyclesButtonsPanel, Panel): sub.prop(cbk, "cage_extrusion", text="Ray Distance") -class CyclesRender_PT_debug(CyclesButtonsPanel, Panel): +class CYCLES_RENDER_PT_debug(CyclesButtonsPanel, Panel): bl_label = "Debug" bl_context = "render" bl_options = {'DEFAULT_CLOSED'} @@ -1597,20 +1593,30 @@ class CyclesRender_PT_debug(CyclesButtonsPanel, Panel): col.prop(cscene, "debug_use_qbvh") col.prop(cscene, "debug_use_cpu_split_kernel") + col.separator() + col = layout.column() col.label('CUDA Flags:') col.prop(cscene, "debug_use_cuda_adaptive_compile") col.prop(cscene, "debug_use_cuda_split_kernel") + col.separator() + 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") col.prop(cscene, "debug_opencl_kernel_single_program", text="Single Program") col.prop(cscene, "debug_use_opencl_debug", text="Debug") + col.prop(cscene, "debug_opencl_mem_limit") + + col.separator() + + col = layout.column() + col.prop(cscene, "debug_bvh_type") -class CyclesParticle_PT_CurveSettings(CyclesButtonsPanel, Panel): +class CYCLES_PARTICLE_PT_curve_settings(CyclesButtonsPanel, Panel): bl_label = "Cycles Hair Settings" bl_context = "particle" @@ -1641,7 +1647,7 @@ class CyclesParticle_PT_CurveSettings(CyclesButtonsPanel, Panel): row.prop(cpsys, "use_closetip", text="Close tip") -class CyclesScene_PT_simplify(CyclesButtonsPanel, Panel): +class CYCLES_SCENE_PT_simplify(CyclesButtonsPanel, Panel): bl_label = "Simplify" bl_context = "scene" COMPAT_ENGINES = {'CYCLES'} @@ -1710,7 +1716,7 @@ def draw_device(self, context): layout.prop(cscene, "feature_set") - split = layout.split(percentage=1/3) + split = layout.split(percentage=1 / 3) split.label("Device:") row = split.row() row.active = show_device_active(context) @@ -1796,47 +1802,47 @@ def get_panels(): classes = ( CYCLES_MT_sampling_presets, CYCLES_MT_integrator_presets, - CyclesRender_PT_sampling, - CyclesRender_PT_geometry, - CyclesRender_PT_light_paths, - CyclesRender_PT_motion_blur, - CyclesRender_PT_film, - CyclesRender_PT_performance, - CyclesRender_PT_layer_options, - CyclesRender_PT_layer_passes, - CyclesRender_PT_views, - CyclesRender_PT_denoising, - Cycles_PT_post_processing, - CyclesCamera_PT_dof, - Cycles_PT_context_material, - CyclesObject_PT_motion_blur, - CyclesObject_PT_cycles_settings, + 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, + CYCLES_RENDER_PT_layer_options, + CYCLES_RENDER_PT_layer_passes, + CYCLES_RENDER_PT_views, + 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, CYCLES_OT_use_shading_nodes, - CyclesLamp_PT_preview, - CyclesLamp_PT_lamp, - CyclesLamp_PT_nodes, - CyclesLamp_PT_spot, - CyclesWorld_PT_preview, - CyclesWorld_PT_surface, - CyclesWorld_PT_volume, - CyclesWorld_PT_ambient_occlusion, - CyclesWorld_PT_mist, - CyclesWorld_PT_ray_visibility, - CyclesWorld_PT_settings, - CyclesMaterial_PT_preview, - CyclesMaterial_PT_surface, - CyclesMaterial_PT_volume, - CyclesMaterial_PT_displacement, - CyclesMaterial_PT_settings, - CyclesTexture_PT_context, - CyclesTexture_PT_node, - CyclesTexture_PT_mapping, - CyclesTexture_PT_colors, - CyclesParticle_PT_textures, - CyclesRender_PT_bake, - CyclesRender_PT_debug, - CyclesParticle_PT_CurveSettings, - CyclesScene_PT_simplify, + 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, + CYCLES_TEXTURE_PT_context, + CYCLES_TEXTURE_PT_node, + CYCLES_TEXTURE_PT_mapping, + CYCLES_TEXTURE_PT_colors, + CYCLES_PARTICLE_PT_textures, + CYCLES_RENDER_PT_bake, + CYCLES_RENDER_PT_debug, + CYCLES_PARTICLE_PT_curve_settings, + CYCLES_SCENE_PT_simplify, ) |