Merging r39191 through r39250 from trunk into soc-2011-tomato
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 10 Aug 2011 12:16:44 +0000 (12:16 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 10 Aug 2011 12:16:44 +0000 (12:16 +0000)
17 files changed:
doc/doxygen/Doxyfile
doc/python_api/rst/bge.logic.rst
intern/ghost/intern/GHOST_SystemSDL.cpp
release/scripts/startup/bl_operators/uvcalc_lightmap.py
release/scripts/startup/bl_ui/properties_data_curve.py
release/scripts/startup/bl_ui/space_info.py
release/scripts/startup/bl_ui/space_userpref.py
release/scripts/templates/operator_modal.py
release/scripts/templates/operator_modal_timer.py
release/text/readme.html
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/writeffmpeg.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/makesrna/intern/rna_constraint.c
source/blender/makesrna/intern/rna_curve.c
source/blender/python/intern/bpy_rna_array.c
source/blender/windowmanager/intern/wm_operators.c

index 79b3f1a4160bb0707ed2a3818ebbe610abe53589..b4d3b14b9dde48f8a74fa959b561a6af76a4dadb 100644 (file)
@@ -31,7 +31,7 @@ PROJECT_NAME           = Blender
 # This could be handy for archiving the generated documentation or 
 # if some version control system is used.
 
-PROJECT_NUMBER         = "V2.58"
+PROJECT_NUMBER         = "V2.59"
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer
index 128f87f76bd864f8464f526ea08d0f04abcdf587..798491b471059c521736a955e52e3d4e9da98361 100644 (file)
@@ -217,6 +217,12 @@ General functions
 
    Loads a scene into the game engine.
 
+   .. note::
+
+      This function is not effective immediately, the scene is queued
+      and added on the next logic cycle where it will be available
+      from `getSceneList`
+
    :arg name: The name of the scene
    :type name: string
    :arg overlay: Overlay or underlay (optional)
index cd7efba592b469c74c990ec16ac650f6390af8e7..aebb94d5cdf169008ea99d7312fdd63a7a2f62b7 100644 (file)
@@ -146,7 +146,7 @@ convertSDLKey(SDL_Scancode key)
        if ((key >= SDL_SCANCODE_A) && (key <= SDL_SCANCODE_Z)) {
                type= GHOST_TKey( key - SDL_SCANCODE_A + int(GHOST_kKeyA));
        } else if ((key >= SDL_SCANCODE_1) && (key <= SDL_SCANCODE_0)) {
-               type= GHOST_TKey(key - SDL_SCANCODE_1 + int(GHOST_kKey0));
+               type= (key == SDL_SCANCODE_0) ? GHOST_kKey0 : GHOST_TKey(key - SDL_SCANCODE_1 + int(GHOST_kKey1));
        } else if ((key >= SDL_SCANCODE_F1) && (key <= SDL_SCANCODE_F12)) {
                type= GHOST_TKey(key - SDL_SCANCODE_F1 + int(GHOST_kKeyF1));
        } else if ((key >= SDL_SCANCODE_F13) && (key <= SDL_SCANCODE_F24)) {
index 2f1acf0a5dc71d72450d5dd9bbc24ee2ca26f568..d2371b0316a9b2af6e83a01b75bc8528c2d17c55 100644 (file)
@@ -23,7 +23,15 @@ import mathutils
 
 
 class prettyface(object):
-    __slots__ = "uv", "width", "height", "children", "xoff", "yoff", "has_parent", "rot"
+    __slots__ = ("uv",
+                 "width",
+                 "height",
+                 "children",
+                 "xoff",
+                 "yoff",
+                 "has_parent",
+                 "rot",
+                 )
 
     def __init__(self, data):
         self.has_parent = False
@@ -263,10 +271,9 @@ def lightmap_uvpack(meshes,
             del trylens
 
             def trilensdiff(t1, t2):
-                return\
-                abs(t1[1][t1[2][0]] - t2[1][t2[2][0]]) + \
-                abs(t1[1][t1[2][1]] - t2[1][t2[2][1]]) + \
-                abs(t1[1][t1[2][2]] - t2[1][t2[2][2]])
+                return (abs(t1[1][t1[2][0]] - t2[1][t2[2][0]]) +
+                        abs(t1[1][t1[2][1]] - t2[1][t2[2][1]]) +
+                        abs(t1[1][t1[2][2]] - t2[1][t2[2][2]]))
 
             while tri_lengths:
                 tri1 = tri_lengths.pop()
@@ -543,22 +550,51 @@ class LightMapPack(bpy.types.Operator):
     bl_options = {'REGISTER', 'UNDO'}
 
     PREF_CONTEXT = bpy.props.EnumProperty(
+            name="Selection",
+            description="",
             items=(("SEL_FACES", "Selected Faces", "Space all UVs evently"),
                    ("ALL_FACES", "All Faces", "Average space UVs edge length of each loop"),
                    ("ALL_OBJECTS", "Selected Mesh Object", "Average space UVs edge length of each loop")
                    ),
-            name="Selection",
-            description="")
+            )
 
     # Image & UVs...
-    PREF_PACK_IN_ONE = BoolProperty(name="Share Tex Space", default=True, description="Objects Share texture space, map all objects into 1 uvmap")
-    PREF_NEW_UVLAYER = BoolProperty(name="New UV Layer", default=False, description="Create a new UV layer for every mesh packed")
-    PREF_APPLY_IMAGE = BoolProperty(name="New Image", default=False, description="Assign new images for every mesh (only one if shared tex space enabled)")
-    PREF_IMG_PX_SIZE = IntProperty(name="Image Size", min=64, max=5000, default=512, description="Width and Height for the new image")
-
+    PREF_PACK_IN_ONE = BoolProperty(
+            name="Share Tex Space",
+            description=("Objects Share texture space, map all objects "
+                         "into 1 uvmap"),
+            default=True,
+            )
+    PREF_NEW_UVLAYER = BoolProperty(
+            name="New UV Layer",
+            description="Create a new UV layer for every mesh packed",
+            default=False,
+            )
+    PREF_APPLY_IMAGE = BoolProperty(
+            name="New Image",
+            description=("Assign new images for every mesh (only one if "
+                         "shared tex space enabled)"),
+            default=False,
+            )
+    PREF_IMG_PX_SIZE = IntProperty(
+            name="Image Size",
+            description="Width and Height for the new image",
+            min=64, max=5000,
+            default=512,
+            )
     # UV Packing...
-    PREF_BOX_DIV = IntProperty(name="Pack Quality", min=1, max=48, default=12, description="Pre Packing before the complex boxpack")
-    PREF_MARGIN_DIV = FloatProperty(name="Margin", min=0.001, max=1.0, default=0.1, description="Size of the margin as a division of the UV")
+    PREF_BOX_DIV = IntProperty(
+            name="Pack Quality",
+            description="Pre Packing before the complex boxpack",
+            min=1, max=48,
+            default=12,
+            )
+    PREF_MARGIN_DIV = FloatProperty(
+            name="Margin",
+            description="Size of the margin as a division of the UV",
+            min=0.001, max=1.0,
+            default=0.1,
+            )
 
     def execute(self, context):
         kwargs = self.as_keywords()
index 3c88127c72403e07b265dde6e25cd003364ab0b8..a0aacc4cec88741ca827b27afe53f0d4e8a3e83f 100644 (file)
@@ -361,7 +361,7 @@ class DATA_PT_paragraph(CurveButtonsPanel, bpy.types.Panel):
         col.prop(text, "offset_y", text="Y")
 
 
-class DATA_PT_textboxes(CurveButtonsPanel, bpy.types.Panel):
+class DATA_PT_text_boxes(CurveButtonsPanel, bpy.types.Panel):
     bl_label = "Text Boxes"
 
     @classmethod
index f66cee7f431ba24516891a4c905f1d442a00f4d4..ee214bd417843309b1cf22968fd3baf3e53f53ee 100644 (file)
@@ -352,7 +352,7 @@ class INFO_MT_help(bpy.types.Menu):
         layout = self.layout
 
         layout.operator("wm.url_open", text="Manual", icon='HELP').url = 'http://wiki.blender.org/index.php/Doc:Manual'
-        layout.operator("wm.url_open", text="Release Log", icon='URL').url = 'http://www.blender.org/development/release-logs/blender-258/'
+        layout.operator("wm.url_open", text="Release Log", icon='URL').url = 'http://www.blender.org/development/release-logs/blender-259/'
 
         layout.separator()
 
index e6fd8dcb9498bb7a21f613e757c0d65407934e00..944f5aaf4c15a0ab96fc22f1b4700ed778d9ce3a 100644 (file)
@@ -1076,17 +1076,25 @@ class WM_OT_addon_enable(bpy.types.Operator):
     bl_idname = "wm.addon_enable"
     bl_label = "Enable Add-On"
 
-    module = StringProperty(name="Module", description="Module name of the addon to enable")
+    module = StringProperty(
+            name="Module",
+            description="Module name of the addon to enable",
+            )
 
     def execute(self, context):
         mod = addon_utils.enable(self.module)
 
         if mod:
-            # check if add-on is written for current blender version, or raise a warning
             info = addon_utils.module_bl_info(mod)
 
-            if info.get("blender", (0, 0, 0)) > bpy.app.version:
-                self.report("WARNING','This script was written for a newer version of Blender and might not function (correctly).\nThe script is enabled though.")
+            info_ver = info.get("blender", (0, 0, 0))
+
+            if info_ver > bpy.app.version:
+                self.report({'WARNING'}, ("This script was written Blender "
+                                          "version %d.%d.%d and might not "
+                                          "function (correctly).\n"
+                                          "The script is enabled though.") %
+                                         info_ver)
             return {'FINISHED'}
         else:
             return {'CANCELLED'}
index ed98c2cf50ebb51cc43447b41e56c1f7fb884c6a..a428b097f8233c76a705268b4b3b98178815c1d0 100644 (file)
@@ -47,4 +47,4 @@ if __name__ == "__main__":
     register()
 
     # test call
-    bpy.ops.object.modal_operator()
+    bpy.ops.object.modal_operator('INVOKE_DEFAULT')
index d2267191cf54f7fa8eea1544d95b5ebab16b85b9..ec47390da81f079dde40b9589ae183606c03242e 100644 (file)
@@ -10,7 +10,7 @@ class ModalTimerOperator(bpy.types.Operator):
 
     def modal(self, context, event):
         if event.type == 'ESC':
-            return self.cancel()
+            return self.cancel(context)
 
         if event.type == 'TIMER':
             # change theme color, silly!
index 2b5a4071a7fd1cd6f56048d50861a0d3f304f221..95094b9c0cbc8863b9b19f1bc36f517261109fba 100644 (file)
   </style>
 </head>
 <body>
-<p class="title"><b>Blender 2.58</b></p>
+<p class="title"><b>Blender 2.59</b></p>
 <p><br></p>
 <p class="header"><b>About</b></p>
 <p class="body">Welcome to Blender, the free, open source 3D application for modeling, animation, rendering, compositing, video editing and game creation. Blender is available for Linux, Mac OS X, Windows, Solaris and FreeBSD and has a large world-wide community.</p>
 <p class="body">Blender can be used freely for any purpose, including commercial use and distribution. It's free and open-source software, released under the GNU GPL licence. The entire source code is available on our website.</p>
 <p class="body">For more information, visit <a href="http://www.blender.org">blender.org</a>.</p>
 <p><br></p>
-<p class="header"><b>2.58</b></p>
-<p class="body">The Blender Foundation and online developer community is proud to present Blender 2.58. This release is the second official stable release of the Blender 2.5 series, and represents the culmination of many years of redesign and development work. <a href="http://www.blender.org/development/release-logs/blender-258/">More information about this release</a>.</p>
+<p class="header"><b>2.59</b></p>
+<p class="body">The Blender Foundation and online developer community is proud to present Blender 2.59. This release is the third official stable release of the Blender 2.5 series, and represents the culmination of many years of redesign and development work. <a href="http://www.blender.org/development/release-logs/blender-259/">More information about this release</a>.</p>
 <p class="body">What to Expect:</p>
 <p class="body">       •     Big improvements - This is our most exciting version to date, already a significant improvement in many ways over 2.49</p>
 <p class="body">       •     Missing/Incomplete Features - Although most of it is there, not all functionality from pre-2.5 versions has been restored yet. Some functionality may be re-implemented a different way.</p>
 <p class="body">       •     Changes - If you're used to the old Blenders, Blender 2.5 may seem quite different at first, but it won't be long before it grows on you even more than before.</p>
 <p><br></p>
 <p class="header"><b>Bugs</b></p>
-<p class="body">Although Blender 2.58 is considered a stable release, you may encounter a bug. If you do, please help us by posting it in the bug tracker or using Help → Report a Bug from inside Blender 2.58. If it wasn’t reported yet, please log in (or register) and fill in detailed information about the error. Please post detailed instructions on how to reproduce it or post a .blend file showcasing the bug.</p>
+<p class="body">Although Blender 2.59 is considered a stable release, you may encounter a bug. If you do, please help us by posting it in the bug tracker or using Help → Report a Bug from inside Blender 2.59. If it wasn’t reported yet, please log in (or register) and fill in detailed information about the error. Please post detailed instructions on how to reproduce it or post a .blend file showcasing the bug.</p>
 <p><br></p>
 <p class="header"><b>Package Contents</b></p>
 <p class="body">The downloaded Blender package includes:</p>
 <p class="header"><b>Links</b></p>
 <p class="body">Users:</p>
 <p class="body">       General information             <a href="http://www.blender.org">www.blender.org</a> <br>
-       Full release log                        <a href="http://www.blender.org/development/release-logs/blender-258/">www.blender.org/development/release-logs/blender-258/</a><br>
+       Full release log                        <a href="http://www.blender.org/development/release-logs/blender-259/">www.blender.org/development/release-logs/blender-259/</a><br>
        Tutorials                       <a href="http://www.blender.org/education-help/">www.blender.org/education-help/</a>    <br>
        Manual                  <a href="http://wiki.blender.org/index.php/Doc:Manual">wiki.blender.org/index.php/Doc:Manual</a><br>
        User Forum                      <a href="http://www.blenderartists.org">www.blenderartists.org</a><br>
-       IRC                             <a href="irc://irc.freenode.net/#blender">#blender on irc.freenode.net</a><br>
+       IRC                             <a href="irc://irc.freenode.net/#blenderchat">#blenderchat on irc.freenode.net</a><br>
 </p>
 <p class="body">Developers:</p>
 <p class="body">       Development                             <a href="http://www.blender.org/development/">www.blender.org/development/</a><br>
index 5995b895061c695197c31f707a0ac171625bb48a..9aa1c6e29ebe1fd97dc75fa571d43fdc262db78c 100644 (file)
@@ -4389,6 +4389,7 @@ void psys_get_dupli_path_transform(ParticleSimulationData *sim, ParticleData *pa
        copy_m3_m4(nmat, ob->imat);
        transpose_m3(nmat);
        mul_m3_v3(nmat, nor);
+       normalize_v3(nor);
 
        /* make sure that we get a proper side vector */
        if(fabs(dot_v3v3(nor,vec))>0.999999) {
index 4db53999f10eb6bea2aec247c2add55c601cb0d8..fe7a7a181777830aa7ee00ec6f8751b62f4816f3 100644 (file)
@@ -658,10 +658,12 @@ static int start_ffmpeg_impl(struct RenderData *rd, int rectx, int recty, Report
        switch(ffmpeg_type) {
        case FFMPEG_AVI:
        case FFMPEG_MOV:
-       case FFMPEG_OGG:
        case FFMPEG_MKV:
                fmt->video_codec = ffmpeg_codec;
                break;
+       case FFMPEG_OGG:
+               fmt->video_codec = CODEC_ID_THEORA;
+               break;
        case FFMPEG_DV:
                fmt->video_codec = CODEC_ID_DVVIDEO;
                break;
@@ -1310,6 +1312,9 @@ void ffmpeg_verify_image_type(RenderData *rd)
                        /* Don't set preset, disturbs render resolution.
                         * ffmpeg_set_preset(rd, FFMPEG_PRESET_DVD); */
                }
+               if(rd->ffcodecdata.type == FFMPEG_OGG) {
+                       rd->ffcodecdata.type = FFMPEG_MPEG2;
+               }
 
                audio= 1;
        }
index 81715ea116e59eb38d1170b28708f4e51853eb18..53a17efe88deab058bf17c1ad2d2334983803e5f 100644 (file)
@@ -1749,13 +1749,18 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
                /* standard undo/redo shouldn't be allowed to execute or else it causes crashes, so catch it here */
                // FIXME: this is a hardcoded hotkey that can't be changed
                // TODO: catch redo as well, but how?
-               if (event->type == ZKEY) {
+               if (event->type == ZKEY && event->val == KM_RELEASE) {
                        /* oskey = cmd key on macs as they seem to use cmd-z for undo as well? */
                        if ((event->ctrl) || (event->oskey)) {
                                /* just delete last stroke, which will look like undo to the end user */
                                //printf("caught attempted undo event... deleting last stroke \n");
                                gpencil_frame_delete_laststroke(p->gpl, p->gpf);
-                               
+                               /* undoing the last line can free p->gpf
+                                * note, could do this in a bit more of an elegant way then a search but it at least prevents a crash */
+                               if(BLI_findindex(&p->gpl->frames, p->gpf) == -1) {
+                                       p->gpf= NULL;
+                               }
+
                                /* event handled, so force refresh */
                                ED_region_tag_redraw(p->ar); /* just active area for now, since doing whole screen is too slow */
                                estate = OPERATOR_RUNNING_MODAL; 
index 13525bbbdf8289c8e5574a5fd39818f687bd25cb..0b3c839fdda706f0a9d9537886740b7f820190ee 100644 (file)
@@ -87,7 +87,7 @@ static EnumPropertyItem target_space_pchan_items[] = {
 static EnumPropertyItem owner_space_pchan_items[] = {
        {0, "WORLD", 0, "World Space", "The constraint is applied relative to the world coordinate system"},
        {2, "POSE", 0, "Pose Space", "The constraint is applied in Pose Space, the object transformation is ignored"},
-       {3, "LOCAL_WITH_PARENT", 0, "The constraint is applied relative to the local coordinate system of the object, with the parent transformation added"},
+       {3, "LOCAL_WITH_PARENT", 0, "Local With Parent", "The constraint is applied relative to the local coordinate system of the object, with the parent transformation added"},
        {1, "LOCAL", 0, "Local Space", "The constraint is applied relative to the local coordinate sytem of the object"},
        {0, NULL, 0, NULL, NULL}};
 
index 260d483b9d24fc735772d6a93a71cb277ef3d87a..599d36ec8b8a6b336b1461cbedf95b0818fe4cb4 100644 (file)
@@ -651,7 +651,7 @@ static char *rna_TextBox_path(PointerRNA *ptr)
        int index= (int)(tb - cu->tb);
 
        if (index >= 0 && index < cu->totbox)
-               return BLI_sprintfN("textboxes[%d]", index);
+               return BLI_sprintfN("text_boxes[%d]", index);
        else
                return BLI_strdup("");
 }
index 9843a57e0f25be6229b27756d937d16a4a7de03f..e50ce2336715daa8f32464ee9ce0abbd88713fe4 100644 (file)
@@ -285,17 +285,20 @@ static char *copy_values(PyObject *seq, PointerRNA *ptr, PropertyRNA *prop, int
        int totdim= RNA_property_array_dimension(ptr, prop, NULL);
        const int seq_size= PySequence_Size(seq);
 
-       /* General note for 'data' being NULL or PySequence_GetItem() failing.
+       /* Regarding PySequence_GetItem() failing.
         *
         * This should never be NULL since we validated it, _but_ some triky python
         * developer could write their own sequence type which succeeds on
-        * validating but fails later somehow, so include checks for safety. */
+        * validating but fails later somehow, so include checks for safety.
+        */
+
+       /* Note that 'data can be NULL' */
 
        if(seq_size == -1) {
                return NULL;
        }
 
-       for (i= 0; (i < seq_size) && data; i++) {
+       for (i= 0; i < seq_size; i++) {
                PyObject *item= PySequence_GetItem(seq, i);
                if(item) {
                        if (dim + 1 < totdim) {
index 16d6ba4fd169e26d1a86521624ea024c6ff21853..d53b0cf6173c0f16325add2497c5a6b5440df318 100644 (file)
@@ -1247,7 +1247,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
        col = uiLayoutColumn(split, 0);
        uiItemL(col, "Links", ICON_NONE);
        uiItemStringO(col, "Donations", ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/blenderorg/blender-foundation/donation-payment/");
-       uiItemStringO(col, "Release Log", ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/release-logs/blender-258/");
+       uiItemStringO(col, "Release Log", ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/release-logs/blender-259/");
        uiItemStringO(col, "Manual", ICON_URL, "WM_OT_url_open", "url", "http://wiki.blender.org/index.php/Doc:2.5/Manual");
        uiItemStringO(col, "Blender Website", ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/");
        uiItemStringO(col, "User Community", ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/community/user-community/"); //