Cycles: svn merge -r37957:39132 https://svn.blender.org/svnroot/bf-blender/trunk...
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 7 Aug 2011 13:21:04 +0000 (13:21 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 7 Aug 2011 13:21:04 +0000 (13:21 +0000)
82 files changed:
1  2 
CMakeLists.txt
intern/CMakeLists.txt
release/scripts/startup/bl_ui/properties_data_modifier.py
release/scripts/startup/bl_ui/properties_particle.py
release/scripts/startup/bl_ui/properties_texture.py
release/scripts/startup/bl_ui/space_node.py
release/scripts/startup/bl_ui/space_view3d.py
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/include/ED_node.h
source/blender/editors/include/UI_interface.h
source/blender/editors/interface/CMakeLists.txt
source/blender/editors/interface/interface_icons.c
source/blender/editors/interface/interface_panel.c
source/blender/editors/interface/interface_style.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/object/object_add.c
source/blender/editors/render/render_preview.c
source/blender/editors/render/render_shading.c
source/blender/editors/screen/area.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/space_buttons/CMakeLists.txt
source/blender/editors/space_buttons/buttons_context.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_node/CMakeLists.txt
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_header.c
source/blender/editors/space_node/node_intern.h
source/blender/editors/space_node/node_ops.c
source/blender/editors/space_node/space_node.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_intern.h
source/blender/editors/space_view3d/view3d_ops.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_material.c
source/blender/makesdna/DNA_image_types.h
source/blender/makesdna/DNA_node_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesdna/DNA_view3d_types.h
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_internal.h
source/blender/makesrna/intern/rna_material.c
source/blender/makesrna/intern/rna_object_api.c
source/blender/makesrna/intern/rna_render.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_scene_api.c
source/blender/modifiers/intern/MOD_cast.c
source/blender/modifiers/intern/MOD_displace.c
source/blender/modifiers/intern/MOD_hook.c
source/blender/modifiers/intern/MOD_meshdeform.c
source/blender/modifiers/intern/MOD_simpledeform.c
source/blender/modifiers/intern/MOD_smooth.c
source/blender/modifiers/intern/MOD_solidify.c
source/blender/modifiers/intern/MOD_uvproject.c
source/blender/modifiers/intern/MOD_warp.c
source/blender/modifiers/intern/MOD_wave.c
source/blender/nodes/CMakeLists.txt
source/blender/nodes/intern/SHD_util.c
source/blender/render/CMakeLists.txt
source/blender/render/SConscript
source/blender/render/extern/include/RE_pipeline.h
source/blender/render/intern/source/pipeline.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_init_exit.c
source/blenderplayer/bad_level_call_stubs/stubs.c
source/creator/CMakeLists.txt
source/creator/creator.c

diff --cc CMakeLists.txt
@@@ -1218,8 -1302,11 +1307,10 @@@ add_subdirectory(extern
  
  #-----------------------------------------------------------------------------
  # Blender Application
- add_subdirectory(source/creator)
+ if(WITH_BLENDER)
+       add_subdirectory(source/creator)
+ endif()
  
 -
  #-----------------------------------------------------------------------------
  # Blender Player
  if(WITH_PLAYER)
Simple merge
@@@ -407,8 -408,7 +408,8 @@@ class TEXTURE_PT_image_sampling(Texture
          col = split.column()
  
          #Only for Material based textures, not for Lamp/World...
-         if isinstance(idblock, bpy.types.Material):
+         if slot and isinstance(idblock, bpy.types.Material):
 +            slot = context.texture_slot
              col.prop(tex, "use_normal_map")
              row = col.row()
              row.active = tex.use_normal_map
Simple merge
@@@ -40,7 -38,8 +40,8 @@@ struct Scene
  struct Tex;
  struct bContext;
  struct bNode;
 -struct ID;
 +struct bNodeTree;
+ struct ScrArea;
  
  /* drawnode.c */
  void ED_init_node_butfuncs(void);
@@@ -50,16 -49,13 +51,18 @@@ void ED_node_changed_update(struct ID *
  void ED_node_generic_update(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node);
  
  /* node_edit.c */
 -void ED_node_shader_default(struct Material *ma);
 +void ED_node_shader_default(struct ID *id);
  void ED_node_composit_default(struct Scene *sce);
  void ED_node_texture_default(struct Tex *tex);
+ void ED_node_link_intersect_test(struct ScrArea *sa, int test);
+ void ED_node_link_insert(struct ScrArea *sa);
  
 -/* node ops.c */
 +void ED_node_set_active(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node);
 +
 +/* node_layout.c */
 +void ED_node_tree_auto_layout(struct bNodeTree *ntree, struct bNode *root);
 +
 +/* node_ops.c */
  void ED_operatormacros_node(void);
  
  #endif /* ED_NODE_H */
@@@ -136,18 -169,26 +136,18 @@@ void ED_area_overdraw_flush(ScrArea *sa
  
  static void area_draw_azone(short x1, short y1, short x2, short y2)
  {
 -      int dx= floor(0.3f*(x2-x1));
 -      int dy= floor(0.3f*(y2-y1));
 -      
 -      glColor4ub(255, 255, 255, 180);
 -      fdrawline(x1, y2, x2, y1);
 -      glColor4ub(255, 255, 255, 130);
 -      fdrawline(x1, y2-dy, x2-dx, y1);
 -      glColor4ub(255, 255, 255, 80);
 -      fdrawline(x1, y2-2*dy, x2-2*dx, y1);
 -      
 -      glColor4ub(0, 0, 0, 210);
 -      fdrawline(x1, y2+1, x2+1, y1);
 -      glColor4ub(0, 0, 0, 180);
 -      fdrawline(x1, y2-dy+1, x2-dx+1, y1);
 -      glColor4ub(0, 0, 0, 150);
 -      fdrawline(x1, y2-2*dy+1, x2-2*dx+1, y1);
 +      int dx= floor(0.9f*(x2-x1));
 +      int dy= floor(0.9f*(y2-y1));
 +
 +      glColor4f(0.0f, 0.0f, 0.0f, 0.25f);
 +      glBegin(GL_TRIANGLES);
 +      glVertex2f(x1, y1);
 +      glVertex2f(x1+dx, y1);
 +      glVertex2f(x1, y1+dy);
 +      glEnd();
  }
  
- static void region_draw_azone(AZone *az)
 -
+ static void region_draw_azone_icon(AZone *az)
  {
        GLUquadricObj *qobj = NULL; 
        short midx = az->x1 + (az->x2 - az->x1)/2;
@@@ -479,21 -600,179 +559,111 @@@ static void region_azone_edge(AZone *az
        BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y2);
  }
  
 -static void region_azone_icon(ScrArea *sa, AZone *az, ARegion *ar)
 -{
 -      AZone *azt;
 -      int tot=0;
 -      
 -      /* count how many actionzones with along same edge are available.
 -         This allows for adding more action zones in the future without
 -         having to worry about correct offset */
 -      for(azt= sa->actionzones.first; azt; azt= azt->next) {
 -              if(azt->edge == az->edge) tot++;
 -      }
 -      
 -      switch(az->edge) {
 -              case AE_TOP_TO_BOTTOMRIGHT:
 -                      az->x1= ar->winrct.xmax - tot*2*AZONEPAD_ICON;
 -                      az->y1= ar->winrct.ymax + AZONEPAD_ICON;
 -                      az->x2= ar->winrct.xmax - tot*AZONEPAD_ICON;
 -                      az->y2= ar->winrct.ymax + 2*AZONEPAD_ICON;
 -                      break;
 -              case AE_BOTTOM_TO_TOPLEFT:
 -                      az->x1= ar->winrct.xmin + AZONEPAD_ICON;
 -                      az->y1= ar->winrct.ymin - 2*AZONEPAD_ICON;
 -                      az->x2= ar->winrct.xmin + 2*AZONEPAD_ICON;
 -                      az->y2= ar->winrct.ymin - AZONEPAD_ICON;
 -                      break;
 -              case AE_LEFT_TO_TOPRIGHT:
 -                      az->x1= ar->winrct.xmin - 2*AZONEPAD_ICON;
 -                      az->y1= ar->winrct.ymax - tot*2*AZONEPAD_ICON;
 -                      az->x2= ar->winrct.xmin - AZONEPAD_ICON;
 -                      az->y2= ar->winrct.ymax - tot*AZONEPAD_ICON;
 -                      break;
 -              case AE_RIGHT_TO_TOPLEFT:
 -                      az->x1= ar->winrct.xmax + AZONEPAD_ICON;
 -                      az->y1= ar->winrct.ymax - tot*2*AZONEPAD_ICON;
 -                      az->x2= ar->winrct.xmax + 2*AZONEPAD_ICON;
 -                      az->y2= ar->winrct.ymax - tot*AZONEPAD_ICON;
 -                      break;
 -      }
 -
 -      BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y2);
 -      
 -      /* if more azones on 1 spot, set offset */
 -      for(azt= sa->actionzones.first; azt; azt= azt->next) {
 -              if(az!=azt) {
 -                      if( ABS(az->x1-azt->x1) < 2 && ABS(az->y1-azt->y1) < 2) {
 -                              if(az->edge==AE_TOP_TO_BOTTOMRIGHT || az->edge==AE_BOTTOM_TO_TOPLEFT) {
 -                                      az->x1+= AZONESPOT;
 -                                      az->x2+= AZONESPOT;
 -                              }
 -                              else{
 -                                      az->y1-= AZONESPOT;
 -                                      az->y2-= AZONESPOT;
 -                              }
 -                              BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y2);
 -                      }
 -              }
 -      }
 -}
 -
+ #define AZONEPAD_TABW 18
+ #define AZONEPAD_TABH 7
+ /* region already made zero sized, in shape of edge */
+ static void region_azone_tab(ScrArea *sa, AZone *az, ARegion *ar)
+ {
+       AZone *azt;
+       int tot= 0, add;
+       
+       for(azt= sa->actionzones.first; azt; azt= azt->next) {
+               if(azt->edge == az->edge) tot++;
+       }
+       
+       switch(az->edge) {
+               case AE_TOP_TO_BOTTOMRIGHT:
+                       if(ar->winrct.ymax == sa->totrct.ymin) add= 1; else add= 0;
+                       az->x1= ar->winrct.xmax - 2*AZONEPAD_TABW;
+                       az->y1= ar->winrct.ymax - add;
+                       az->x2= ar->winrct.xmax - AZONEPAD_TABW;
+                       az->y2= ar->winrct.ymax - add + AZONEPAD_TABH;
+                       break;
+               case AE_BOTTOM_TO_TOPLEFT:
+                       az->x1= ar->winrct.xmin + AZONEPAD_TABW;
+                       az->y1= ar->winrct.ymin - AZONEPAD_TABH;
+                       az->x2= ar->winrct.xmin + 2*AZONEPAD_TABW;
+                       az->y2= ar->winrct.ymin;
+                       break;
+               case AE_LEFT_TO_TOPRIGHT:
+                       az->x1= ar->winrct.xmin + 1 - AZONEPAD_TABH;
+                       az->y1= ar->winrct.ymax - 2*AZONEPAD_TABW;
+                       az->x2= ar->winrct.xmin + 1;
+                       az->y2= ar->winrct.ymax - AZONEPAD_TABW;
+                       break;
+               case AE_RIGHT_TO_TOPLEFT:
+                       az->x1= ar->winrct.xmax - 1;
+                       az->y1= ar->winrct.ymax - 2*AZONEPAD_TABW;
+                       az->x2= ar->winrct.xmax - 1 + AZONEPAD_TABH;
+                       az->y2= ar->winrct.ymax - AZONEPAD_TABW;
+                       break;
+       }
+       /* rect needed for mouse pointer test */
+       BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y2);
+ }     
+ #define AZONEPAD_TRIAW        16
+ #define AZONEPAD_TRIAH        9
+ /* region already made zero sized, in shape of edge */
+ static void region_azone_tria(ScrArea *sa, AZone *az, ARegion *ar)
+ {
+       AZone *azt;
+       int tot= 0, add;
+       
+       for(azt= sa->actionzones.first; azt; azt= azt->next) {
+               if(azt->edge == az->edge) tot++;
+       }
+       
+       switch(az->edge) {
+               case AE_TOP_TO_BOTTOMRIGHT:
+                       if(ar->winrct.ymax == sa->totrct.ymin) add= 1; else add= 0;
+                       az->x1= ar->winrct.xmax - 2*AZONEPAD_TRIAW;
+                       az->y1= ar->winrct.ymax - add;
+                       az->x2= ar->winrct.xmax - AZONEPAD_TRIAW;
+                       az->y2= ar->winrct.ymax - add + AZONEPAD_TRIAH;
+                       break;
+                       case AE_BOTTOM_TO_TOPLEFT:
+                       az->x1= ar->winrct.xmin + AZONEPAD_TRIAW;
+                       az->y1= ar->winrct.ymin - AZONEPAD_TRIAH;
+                       az->x2= ar->winrct.xmin + 2*AZONEPAD_TRIAW;
+                       az->y2= ar->winrct.ymin;
+                       break;
+                       case AE_LEFT_TO_TOPRIGHT:
+                       az->x1= ar->winrct.xmin + 1 - AZONEPAD_TRIAH;
+                       az->y1= ar->winrct.ymax - 2*AZONEPAD_TRIAW;
+                       az->x2= ar->winrct.xmin + 1;
+                       az->y2= ar->winrct.ymax - AZONEPAD_TRIAW;
+                       break;
+                       case AE_RIGHT_TO_TOPLEFT:
+                       az->x1= ar->winrct.xmax - 1;
+                       az->y1= ar->winrct.ymax - 2*AZONEPAD_TRIAW;
+                       az->x2= ar->winrct.xmax - 1 + AZONEPAD_TRIAH;
+                       az->y2= ar->winrct.ymax - AZONEPAD_TRIAW;
+                       break;
+       }
+       /* rect needed for mouse pointer test */
+       BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y2);
+ }     
  static void region_azone_initialize(ScrArea *sa, ARegion *ar, AZEdge edge) 
  {
 -      AZone *az;
 -      
 -      az= (AZone *)MEM_callocN(sizeof(AZone), "actionzone");
 -      BLI_addtail(&(sa->actionzones), az);
 -      az->type= AZONE_REGION;
 -      az->ar= ar;
 -      az->edge= edge;
 -      
 -      if (ar->flag & (RGN_FLAG_HIDDEN|RGN_FLAG_TOO_SMALL)) {
 -              if(G.rt==2)
 -                      region_azone_tria(sa, az, ar);
 -              else if(G.rt==1)
 -                      region_azone_tab(sa, az, ar);
 -              else
 -                      region_azone_icon(sa, az, ar);
 -      } else {
 +      if(!(ar->flag & RGN_FLAG_HIDDEN)) {
 +              AZone *az;
 +              
 +              az= (AZone *)MEM_callocN(sizeof(AZone), "actionzone");
 +              BLI_addtail(&(sa->actionzones), az);
 +              az->type= AZONE_REGION;
 +              az->ar= ar;
 +              az->edge= edge;
 +              
                region_azone_edge(az, ar);
        }
 -      
  }
  
 -
  /* *************************************************************** */
  
  static void region_azone_add(ScrArea *sa, ARegion *ar, int alignment)
@@@ -2673,8 -2640,11 +2683,8 @@@ static void project_bucket_init(const P
        LinkNode *node;
        int face_index, image_index=0;
        ImBuf *ibuf = NULL;
-       
 +      Image *tpage_last = NULL, *tpage;
 -      MTFace *tf;
 -      
 -      Image *tpage_last = NULL;
 -      
+       Image *ima = NULL;
  
        if (ps->image_tot==1) {
                /* Simple loop, no context switching */
@@@ -228,8 -236,10 +228,11 @@@ static int buttons_context_path_materia
                        ma= give_current_material(ob, ob->actcol);
                        RNA_id_pointer_create(&ma->id, &path->ptr[path->len]);
                        path->len++;
+                       if(for_texture && give_current_material_texture_node(ma))
+                               return 1;
                        
 +#if 0
                        ma= give_node_material(ma);
                        if(ma) {
                                RNA_id_pointer_create(&ma->id, &path->ptr[path->len]);
@@@ -364,44 -373,8 +367,44 @@@ static int buttons_context_path_brush(B
        return 0;
  }
  
 -static int buttons_context_path_texture(ButsContextPath *path)
 +static int buttons_context_path_texture(ButsContextPath *path, ButsContextTexture *ct)
  {
-                       buttons_context_path_material(path);
 +      PointerRNA *ptr= &path->ptr[path->len-1];
 +      ID *id;
 +
 +      /* if we already have a (pinned) texture, we're done */
 +      if(RNA_struct_is_a(ptr->type, &RNA_Texture))
 +              return 1;
 +
 +      if(!(ct && ct->user))
 +              return 0;
 +      
 +      id= ct->user->id;
 +
 +      if(id) {
 +              if(GS(id->name) == ID_BR)
 +                      buttons_context_path_brush(path);
 +              else if(GS(id->name) == ID_MA)
++                      buttons_context_path_material(path, 0);
 +              else if(GS(id->name) == ID_WO)
 +                      buttons_context_path_world(path);
 +              else if(GS(id->name) == ID_LA)
 +                      buttons_context_path_data(path, OB_LAMP);
 +              else if(GS(id->name) == ID_PA)
 +                      buttons_context_path_particle(path);
 +              else if(GS(id->name) == ID_OB)
 +                      buttons_context_path_object(path);
 +      }
 +      
 +      if(ct->texture) {
 +              RNA_id_pointer_create(&ct->texture->id, &path->ptr[path->len]);
 +              path->len++;
 +      }
 +
 +      return 1;
 +
 +
 +#if 0
        Material *ma;
        Lamp *la;
        Brush *br;
@@@ -555,10 -527,10 +558,10 @@@ static int buttons_context_path(const b
                        found= buttons_context_path_particle(path);
                        break;
                case BCONTEXT_MATERIAL:
-                       found= buttons_context_path_material(path);
+                       found= buttons_context_path_material(path, 0);
                        break;
                case BCONTEXT_TEXTURE:
 -                      found= buttons_context_path_texture(path);
 +                      found= buttons_context_path_texture(path, sbuts->texuser);
                        break;
                case BCONTEXT_BONE:
                        found= buttons_context_path_bone(path);
@@@ -23,10 -23,9 +23,10 @@@ set(IN
        ../include
        ../../blenfont
        ../../blenkernel
-       ../../blenloader
        ../../blenlib
+       ../../blenloader
        ../../imbuf
 +      ../../gpu
        ../../makesdna
        ../../makesrna
        ../../nodes
@@@ -3062,35 -3294,5 +3372,34 @@@ void NODE_OT_add_file(wmOperatorType *o
        RNA_def_string(ot->srna, "name", "Image", 24, "Name", "Datablock name to assign.");
  }
  
 +/* ****************** Auto Layout Operator  ******************* */
 +
 +static int node_auto_layout_exec(bContext *C, wmOperator *UNUSED(op))
 +{
 +      SpaceNode *snode= CTX_wm_space_node(C);
 +      bNode *node;
 +
 +      for(node=snode->edittree->nodes.first; node; node=node->next)
 +              if(node->flag & SELECT)
 +                      ED_node_tree_auto_layout(snode->edittree, node);
 +
 +      snode_notify(C, snode);
 +      
 +      return OPERATOR_FINISHED;
 +}
  
 +void NODE_OT_auto_layout(wmOperatorType *ot)
 +{
 +      /* identifiers */
 +      ot->name= "Auto Layout Nodes";
 +      ot->description= "Automatically layout nodes with the selected nodes as root";
 +      ot->idname= "NODE_OT_auto_layout";
 +      
 +      /* callbacks */
 +      ot->exec= node_auto_layout_exec;
 +      ot->poll= ED_operator_node_active;
 +      
 +      /* flags */
 +      ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 +}
  
@@@ -2641,9 -2716,11 +2751,13 @@@ void view3d_main_area_draw(const bConte
                BDR_drawSketch(C);
        }
  
+       if ((U.ndof_flag & NDOF_SHOW_GUIDE) && (rv3d->viewlock != RV3D_LOCKED) && (rv3d->persp != RV3D_CAMOB))
+               // TODO: draw something else (but not this) during fly mode
+               draw_rotation_guide(rv3d);
        ED_region_pixelspace(ar);
 +
 +      }
        
  //    retopo_paint_view_update(v3d);
  //    retopo_draw_paint_lines();
Simple merge
@@@ -1420,10 -1401,19 +1417,14 @@@ GPUMaterial *GPU_material_from_blender(
                ntreeGPUMaterialNodes(ma->nodetree, mat);
        }
        else {
 +              /* create material */
                outlink = GPU_blender_material(mat, ma);
                GPU_material_output_link(mat, outlink);
 -      }
 -
 -      if(gpu_do_color_management(mat))
 -              if(mat->outlink)
 -                      GPU_link(mat, "linearrgb_to_srgb", mat->outlink, &mat->outlink);
 -      /*if(!GPU_material_construct_end(mat)) {
 -              GPU_material_free(mat);
 -              mat= NULL;
 -              return 0;
 -      }*/
++              if(gpu_do_color_management(mat))
++                      if(mat->outlink)
++                              GPU_link(mat, "linearrgb_to_srgb", mat->outlink, &mat->outlink);
 +      }
  
        GPU_material_construct_end(mat);
  
Simple merge
@@@ -83,13 -83,14 +83,18 @@@ void nodestack_get_vec(float *in, shor
  void ntreeShaderExecTree(bNodeTree *ntree, ShadeInput *shi, ShadeResult *shr)
  {
        ShaderCallData scd;
-       
 +      float co[3] = {0.0f, 0.0f, 0.0f};
+       /*
+        @note: preserve material from ShadeInput for material id, nodetree execs change it
+        fix for bug "[#28012] Mat ID messy with shader nodes"
+        */
+       Material *mat = shi->mat;
++
        /* convert caller data to struct */
 +      memset(&scd, 0, sizeof(scd));
        scd.shi= shi;
        scd.shr= shr;
 +      scd.co= co;
        
        /* each material node has own local shaderesult, with optional copying */
        memset(shr, 0, sizeof(ShadeResult));
@@@ -118,18 -116,21 +118,26 @@@ set(SR
        intern/raytrace/vbvh.h
  )
  
 -if(WITH_IMAGE_OPENEXR)
 -      add_definitions(-DWITH_OPENEXR)
 +IF(WITH_PYTHON)
 +      ADD_DEFINITIONS(-DWITH_PYTHON)
 +      LIST(APPEND INC ../python ${PYTHON_INC})
 +endif()
 +
 +IF(WITH_IMAGE_OPENEXR)
 +      ADD_DEFINITIONS(-DWITH_OPENEXR)
  endif()
  
+ if(WITH_MOD_SMOKE)
+       add_definitions(-DWITH_SMOKE)
+ endif()
  if(WITH_CODEC_QUICKTIME)
-       list(APPEND INC ../quicktime)
-       list(APPEND INC_SYS ${QUICKTIME_INCLUDE_DIRS})
+       list(APPEND INC
+               ../quicktime
+       )
+       list(APPEND INC_SYS
+               ${QUICKTIME_INCLUDE_DIRS}
+       )
        add_definitions(-DWITH_QUICKTIME)
  endif()
  
@@@ -14,13 -14,8 +14,15 @@@ cxxflags_raytrace = env['CXXFLAGS'
  defs = []
  defs_raytrace = []
  
+ defs.append('WITH_SMOKE')  # TODO, make optional
 +if env['WITH_BF_PYTHON']:
 +    incs += ' ../python'
 +    incs += ' ' + env['BF_PYTHON_INC']
 +    defs.append('WITH_PYTHON')
 +    if env['BF_DEBUG']:
 +        defs.append('DEBUG')
 +
  if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
      if env['WITH_BF_RAYOPTIMIZATION']:
          cflags_raytrace = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS']
@@@ -231,20 -231,17 +231,16 @@@ else(
        set(TARGETDIR ${EXECUTABLE_OUTPUT_PATH})
  endif()
  
- # headers
- install(
-       FILES
-       ${CMAKE_SOURCE_DIR}/source/blender/makesrna/RNA_access.h
-       ${CMAKE_SOURCE_DIR}/source/blender/makesrna/RNA_types.h
-       ${CMAKE_BINARY_DIR}/source/blender/makesrna/intern/RNA_blender.h
-       ${CMAKE_BINARY_DIR}/source/blender/makesrna/intern/RNA_blender_cpp.h
-       ${CMAKE_SOURCE_DIR}/intern/guardedalloc/MEM_sys_types.h
-       ${CMAKE_SOURCE_DIR}/intern/guardedalloc/MEM_guardedalloc.h
-       ${CMAKE_SOURCE_DIR}/source/blender/blenloader/BLO_sys_types.h
-       ${CMAKE_SOURCE_DIR}/source/blender/makesdna/DNA_listBase.h
-       DESTINATION ${INCLUDE_OUTPUT_PATH})
--
- # install target
+ # -----------------------------------------------------------------------------
+ # Install Targets
+ set(BLENDER_TEXT_FILES
+       ${CMAKE_SOURCE_DIR}/release/text/GPL-license.txt
+       ${CMAKE_SOURCE_DIR}/release/text/Python-license.txt
+       ${CMAKE_SOURCE_DIR}/release/text/copyright.txt
+       ${CMAKE_SOURCE_DIR}/release/text/readme.html
+ )
  if(UNIX AND NOT APPLE)
  
        if(WITH_INSTALL_PORTABLE)
Simple merge