Cycles: svn merge -r41531:41613 ^/trunk/blender
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 7 Nov 2011 15:23:08 +0000 (15:23 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 7 Nov 2011 15:23:08 +0000 (15:23 +0000)
39 files changed:
1  2 
CMakeLists.txt
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenkernel/intern/texture.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/include/UI_interface.h
source/blender/editors/interface/interface_draw.c
source/blender/editors/interface/interface_intern.h
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/object/object_add.c
source/blender/editors/screen/area.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_intern.h
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/gpu/intern/gpu_material.c
source/blender/makesdna/DNA_space_types.h
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_nodetree_types.h
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_ui_api.c
source/blender/nodes/CMakeLists.txt
source/blender/nodes/shader/node_shader_util.c
source/blender/nodes/shader/nodes/node_shader_geom.c
source/blender/nodes/shader/nodes/node_shader_mixRgb.c
source/blender/nodes/shader/nodes/node_shader_rgb.c
source/blender/python/intern/bpy_interface.c
source/blender/render/intern/source/external_engine.c
source/blenderplayer/bad_level_call_stubs/stubs.c
source/creator/CMakeLists.txt

diff --cc CMakeLists.txt
Simple merge
Simple merge
@@@ -218,80 -209,26 +218,79 @@@ void default_tex_mapping(TexMapping *te
        texmap->size[0]= texmap->size[1]= texmap->size[2]= 1.0f;
        texmap->max[0]= texmap->max[1]= texmap->max[2]= 1.0f;
        unit_m4(texmap->mat);
 -      
 -      return texmap;
 +
 +      texmap->projx= PROJ_X;
 +      texmap->projy= PROJ_Y;
 +      texmap->projz= PROJ_Z;
 +      texmap->mapping= MTEX_FLAT;
  }
  
 -void init_mapping(TexMapping *texmap)
 +void init_tex_mapping(TexMapping *texmap)
  {
 -      float eul[3], smat[3][3], rmat[3][3], mat[3][3];
 -      
 -      size_to_mat3( smat,texmap->size);
 -      
 -      eul[0]= DEG2RADF(texmap->rot[0]);
 -      eul[1]= DEG2RADF(texmap->rot[1]);
 -      eul[2]= DEG2RADF(texmap->rot[2]);
 -      eul_to_mat3( rmat,eul);
 +      float eul[3], smat[3][3], rmat[3][3], mat[3][3], proj[3][3];
 +
 +      if(texmap->projx == PROJ_X && texmap->projy == PROJ_Y && texmap->projz == PROJ_Z &&
 +         is_zero_v3(texmap->loc) && is_zero_v3(texmap->rot) && is_one_v3(texmap->size)) {
 +              unit_m4(texmap->mat);
 +
 +              texmap->flag |= TEXMAP_UNIT_MATRIX;
 +      }
 +      else {
 +              /* axis projection */
 +              zero_m3(proj);
 +
 +              if(texmap->projx != PROJ_N)
 +                      proj[texmap->projx-1][0]= 1.0f;
 +              if(texmap->projy != PROJ_N)
 +                      proj[texmap->projy-1][1]= 1.0f;
 +              if(texmap->projz != PROJ_N)
 +                      proj[texmap->projz-1][2]= 1.0f;
 +
 +              /* scale */
 +              size_to_mat3(smat, texmap->size);
 +              
 +              /* rotation */
 +              eul[0]= DEG2RADF(texmap->rot[0]);
 +              eul[1]= DEG2RADF(texmap->rot[1]);
 +              eul[2]= DEG2RADF(texmap->rot[2]);
 +              eul_to_mat3( rmat,eul);
 +              
 +              /* compose it all */
 +              mul_m3_m3m3(mat, rmat, smat);
 +              mul_m3_m3m3(mat, proj, mat);
 +              
 +              /* translation */
 +              copy_m4_m3(texmap->mat, mat);
-               VECCOPY(texmap->mat[3], texmap->loc);
++              copy_v3_v3(texmap->mat[3], texmap->loc);
 +
 +              texmap->flag &= ~TEXMAP_UNIT_MATRIX;
 +      }
 +}
 +
 +ColorMapping *add_color_mapping(void)
 +{
 +      ColorMapping *colormap= MEM_callocN(sizeof(ColorMapping), "ColorMapping");
        
 -      mul_m3_m3m3(mat, rmat, smat);
 +      default_color_mapping(colormap);
        
 -      copy_m4_m3(texmap->mat, mat);
 -      copy_v3_v3(texmap->mat[3], texmap->loc);
 +      return colormap;
 +}
 +
 +void default_color_mapping(ColorMapping *colormap)
 +{
 +      memset(colormap, 0, sizeof(ColorMapping));
 +
 +      init_colorband(&colormap->coba, 1);
 +
 +      colormap->bright= 1.0;
 +      colormap->contrast= 1.0;
 +      colormap->saturation= 1.0;
  
 +      colormap->blend_color[0]= 0.8f;
 +      colormap->blend_color[1]= 0.8f;
 +      colormap->blend_color[2]= 0.8f;
 +      colormap->blend_type= MA_RAMP_BLEND;
 +      colormap->blend_factor= 0.0f;
  }
  
  /* ****************** COLORBAND ******************* */
@@@ -12291,34 -12264,8 +12437,33 @@@ static void do_versions(FileData *fd, L
                                ma= ma->id.next;
                        }
                }
        }
  
 +      if(main->versionfile < 259 || (main->versionfile == 259 && main->subversionfile < 5)) {
 +              Scene *sce;
 +              Base *base;
 +              Material *ma;
 +
 +              /* compatibility tweak */
 +              for(sce = main->scene.first; sce; sce = sce->id.next) {
 +                      if(strcmp(sce->r.engine, "CYCLES") == 0) {
 +                              for(base = sce->base.first; base; base=base->next) {
 +                                      Object *ob= newlibadr(fd, lib, base->object);
 +
 +                                      if(ob && ob->type == OB_LAMP) {
 +                                              Lamp *la= newlibadr(fd, lib, ob->data);
 +                                              if(la)
 +                                                      la->area_size= 0.0f;
 +                                      }
 +                              }
 +                      }
 +              }
 +
 +              for(ma = main->mat.first; ma; ma= ma->id.next)
 +                      if(ma->nodetree)
 +                              ntree_tmp_cycles_emission_version_patch(fd, lib, ma->nodetree);
 +      }
 +
        if (main->versionfile < 260){
                {
                        /* set default alpha value of Image outputs in image and render layer nodes to 0 */
@@@ -756,11 -749,11 +755,15 @@@ void uiTemplateReportsBanner(uiLayout *
  void uiTemplateKeymapItemProperties(uiLayout *layout, struct PointerRNA *ptr);
  
  void uiTemplateList(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, struct PointerRNA *activeptr, const char *activeprop, const char *prop_list, int rows, int maxrows, int type);
 +void uiTemplateNodeLink(uiLayout *layout, struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *input);
 +void uiTemplateNodeView(uiLayout *layout, struct bContext *C, struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *input);
 +void uiTemplateTextureUser(uiLayout *layout, struct bContext *C);
 +void uiTemplateTextureShow(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop);
  
+ void uiTemplateMovieClip(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, int compact);
+ void uiTemplateTrack(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname);
+ void uiTemplateMarker(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname, PointerRNA *userptr, PointerRNA *trackptr, int cmpact);
  /* items */
  void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname);
  void uiItemEnumO(uiLayout *layout, const char *opname, const char *name, int icon, const char *propname, int value);
@@@ -493,10 -438,7 +496,10 @@@ void ED_region_do_draw(bContext *C, ARe
        ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST_PIXEL);
        
        uiFreeInactiveBlocks(C, &ar->uiblocks);
-       
 +      /* XXX test: add convention to end regions always in pixel space, for drawing of borders/gestures etc */
 +      ED_region_pixelspace(ar);
 +
        if(sa)
                region_draw_emboss(ar, &winrct);
  }
  
  
  /* this condition has been made more complex since editmode can draw textures */
- #define CHECK_OB_DRAWTEXTURE(vd, dt) \
-       ((ELEM(vd->drawtype, OB_TEXTURE, OB_MATERIAL) && dt>OB_SOLID) || \
+ #define CHECK_OB_DRAWTEXTURE(vd, dt)                                          \
 -      ((vd->drawtype==OB_TEXTURE && dt>OB_SOLID) ||                             \
++      ((ELEM(vd->drawtype, OB_TEXTURE, OB_MATERIAL) && dt>OB_SOLID) ||          \
        (vd->drawtype==OB_SOLID && vd->flag2 & V3D_SOLID_TEX))
  
- static void draw_bounding_volume(Scene *scene, Object *ob, short type);
+ static void draw_bounding_volume(Scene *scene, Object *ob, char type);
  
  static void drawcube_size(float size);
  static void drawcircle_size(float size);
@@@ -62,7 -63,8 +63,9 @@@ struct bScreen
  struct Scene;
  struct wmOperator;
  struct wmTimer;
 +struct Tex;
+ struct MovieClip;
+ struct MovieClipScopes;
  
        /**
         * The base structure all the other spaces
Simple merge
@@@ -368,11 -369,10 +370,14 @@@ void uiTemplateHistogram(struct uiLayou
  void uiTemplateReportsBanner(struct uiLayout *layout, struct bContext *C, struct wmOperator *op){}
  void uiTemplateWaveform(struct uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand){}
  void uiTemplateVectorscope(struct uiLayout *_self, struct PointerRNA *data, char* property, int expand){}
 +void uiTemplateNodeLink(struct uiLayout *layout, struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *input) {}
 +void uiTemplateNodeView(struct uiLayout *layout, struct bContext *C, struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *input) {}
 +void uiTemplateTextureUser(struct uiLayout *layout, struct bContext *C) {}
 +void uiTemplateTextureShow(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop) {}
  void uiTemplateKeymapItemProperties(struct uiLayout *layout, struct PointerRNA *ptr){}
+ void uiTemplateMovieClip(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, int compact){}
+ void uiTemplateTrack(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname){}
+ void uiTemplateMarker(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname, PointerRNA *userptr, PointerRNA *trackptr, int compact){}
  
  /* rna render */
  struct RenderResult *RE_engine_begin_result(struct RenderEngine *engine, int x, int y, int w, int h){return (struct RenderResult *) NULL;}
@@@ -857,17 -843,12 +864,21 @@@ endif(
                bf_blenfont
                bf_intern_audaspace
                bf_intern_mikktspace
 +              extern_recastnavigation
 +              bf_editor_util          # --- BAD LEVEL CALL HERE --- XXX, this should be removed before release!
 +              bf_intern_cycles
 +              cycles_render
 +              cycles_bvh
 +              cycles_device
 +              cycles_kernel
 +              cycles_util
 +              cycles_subd
        )
  
+       if(WITH_LIBMV)
+               list(APPEND BLENDER_SORTED_LIBS extern_libmv)
+       endif()
        if(WITH_MOD_CLOTH_ELTOPO)
                list(APPEND BLENDER_SORTED_LIBS extern_eltopo)
        endif()