Merged changes in the trunk up to revision 54110.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sat, 26 Jan 2013 23:49:13 +0000 (23:49 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sat, 26 Jan 2013 23:49:13 +0000 (23:49 +0000)
Conflicts resolved:
source/blender/blenfont/SConscript
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/intern/rna_scene.c

74 files changed:
1  2 
CMakeLists.txt
SConstruct
build_files/scons/config/linux-config.py
build_files/scons/tools/btools.py
doc/python_api/sphinx_doc_gen.py
intern/cycles/blender/addon/ui.py
release/scripts/startup/bl_operators/__init__.py
release/scripts/startup/bl_ui/__init__.py
release/scripts/startup/bl_ui/properties_render.py
release/scripts/startup/bl_ui/space_view3d.py
source/blender/CMakeLists.txt
source/blender/SConscript
source/blender/blenfont/BLF_translation.h
source/blender/blenfont/CMakeLists.txt
source/blender/blenfont/SConscript
source/blender/blenkernel/BKE_main.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/SConscript
source/blender/blenkernel/intern/bpath.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenlib/CMakeLists.txt
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/bmesh/CMakeLists.txt
source/blender/bmesh/bmesh_class.h
source/blender/bmesh/intern/bmesh_construct.c
source/blender/bmesh/operators/bmo_similar.c
source/blender/editors/include/UI_resources.h
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/resources.c
source/blender/editors/mesh/CMakeLists.txt
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/mesh_intern.h
source/blender/editors/mesh/mesh_ops.c
source/blender/editors/space_view3d/drawobject.c
source/blender/makesdna/DNA_ID.h
source/blender/makesdna/DNA_material_types.h
source/blender/makesdna/DNA_mesh_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/RNA_enum_types.h
source/blender/makesrna/SConscript
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/SConscript
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_action.c
source/blender/makesrna/intern/rna_color.c
source/blender/makesrna/intern/rna_internal.h
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_mesh.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/python/bmesh/bmesh_py_types.c
source/blender/python/intern/CMakeLists.txt
source/blender/python/intern/bpy_app.c
source/blender/python/intern/bpy_app_build_options.c
source/blender/render/CMakeLists.txt
source/blender/render/intern/include/render_types.h
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/pipeline.c
source/blender/windowmanager/WM_types.h
source/blender/windowmanager/intern/wm_files.c
source/blenderplayer/bad_level_call_stubs/stubs.c
source/creator/CMakeLists.txt
source/creator/creator.c

diff --cc CMakeLists.txt
Simple merge
diff --cc SConstruct
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -43,6 -43,24 +43,7 @@@ class RENDER_MT_framerate_presets(Menu)
      draw = Menu.draw_preset
  
  
 -class RENDER_UL_renderlayers(UIList):
 -    def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
 -        # assert(isinstance(item, bpy.types.SceneRenderLayer)
 -        layer = item
 -        if self.layout_type in {'DEFAULT', 'COMPACT'}:
 -            layout.label(layer.name, icon_value=icon)
 -            layout.prop(layer, "use", text="", index=index)
 -        elif self.layout_type in {'GRID'}:
 -            layout.alignment = 'CENTER'
 -            layout.label("", icon_value=icon)
 -
 -#     else if (RNA_struct_is_a(itemptr->type, &RNA_SceneRenderLayer)) {
 -#             uiItemL(sub, name, icon);
 -#             uiBlockSetEmboss(block, UI_EMBOSS);
 -#             uiDefButR(block, OPTION, 0, "", 0, 0, UI_UNIT_X, UI_UNIT_Y, itemptr, "use", 0, 0, 0, 0, 0,  NULL);
 -#     }
 -
  class RenderButtonsPanel():
      bl_space_type = 'PROPERTIES'
      bl_region_type = 'WINDOW'
Simple merge
Simple merge
@@@ -43,7 -43,4 +43,7 @@@ if sys.platform == 'win32' or env['OURP
  if env['WITH_BF_INTERNATIONAL']:
      defs.append('WITH_INTERNATIONAL')
  
- env.BlenderLib ( 'bf_blenfont', sources, Split(incs), Split(defs), libtype=['core','player'], priority=[210,210] )
 +if env['WITH_BF_FREESTYLE']:
 +    defs.append('WITH_FREESTYLE')
 +
+ env.BlenderLib ( 'bf_blenfont', sources, Split(incs), defines=defs, libtype=['core','player'], priority=[210,210] )
Simple merge
Simple merge
  #include "BKE_image.h"
  #include "BKE_ipo.h"
  #include "BKE_key.h"
- #include "BKE_world.h"
- #include "BKE_font.h"
- #include "BKE_group.h"
+ #include "BKE_lamp.h"
  #include "BKE_lattice.h"
- #include "BKE_armature.h"
- #include "BKE_action.h"
+ #include "BKE_library.h"
+ #include "BKE_mesh.h"
+ #include "BKE_material.h"
+ #include "BKE_main.h"
+ #include "BKE_mball.h"
+ #include "BKE_movieclip.h"
+ #include "BKE_mask.h"
  #include "BKE_node.h"
- #include "BKE_brush.h"
- #include "BKE_idprop.h"
+ #include "BKE_object.h"
  #include "BKE_particle.h"
- #include "BKE_gpencil.h"
- #include "BKE_fcurve.h"
+ #include "BKE_packedFile.h"
  #include "BKE_speaker.h"
- #include "BKE_movieclip.h"
- #include "BKE_mask.h"
+ #include "BKE_sound.h"
+ #include "BKE_screen.h"
+ #include "BKE_scene.h"
+ #include "BKE_text.h"
+ #include "BKE_texture.h"
+ #include "BKE_world.h"
 +#ifdef WITH_FREESTYLE
 +#  include "BKE_linestyle.h"
 +#endif
  
  #include "RNA_access.h"
  
@@@ -1017,7 -1013,11 +1017,11 @@@ static void ccgDM_getFinalFace(DerivedM
                mf->flag = faceFlags[i].flag;
                mf->mat_nr = faceFlags[i].mat_nr;
        }
-       else mf->flag = ME_SMOOTH;
+       else {
+               mf->flag = ME_SMOOTH;
 -      }
++}
+       mf->edcode = 0;
  }
  
  /* Translate GridHidden into the ME_HIDE flag for MVerts. Assumes
@@@ -1232,11 -1232,7 +1236,11 @@@ static void ccgDM_copyFinalEdgeArray(De
  
                if (edgeFlags) {
                        if (edgeIdx != -1) {
-                               flags |= ((edgeFlags[index] & (ME_SEAM | ME_SHARP | ME_FREESTYLE_EDGE)) | ME_EDGEDRAW | ME_EDGERENDER);
 +#ifdef WITH_FREESTYLE
-                               flags |= ((edgeFlags[index] & (ME_SEAM | ME_SHARP)) | ME_EDGEDRAW | ME_EDGERENDER);
++                              ed_flag |= ((edgeFlags[index] & (ME_SEAM | ME_SHARP | ME_FREESTYLE_EDGE)) | ME_EDGEDRAW | ME_EDGERENDER);
 +#else
+                               ed_flag |= ((edgeFlags[index] & (ME_SEAM | ME_SHARP)) | ME_EDGEDRAW | ME_EDGERENDER);
 +#endif
                        }
                }
                else {
Simple merge
@@@ -8863,49 -8705,17 +8914,58 @@@ static void do_versions(FileData *fd, L
                }
        }
  
+       if (!MAIN_VERSION_ATLEAST(main, 265, 9)) {
+               Brush *br;
+               for (br = main->brush.first; br; br = br->id.next) {
+                       if (br->ob_mode & OB_MODE_TEXTURE_PAINT) {
+                               br->mtex.brush_map_mode = MTEX_MAP_MODE_TILED;
+                       }
+               }
+       }
        // if (main->versionfile < 265 || (main->versionfile == 265 && main->subversionfile < 7)) {
  
 +#ifdef WITH_FREESTYLE
 +      /* default values in Freestyle settings */
 +      {
 +              Scene *sce;
 +              SceneRenderLayer *srl;
 +              FreestyleLineStyle *linestyle;
 +
 +              for(sce = main->scene.first; sce; sce = sce->id.next) {
 +                      if (sce->r.line_thickness_mode == 0) {
 +                              sce->r.line_thickness_mode = R_LINE_THICKNESS_ABSOLUTE;
 +                              sce->r.unit_line_thickness = 1.0f;
 +                      }
 +                      for(srl = sce->r.layers.first; srl; srl = srl->next) {
 +                              if (srl->freestyleConfig.mode == 0)
 +                                      srl->freestyleConfig.mode = FREESTYLE_CONTROL_EDITOR_MODE;
 +                              if (srl->freestyleConfig.raycasting_algorithm == FREESTYLE_ALGO_CULLED_ADAPTIVE_CUMULATIVE ||
 +                                  srl->freestyleConfig.raycasting_algorithm == FREESTYLE_ALGO_CULLED_ADAPTIVE_TRADITIONAL) {
 +                                      srl->freestyleConfig.raycasting_algorithm = 0; /* deprecated */
 +                                      srl->freestyleConfig.flags |= FREESTYLE_CULLING;
 +                              }
 +                      }
 +              }
 +              for(linestyle = main->linestyle.first; linestyle; linestyle = linestyle->id.next) {
 +#if 1
 +                      /* disable the Misc panel for now */
 +                      if (linestyle->panel == LS_PANEL_MISC) {
 +                              linestyle->panel = LS_PANEL_STROKES;
 +                      }
 +#endif
 +                      if (linestyle->thickness_position == 0) {
 +                              linestyle->thickness_position = LS_THICKNESS_CENTER;
 +                              linestyle->thickness_ratio = 0.5f;
 +                      }
 +                      if (linestyle->chaining == 0)
 +                              linestyle->chaining = LS_CHAINING_PLAIN;
 +                      if (linestyle->rounds == 0)
 +                              linestyle->rounds = 3;
 +              }
 +      }
 +#endif
 +
        /* WATCH IT!!!: pointers from libdata have not been converted yet here! */
        /* WATCH IT 2!: Userdef struct init has to be in editors/interface/resources.c! */
  
