Camera tracking: support of tripod motion solving
[blender.git] / intern / cycles / blender / addon / ui.py
index f44c04e36f81063cb4092915c7c5d834a2f92237..0ed08589327a77a90a25ff6385887704fb95a474 100644 (file)
@@ -67,6 +67,7 @@ class CyclesRender_PT_integrator(CyclesButtonsPanel, Panel):
         sub.prop(cscene, "samples", text="Render")
         sub.prop(cscene, "preview_samples", text="Preview")
         sub.prop(cscene, "seed")
+        sub.prop(cscene, "sample_clamp")
 
         sub = col.column(align=True)
         sub.label("Transparency:")
@@ -86,11 +87,11 @@ class CyclesRender_PT_integrator(CyclesButtonsPanel, Panel):
         sub.prop(cscene, "diffuse_bounces", text="Diffuse")
         sub.prop(cscene, "glossy_bounces", text="Glossy")
         sub.prop(cscene, "transmission_bounces", text="Transmission")
-        sub.prop(cscene, "no_caustics")
 
-        #row = col.row()
-        #row.prop(cscene, "blur_caustics")
-        #row.active = not cscene.no_caustics
+        col.separator()
+
+        col.prop(cscene, "no_caustics")
+        col.prop(cscene, "blur_glossy")
 
 
 class CyclesRender_PT_film(CyclesButtonsPanel, Panel):
@@ -177,14 +178,54 @@ class CyclesRender_PT_layers(CyclesButtonsPanel, Panel):
 
         col = split.column()
         col.prop(scene, "layers", text="Scene")
+        col.prop(rl, "layers_exclude", text="Exclude")
 
         col = split.column()
         col.prop(rl, "layers", text="Layer")
+        col.label(text="Mask Layers:")
+        col.prop(rl, "layers_zmask", text="")
 
-        layout.separator()
+        split = layout.split()
+
+        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()
+
+        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")
+        col.prop(rl, "use_pass_object_index")
+        col.prop(rl, "use_pass_material_index")
+        col.prop(rl, "use_pass_emit")
+        col.prop(rl, "use_pass_environment")
+        col.prop(rl, "use_pass_ambient_occlusion")
+        col.prop(rl, "use_pass_shadow")
 
-        rl = rd.layers[0]
-        layout.prop(rl, "material_override", text="Material")
+        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)
 
 
 class Cycles_PT_post_processing(CyclesButtonsPanel, Panel):
@@ -233,7 +274,12 @@ class CyclesCamera_PT_dof(CyclesButtonsPanel, Panel):
         col = split.column()
 
         col.label("Aperture:")
-        col.prop(ccam, "aperture_size", text="Size")
+        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")
 
         sub = col.column(align=True)
         sub.prop(ccam, "aperture_blades", text="Blades")
@@ -241,7 +287,7 @@ class CyclesCamera_PT_dof(CyclesButtonsPanel, Panel):
 
 
 class Cycles_PT_context_material(CyclesButtonsPanel, Panel):
-    bl_label = "Surface"
+    bl_label = ""
     bl_context = "material"
     bl_options = {'HIDE_HEADER'}
 
@@ -338,7 +384,7 @@ class CyclesObject_PT_ray_visibility(CyclesButtonsPanel, Panel):
         visibility = ob.cycles_visibility
 
         flow = layout.column_flow()
-        
+
         flow.prop(visibility, "camera")
         flow.prop(visibility, "diffuse")
         flow.prop(visibility, "glossy")
@@ -366,7 +412,7 @@ def find_node_input(node, name):
 
 
 def panel_node_draw(layout, id_data, output_type, input_name):
-    if not id_data.node_tree:
+    if not id_data.use_nodes:
         layout.prop(id_data, "use_nodes", icon='NODETREE')
         return False
 
@@ -455,46 +501,69 @@ class CyclesWorld_PT_surface(CyclesButtonsPanel, Panel):
             layout.prop(world, "horizon_color", text="Color")
 
 
