svn merge -r39834:40222 https://svn.blender.org/svnroot/bf-blender/trunk/blender
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 15 Sep 2011 13:02:37 +0000 (13:02 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 15 Sep 2011 13:02:37 +0000 (13:02 +0000)
80 files changed:
1  2 
SConstruct
intern/audaspace/intern/AUD_JOSResampleReader.cpp
intern/audaspace/intern/AUD_SequencerHandle.cpp
intern/audaspace/intern/AUD_SequencerHandle.h
release/scripts/startup/bl_operators/animsys_update.py
release/scripts/startup/bl_ui/properties_data_armature.py
release/scripts/startup/bl_ui/properties_data_modifier.py
release/scripts/startup/bl_ui/properties_game.py
release/scripts/startup/bl_ui/properties_physics_fluid.py
release/scripts/startup/bl_ui/space_userpref.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
source/blender/blenfont/intern/blf_lang.c
source/blender/editors/animation/anim_ops.c
source/blender/editors/animation/keyframing.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/editarmature_sketch.c
source/blender/editors/armature/poseSlide.c
source/blender/editors/armature/poselib.c
source/blender/editors/armature/poseobject.c
source/blender/editors/curve/editcurve.c
source/blender/editors/gpencil/CMakeLists.txt
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/include/UI_interface.h
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_panel.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/mesh/editmesh.c
source/blender/editors/mesh/editmesh_add.c
source/blender/editors/mesh/editmesh_mods.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/object/CMakeLists.txt
source/blender/editors/object/SConscript
source/blender/editors/object/object_add.c
source/blender/editors/object/object_constraint.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_modifier.c
source/blender/editors/object/object_ops.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_select.c
source/blender/editors/render/render_shading.c
source/blender/editors/screen/area.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/sound/sound_ops.c
source/blender/editors/space_file/file_draw.c
source/blender/editors/space_graph/graph_ops.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_nla/nla_select.c
source/blender/editors/space_node/node_buttons.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_ops.c
source/blender/editors/space_node/node_select.c
source/blender/editors/space_node/node_state.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_orientations.c
source/blender/editors/util/SConscript
source/blender/editors/util/undo.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_texture.c
source/blender/makesrna/intern/rna_texture_api.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_wm.c
source/blender/makesrna/intern/rna_world.c
source/blender/python/mathutils/mathutils_geometry.c
source/blender/windowmanager/intern/wm_operators.c
source/creator/CMakeLists.txt
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp

diff --cc SConstruct
Simple merge
@@@ -74,8 -74,9 +74,9 @@@ class DATA_PT_skeleton(ArmatureButtonsP
          if context.scene.render.engine == "BLENDER_GAME":
              layout.row().prop(arm, "vert_deformer", expand=True)
  
  class DATA_PT_display(ArmatureButtonsPanel, Panel):
 -    bl_label = "Display"
 +    bl_label = _("Display")
  
      def draw(self, context):
          layout = self.layout
@@@ -376,9 -376,13 +376,13 @@@ class DATA_PT_modifiers(ModifierButtons
  
          if md.use_mirror_merge == True:
              col.prop(md, "merge_threshold")
 -        col.label(text="Mirror Object:")
 +        col.label(text=_("Mirror Object:"))
          col.prop(md, "mirror_object", text="")
  
+     def NAVMESH(self, layout, ob, md):
+         layout.operator("object.assign_navpolygon")
+         layout.operator("object.assign_new_navpolygon")
      def MULTIRES(self, layout, ob, md):
          layout.row().prop(md, "subdivision_type", expand=True)
  
          col.prop(md, "show_only_control_edges")
  
      def SURFACE(self, layout, ob, md):
 -        layout.label(text="Settings can be found inside the Physics context")
 +        layout.label(text=_("Settings can be found inside the Physics context"))
  
      def UV_PROJECT(self, layout, ob, md):
-         if ob.type == 'MESH':
-             split = layout.split()
+         split = layout.split()
  
-             col = split.column()
-             col.label(text=_("Image:"))
-             col.prop(md, "image", text="")
+         col = split.column()
 -        col.label(text="Image:")
++        col.label(text=_("Image:"))
+         col.prop(md, "image", text="")
  
-             col = split.column()
-             col.label(text=_("UV Layer:"))
-             col.prop_search(md, "uv_layer", ob.data, "uv_textures", text="")
+         col = split.column()
 -        col.label(text="UV Layer:")
++        col.label(text=_("UV Layer:"))
+         col.prop_search(md, "uv_layer", ob.data, "uv_textures", text="")
  
-             split = layout.split()
-             col = split.column()
-             col.prop(md, "use_image_override")
-             col.prop(md, "projector_count", text=_("Projectors"))
-             for proj in md.projectors:
-                 col.prop(proj, "object", text="")
+         split = layout.split()
+         col = split.column()
+         col.prop(md, "use_image_override")
 -        col.prop(md, "projector_count", text="Projectors")
++        col.prop(md, "projector_count", text=_("Projectors"))
+         for proj in md.projectors:
+             col.prop(proj, "object", text="")
  
-             col = split.column()
-             sub = col.column(align=True)
-             sub.prop(md, "aspect_x", text=_("Aspect X"))
-             sub.prop(md, "aspect_y", text=_("Aspect Y"))
+         col = split.column()
+         sub = col.column(align=True)
 -        sub.prop(md, "aspect_x", text="Aspect X")
 -        sub.prop(md, "aspect_y", text="Aspect Y")
++        sub.prop(md, "aspect_x", text=_("Aspect X"))
++        sub.prop(md, "aspect_y", text=_("Aspect Y"))
  
-             sub = col.column(align=True)
-             sub.prop(md, "scale_x", text=_("Scale X"))
-             sub.prop(md, "scale_y", text=_("Scale Y"))
+         sub = col.column(align=True)
 -        sub.prop(md, "scale_x", text="Scale X")
 -        sub.prop(md, "scale_y", text="Scale Y")
++        sub.prop(md, "scale_x", text=_("Scale X"))
++        sub.prop(md, "scale_y", text=_("Scale Y"))
  
      def WARP(self, layout, ob, md):
          use_falloff = (md.falloff_type != 'NONE')
@@@ -189,13 -189,40 +189,40 @@@ class PHYSICS_PT_game_collision_bounds(
          game = context.active_object.game
  
          layout.active = game.use_collision_bounds
 -        layout.prop(game, "collision_bounds_type", text="Bounds")
 +        layout.prop(game, "collision_bounds_type", text=_("Bounds"))
  
          row = layout.row()
 -        row.prop(game, "collision_margin", text="Margin", slider=True)
 -        row.prop(game, "use_collision_compound", text="Compound")
 +        row.prop(game, "collision_margin", text=_("Margin"), slider=True)
 +        row.prop(game, "use_collision_compound", text=_("Compound"))
  
  
+ class PHYSICS_PT_game_obstacles(PhysicsButtonsPanel, Panel):
+     bl_label = "Create Obstacle"
+     COMPAT_ENGINES = {'BLENDER_GAME'}
+     @classmethod
+     def poll(cls, context):
+         game = context.object.game
+         rd = context.scene.render
+         return (game.physics_type in ('DYNAMIC', 'RIGID_BODY', 'SENSOR', 'SOFT_BODY', 'STATIC'))  and (rd.engine in cls.COMPAT_ENGINES)
+     def draw_header(self, context):
+         game = context.active_object.game
+         self.layout.prop(game, "create_obstacle", text="")
+     def draw(self, context):
+         layout = self.layout
+         game = context.active_object.game
+         layout.active = game.create_obstacle
+         row = layout.row()
+         row.prop(game, "obstacle_radius", text="Radius")
+         row.label()
  class RenderButtonsPanel():
      bl_space_type = 'PROPERTIES'
      bl_region_type = 'WINDOW'
@@@ -357,13 -384,76 +384,76 @@@ class RENDER_PT_game_display(RenderButt
  
          gs = context.scene.game_settings
          flow = layout.column_flow()
 -        flow.prop(gs, "show_debug_properties", text="Debug Properties")
 -        flow.prop(gs, "show_framerate_profile", text="Framerate and Profile")
 -        flow.prop(gs, "show_physics_visualization", text="Physics Visualization")
 +        flow.prop(gs, "show_debug_properties", text=_("Debug Properties"))
 +        flow.prop(gs, "show_framerate_profile", text=_("Framerate and Profile"))
 +        flow.prop(gs, "show_physics_visualization", text=_("Physics Visualization"))
          flow.prop(gs, "use_deprecation_warnings")
 -        flow.prop(gs, "show_mouse", text="Mouse Cursor")
 +        flow.prop(gs, "show_mouse", text=_("Mouse Cursor"))
  
  
+ class SceneButtonsPanel():
+     bl_space_type = 'PROPERTIES'
+     bl_region_type = 'WINDOW'
+     bl_context = "scene"
+ class SCENE_PT_game_navmesh(SceneButtonsPanel, bpy.types.Panel):
+     bl_label = "Navigation mesh"
+     bl_default_closed = True
+     COMPAT_ENGINES = {'BLENDER_GAME'}
+     @classmethod
+     def poll(cls, context):
+         scene = context.scene
+         return (scene and scene.render.engine in cls.COMPAT_ENGINES)
+     def draw(self, context):
+         layout = self.layout
+         rd = context.scene.game_settings.recast_data
+         layout.operator("object.create_navmesh", text='Build navigation mesh')
+         col = layout.column()
+         col.label(text="Rasterization:")
+         row = col.row()
+         row.prop(rd, "cell_size")
+         row.prop(rd, "cell_height")
+         col = layout.column()
+         col.label(text="Agent:")
+         split = col.split()
+         col = split.column()
+         col.prop(rd, "agent_height", text="Height")
+         col.prop(rd, "agent_radius", text="Radius")
+         col = split.column()
+         col.prop(rd, "max_slope")
+         col.prop(rd, "max_climb")
+         col = layout.column()
+         col.label(text="Region:")
+         row = col.row()
+         row.prop(rd, "region_min_size")
+         row.prop(rd, "region_merge_size")
+         col = layout.column()
+         col.label(text="Polygonization:")
+         split = col.split()
+         col = split.column()
+         col.prop(rd, "edge_max_len")
+         col.prop(rd, "edge_max_error")
+         split.prop(rd, "verts_per_poly")
+         col = layout.column()
+         col.label(text="Detail Mesh:")
+         row = col.row()
+         row.prop(rd, "sample_dist")
+         row.prop(rd, "sample_max_error")
  
  class WorldButtonsPanel():
      bl_space_type = 'PROPERTIES'
@@@ -481,12 -571,32 +571,32 @@@ class WORLD_PT_game_physics(WorldButton
              split = layout.split()
  
              col = split.column()
 -            col.label(text="Physics Steps:")
 -            col.prop(gs, "fps", text="FPS")
 +            col.label(text=_("Physics Steps:"))
 +            col.prop(gs, "fps", text=_("FPS"))
  
              col = split.column()
 -            col.label(text="Logic Steps:")
 -            col.prop(gs, "logic_step_max", text="Max")
 +            col.label(text=_("Logic Steps:"))
 +            col.prop(gs, "logic_step_max", text=_("Max"))
  
+ class WORLD_PT_game_physics_obstacles(WorldButtonsPanel, Panel):
+     bl_label = "Obstacle simulation"
+     COMPAT_ENGINES = {'BLENDER_GAME'}
+     @classmethod
+     def poll(cls, context):
+         scene = context.scene
+         return (scene.world and scene.render.engine in cls.COMPAT_ENGINES)
+     def draw(self, context):
+         layout = self.layout
+         gs = context.scene.game_settings
+         layout.prop(gs, "obstacle_simulation", text="Type")
+         if gs.obstacle_simulation != 'NONE':
+             layout.prop(gs, "level_height")
+             layout.prop(gs, "show_obstacle_simulation")
  if __name__ == "__main__":  # only for live edit.
      bpy.utils.register_module(__name__)
@@@ -46,7 -46,7 +46,7 @@@ class PHYSICS_PT_fluid(PhysicButtonsPan
  
              row = layout.row()
              if fluid is None:
-                 row.label(_("built without fluids"))
 -                row.label("Built without fluids")
++                row.label(_("Built without fluids"))
                  return
  
              row.prop(fluid, "type")
@@@ -50,12 -49,15 +50,15 @@@ def draw_keyframing_tools(context, layo
  def draw_gpencil_tools(context, layout):
      col = layout.column(align=True)
  
 -    col.label(text="Grease Pencil:")
 +    col.label(text=_("Grease Pencil:"))
  
      row = col.row()
 -    row.operator("gpencil.draw", text="Draw").mode = 'DRAW'
 -    row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT'
 +    row.operator("gpencil.draw", text=_("Draw")).mode = 'DRAW'
 +    row.operator("gpencil.draw", text=_("Line")).mode = 'DRAW_STRAIGHT'
+     row = col.row()
 -    row.operator("gpencil.draw", text="Poly").mode = 'DRAW_POLY'
 -    row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
++    row.operator("gpencil.draw", text=_("Poly")).mode = 'DRAW_POLY'
 +    row.operator("gpencil.draw", text=_("Erase")).mode = 'ERASER'
  
      row = col.row()
      row.prop(context.tool_settings, "use_grease_pencil_sessions")
@@@ -66,34 -65,6 +66,34 @@@ static char global_messagepath[1024]
  static char global_language[32];
  static char global_encoding_name[32];
  
- static char *locales[] = {
 +/* map from the rna_userdef.c:rna_def_userdef_system(BlenderRNA *brna):language_items */
++static const char *locales[] = {
 +      "", "",
 +      "english", "en_US",
 +      "japanese", "ja_JP",
 +      "dutch", "nl_NL",
 +      "italian", "it_IT",
 +      "german", "de_DE",
 +      "finnish", "fi_FI",
 +      "swedish", "sv_SE",
 +      "french", "fr_FR",
 +      "spanish", "es_ES",
 +      "catalan", "ca_AD",
 +      "czech", "cs_CZ",
 +      "ptb", "pt_BR",
 +      "chs", "zh_CN",
 +      "cht", "zh_TW",
 +      "russian", "ru_RU",
 +      "croatian", "hr_HR",
 +      "serbian", "sr_RS",
 +      "ukrainian", "uk_UA",
 +      "polish", "pl_PL",
 +      "romanian", "ro_RO",
 +      "arabic", "ar_EG",
 +      "bulgarian", "bg_BG",
 +      "greek", "el_GR",
 +      "korean" "ko_KR",
 +};
  
  void BLF_lang_init(void)
  {
  /* XXX WARNING!!! IN osx somehow the previous function call jumps in this one??? (ton, ppc) */
  void BLF_lang_set(const char *str)
  {
 -      if(str==NULL) {
 -              return;
 +      char *locreturn;
-       char *short_locale;
++      const char *short_locale;
 +#if defined (_WIN32)
 +      char *long_locale = locales[ 2 * U.language];
 +#endif
 +
 +      if(str)
 +              short_locale = str;
 +      else
 +              short_locale = locales[ 2 * U.language + 1];
 +
 +#if defined (_WIN32)
 +      if(short_locale)
 +      {
 +              char *envStr;
 +              if( U.language==0 )/* use system setting */
 +                      envStr = BLI_sprintfN( "LANG=%s", getenv("LANG") );
 +              else
 +                      envStr = BLI_sprintfN( "LANG=%s", short_locale );
 +              gettext_putenv(envStr);
 +              MEM_freeN(envStr);
 +      }
 +      locreturn= setlocale(LC_ALL, long_locale);
 +      if (locreturn == NULL) {
 +              printf("Could not change locale to %s\n", long_locale);
        }
 -      else {
 -      
 -#if defined (_WIN32) || defined(__APPLE__)
 -              BLI_setenv("LANG", str);
  #else
 -              char *locreturn= setlocale(LC_ALL, str);
 -              if (locreturn == NULL) {
 -                      char *lang= BLI_sprintfN("%s.UTF-8", str);
 +      if(short_locale)
 +      {
 +              BLI_setenv("LANG", short_locale);
 +              BLI_setenv("LANGUAGE", short_locale);
 +      }
  
 -                      locreturn= setlocale(LC_ALL, lang);
 -                      if (locreturn == NULL) {
 -                              printf("could not change language to %s nor %s\n", str, lang);
 -                      }
 +      locreturn= setlocale(LC_ALL, short_locale);
 +      if (locreturn == NULL) {
 +              char *short_locale_utf8 = BLI_sprintfN("%s.UTF-8", short_locale);
  
 -                      MEM_freeN(lang);
 +              locreturn= setlocale(LC_ALL, short_locale_utf8);
 +              if (locreturn == NULL) {
 +                      printf("Could not change locale to %s nor %s\n", short_locale, short_locale_utf8);
                }
  
 -              setlocale(LC_NUMERIC, "C");
 +              MEM_freeN(short_locale_utf8);
 +      }
  #endif
 -              textdomain(DOMAIN_NAME);
 -              bindtextdomain(DOMAIN_NAME, global_messagepath);
 -              /* bind_textdomain_codeset(DOMAIN_NAME, global_encoding_name); */
 -              BLI_strncpy(global_language, str, sizeof(global_language));
 -              
 +      else
 +      {
 +              printf("Change locale to %s\n", locreturn );
 +              BLI_strncpy(global_language, locreturn, sizeof(global_language));
        }
 +      setlocale(LC_NUMERIC, "C");
 +
 +      textdomain(DOMAIN_NAME);
 +      bindtextdomain(DOMAIN_NAME, global_messagepath);
 +      /* bind_textdomain_codeset(DOMAIN_NAME, global_encoding_name); */       
  }
  
  void BLF_lang_encoding(const char *str)
@@@ -1778,9 -1876,10 +1878,10 @@@ static int gpencil_draw_modal (bContex
  /* ------------------------------- */
  
  static EnumPropertyItem prop_gpencil_drawmodes[] = {
 -      {GP_PAINTMODE_DRAW, "DRAW", 0, "Draw Freehand", ""},
 -      {GP_PAINTMODE_DRAW_STRAIGHT, "DRAW_STRAIGHT", 0, "Draw Straight Lines", ""},
 -      {GP_PAINTMODE_DRAW_POLY, "DRAW_POLY", 0, "Dtaw Poly Line", ""},
 -      {GP_PAINTMODE_ERASER, "ERASER", 0, "Eraser", ""},
 +      {GP_PAINTMODE_DRAW, "DRAW", 0, N_("Draw Freehand"), ""},
 +      {GP_PAINTMODE_DRAW_STRAIGHT, "DRAW_STRAIGHT", 0, N_("Draw Straight Lines"), ""},
++      {GP_PAINTMODE_DRAW_POLY, "DRAW_POLY", 0, N_("Dtaw Poly Line"), ""},
 +      {GP_PAINTMODE_ERASER, "ERASER", 0, N_("Eraser"), ""},
        {0, NULL, 0, NULL, NULL}
  };
  
@@@ -1488,9 -1486,9 +1488,9 @@@ void MESH_OT_primitive_circle_add(wmOpe
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        /* props */
-       RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, _("Vertices"), "", 3, 500);
 -      RNA_def_int(ot->srna, "vertices", 32, 3, INT_MAX, "Vertices", "", 3, 500);
 -      RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00);
++      RNA_def_int(ot->srna, "vertices", 32, 3, INT_MAX, _("Vertices"), "", 3, 500);
 +      RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, _("Radius"), "", 0.001, 100.00);
-       RNA_def_boolean(ot->srna, "fill", 0, _("Fill"), "");
+       RNA_def_boolean(ot->srna, "fill", 0, "Fill", "");
  
        ED_object_add_generic_props(ot, TRUE);
  }
@@@ -1529,10 -1527,10 +1529,10 @@@ void MESH_OT_primitive_cylinder_add(wmO
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        /* props */
-       RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, _("Vertices"), "", 2, 500);
 -      RNA_def_int(ot->srna, "vertices", 32, 2, INT_MAX, "Vertices", "", 2, 500);
 -      RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00);
 -      RNA_def_float(ot->srna, "depth", 2.0f, 0.0, FLT_MAX, "Depth", "", 0.001, 100.00);
 -      RNA_def_boolean(ot->srna, "cap_ends", 1, "Cap Ends", "");
++      RNA_def_int(ot->srna, "vertices", 32, 2, INT_MAX, _("Vertices"), "", 2, 500);
 +      RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, _("Radius"), "", 0.001, 100.00);
 +      RNA_def_float(ot->srna, "depth", 2.0f, 0.0, FLT_MAX, _("Depth"), "", 0.001, 100.00);
 +      RNA_def_boolean(ot->srna, "cap_ends", 1, _("Cap Ends"), "");
  
        ED_object_add_generic_props(ot, TRUE);
  }
@@@ -1570,10 -1568,10 +1570,10 @@@ void MESH_OT_primitive_cone_add(wmOpera
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        /* props */
-       RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, _("Vertices"), "", 2, 500);
 -      RNA_def_int(ot->srna, "vertices", 32, 2, INT_MAX, "Vertices", "", 2, 500);
 -      RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00);
 -      RNA_def_float(ot->srna, "depth", 2.0f, 0.0, FLT_MAX, "Depth", "", 0.001, 100.00);
 -      RNA_def_boolean(ot->srna, "cap_end", 1, "Cap End", "");
++      RNA_def_int(ot->srna, "vertices", 32, 2, INT_MAX, _("Vertices"), "", 2, 500);
 +      RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, _("Radius"), "", 0.001, 100.00);
 +      RNA_def_float(ot->srna, "depth", 2.0f, 0.0, FLT_MAX, _("Depth"), "", 0.001, 100.00);
 +      RNA_def_boolean(ot->srna, "cap_end", 1, _("Cap End"), "");
  
        ED_object_add_generic_props(ot, TRUE);
  }
@@@ -1611,9 -1609,9 +1611,9 @@@ void MESH_OT_primitive_grid_add(wmOpera
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        /* props */
-       RNA_def_int(ot->srna, "x_subdivisions", 10, INT_MIN, INT_MAX, _("X Subdivisions"), "", 3, 1000);
-       RNA_def_int(ot->srna, "y_subdivisions", 10, INT_MIN, INT_MAX, _("Y Subdivisions"), "", 3, 1000);
 -      RNA_def_int(ot->srna, "x_subdivisions", 10, 3, INT_MAX, "X Subdivisions", "", 3, 1000);
 -      RNA_def_int(ot->srna, "y_subdivisions", 10, 3, INT_MAX, "Y Subdivisions", "", 3, 1000);
 -      RNA_def_float(ot->srna, "size", 1.0f, 0.0, FLT_MAX, "Size", "", 0.001, FLT_MAX);
++      RNA_def_int(ot->srna, "x_subdivisions", 10, 3, INT_MAX, _("X Subdivisions"), "", 3, 1000);
++      RNA_def_int(ot->srna, "y_subdivisions", 10, 3, INT_MAX, _("Y Subdivisions"), "", 3, 1000);
 +      RNA_def_float(ot->srna, "size", 1.0f, 0.0, FLT_MAX, _("Size"), "", 0.001, FLT_MAX);
  
        ED_object_add_generic_props(ot, TRUE);
  }
@@@ -1684,9 -1682,9 +1684,9 @@@ void MESH_OT_primitive_uv_sphere_add(wm
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        /* props */
-       RNA_def_int(ot->srna, "segments", 32, INT_MIN, INT_MAX, _("Segments"), "", 3, 500);
-       RNA_def_int(ot->srna, "ring_count", 16, INT_MIN, INT_MAX, _("Rings"), "", 3, 500);
 -      RNA_def_int(ot->srna, "segments", 32, 3, INT_MAX, "Segments", "", 3, 500);
 -      RNA_def_int(ot->srna, "ring_count", 16, 3, INT_MAX, "Rings", "", 3, 500);
 -      RNA_def_float(ot->srna, "size", 1.0f, 0.0, FLT_MAX, "Size", "", 0.001, 100.00);
++      RNA_def_int(ot->srna, "segments", 32, 3, INT_MAX, _("Segments"), "", 3, 500);
++      RNA_def_int(ot->srna, "ring_count", 16, 3, INT_MAX, _("Rings"), "", 3, 500);
 +      RNA_def_float(ot->srna, "size", 1.0f, 0.0, FLT_MAX, _("Size"), "", 0.001, 100.00);
  
        ED_object_add_generic_props(ot, TRUE);
  }
@@@ -1723,8 -1721,8 +1723,8 @@@ void MESH_OT_primitive_ico_sphere_add(w
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        /* props */
-       RNA_def_int(ot->srna, "subdivisions", 2, 0, INT_MAX, _("Subdivisions"), "", 0, 8);
 -      RNA_def_int(ot->srna, "subdivisions", 2, 1, INT_MAX, "Subdivisions", "", 1, 8);
 -      RNA_def_float(ot->srna, "size", 1.0f, 0.0f, FLT_MAX, "Size", "", 0.001f, 100.00);
++      RNA_def_int(ot->srna, "subdivisions", 2, 1, INT_MAX, _("Subdivisions"), "", 1, 8);
 +      RNA_def_float(ot->srna, "size", 1.0f, 0.0f, FLT_MAX, _("Size"), "", 0.001f, 100.00);
  
        ED_object_add_generic_props(ot, TRUE);
  }
@@@ -1,9 -1,9 +1,9 @@@
  #!/usr/bin/python
  Import ('env')
  
- sources = env.Glob('*.c')
+ sources = env.Glob('*.c') + env.Glob('*.cpp')
  
 -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
 +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
  incs += ' ../../windowmanager #/intern/guardedalloc ../../blenloader'
  incs += ' ../../makesrna ../../python ../../ikplugin'
  incs += ' ../../render/extern/include ../../gpu' # for object_bake.c
  #include "BLI_listbase.h"
  #include "BLI_utildefines.h"
  
 +#include "BLF_api.h"
 +
  #include "BKE_animsys.h"
  #include "BKE_context.h"
+ #include "BKE_curve.h"
  #include "BKE_depsgraph.h"
  #include "BKE_font.h"
  #include "BKE_global.h"
Simple merge
  #include "BLI_editVert.h"
  #include "BLI_rand.h"
  
 +#include "BLF_api.h"
 +
  #include "DNA_meshdata_types.h"
+ #include "DNA_node_types.h"
  #include "DNA_object_types.h"
  #include "DNA_scene_types.h"
  #include "DNA_brush_types.h"
  #include "BLI_blenlib.h"
  #include "BLI_utildefines.h"
  
 +#include "BLF_api.h"
 +
  #include "BKE_context.h"
+ #include "BKE_main.h"
  #include "BKE_sound.h"
  
  #include "UI_view2d.h"
@@@ -286,14 -301,15 +301,15 @@@ static void node_update_basis(const bCo
                node->butr.ymax= 0;
                
                RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr);
+               
                layout= uiBlockLayout(node->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL,
-                       node->locx+NODE_DYS, dy, node->butr.xmax, NODE_DY, UI_GetStyle());
 -                                                        locx+NODE_DYS, dy, node->butr.xmax, NODE_DY, U.uistyles.first);
++                                                        locx+NODE_DYS, dy, node->butr.xmax, NODE_DY, UI_GetStyle());
+               
                node->typeinfo->uifunc(layout, (bContext *)C, &ptr);
+               
                uiBlockEndAlign(node->block);
                uiBlockLayoutResolve(node->block, NULL, &buty);
+               
                dy= buty - NODE_DYS/2;
        }
  
  #include "node_intern.h"
  
  static EnumPropertyItem socket_in_out_items[] = {
-       { SOCK_IN, "IN", 0, N_("In"), "" },
-       { SOCK_OUT, "OUT", 0, N_("Out"), "" },
-       { 0, NULL, 0, NULL, NULL}
 -      { SOCK_IN, "SOCK_IN", 0, "Input", "" },
 -      { SOCK_OUT, "SOCK_OUT", 0, "Output", "" },
++      { SOCK_IN, "SOCK_IN", 0, N_("Input"), "" },
++      { SOCK_OUT, "SOCK_OUT", 0, N_("Output"), "" },
+       { 0, NULL, 0, NULL, NULL },
  };
  
  /* ***************** composite job manager ********************** */
@@@ -716,9 -941,9 +943,9 @@@ void NODE_OT_group_socket_add(wmOperato
        /* flags */
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
        
 -      RNA_def_enum(ot->srna, "in_out", socket_in_out_items, SOCK_IN, "Socket Type", "Input or Output");
 -      RNA_def_string(ot->srna, "name", "", 32, "Name", "Group socket name");
 -      RNA_def_enum(ot->srna, "type", node_socket_type_items, SOCK_FLOAT, "Type", "Type of the group socket");
 +      RNA_def_enum(ot->srna, "in_out", socket_in_out_items, SOCK_IN, _("Socket Type"), _("Input or Output"));
 +      RNA_def_string(ot->srna, "name", "", 32, _("Name"), _("Group socket name"));
-       RNA_def_enum(ot->srna, "type", node_socket_type_items, SOCK_VALUE, _("Type"), _("Type of the group socket"));
++      RNA_def_enum(ot->srna, "type", node_socket_type_items, SOCK_FLOAT, _("Type"), _("Type of the group socket"));
  }
  
  /* ***************** Remove Group Socket operator ************* */
@@@ -3349,8 -3534,70 +3536,70 @@@ void NODE_OT_add_file(wmOperatorType *o
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH);  //XXX TODO, relative_path
 -      RNA_def_string(ot->srna, "name", "Image", 24, "Name", "Datablock name to assign.");
 +      RNA_def_string(ot->srna, "name", "Image", 24, _("Name"), _("Datablock name to assign."));
  }
  
+ /********************** New node tree operator *********************/
+ static int new_node_tree_exec(bContext *C, wmOperator *op)
+ {
+       SpaceNode *snode;
+       bNodeTree *ntree;
+       PointerRNA ptr, idptr;
+       PropertyRNA *prop;
+       int treetype;
+       char treename[MAX_ID_NAME-2] = "NodeTree";
+       
+       /* retrieve state */
+       snode= CTX_wm_space_node(C);
+       
+       if (RNA_property_is_set(op->ptr, "type"))
+               treetype = RNA_enum_get(op->ptr, "type");
+       else
+               treetype = snode->treetype;
+       
+       if (RNA_property_is_set(op->ptr, "name"))
+               RNA_string_get(op->ptr, "name", treename);
+       
+       ntree = ntreeAddTree(treename, treetype, 0);
+       if(!ntree)
+               return OPERATOR_CANCELLED;
+       
+       /* hook into UI */
+       uiIDContextProperty(C, &ptr, &prop);
  
+       if(prop) {
+               RNA_id_pointer_create(&ntree->id, &idptr);
+               RNA_property_pointer_set(&ptr, prop, idptr);
+               /* RNA_property_pointer_set increases the user count,
+                * fixed here as the editor is the initial user.
+                */
+               --ntree->id.us;
+               RNA_property_update(C, &ptr, prop);
+       }
+       else if(snode) {
+               Scene *scene= CTX_data_scene(C);
+               snode->nodetree = ntree;
+               
+               ED_node_tree_update(snode, scene);
+       }
+       
+       return OPERATOR_FINISHED;
+ }
  
+ void NODE_OT_new_node_tree(wmOperatorType *ot)
+ {
+       /* identifiers */
+       ot->name= "New node tree";
+       ot->idname= "NODE_OT_new_node_tree";
+       
+       /* api callbacks */
+       ot->exec= new_node_tree_exec;
+       ot->poll= ED_operator_node_active;
+       
+       /* flags */
+       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       
+       RNA_def_enum(ot->srna, "type", nodetree_type_items, NTREE_COMPOSIT, "Tree Type", "");
+       RNA_def_string(ot->srna, "name", "NodeTree", MAX_ID_NAME-2, "Name", "");
+ }
  #include "BLI_blenlib.h"
  #include "BLI_utildefines.h"
  
 +#include "BLF_api.h"
 +
  #include "BKE_context.h"
+ #include "BKE_global.h"
  #include "BKE_screen.h"
  #include "BKE_node.h"
  #include "BKE_main.h"
@@@ -183,34 -225,37 +227,37 @@@ static void node_menu_add(const bContex
                uiLayoutSetActive(layout, 0);
  
        if(snode->treetype==NTREE_SHADER) {
-               uiItemMenuF(layout, _("Input"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
-               uiItemMenuF(layout, _("Output"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
-               uiItemMenuF(layout, _("Color"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR));
-               uiItemMenuF(layout, _("Vector"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR));
-               uiItemMenuF(layout, _("Convertor"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR));
-               uiItemMenuF(layout, _("Group"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
-               uiItemMenuF(layout, _("Dynamic"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_DYNAMIC));
 -              uiItemMenuF(layout, "Input", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
 -              uiItemMenuF(layout, "Output", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
 -              uiItemMenuF(layout, "Color", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR));
 -              uiItemMenuF(layout, "Vector", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR));
 -              uiItemMenuF(layout, "Convertor", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR));
 -              uiItemMenuF(layout, "Group", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
 -              uiItemMenuF(layout, "Dynamic", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_DYNAMIC));
 -              uiItemMenuF(layout, "Layout", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_LAYOUT));
++              uiItemMenuF(layout, _("Input"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
++              uiItemMenuF(layout, _("Output"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
++              uiItemMenuF(layout, _("Color"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR));
++              uiItemMenuF(layout, _("Vector"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR));
++              uiItemMenuF(layout, _("Convertor"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR));
++              uiItemMenuF(layout, _("Group"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
++              uiItemMenuF(layout, _("Dynamic"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_DYNAMIC));
++              uiItemMenuF(layout, _("Layout"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_LAYOUT));
        }
        else if(snode->treetype==NTREE_COMPOSIT) {
-               uiItemMenuF(layout, _("Input"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
-               uiItemMenuF(layout, _("Output"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
-               uiItemMenuF(layout, _("Color"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR));
-               uiItemMenuF(layout, _("Vector"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR));
-               uiItemMenuF(layout, _("Filter"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_FILTER));
-               uiItemMenuF(layout, _("Convertor"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR));
-               uiItemMenuF(layout, _("Matte"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_MATTE));
-               uiItemMenuF(layout, _("Distort"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT));
-               uiItemMenuF(layout, _("Group"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
 -              uiItemMenuF(layout, "Input", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
 -              uiItemMenuF(layout, "Output", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
 -              uiItemMenuF(layout, "Color", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR));
 -              uiItemMenuF(layout, "Vector", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR));
 -              uiItemMenuF(layout, "Filter", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_FILTER));
 -              uiItemMenuF(layout, "Convertor", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR));
 -              uiItemMenuF(layout, "Matte", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_MATTE));
 -              uiItemMenuF(layout, "Distort", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT));
 -              uiItemMenuF(layout, "Group", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
 -              uiItemMenuF(layout, "Layout", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_LAYOUT));
++              uiItemMenuF(layout, _("Input"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
++              uiItemMenuF(layout, _("Output"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
++              uiItemMenuF(layout, _("Color"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR));
++              uiItemMenuF(layout, _("Vector"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR));
++              uiItemMenuF(layout, _("Filter"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_FILTER));
++              uiItemMenuF(layout, _("Convertor"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR));
++              uiItemMenuF(layout, _("Matte"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_MATTE));
++              uiItemMenuF(layout, _("Distort"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT));
++              uiItemMenuF(layout, _("Group"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
++              uiItemMenuF(layout, _("Layout"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_LAYOUT));
        }
        else if(snode->treetype==NTREE_TEXTURE) {
-               uiItemMenuF(layout, _("Input"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
-               uiItemMenuF(layout, _("Output"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
-               uiItemMenuF(layout, _("Color"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR));
-               uiItemMenuF(layout, _("Patterns"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_PATTERN));
-               uiItemMenuF(layout, _("Textures"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_TEXTURE));
-               uiItemMenuF(layout, _("Convertor"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR));
-               uiItemMenuF(layout, _("Distort"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT));
-               uiItemMenuF(layout, _("Group"), 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
 -              uiItemMenuF(layout, "Input", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
 -              uiItemMenuF(layout, "Output", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
 -              uiItemMenuF(layout, "Color", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR));
 -              uiItemMenuF(layout, "Patterns", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_PATTERN));
 -              uiItemMenuF(layout, "Textures", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_TEXTURE));
 -              uiItemMenuF(layout, "Convertor", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR));
 -              uiItemMenuF(layout, "Distort", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT));
 -              uiItemMenuF(layout, "Group", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
 -              uiItemMenuF(layout, "Layout", 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_LAYOUT));
++              uiItemMenuF(layout, _("Input"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
++              uiItemMenuF(layout, _("Output"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
++              uiItemMenuF(layout, _("Color"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR));
++              uiItemMenuF(layout, _("Patterns"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_PATTERN));
++              uiItemMenuF(layout, _("Textures"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_TEXTURE));
++              uiItemMenuF(layout, _("Convertor"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR));
++              uiItemMenuF(layout, _("Distort"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT));
++              uiItemMenuF(layout, _("Group"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
++              uiItemMenuF(layout, _("Layout"), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_LAYOUT));
        }
  }
  
@@@ -409,7 -406,7 +408,7 @@@ EnumPropertyItem *BIF_enumTransformOrie
  }
  
  const char * BIF_menustringTransformOrientation(const bContext *C, const char *title) {
-       char* menu = _("%t|Global%x0|Local%x1|Gimbal%x4|Normal%x2|View%x3");
 -      char menu[] = "%t|Global%x0|Local%x1|Gimbal%x4|Normal%x2|View%x3";
++      const char* menu = _("%t|Global%x0|Local%x1|Gimbal%x4|Normal%x2|View%x3");
        ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces;
        TransformOrientation *ts;
        int i = V3D_MANIP_CUSTOM;
Simple merge
Simple merge
@@@ -1336,13 -1342,14 +1343,14 @@@ static void rna_def_object_game_setting
        PropertyRNA *prop;
  
        static EnumPropertyItem body_type_items[] = {
 -              {OB_BODY_TYPE_NO_COLLISION, "NO_COLLISION", 0, "No Collision", "Disable collision for this object"},
 -              {OB_BODY_TYPE_STATIC, "STATIC", 0, "Static", "Stationary object"},
 -              {OB_BODY_TYPE_DYNAMIC, "DYNAMIC", 0, "Dynamic", "Linear physics"},
 -              {OB_BODY_TYPE_RIGID, "RIGID_BODY", 0, "Rigid Body", "Linear and angular physics"},
 -              {OB_BODY_TYPE_SOFT, "SOFT_BODY", 0, "Soft Body", "Soft body"},
 -              {OB_BODY_TYPE_OCCLUDER, "OCCLUDE", 0, "Occlude", "Occluder for optimizing scene rendering"},
 -              {OB_BODY_TYPE_SENSOR, "SENSOR", 0, "Sensor", "Collision Sensor, detects static and dynamic objects but not the other collision sensor objects"},
 +              {OB_BODY_TYPE_NO_COLLISION, "NO_COLLISION", 0, N_("No Collision"), N_("Disable collision for this object")},
 +              {OB_BODY_TYPE_STATIC, "STATIC", 0, N_("Static"), N_("Stationary object")},
 +              {OB_BODY_TYPE_DYNAMIC, "DYNAMIC", 0, N_("Dynamic"), N_("Linear physics")},
 +              {OB_BODY_TYPE_RIGID, "RIGID_BODY", 0, N_("Rigid Body"), N_("Linear and angular physics")},
 +              {OB_BODY_TYPE_SOFT, "SOFT_BODY", 0, N_("Soft Body"), N_("Soft body")},
 +              {OB_BODY_TYPE_OCCLUDER, "OCCLUDE", 0, N_("Occlude"), N_("Occluder for optimizing scene rendering")},
 +              {OB_BODY_TYPE_SENSOR, "SENSOR", 0, N_("Sensor"), N_("Collision Sensor, detects static and dynamic objects but not the other collision sensor objects")},
+               {OB_BODY_TYPE_NAVMESH, "NAVMESH", 0, "Navigation Mesh", "Navigation mesh"},
                {0, NULL, 0, NULL, NULL}};
  
        srna= RNA_def_struct(brna, "GameObjectSettings", NULL);
@@@ -2036,10 -2052,16 +2053,16 @@@ static void rna_def_object(BlenderRNA *
        RNA_def_property_ui_text(prop, "Matrix", "Inverse of object's parent matrix at time of parenting");
        RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
  
-       /* collections */
+       /* modifiers */
+       prop= RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE);
+       RNA_def_property_struct_type(prop, "Modifier");
+       RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting the geometric data of the object");
+       rna_def_object_modifiers(brna, prop);
+       /* constraints */
        prop= RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE);
        RNA_def_property_struct_type(prop, "Constraint");
 -      RNA_def_property_ui_text(prop, "Constraints", "Constraints affecting the transformation of the object");
 +      RNA_def_property_ui_text(prop, N_("Constraints"), N_("Constraints affecting the transformation of the object"));
  //    RNA_def_property_collection_funcs(prop, 0, 0, 0, 0, 0, 0, 0, "constraints__add", "constraints__remove");
        rna_def_object_constraints(brna, prop);
  
        RNA_def_property_pointer_sdna(prop, NULL, "gpd");
        RNA_def_property_flag(prop, PROP_EDITABLE);
        RNA_def_property_struct_type(prop, "GreasePencil");
 -      RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil datablock");
 +      RNA_def_property_ui_text(prop, N_("Grease Pencil Data"), N_("Grease Pencil datablock"));
+       RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
        
        /* pose */
        prop= RNA_def_property(srna, "pose_library", PROP_POINTER, PROP_NONE);
@@@ -3298,8 -3420,7 +3421,7 @@@ void RNA_def_scene(BlenderRNA *brna
        RNA_def_property_int_sdna(prop, NULL, "r.cfra");
        RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
        RNA_def_property_int_funcs(prop, NULL, "rna_Scene_current_frame_set", NULL);
 -      RNA_def_property_ui_text(prop, "Current Frame", "Current Frame, to update animation data from python frame_set() instead");
 +      RNA_def_property_ui_text(prop, N_("Current Frame"), N_("Current Frame, to update animation data from python frame_set() instead"));
-       RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
        RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_frame_update");
        
        prop= RNA_def_property(srna, "frame_subframe", PROP_FLOAT, PROP_TIME);
        RNA_def_property_pointer_sdna(prop, NULL, "gpd");
        RNA_def_property_flag(prop, PROP_EDITABLE);
        RNA_def_property_struct_type(prop, "GreasePencil");
 -      RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil datablock");
 +      RNA_def_property_ui_text(prop, N_("Grease Pencil Data"), N_("Grease Pencil datablock"));
+       RNA_def_property_update(prop, NC_SCENE, NULL);
        
        /* Transform Orientations */
        prop= RNA_def_property(srna, "orientations", PROP_COLLECTION, PROP_NONE);
  #include "WM_api.h"
  #include "WM_types.h"
  
+ #include "RNA_enum_types.h"
  EnumPropertyItem space_type_items[] = {
 -      {SPACE_EMPTY, "EMPTY", 0, "Empty", ""},
 -      {SPACE_VIEW3D, "VIEW_3D", 0, "3D View", ""},
 -      {SPACE_IPO, "GRAPH_EDITOR", 0, "Graph Editor", ""},
 -      {SPACE_OUTLINER, "OUTLINER", 0, "Outliner", ""},
 -      {SPACE_BUTS, "PROPERTIES", 0, "Properties", ""},
 -      {SPACE_FILE, "FILE_BROWSER", 0, "File Browser", ""},
 -      {SPACE_IMAGE, "IMAGE_EDITOR", 0, "Image Editor", ""},
 -      {SPACE_INFO, "INFO", 0, "Info", ""},
 -      {SPACE_SEQ, "SEQUENCE_EDITOR", 0, "Sequence Editor", ""},
 -      {SPACE_TEXT, "TEXT_EDITOR", 0, "Text Editor", ""},
 +      {SPACE_EMPTY, "EMPTY", 0, N_("Empty"), ""},
 +      {SPACE_VIEW3D, "VIEW_3D", 0, N_("3D View"), ""},
 +      {SPACE_IPO, "GRAPH_EDITOR", 0, N_("Graph Editor"), ""},
 +      {SPACE_OUTLINER, "OUTLINER", 0, N_("Outliner"), ""},
 +      {SPACE_BUTS, "PROPERTIES", 0, N_("Properties"), ""},
 +      {SPACE_FILE, "FILE_BROWSER", 0, N_("File Browser"), ""},
 +      {SPACE_IMAGE, "IMAGE_EDITOR", 0, N_("Image Editor"), ""},
 +      {SPACE_INFO, "INFO", 0, N_("Info"), ""},
 +      {SPACE_SEQ, "SEQUENCE_EDITOR", 0, N_("Sequence Editor"), ""},
 +      {SPACE_TEXT, "TEXT_EDITOR", 0, N_("Text Editor"), ""},
        //{SPACE_IMASEL, "IMAGE_BROWSER", 0, "Image Browser", ""},
 -      {SPACE_SOUND, "AUDIO_WINDOW", 0, "Audio Window", ""},
 -      {SPACE_ACTION, "DOPESHEET_EDITOR", 0, "DopeSheet Editor", ""},
 -      {SPACE_NLA, "NLA_EDITOR", 0, "NLA Editor", ""},
 -      {SPACE_SCRIPT, "SCRIPTS_WINDOW", 0, "Scripts Window", ""},
 -      {SPACE_TIME, "TIMELINE", 0, "Timeline", ""},
 -      {SPACE_NODE, "NODE_EDITOR", 0, "Node Editor", ""},
 -      {SPACE_LOGIC, "LOGIC_EDITOR", 0, "Logic Editor", ""},
 -      {SPACE_CONSOLE, "CONSOLE", 0, "Python Console", ""},
 -      {SPACE_USERPREF, "USER_PREFERENCES", 0, "User Preferences", ""},
 +      {SPACE_SOUND, "AUDIO_WINDOW", 0, N_("Audio Window"), ""},
 +      {SPACE_ACTION, "DOPESHEET_EDITOR", 0, N_("DopeSheet Editor"), ""},
 +      {SPACE_NLA, "NLA_EDITOR", 0, N_("NLA Editor"), ""},
 +      {SPACE_SCRIPT, "SCRIPTS_WINDOW", 0, N_("Scripts Window"), ""},
 +      {SPACE_TIME, "TIMELINE", 0, N_("Timeline"), ""},
 +      {SPACE_NODE, "NODE_EDITOR", 0, N_("Node Editor"), ""},
 +      {SPACE_LOGIC, "LOGIC_EDITOR", 0, N_("Logic Editor"), ""},
 +      {SPACE_CONSOLE, "CONSOLE", 0, N_("Python Console"), ""},
 +      {SPACE_USERPREF, "USER_PREFERENCES", 0, N_("User Preferences"), ""},
        {0, NULL, 0, NULL, NULL}};
  
  static EnumPropertyItem draw_channels_items[] = {
@@@ -1622,7 -1641,8 +1643,8 @@@ static void rna_def_space_image(Blender
        RNA_def_property_pointer_sdna(prop, NULL, "gpd");
        RNA_def_property_flag(prop, PROP_EDITABLE);
        RNA_def_property_struct_type(prop, "GreasePencil");
 -      RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this space");
 +      RNA_def_property_ui_text(prop, N_("Grease Pencil"), N_("Grease pencil data for this space"));
+       RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
  
        prop= RNA_def_property(srna, "use_grease_pencil", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DISPGP);
@@@ -1688,9 -1708,8 +1710,8 @@@ static void rna_def_space_sequencer(Ble
        prop= RNA_def_property(srna, "view_type", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_sdna(prop, NULL, "view");
        RNA_def_property_enum_items(prop, view_type_items);
 -      RNA_def_property_ui_text(prop, "View Type", "The type of the Sequencer view (sequencer, preview or both)");
 +      RNA_def_property_ui_text(prop, N_("View Type"), N_("The type of the Sequencer view (sequencer, preview or both)"));
-       RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
-       RNA_def_property_update(prop, 0, "rna_Sequencer_display_mode_update");
+       RNA_def_property_update(prop, 0, "rna_Sequencer_view_type_update");
  
        /* display type, fairly important */
        prop= RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
        
        prop= RNA_def_property(srna, "display_channel", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "chanshown");
 -      RNA_def_property_ui_text(prop, "Display Channel", "The channel number shown in the image preview. 0 is the result of all strips combined");
 +      RNA_def_property_ui_text(prop, N_("Display Channel"), N_("The channel number shown in the image preview. 0 is the result of all strips combined"));
-       RNA_def_property_range(prop, -5, 32); // MAXSEQ --- todo, move from BKE_sequencer.h, allow up to 5 layers up the metastack. Should be dynamic...
+       RNA_def_property_range(prop, -5, MAXSEQ);
        RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
        
        prop= RNA_def_property(srna, "draw_overexposed", PROP_INT, PROP_NONE);
@@@ -1986,8 -2005,7 +2007,7 @@@ static void rna_def_space_graph(Blender
        prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_sdna(prop, NULL, "mode");
        RNA_def_property_enum_items(prop, mode_items);
 -      RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed");
 +      RNA_def_property_ui_text(prop, N_("Mode"), N_("Editing context being displayed"));
-       RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
        RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, "rna_SpaceGraphEditor_display_mode_update");
        
        /* display */
@@@ -2418,16 -2436,10 +2438,10 @@@ static void rna_def_space_node(BlenderR
        StructRNA *srna;
        PropertyRNA *prop;
  
-       static EnumPropertyItem tree_type_items[] = {
-               {NTREE_SHADER, "MATERIAL", ICON_MATERIAL, N_("Material"), N_("Material nodes")},
-               {NTREE_TEXTURE, "TEXTURE", ICON_TEXTURE, N_("Texture"), N_("Texture nodes")},
-               {NTREE_COMPOSIT, "COMPOSITING", ICON_RENDERLAYERS, N_("Compositing"), N_("Compositing nodes")},
-               {0, NULL, 0, NULL, NULL}};
        static EnumPropertyItem texture_type_items[] = {
 -              {SNODE_TEX_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Edit texture nodes from Object"},
 -              {SNODE_TEX_WORLD, "WORLD", ICON_WORLD_DATA, "World", "Edit texture nodes from World"},
 -              {SNODE_TEX_BRUSH, "BRUSH", ICON_BRUSH_DATA, "Brush", "Edit texture nodes from Brush"},
 +              {SNODE_TEX_OBJECT, "OBJECT", ICON_OBJECT_DATA, N_("Object"), N_("Edit texture nodes from Object")},
 +              {SNODE_TEX_WORLD, "WORLD", ICON_WORLD_DATA, N_("World"), N_("Edit texture nodes from World")},
 +              {SNODE_TEX_BRUSH, "BRUSH", ICON_BRUSH_DATA, N_("Brush"), N_("Edit texture nodes from Brush")},
                {0, NULL, 0, NULL, NULL}};
  
        static EnumPropertyItem backdrop_channels_items[] = {
  
        prop= RNA_def_property(srna, "tree_type", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_sdna(prop, NULL, "treetype");
-       RNA_def_property_enum_items(prop, tree_type_items);
+       RNA_def_property_enum_items(prop, nodetree_type_items);
 -      RNA_def_property_ui_text(prop, "Tree Type", "Node tree type to display and edit");
 +      RNA_def_property_ui_text(prop, N_("Tree Type"), N_("Node tree type to display and edit"));
        RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL);
  
        prop= RNA_def_property(srna, "texture_type", PROP_ENUM, PROP_NONE);
  
        prop= RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
        RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
-       RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+       RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_SpaceNodeEditor_node_tree_poll");
+       RNA_def_property_flag(prop, PROP_EDITABLE);
 -      RNA_def_property_ui_text(prop, "Node Tree", "Node tree being displayed and edited");
 +      RNA_def_property_ui_text(prop, N_("Node Tree"), N_("Node tree being displayed and edited"));
+       RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, "rna_SpaceNodeEditor_node_tree_update");
  
        prop= RNA_def_property(srna, "show_backdrop", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_BACKDRAW);
@@@ -2793,9 -2790,39 +2795,39 @@@ static void rna_def_userdef_input(Blend
        /* 3D view: orbit */
        prop= RNA_def_property(srna, "ndof_orbit_invert_axes", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ORBIT_INVERT_AXES);
 -      RNA_def_property_ui_text(prop, "Invert Axes", "Toggle between moving the viewpoint or moving the scene being viewed");
 +      RNA_def_property_ui_text(prop, N_("Invert Axes"), N_("Toggle between moving the viewpoint or moving the scene being viewed"));
        /* in 3Dx docs, this is called 'object mode' vs. 'target camera mode' */
  
+       /* 3D view: roll */
+       prop= RNA_def_property(srna, "ndof_roll_invert_axis", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ROLL_INVERT_AXIS);
+       RNA_def_property_ui_text(prop, "Invert roll Axis", "Invert roll axis");
+       /* 3D view: tilt */
+       prop= RNA_def_property(srna, "ndof_tilt_invert_axis", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_TILT_INVERT_AXIS);
+       RNA_def_property_ui_text(prop, "Invert tilt Axis", "Invert tilt axis");
+       /* 3D view: rotate */
+       prop= RNA_def_property(srna, "ndof_rotate_invert_axis", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ROTATE_INVERT_AXIS);
+       RNA_def_property_ui_text(prop, "Invert rotation Axis", "Invert rotation axis");
+       /* 3D view: pan x */
+       prop= RNA_def_property(srna, "ndof_panx_invert_axis", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_PANX_INVERT_AXIS);
+       RNA_def_property_ui_text(prop, "Invert x Axis", "Invert x axis");
+       /* 3D view: pan y */
+       prop= RNA_def_property(srna, "ndof_pany_invert_axis", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_PANY_INVERT_AXIS);
+       RNA_def_property_ui_text(prop, "Invert y Axis", "Invert y axis");
+       /* 3D view: pan z */
+       prop= RNA_def_property(srna, "ndof_panz_invert_axis", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_PANZ_INVERT_AXIS);
+       RNA_def_property_ui_text(prop, "Invert z Axis", "Invert z axis");
        /* 3D view: fly */
        prop= RNA_def_property(srna, "ndof_lock_horizon", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_LOCK_HORIZON);
@@@ -1654,10 -1647,12 +1649,12 @@@ static void rna_def_keyconfig(BlenderRN
        RNA_def_property_string_funcs(prop, "rna_wmKeyMapItem_idname_get", "rna_wmKeyMapItem_idname_length", "rna_wmKeyMapItem_idname_set");
        RNA_def_struct_name_property(srna, prop);
        RNA_def_property_update(prop, 0, "rna_KeyMapItem_update");
-       
+       /* this is infact the operator name, but if the operator can't be found we
+        * fallback on the operator ID */
        prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
 -      RNA_def_property_ui_text(prop, "Name", "Name of operator to call on input event");
 +      RNA_def_property_ui_text(prop, N_("Name"), N_("Name of operator to call on input event"));
        RNA_def_property_string_funcs(prop, "rna_wmKeyMapItem_name_get", "rna_wmKeyMapItem_name_length", NULL);
        
        prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
@@@ -361,8 -360,8 +361,8 @@@ static void rna_def_lighting(BlenderRN
  
        prop= RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "aosamp");
-       RNA_def_property_range(prop, 1, 32);
+       RNA_def_property_range(prop, 1, 128);
 -      RNA_def_property_ui_text(prop, "Samples", "Amount of ray samples. Higher values give smoother results and longer rendering times");
 +      RNA_def_property_ui_text(prop, N_("Samples"), N_("Amount of ray samples. Higher values give smoother results and longer rendering times"));
        RNA_def_property_update(prop, 0, "rna_World_update");
  
        prop= RNA_def_property(srna, "sample_method", PROP_ENUM, PROP_NONE);
@@@ -1259,11 -1266,12 +1266,12 @@@ static uiBlock *wm_block_create_splash(
        split = uiLayoutSplit(layout, 0, 0);
        col = uiLayoutColumn(split, 0);
        uiItemL(col, "Links", ICON_NONE);
-       uiItemStringO(col, _("Donations"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/blenderorg/blender-foundation/donation-payment/");
-       uiItemStringO(col, _("Release Log"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/release-logs/blender-259/");
 -      uiItemStringO(col, "Donations", ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/blenderorg/blender-foundation/donation-payment");
 -      uiItemStringO(col, "Credits", ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/credits");
 -      uiItemStringO(col, "Release Log", ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/release-logs/blender-259");
 -      uiItemStringO(col, "Manual", ICON_URL, "WM_OT_url_open", "url", "http://wiki.blender.org/index.php/Doc:2.5/Manual");
 -      uiItemStringO(col, "Blender Website", ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org");
 -      uiItemStringO(col, "User Community", ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/community/user-community");
++      uiItemStringO(col, _("Donations"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/blenderorg/blender-foundation/donation-payment");
++      uiItemStringO(col, _("Credits"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/credits");
++      uiItemStringO(col, _("Release Log"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/release-logs/blender-259");
 +      uiItemStringO(col, _("Manual"), ICON_URL, "WM_OT_url_open", "url", "http://wiki.blender.org/index.php/Doc:2.5/Manual");
-       uiItemStringO(col, _("Blender Website"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/");
-       uiItemStringO(col, _("User Community"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/community/user-community/"); // 
++      uiItemStringO(col, _("Blender Website"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org");
++      uiItemStringO(col, _("User Community"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/community/user-community");
        if(strcmp(STRINGIFY(BLENDER_VERSION_CYCLE), "release")==0) {
                BLI_snprintf(url, sizeof(url), "http://www.blender.org/documentation/blender_python_api_%d_%d" STRINGIFY(BLENDER_VERSION_CHAR) "_release", BLENDER_VERSION/100, BLENDER_VERSION%100);
        }
Simple merge