Merged revision(s) 58093-58225 from trunk/blender into soc-2013-dingto.
authorThomas Dinges <blender@dingto.org>
Sat, 13 Jul 2013 23:52:43 +0000 (23:52 +0000)
committerThomas Dinges <blender@dingto.org>
Sat, 13 Jul 2013 23:52:43 +0000 (23:52 +0000)
1  2 
intern/cycles/blender/addon/ui.py
source/blender/blenkernel/intern/node.c
source/blender/editors/space_node/drawnode.c
source/blender/makesrna/intern/rna_nodetree.c

index b80ab6b1c5ecdb1f1fa354e01859e4e404859710,8d129aa821c3bed6057d05fface262a485dda3dc..7f6e8d591c27d441b26863dfadf901cf441ff659
@@@ -56,13 -56,15 +56,13 @@@ class CyclesRender_PT_sampling(CyclesBu
          split = layout.split()
  
          col = split.column()
 -        sub = col.column()
 -        sub.active = (device_type == 'NONE' or cscene.device == 'CPU')
 -        sub.prop(cscene, "progressive")
 +        col.prop(cscene, "progressive")
  
          sub = col.column(align=True)
          sub.prop(cscene, "seed")
          sub.prop(cscene, "sample_clamp")
  
 -        if cscene.progressive or (device_type != 'NONE' and cscene.device == 'GPU'):
 +        if cscene.progressive:
              col = split.column()
              col.label(text="Samples:")
              sub = col.column(align=True)
@@@ -211,21 -213,23 +211,23 @@@ class CyclesRender_PT_performance(Cycle
          subsub.enabled = not rd.use_border
          subsub.prop(rd, "use_save_buffers")
  
-         col = split.column()
+         col = split.column(align=True)
  
-         sub = col.column(align=True)
-         sub.label(text="Acceleration structure:")
-         sub.prop(cscene, "debug_bvh_type", text="")
-         sub.prop(cscene, "debug_use_spatial_splits")
-         sub.prop(cscene, "use_cache")
+         col.label(text="Viewport:")
+         col.prop(cscene, "debug_bvh_type", text="")
+         col.separator()
+         col.prop(cscene, "preview_start_resolution")
  
-         sub = col.column(align=True)
-         sub.label(text="Viewport:")
-         sub.prop(cscene, "preview_start_resolution")
+         col.separator()
  
-         sub = col.column(align=True)
-         sub.label(text="Final Render:")
-         sub.prop(rd, "use_persistent_data", text="Persistent Images")
+         col.label(text="Final Render:")
+         col.prop(cscene, "use_cache")
+         col.prop(rd, "use_persistent_data", text="Persistent Images")
+         col.separator()
+         col.label(text="Acceleration structure:")   
+         col.prop(cscene, "debug_use_spatial_splits")
  
  
  class CyclesRender_PT_opengl(CyclesButtonsPanel, Panel):
@@@ -628,6 -632,7 +630,6 @@@ class CyclesLamp_PT_lamp(CyclesButtonsP
          lamp = context.lamp
          clamp = lamp.cycles
          cscene = context.scene.cycles
 -        device_type = context.user_preferences.system.compute_device_type
  
          layout.prop(lamp, "type", expand=True)
  
                  sub.prop(lamp, "size", text="Size X")
                  sub.prop(lamp, "size_y", text="Size Y")
  
 -        if not cscene.progressive and (device_type == 'NONE' or cscene.device == 'CPU'):
 +        if not cscene.progressive:
              col.prop(clamp, "samples")
  
          col = split.column()
@@@ -835,6 -840,7 +837,6 @@@ class CyclesWorld_PT_settings(CyclesBut
          world = context.world
          cworld = world.cycles
          cscene = context.scene.cycles
 -        device_type = context.user_preferences.system.compute_device_type
  
          col = layout.column()
  
          sub = col.row(align=True)
          sub.active = cworld.sample_as_light
          sub.prop(cworld, "sample_map_resolution")
 -        if not cscene.progressive and (device_type == 'NONE' or cscene.device == 'CPU'):
 +        if not cscene.progressive:
              sub.prop(cworld, "samples")
  
  
index 929d741282eea71ff4e663ea6e1ee875bfedc41d,386b50c7018e2023e6de48e746fbf04be4901519..3f343cedff1512b8ebb39d52cd5367fc0709b9e5
@@@ -349,9 -349,6 +349,6 @@@ static void free_dynamic_typeinfo(bNode
                if (ntype->outputs) {
                        MEM_freeN(ntype->outputs);
                }
-               if (ntype->ui_name) {
-                       MEM_freeN((void *)ntype->ui_name);
-               }
        }
  }
  
@@@ -3409,7 -3406,6 +3406,7 @@@ static void registerShaderNodes(void
        register_node_type_sh_rgb();
        register_node_type_sh_wireframe();
        register_node_type_sh_wavelength();
 +      register_node_type_sh_blackbody();
        register_node_type_sh_mix_rgb();
        register_node_type_sh_valtorgb();
        register_node_type_sh_rgbtobw();
        register_node_type_sh_curve_rgb();
        register_node_type_sh_math();
        register_node_type_sh_vect_math();
 +      register_node_type_sh_vect_transform();
        register_node_type_sh_squeeze();
        register_node_type_sh_material_ext();
        register_node_type_sh_invert();
        register_node_type_sh_seprgb();
        register_node_type_sh_combrgb();
 +      register_node_type_sh_sephsv();
 +      register_node_type_sh_combhsv();
        register_node_type_sh_hue_sat();
  
        register_node_type_sh_attribute();
index 82104d2c83792ee40922d1a117528eb8e51d3177,cbf40bf2e57bb31747c81a8a2451998c0ee0e817..fc136458b3cde339efbbff8174ae9d7bf99943ff
@@@ -735,13 -735,6 +735,13 @@@ static void node_shader_buts_vect_math(
        uiItemR(layout, ptr, "operation", 0, "", ICON_NONE);
  }
  
 +static void node_shader_buts_vect_transform(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
 +{ 
 +      uiItemR(layout, ptr, "type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
 +      uiItemR(layout, ptr, "convert_from", 0, "", ICON_NONE);
 +      uiItemR(layout, ptr, "convert_to", 0, "", ICON_NONE);
 +}
 +
  static void node_shader_buts_geometry(uiLayout *layout, bContext *C, PointerRNA *ptr)
  {
        PointerRNA obptr = CTX_data_pointer_get(C, "active_object");
@@@ -976,9 -969,6 +976,9 @@@ static void node_shader_set_butfunc(bNo
                case SH_NODE_VECT_MATH: 
                        ntype->uifunc = node_shader_buts_vect_math;
                        break; 
 +              case SH_NODE_VECT_TRANSFORM: 
 +                      ntype->uifunc = node_shader_buts_vect_transform;
 +                      break; 
                case SH_NODE_GEOMETRY:
                        ntype->uifunc = node_shader_buts_geometry;
                        break;
@@@ -1389,6 -1379,7 +1389,7 @@@ static void node_composit_buts_zcombine
        
        col = uiLayoutColumn(layout, TRUE);
        uiItemR(col, ptr, "use_alpha", 0, NULL, ICON_NONE);
+       uiItemR(col, ptr, "use_antialias_z", 0, NULL, ICON_NONE);
  }
  
  
index df53e62692c466be6428c005738e3e0a251d9ac3,0c31f042f93cfabda1d234350198568fbf2e382c..07b70a5251e10dc433fabb09e066eb31837784d5
@@@ -3509,48 -3509,6 +3509,48 @@@ static void def_sh_tex_coord(StructRNA 
        RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
  }
  
 +static void def_sh_vect_transform(StructRNA *srna)
 +{
 +      static EnumPropertyItem prop_vect_type_items[] = {
 +              {SHD_VECT_TRANSFORM_TYPE_VECTOR, "VECTOR",  0, "Vector",   ""},
 +              {SHD_VECT_TRANSFORM_TYPE_POINT,  "POINT",   0, "Point",    ""},
 +              {0, NULL, 0, NULL, NULL}
 +      };
 +
 +      static EnumPropertyItem prop_vect_from_items[] = {
 +              {SHD_VECT_TRANSFORM_FROM_WORLD,  "WORLD",   0, "World",    ""},
 +              {SHD_VECT_TRANSFORM_FROM_OBJECT, "OBJECT",  0, "Object",   ""},
 +              {SHD_VECT_TRANSFORM_FROM_CAMERA, "CAMERA",  0, "Camera",   ""},
 +              {0, NULL, 0, NULL, NULL}
 +      };
 +
 +      static EnumPropertyItem prop_vect_to_items[] = {
 +              {SHD_VECT_TRANSFORM_TO_WORLD,  "WORLD",   0, "World",    ""},
 +              {SHD_VECT_TRANSFORM_TO_OBJECT, "OBJECT",  0, "Object",   ""},
 +              {SHD_VECT_TRANSFORM_TO_CAMERA, "CAMERA",  0, "Camera",   ""},
 +              {0, NULL, 0, NULL, NULL}
 +      };
 +
 +      PropertyRNA *prop;
 +      
 +      RNA_def_struct_sdna_from(srna, "NodeShaderVectTransform", "storage");
 +      
 +      prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
 +      RNA_def_property_enum_items(prop, prop_vect_type_items);
 +      RNA_def_property_ui_text(prop, "Type", "");
 +      RNA_def_property_update(prop, 0, "rna_Node_update");
 +      
 +      prop = RNA_def_property(srna, "convert_from", PROP_ENUM, PROP_NONE);
 +      RNA_def_property_enum_items(prop, prop_vect_from_items);
 +      RNA_def_property_ui_text(prop, "Convert From", "Space to convert from");
 +      RNA_def_property_update(prop, 0, "rna_Node_update");
 +      
 +      prop = RNA_def_property(srna, "convert_to", PROP_ENUM, PROP_NONE);
 +      RNA_def_property_enum_items(prop, prop_vect_to_items);
 +      RNA_def_property_ui_text(prop, "Convert To", "Space to convert to");
 +      RNA_def_property_update(prop, 0, "rna_Node_update");
 +}
 +
  static void def_sh_tex_wireframe(StructRNA *srna)
  {
        PropertyRNA *prop;
@@@ -5190,6 -5148,11 +5190,11 @@@ static void def_cmp_zcombine(StructRNA 
        RNA_def_property_boolean_sdna(prop, NULL, "custom1", 0);
        RNA_def_property_ui_text(prop, "Use Alpha", "Take Alpha channel into account when doing the Z operation");
        RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
+       prop = RNA_def_property(srna, "use_antialias_z", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_negative_sdna(prop, NULL, "custom2", 0);
+       RNA_def_property_ui_text(prop, "Anti-Alias Z", "Anti-alias the z-buffer to try to avoid artifacts, mostly useful for Blender renders");
+       RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
  }
  
  static void def_cmp_ycc(StructRNA *srna)