diff options
author | Thomas Dinges <blender@dingto.org> | 2013-06-26 15:46:55 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2013-06-26 15:46:55 +0400 |
commit | 63f1e253c360dcb550bc4b492ccdf0bebf3afa22 (patch) | |
tree | 1dfc762a92efa44b1eb301f970bbf98f7f46827c /intern/cycles/blender | |
parent | 00234dab2f1a697a33659beee4f4c8856b5ce233 (diff) | |
parent | d5fd3b36888902367b07d92f7c606a95d603e23b (diff) |
Merged revision(s) 57671-57767 from trunk/blender into soc-2013-dingto
Diffstat (limited to 'intern/cycles/blender')
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 26 | ||||
-rw-r--r-- | intern/cycles/blender/blender_session.cpp | 20 |
2 files changed, 36 insertions, 10 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index f90881b9338..5dd5cbf0ad4 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -20,7 +20,7 @@ import bpy -from bpy.types import Panel, Menu +from bpy.types import Panel, Menu, Operator class CYCLES_MT_integrator_presets(Menu): @@ -82,7 +82,7 @@ class CyclesRender_PT_sampling(CyclesButtonsPanel, Panel): sub.prop(cscene, "mesh_light_samples", text="Mesh Light") sub.prop(cscene, "subsurface_samples", text="Subsurface") - if cscene.feature_set == 'EXPERIMENTAL': + if cscene.feature_set == 'EXPERIMENTAL' and (device_type == 'NONE' or cscene.device == 'CPU'): layout.row().prop(cscene, "sampling_pattern", text="Pattern") for rl in scene.render.layers: @@ -544,6 +544,26 @@ class CyclesObject_PT_ray_visibility(CyclesButtonsPanel, Panel): flow.prop(visibility, "shadow") +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): + return context.material or context.world or context.lamp + + 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'} + + def find_node(material, nodetype): if material and material.node_tree: ntree = material.node_tree @@ -565,7 +585,7 @@ def find_node_input(node, name): def panel_node_draw(layout, id_data, output_type, input_name): if not id_data.use_nodes: - layout.prop(id_data, "use_nodes", icon='NODETREE') + layout.operator("cycles.use_shading_nodes", icon='NODETREE') return False ntree = id_data.node_tree diff --git a/intern/cycles/blender/blender_session.cpp b/intern/cycles/blender/blender_session.cpp index ecdc631e39a..86bdbc0749f 100644 --- a/intern/cycles/blender/blender_session.cpp +++ b/intern/cycles/blender/blender_session.cpp @@ -616,16 +616,22 @@ void BlenderSession::update_status_progress() get_status(status, substatus); get_progress(progress, total_time); - timestatus = string_printf("Mem: %.2fM, Peak: %.2fM | ", mem_used, mem_peak); + timestatus = string_printf("Mem:%.2fM, Peak:%.2fM", mem_used, mem_peak); - timestatus += b_scene.name(); - if(b_rlay_name != "") - timestatus += ", " + b_rlay_name; - timestatus += " | "; + if(background) { + timestatus += " | " + b_scene.name(); + if(b_rlay_name != "") + timestatus += ", " + b_rlay_name; + } + else { + timestatus += " | "; - BLI_timestr(total_time, time_str, sizeof(time_str)); - timestatus += "Elapsed: " + string(time_str) + " | "; + BLI_timestr(total_time, time_str, sizeof(time_str)); + timestatus += "Time:" + string(time_str); + } + if(status.size() > 0) + status = " | " + status; if(substatus.size() > 0) status += " | " + substatus; |