Simple merge
Simple merge
@@@ -242,17 -242,9 +242,17 @@@ void bmo_similar_faces_exec(BMesh *bm, 
                                                delta_fl = f_ext[i].perim - f_ext[indices[idx]].perim;
                                                if (bm_sel_similar_cmp_fl(delta_fl, thresh, compare)) {
                                                        BMO_elem_flag_enable(bm, fm, FACE_MARK);
-                                                       cont = FALSE;
+                                                       cont = false;
                                                }
                                                break;
 +#ifdef WITH_FREESTYLE
 +                                      case SIMFACE_FREESTYLE:
 +                                              if (BM_elem_flag_test(fm, BM_ELEM_FREESTYLE) == BM_elem_flag_test(fs, BM_ELEM_FREESTYLE)) {
 +                                                      BMO_elem_flag_enable(bm, fm, FACE_MARK);
 +                                                      cont = FALSE;
 +                                              }
 +                                              break;
 +#endif
                                        default:
                                                BLI_assert(0);
                                }
@@@ -468,17 -460,9 +468,17 @@@ void bmo_similar_edges_exec(BMesh *bm, 
                                        case SIMEDGE_SHARP:
                                                if (BM_elem_flag_test(e, BM_ELEM_SMOOTH) == BM_elem_flag_test(es, BM_ELEM_SMOOTH)) {
                                                        BMO_elem_flag_enable(bm, e, EDGE_MARK);
-                                                       cont = FALSE;
+                                                       cont = false;
                                                }
                                                break;
 +#ifdef WITH_FREESTYLE
 +                                      case SIMEDGE_FREESTYLE:
 +                                              if (BM_elem_flag_test(e, BM_ELEM_FREESTYLE) == BM_elem_flag_test(es, BM_ELEM_FREESTYLE)) {
 +                                                      BMO_elem_flag_enable(bm, e, EDGE_MARK);
 +                                                      cont = FALSE;
 +                                              }
 +                                              break;
 +#endif
                                        default:
                                                BLI_assert(0);
                                }
