synched with trunk at revision 30597
authorNick Samarin <nicks1987@bigmir.net>
Wed, 21 Jul 2010 20:54:53 +0000 (20:54 +0000)
committerNick Samarin <nicks1987@bigmir.net>
Wed, 21 Jul 2010 20:54:53 +0000 (20:54 +0000)
20 files changed:
1  2 
projectfiles_vc9/blender/BPY_python/BPY_python.vcproj
projectfiles_vc9/blender/editors/ED_editors.vcproj
release/scripts/ui/properties_data_modifier.py
release/scripts/ui/properties_game.py
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/sca.c
source/blender/blenkernel/intern/scene.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/object/object_intern.h
source/blender/editors/object/object_ops.c
source/blender/editors/space_logic/logic_window.c
source/blender/makesdna/DNA_actuator_types.h
source/blender/makesdna/DNA_object_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesrna/intern/rna_actuator.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_scene.c
source/gameengine/Ketsji/KX_GameObject.cpp

@@@ -1,7 -1,7 +1,7 @@@
  <?xml version="1.0" encoding="Windows-1252"?>\r
  <VisualStudioProject\r
        ProjectType="Visual C++"\r
--      Version="9,00"\r
++      Version="9.00"\r
        Name="BPY_python"\r
        ProjectGUID="{5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}"\r
        RootNamespace="BPY_python"\r
                                        RelativePath="..\..\..\source\blender\python\generic\mathutils_vector.c"\r
                                        >\r
                                </File>\r
++                              <File\r
++                                      RelativePath="..\..\..\source\blender\python\generic\noise.c"\r
++                                      >\r
++                              </File>\r
                        </Filter>\r
                </Filter>\r
                <Filter\r
@@@ -1,7 -1,7 +1,7 @@@
  <?xml version="1.0" encoding="Windows-1252"?>\r
  <VisualStudioProject\r
        ProjectType="Visual C++"\r
 -      Version="9,00"\r
 +      Version="9.00"\r
        Name="ED_editors"\r
        ProjectGUID="{FB88301F-F725-401B-ACD7-D2ABBF333B71}"\r
        RootNamespace="BL_editors"\r
@@@ -44,7 -44,7 +44,7 @@@
                                Name="VCCLCompilerTool"\r
                                Optimization="2"\r
                                InlineFunctionExpansion="1"\r
 -                              AdditionalIncludeDirectories="..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\ghost\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\blenkey\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\source\blender;..\..\..\source\blender\img;..\..\..\source\blender\verify;..\..\..\source\blender\ftfont;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\editors\include;..\..\..\source\blender\editors\interface;..\..\..\source\blender\renderui;..\..\..\source\blender\blenloader;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenfont;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\windowmanager;..\..\..\source\blender\blenpluginapi;..\..\..\source\blender\renderconverter;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\network;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\source\blender\ikplugin;..\..\..\..\lib\windows\openal\include;..\..\..\..\lib\windows\jack\include"\r
 +                              AdditionalIncludeDirectories="..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\ghost\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\blenkey\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\source\blender;..\..\..\source\blender\img;..\..\..\source\blender\verify;..\..\..\source\blender\ftfont;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\editors\include;..\..\..\source\blender\editors\interface;..\..\..\source\blender\renderui;..\..\..\source\blender\blenloader;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenfont;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\windowmanager;..\..\..\source\blender\blenpluginapi;..\..\..\source\blender\renderconverter;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\network;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\source\blender\ikplugin;..\..\..\..\lib\windows\openal\include;..\..\..\..\lib\windows\jack\include;..\..\..\..\build\msvc_9\extern\recastnavigation\Recast\Include"\r
                                PreprocessorDefinitions="NDEBUG;WIN32;_LIB;_CONSOLE;GAMEBLENDER=1;WITH_QUICKTIME;INTERNATIONAL;WITH_FREETYPE2;WITH_INTERNATIONAL;WITH_OPENEXR;WITH_DDS;WITH_BULLET=1;WITH_FFMPEG;WITH_SDL;WITH_OPENAL;WITH_JACK"\r
                                StringPooling="true"\r
                                RuntimeLibrary="0"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
 -                              AdditionalIncludeDirectories="..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\ghost\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\blenkey\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\source\blender;..\..\..\source\blender\img;..\..\..\source\blender\verify;..\..\..\source\blender\ftfont;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\editors\include;..\..\..\source\blender\editors\interface;..\..\..\source\blender\renderui;..\..\..\source\blender\blenloader;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenfont;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\windowmanager;..\..\..\source\blender\blenpluginapi;..\..\..\source\blender\renderconverter;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\network;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\source\blender\ikplugin;..\..\..\..\lib\windows\openal\include;..\..\..\..\lib\windows\jack\include"\r
 +                              AdditionalIncludeDirectories="..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\python\include\python2.6;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\ghost\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\blenkey\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\..\build\msvc_9\intern\soundsystem\include;..\..\..\source\blender;..\..\..\source\blender\img;..\..\..\source\blender\verify;..\..\..\source\blender\ftfont;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\editors\include;..\..\..\source\blender\editors\interface;..\..\..\source\blender\renderui;..\..\..\source\blender\blenloader;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenfont;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\windowmanager;..\..\..\source\blender\blenpluginapi;..\..\..\source\blender\renderconverter;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\network;..\..\..\source\gameengine\soundsystem\snd_openal;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\source\blender\ikplugin;..\..\..\..\lib\windows\openal\include;..\..\..\..\lib\windows\jack\include;..\..\..\..\build\msvc_9\extern\recastnavigation\Recast\Include"\r
                                PreprocessorDefinitions="_DEBUG;WIN32;_LIB;_CONSOLE;GAMEBLENDER=1;WITH_QUICKTIME;INTERNATIONAL;WITH_BF_INTERNATIONAL;WITH_FREETYPE2;WITH_OPENEXR;WITH_DDS;WITH_BULLET = 1;WITH_FFMPEG;WITH_SDL;WITH_OPENAL;WITH_JACK"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="1"\r
                        Name="datafiles"\r
                        Filter="c"\r
                        >\r
-                               RelativePath="..\..\..\source\blender\editors\datafiles\B.blend.c"\r
 +                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\add.png.c"\r
 +                              >\r
 +                      </File>\r
                        <File\r
                                RelativePath="..\..\..\source\blender\editors\datafiles\Bfont.c"\r
                                >\r
                                RelativePath="..\..\..\source\blender\editors\datafiles\blenderbuttons.c"\r
                                >\r
                        </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\blob.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\blur.png.c"\r
++                              >\r
++                      </File>\r
                        <File\r
                                RelativePath="..\..\..\source\blender\editors\datafiles\bmonofont.ttf.c"\r
                                >\r
                        </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\clay.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\clone.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\crease.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\darken.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\draw.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\fill.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\flatten.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\grab.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\inflate.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\layer.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\lighten.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\mix.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\multiply.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\nudge.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\pinch.png.c"\r
++                              >\r
++                      </File>\r
                        <File\r
                                RelativePath="..\..\..\source\blender\editors\datafiles\preview.blend.c"\r
                                >\r
                                RelativePath="..\..\..\source\blender\editors\datafiles\prvicons.c"\r
                                >\r
                        </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\scrape.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\smear.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\smooth.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\snake_hook.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\soften.png.c"\r
++                              >\r
++                      </File>\r
                        <File\r
                                RelativePath="..\..\..\source\blender\editors\datafiles\splash.png.c"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\startup.blend.c"\r
+                               >\r
+                       </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\subtract.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\texdraw.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\thumb.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\twist.png.c"\r
++                              >\r
++                      </File>\r
++                      <File\r
++                              RelativePath="..\..\..\source\blender\editors\datafiles\vertexdraw.png.c"\r
++                              >\r
++                      </File>\r
                </Filter>\r
                <Filter\r
                        Name="interface"\r
                                RelativePath="..\..\..\source\blender\editors\object\object_modifier.c"\r
                                >\r
                        </File>\r
 +                      <File\r
 +                              RelativePath="..\..\..\source\blender\editors\object\object_navmesh.cpp"\r
 +                              >\r
 +                      </File>\r
                        <File\r
                                RelativePath="..\..\..\source\blender\editors\object\object_ops.c"\r
                                >\r
                                RelativePath="..\..\..\source\blender\editors\sculpt_paint\sculpt_intern.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\sculpt_paint\sculpt_undo.c"\r
+                               >\r
+                       </File>\r
                </Filter>\r
                <Filter\r
                        Name="uvedit"\r
