Merging r40265 through r40492 from trunk into soc-2011-tomato
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 23 Sep 2011 13:20:21 +0000 (13:20 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 23 Sep 2011 13:20:21 +0000 (13:20 +0000)
61 files changed:
1  2 
CMakeLists.txt
build_files/scons/tools/Blender.py
build_files/scons/tools/btools.py
release/scripts/startup/bl_ui/properties_scene.py
release/scripts/startup/bl_ui/space_userpref_keymap.py
release/scripts/startup/bl_ui/space_view3d.py
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/SConscript
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/object.c
source/blender/blenlib/BLI_math_rotation.h
source/blender/blenlib/intern/math_rotation.c
source/blender/blenlib/intern/threads.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/collada/CameraExporter.cpp
source/blender/collada/DocumentImporter.cpp
source/blender/editors/gpencil/gpencil_edit.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/include/UI_interface.h
source/blender/editors/interface/interface_draw.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_intern.h
source/blender/editors/interface/interface_templates.c
source/blender/editors/object/object_constraint.c
source/blender/editors/screen/area.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/space_view3d.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_ops.c
source/blender/makesdna/DNA_ID.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_main.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_screen.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_ui_api.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/modifiers/intern/MOD_uvproject.c
source/blender/nodes/composite/node_composite_util.h
source/blender/windowmanager/intern/wm_operators.c
source/blenderplayer/bad_level_call_stubs/stubs.c
source/creator/CMakeLists.txt
source/creator/creator.c
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Ketsji/KX_KetsjiEngine.cpp

diff --cc CMakeLists.txt
Simple merge
Simple merge
Simple merge
@@@ -358,13 -351,12 +357,13 @@@ if(WITH_LZMA
        add_definitions(-DWITH_LZMA)
  endif()
  
 +
  if(WITH_GAMEENGINE)
        list(APPEND INC_SYS
-         ../../../extern/recastnavigation/Recast/Include
+       ../../../extern/recastnavigation
        )
        list(APPEND SRC
-               intern/navmesh_conversion.cpp
+               intern/navmesh_conversion.c
                BKE_navmesh_conversion.h
        )
  endif()
@@@ -92,15 -92,11 +92,15 @@@ if env['WITH_BF_LZMA']
      defs.append('WITH_LZMA')
  
  if env['WITH_BF_GAMEENGINE']:
-     incs += ' #/extern/recastnavigation/Recast/Include'
+     incs += ' #/extern/recastnavigation'
      defs.append('WITH_GAMEENGINE')
  else:
-     sources.remove('intern' + os.sep + 'navmesh_conversion.cpp')
+     sources.remove('intern' + os.sep + 'navmesh_conversion.c')
  
 +if env['WITH_BF_LIBMV']:
 +    incs += ' #/extern/libmv'
 +    defs.append('WITH_LIBMV')
 +
  if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
      incs += ' ' + env['BF_PTHREADS_INC']
  
@@@ -73,7 -73,7 +73,7 @@@ void CamerasExporter::operator()(Objec
        
        if (cam->type == CAM_PERSP) {
                COLLADASW::PerspectiveOptic persp(mSW);
-               persp.setXFov(focallength_to_hfov((cam->lens)*(180.0f/M_PI), cam->sensor_x),"xfov");
 -              persp.setXFov(RAD2DEGF(lens_to_angle(cam->lens)), "xfov");
++              persp.setXFov(RAD2DEGF(focallength_to_hfov(cam->lens), cam->sensor_x), "xfov");
                persp.setAspectRatio((float)(sce->r.xsch)/(float)(sce->r.ysch),false,"aspect_ratio");
                persp.setZFar(cam->clipend, false , "zfar");
                persp.setZNear(cam->clipsta,false , "znear");
@@@ -816,7 -816,7 +816,7 @@@ bool DocumentImporter::writeCamera( con
                                                double aspect = camera->getAspectRatio().getValue();
                                                double xfov = aspect*yfov;
                                                // xfov is in degrees, cam->lens is in millimiters
-                                               cam->lens = hfov_to_focallength((float)xfov*(M_PI/180.0f), cam->sensor_x);
 -                                              cam->lens = angle_to_lens(DEG2RADF(xfov));
++                                              cam->lens = hfov_to_focallength(DEG2RADF(xfov), cam->sensor_x);
                                        }
                                        break;
                        }
                                        {
                                                double x = camera->getXFov().getValue();
                                                // x is in degrees, cam->lens is in millimiters
-                                               cam->lens = hfov_to_focallength((float)x*(M_PI/180.0f), cam->sensor_x);
 -                                              cam->lens = angle_to_lens(DEG2RADF(x));
++                                              cam->lens = hfov_to_focallength(DEG2RADF(x), cam->sensor_x);
                                        }
                                        break;
                        }
                                        {
                                        double yfov = camera->getYFov().getValue();
                                        // yfov is in degrees, cam->lens is in millimiters
-                                       cam->lens = hfov_to_focallength((float)yfov*(M_PI/180.0f), cam->sensor_x);
 -                                      cam->lens = angle_to_lens(DEG2RADF(yfov));
++                                      cam->lens = hfov_to_focallength(DEG2RADF(yfov), cam->sensor_x);
                                        }
                                        break;
                        }
Simple merge
Simple merge
Simple merge
@@@ -287,35 -281,34 +287,35 @@@ void RNA_def_main(BlenderRNA *brna
  
        /* plural must match idtypes in readblenentry.c */
        MainCollectionDef lists[]= {
-               {"cameras", "Camera", "rna_Main_camera_begin", "Cameras", "Camera datablocks.", RNA_def_main_cameras},
-               {"scenes", "Scene", "rna_Main_scene_begin", "Scenes", "Scene datablocks.", RNA_def_main_scenes},
-               {"objects", "Object", "rna_Main_object_begin", "Objects", "Object datablocks.", RNA_def_main_objects},
-               {"materials", "Material", "rna_Main_mat_begin", "Materials", "Material datablocks.", RNA_def_main_materials},
-               {"node_groups", "NodeTree", "rna_Main_nodetree_begin", "Node Groups", "Node group datablocks.", RNA_def_main_node_groups},
-               {"meshes", "Mesh", "rna_Main_mesh_begin", "Meshes", "Mesh datablocks.", RNA_def_main_meshes},
-               {"lamps", "Lamp", "rna_Main_lamp_begin", "Lamps", "Lamp datablocks.", RNA_def_main_lamps},
-               {"libraries", "Library", "rna_Main_library_begin", "Libraries", "Library datablocks.", RNA_def_main_libraries},
-               {"screens", "Screen", "rna_Main_screen_begin", "Screens", "Screen datablocks.", RNA_def_main_screens},
-               {"window_managers", "WindowManager", "rna_Main_wm_begin", "Window Managers", "Window manager datablocks.", RNA_def_main_window_managers},
-               {"images", "Image", "rna_Main_image_begin", "Images", "Image datablocks.", RNA_def_main_images},
-               {"lattices", "Lattice", "rna_Main_latt_begin", "Lattices", "Lattice datablocks.", RNA_def_main_lattices},
-               {"curves", "Curve", "rna_Main_curve_begin", "Curves", "Curve datablocks.", RNA_def_main_curves} ,
-               {"metaballs", "MetaBall", "rna_Main_mball_begin", "Metaballs", "Metaball datablocks.", RNA_def_main_metaballs},
-               {"fonts", "VectorFont", "rna_Main_font_begin", "Vector Fonts", "Vector font datablocks.", RNA_def_main_fonts},
-               {"textures", "Texture", "rna_Main_tex_begin", "Textures", "Texture datablocks.", RNA_def_main_textures},
-               {"brushes", "Brush", "rna_Main_brush_begin", "Brushes", "Brush datablocks.", RNA_def_main_brushes},
-               {"worlds", "World", "rna_Main_world_begin", "Worlds", "World datablocks.", RNA_def_main_worlds},
-               {"groups", "Group", "rna_Main_group_begin", "Groups", "Group datablocks.", RNA_def_main_groups},
-               {"shape_keys", "Key", "rna_Main_key_begin", "Shape Keys", "Shape Key datablocks.", NULL},
-               {"scripts", "ID", "rna_Main_script_begin", "Scripts", "Script datablocks (DEPRECATED).", NULL},
-               {"texts", "Text", "rna_Main_text_begin", "Texts", "Text datablocks.", RNA_def_main_texts},
-               {"speakers", "Speaker", "rna_Main_speaker_begin", "Speakers", "Speaker datablocks.", RNA_def_main_speakers},
-               {"sounds", "Sound", "rna_Main_sound_begin", "Sounds", "Sound datablocks.", RNA_def_main_sounds},
-               {"armatures", "Armature", "rna_Main_armature_begin", "Armatures", "Armature datablocks.", RNA_def_main_armatures},
-               {"actions", "Action", "rna_Main_action_begin", "Actions", "Action datablocks.", RNA_def_main_actions},
-               {"particles", "ParticleSettings", "rna_Main_particle_begin", "Particles", "Particle datablocks.", RNA_def_main_particles},
-               {"grease_pencil", "GreasePencil", "rna_Main_gpencil_begin", "Grease Pencil", "Grease Pencil datablocks.", RNA_def_main_gpencil},
+               {"cameras", "Camera", "rna_Main_camera_begin", "Cameras", "Camera datablocks", RNA_def_main_cameras},
+               {"scenes", "Scene", "rna_Main_scene_begin", "Scenes", "Scene datablocks", RNA_def_main_scenes},
+               {"objects", "Object", "rna_Main_object_begin", "Objects", "Object datablocks", RNA_def_main_objects},
+               {"materials", "Material", "rna_Main_mat_begin", "Materials", "Material datablocks", RNA_def_main_materials},
+               {"node_groups", "NodeTree", "rna_Main_nodetree_begin", "Node Groups", "Node group datablocks", RNA_def_main_node_groups},
+               {"meshes", "Mesh", "rna_Main_mesh_begin", "Meshes", "Mesh datablocks", RNA_def_main_meshes},
+               {"lamps", "Lamp", "rna_Main_lamp_begin", "Lamps", "Lamp datablocks", RNA_def_main_lamps},
+               {"libraries", "Library", "rna_Main_library_begin", "Libraries", "Library datablocks", RNA_def_main_libraries},
+               {"screens", "Screen", "rna_Main_screen_begin", "Screens", "Screen datablocks", RNA_def_main_screens},
+               {"window_managers", "WindowManager", "rna_Main_wm_begin", "Window Managers", "Window manager datablocks", RNA_def_main_window_managers},
+               {"images", "Image", "rna_Main_image_begin", "Images", "Image datablocks", RNA_def_main_images},
+               {"lattices", "Lattice", "rna_Main_latt_begin", "Lattices", "Lattice datablocks", RNA_def_main_lattices},
+               {"curves", "Curve", "rna_Main_curve_begin", "Curves", "Curve datablocks", RNA_def_main_curves} ,
+               {"metaballs", "MetaBall", "rna_Main_mball_begin", "Metaballs", "Metaball datablocks", RNA_def_main_metaballs},
+               {"fonts", "VectorFont", "rna_Main_font_begin", "Vector Fonts", "Vector font datablocks", RNA_def_main_fonts},
+               {"textures", "Texture", "rna_Main_tex_begin", "Textures", "Texture datablocks", RNA_def_main_textures},
+               {"brushes", "Brush", "rna_Main_brush_begin", "Brushes", "Brush datablocks", RNA_def_main_brushes},
+               {"worlds", "World", "rna_Main_world_begin", "Worlds", "World datablocks", RNA_def_main_worlds},
+               {"groups", "Group", "rna_Main_group_begin", "Groups", "Group datablocks", RNA_def_main_groups},
+               {"shape_keys", "Key", "rna_Main_key_begin", "Shape Keys", "Shape Key datablocks", NULL},
+               {"scripts", "ID", "rna_Main_script_begin", "Scripts", "Script datablocks (DEPRECATED)", NULL},
+               {"texts", "Text", "rna_Main_text_begin", "Texts", "Text datablocks", RNA_def_main_texts},
+               {"speakers", "Speaker", "rna_Main_speaker_begin", "Speakers", "Speaker datablocks", RNA_def_main_speakers},
+               {"sounds", "Sound", "rna_Main_sound_begin", "Sounds", "Sound datablocks", RNA_def_main_sounds},
+               {"armatures", "Armature", "rna_Main_armature_begin", "Armatures", "Armature datablocks", RNA_def_main_armatures},
+               {"actions", "Action", "rna_Main_action_begin", "Actions", "Action datablocks", RNA_def_main_actions},
+               {"particles", "ParticleSettings", "rna_Main_particle_begin", "Particles", "Particle datablocks", RNA_def_main_particles},
+               {"grease_pencil", "GreasePencil", "rna_Main_gpencil_begin", "Grease Pencil", "Grease Pencil datablocks", RNA_def_main_gpencil},
 +              {"movieclips", "MovieClip", "rna_Main_movieclips_begin", "Movie Clips", "Movie Clip datablocks.", RNA_def_main_movieclips},
                {NULL, NULL, NULL, NULL, NULL, NULL}};
  
        int i;
@@@ -1044,15 -1044,22 +1044,29 @@@ static KeyingSet *rna_Scene_keying_set_
        }
  }
  
 +static void rna_SceneCamera_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
 +{
 +      Scene *scene= (Scene*)ptr->id.data;
 +      Object *camera= scene->camera;
  
 +      if(camera)
 +              DAG_id_tag_update(&camera->id, 0);
 +}
  
