synched with trunk at revision 30243
authorNick Samarin <nicks1987@bigmir.net>
Wed, 14 Jul 2010 07:35:39 +0000 (07:35 +0000)
committerNick Samarin <nicks1987@bigmir.net>
Wed, 14 Jul 2010 07:35:39 +0000 (07:35 +0000)
27 files changed:
1  2 
release/scripts/ui/properties_data_modifier.py
release/scripts/ui/properties_game.py
release/scripts/ui/properties_scene.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/include/ED_object.h
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_modifier_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/Converter/BL_BlenderDataConversion.cpp
source/gameengine/GameLogic/SCA_IActuator.h
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_PythonInit.cpp
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Ketsji/KX_Scene.h
source/gameengine/Rasterizer/RAS_IRasterizer.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h

@@@ -452,75 -452,14 +452,75 @@@ class DATA_PT_modifiers(DataButtonsPane
          col = layout.column()
          row = col.row()
          if md.external:
-             row.operator("object.multires_pack_external", text="Pack External")
+             row.operator("object.multires_external_pack", text="Pack External")
              row.label()
              row = col.row()
-             row.prop(md, "filename", text="")
+             row.prop(md, "filepath", text="")
          else:
-             row.operator("object.multires_save_external", text="Save External...")
+             row.operator("object.multires_external_save", text="Save External...")
              row.label()
  
 +    def NAVMESH(self, layout, ob, md, wide_ui):
 +        layout.label(text="Rasterization:")
 +        split = layout.split()
 +
 +        col = split.column()
 +        col.prop(md, "cellsize")
 +        if wide_ui:
 +            col = split.column()
 +        col.prop(md, "cellheight")
 +
 +        layout.separator()
 +
 +        layout.label(text="Agent:")
 +        split = layout.split()
 +        col = split.column()
 +        row = col.row()
 +        row.prop(md, "agentheight")
 +        row = col.row()
 +        row.prop(md, "agentradius")
 +        if wide_ui:
 +            col = split.column()
 +        row = col.row()
 +        row.prop(md, "agentmaxslope")
 +        row = col.row()
 +        row.prop(md, "agentmaxclimb")
 +
 +        layout.separator()
 +
 +        layout.label(text="Region:")
 +        split = layout.split()
 +        col = split.column()
 +        col.prop(md, "regionminsize")
 +        if wide_ui:
 +            col = split.column()
 +        col.prop(md, "regionmergesize")
 +
 +        layout.separator()
 +
 +        layout.label(text="Polygonization:")
 +        split = layout.split()
 +        col = split.column()
 +        row = col.row()
 +        row.prop(md, "edgemaxlen")
 +        row = col.row()
 +        row.prop(md, "edgemaxerror")
 +        if wide_ui:
 +            col = split.column()
 +        row = col.row()
 +        row.prop(md, "vertsperpoly")
 +
 +        layout.separator()
 +
 +        layout.label(text="Detail Mesh:")
 +        split = layout.split()
 +        col = split.column()
 +        col.prop(md, "detailsampledist")
 +        if wide_ui:
 +            col = split.column()
 +        col.prop(md, "detailsamplemaxerror")
 +
 +
      def PARTICLE_INSTANCE(self, layout, ob, md, wide_ui):
          layout.prop(md, "object")
          layout.prop(md, "particle_system_number", text="Particle System")
Simple merge
@@@ -1026,9 -1053,10 +1053,11 @@@ Object *add_only_object(int type, char 
        ob->anisotropicFriction[2] = 1.0f;
        ob->gameflag= OB_PROP|OB_COLLISION;
        ob->margin = 0.0;
+       ob->init_state=1;
+       ob->state=1;
        /* ob->pad3 == Contact Processing Threshold */
        ob->m_contactProcessingThreshold = 1.;
 +      ob->obstacleRad = 1.;
        
        /* NT fluid sim defaults */
        ob->fluidsimFlag = 0;
@@@ -10912,44 -10934,27 +10939,61 @@@ static void do_versions(FileData *fd, L
                                }
                        }
                }
+               
+               /* initialise scene active layer */
+               for (scene= main->scene.first; scene; scene=scene->id.next) {
+                       int i;
+                       for(i=0; i<20; i++) {
+                               if(scene->lay & (1<<i)) {
+                                       scene->layact= 1<<i;
+                                       break;
+                               }
+                       }
+               }
+               for(tex= main->tex.first; tex; tex= tex->id.next) {
+                       /* if youre picky, this isn't correct until we do a version bump
+                        * since you could set saturation to be 0.0*/
+                       if(tex->saturation==0.0f)
+                               tex->saturation= 1.0f;
+               }
  
 +              //set defaults for recast data
 +              {
 +                      Scene *sce;
 +                      for(sce = main->scene.first; sce; sce = sce->id.next)
 +                      {
 +                              if(sce->unit.scale_length == 0.0f)
 +                                      sce->unit.scale_length= 1.0f;
 +                              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;
 +                      }                       
 +              }
        }
--
        /* 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! */
  
@@@ -1269,18 -1295,9 +1302,18 @@@ static void rna_def_object_game_setting
        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, "state", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+       prop= RNA_def_property(srna, "visible_state", PROP_BOOLEAN, PROP_LAYER_MEMBER);
        RNA_def_property_boolean_sdna(prop, NULL, "state", 1);
        RNA_def_property_array(prop, OB_MAX_STATES);
        RNA_def_property_ui_text(prop, "State", "State determining which controllers are displayed");
  
  #include "DNA_group_types.h"
  #include "DNA_modifier_types.h"
+ #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"
Simple merge
@@@ -83,8 -83,11 +83,12 @@@ class SCA_JoystickManager
  class btCollisionShape;
  class KX_BlenderSceneConverter;
  struct KX_ClientObjectInfo;
 +class KX_ObstacleSimulation;
  
+ #ifdef WITH_CXX_GUARDEDALLOC
+ #include "MEM_guardedalloc.h"
+ #endif
  /* for ID freeing */
  #define IS_TAGGED(_id) ((_id) && (((ID *)_id)->flag & LIB_DOIT))