Simple merge
@@@ -133,10 -133,7 +133,11 @@@ static const char *includefiles[] = 
        "DNA_tracking_types.h",
        "DNA_dynamicpaint_types.h",
        "DNA_mask_types.h",
+       "DNA_rigidbody_types.h",
 +/* #ifdef WITH_FREESTYLE */
 +      "DNA_freestyle_types.h",
 +      "DNA_linestyle_types.h",
 +/* #endif */
  
        /* empty string to indicate end of includefiles */
        ""
@@@ -1266,8 -1263,5 +1267,9 @@@ int main(int argc, char **argv
  #include "DNA_tracking_types.h"
  #include "DNA_dynamicpaint_types.h"
  #include "DNA_mask_types.h"
+ #include "DNA_rigidbody_types.h"
 +/* #ifdef WITH_FREESTYLE */
 +#include "DNA_freestyle_types.h"
 +#include "DNA_linestyle_types.h"
 +/* #endif */
  /* end of list */
Simple merge
Simple merge
@@@ -1456,52 -1455,11 +1462,57 @@@ static void rna_SceneSequencer_update(M
        BKE_sequencer_preprocessed_cache_cleanup();
  }
  
+ static char *rna_ToolSettings_path(PointerRNA *ptr)
+ {
+       return BLI_strdup("tool_settings");
+ }
 +#ifdef WITH_FREESTYLE
 +static PointerRNA rna_FreestyleLineSet_linestyle_get(PointerRNA *ptr)
 +{
 +      FreestyleLineSet *lineset = (FreestyleLineSet *)ptr->data;
 +
 +      return rna_pointer_inherit_refine(ptr, &RNA_FreestyleLineStyle, lineset->linestyle);
 +}
 +
 +static void rna_FreestyleLineSet_linestyle_set(PointerRNA *ptr, PointerRNA value)
 +{
 +      FreestyleLineSet *lineset = (FreestyleLineSet*)ptr->data;
 +
 +      lineset->linestyle->id.us--;
 +      lineset->linestyle = (FreestyleLineStyle *)value.data;
 +      lineset->linestyle->id.us++;
 +}
 +
 +static PointerRNA rna_FreestyleSettings_active_lineset_get(PointerRNA *ptr)
 +{
 +      FreestyleConfig *config = (FreestyleConfig *)ptr->data;
 +      FreestyleLineSet *lineset = FRS_get_active_lineset(config);
 +      return rna_pointer_inherit_refine(ptr, &RNA_FreestyleLineSet, lineset);
 +}
 +
 +static void rna_FreestyleSettings_active_lineset_index_range(PointerRNA *ptr, int *min, int *max,
 +                                                             int *softmin, int *softmax)
 +{
 +      FreestyleConfig *config = (FreestyleConfig *)ptr->data;
 +
 +      *min = 0;
 +      *max = max_ii(0, BLI_countlist(&config->linesets) - 1);
 +}
 +
 +static int rna_FreestyleSettings_active_lineset_index_get(PointerRNA *ptr)
 +{
 +      FreestyleConfig *config = (FreestyleConfig *)ptr->data;
 +      return FRS_get_active_lineset_index(config);
 +}
 +
 +static void rna_FreestyleSettings_active_lineset_index_set(PointerRNA *ptr, int value)
 +{
 +      FreestyleConfig *config = (FreestyleConfig *)ptr->data;
 +      FRS_set_active_lineset_index(config, value);
 +}
 +#endif
 +
  #else
  
  static void rna_def_transform_orientation(BlenderRNA *brna)
Simple merge
@@@ -533,16 -529,8 +536,17 @@@ void macro_wrapper(struct wmOperatorTyp
  int pyrna_id_FromPyObject(struct PyObject *obj, struct ID **id) { return 0; }
  struct PyObject *pyrna_id_CreatePyObject(struct ID *id) {return NULL; }
  void BPY_context_update(struct bContext *C) {};
+ const char *BPY_app_translations_py_pgettext(const char *msgctxt, const char *msgid) { return msgid; }
  
 +#ifdef WITH_FREESTYLE
 +/* Freestyle */
 +void FRS_add_freestyle_config(struct SceneRenderLayer* srl) {}
 +void FRS_free_freestyle_config(struct SceneRenderLayer* srl) {}
 +struct FreestyleLineSet *FRS_get_active_lineset(struct FreestyleConfig *config) { return NULL; }
 +short FRS_get_active_lineset_index(struct FreestyleConfig *config) { return 0; }
 +void FRS_set_active_lineset_index(struct FreestyleConfig *config, short index) {}
 +void FRS_unlink_target_object(struct FreestyleConfig *config, struct Object *ob) {}
 +#endif
  /* intern/dualcon */
  struct DualConMesh;
  struct DualConMesh *dualcon(const struct DualConMesh *input_mesh,
Simple merge
Simple merge