+ /* note: without this, when Multi-Paint is activated/deactivated, the colors
+  * will not change right away when multiple bones are selected, this function
+  * is not for general use and only for the few cases where changing scene
+  * settings and NOT for general purpose updates, possibly this should be
+  * given its own notifier. */
+ static void rna_Scene_update_active_object_data(Main *bmain, Scene *scene, PointerRNA *ptr)
+ {
+       Object *ob= OBACT;
+       if(ob) {
+               DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
+               WM_main_add_notifier(NC_OBJECT|ND_DRAW, &ob->id);
+       }
+ }
  #else
  
  static void rna_def_transform_orientation(BlenderRNA *brna)
@@@ -390,41 -397,22 +397,41 @@@ void RNA_api_ui_layout(StructRNA *srna
        api_ui_item_rna_common(func);
        parm= RNA_def_pointer(func, "image_user", "ImageUser", "", "");
        RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
-       RNA_def_boolean(func, "compact", 0, "", "Use more compact layout.");
+       RNA_def_boolean(func, "compact", 0, "", "Use more compact layout");
  
 +      func= RNA_def_function(srna, "template_movieclip", "uiTemplateMovieClip");
 +      RNA_def_function_ui_description(func, "Item(s). User interface for selecting movie clips and their source paths.");
 +      RNA_def_function_flag(func, FUNC_USE_CONTEXT);
 +      api_ui_item_rna_common(func);
 +      RNA_def_boolean(func, "compact", 0, "", "Use more compact layout.");
 +
 +      func= RNA_def_function(srna, "template_track", "uiTemplateTrack");
 +      RNA_def_function_ui_description(func, "Item. A movie-track widget to preview tracking image.");
 +      api_ui_item_rna_common(func);
 +
 +      func= RNA_def_function(srna, "template_marker", "uiTemplateMarker");
 +      RNA_def_function_ui_description(func, "Item. A movie-marker widget to control which depends on frame number.");
 +      api_ui_item_rna_common(func);
 +      parm= RNA_def_pointer(func, "clip_user", "MovieClipUser", "", "");
 +      RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
 +      parm= RNA_def_pointer(func, "track", "MovieTrackingTrack", "", "");
 +      RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
 +      RNA_def_boolean(func, "compact", 0, "", "Use more compact layout.");
 +
        func= RNA_def_function(srna, "template_list", "uiTemplateList");
-       RNA_def_function_ui_description(func, "Item. A list widget to display data. e.g. vertexgroups.");
+       RNA_def_function_ui_description(func, "Item. A list widget to display data. e.g. vertexgroups");
        RNA_def_function_flag(func, FUNC_USE_CONTEXT);
-       parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
+       parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property");
        RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
-       parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
+       parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data");
        RNA_def_property_flag(parm, PROP_REQUIRED);
-       parm= RNA_def_pointer(func, "active_data", "AnyType", "", "Data from which to take property for the active element.");
+       parm= RNA_def_pointer(func, "active_data", "AnyType", "", "Data from which to take property for the active element");
        RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
-       parm= RNA_def_string(func, "active_property", "", 0, "", "Identifier of property in data, for the active element.");
+       parm= RNA_def_string(func, "active_property", "", 0, "", "Identifier of property in data, for the active element");
        RNA_def_property_flag(parm, PROP_REQUIRED);
-       RNA_def_int(func, "rows", 5, 0, INT_MAX, "", "Number of rows to display.", 0, INT_MAX);
-       RNA_def_int(func, "maxrows", 5, 0, INT_MAX, "", "Maximum number of rows to display.", 0, INT_MAX);
-       RNA_def_enum(func, "type", list_type_items, 0, "Type", "Type of list to use.");
+       RNA_def_int(func, "rows", 5, 0, INT_MAX, "", "Number of rows to display", 0, INT_MAX);
+       RNA_def_int(func, "maxrows", 5, 0, INT_MAX, "", "Maximum number of rows to display", 0, INT_MAX);
+       RNA_def_enum(func, "type", list_type_items, 0, "Type", "Type of list to use");
  
        func= RNA_def_function(srna, "template_running_jobs", "uiTemplateRunningJobs");
        RNA_def_function_flag(func, FUNC_USE_CONTEXT);
Simple merge
Simple merge