-class CyclesWorld_PT_settings(CyclesButtonsPanel, Panel):
-    bl_label = "Settings"
+class CyclesWorld_PT_volume(CyclesButtonsPanel, Panel):
+    bl_label = "Volume"
     bl_context = "world"
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
-        return context.world and CyclesButtonsPanel.poll(context)
+        # world = context.world
+        # world and world.node_tree and CyclesButtonsPanel.poll(context)
+        return False
 
     def draw(self, context):
         layout = self.layout
+        layout.active = False
 
         world = context.world
-        cworld = world.cycles
+        panel_node_draw(layout, world, 'OUTPUT_WORLD', 'Volume')
 
-        col = layout.column()
 
-        col.prop(cworld, "sample_as_light")
-        row = col.row()
-        row.active = cworld.sample_as_light
-        row.prop(cworld, "sample_map_resolution")
+class CyclesWorld_PT_ambient_occlusion(CyclesButtonsPanel, Panel):
+    bl_label = "Ambient Occlusion"
+    bl_context = "world"
+
+    @classmethod
+    def poll(cls, context):
+        return context.world and CyclesButtonsPanel.poll(context)
 
+    def draw_header(self, context):
+        light = context.world.light_settings
+        self.layout.prop(light, "use_ambient_occlusion", text="")
 
-class CyclesWorld_PT_volume(CyclesButtonsPanel, Panel):
-    bl_label = "Volume"
+    def draw(self, context):
+        layout = self.layout
+        light = context.world.light_settings
+
+        layout.active = light.use_ambient_occlusion
+
+        row = layout.row()
+        row.prop(light, "ao_factor", text="Factor")
+        row.prop(light, "distance", text="Distance")
+
+
+class CyclesWorld_PT_settings(CyclesButtonsPanel, Panel):
+    bl_label = "Settings"
     bl_context = "world"
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
-        # world = context.world
-        # world and world.node_tree and CyclesButtonsPanel.poll(context)
-        return False
+        return context.world and CyclesButtonsPanel.poll(context)
 
     def draw(self, context):
         layout = self.layout
-        layout.active = False
 
         world = context.world
-        panel_node_draw(layout, world, 'OUTPUT_WORLD', 'Volume')
+        cworld = world.cycles
+
+        col = layout.column()
+
+        col.prop(cworld, "sample_as_light")
+        row = col.row()
+        row.active = cworld.sample_as_light
+        row.prop(cworld, "sample_map_resolution")
 
 
 class CyclesMaterial_PT_surface(CyclesButtonsPanel, Panel):
@@ -574,6 +643,7 @@ class CyclesMaterial_PT_settings(CyclesButtonsPanel, Panel):
 
         col = split.column()
         col.prop(cmat, "sample_as_light")
+        col.prop(mat, "pass_index")
 
 
 class CyclesTexture_PT_context(CyclesButtonsPanel, Panel):
@@ -590,7 +660,6 @@ class CyclesTexture_PT_context(CyclesButtonsPanel, Panel):
         pin_id = space.pin_id
         use_pin_id = space.use_pin_id
         user = context.texture_user
-        # node = context.texture_node
 
         if not use_pin_id or not isinstance(pin_id, bpy.types.Texture):
             pin_id = None
@@ -668,7 +737,7 @@ class CyclesTexture_PT_mapping(CyclesButtonsPanel, Panel):
 
         row = layout.row()
 
-        row.column().prop(mapping, "location")
+        row.column().prop(mapping, "translation")
         row.column().prop(mapping, "rotation")
         row.column().prop(mapping, "scale")
 
@@ -721,6 +790,31 @@ class CyclesTexture_PT_colors(CyclesButtonsPanel, Panel):
             layout.template_color_ramp(mapping, "color_ramp", expand=True)
 
 
+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")
+
+
 def draw_device(self, context):
     scene = context.scene
     layout = self.layout
@@ -746,7 +840,9 @@ def draw_pause(self, context):
 
         if view.viewport_shade == 'RENDERED':
             cscene = scene.cycles
+            layername = scene.render.layers.active.name
             layout.prop(cscene, "preview_pause", icon="PAUSE", text="")
+            layout.prop(cscene, "preview_active_layer", icon="RENDERLAYERS", text=layername)
 
 
 def get_panels():