@@@ -437,6 -437,7 +437,7 @@@ class DATA_PT_modifiers(DataButtonsPane
          col.prop(md, "levels", text="Preview")
          col.prop(md, "sculpt_levels", text="Sculpt")
          col.prop(md, "render_levels", text="Render")
+         col.prop(bpy.context.tool_settings.sculpt, "fast_navigate")
  
          if wide_ui:
              col = split.column()
              row.operator("object.multires_external_save", text="Save External...")
              row.label()
  
 +    def NAVMESH(self, layout, ob, md, wide_ui):
 +        layout = self.layout
 +
      def PARTICLE_INSTANCE(self, layout, ob, md, wide_ui):
          layout.prop(md, "object")
          layout.prop(md, "particle_system_number", text="Particle System")
@@@ -58,7 -58,7 +58,7 @@@ class PHYSICS_PT_game_physics(PhysicsBu
              col = split.column()
              col.prop(game, "actor")
              col.prop(game, "ghost")
-             col.prop(ob, "restrict_render", text="Invisible") # out of place but useful
+             col.prop(ob, "hide_render", text="Invisible") # out of place but useful
  
              if wide_ui:
                  col = split.column()
              col = layout.column()
              col.prop(game, "actor")
              col.prop(game, "ghost")
-             col.prop(ob, "restrict_render", text="Invisible")
+             col.prop(ob, "hide_render", text="Invisible")
  
              layout.separator()
  
              col = layout.column()
              col.prop(game, "actor")
              col.prop(game, "ghost")
-             col.prop(ob, "restrict_render", text="Invisible")
+             col.prop(ob, "hide_render", text="Invisible")
  
          elif game.physics_type in ('SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'):
-             layout.prop(ob, "restrict_render", text="Invisible")
+             layout.prop(ob, "hide_render", text="Invisible")
  
  
  class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel):
          if wide_ui:
              col = split.column()
          col.prop(game, "collision_compound", text="Compound")
 +              
 +class PHYSICS_PT_game_obstacles(PhysicsButtonsPanel):
 +    bl_label = "Create obstacle"
  
 +    def poll(self, context):
 +        game = context.object.game
 +        rd = context.scene.render
 +        return (game.physics_type in ('DYNAMIC', 'RIGID_BODY', 'SENSOR', 'SOFT_BODY', 'STATIC')) and (rd.engine == 'BLENDER_GAME')
 +
 +    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
 +        wide_ui = context.region.width > narrowui
 +
 +        layout.active = game.create_obstacle
 +
 +        split = layout.split()
 +        col = split.column()
 +        col.prop(game, "obstacle_radius", text="Radius")
  
  class RenderButtonsPanel(bpy.types.Panel):
      bl_space_type = 'PROPERTIES'
@@@ -546,26 -522,10 +546,26 @@@ class WORLD_PT_game_physics(WorldButton
              col.label(text="Logic Steps:")
              col.prop(gs, "logic_step_max", text="Max")
  
 +class WORLD_PT_game_physics_obstacles(WorldButtonsPanel):
 +    bl_label = "Obstacle simulation"
 +    COMPAT_ENGINES = {'BLENDER_GAME'}
 +
 +    def draw(self, context):
 +        layout = self.layout
 +
 +        gs = context.scene.game_data
 +        wide_ui = context.region.width > narrowui
 +
 +        layout.prop(gs, "obstacle_simulation", text = "Type")
 +        if gs.obstacle_simulation != 'None':
 +            layout.prop(gs, "level_height")
 +            layout.prop(gs, "show_obstacle_simulation")
 +                      
  
  classes = [
      PHYSICS_PT_game_physics,
      PHYSICS_PT_game_collision_bounds,
 +    PHYSICS_PT_game_obstacles,
  
      RENDER_PT_game,
      RENDER_PT_game_player,
      WORLD_PT_game_context_world,
      WORLD_PT_game_world,
      WORLD_PT_game_mist,
 -    WORLD_PT_game_physics]
 +    WORLD_PT_game_physics,
 +    WORLD_PT_game_physics_obstacles]
  
  
  def register():
@@@ -283,7 -283,6 +283,6 @@@ void free_object(Object *ob
        ob->path= 0;
        if(ob->adt) BKE_free_animdata((ID *)ob);
        if(ob->poselib) ob->poselib->id.us--;
-       if(ob->dup_group) ob->dup_group->id.us--;
        if(ob->gpd) ob->gpd->id.us--;
        if(ob->defbase.first)
                BLI_freelistN(&ob->defbase);
@@@ -949,12 -948,6 +948,6 @@@ void free_lamp(Lamp *la
        la->id.icon_id = 0;
  }
  
- void *add_wave()
- {
-       return 0;
- }
  /* *************************************************** */
  
  static void *add_obdata_from_type(int type)
        case OB_CAMERA: return add_camera("Camera");
        case OB_LAMP: return add_lamp("Lamp");
        case OB_LATTICE: return add_lattice("Lattice");
-       case OB_WAVE: return add_wave();
        case OB_ARMATURE: return add_armature("Armature");
        case OB_EMPTY: return NULL;
        default:
@@@ -988,7 -980,6 +980,6 @@@ static char *get_obdata_defname(int typ
        case OB_CAMERA: return "Camera";
        case OB_LAMP: return "Lamp";
        case OB_LATTICE: return "Lattice";
-       case OB_WAVE: return "Wave";
        case OB_ARMATURE: return "Armature";
        case OB_EMPTY: return "Empty";
        default:
@@@ -1057,7 -1048,6 +1048,7 @@@ Object *add_only_object(int type, char 
        ob->state=1;
        /* ob->pad3 == Contact Processing Threshold */
        ob->m_contactProcessingThreshold = 1.;
 +      ob->obstacleRad = 1.;
        
        /* NT fluid sim defaults */
        ob->fluidsimFlag = 0;
@@@ -1321,7 -1311,7 +1312,7 @@@ Object *copy_object(Object *ob
  
        /* increase user numbers */
        id_us_plus((ID *)obn->data);
-       id_us_plus((ID *)obn->dup_group);
+       id_lib_extern((ID *)obn->dup_group);
        
  
        for(a=0; a<obn->totcol; a++) id_us_plus((ID *)obn->mat[a]);
@@@ -391,7 -391,6 +391,7 @@@ void init_actuator(bActuator *act
        bObjectActuator *oa;
        bRandomActuator *ra;
        bSoundActuator *sa;
 +      bSteeringActuator *sta;
        
        if(act->data) MEM_freeN(act->data);
        act->data= 0;
        case ACT_ARMATURE:
                act->data = MEM_callocN(sizeof( bArmatureActuator ), "armature act");
                break;
 +      case ACT_STEERING:
 +              act->data = MEM_callocN(sizeof( bSteeringActuator), "steering act");
 +              sta = act->data;
 +              sta->acceleration = 3.f;
 +              sta->turnspeed = 120.f;
 +              sta->dist = 1.f;
 +              sta->velocity= 3.f;
        default:
                ; /* this is very severe... I cannot make any memory for this        */
                /* logic brick...                                                    */
@@@ -614,7 -606,6 +614,7 @@@ void sca_remove_ob_poin(Object *obt, Ob
        bMessageActuator *ma;
        bParentActuator *para;
        bArmatureActuator *aa;
 +      bSteeringActuator *sta;
  
        sens= obt->sensors.first;
        while(sens) {
                        if (aa->target == ob) aa->target = NULL;
                        if (aa->subtarget == ob) aa->subtarget = NULL;
                        break;
 +              case ACT_STEERING:
 +                      sta = act->data;
 +                      if (sta->target==ob) sta->target = NULL;
 +                      if (sta->navmesh==ob) sta->navmesh = NULL;
 +                      break;                  
                }
                act= act->next;
        }       
@@@ -814,7 -800,7 +814,7 @@@ void link_logicbricks(void **poin, voi
                (*tot) ++;
                *ppoin = MEM_callocN((*tot)*size, "new link");
        
-               for (ibrick=0; ibrick < *tot - 1; ibrick++) {
+               for (ibrick=0; ibrick < *(tot) - 1; ibrick++) {
                        (*ppoin)[ibrick] = old_links[ibrick];
                }
                (*ppoin)[ibrick] = *poin;
@@@ -483,23 -483,6 +483,23 @@@ Scene *add_scene(char *name
        sce->gm.flag = GAME_DISPLAY_LISTS;
        sce->gm.matmode = GAME_MAT_MULTITEX;
  
 +      sce->gm.obstacleSimulation= OBSTSIMULATION_NONE;
 +      sce->gm.levelHeight = 2.f;
 +
 +      sce->gm.recastData.cellsize = 0.3f;
 +      sce->gm.recastData.cellheight = 0.2f;
 +      sce->gm.recastData.agentmaxslope = M_PI/2;
 +      sce->gm.recastData.agentmaxclimb = 0.9f;
 +      sce->gm.recastData.agentheight = 2.0f;
 +      sce->gm.recastData.agentradius = 0.6f;
 +      sce->gm.recastData.edgemaxlen = 12.0f;
 +      sce->gm.recastData.edgemaxerror = 1.3f;
 +      sce->gm.recastData.regionminsize = 50.f;
 +      sce->gm.recastData.regionmergesize = 20.f;
 +      sce->gm.recastData.vertsperpoly = 6;
 +      sce->gm.recastData.detailsampledist = 6.0f;
 +      sce->gm.recastData.detailsamplemaxerror = 1.0f;
 +
        sound_create_scene(sce);
  
        return sce;
@@@ -610,7 -593,7 +610,7 @@@ void unlink_scene(Main *bmain, Scene *s
  /* used by metaballs
   * doesnt return the original duplicated object, only dupli's
   */
- int next_object(Scene *scene, int val, Base **base, Object **ob)
+ int next_object(Scene **scene, int val, Base **base, Object **ob)
  {
        static ListBase *duplilist= NULL;
        static DupliObject *dupob;
  
                        /* the first base */
                        if(fase==F_START) {
-                               *base= scene->base.first;
+                               *base= (*scene)->base.first;
                                if(*base) {
                                        *ob= (*base)->object;
                                        fase= F_SCENE;
                                }
                                else {
                                        /* exception: empty scene */
-                                       if(scene->set && scene->set->base.first) {
-                                               *base= scene->set->base.first;
-                                               *ob= (*base)->object;
-                                               fase= F_SET;
+                                       while((*scene)->set) {
+                                               (*scene)= (*scene)->set;
+                                               if((*scene)->base.first) {
+                                                       *base= (*scene)->base.first;
+                                                       *ob= (*base)->object;
+                                                       fase= F_SCENE;
+                                                       break;
+                                               }
                                        }
                                }
                        }
                                        if(*base) *ob= (*base)->object;
                                        else {
                                                if(fase==F_SCENE) {
-                                                       /* scene is finished, now do the set */
-                                                       if(scene->set && scene->set->base.first) {
-                                                               *base= scene->set->base.first;
-                                                               *ob= (*base)->object;
-                                                               fase= F_SET;
+                                                       /* (*scene) is finished, now do the set */
+                                                       while((*scene)->set) {
+                                                               (*scene)= (*scene)->set;
+                                                               if((*scene)->base.first) {
+                                                                       *base= (*scene)->base.first;
+                                                                       *ob= (*base)->object;
+                                                                       break;
+                                                               }
                                                        }
                                                }
                                        }
                                                this enters eternal loop because of 
                                                makeDispListMBall getting called inside of group_duplilist */
                                                if((*base)->object->dup_group == NULL) {
-                                                       duplilist= object_duplilist(scene, (*base)->object);
+                                                       duplilist= object_duplilist((*scene), (*base)->object);
                                                        
                                                        dupob= duplilist->first;
  
                }
        }
        
+       /* if(ob && *ob) {
+               printf("Scene: '%s', '%s'\n", (*scene)->id.name+2, (*ob)->id.name+2);
+       } */
        /* reset recursion test */
        in_next_object= 0;
        
  #include <errno.h>
  
  /*
-  Remark: still a weak point is the newadress() function, that doesnt solve reading from
+  Remark: still a weak point is the newaddress() function, that doesnt solve reading from
   multiple files at the same time
  
   (added remark: oh, i thought that was solved? will look at that... (ton)
@@@ -174,7 -174,7 +174,7 @@@ REA
                - read associated 'direct data'
                - link direct data (internal and to LibBlock)
  - read FileGlobal
- - read USER data, only when indicated (file is ~/.B.blend or .B25.blend)
+ - read USER data, only when indicated (file is ~/X.XX/startup.blend)
  - free file
  - per Library (per Main)
        - read file
@@@ -1554,6 -1554,9 +1554,9 @@@ static void direct_link_brush(FileData 
                direct_link_curvemapping(fd, brush->curve);
        else
                brush_curve_preset(brush, CURVE_PRESET_SHARP);
+       brush->preview= NULL;
+       brush->icon_imbuf= NULL;
  }
  
  static void direct_link_script(FileData *fd, Script *script)
@@@ -3614,11 -3617,6 +3617,11 @@@ static void lib_link_object(FileData *f
                                        arma->target= newlibadr(fd, ob->id.lib, arma->target);
                                        arma->subtarget= newlibadr(fd, ob->id.lib, arma->subtarget);
                                }
 +                              else if(act->type==ACT_STEERING) {
 +                                      bSteeringActuator *steeringa = act->data; 
 +                                      steeringa->target = newlibadr(fd, ob->id.lib, steeringa->target);
 +                                      steeringa->navmesh = newlibadr(fd, ob->id.lib, steeringa->navmesh);
 +                              }
                                act= act->next;
                        }
                        
@@@ -9689,7 -9687,7 +9692,7 @@@ static void do_versions(FileData *fd, L
                                        if(sAct->sound)
                                        {
                                                sound = newlibadr(fd, lib, sAct->sound);
-                                               sAct->flag = sound->flags | SOUND_FLAGS_3D ? ACT_SND_3D_SOUND : 0;
+                                               sAct->flag = sound->flags & SOUND_FLAGS_3D ? ACT_SND_3D_SOUND : 0;
                                                sAct->pitch = sound->pitch;
                                                sAct->volume = sound->volume;
                                                sAct->sound3D.reference_distance = sound->distance;
        }
        
  
-       /* put 2.50 compatibility code here until next subversion bump */
+       if (main->versionfile < 253)
        {
                Object *ob;
                Scene *scene;
                bScreen *sc;
                Tex *tex;
+               Brush *brush;
  
                for (sc= main->screen.first; sc; sc= sc->id.next) {
                        ScrArea *sa;
                                tex->saturation= 1.0f;
                }
  
 -
 +              //set defaults for obstacle avoidance, recast data
 +              {
 +                      Scene *sce;
 +                      for(sce = main->scene.first; sce; sce = sce->id.next)
 +                      {
 +                              
 +                              if (sce->gm.levelHeight == 0.f)
 +                                      sce->gm.levelHeight = 2.f;
 +                              
 +                              if(sce->gm.recastData.cellsize == 0.0f)
 +                                      sce->gm.recastData.cellsize = 0.3f;
 +                              if(sce->gm.recastData.cellheight == 0.0f)
 +                                      sce->gm.recastData.cellheight = 0.2f;
 +                              if(sce->gm.recastData.agentmaxslope == 0.0f)
 +                                      sce->gm.recastData.agentmaxslope = M_PI/4;
 +                              if(sce->gm.recastData.agentmaxclimb == 0.0f)
 +                                      sce->gm.recastData.agentmaxclimb = 0.9f;
 +                              if(sce->gm.recastData.agentheight == 0.0f)
 +                                      sce->gm.recastData.agentheight = 2.0f;
 +                              if(sce->gm.recastData.agentradius == 0.0f)
 +                                      sce->gm.recastData.agentradius = 0.6f;
 +                              if(sce->gm.recastData.edgemaxlen == 0.0f)
 +                                      sce->gm.recastData.edgemaxlen = 12.0f;
 +                              if(sce->gm.recastData.edgemaxerror == 0.0f)
 +                                      sce->gm.recastData.edgemaxerror = 1.3f;
 +                              if(sce->gm.recastData.regionminsize == 0.0f)
 +                                      sce->gm.recastData.regionminsize = 50.f;
 +                              if(sce->gm.recastData.regionmergesize == 0.0f)
 +                                      sce->gm.recastData.regionmergesize = 20.f;
 +                              if(sce->gm.recastData.vertsperpoly<3)
 +                                      sce->gm.recastData.vertsperpoly = 6;
 +                              if(sce->gm.recastData.detailsampledist == 0.0f)
 +                                      sce->gm.recastData.detailsampledist = 6.0f;
 +                              if(sce->gm.recastData.detailsamplemaxerror == 0.0f)
 +                                      sce->gm.recastData.detailsamplemaxerror = 1.0f;
 +                      }                       
 +              }
++
+               {
+                       Curve *cu;
+                       for(cu= main->curve.first; cu; cu= cu->id.next) {
+                               cu->smallcaps_scale= 0.75f;
+                       }
+               }
+               for (scene= main->scene.first; scene; scene=scene->id.next) {
+                       if(scene) {
+                               Sequence *seq;
+                               SEQ_BEGIN(scene->ed, seq) {
+                                       if(seq->sat==0.0f) {
+                                               seq->sat= 1.0f;
+                                       }
+                               }
+                               SEQ_END
+                       }
+               }
+               /* GSOC 2010 Sculpt - New settings for Brush */
+               for (brush= main->brush.first; brush; brush= brush->id.next) {
+                       /* Sanity Check */
+                       // infinite number of dabs
+                       if (brush->spacing == 0)
+                               brush->spacing = 10;
+                       // will have no effect
+                       if (brush->alpha == 0)
+                               brush->alpha = 0.5f;
+                       // bad radius
+                       if (brush->unprojected_radius == 0)
+                               brush->unprojected_radius = 0.125;
+                       // unusable size
+                       if (brush->size == 0)
+                               brush->size = 35;
+                       // can't see overlay
+                       if (brush->texture_overlay_alpha == 0)
+                               brush->texture_overlay_alpha = 33;
+                       // same as draw brush
+                       if (brush->crease_pinch_factor == 0)
+                               brush->crease_pinch_factor = 0.5f;
+                       // will sculpt no vertexes
+                       if (brush->plane_trim == 0)
+                               brush->plane_trim = 0.5f;
+                       // same as smooth stroke off
+                       if (brush->smooth_stroke_radius == 0)
+                               brush->smooth_stroke_radius= 75;
+                       // will keep cursor in one spot
+                       if (brush->smooth_stroke_radius == 1)
+                               brush->smooth_stroke_factor= 0.9f;
+                       // same as dots
+                       if (brush->rate == 0)
+                               brush->rate = 0.1f;
+                       /* New Settings */
+                       if (main->versionfile < 252 || (main->versionfile == 252 && main->subversionfile < 5)) {
+                               brush->flag |= BRUSH_SPACE_ATTEN; // explicitly enable adaptive space
+                               // spacing was originally in pixels, convert it to percentage for new version
+                               // size should not be zero due to sanity check above
+                               brush->spacing = (int)(100*((float)brush->spacing) / ((float)brush->size));
+                               if (brush->add_col[0] == 0 &&
+                                       brush->add_col[1] == 0 &&
+                                       brush->add_col[2] == 0)
+                               {
+                                       brush->add_col[0] = 1.00;
+                                       brush->add_col[1] = 0.39;
+                                       brush->add_col[2] = 0.39;
+                               }
+                               if (brush->sub_col[0] == 0 &&
+                                       brush->sub_col[1] == 0 &&
+                                       brush->sub_col[2] == 0)
+                               {
+                                       brush->sub_col[0] = 0.39;
+                                       brush->sub_col[1] = 0.39;
+                                       brush->sub_col[2] = 1.00;
+                               }
+                       }
+               }
+       }
+       /* put compatibility code here until next subversion bump */
+       {
        }
        /* 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! */
  
@@@ -11286,7 -11344,7 +11386,7 @@@ static void expand_doit(FileData *fd, M
                                else {
                                        /* The line below was commented by Ton (I assume), when Hos did the merge from the orange branch. rev 6568
                                         * This line is NEEDED, the case is that you have 3 blend files...
-                                        * user.blend, lib.blend and lib_indirect.blend - if user.blend alredy references a "tree" from
+                                        * user.blend, lib.blend and lib_indirect.blend - if user.blend already references a "tree" from
                                         * lib_indirect.blend but lib.blend does too, linking in a Scene or Group from lib.blend can result in an
                                         * empty without the dupli group referenced. Once you save and reload the group would appier. - Campbell */
                                        /* This crashes files, must look further into it */
@@@ -11878,11 -11936,6 +11978,11 @@@ static void expand_object(FileData *fd
                        bArmatureActuator *arma= act->data;
                        expand_doit(fd, mainvar, arma->target);
                }
 +              else if(act->type==ACT_STEERING) {
 +                      bSteeringActuator *sta= act->data;
 +                      expand_doit(fd, mainvar, sta->target);
 +                      expand_doit(fd, mainvar, sta->navmesh);
 +              }
                act= act->next;
        }
  
@@@ -12075,7 -12128,7 +12175,7 @@@ static void give_base_to_objects(Main *
                        
                                /* IF below is quite confusing!
                                if we are appending, but this object wasnt just added allong with a group,
-                               then this is alredy used indirectly in the scene somewhere else and we didnt just append it.
+                               then this is already used indirectly in the scene somewhere else and we didnt just append it.
                                
                                (ob->id.flag & LIB_PRE_EXISTING)==0 means that this is a newly appended object - Campbell */
                        if (is_group_append==0 || (ob->id.flag & LIB_PRE_EXISTING)==0) {
@@@ -65,7 -65,7 +65,7 @@@ Any case: direct data is ALWAYS after t
  - write TEST (128x128, blend file preview, optional)
  - write FileGlobal (some global vars)
  - write SDNA
- - write USER if filename is ~/.B.blend
+ - write USER if filename is ~/X.XX/config/startup.blend
  */
  
  
@@@ -859,9 -859,6 +859,9 @@@ static void write_actuators(WriteData *
                case ACT_ARMATURE:
                        writestruct(wd, DATA, "bArmatureActuator", 1, act->data);
                        break;
 +              case ACT_STEERING:
 +                      writestruct(wd, DATA, "bSteeringActuator", 1, act->data);
 +                      break;
                default:
                        ; /* error: don't know how to write this file */
                }
@@@ -2484,7 -2481,7 +2484,7 @@@ int BLO_write_file(Main *mainvar, char 
  
        file = open(tempname,O_BINARY+O_WRONLY+O_CREAT+O_TRUNC, 0666);
        if(file == -1) {
-               BKE_reportf(reports, RPT_ERROR, "Can't open file for writing: %s.", strerror(errno));
+               BKE_reportf(reports, RPT_ERROR, "Can't open file %s for writing: %s.", tempname, strerror(errno));
                return 0;
        }
  
@@@ -75,10 -75,10 +75,10 @@@ void OBJECT_OT_drop_named_material(stru
  void OBJECT_OT_mode_set(struct wmOperatorType *ot);
  void OBJECT_OT_editmode_toggle(struct wmOperatorType *ot);
  void OBJECT_OT_posemode_toggle(struct wmOperatorType *ot);
- void OBJECT_OT_restrictview_set(struct wmOperatorType *ot);
- void OBJECT_OT_restrictview_clear(struct wmOperatorType *ot);
- void OBJECT_OT_restrictrender_set(struct wmOperatorType *ot);
- void OBJECT_OT_restrictrender_clear(struct wmOperatorType *ot);
+ void OBJECT_OT_hide_view_set(struct wmOperatorType *ot);
+ void OBJECT_OT_hide_view_clear(struct wmOperatorType *ot);
+ void OBJECT_OT_hide_render_set(struct wmOperatorType *ot);
+ void OBJECT_OT_hide_render_clear(struct wmOperatorType *ot);
  void OBJECT_OT_proxy_make(struct wmOperatorType *ot);
  void OBJECT_OT_shade_smooth(struct wmOperatorType *ot);
  void OBJECT_OT_shade_flat(struct wmOperatorType *ot);
@@@ -222,8 -222,5 +222,8 @@@ void OBJECT_OT_group_remove(struct wmOp
  /* object_bake.c */
  void OBJECT_OT_bake_image(wmOperatorType *ot);
  
 +/* object_navmesh.cpp */
 +void OBJECT_OT_create_navmesh(struct wmOperatorType *ot);
 +
  #endif /* ED_OBJECT_INTERN_H */
  
@@@ -72,10 -72,10 +72,10 @@@ void ED_operatortypes_object(void
        WM_operatortype_append(OBJECT_OT_editmode_toggle);
        WM_operatortype_append(OBJECT_OT_posemode_toggle);
        WM_operatortype_append(OBJECT_OT_proxy_make);
-       WM_operatortype_append(OBJECT_OT_restrictview_clear);
-       WM_operatortype_append(OBJECT_OT_restrictview_set);
-       WM_operatortype_append(OBJECT_OT_restrictrender_clear);
-       WM_operatortype_append(OBJECT_OT_restrictrender_set);
+       WM_operatortype_append(OBJECT_OT_hide_view_clear);
+       WM_operatortype_append(OBJECT_OT_hide_view_set);
+       WM_operatortype_append(OBJECT_OT_hide_render_clear);
+       WM_operatortype_append(OBJECT_OT_hide_render_set);
        WM_operatortype_append(OBJECT_OT_shade_smooth);
        WM_operatortype_append(OBJECT_OT_shade_flat);
        WM_operatortype_append(OBJECT_OT_paths_calculate);
  
        WM_operatortype_append(OBJECT_OT_bake_image);
        WM_operatortype_append(OBJECT_OT_drop_named_material);
 +
 +      WM_operatortype_append(OBJECT_OT_create_navmesh);
  }
  
  void ED_operatormacros_object(void)
@@@ -320,20 -318,19 +320,19 @@@ void ED_keymap_object(wmKeyConfig *keyc
        WM_keymap_verify_item(keymap, "OBJECT_OT_scale_clear", SKEY, KM_PRESS, KM_ALT, 0);
        WM_keymap_verify_item(keymap, "OBJECT_OT_origin_clear", OKEY, KM_PRESS, KM_ALT, 0);
        
-       WM_keymap_add_item(keymap, "OBJECT_OT_restrictview_clear", HKEY, KM_PRESS, KM_ALT, 0);
-       WM_keymap_add_item(keymap, "OBJECT_OT_restrictview_set", HKEY, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "OBJECT_OT_restrictview_set", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1);
+       WM_keymap_add_item(keymap, "OBJECT_OT_hide_view_clear", HKEY, KM_PRESS, KM_ALT, 0);
+       WM_keymap_add_item(keymap, "OBJECT_OT_hide_view_set", HKEY, KM_PRESS, 0, 0);
+       RNA_boolean_set(WM_keymap_add_item(keymap, "OBJECT_OT_hide_view_set", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1);
  
        /* same as above but for rendering */
-       WM_keymap_add_item(keymap, "OBJECT_OT_restrictrender_clear", HKEY, KM_PRESS, KM_ALT|KM_CTRL, 0);
-       WM_keymap_add_item(keymap, "OBJECT_OT_restrictrender_set", HKEY, KM_PRESS, KM_CTRL, 0);
- //    RNA_boolean_set(WM_keymap_add_item(keymap, "OBJECT_OT_restrictrender_set", HKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0)->ptr, "unselected", 1); // conflicts, removing
+       WM_keymap_add_item(keymap, "OBJECT_OT_hide_render_clear", HKEY, KM_PRESS, KM_ALT|KM_CTRL, 0);
+       WM_keymap_add_item(keymap, "OBJECT_OT_hide_render_set", HKEY, KM_PRESS, KM_CTRL, 0);
+ //    RNA_boolean_set(WM_keymap_add_item(keymap, "OBJECT_OT_hide_render_set", HKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0)->ptr, "unselected", 1); // conflicts, removing
  
        WM_keymap_add_item(keymap, "OBJECT_OT_move_to_layer", MKEY, KM_PRESS, 0, 0);
        
        WM_keymap_add_item(keymap, "OBJECT_OT_delete", XKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "OBJECT_OT_delete", DELKEY, KM_PRESS, 0, 0);
-       WM_keymap_add_item(keymap, "OBJECT_OT_delete", BACKSPACEKEY, KM_PRESS, 0, 0);
        WM_keymap_add_menu(keymap, "INFO_MT_add", AKEY, KM_PRESS, KM_SHIFT, 0);
  
        WM_keymap_add_item(keymap, "OBJECT_OT_duplicates_make_real", AKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
@@@ -644,17 -644,17 +644,17 @@@ static char *controller_name(int type
  {
        switch (type) {
        case CONT_LOGIC_AND:
-               return "AND";
+               return "And";
        case CONT_LOGIC_OR:
-               return "OR";
+               return "Or";
        case CONT_LOGIC_NAND:
-               return "NAND";
+               return "Nand";
        case CONT_LOGIC_NOR:
-               return "NOR";
+               return "Nor";
        case CONT_LOGIC_XOR:
-               return "XOR";
+               return "Xor";
        case CONT_LOGIC_XNOR:
-               return "XNOR";
+               return "Xnor";
        case CONT_EXPRESSION:
                return "Expression";
        case CONT_PYTHON:
@@@ -678,7 -678,7 +678,7 @@@ static char *actuator_name(int type
        case ACT_OBJECT:
                return "Motion";
        case ACT_IPO:
-               return "Ipo";
+               return "F-Curve";
        case ACT_LAMP:
                return "Lamp";
        case ACT_CAMERA:
        case ACT_VISIBILITY:
                return "Visibility";
        case ACT_2DFILTER:
-               return "2D Filter";
+               return "Filter 2D";
        case ACT_PARENT:
                return "Parent";
        case ACT_STATE:
                return "State";
        case ACT_ARMATURE:
                return "Armature";
 +      case ACT_STEERING:
 +              return "Steering";
        }
        return "unknown";
  }
@@@ -914,8 -912,15 +914,15 @@@ static ID **get_selected_and_linked_obs
        
        ob= G.main->object.first;
        nr= 0;
+       /* make the active object always the first one of the list */
+       if (obact) {
+               idar[0]= (ID *)obact;
+               nr++;
+       }
        while(ob) {
-               if( ob->scavisflag ) {
+               if( (ob->scavisflag) && (ob != obact)) {
                        idar[nr]= (ID *)ob;
                        nr++;
                }
@@@ -1605,7 -1610,7 +1612,7 @@@ static short draw_sensorbuttons(Object 
                                        str = "Type %t|Up Axis %x1 |Down Axis %x3|Left Axis %x2|Right Axis %x0"; 
                                        uiDefButI(block, MENU, B_REDR, str, xco+10 + 0.6 * (width-20), yco-68, 0.4 * (width-20), 19,
                                        &joy->axisf, 2.0, 31, 0, 0,
-                                       "The direction of the axis, use 'All Events' to recieve events on any direction");
+                                       "The direction of the axis, use 'All Events' to receive events on any direction");
                                }
                        }
                        else if (joy->type == SENS_JOY_HAT)
                                        str = "Direction%t|Up%x1|Down%x4|Left%x8|Right%x2|%l|Up/Right%x3|Down/Left%x12|Up/Left%x9|Down/Right%x6"; 
                                        uiDefButI(block, MENU, 0, str, xco+10 + 0.6 * (width-20), yco-68, 0.4 * (width-20), 19,
                                        &joy->hatf, 2.0, 31, 0, 0,
-                                       "The direction of the hat, use 'All Events' to recieve events on any direction");
+                                       "The direction of the hat, use 'All Events' to receive events on any direction");
                                }
                        }
                        else { /* (joy->type == SENS_JOY_AXIS_SINGLE)*/
@@@ -2900,6 -2905,7 +2907,6 @@@ static short draw_actuatorbuttons(Objec
                uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1); 
                  yco-= ysize; 
                  break; 
 -
         default:
                ysize= 4;
  
@@@ -3168,24 -3174,24 +3175,24 @@@ static int is_sensor_linked(uiBlock *bl
        return 0;
  }
  
- /* never used, see CVS 1.134 for the code */
- /*  static FreeCamera *new_freecamera(void) */
- /* never used, see CVS 1.120 for the code */
- /*  static uiBlock *freecamera_menu(void) */
  /* Sensors code */
  
  static void draw_sensor_header(uiLayout *layout, PointerRNA *ptr, PointerRNA *logic_ptr)
  {
        uiLayout *box, *row, *subrow;
+       bSensor *sens= (bSensor *)ptr->data;
        
        box= uiLayoutBox(layout);
        row= uiLayoutRow(box, 0);
        
        uiItemR(row, ptr, "expanded", UI_ITEM_R_NO_BG, "", 0);
-       uiItemR(row, ptr, "type", 0, "", 0);
-       uiItemR(row, ptr, "name", 0, "", 0);
+       if(RNA_boolean_get(ptr, "expanded")) {
+               uiItemR(row, ptr, "type", 0, "", 0);
+               uiItemR(row, ptr, "name", 0, "", 0);
+       } else {
+               uiItemL(row, sensor_name(sens->type), 0);
+               uiItemL(row, sens->name, 0);
+       }
  
        subrow= uiLayoutRow(row, 0);
        uiLayoutSetActive(subrow, ((RNA_boolean_get(logic_ptr, "sensors_show_active_states")
        uiItemR(subrow, ptr, "pinned", UI_ITEM_R_NO_BG, "", 0);
  
        if(RNA_boolean_get(ptr, "expanded")==0) {
-               uiItemEnumO(row, "LOGIC_OT_sensor_move", "", ICON_TRIA_UP, "direction", 1); // up
-               uiItemEnumO(row, "LOGIC_OT_sensor_move", "", ICON_TRIA_DOWN, "direction", 2); // down
+               subrow= uiLayoutRow(row, 1);
+               uiItemEnumO(subrow, "LOGIC_OT_sensor_move", "", ICON_TRIA_UP, "direction", 1); // up
+               uiItemEnumO(subrow, "LOGIC_OT_sensor_move", "", ICON_TRIA_DOWN, "direction", 2); // down
        }
  
        uiItemO(row, "", ICON_X, "LOGIC_OT_sensor_remove");
@@@ -3519,27 -3526,35 +3527,35 @@@ void draw_brick_sensor(uiLayout *layout
  }
  
  /* Controller code */
- static void draw_controller_header(uiLayout *layout, PointerRNA *ptr)
+ static void draw_controller_header(uiLayout *layout, PointerRNA *ptr, int xco, int width, int yco)
  {
-       uiLayout *box, *row;
-       char name[3]; //XXX provisorly for state number
+       uiLayout *box, *row, *subrow;
+       bController *cont= (bController *)ptr->data;
+       char state[3];
+       sprintf(state, "%d", RNA_int_get(ptr, "state"));
        
        box= uiLayoutBox(layout);
        row= uiLayoutRow(box, 0);
        
        uiItemR(row, ptr, "expanded", UI_ITEM_R_NO_BG, "", 0);
-       uiItemR(row, ptr, "type", 0, "", 0);
-       uiItemR(row, ptr, "name", 0, "", 0);
-       /* XXX provisory: state number */
-       sprintf(name, "%d", RNA_int_get(ptr, "state_number"));
-       uiItemL(row, name, 0);
+       if(RNA_boolean_get(ptr, "expanded")) {
+               uiItemR(row, ptr, "type", 0, "", 0);
+               uiItemR(row, ptr, "name", 0, "", 0);
+               /* XXX provisory for Blender 2.50Beta */
+               uiDefBlockBut(uiLayoutGetBlock(layout), controller_state_mask_menu, cont, state, (short)(xco+width-44), yco, 22+22, UI_UNIT_Y, "Set controller state index (from 1 to 30)");
+       } else {
+               uiItemL(row, controller_name(cont->type), 0);
+               uiItemL(row, cont->name, 0);
+               uiItemL(row, state, 0);
+       }
  
        uiItemR(row, ptr, "priority", 0, "", 0);
  
        if(RNA_boolean_get(ptr, "expanded")==0) {
-               uiItemEnumO(row, "LOGIC_OT_controller_move", "", ICON_TRIA_UP, "direction", 1); // up
-               uiItemEnumO(row, "LOGIC_OT_controller_move", "", ICON_TRIA_DOWN, "direction", 2); // down
+               subrow= uiLayoutRow(row, 1);
+               uiItemEnumO(subrow, "LOGIC_OT_controller_move", "", ICON_TRIA_UP, "direction", 1); // up
+               uiItemEnumO(subrow, "LOGIC_OT_controller_move", "", ICON_TRIA_DOWN, "direction", 2); // down
        }
        uiItemO(row, "", ICON_X, "LOGIC_OT_controller_remove");
  }
@@@ -3607,13 -3622,19 +3623,19 @@@ void draw_brick_controller(uiLayout *la
  static void draw_actuator_header(uiLayout *layout, PointerRNA *ptr, PointerRNA *logic_ptr)
  {
        uiLayout *box, *row, *subrow;
+       bActuator *act= (bActuator *)ptr->data;
        
        box= uiLayoutBox(layout);
        row= uiLayoutRow(box, 0);
        
        uiItemR(row, ptr, "expanded", UI_ITEM_R_NO_BG, "", 0);
-       uiItemR(row, ptr, "type", 0, "", 0);
-       uiItemR(row, ptr, "name", 0, "", 0);
+       if(RNA_boolean_get(ptr, "expanded")) {
+               uiItemR(row, ptr, "type", 0, "", 0);
+               uiItemR(row, ptr, "name", 0, "", 0);
+       } else {
+               uiItemL(row, actuator_name(act->type), 0);
+               uiItemL(row, act->name, 0);
+       }
  
        subrow= uiLayoutRow(row, 0);
        uiLayoutSetActive(subrow, ((RNA_boolean_get(logic_ptr, "actuators_show_active_states")
        uiItemR(subrow, ptr, "pinned", UI_ITEM_R_NO_BG, "", 0);
  
        if(RNA_boolean_get(ptr, "expanded")==0) {
-               uiItemEnumO(row, "LOGIC_OT_actuator_move", "", ICON_TRIA_UP, "direction", 1); // up
-               uiItemEnumO(row, "LOGIC_OT_actuator_move", "", ICON_TRIA_DOWN, "direction", 2); // down
+               subrow= uiLayoutRow(row, 1);
+               uiItemEnumO(subrow, "LOGIC_OT_actuator_move", "", ICON_TRIA_UP, "direction", 1); // up
+               uiItemEnumO(subrow, "LOGIC_OT_actuator_move", "", ICON_TRIA_DOWN, "direction", 2); // down
        }
        uiItemO(row, "", ICON_X, "LOGIC_OT_actuator_remove");
  }
@@@ -4250,7 -4272,7 +4273,7 @@@ static void draw_actuator_sound(uiLayou
  {
        uiLayout *row, *col;
  
-       uiTemplateID(layout, C, ptr, "sound", NULL, "SOUND_OT_open", NULL);
+       uiTemplateID(layout, C, ptr, "sound", NULL, "SOUND_OT_open", NULL, NULL);
        if (!RNA_pointer_get(ptr, "sound").data)
        {
                uiItemL(layout, "Select a sound from the list or load a new one", 0);
@@@ -4307,31 -4329,6 +4330,31 @@@ static void draw_actuator_visibility(ui
        uiItemR(row, ptr, "children", 0, NULL, 0);
  }
  
 +static void draw_actuator_steering(uiLayout *layout, PointerRNA *ptr)
 +{
 +      uiLayout *row;
 +
 +      uiItemR(layout, ptr, "mode", 0, NULL, 0);
 +      uiItemR(layout, ptr, "target", 0, NULL, 0);
 +      uiItemR(layout, ptr, "navmesh", 0, NULL, 0);    
 +
 +      row = uiLayoutRow(layout, 0);
 +      uiItemR(row, ptr, "distance", 0, NULL, 0);
 +      uiItemR(row, ptr, "velocity", 0, NULL, 0);
 +      row = uiLayoutRow(layout, 0);
 +      uiItemR(row, ptr, "acceleration", 0, NULL, 0);
 +      uiItemR(row, ptr, "turnspeed", 0, NULL, 0);
 +      row = uiLayoutRow(layout, 0);
 +      uiItemR(row, ptr, "selfterminated", 0, NULL, 0);
 +      if (RNA_enum_get(ptr, "mode")==ACT_STEERING_PATHFOLLOWING)
 +      {
 +              uiItemR(row, ptr, "updateperiod", 0, NULL, 0);  
 +              row = uiLayoutRow(layout, 0);
 +      }
 +      uiItemR(row, ptr, "enablevisualization", 0, NULL, 0);   
 +}
 +
 +
  void draw_brick_actuator(uiLayout *layout, PointerRNA *ptr, bContext *C)
  {
        uiLayout *box;
                case ACT_VISIBILITY:
                        draw_actuator_visibility(box, ptr);
                        break;
 +              case ACT_STEERING:
 +                      draw_actuator_steering(box, ptr);
        }
  }
  
@@@ -4405,6 -4400,7 +4428,7 @@@ static void logic_buttons_new(bContext 
  {
        SpaceLogic *slogic= CTX_wm_space_logic(C);
        Object *ob= CTX_data_active_object(C);
+       Object *act_ob= ob;
        ID **idar;
        
        PointerRNA logic_ptr, settings_ptr;
  
                row = uiLayoutRow(split, 1);
                uiDefButBitS(block, TOG, OB_SHOWCONT, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide controllers");
-               uiItemMenuEnumO(row, "LOGIC_OT_controller_add", "type", "Add Controller", 0);
+               if (ob == act_ob)
+                       uiItemMenuEnumO(row, "LOGIC_OT_controller_add", "type", "Add Controller", 0);
  
                if (RNA_boolean_get(&settings_ptr, "show_state_panel")) {
  
                        uiLayoutSetContextPointer(col, "controller", &ptr);
                        
                        /* should make UI template for controller header.. function will do for now */
-                       draw_controller_header(col, &ptr);
-                       
+ //                    draw_controller_header(col, &ptr);
+                       draw_controller_header(col, &ptr, xco, width, yco); //provisory for 2.50 beta
                        /* draw the brick contents */
                        draw_brick_controller(col, &ptr);
                        
  
                row = uiLayoutRow(layout, 1);
                uiDefButBitS(block, TOG, OB_SHOWSENS, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide sensors");
-               uiItemMenuEnumO(row, "LOGIC_OT_sensor_add", "type", "Add Sensor", 0);
+               if (ob == act_ob)
+                       uiItemMenuEnumO(row, "LOGIC_OT_sensor_add", "type", "Add Sensor", 0);
                
                if ((ob->scaflag & OB_SHOWSENS) == 0) continue;
                
  
                row = uiLayoutRow(layout, 1);
                uiDefButBitS(block, TOG, OB_SHOWACT, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide actuators");
-               uiItemMenuEnumO(row, "LOGIC_OT_actuator_add", "type", "Add Actuator", 0);
+               if (ob == act_ob)
+                       uiItemMenuEnumO(row, "LOGIC_OT_actuator_add", "type", "Add Actuator", 0);
  
                if ((ob->scaflag & OB_SHOWACT) == 0) continue;
                
@@@ -214,19 -214,6 +214,19 @@@ typedef struct bArmatureActuator 
        struct Object *subtarget;
  } bArmatureActuator;
  
 +typedef struct bSteeringActuator {
 +      char pad[7];
 +      char flag;
 +      int type;               /* 0=seek, 1=flee, 2=path following */
 +      float dist;
 +      float velocity;
 +      float acceleration;
 +      float turnspeed;
 +      int updateTime;
 +      struct Object *target;
 +      struct Object *navmesh;
 +} bSteeringActuator;
 +
  typedef struct bActuator {
        struct bActuator *next, *prev, *mynew;
        short type;
        
  } bActuator;
  
- typedef struct FreeCamera {
-       float mass, accelleration;
-       float maxspeed, maxrotspeed,  maxtiltspeed;
-       int flag;
-       float rotdamp, tiltdamp, speeddamp, pad;
- } FreeCamera;
  /* objectactuator->flag */
  #define ACT_FORCE_LOCAL                       1
  #define ACT_TORQUE_LOCAL              2
  #define ACT_SHAPEACTION 21
  #define ACT_STATE             22
  #define ACT_ARMATURE  23
 +#define ACT_STEERING    24
  
  /* actuator flag */
  #define ACT_SHOW              1
  #define ACT_CAMERA_X          (float)'x'
  #define ACT_CAMERA_Y          (float)'y'
  
 +/* steeringactuator->type */
 +#define ACT_STEERING_SEEK   0
 +#define ACT_STEERING_FLEE   1
 +#define ACT_STEERING_PATHFOLLOWING   2
 +/* steeringactuator->flag */
 +#define ACT_STEERING_SELFTERMINATED   1
 +#define ACT_STEERING_ENABLEVISUALIZATION   2
 +
  #endif
  
  
@@@ -182,8 -182,6 +182,8 @@@ typedef struct Object 
        float max_vel; /* clamp the maximum velocity 0.0 is disabled */
        float min_vel; /* clamp the maximum velocity 0.0 is disabled */
        float m_contactProcessingThreshold;
 +      float obstacleRad;
 +      char pad0[4];
        
        short rotmode;          /* rotation mode - uses defines set out in DNA_action_types.h for PoseChannel rotations... */
        
@@@ -303,7 -301,7 +303,7 @@@ extern Object workob
  #define OB_LAMP                       10
  #define OB_CAMERA             11
  
#define OB_WAVE                       21
// #define OB_WAVE                    21
  #define OB_LATTICE            22
  
  /* 23 and 24 are for life and sector (old file compat.) */
  #define OB_SOFT_BODY  0x20000
  #define OB_OCCLUDER           0x40000
  #define OB_SENSOR             0x80000
 +#define OB_NAVMESH            0x100000
 +#define OB_HASOBSTACLE        0x200000
  
  /* ob->gameflag2 */
  #define OB_NEVER_DO_ACTIVITY_CULLING  1
  #define OB_BODY_TYPE_SOFT                     4
  #define OB_BODY_TYPE_OCCLUDER         5
  #define OB_BODY_TYPE_SENSOR                   6
 +#define OB_BODY_TYPE_NAVMESH          7
  
  /* ob->scavisflag */
  #define OB_VIS_SENS           1
@@@ -428,23 -428,6 +428,23 @@@ typedef struct GameFraming 
  #define SCE_GAMEFRAMING_EXTEND 1
  #define SCE_GAMEFRAMING_SCALE  2
  
 +typedef struct RecastData
 +{
 +      float cellsize;
 +      float cellheight;
 +      float agentmaxslope;
 +      float agentmaxclimb;
 +      float agentheight;
 +      float agentradius;
 +      float edgemaxlen;
 +      float edgemaxerror;
 +      float regionminsize;
 +      float regionmergesize;
 +      int vertsperpoly;
 +      float detailsampledist;
 +      float detailsamplemaxerror;
 +} RecastData;
 +
  typedef struct GameData {
  
        /* physics (it was in world)*/
         * bit 3: (gameengine): Activity culling is enabled.
         * bit 5: (gameengine) : enable Bullet DBVT tree for view frustrum culling
        */
 -      short mode, flag, matmode, pad[3];
 +      short mode, flag, matmode/*, pad[2]*/;
        short occlusionRes;             /* resolution of occlusion Z buffer in pixel */
        short physicsEngine;
        short ticrate, maxlogicstep, physubstep, maxphystep;
 +      short obstacleSimulation;
 +      float levelHeight;
  
        /*  standalone player */
        struct GameFraming framing;
        /* stereo/dome mode */
        struct GameDome dome;
        short stereoflag, stereomode, xsch, ysch; //xsch and ysch can be deleted !!!
 -      float eyeseparation, pad1;
 +      float eyeseparation;
 +      RecastData recastData;
  } GameData;
  
  #define STEREO_NOSTEREO               1
  #define WOPHY_ODE             4
  #define WOPHY_BULLET  5
  
 +/* obstacleSimulation */
 +#define OBSTSIMULATION_NONE           0
 +#define OBSTSIMULATION_TOI            1
 +
  /* GameData.flag */
  #define GAME_ENABLE_ALL_FRAMES                                (1 << 1)
  #define GAME_SHOW_DEBUG_PROPS                         (1 << 2)
  #define GAME_GLSL_NO_EXTRA_TEX                                (1 << 11)
  #define GAME_IGNORE_DEPRECATION_WARNINGS      (1 << 12)
  #define GAME_ENABLE_ANIMATION_RECORD          (1 << 13)
 +#define GAME_SHOW_OBSTACLE_SIMULATION         (1 << 14)
  
  /* GameData.matmode */
  #define GAME_MAT_TEXFACE      0
@@@ -594,12 -569,30 +594,30 @@@ typedef struct Sculpt 
        Paint paint;
  
        /* For rotating around a pivot point */
-       float pivot[3];
+       //float pivot[3]; XXX not used?
        int flags;
  
        /* Control tablet input */
-       char tablet_size, tablet_strength;
-       char pad[6];
+       //char tablet_size, tablet_strength; XXX not used?
+       int radial_symm[3];
+       // all this below is used to communicate with the cursor drawing routine
+       /* record movement of mouse so that rake can start at an intuitive angle */
+       float last_x, last_y;
+       float last_angle;
+       int draw_anchored;
+       int   anchored_size;
+       float anchored_location[3];
+       float anchored_initial_mouse[2];
+       int draw_pressure;
+       float pressure_value;
+       float special_rotation;
+       int pad;
  } Sculpt;
  
  typedef struct VPaint {
@@@ -1118,7 -1111,6 +1136,6 @@@ typedef struct Scene 
  #define F_ERROR                       -1
  #define F_START                       0
  #define F_SCENE                       1
- #define F_SET                 2
  #define F_DUPLI                       3
  
  /* audio->flag */
  
  /* Paint.flags */
  typedef enum {
-       PAINT_SHOW_BRUSH = 1,
-       PAINT_FAST_NAVIGATE = 2
+       PAINT_SHOW_BRUSH = (1<<0),
+       PAINT_FAST_NAVIGATE = (1<<1),
+       PAINT_SHOW_BRUSH_ON_SURFACE = (1<<2),
  } PaintFlags;
  
  /* Sculpt.flags */
  /* These can eventually be moved to paint flags? */
  typedef enum SculptFlags {
-       SCULPT_SYMM_X = 1,
-       SCULPT_SYMM_Y = 2,
-       SCULPT_SYMM_Z = 4,
-       SCULPT_LOCK_X = 64,
-       SCULPT_LOCK_Y = 128,
-       SCULPT_LOCK_Z = 256
+       SCULPT_SYMM_X = (1<<0),
+       SCULPT_SYMM_Y = (1<<1),
+       SCULPT_SYMM_Z = (1<<2),
+       SCULPT_LOCK_X = (1<<3),
+       SCULPT_LOCK_Y = (1<<4),
+       SCULPT_LOCK_Z = (1<<5),
+       SCULPT_SYMMETRY_FEATHER = (1<<6),
+       SCULPT_USE_OPENMP = (1<<7),
  } SculptFlags;
  
  /* ImagePaintSettings.flag */
@@@ -54,7 -54,6 +54,7 @@@ EnumPropertyItem actuator_type_items[] 
        {ACT_SOUND, "SOUND", 0, "Sound", ""},
        {ACT_STATE, "STATE", 0, "State", ""},
        {ACT_VISIBILITY, "VISIBILITY", 0, "Visibility", ""},
 +      {ACT_STEERING, "STEERING", 0, "Steering", ""},
        {0, NULL, 0, NULL, NULL}};
  
  #ifdef RNA_RUNTIME
@@@ -102,8 -101,6 +102,8 @@@ static StructRNA* rna_Actuator_refine(s
                        return &RNA_StateActuator;
                case ACT_ARMATURE:
                        return &RNA_ArmatureActuator;
 +              case ACT_STEERING:
 +                      return &RNA_SteeringActuator;
                default:
                        return &RNA_Actuator;
        }
@@@ -389,7 -386,6 +389,7 @@@ EnumPropertyItem *rna_Actuator_type_ite
        RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_PROPERTY);
        RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_RANDOM);
        RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_SCENE);
 +      RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_STEERING);
  
        if (ob != NULL) {
                if (ob->type==OB_MESH){
@@@ -441,18 -437,6 +441,18 @@@ static void rna_Actuator_Armature_updat
        constraint[0] = 0;
  }
  
 +static void rna_SteeringActuator_navmesh_set(PointerRNA *ptr, PointerRNA value)
 +{
 +      bActuator *act = (bActuator*)ptr->data;
 +      bSteeringActuator *sa = (bSteeringActuator*) act->data;
 +
 +      Object* obj = value.data;
 +      if (obj && obj->body_type==OB_BODY_TYPE_NAVMESH)
 +              sa->navmesh = obj;
 +      else
 +              sa->navmesh = NULL;
 +}
 +
  /* note: the following set functions exists only to avoid id refcounting */
  static void rna_Actuator_editobject_mesh_set(PointerRNA *ptr, PointerRNA value)
  {
@@@ -622,100 -606,100 +622,100 @@@ static void rna_def_object_actuator(Ble
  
        prop= RNA_def_property(srna, "proportional_coefficient", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "forcerot[0]");
-       RNA_def_property_ui_range(prop, 0.0, 200.0, 1.0, 0.1);
+       RNA_def_property_ui_range(prop, 0.0, 200.0, 10, 2);
        RNA_def_property_ui_text(prop, "Proportional Coefficient", "Typical value is 60x integral coefficient");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        prop= RNA_def_property(srna, "integral_coefficient", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "forcerot[1]");
-       RNA_def_property_ui_range(prop, 0.0, 3.0, 0.1, 0.01);
+       RNA_def_property_ui_range(prop, 0.0, 3.0, 10, 2);
        RNA_def_property_float_funcs(prop, NULL, "rna_ObjectActuator_integralcoefficient_set", NULL);
        RNA_def_property_ui_text(prop, "Integral Coefficient", "Low value (0.01) for slow response, high value (0.5) for fast response");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        prop= RNA_def_property(srna, "derivate_coefficient", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "forcerot[2]");
-       RNA_def_property_ui_range(prop, -100.0, 100.0, 1.0, 0.1);
+       RNA_def_property_ui_range(prop, -100.0, 100.0, 10, 2);
        RNA_def_property_ui_text(prop, "Derivate Coefficient", "Not required, high values can cause instability");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        /* Servo Limit */
        prop= RNA_def_property(srna, "force_max_x", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "dloc[0]");
-       RNA_def_property_ui_range(prop, -100.0, 100.0, 1.0, 0.1);
+       RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2);
        RNA_def_property_ui_text(prop, "Max", "Set the upper limit for force");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        prop= RNA_def_property(srna, "force_min_x", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "drot[0]");
-       RNA_def_property_ui_range(prop, -100.0, 100.0, 1.0, 0.1);
+       RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2);
        RNA_def_property_ui_text(prop, "Min", "Set the lower limit for force");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        prop= RNA_def_property(srna, "force_max_y", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_float_sdna(prop, NULL, "dloc[0]");
-       RNA_def_property_ui_range(prop, -100.0, 100.0, 1.0, 0.1);
+       RNA_def_property_float_sdna(prop, NULL, "dloc[1]");
+       RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2);
        RNA_def_property_ui_text(prop, "Max", "Set the upper limit for force");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        prop= RNA_def_property(srna, "force_min_y", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "drot[1]");
-       RNA_def_property_ui_range(prop, -100.0, 100.0, 1.0, 0.1);
+       RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2);
        RNA_def_property_ui_text(prop, "Min", "Set the lower limit for force");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        prop= RNA_def_property(srna, "force_max_z", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "dloc[2]");
-       RNA_def_property_ui_range(prop, -100.0, 100.0, 1.0, 0.1);
+       RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2);
        RNA_def_property_ui_text(prop, "Max", "Set the upper limit for force");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        prop= RNA_def_property(srna, "force_min_z", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "drot[2]");
-       RNA_def_property_ui_range(prop, -100.0, 100.0, 1.0, 0.1);
+       RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2);
        RNA_def_property_ui_text(prop, "Min", "Set the lower limit for force");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        /* floats 3 Arrays*/
-       prop= RNA_def_property(srna, "loc", PROP_FLOAT, PROP_TRANSLATION);
+       prop= RNA_def_property(srna, "loc", PROP_FLOAT, PROP_XYZ);
        RNA_def_property_float_sdna(prop, NULL, "dloc");
        RNA_def_property_array(prop, 3);
-       RNA_def_property_ui_range(prop, -10000.0, 10000.0, 0.1, 0.001);
+       RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2);
        RNA_def_property_ui_text(prop, "Loc", "Sets the location");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
-       prop= RNA_def_property(srna, "rot", PROP_FLOAT, PROP_TRANSLATION);
+       prop= RNA_def_property(srna, "rot", PROP_FLOAT, PROP_XYZ);
        RNA_def_property_float_sdna(prop, NULL, "drot");
        RNA_def_property_array(prop, 3);
-       RNA_def_property_ui_range(prop, -10000.0, 10000.0, 0.1, 0.001);
+       RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2);
        RNA_def_property_ui_text(prop, "Rot", "Sets the rotation");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
-       prop= RNA_def_property(srna, "force", PROP_FLOAT, PROP_TRANSLATION);
+       prop= RNA_def_property(srna, "force", PROP_FLOAT, PROP_XYZ);
        RNA_def_property_float_sdna(prop, NULL, "forceloc");
        RNA_def_property_array(prop, 3);
-       RNA_def_property_ui_range(prop, -10000.0, 10000.0, 0.1, 0.001);
+       RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2);
        RNA_def_property_ui_text(prop, "Force", "Sets the force");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
-       prop= RNA_def_property(srna, "torque", PROP_FLOAT, PROP_TRANSLATION);
+       prop= RNA_def_property(srna, "torque", PROP_FLOAT, PROP_XYZ);
        RNA_def_property_float_sdna(prop, NULL, "forcerot");
        RNA_def_property_array(prop, 3);
-       RNA_def_property_ui_range(prop, -10000.0, 10000.0, 0.1, 0.001);
+       RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2);
        RNA_def_property_ui_text(prop, "Torque", "Sets the torque");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
-       prop= RNA_def_property(srna, "linear_velocity", PROP_FLOAT, PROP_TRANSLATION);
+       prop= RNA_def_property(srna, "linear_velocity", PROP_FLOAT, PROP_XYZ);
        RNA_def_property_float_sdna(prop, NULL, "linearvelocity");
        RNA_def_property_array(prop, 3);
-       RNA_def_property_ui_range(prop, -10000.0, 10000.0, 0.1, 0.001);
+       RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2);
        RNA_def_property_ui_text(prop, "Linear Velocity", "Sets the linear velocity (in Servo mode it sets the target relative linear velocity, it will be achieved by automatic application of force. Null velocity is a valid target)");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
-       prop= RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_TRANSLATION);
+       prop= RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_XYZ);
        RNA_def_property_float_sdna(prop, NULL, "angularvelocity");
        RNA_def_property_array(prop, 3);
-       RNA_def_property_ui_range(prop, -10000.0, 10000.0, 0.1, 0.001);
+       RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2);
        RNA_def_property_ui_text(prop, "Angular Velocity", "Sets the angular velocity");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
        
@@@ -864,17 -848,17 +864,17 @@@ static void rna_def_camera_actuator(Ble
  
        /* floats */
        prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_ui_range(prop, 0.0, 20.0, 0.1, 0.1);
+       RNA_def_property_ui_range(prop, 0.0, 20.0, 1, 2);
        RNA_def_property_ui_text(prop, "Height", "");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        prop= RNA_def_property(srna, "min", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_ui_range(prop, 0.0, 20.0, 0.1, 0.1);
+       RNA_def_property_ui_range(prop, 0.0, 20.0, 1, 2);
        RNA_def_property_ui_text(prop, "Min", "");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        prop= RNA_def_property(srna, "max", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_ui_range(prop, 0.0, 20.0, 0.1, 0.1);
+       RNA_def_property_ui_range(prop, 0.0, 20.0, 1, 2);
        RNA_def_property_ui_text(prop, "Max", "");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
@@@ -918,62 -902,62 +918,62 @@@ static void rna_def_sound_actuator(Blen
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        prop= RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_ui_range(prop, 0.0, 1.0, 0.1, 0.01);
+       RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2);
        RNA_def_property_range(prop, 0.0, 2.0);
        RNA_def_property_ui_text(prop, "Volume", "Sets the initial volume of the sound");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        prop= RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_ui_range(prop, -12.0, 12.0, 1.0, 0.1);
+       RNA_def_property_ui_range(prop, -12.0, 12.0, 1, 2);
        RNA_def_property_ui_text(prop, "Pitch", "Sets the pitch of the sound");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
        
        /* floats - 3D Parameters */
        prop= RNA_def_property(srna, "minimum_gain_3d", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "sound3D.min_gain");
-       RNA_def_property_ui_range(prop, 0.0, 1.0, 0.1, 0.01);
+       RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2);
        RNA_def_property_ui_text(prop, "Minimum Gain", "The minimum gain of the sound, no matter how far it is away");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        prop= RNA_def_property(srna, "maximum_gain_3d", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "sound3D.max_gain");
-       RNA_def_property_ui_range(prop, 0.0, 1.0, 0.1, 0.01);
+       RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2);
        RNA_def_property_ui_text(prop, "Maximum Gain", "The maximum gain of the sound, no matter how near it is");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        prop= RNA_def_property(srna, "reference_distance_3d", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "sound3D.reference_distance");
-       RNA_def_property_ui_range(prop, 0.0, FLT_MAX, 1.0, 0.01);
+       RNA_def_property_ui_range(prop, 0.0, FLT_MAX, 1, 2);
        RNA_def_property_ui_text(prop, "Reference Distance", "The distance where the sound has a gain of 1.0");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
        
        prop= RNA_def_property(srna, "max_distance_3d", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "sound3D.max_distance");
-       RNA_def_property_ui_range(prop, 0.0, FLT_MAX, 1.0, 0.01);
+       RNA_def_property_ui_range(prop, 0.0, FLT_MAX, 1, 2);
        RNA_def_property_ui_text(prop, "Maximum Distance", "The maximum distance at which you can hear the sound");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        prop= RNA_def_property(srna, "rolloff_factor_3d", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "sound3D.rolloff_factor");
-       RNA_def_property_ui_range(prop, 0.0, 5.0, 1.0, 0.01);
+       RNA_def_property_ui_range(prop, 0.0, 5.0, 1, 2);
        RNA_def_property_ui_text(prop, "Rolloff", "The influence factor on volume depending on distance");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        prop= RNA_def_property(srna, "cone_outer_gain_3d", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "sound3D.cone_outer_gain");
-       RNA_def_property_ui_range(prop, 0.0, 1.0, 0.1, 0.01);
+       RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2);
        RNA_def_property_ui_text(prop, "Cone Outer Gain", "The gain outside the outer cone. The gain in the outer cone will be interpolated between this value and the normal gain in the inner cone");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        prop= RNA_def_property(srna, "cone_outer_angle_3d", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "sound3D.cone_outer_angle");
-       RNA_def_property_ui_range(prop, 0.0, 360.0, 1.0, 0.01);
+       RNA_def_property_ui_range(prop, 0.0, 360.0, 1, 2);
        RNA_def_property_ui_text(prop, "Cone Outer Angle", "The angle of the outer cone");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        prop= RNA_def_property(srna, "cone_inner_angle_3d", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "sound3D.cone_inner_angle");
-       RNA_def_property_ui_range(prop, 0.0, 360.0, 1.0, 0.01);
+       RNA_def_property_ui_range(prop, 0.0, 360.0, 1, 2);
        RNA_def_property_ui_text(prop, "Cone Inner Angle", "The angle of the inner cone");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
        
@@@ -1148,41 -1132,41 +1148,41 @@@ static void rna_def_constraint_actuator
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        /* ACT_CONST_TYPE_ORI */
-       prop= RNA_def_property(srna, "max_rotation", PROP_FLOAT, PROP_TRANSLATION);
+       prop= RNA_def_property(srna, "max_rotation", PROP_FLOAT, PROP_XYZ);
        RNA_def_property_float_sdna(prop, NULL, "maxrot");
        RNA_def_property_array(prop, 3);
-       RNA_def_property_ui_range(prop, -2000.0, 2000.0, 0.1, 0.001);
+       RNA_def_property_ui_range(prop, -2000.0, 2000.0, 10, 2);
        RNA_def_property_ui_text(prop, "Reference Direction", "Reference Direction");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        prop= RNA_def_property(srna, "min_angle", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "minloc[0]");
-       RNA_def_property_ui_range(prop, 0.0, 180.0, 0.1, 0.01);
+       RNA_def_property_ui_range(prop, 0.0, 180.0, 10, 2);
        RNA_def_property_ui_text(prop, "Min Angle", "Minimum angle (in degree) to maintain with target direction. No correction is done if angle with target direction is between min and max");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        prop= RNA_def_property(srna, "max_angle", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "maxloc[0]");
-       RNA_def_property_ui_range(prop, 0.0, 180.0, 0.1, 0.01);
+       RNA_def_property_ui_range(prop, 0.0, 180.0, 10, 2);
        RNA_def_property_ui_text(prop, "Max Angle", "Maximum angle (in degree) allowed with target direction. No correction is done if angle with target direction is between min and max");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        /* ACT_CONST_TYPE_FH */
        prop= RNA_def_property(srna, "fh_height", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_funcs(prop, "rna_ConstraintActuator_fhheight_get", "rna_ConstraintActuator_fhheight_set", NULL);
-       RNA_def_property_ui_range(prop, 0.01, 2000.0, 0.1, 0.01);
+       RNA_def_property_ui_range(prop, 0.01, 2000.0, 10, 2);
        RNA_def_property_ui_text(prop, "Distance", "Height of the Fh area");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        prop= RNA_def_property(srna, "spring", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_funcs(prop, "rna_ConstraintActuator_spring_get", "rna_ConstraintActuator_spring_set", NULL);
-       RNA_def_property_ui_range(prop, 0.0, 1.0, 0.1, 0.01);
+       RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 2);
        RNA_def_property_ui_text(prop, "Fh", "Spring force within the Fh area");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        prop= RNA_def_property(srna, "fh_damping", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "maxrot[0]");
-       RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 1);
+       RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 2);
        RNA_def_property_ui_text(prop, "Damping", "Damping factor of the Fh spring force");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
@@@ -1291,22 -1275,22 +1291,22 @@@ static void rna_def_edit_object_actuato
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        prop= RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_ui_range(prop, 0, 10000, 1, 0.01);
+       RNA_def_property_ui_range(prop, 0, 10000, 1, 2);
        RNA_def_property_ui_text(prop, "Mass", "The mass of the object");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
        /* floats 3 Arrays*/
-       prop= RNA_def_property(srna, "linear_velocity", PROP_FLOAT, PROP_TRANSLATION);
+       prop= RNA_def_property(srna, "linear_velocity", PROP_FLOAT, PROP_XYZ);
        RNA_def_property_float_sdna(prop, NULL, "linVelocity");
        RNA_def_property_array(prop, 3);
-       RNA_def_property_ui_range(prop, -100.0, 100.0, 0.1, 0.01);
+       RNA_def_property_ui_range(prop, -100.0, 100.0, 10, 2);
        RNA_def_property_ui_text(prop, "Linear Velocity", "Velocity upon creation");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
-       prop= RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_TRANSLATION);
+       prop= RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_XYZ);
        RNA_def_property_float_sdna(prop, NULL, "angVelocity");
        RNA_def_property_array(prop, 3);
-       RNA_def_property_ui_range(prop, -10000.0, 10000.0, 1.0, 0.01);
+       RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2);
        RNA_def_property_ui_text(prop, "Angular Velocity", "Angular velocity upon creation");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
@@@ -1666,9 -1650,9 +1666,9 @@@ static void rna_def_twodfilter_actuator
        RNA_def_property_range(prop, 0, 99); //MAX_RENDER_PASS-1
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  
-       prop= RNA_def_property(srna, "motion_blur_value", PROP_FLOAT, PROP_NONE);
+       prop= RNA_def_property(srna, "motion_blur_factor", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "float_arg");
-       RNA_def_property_ui_text(prop, "Value", "Set motion blur value");
+       RNA_def_property_ui_text(prop, "Value", "Set motion blur factor");
        RNA_def_property_range(prop, 0.0, 1.0);
        RNA_def_property_update(prop, NC_LOGIC, NULL);
        
@@@ -1881,83 -1865,6 +1881,83 @@@ static void rna_def_armature_actuator(B
        RNA_def_property_update(prop, NC_LOGIC, NULL);
  }
  
 +static void rna_def_steering_actuator(BlenderRNA *brna)
 +{
 +      StructRNA *srna;
 +      PropertyRNA *prop;
 +
 +      static EnumPropertyItem prop_type_items[] ={
 +              {ACT_STEERING_SEEK, "SEEK", 0, "Seek", ""},
 +              {ACT_STEERING_FLEE, "FLEE", 0, "Flee", ""},
 +              {ACT_STEERING_PATHFOLLOWING, "PATHFOLLOWING", 0, "Path following", ""},
 +              {0, NULL, 0, NULL, NULL}};
 +
 +      srna= RNA_def_struct(brna, "SteeringActuator", "Actuator");
 +      RNA_def_struct_ui_text(srna, "Steering Actuator", "");
 +      RNA_def_struct_sdna_from(srna, "bSteeringActuator", "data");
 +
 +      prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
 +      RNA_def_property_enum_sdna(prop, NULL, "type");
 +      RNA_def_property_enum_items(prop, prop_type_items);
 +      RNA_def_property_ui_text(prop, "Behavior", "");
 +      RNA_def_property_update(prop, NC_LOGIC, NULL);
 +
 +      prop= RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_NONE);
 +      RNA_def_property_float_sdna(prop, NULL, "velocity");
 +      RNA_def_property_range(prop, 0.0, 1000.0);
 +      RNA_def_property_ui_text(prop, "Velocity", "Velocity magnitude");
 +      RNA_def_property_update(prop, NC_LOGIC, NULL);
 +
 +      prop= RNA_def_property(srna, "acceleration", PROP_FLOAT, PROP_NONE);
 +      RNA_def_property_float_sdna(prop, NULL, "acceleration");
 +      RNA_def_property_range(prop, 0.0, 1000.0);
 +      RNA_def_property_ui_text(prop, "Acceleration", "Max acceleration");
 +      RNA_def_property_update(prop, NC_LOGIC, NULL);
 +
 +      prop= RNA_def_property(srna, "turnspeed", PROP_FLOAT, PROP_NONE);
 +      RNA_def_property_float_sdna(prop, NULL, "turnspeed");
 +      RNA_def_property_range(prop, 0.0, 720.0);
 +      RNA_def_property_ui_text(prop, "Turn speed", "Max turn speed");
 +      RNA_def_property_update(prop, NC_LOGIC, NULL);
 +
 +      prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
 +      RNA_def_property_float_sdna(prop, NULL, "dist");
 +      RNA_def_property_range(prop, 0.0, 1000.0);
 +      RNA_def_property_ui_text(prop, "Dist", "Relax distance");
 +      RNA_def_property_update(prop, NC_LOGIC, NULL);
 +
 +      prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
 +      RNA_def_property_struct_type(prop, "Object");
 +      RNA_def_property_pointer_sdna(prop, NULL, "target");
 +      RNA_def_property_flag(prop, PROP_EDITABLE);
 +      RNA_def_property_ui_text(prop, "Target Object", "Set target object");
 +      RNA_def_property_update(prop, NC_LOGIC, NULL);
 +
 +      prop= RNA_def_property(srna, "selfterminated", PROP_BOOLEAN, PROP_NONE);
 +      RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_STEERING_SELFTERMINATED);
 +      RNA_def_property_ui_text(prop, "Self terminated", "Terminate when target is reached");
 +      RNA_def_property_update(prop, NC_LOGIC, NULL);
 +
 +      prop= RNA_def_property(srna, "enablevisualization", PROP_BOOLEAN, PROP_NONE);
 +      RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_STEERING_ENABLEVISUALIZATION);
 +      RNA_def_property_ui_text(prop, "Visualize", "Enable debug visualization");
 +      RNA_def_property_update(prop, NC_LOGIC, NULL);
 +
 +      prop= RNA_def_property(srna, "updateperiod", PROP_INT, PROP_NONE);
 +      RNA_def_property_int_sdna(prop, NULL, "updateTime");
 +      RNA_def_property_ui_range(prop, -1, 100000, 1, 1);
 +      RNA_def_property_ui_text(prop, "Update period", "Path update period");
 +      RNA_def_property_update(prop, NC_LOGIC, NULL);
 +
 +      prop= RNA_def_property(srna, "navmesh", PROP_POINTER, PROP_NONE);
 +      RNA_def_property_struct_type(prop, "Object");
 +      RNA_def_property_pointer_sdna(prop, NULL, "navmesh");
 +      RNA_def_property_flag(prop, PROP_EDITABLE);
 +      RNA_def_property_ui_text(prop, "NavMesh Object", "Navigation mesh");
 +      RNA_def_property_pointer_funcs(prop, NULL, "rna_SteeringActuator_navmesh_set", NULL);
 +      RNA_def_property_update(prop, NC_LOGIC, NULL);
 +}
 +
  void RNA_def_actuator(BlenderRNA *brna)
  {
        rna_def_actuator(brna);
        rna_def_shape_action_actuator(brna);
        rna_def_state_actuator(brna);
        rna_def_armature_actuator(brna);
 +      rna_def_steering_actuator(brna);
  }
  
  #endif
@@@ -61,7 -61,6 +61,7 @@@ EnumPropertyItem modifier_type_items[] 
        {eModifierType_Solidify, "SOLIDIFY", ICON_MOD_SOLIDIFY, "Solidify", ""},
        {eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subdivision Surface", ""},
        {eModifierType_UVProject, "UV_PROJECT", ICON_MOD_UVPROJECT, "UV Project", ""},
 +      {eModifierType_NavMesh, "NAVMESH", ICON_MOD_DECIM, "Navigation mesh", ""},
        {0, "", 0, "Deform", ""},
        {eModifierType_Armature, "ARMATURE", ICON_MOD_ARMATURE, "Armature", ""},
        {eModifierType_Cast, "CAST", ICON_MOD_CAST, "Cast", ""},
@@@ -170,8 -169,6 +170,8 @@@ static StructRNA* rna_Modifier_refine(s
                        return &RNA_SolidifyModifier;
                case eModifierType_Screw:
                        return &RNA_ScrewModifier;
 +              case eModifierType_NavMesh:
 +                      return &RNA_NavMeshModifier;
                default:
                        return &RNA_Modifier;
        }
@@@ -986,11 -983,6 +986,6 @@@ static void rna_def_modifier_armature(B
        RNA_def_property_ui_text(prop, "Quaternion", "Deform rotation interpolation with quaternions");
        RNA_def_property_update(prop, 0, "rna_Modifier_update");
  
-       prop= RNA_def_property(srna, "b_bone_rest", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_B_BONE_REST);
-       RNA_def_property_ui_text(prop, "B-Bone Rest",  "Make B-Bones deform already in rest position");
-       RNA_def_property_update(prop, 0, "rna_Modifier_update");
        prop= RNA_def_property(srna, "multi_modifier", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "multi", 0);
        RNA_def_property_ui_text(prop, "Multi Modifier",  "Use same input as previous modifier, and mix results using overall vgroup");
@@@ -2073,7 -2065,7 +2068,7 @@@ static void rna_def_modifier_solidify(B
        RNA_def_property_float_sdna(prop, NULL, "offset_fac");
        RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
        RNA_def_property_ui_range(prop, -1, 1, 0.1, 4);
-       RNA_def_property_ui_text(prop, "Offset", "");
+       RNA_def_property_ui_text(prop, "Offset", "Offset the thickness from the center");
        RNA_def_property_update(prop, 0, "rna_Modifier_update");
  
        prop= RNA_def_property(srna, "edge_crease_inner", PROP_FLOAT, PROP_FACTOR);
@@@ -2209,18 -2201,6 +2204,18 @@@ static void rna_def_modifier_screw(Blen
        RNA_def_property_update(prop, 0, "rna_Modifier_update");*/
  }
  
 +static void rna_def_modifier_navmesh(BlenderRNA *brna)
 +{
 +      StructRNA *srna;
 +      PropertyRNA *prop;
 +
 +      srna= RNA_def_struct(brna, "NavMeshModifier", "Modifier");
 +      RNA_def_struct_ui_text(srna, "NavMesh Modifier", "NavMesh modifier");
 +      RNA_def_struct_sdna(srna, "NavMeshModifierData");
 +      RNA_def_struct_ui_icon(srna, ICON_MOD_DECIM);
 +
 +}
 +
  void RNA_def_modifier(BlenderRNA *brna)
  {
        StructRNA *srna;
        rna_def_modifier_smoke(brna);
        rna_def_modifier_solidify(brna);
        rna_def_modifier_screw(brna);
 +      rna_def_modifier_navmesh(brna);
  }
  
  #endif
@@@ -770,8 -770,6 +770,8 @@@ static int rna_GameObjectSettings_physi
        if (!(ob->gameflag & OB_COLLISION)) {
                if (ob->gameflag & OB_OCCLUDER) {
                        ob->body_type = OB_BODY_TYPE_OCCLUDER;
 +              } else if (ob->gameflag & OB_NAVMESH){
 +                      ob->body_type = OB_BODY_TYPE_NAVMESH;
                } else {
                        ob->body_type = OB_BODY_TYPE_NO_COLLISION;
                }
@@@ -801,35 -799,31 +801,35 @@@ static void rna_GameObjectSettings_phys
        switch (ob->body_type) {
        case OB_BODY_TYPE_SENSOR:
                ob->gameflag |= OB_SENSOR|OB_COLLISION|OB_GHOST;
 -              ob->gameflag &= ~(OB_OCCLUDER|OB_DYNAMIC|OB_RIGID_BODY|OB_SOFT_BODY|OB_ACTOR|OB_ANISOTROPIC_FRICTION|OB_DO_FH|OB_ROT_FH|OB_COLLISION_RESPONSE);
 +              ob->gameflag &= ~(OB_OCCLUDER|OB_NAVMESH|OB_DYNAMIC|OB_RIGID_BODY|OB_SOFT_BODY|OB_ACTOR|OB_ANISOTROPIC_FRICTION|OB_DO_FH|OB_ROT_FH|OB_COLLISION_RESPONSE);
                break;
        case OB_BODY_TYPE_OCCLUDER:
                ob->gameflag |= OB_OCCLUDER;
 -              ob->gameflag &= ~(OB_SENSOR|OB_COLLISION|OB_DYNAMIC);
 +              ob->gameflag &= ~(OB_SENSOR|OB_COLLISION|OB_DYNAMIC|OB_NAVMESH);
 +              break;
 +      case OB_BODY_TYPE_NAVMESH:
 +              ob->gameflag |= OB_NAVMESH;
 +              ob->gameflag &= ~(OB_SENSOR|OB_COLLISION|OB_DYNAMIC|OB_OCCLUDER);
                break;
        case OB_BODY_TYPE_NO_COLLISION:
 -              ob->gameflag &= ~(OB_SENSOR|OB_COLLISION|OB_OCCLUDER|OB_DYNAMIC);
 +              ob->gameflag &= ~(OB_SENSOR|OB_COLLISION|OB_OCCLUDER|OB_DYNAMIC|OB_NAVMESH);
                break;
        case OB_BODY_TYPE_STATIC:
                ob->gameflag |= OB_COLLISION;
 -              ob->gameflag &= ~(OB_DYNAMIC|OB_RIGID_BODY|OB_SOFT_BODY|OB_OCCLUDER|OB_SENSOR);
 +              ob->gameflag &= ~(OB_DYNAMIC|OB_RIGID_BODY|OB_SOFT_BODY|OB_OCCLUDER|OB_SENSOR|OB_NAVMESH);
                break;
        case OB_BODY_TYPE_DYNAMIC:
                ob->gameflag |= OB_COLLISION|OB_DYNAMIC|OB_ACTOR;
 -              ob->gameflag &= ~(OB_RIGID_BODY|OB_SOFT_BODY|OB_OCCLUDER|OB_SENSOR);
 +              ob->gameflag &= ~(OB_RIGID_BODY|OB_SOFT_BODY|OB_OCCLUDER|OB_SENSOR|OB_NAVMESH);
                break;
        case OB_BODY_TYPE_RIGID:
                ob->gameflag |= OB_COLLISION|OB_DYNAMIC|OB_RIGID_BODY|OB_ACTOR;
 -              ob->gameflag &= ~(OB_SOFT_BODY|OB_OCCLUDER|OB_SENSOR);
 +              ob->gameflag &= ~(OB_SOFT_BODY|OB_OCCLUDER|OB_SENSOR|OB_NAVMESH);
                break;
        default:
        case OB_BODY_TYPE_SOFT:
                ob->gameflag |= OB_COLLISION|OB_DYNAMIC|OB_SOFT_BODY|OB_ACTOR;
 -              ob->gameflag &= ~(OB_RIGID_BODY|OB_OCCLUDER|OB_SENSOR);
 +              ob->gameflag &= ~(OB_RIGID_BODY|OB_OCCLUDER|OB_SENSOR|OB_NAVMESH);
  
                /* assume triangle mesh, if no bounds chosen for soft body */
                if ((ob->gameflag & OB_BOUNDS) && (ob->boundtype<OB_BOUND_POLYH))
@@@ -1132,7 -1126,6 +1132,7 @@@ static void rna_def_object_game_setting
                {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_NAVMESH, "NAVMESH", 0, "NavMesh", "Navigation mesh"},
                {0, NULL, 0, NULL, NULL}};
  
        srna= RNA_def_struct(brna, "GameObjectSettings", NULL);
        RNA_def_property_pointer_sdna(prop, NULL, "bsoft");
        RNA_def_property_ui_text(prop, "Soft Body Settings", "Settings for Bullet soft body simulation");
  
 +      prop= RNA_def_property(srna, "create_obstacle", PROP_BOOLEAN, PROP_NONE);
 +      RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_HASOBSTACLE);
 +      RNA_def_property_ui_text(prop, "Create obstacle", "Create representation for obstacle simulation");
 +
 +      prop= RNA_def_property(srna, "obstacle_radius", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
 +      RNA_def_property_float_sdna(prop, NULL, "obstacleRad");
 +      RNA_def_property_range(prop, 0.0, 1000.0);
 +      RNA_def_property_ui_text(prop, "Obstacle Radius", "Radius of object representation in obstacle simulation");
 +
        /* state */
  
        prop= RNA_def_property(srna, "visible_state", PROP_BOOLEAN, PROP_LAYER_MEMBER);
@@@ -1449,7 -1433,6 +1449,6 @@@ static void rna_def_object(BlenderRNA *
                {OB_MBALL, "META", 0, "Meta", ""},
                {OB_LAMP, "LAMP", 0, "Lamp", ""},
                {OB_CAMERA, "CAMERA", 0, "Camera", ""},
-               {OB_WAVE, "WAVE", 0, "Wave", ""},
                {OB_LATTICE, "LATTICE", 0, "Lattice", ""},
                {OB_ARMATURE, "ARMATURE", 0, "Armature", ""},
                {0, NULL, 0, NULL, NULL}};
        RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
        RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_layer_update");
  
-       prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT);
-       RNA_def_property_ui_text(prop, "Selected", "Object selection state");
+       RNA_def_property_ui_text(prop, "Select", "Object selection state");
        RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_select_update");
  
        /* for data access */
        RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_particle_update");
  
        /* restrict */
-       prop= RNA_def_property(srna, "restrict_view", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_VIEW);
        RNA_def_property_ui_text(prop, "Restrict View", "Restrict visibility in the viewport");
        RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, 1);
        RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
  
-       prop= RNA_def_property(srna, "restrict_select", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "hide_select", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_SELECT);
        RNA_def_property_ui_text(prop, "Restrict Select", "Restrict selection in the viewport");
        RNA_def_property_ui_icon(prop, ICON_RESTRICT_SELECT_OFF, 1);
        RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
  
-       prop= RNA_def_property(srna, "restrict_render", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "hide_render", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_RENDER);
        RNA_def_property_ui_text(prop, "Restrict Render", "Restrict renderability");
        RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
@@@ -2127,16 -2110,11 +2126,11 @@@ static void rna_def_object_base(Blender
        RNA_def_property_boolean_funcs(prop, NULL, "rna_Base_layer_set");
        RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Base_layer_update");
        
-       prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", BA_SELECT);
-       RNA_def_property_ui_text(prop, "Selected", "Object base selection state");
+       RNA_def_property_ui_text(prop, "Select", "Object base selection state");
        RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Base_select_update");
        
-       prop= RNA_def_property(srna, "selected_user", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", BA_WAS_SEL);
-       RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-       RNA_def_property_ui_text(prop, "User Selected", "Object base user selection state, used to restore user selection after transformations");
-       
        RNA_api_object_base(srna);
  }
  
@@@ -34,7 -34,6 +34,7 @@@
  #include "DNA_particle_types.h"
  #include "DNA_scene_types.h"
  #include "DNA_userdef_types.h"
 +#include "BLI_math.h"
  
  /* Include for Bake Options */
  #include "RE_pipeline.h"
@@@ -1480,83 -1479,6 +1480,83 @@@ void rna_def_render_layer_common(Struct
        else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
  }
  
 +static void rna_def_scene_game_recast_data(BlenderRNA *brna)
 +{
 +      StructRNA *srna;
 +      PropertyRNA *prop;
 +
 +      srna= RNA_def_struct(brna, "SceneGameRecastData", NULL);
 +      RNA_def_struct_sdna(srna, "RecastData");
 +      RNA_def_struct_nested(brna, srna, "Scene");
 +      RNA_def_struct_ui_text(srna, "Recast Data", "Recast data for a Game datablock");
 +
 +      prop= RNA_def_property(srna, "cellsize", PROP_FLOAT, PROP_NONE);
 +      RNA_def_property_ui_range(prop, 0.1, 1, 0.01, 2);
 +      RNA_def_property_ui_text(prop, "Cell size", "Rasterized cell size");
 +      RNA_def_property_update(prop, NC_SCENE, NULL);
 +
 +      prop= RNA_def_property(srna, "cellheight", PROP_FLOAT, PROP_NONE);
 +      RNA_def_property_ui_range(prop, 0.1, 1, 0.01, 2);
 +      RNA_def_property_ui_text(prop, "Cell height", "Rasterized cell height");
 +      RNA_def_property_update(prop, NC_SCENE, NULL);
 +
 +      prop= RNA_def_property(srna, "agentheight", PROP_FLOAT, PROP_NONE);
 +      RNA_def_property_ui_range(prop, 0.1, 5, 0.1, 2);
 +      RNA_def_property_ui_text(prop, "Agent height", "Minimum height where the agent can still walk");
 +      RNA_def_property_update(prop, NC_SCENE, NULL);
 +
 +      prop= RNA_def_property(srna, "agentradius", PROP_FLOAT, PROP_NONE);
 +      RNA_def_property_ui_range(prop, 0.1, 5, 0.1, 2);
 +      RNA_def_property_ui_text(prop, "Agent radius", "Radius of the agent");
 +      RNA_def_property_update(prop, NC_SCENE, NULL);
 +
 +      prop= RNA_def_property(srna, "agentmaxclimb", PROP_FLOAT, PROP_NONE);
 +      RNA_def_property_ui_range(prop, 0.1, 5, 0.1, 2);
 +      RNA_def_property_ui_text(prop, "Max climb", "Maximum height between grid cells the agent can climb");
 +      RNA_def_property_update(prop, NC_SCENE, NULL);
 +
 +      prop= RNA_def_property(srna, "agentmaxslope", PROP_FLOAT, PROP_ANGLE);
 +      RNA_def_property_range(prop, 0, M_PI/2);
 +      RNA_def_property_ui_text(prop, "Max slope", "Maximum walkable slope angle in degrees");
 +      RNA_def_property_update(prop, NC_SCENE, NULL);
 +
 +
 +      prop= RNA_def_property(srna, "regionminsize", PROP_FLOAT, PROP_NONE);
 +      RNA_def_property_ui_range(prop, 0, 150, 1, 2);
 +      RNA_def_property_ui_text(prop, "Min region size", "Minimum regions size. Smaller regions will be deleted");
 +      RNA_def_property_update(prop, NC_SCENE, NULL);
 +
 +      prop= RNA_def_property(srna, "regionmergesize", PROP_FLOAT, PROP_NONE);
 +      RNA_def_property_ui_range(prop, 0, 150, 1, 2);
 +      RNA_def_property_ui_text(prop, "Merged region size", "Minimum regions size. Smaller regions will be merged");
 +      RNA_def_property_update(prop, NC_SCENE, NULL);
 +
 +      prop= RNA_def_property(srna, "edgemaxlen", PROP_FLOAT, PROP_NONE);
 +      RNA_def_property_ui_range(prop, 0, 50, 1, 2);
 +      RNA_def_property_ui_text(prop, "Max edge length", "Maximum contour edge length");
 +      RNA_def_property_update(prop, NC_SCENE, NULL);
 +
 +      prop= RNA_def_property(srna, "edgemaxerror", PROP_FLOAT, PROP_NONE);
 +      RNA_def_property_ui_range(prop, 0.1, 3.0, 0.1, 2);
 +      RNA_def_property_ui_text(prop, "Max edge error", "Maximum distance error from contour to cells");
 +      RNA_def_property_update(prop, NC_SCENE, NULL);
 +
 +      prop= RNA_def_property(srna, "vertsperpoly", PROP_INT, PROP_NONE);
 +      RNA_def_property_ui_range(prop, 3, 12, 1, 0);
 +      RNA_def_property_ui_text(prop, "Verts per poly", "Max number of vertices per polygon");
 +      RNA_def_property_update(prop, NC_SCENE, NULL);
 +
 +      prop= RNA_def_property(srna, "detailsampledist", PROP_FLOAT, PROP_NONE);
 +      RNA_def_property_ui_range(prop, 0.0, 16.0, 1, 2);
 +      RNA_def_property_ui_text(prop, "Sample distance", "Detail mesh sample spacing");
 +      RNA_def_property_update(prop, NC_SCENE, NULL);
 +
 +      prop= RNA_def_property(srna, "detailsamplemaxerror", PROP_FLOAT, PROP_NONE);
 +      RNA_def_property_ui_range(prop, 0.0, 16.0, 1, 2);
 +      RNA_def_property_ui_text(prop, "Max sample error", "Detail mesh simplification max sample error");
 +      RNA_def_property_update(prop, NC_SCENE, NULL);
 +}
 +
  static void rna_def_scene_game_data(BlenderRNA *brna)
  {
        StructRNA *srna;
                {GAME_MAT_GLSL, "GLSL", 0, "GLSL", "OpenGL shading language shaders"},
                {0, NULL, 0, NULL, NULL}};
  
 +      static EnumPropertyItem obstacle_simulation_items[] = {
 +              {OBSTSIMULATION_NONE, "NONE", 0, "None", ""},
 +              {OBSTSIMULATION_TOI, "RVO", 0, "RVO", ""},
 +              {0, NULL, 0, NULL, NULL}};
 +
        srna= RNA_def_struct(brna, "SceneGameData", NULL);
        RNA_def_struct_sdna(srna, "GameData");
        RNA_def_struct_nested(brna, srna, "Scene");
        RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_EXTRA_TEX);
        RNA_def_property_ui_text(prop, "GLSL Extra Textures", "Use extra textures like normal or specular maps for GLSL rendering");
        RNA_def_property_update(prop, NC_SCENE|NA_EDITED, NULL);
 +
 +      /* obstacle simulation */
 +      prop= RNA_def_property(srna, "obstacle_simulation", PROP_ENUM, PROP_NONE);
 +      RNA_def_property_enum_sdna(prop, NULL, "obstacleSimulation");
 +      RNA_def_property_enum_items(prop, obstacle_simulation_items);
 +      RNA_def_property_ui_text(prop, "Obstacle simulation", "Simulation used for obstacle avoidance in the game engine");
 +      RNA_def_property_update(prop, NC_SCENE, NULL);
 +
 +      prop= RNA_def_property(srna, "level_height", PROP_FLOAT, PROP_ACCELERATION);
 +      RNA_def_property_float_sdna(prop, NULL, "levelHeight");
 +      RNA_def_property_range(prop, 0.0f, 200.0f);
 +      RNA_def_property_ui_text(prop, "Level height", "Max difference in heights of obstacles to enable their interaction");
 +      RNA_def_property_update(prop, NC_SCENE, NULL);
 +
 +      prop= RNA_def_property(srna, "show_obstacle_simulation", PROP_BOOLEAN, PROP_NONE);
 +      RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_OBSTACLE_SIMULATION);
 +      RNA_def_property_ui_text(prop, "Visualization", "Enable debug visualization for obstacle simulation");
 +
 +      /* Recast Settings */
 +      prop= RNA_def_property(srna, "recast_data", PROP_POINTER, PROP_NONE);
 +      RNA_def_property_flag(prop, PROP_NEVER_NULL);
 +      RNA_def_property_pointer_sdna(prop, NULL, "recastData");
 +      RNA_def_property_struct_type(prop, "SceneGameRecastData");
 +      RNA_def_property_ui_text(prop, "Recast Data", "");
 +
 +      /* Nestled Data  */
 +      rna_def_scene_game_recast_data(brna);
 +      
  }
  
  static void rna_def_scene_render_layer(BlenderRNA *brna)
@@@ -2148,8 -2037,8 +2148,8 @@@ static void rna_def_scene_render_data(B
        
        prop= RNA_def_property(srna, "file_quality", PROP_INT, PROP_PERCENTAGE);
        RNA_def_property_int_sdna(prop, NULL, "quality");
-       RNA_def_property_range(prop, 1, 100);
-       RNA_def_property_ui_text(prop, "Quality", "Quality of JPEG images, AVI Jpeg and SGI movies");
+       RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */
+       RNA_def_property_ui_text(prop, "Quality", "Quality of JPEG images, AVI Jpeg and SGI movies, Compression for PNG's");
        RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
        
        /* Tiff */
@@@ -67,7 -67,6 +67,7 @@@ typedef unsigned long uint_ptr
  #include "SCA_ISensor.h"
  #include "SCA_IController.h"
  #include "NG_NetworkScene.h" //Needed for sendMessage()
 +#include "KX_ObstacleSimulation.h"
  
  #include "PyObjectPlus.h" /* python stuff */
  
@@@ -102,7 -101,6 +102,7 @@@ KX_GameObject::KX_GameObject
        m_pGraphicController(NULL),
        m_xray(false),
        m_pHitObject(NULL),
 +      m_pObstacleSimulation(NULL),
        m_isDeformable(false)
  #ifndef DISABLE_PYTHON
        , m_attr_dict(NULL)
@@@ -150,12 -148,6 +150,12 @@@ KX_GameObject::~KX_GameObject(
        {
                delete m_pGraphicController;
        }
 +
 +      if (m_pObstacleSimulation)
 +      {
 +              m_pObstacleSimulation->DestroyObstacleForObj(this);
 +      }
 +
  #ifndef DISABLE_PYTHON
        if (m_attr_dict) {
                PyDict_Clear(m_attr_dict); /* incase of circular refs or other weired cases */
@@@ -356,14 -348,6 +356,14 @@@ void KX_GameObject::ProcessReplica(
        m_pClient_info->m_gameobject = this;
        m_state = 0;
  
 +      KX_Scene* scene = KX_GetActiveScene();
 +      KX_ObstacleSimulation* obssimulation = scene->GetObstacleSimulation();
 +      struct Object* blenderobject = GetBlenderObject();
 +      if (obssimulation && (blenderobject->gameflag & OB_HASOBSTACLE))
 +      {
 +              obssimulation->AddObstacleForObj(this);
 +      }
 +
  #ifndef DISABLE_PYTHON
        if(m_attr_dict)
                m_attr_dict= PyDict_Copy(m_attr_dict);
@@@ -862,7 -846,7 +862,7 @@@ void KX_GameObject::AlignAxisToVect(con
        {       
                case 0: //x axis
                        ori.setValue(orimat[0][2], orimat[1][2], orimat[2][2]); //pivot axis
-                       if (MT_abs(vect.dot(ori)) > 1.0-3.0*MT_EPSILON) //is the vector paralell to the pivot?
+                       if (MT_abs(vect.dot(ori)) > 1.0-3.0*MT_EPSILON) //is the vector parallel to the pivot?
                                ori.setValue(orimat[0][1], orimat[1][1], orimat[2][1]); //change the pivot!
                        if (fac == 1.0) {
                                x = vect;