svn merge ^/trunk/blender -r43934:43976
authorCampbell Barton <ideasman42@gmail.com>
Wed, 8 Feb 2012 05:45:16 +0000 (05:45 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 8 Feb 2012 05:45:16 +0000 (05:45 +0000)
48 files changed:
GNUmakefile
intern/cycles/blender/blender_session.cpp
intern/cycles/blender/blender_sync.cpp
intern/cycles/blender/blender_sync.h
intern/cycles/kernel/kernel_shader.h
intern/cycles/kernel/svm/svm_noise.h
release/scripts/modules/bpy/utils.py
release/scripts/modules/bpy_extras/anim_utils.py
release/scripts/modules/bpy_extras/mesh_utils.py
release/scripts/modules/console/complete_import.py
release/scripts/startup/bl_operators/anim.py
release/scripts/startup/bl_operators/clip.py
release/scripts/startup/bl_operators/image.py
release/scripts/startup/bl_operators/object.py
release/scripts/startup/bl_operators/presets.py
release/scripts/startup/bl_operators/sequencer.py
release/scripts/startup/bl_operators/uvcalc_follow_active.py
release/scripts/startup/bl_operators/uvcalc_lightmap.py
release/scripts/startup/bl_operators/uvcalc_smart_project.py
release/scripts/startup/bl_operators/vertexpaint_dirt.py
release/scripts/startup/bl_operators/wm.py
release/scripts/startup/bl_ui/properties_data_curve.py
release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
release/scripts/startup/bl_ui/properties_texture.py
release/scripts/startup/bl_ui/space_info.py
release/scripts/startup/bl_ui/space_logic.py
release/scripts/startup/bl_ui/space_nla.py
release/scripts/startup/bl_ui/space_userpref.py
release/scripts/startup/bl_ui/space_userpref_keymap.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
release/scripts/startup/keyingsets_builtins.py
release/scripts/templates/ui_menu.py
source/blender/blenkernel/BKE_writeffmpeg.h
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/idcode.c
source/blender/blenkernel/intern/writeffmpeg.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/mesh/loopcut.c
source/blender/editors/transform/transform_conversions.c
source/blender/makesdna/DNA_genfile.h
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_object_api.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_wm_api.c
source/blender/python/mathutils/mathutils_Vector.c
source/blender/render/intern/source/shadeoutput.c
source/gameengine/Ketsji/KX_PythonInit.cpp

index 478f0c35a1c826b93293293841a98d6666d6b391..367819ecccbfeb2e4e277e7053e9c31f2206774a 100644 (file)
@@ -169,6 +169,7 @@ help:
        @echo "  * check_cppcheck  - run blender source through cppcheck (C & C++)"
        @echo "  * check_splint    - run blenders source through splint (C only)"
        @echo "  * check_sparse    - run blenders source through sparse (C only)"
+       @echo "  * check_spelling  - check for spelling errors (Python only for now)"
        @echo ""
        @echo "Documentation Targets (not assosiated with building blender)"
        @echo "  * doc_py   - generate sphinx python api docs"
@@ -242,6 +243,9 @@ check_sparse:
        $(CMAKE_CONFIG)
        cd $(BUILD_DIR) ; python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py
 
+check_spelling:
+       cd $(BUILD_DIR) ; PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/spell_check_source.py `find $(BLENDER_DIR)/release/scripts -name "*.py" | sort`
+
 
 # -----------------------------------------------------------------------------
 # Documentation
index d9adc5480dc473c35c941316e0dc5d4c6f3bc77f..cc6ba0731880e002203ceb51c3b115245ed567cd 100644 (file)
@@ -191,14 +191,8 @@ void BlenderSession::render()
        BL::RenderResult::layers_iterator b_iter;
        BL::RenderLayers b_rr_layers(r.ptr);
        
-       int active = 0;
-
        /* render each layer */
-       for(b_rr.layers.begin(b_iter); b_iter != b_rr.layers.end(); ++b_iter, ++active) {
-               /* single layer render */
-               if(r.use_single_layer())
-                       active = b_rr_layers.active_index();
-
+       for(b_rr.layers.begin(b_iter); b_iter != b_rr.layers.end(); ++b_iter) {
                /* set layer */
                b_rlay = *b_iter;
 
@@ -226,7 +220,7 @@ void BlenderSession::render()
                session->reset(buffer_params, session_params.samples);
 
                /* update scene */
-               sync->sync_data(b_v3d, active);
+               sync->sync_data(b_v3d, b_iter->name().c_str());
 
                /* render */
                session->start();
@@ -394,7 +388,7 @@ void BlenderSession::get_progress(float& progress, double& total_time)
 
 void BlenderSession::update_status_progress()
 {
-       string status, substatus;
+       string timestatus, status, substatus;
        float progress;
        double total_time;
        char time_str[128];
@@ -403,13 +397,13 @@ void BlenderSession::update_status_progress()
        get_progress(progress, total_time);
 
        BLI_timestr(total_time, time_str);
-       status = "Elapsed: " + string(time_str) + " | " + status;
+       timestatus = "Elapsed: " + string(time_str) + " | ";
 
        if(substatus.size() > 0)
                status += " | " + substatus;
 
        if(status != last_status) {
-               RE_engine_update_stats((RenderEngine*)b_engine.ptr.data, "", status.c_str());
+               RE_engine_update_stats((RenderEngine*)b_engine.ptr.data, "", (timestatus + status).c_str());
                last_status = status;
        }
        if(progress != last_progress) {
index 29ab0ebef1f4c6e5767482bdc04b6c9173643ac5..91996d52bea1fe93d2f2d65f888b91b87028ea90 100644 (file)
@@ -122,7 +122,7 @@ bool BlenderSync::sync_recalc()
        return recalc;
 }
 
-void BlenderSync::sync_data(BL::SpaceView3D b_v3d, int layer)
+void BlenderSync::sync_data(BL::SpaceView3D b_v3d, const char *layer)
 {
        sync_render_layers(b_v3d);
        sync_integrator(layer);
@@ -133,7 +133,7 @@ void BlenderSync::sync_data(BL::SpaceView3D b_v3d, int layer)
 
 /* Integrator */
 
-void BlenderSync::sync_integrator(int layer)
+void BlenderSync::sync_integrator(const char *layer)
 {
        PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
 
@@ -155,7 +155,20 @@ void BlenderSync::sync_integrator(int layer)
 
        integrator->no_caustics = get_boolean(cscene, "no_caustics");
        integrator->seed = get_int(cscene, "seed");
-       integrator->layer_flag = render_layers[layer].layer;
+
+       /* render layer */
+       int active_layer = 0;
+
+       if(layer) {
+               for(int i = 0; i < render_layers.size(); i++) {
+                       if(render_layers[i].name == layer) {
+                               active_layer = i;
+                               break;
+                       }
+               }
+       }
+
+       integrator->layer_flag = render_layers[active_layer].layer;
 
        if(integrator->modified(previntegrator))
                integrator->tag_update(scene);
@@ -208,6 +221,7 @@ void BlenderSync::sync_render_layers(BL::SpaceView3D b_v3d)
                        /* single layer for now */
                        RenderLayerInfo rlay;
 
+                       rlay.name = b_rlay->name();
                        rlay.scene_layer = get_layer(b_scene.layers());
                        rlay.layer = get_layer(b_rlay->layers());
                        rlay.material_override = b_rlay->material_override();
index 5e76a0a0b1e858a349530504c5b4c228e7162e79..b0bd3004492d2ef51b3e6bd03b3528bd755844e9 100644 (file)
@@ -54,7 +54,7 @@ public:
 
        /* sync */
        bool sync_recalc();
-       void sync_data(BL::SpaceView3D b_v3d, int layer = 0);
+       void sync_data(BL::SpaceView3D b_v3d, const char *layer = 0);
        void sync_camera(int width, int height);
        void sync_view(BL::SpaceView3D b_v3d, BL::RegionView3D b_rv3d, int width, int height);
 
@@ -70,7 +70,7 @@ private:
        void sync_materials();
        void sync_objects(BL::SpaceView3D b_v3d);
        void sync_film();
-       void sync_integrator(int layer);
+       void sync_integrator(const char *layer);
        void sync_view();
        void sync_world();
        void sync_render_layers(BL::SpaceView3D b_v3d);
@@ -110,6 +110,7 @@ private:
                  material_override(PointerRNA_NULL)
                {}
 
+               string name;
                uint scene_layer;
                uint layer;
                BL::Material material_override;
index 7e0b0ff4d0f574d02d0aa5cdba629a3c43abc4aa..46ef5d2022ae967ee67030c30c907daa9df0a6db 100644 (file)
@@ -368,12 +368,13 @@ __device int shader_bsdf_sample(KernelGlobals *kg, const ShaderData *sd,
 #else
        label = svm_bsdf_sample(sd, sc, randu, randv, &eval, omega_in, domega_in, pdf);
 #endif
+       if(*pdf != 0.0f) {
+               bsdf_eval_init(bsdf_eval, sc->type, eval*sc->weight, kernel_data.film.use_light_pass);
 
-       bsdf_eval_init(bsdf_eval, sc->type, eval*sc->weight, kernel_data.film.use_light_pass);
-
-       if(sd->num_closure > 1 && *pdf != 0.0f) {
-               float sweight = sc->sample_weight;
-               _shader_bsdf_multi_eval(sd, *omega_in, pdf, sampled, bsdf_eval, *pdf*sweight, sweight);
+               if(sd->num_closure > 1) {
+                       float sweight = sc->sample_weight;
+                       _shader_bsdf_multi_eval(sd, *omega_in, pdf, sampled, bsdf_eval, *pdf*sweight, sweight);
+               }
        }
 
        return label;
index 28ad028ad0e7e45b9ef3701cd7859628bb610bb8..1d3ace061ab4ca9b1c46ac1642bde7fb2eb783b5 100644 (file)
@@ -84,8 +84,9 @@ __device uint phash(int kx, int ky, int kz, int3 p)
 
 __device float floorfrac(float x, int* i)
 {
-    *i = quick_floor(x);
-    return x - *i;
+    float f = floorf(x);
+    *i = (int)f;
+    return x - f;
 }
 
 __device float fade(float t)
index d5abcb03164e7697d5352b134a57c42daa8f90cf..63ba213f9b1721885a178a582ba98e4673561ec2 100644 (file)
@@ -327,9 +327,6 @@ def refresh_script_paths():
             _sys_path_ensure(path)
 
 
-_presets = _os.path.join(_scripts[0], "presets")  # FIXME - multiple paths
-
-
 def preset_paths(subdir):
     """
     Returns a list of paths for a specific preset.
index 6b0ab1c3adc5376dd4395e840082c9c60bc4963c..c4ec805a72de7523f3e9c0a3c25cda765c4a1dbd 100644 (file)
@@ -158,7 +158,7 @@ def bake_action(frame_start,
     # -------------------------------------------------------------------------
     # Create action
 
-    # in case animation data hassnt been created
+    # in case animation data hasn't been created
     atd = obj.animation_data_create()
     if action is None:
         action = bpy.data.actions.new("Action")
index 1f37447a68ef11fe6691d0093aa5db7c3fffce6c..e93036ee9bb7c16cb819ea12b71f058eceb5cf3a 100644 (file)
@@ -166,7 +166,7 @@ def edge_loops_from_faces(mesh, faces=None, seams=()):
             flipped = False
 
             while 1:
-                # from knowing the last 2, look for th next.
+                # from knowing the last 2, look for the next.
                 ed_adj = edges[context_loop[-1]]
                 if len(ed_adj) != 2:
                     # the original edge had 2 other edges
@@ -174,7 +174,7 @@ def edge_loops_from_faces(mesh, faces=None, seams=()):
                         flipped = True  # only flip the list once
                         context_loop.reverse()
                         ed_adj[:] = []
-                        context_loop.append(other_dir)  # save 1 lookiup
+                        context_loop.append(other_dir)  # save 1 look-up
 
                         ed_adj = edges[context_loop[-1]]
                         if len(ed_adj) != 2:
@@ -374,7 +374,7 @@ def ngon_tesselate(from_data, indices, fix_loops=True):
             if s1[0][1] == s1[-1][1]:  # remove endpoints double
                 s1.pop()
 
-            s2[:] = []  # Empty this segment s2 so we dont use it again.
+            s2[:] = []  # Empty this segment s2 so we don't use it again.
             return True
 
         joining_segments = True
index 63f15d9cf77b21ae55f61020c1c30be0fb4f0903..8f2b5324cdcdb93baf1cd211652a664d82437919 100644 (file)
@@ -44,7 +44,7 @@ changes have been made:
 import os
 import sys
 
-TIMEOUT_STORAGE = 3  # Time in secs after which the rootmodules will be stored
+TIMEOUT_STORAGE = 3  # Time in secs after which the root-modules will be stored
 TIMEOUT_GIVEUP = 20  # Time in secs after which we give up
 
 ROOT_MODULES = None
@@ -53,7 +53,7 @@ ROOT_MODULES = None
 def get_root_modules():
     """
     Returns a list containing the names of all the modules available in the
-    folders of the pythonpath.
+    folders of the python-path.
 
     :returns: modules
     :rtype: list
index 29e8a3960882a19ca0b241f3a4be26c50f99f898..066e18354767628bd60460c8a9df51dbd56c4a97 100644 (file)
@@ -227,7 +227,7 @@ class BakeAction(Operator):
 
 
 class ClearUselessActions(Operator):
-    """Mark actions with no F-Curves for deletion after save+reload of """ \
+    """Mark actions with no F-Curves for deletion after save & reload of """ \
     """file preserving \"action libraries\""""
     bl_idname = "anim.clear_useless_actions"
     bl_label = "Clear Useless Actions"
index aa4f3a35e6d7452a93a9f942213b34fffab56b56..9e4a5819961194c882c1db3d9952d2cd769e460f 100644 (file)
@@ -275,8 +275,8 @@ class CLIP_OT_delete_proxy(Operator):
 
 
 class CLIP_OT_set_viewport_background(Operator):
-    """Set current movie clip as a camera background in 3D viewport \
-(works only when a 3D viewport is visible)"""
+    """Set current movie clip as a camera background in 3D view-port """ \
+    """(works only when a 3D view-port is visible)"""
 
     bl_idname = "clip.set_viewport_background"
     bl_label = "Set as Background"
@@ -314,9 +314,9 @@ object's movement caused by this constraint"""
         frame_current = scene.frame_current
         matrices = []
 
-        # Find constraint which would eb converting
+        # Find constraint which would be converting
         # TODO: several camera solvers and track followers would fail,
-        #       but can't think about eal workflow where it'll be useful
+        #       but can't think about real work-flow where it'll be useful
         for x in ob.constraints:
             if x.type in {'CAMERA_SOLVER', 'FOLLOW_TRACK', 'OBJECT_SOLVER'}:
                 con = x
@@ -368,7 +368,7 @@ object's movement caused by this constraint"""
 
         ob.animation_data_create()
 
-        # Apply matrices on object and insert keyframes
+        # Apply matrices on object and insert key-frames
         i = 0
         for x in range(sfra, efra + 1):
             scene.frame_set(x)
@@ -791,7 +791,7 @@ class CLIP_OT_setup_tracking_scene(Operator):
 
         all_layers = self._mergeLayers(fg.layers, bg.layers)
 
-        # enshure all lamps are active on foreground and background
+        # ensure all lamps are active on foreground and background
         has_lamp = False
         has_mesh = False
         for ob in scene.objects:
index 55ad8a77d4303b9f73aa966321f70282c8c1fa39..4c04aa3b7f350b699504ce33168746bb29192474 100644 (file)
@@ -128,7 +128,7 @@ class SaveDirty(Operator):
 
 
 class ProjectEdit(Operator):
-    """Edit a snapshot of the viewport in an external image editor"""
+    """Edit a snapshot of the view-port in an external image editor"""
     bl_idname = "image.project_edit"
     bl_label = "Project Edit"
     bl_options = {'REGISTER'}
index b7c6b8589136280fc0f9931591a97c92766cb0ba..019cd37066c191f686d552e4f4b9cb3734211f41 100644 (file)
@@ -334,8 +334,8 @@ class ShapeTransfer(Operator):
         orig_shape_coords = me_cos(ob_act.active_shape_key.data)
 
         orig_normals = me_nos(me.vertices)
-        # the actual mverts location isn't as reliable as the base shape :S
-        # orig_coords = me_cos(me.vertices)
+        # actual mesh vertex location isn't as reliable as the base shape :S
+        #~ orig_coords = me_cos(me.vertices)
         orig_coords = me_cos(me.shape_keys.key_blocks[0].data)
 
         for ob_other in objects:
@@ -653,8 +653,8 @@ class MakeDupliFace(Operator):
 
 
 class IsolateTypeRender(Operator):
-    '''Hide unselected render objects of same type as active ''' \
-    '''by setting the hide render flag'''
+    """Hide unselected render objects of same type as active """ \
+    """by setting the hide render flag"""
     bl_idname = "object.isolate_type_render"
     bl_label = "Restrict Render Unselected"
     bl_options = {'REGISTER', 'UNDO'}
index 1aecfbbaa778ceea989f4062854a94fba58d0f41..946543cc864f75dd660ca7cbc7d7af214dec69b8 100644 (file)
@@ -427,7 +427,7 @@ class AddPresetInterfaceTheme(AddPresetBase, Operator):
 
 
 class AddPresetKeyconfig(AddPresetBase, Operator):
-    '''Add a Keyconfig Preset'''
+    '''Add a Key-config Preset'''
     bl_idname = "wm.keyconfig_preset_add"
     bl_label = "Add Keyconfig Preset"
     preset_menu = "USERPREF_MT_keyconfigs"
index 39c73f206642d305188d59e7b06823cf8853b7d5..c51ec74ddd6fea7c0434b2574f33708f3362b3b7 100644 (file)
@@ -25,7 +25,7 @@ from bpy.props import IntProperty
 
 
 class SequencerCrossfadeSounds(Operator):
-    '''Do crossfading volume animation of two selected sound strips'''
+    '''Do cross-fading volume animation of two selected sound strips'''
 
     bl_idname = "sequencer.crossfade_sounds"
     bl_label = "Crossfade sounds"
@@ -76,7 +76,7 @@ class SequencerCrossfadeSounds(Operator):
 
 
 class SequencerCutMulticam(Operator):
-    '''Cut multicam strip and select camera'''
+    '''Cut multi-cam strip and select camera'''
 
     bl_idname = "sequencer.cut_multicam"
     bl_label = "Cut multicam"
index 338dc1a2a1e0d216a052d8ab9388bfea211928d3..0df86a3869e11fd97f9008de4d7fb872360979ad 100644 (file)
@@ -98,7 +98,7 @@ def extend(obj, operator, EXTEND_MODE):
             iA = 1
             iB = 0
 
-        # Set the target UV's touching source face, no tricky calc needed,
+        # Set the target UV's touching source face, no tricky calculations needed,
         uvs_vhash_target[edgepair_inner_target[0]][:] = uvs_vhash_source[edgepair_inner_source[iA]]
         uvs_vhash_target[edgepair_inner_target[1]][:] = uvs_vhash_source[edgepair_inner_source[iB]]
 
@@ -152,8 +152,8 @@ def extend(obj, operator, EXTEND_MODE):
         return
 
     # Modes
-    # 0 unsearched
-    # 1:mapped, use search from this face. - removed!!
+    # 0 not yet searched for.
+    # 1:mapped, use search from this face - removed!
     # 2:all siblings have been searched. don't search again.
     face_modes = [0] * len(face_sel)
     face_modes[face_act_local_index] = 1  # extend UV's from this face.
index 793b2a4ce2a4913ce4a70023bef03e1b1ef5a730..c7e35943e359f2e2903e127597fff9d12cc9376f 100644 (file)
@@ -247,10 +247,10 @@ def lightmap_uvpack(meshes,
 
         pretty_faces = [prettyface(f) for f in face_sel if len(f.vertices) == 4]
 
-        # Do we have any tri's
+        # Do we have any triangles?
         if len(pretty_faces) != len(face_sel):
 
-            # Now add tri's, not so simple because we need to pair them up.
+            # Now add triangles, not so simple because we need to pair them up.
             def trylens(f):
                 # f must be a tri
 
index 8fee21cdad5863bd4692a1f992b10d0c90ffb8a2..1464b83ab95ae621ba363e73687788c02deb9077 100644 (file)
@@ -71,7 +71,7 @@ def pointInTri2D(v, v1, v2, v3):
 
         mtx = Matrix((side1, side2, nor))
 
-        # Zero area 2d tri, even tho we throw away zerop area faces
+        # Zero area 2d tri, even tho we throw away zero area faces
         # the projection UV can result in a zero area UV.
         if not mtx.determinant():
             dict_matrix[key] = None
@@ -162,7 +162,7 @@ def island2Edge(island):
     return length_sorted_edges, [v.to_3d() for v in unique_points.values()]
 
 # ========================= NOT WORKING????
-# Find if a points inside an edge loop, un-ordered.
+# Find if a points inside an edge loop, unordered.
 # pt is and x/y
 # edges are a non ordered loop of edges.
 # offsets are the edge x and y offset.
index ea58864f7c2ed9eafe26aa289d0761ac709e8b2b..85be72b48d8fe1a9e7bbca098a57f784bc259f2b 100644 (file)
 
 # <pep8 compliant>
 
-# History
-#
-# Originally written by Campbell Barton aka ideasman42
-#
-# 2009-11-01: * 2.5 port by Keith "Wahooney" Boshoff
-#              * Replaced old method with my own, speed is similar (about 0.001 sec on Suzanne)
-#               but results are far more accurate
-#
-
 
 def applyVertexDirt(me, blur_iterations, blur_strength, clamp_dirt, clamp_clean, dirt_only):
     from mathutils import Vector
index e9cb8af1cbd5fb55fb7112e24c1908cae8c9b9c0..6184082990049df198a73d9afb199e8ee95308b9 100644 (file)
@@ -397,7 +397,7 @@ class WM_OT_context_cycle_int(Operator):
         exec("context.%s = value" % data_path)
 
         if value != eval("context.%s" % data_path):
-            # relies on rna clamping int's out of the range
+            # relies on rna clamping integers out of the range
             if self.reverse:
                 value = (1 << 31) - 1
             else:
@@ -731,7 +731,7 @@ class WM_OT_context_modal_mouse(Operator):
 
 
 class WM_OT_url_open(Operator):
-    "Open a website in the Webbrowser"
+    "Open a website in the web-browser"
     bl_idname = "wm.url_open"
     bl_label = ""
 
@@ -1180,7 +1180,7 @@ class WM_OT_copy_prev_settings(Operator):
 
 
 class WM_OT_blenderplayer_start(Operator):
-    '''Launch the Blenderplayer with the current blendfile'''
+    '''Launch the blender-player with the current blend-file'''
     bl_idname = "wm.blenderplayer_start"
     bl_label = "Start"
 
@@ -1202,7 +1202,7 @@ class WM_OT_blenderplayer_start(Operator):
 
 
 class WM_OT_keyconfig_test(Operator):
-    "Test keyconfig for conflicts"
+    "Test key-config for conflicts"
     bl_idname = "wm.keyconfig_test"
     bl_label = "Test Key Configuration for Conflicts"
 
index 3aa995353b2e649c17b5aadda8be78cdb2169ac5..91230c9dc899c72cc39b54a936028594da22019f 100644 (file)
@@ -217,7 +217,7 @@ class DATA_PT_active_spline(CurveButtonsPanelActive, Panel):
 
         if is_poly:
             # These settings are below but its easier to have
-            # poly's set aside since they use so few settings
+            # polys set aside since they use so few settings
             row = layout.row()
             row.label(text="Cyclic:")
             row.prop(act_spline, "use_cyclic_u", text="U")
@@ -250,7 +250,7 @@ class DATA_PT_active_spline(CurveButtonsPanelActive, Panel):
                 col = split.column()
                 col.prop(act_spline, "use_cyclic_v", text="V")
 
-                # its a surface, assume its a nurb.
+                # its a surface, assume its a nurbs
                 sub = col.column()
                 sub.active = (not act_spline.use_cyclic_v)
                 sub.prop(act_spline, "use_bezier_v", text="V")
index e6801f00fce0e7397f382b175f4bb7b342021c9a..d6aeea8ece756a77610f10e63543c5538bf641e2 100644 (file)
@@ -215,7 +215,7 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel):
                  # toggle active preview
                 layout.prop(surface, "preview_id")
 
-                # paintmap output
+                # paint-map output
                 row = layout.row()
                 row.prop_search(surface, "output_name_a", ob.data, "vertex_colors", text="Paintmap layer: ")
                 if surface.output_exists(object=ob, index=0):
@@ -225,7 +225,7 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel):
 
                 row.operator("dpaint.output_toggle", icon=ic, text="").output = 'A'
 
-                # wetmap output
+                # wet-map output
                 row = layout.row()
                 row.prop_search(surface, "output_name_b", ob.data, "vertex_colors", text="Wetmap layer: ")
                 if surface.output_exists(object=ob, index=1):
index 6e54bdde024875990a323d20538c3c1c3a20a2a6..13d25e6ac8d5691d0968d9bdbfdb75532408aab7 100644 (file)
@@ -824,7 +824,6 @@ class TEXTURE_PT_mapping(TextureSlotPanel, Panel):
         idblock = context_tex_datablock(context)
 
         tex = context.texture_slot
-        # textype = context.texture
 
         if not isinstance(idblock, Brush):
             split = layout.split(percentage=0.3)
@@ -912,7 +911,6 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel):
 
         idblock = context_tex_datablock(context)
 
-        # textype = context.texture
         tex = context.texture_slot
 
         def factor_but(layout, toggle, factor, name):
index f7636c87bd568001f6d291dd808bf3dab06512a7..a7592ec937594fcd8c1c062489127877376651d3 100644 (file)
@@ -275,7 +275,7 @@ class INFO_MT_add(Menu):
     def draw(self, context):
         layout = self.layout
 
-        # note, dont use 'EXEC_SCREEN' or operators wont get the 'v3d' context.
+        # note, don't use 'EXEC_SCREEN' or operators wont get the 'v3d' context.
 
         layout.operator_context = 'EXEC_AREA'
 
index da6d1f7212359ab19190dc573d712c0c23865739..1e68b41c645ae55888df5f102731fb702215eb38 100644 (file)
@@ -49,8 +49,8 @@ class LOGIC_PT_properties(Panel):
                 sub.prop(prop, "name", text="")
                 row.prop(prop, "type", text="")
                 # get the property from the body, not the game property
-                # note, don't do this - it's too slow and body can potentually be a really long string.
-                # row.prop(ob.data, "body", text="")
+                # note, don't do this - it's too slow and body can potentially be a really long string.
+                #~ row.prop(ob.data, "body", text="")
                 row.label("See Text Object")
             else:
                 props = layout.operator("object.game_property_new", text="Add Text Game Property", icon='ZOOMIN')
index 18d32575bc29bb00e94e2a0578d95d5e744ea511..33610f3ba33bbd43040ea2c6bb01b485a5a1490e 100644 (file)
@@ -143,7 +143,7 @@ class NLA_MT_edit(Menu):
         layout.operator_menu_enum("anim.channels_move", "direction", text="Track Ordering...")
 
         layout.separator()
-        # TODO: names of these tools for 'tweakmode' need changing?
+        # TODO: names of these tools for 'tweak-mode' need changing?
         if scene.is_nla_tweakmode:
             layout.operator("nla.tweakmode_exit", text="Stop Tweaking Strip Actions")
         else:
index 8a2dff8f050210e5fd4df97edbeb11d954f74bfd..2efeff0e0790a0d1a34654524cf69f7d71e2f07d 100644 (file)
@@ -293,7 +293,7 @@ class USERPREF_PT_edit(Panel):
         col.label(text="Grease Pencil:")
         col.prop(edit, "grease_pencil_manhattan_distance", text="Manhattan Distance")
         col.prop(edit, "grease_pencil_euclidean_distance", text="Euclidean Distance")
-        #col.prop(edit, "use_grease_pencil_simplify_stroke", text="Simplify Stroke")
+        #col.prop(edit, "use_grease_pencil_simplify_stroke", text="Simplify Stroke")
         col.prop(edit, "grease_pencil_eraser_radius", text="Eraser Radius")
         col.prop(edit, "use_grease_pencil_smooth_stroke", text="Smooth Stroke")
         col.separator()
@@ -316,7 +316,7 @@ class USERPREF_PT_edit(Panel):
 
         sub = col.column()
 
-        # sub.active = edit.use_keyframe_insert_auto # incorrect, timeline can enable
+        #~ sub.active = edit.use_keyframe_insert_auto # incorrect, time-line can enable
         sub.prop(edit, "use_keyframe_insert_available", text="Only Insert Available")
 
         col.separator()
@@ -833,7 +833,7 @@ from .space_userpref_keymap import InputKeyMapPanel
 
 
 class USERPREF_MT_ndof_settings(Menu):
-    # accessed from the window keybindings in C (only)
+    # accessed from the window key-bindings in C (only)
     bl_label = "3D Mouse Settings"
 
     def draw(self, context):
@@ -965,7 +965,7 @@ class USERPREF_PT_input(Panel, InputKeyMapPanel):
 class USERPREF_MT_addons_dev_guides(Menu):
     bl_label = "Development Guides"
 
-    # menu to open webpages with addons development guides
+    # menu to open web-pages with addons development guides
     def draw(self, context):
         layout = self.layout
         layout.operator("wm.url_open", text="API Concepts", icon='URL').url = "http://wiki.blender.org/index.php/Dev:2.5/Py/API/Intro"
@@ -1097,7 +1097,7 @@ class USERPREF_PT_addons(Panel):
                 else:
                     row.operator("wm.addon_enable", icon='CHECKBOX_DEHLT', text="", emboss=False).module = module_name
 
-                # Expanded UI (only if additional infos are available)
+                # Expanded UI (only if additional info is available)
                 if info["show_expanded"]:
                     if info["description"]:
                         split = colsub.row().split(percentage=0.15)
index 6fa3aabaeb81be90696332df6c4251535941fc34..030e1ee0f6db6a5fd431946af649dc7ac5a0ffc4 100644 (file)
@@ -180,7 +180,7 @@ class InputKeyMapPanel:
                     sub.prop(kmi, "propvalue", text="")
                 else:
                     # One day...
-                    # sub.prop_search(kmi, "idname", bpy.context.window_manager, "operators_all", text="")
+                    #~ sub.prop_search(kmi, "idname", bpy.context.window_manager, "operators_all", text="")
                     sub.prop(kmi, "idname", text="")
 
                 sub = split.column()
index 3aa9434073d29e3838d1470c40e8535ae9669cf2..081e561527ce76622504777fdfd2282dc7f8f5c2 100644 (file)
@@ -1643,8 +1643,8 @@ class VIEW3D_MT_edit_mesh_edges(Menu):
         layout.operator("TRANSFORM_OT_edge_crease")
         layout.operator("mesh.loop_multi_select", text="Edge Loop").ring = False
 
-        # uiItemO(layout, "Loopcut", 0, "mesh.loop_cut"); // CutEdgeloop(em, 1);
-        # uiItemO(layout, "Edge Slide", 0, "mesh.edge_slide"); // EdgeSlide(em, 0,0.0);
+        #~ uiItemO(layout, "Loopcut", 0, "mesh.loop_cut"); // CutEdgeloop(em, 1);
+        #~ uiItemO(layout, "Edge Slide", 0, "mesh.edge_slide"); // EdgeSlide(em, 0,0.0);
 
         layout.operator("mesh.loop_multi_select", text="Edge Ring").ring = True
 
index aa7cec0c01ac8894ed2be62f9081eed269f1dc57..5171a6dd47dad7ae4c27646612790a013059ba63 100644 (file)
@@ -1051,10 +1051,10 @@ class VIEW3D_PT_tools_weightpaint_options(Panel, View3DPaintPanel):
         self.unified_paint_settings(col, context)
 
 # Commented out because the Apply button isn't an operator yet, making these settings useless
-#              col.label(text="Gamma:")
-#              col.prop(wpaint, "gamma", text="")
-#              col.label(text="Multiply:")
-#              col.prop(wpaint, "mul", text="")
+#~         col.label(text="Gamma:")
+#~         col.prop(wpaint, "gamma", text="")
+#~         col.label(text="Multiply:")
+#~         col.prop(wpaint, "mul", text="")
 
 # Also missing now:
 # Soft, Vertex-Group, X-Mirror and "Clear" Operator.
@@ -1081,10 +1081,10 @@ class VIEW3D_PT_tools_vertexpaint(Panel, View3DPaintPanel):
         self.unified_paint_settings(col, context)
 
 # Commented out because the Apply button isn't an operator yet, making these settings useless
-#              col.label(text="Gamma:")
-#              col.prop(vpaint, "gamma", text="")
-#              col.label(text="Multiply:")
-#              col.prop(vpaint, "mul", text="")
+#~         col.label(text="Gamma:")
+#~         col.prop(vpaint, "gamma", text="")
+#~         col.label(text="Multiply:")
+#~         col.prop(vpaint, "mul", text="")
 
 # ********** default tools for texture-paint ****************
 
index bc0252aa61660fc92ae22182fd080d71bb757758..1caf7c4398359bec859fbee90e4b254d96deedce 100644 (file)
@@ -326,7 +326,7 @@ class BUILTIN_KSI_WholeCharacter(KeyingSetInfo):
 
                 for i in range(3):
                     if not bone.lock_rotation[i]:
-                        ksi.addProp(ks, bone, prop, i + 1)  # i + 1, since here x,y,z = 1,2,3, and w=0
+                        ksi.addProp(ks, bone, prop, i + 1)  # i + 1, since here x/y/z = 1,2,3, and w=0
         elif True not in bone.lock_rotation:
             # if axis-angle rotations get locked as eulers, then it's too messy to allow anything
             # other than all open unless we keyframe the whole lot
index d3c94b86809e68923f07baade33ba785a0fbd9ed..a21e5ed86c876395c8d16f715f7669effc4e0f21 100644 (file)
@@ -15,7 +15,7 @@ class CustomMenu(bpy.types.Menu):
 
         layout.label(text="Hello world!", icon='WORLD_DATA')
 
-        # use an operator enum property to populate a submenu
+        # use an operator enum property to populate a sub-menu
         layout.operator_menu_enum("object.select_by_type",
                                   property="type",
                                   text="Select All by Type...",
index e99dece0f7cf777516aa28d4d83426eded1f5e7d..4c42d1e4a6c688de3f8c49eab5adfa2388e882bd 100644 (file)
@@ -74,7 +74,7 @@ void filepath_ffmpeg(char* string, struct RenderData* rd);
 
 extern void ffmpeg_set_preset(struct RenderData *rd, int preset);
 extern void ffmpeg_verify_image_type(struct RenderData *rd, struct ImageFormatData *imf);
-extern void ffmpeg_verify_lossless_format(struct RenderData *rd, struct ImageFormatData *imf);
+extern void ffmpeg_verify_codec_settings(struct RenderData *rd);
 
 extern struct IDProperty *ffmpeg_property_add(struct RenderData *Rd, const char *type, int opt_index, int parent_index);
 extern int ffmpeg_property_add_string(struct RenderData *rd, const char *type, const char *str);
index e67056cdd9e1ada39983826eb4057adfc88ee268..19fc75a88fe8ac36949aca9b5c0e4ee97b4bf21a 100644 (file)
@@ -398,8 +398,11 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
                                                                // fprintf(stderr,"armature %s target :%s \n", ob->id.name, target->id.name);
                                                                node3 = dag_get_node(dag, ct->tar);
                                                                
-                                                               if (ct->subtarget[0])
+                                                               if (ct->subtarget[0]) {
                                                                        dag_add_relation(dag,node3,node, DAG_RL_OB_DATA|DAG_RL_DATA_DATA, cti->name);
+                                                                       if(ct->tar->type == OB_MESH)
+                                                                               node3->customdata_mask |= CD_MASK_MDEFORMVERT;
+                                                               }
                                                                else if(ELEM3(con->type, CONSTRAINT_TYPE_FOLLOWPATH, CONSTRAINT_TYPE_CLAMPTO, CONSTRAINT_TYPE_SPLINEIK))        
                                                                        dag_add_relation(dag,node3,node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, cti->name);
                                                                else
index 0824a9f6685c350a29b4df1c49912f0706e2aeb1..b52576ec465ebdbdea240d9c8df2d416f74185e9 100644 (file)
@@ -58,7 +58,7 @@ static IDType idtypes[]= {
        { ID_ID,                "ID",           "ids",                  0}, /* plural is fake */
        { ID_IM,                "Image",        "images",               IDTYPE_FLAGS_ISLINKABLE}, 
        { ID_IP,                "Ipo",          "ipos",                 IDTYPE_FLAGS_ISLINKABLE},  /* deprecated */
-       { ID_KE,                "Key",          "keys",                 0}, 
+       { ID_KE,                "Key",          "shape_keys",   0}, 
        { ID_LA,                "Lamp",         "lamps",                IDTYPE_FLAGS_ISLINKABLE}, 
        { ID_LI,                "Library",      "libraries",    0}, 
        { ID_LT,                "Lattice",      "lattices",             IDTYPE_FLAGS_ISLINKABLE}, 
index 0b043e26ab7e09586bb39a579a94864e4b8ff04b..bae4d9c4b4e7215a30c44ada05540a7abd523250 100644 (file)
@@ -49,6 +49,8 @@
 #  include "AUD_C-API.h"
 #endif
 
+#include "BLI_utildefines.h"
+
 #include "BKE_global.h"
 #include "BKE_idprop.h"
 #include "BKE_main.h"
@@ -250,7 +252,8 @@ static int write_video_frame(RenderData *rd, int cfra, AVFrame* frame, ReportLis
 
        outsize = avcodec_encode_video(c, video_buffer, video_buffersize, 
                                           frame);
-       if (outsize != 0) {
+
+       if (outsize > 0) {
                AVPacket packet;
                av_init_packet(&packet);
 
@@ -268,14 +271,13 @@ static int write_video_frame(RenderData *rd, int cfra, AVFrame* frame, ReportLis
                packet.data = video_buffer;
                packet.size = outsize;
                ret = av_interleaved_write_frame(outfile, &packet);
-       } else {
-               ret = 0;
+               success = (ret == 0);
+       } else if (outsize < 0) {
+               success = 0;
        }
 
-       if (ret != 0) {
-               success= 0;
+       if (!success)
                BKE_report(reports, RPT_ERROR, "Error writing frame.");
-       }
 
        return success;
 }
@@ -483,7 +485,7 @@ static AVStream* alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex
        if (!codec) return NULL;
        
        /* Be sure to use the correct pixel format(e.g. RGB, YUV) */
-       
+
        if (codec->pix_fmts) {
                c->pix_fmt = codec->pix_fmts[0];
        } else {
@@ -509,6 +511,12 @@ static AVStream* alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex
                c->pix_fmt = PIX_FMT_RGB32;
        }
 
+       if ( codec_id == CODEC_ID_QTRLE ) {
+               if (rd->im_format.planes ==  R_IMF_PLANES_RGBA) {
+                       c->pix_fmt = PIX_FMT_ARGB;
+               }
+       }
+
        if ((of->oformat->flags & AVFMT_GLOBALHEADER)
 //             || !strcmp(of->oformat->name, "mp4")
 //         || !strcmp(of->oformat->name, "mov")
@@ -538,7 +546,19 @@ static AVStream* alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex
                return NULL;
        }
 
-       video_buffersize = avpicture_get_size(c->pix_fmt, c->width, c->height);
+       if ( codec_id == CODEC_ID_QTRLE ) {
+               // normally it should be enough to have buffer with actual image size,
+               // but some codecs like QTRLE might store extra information in this buffer,
+               // so it should be a way larger
+
+               // maximum video buffer size is 6-bytes per pixel, plus DPX header size (1664)
+               // (from FFmpeg sources)
+               int size = c->width * c->height;
+               video_buffersize = 7*size + 10000;
+       }
+       else
+               video_buffersize = avpicture_get_size(c->pix_fmt, c->width, c->height);
+
        video_buffer = (uint8_t*)MEM_mallocN(video_buffersize*sizeof(uint8_t),
                                                 "FFMPEG video buffer");
        
@@ -1200,12 +1220,14 @@ int ffmpeg_property_add_string(RenderData *rd, const char * type, const char * s
        return 1;
 }
 
-static void ffmpeg_set_expert_options(RenderData *rd, int preset)
+static void ffmpeg_set_expert_options(RenderData *rd)
 {
+       int codec_id = rd->ffcodecdata.codec;
+
        if(rd->ffcodecdata.properties)
                IDP_FreeProperty(rd->ffcodecdata.properties);
 
-       if(preset == FFMPEG_PRESET_H264) {
+       if(codec_id == CODEC_ID_H264) {
                /*
                 * All options here are for x264, but must be set via ffmpeg.
                 * The names are therefore different - Search for "x264 to FFmpeg option mapping"
@@ -1248,6 +1270,12 @@ static void ffmpeg_set_expert_options(RenderData *rd, int preset)
                if(rd->ffcodecdata.flags & FFMPEG_LOSSLESS_OUTPUT)
                        ffmpeg_property_add_string(rd, "video", "cqp:0");
        }
+#if 0  /* disabled for after release */
+       else if(codec_id == CODEC_ID_DNXHD) {
+               if(rd->ffcodecdata.flags & FFMPEG_LOSSLESS_OUTPUT)
+                       ffmpeg_property_add_string(rd, "video", "mbd:rd");
+       }
+#endif
 }
 
 void ffmpeg_set_preset(RenderData *rd, int preset)
@@ -1317,7 +1345,6 @@ void ffmpeg_set_preset(RenderData *rd, int preset)
                rd->ffcodecdata.mux_packet_size = 2048;
                rd->ffcodecdata.mux_rate = 10080000;
 
-               ffmpeg_set_expert_options(rd, preset);
                break;
 
        case FFMPEG_PRESET_THEORA:
@@ -1341,6 +1368,8 @@ void ffmpeg_set_preset(RenderData *rd, int preset)
                break;
 
        }
+
+       ffmpeg_set_expert_options(rd);
 }
 
 void ffmpeg_verify_image_type(RenderData *rd, ImageFormatData *imf)
@@ -1388,11 +1417,9 @@ void ffmpeg_verify_image_type(RenderData *rd, ImageFormatData *imf)
        }
 }
 
-void ffmpeg_verify_lossless_format(RenderData *rd, ImageFormatData *imf)
+void ffmpeg_verify_codec_settings(RenderData *rd)
 {
-       if(imf->imtype == R_IMF_IMTYPE_H264) {
-               ffmpeg_set_expert_options(rd, FFMPEG_PRESET_H264);
-       }
+       ffmpeg_set_expert_options(rd);
 }
 
 #endif
index cadc57c9881c4304b0384ff8a8fa8bede0912fdf..7e413cf75f717cc7df8d94c910c639f9081d93f5 100644 (file)
@@ -5859,15 +5859,17 @@ static int ui_handle_list_event(bContext *C, wmEvent *event, ARegion *ar)
                        retval= WM_UI_HANDLER_BREAK;
                }
                else if(ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE)) {
-                       /* list template will clamp */
-                       if(event->type == WHEELUPMOUSE)
-                               pa->list_scroll--;
-                       else
-                               pa->list_scroll++;
+                       if(pa->list_last_len > pa->list_size) {
+                               /* list template will clamp */
+                               if(event->type == WHEELUPMOUSE)
+                                       pa->list_scroll--;
+                               else
+                                       pa->list_scroll++;
 
-                       ED_region_tag_redraw(ar);
+                               ED_region_tag_redraw(ar);
 
-                       retval= WM_UI_HANDLER_BREAK;
+                               retval= WM_UI_HANDLER_BREAK;
+                       }
                }
        }
 
index 5ebc8acf710fd18fd29ffb8b09ababef13b278d5..11f936a6a9f9752c3a8df6da24d399e004b07648 100644 (file)
@@ -13,7 +13,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
  * The Original Code is Copyright (C) 2007 Blender Foundation.
  * All rights reserved.
@@ -347,7 +347,7 @@ static void ringsel_finish(bContext *C, wmOperator *op)
 static void ringsel_exit(bContext *UNUSED(C), wmOperator *op)
 {
        tringselOpData *lcd= op->customdata;
-       
+
        /* deactivate the extra drawing stuff in 3D-View */
        ED_region_draw_cb_exit(lcd->ar->type, lcd->draw_handle);
        
@@ -395,6 +395,56 @@ static int ringcut_cancel (bContext *C, wmOperator *op)
        return OPERATOR_CANCELLED;
 }
 
+/* for bmesh this tool is in bmesh_select.c */
+#if 0
+
+static int ringsel_invoke (bContext *C, wmOperator *op, wmEvent *evt)
+{
+       tringselOpData *lcd;
+       EditEdge *edge;
+       int dist = 75;
+       
+       view3d_operator_needs_opengl(C);
+
+       if (!ringsel_init(C, op, 0))
+               return OPERATOR_CANCELLED;
+       
+       lcd = op->customdata;
+       
+       if (lcd->em->selectmode == SCE_SELECT_FACE) {
+               PointerRNA props_ptr;
+               int extend = RNA_boolean_get(op->ptr, "extend");
+
+               ringsel_exit(op);
+
+               WM_operator_properties_create(&props_ptr, "MESH_OT_loop_select");
+               RNA_boolean_set(&props_ptr, "extend", extend);
+               WM_operator_name_call(C, "MESH_OT_loop_select", WM_OP_INVOKE_REGION_WIN, &props_ptr);
+               WM_operator_properties_free(&props_ptr);
+
+               return OPERATOR_CANCELLED;
+       }
+
+       lcd->vc.mval[0] = evt->mval[0];
+       lcd->vc.mval[1] = evt->mval[1];
+       
+       edge = findnearestedge(&lcd->vc, &dist);
+       if(!edge) {
+               ringsel_exit(op);
+               return OPERATOR_CANCELLED;
+       }
+
+       lcd->eed = edge;
+       ringsel_find_edge(lcd, 1);
+
+       ringsel_finish(C, op);
+       ringsel_exit(op);
+
+       return OPERATOR_FINISHED;
+}
+
+#endif
+
 static int ringcut_invoke (bContext *C, wmOperator *op, wmEvent *evt)
 {
        Object *obedit= CTX_data_edit_object(C);
@@ -531,6 +581,28 @@ static int loopcut_modal (bContext *C, wmOperator *op, wmEvent *event)
        return OPERATOR_RUNNING_MODAL;
 }
 
+/* for bmesh this tool is in bmesh_select.c */
+#if 0
+
+void MESH_OT_edgering_select (wmOperatorType *ot)
+{
+       /* description */
+       ot->name= "Edge Ring Select";
+       ot->idname= "MESH_OT_edgering_select";
+       ot->description= "Select an edge ring";
+       
+       /* callbacks */
+       ot->invoke= ringsel_invoke;
+       ot->poll= ED_operator_editmesh_region_view3d; 
+       
+       /* flags */
+       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+       RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection");
+}
+
+#endif
+
 void MESH_OT_loopcut (wmOperatorType *ot)
 {
        /* description */
index 416fbd58a30a9092cdaa33a4517dad73bab88aac..779481fb3b8ad2be1d824d73d516e3214d8439cf 100644 (file)
@@ -3863,8 +3863,8 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
 
                Scene * scene= t->scene;
                int cfra= CFRA;
-               int left= seq_tx_get_final_left(seq, 0);
-               int right= seq_tx_get_final_right(seq, 0);
+               int left= seq_tx_get_final_left(seq, 1);
+               int right= seq_tx_get_final_right(seq, 1);
 
                if (seq->depth == 0 && ((seq->flag & SELECT) == 0 || (seq->flag & SEQ_LOCK))) {
                        *recursive= 0;
@@ -3964,7 +3964,7 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
 
 
 
-static int SeqTransCount(TransInfo *t, ListBase *seqbase, int depth)
+static int SeqTransCount(TransInfo *t, Sequence *parent, ListBase *seqbase, int depth)
 {
        Sequence *seq;
        int tot= 0, recursive, count, flag;
@@ -3972,11 +3972,15 @@ static int SeqTransCount(TransInfo *t, ListBase *seqbase, int depth)
        for (seq= seqbase->first; seq; seq= seq->next) {
                seq->depth= depth;
 
+               /* seq->tmp is used by seq_tx_get_final_{left,right} to check sequence's range and clamp to it if needed.
+                * it's first place where digging into sequences tree, so store link to parent here */
+               seq->tmp = parent;
+
                SeqTransInfo(t, seq, &recursive, &count, &flag); /* ignore the flag */
                tot += count;
 
                if (recursive) {
-                       tot += SeqTransCount(t, &seq->seqbase, depth+1);
+                       tot += SeqTransCount(t, seq, &seq->seqbase, depth+1);
                }
        }
 
@@ -4274,7 +4278,7 @@ static void createTransSeqData(bContext *C, TransInfo *t)
        }
 #endif
 
-       count = SeqTransCount(t, ed->seqbasep, 0);
+       count = SeqTransCount(t, NULL, ed->seqbasep, 0);
 
        /* allocate memory for data */
        t->total= count;
index 6516b50402dab31ef2bc95cd66c3046eec936fa7..2264e82b36325cad789bc94c6793cd09425bb7b7 100644 (file)
@@ -48,13 +48,13 @@ typedef enum eSDNA_Type {
        SDNA_TYPE_ULONG    = 6,
        SDNA_TYPE_FLOAT    = 7,
        SDNA_TYPE_DOUBLE   = 8,
-       SDNA_TYPE_INT64    = 9,
-       SDNA_TYPE_UINT64   = 10
-       /* ,SDNA_TYPE_VOID     = 11 */ /* nothing uses yet */
+       /* ,SDNA_TYPE_VOID = 9 */ /* nothing uses yet */
+       SDNA_TYPE_INT64    = 10,
+       SDNA_TYPE_UINT64   = 11
 } eSDNA_Type;
 
 /* define so switch statements don't complain */
-#define SDNA_TYPE_VOID 11
+#define SDNA_TYPE_VOID 9
 
 struct SDNA *DNA_sdna_from_data(void *data, int datalen, int do_endian_swap);
 void DNA_sdna_free(struct SDNA *sdna);
index eed178b238de235cd79398585750d594d1e833b4..de0cd6d9c59d716b6cb43e4cf43e7ecfb1ad054e 100644 (file)
@@ -232,7 +232,7 @@ StructRNA *rna_PropertyGroup_register(Main *UNUSED(bmain), ReportList *reports,
 
        /* note: it looks like there is no length limit on the srna id since its
         * just a char pointer, but take care here, also be careful that python
-        * owns the string pointer which it could potentually free while blender
+        * owns the string pointer which it could potentially free while blender
         * is running. */
        if(BLI_strnlen(identifier, MAX_IDPROP_NAME) == MAX_IDPROP_NAME) {
                BKE_reportf(reports, RPT_ERROR, "registering id property class: '%s' is too long, maximum length is " STRINGIFY(MAX_IDPROP_NAME), identifier);
index 6783e5d4788ac8415ca3a7b72ee56390c167faa0..d736a18068d2c3da98af58695a6aeefc791d408c 100644 (file)
@@ -80,7 +80,7 @@
 Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_modifiers, int settings)
 {
        Mesh *tmpmesh;
-       Curve *tmpcu = NULL;
+       Curve *tmpcu = NULL, *copycu;
        Object *tmpobj = NULL;
        int render = settings == eModifierMode_Render, i;
        int cage = !apply_modifiers;
@@ -101,22 +101,20 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
                        object_free_modifiers(tmpobj);
 
                /* copies the data */
-               tmpobj->data = copy_curve( (Curve *) ob->data );
+               copycu = tmpobj->data = copy_curve( (Curve *) ob->data );
 
-#if 0
-               /* copy_curve() sets disp.first null, so currently not need */
-               {
-                       Curve *cu;
-                       cu = (Curve *)tmpobj->data;
-                       if( cu->disp.first )
-                               MEM_freeN( cu->disp.first );
-                       cu->disp.first = NULL;
-               }
-       
-#endif
+               /* temporarily set edit so we get updates from edit mode, but
+                  also because for text datablocks copying it while in edit
+                  mode gives invalid data structures */
+               copycu->editfont = tmpcu->editfont;
+               copycu->editnurb = tmpcu->editnurb;
 
                /* get updated display list, and convert to a mesh */
                makeDispListCurveTypes( sce, tmpobj, 0 );
+
+               copycu->editfont = NULL;
+               copycu->editnurb = NULL;
+
                nurbs_to_mesh( tmpobj );
                
                /* nurbs_to_mesh changes the type to a mesh, check it worked */
index d755bda915784c8b65c3445b0e5028f7939f737c..9a94a98bfaf599e6c5f020b91148b92eb1d30805 100644 (file)
@@ -712,7 +712,21 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf(bContext *C, P
         * where 'BW' will force greyscale even if the output format writes
         * as RGBA, this is age old blender convention and not sure how useful
         * it really is but keep it for now - campbell */
-       const char chan_flag= BKE_imtype_valid_channels(imf->imtype) | (is_render ? IMA_CHAN_FLAG_BW : 0);
+       char chan_flag= BKE_imtype_valid_channels(imf->imtype) | (is_render ? IMA_CHAN_FLAG_BW : 0);
+
+#ifdef WITH_FFMPEG
+       /* a WAY more crappy case than B&W flag: depending on codec, file format MIGHT support
+        * alpha channel. for example MPEG format with h264 codec can't do alpha channel, but
+        * the same MPEG format with QTRLE codec can easily handle alpga channel.
+        * not sure how to deal with such cases in a nicer way (sergey) */
+       if(is_render) {
+               Scene *scene = ptr->id.data;
+               RenderData *rd = &scene->r;
+
+               if (rd->ffcodecdata.codec == CODEC_ID_QTRLE)
+                       chan_flag |= IMA_CHAN_FLAG_ALPHA;
+       }
+#endif
 
        if (chan_flag == (IMA_CHAN_FLAG_BW|IMA_CHAN_FLAG_RGB|IMA_CHAN_FLAG_ALPHA)) {
                return image_color_mode_items;
@@ -899,7 +913,16 @@ static void rna_FFmpegSettings_lossless_output_set(PointerRNA *ptr, int value)
                rd->ffcodecdata.flags |= FFMPEG_LOSSLESS_OUTPUT;
        else
                rd->ffcodecdata.flags &= ~FFMPEG_LOSSLESS_OUTPUT;
-       ffmpeg_verify_lossless_format(rd, &rd->im_format);
+
+       ffmpeg_verify_codec_settings(rd);
+}
+
+static void rna_FFmpegSettings_codec_settings_update(Main *UNUSED(bmain), Scene *UNUSED(scene_unused), PointerRNA *ptr)
+{
+       Scene *scene = (Scene *) ptr->id.data;
+       RenderData *rd = &scene->r;
+
+       ffmpeg_verify_codec_settings(rd);
 }
 #endif
 
@@ -2811,6 +2834,8 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
                {CODEC_ID_THEORA, "THEORA", 0, "Theora", ""},
                {CODEC_ID_FLV1, "FLASH", 0, "Flash Video", ""},
                {CODEC_ID_FFV1, "FFV1", 0, "FFmpeg video codec #1", ""},
+               {CODEC_ID_QTRLE, "QTRLE", 0, "QTRLE", ""},
+               /* {CODEC_ID_DNXHD, "DNXHD", 0, "DNxHD", ""},*/ /* disabled for after release */
                {0, NULL, 0, NULL, NULL}};
 
        static EnumPropertyItem ffmpeg_audio_codec_items[] = {
@@ -2842,13 +2867,13 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
        RNA_def_property_enum_bitflag_sdna(prop, NULL, "type");
        RNA_def_property_enum_items(prop, ffmpeg_format_items);
        RNA_def_property_ui_text(prop, "Format", "Output file format");
-       RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+       RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_FFmpegSettings_codec_settings_update");
 
        prop = RNA_def_property(srna, "codec", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_bitflag_sdna(prop, NULL, "codec");
        RNA_def_property_enum_items(prop, ffmpeg_codec_items);
        RNA_def_property_ui_text(prop, "Codec", "FFmpeg codec to use");
-       RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+       RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_FFmpegSettings_codec_settings_update");
 
        prop = RNA_def_property(srna, "video_bitrate", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "video_bitrate");
index 95488ead70d19535de53b7a4b48a4dfc5769cd81..35f12114a4e510d8fd6356e6ad73411bf7ff32e6 100644 (file)
@@ -197,7 +197,9 @@ void RNA_api_wm(StructRNA *srna)
        PropertyRNA *parm;
 
        func= RNA_def_function(srna, "fileselect_add", "WM_event_add_fileselect");
-       RNA_def_function_ui_description(func, "Show up the file selector");
+       RNA_def_function_ui_description(func, "Opens a file selector with an operator. "
+                                       "The string properties 'filepath', 'filename', 'directory' and a 'files' collection "
+                                       "are assigned when present in the operator");
        rna_generic_op_invoke(func, 0);
 
        func= RNA_def_function(srna, "modal_handler_add", "rna_event_modal_handler_add");
index 0ca8878c96a27ffb2902a855388f2c66b52c01b9..dec701d5fc30985cd0a7415bd9b49aa809bdf6b4 100644 (file)
@@ -378,9 +378,6 @@ PyDoc_STRVAR(Vector_resize_doc,
 ".. method:: resize(size=3)\n"
 "\n"
 "   Resize the vector to have size number of elements.\n"
-"\n"
-"   :return: an instance of itself\n"
-"   :rtype: :class:`Vector`\n"
 );
 static PyObject *Vector_resize(VectorObject *self, PyObject *value)
 {
@@ -473,9 +470,6 @@ PyDoc_STRVAR(Vector_resize_2d_doc,
 ".. method:: resize_2d()\n"
 "\n"
 "   Resize the vector to 2D  (x, y).\n"
-"\n"
-"   :return: an instance of itself\n"
-"   :rtype: :class:`Vector`\n"
 );
 static PyObject *Vector_resize_2d(VectorObject *self)
 {
@@ -508,9 +502,6 @@ PyDoc_STRVAR(Vector_resize_3d_doc,
 ".. method:: resize_3d()\n"
 "\n"
 "   Resize the vector to 3D  (x, y, z).\n"
-"\n"
-"   :return: an instance of itself\n"
-"   :rtype: :class:`Vector`\n"
 );
 static PyObject *Vector_resize_3d(VectorObject *self)
 {
@@ -546,9 +537,6 @@ PyDoc_STRVAR(Vector_resize_4d_doc,
 ".. method:: resize_4d()\n"
 "\n"
 "   Resize the vector to 4D (x, y, z, w).\n"
-"\n"
-"   :return: an instance of itself\n"
-"   :rtype: :class:`Vector`\n"
 );
 static PyObject *Vector_resize_4d(VectorObject *self)
 {
@@ -2676,9 +2664,6 @@ PyDoc_STRVAR(Vector_negate_doc,
 ".. method:: negate()\n"
 "\n"
 "   Set all values to their negative.\n"
-"\n"
-"   :return: an instance of itself\n"
-"   :rtype: :class:`Vector`\n"
 );
 static PyObject *Vector_negate(VectorObject *self)
 {
index 0e9cfd11a68c721e036ae5a6b01fbfbec9368e8f..9aac7aae53e70671f4e0fd72fb811c626048c8ac 100644 (file)
@@ -1030,12 +1030,17 @@ static void do_specular_ramp(ShadeInput *shi, float is, float t, float spec[3])
 /* preprocess, textures were not done, don't use shi->amb for that reason */
 void ambient_occlusion(ShadeInput *shi)
 {
-       if(R.wrld.ao_gather_method == WO_AOGATHER_APPROX)
+       if((R.wrld.ao_gather_method == WO_AOGATHER_APPROX) && shi->mat->amb!=0.0f) {
                sample_occ(&R, shi);
-       else if(R.r.mode & R_RAYTRACE)
+       }
+       else if((R.r.mode & R_RAYTRACE) && shi->mat->amb!=0.0f) {
                ray_ao(shi, shi->ao, shi->env);
-       else
+       }
+       else {
                shi->ao[0]= shi->ao[1]= shi->ao[2]= 1.0f;
+               zero_v3(shi->env);
+               zero_v3(shi->indirect);
+       }
 }
 
 
index 82084700d6cabc5e8026a9e94af5a7822f218fa4..401474b21a91a37e4ae6a2033cd6183a0477644e 100644 (file)
@@ -1880,6 +1880,14 @@ PyObject* initGamePlayerPythonScripting(const STR_String& progname, TPythonSecur
                Py_DECREF(mod);
        }
 
+#ifdef WITH_AUDASPACE
+       /* accessing a SoundActuator's sound results in a crash if aud is not initialised... */
+       {
+               PyObject *mod= PyImport_ImportModuleLevel((char *)"aud", NULL, NULL, NULL, 0);
+               Py_DECREF(mod);
+       }
+#endif
+
        initPyTypes();
        
        bpy_import_main_set(maggie);
@@ -1924,6 +1932,14 @@ PyObject* initGamePythonScripting(const STR_String& progname, TPythonSecurityLev
        Py_NoSiteFlag=1;
        Py_FrozenFlag=1;
 
+#ifdef WITH_AUDASPACE
+       /* accessing a SoundActuator's sound results in a crash if aud is not initialised... */
+       {
+               PyObject *mod= PyImport_ImportModuleLevel((char *)"aud", NULL, NULL, NULL, 0);
+               Py_DECREF(mod);
+       }
+#endif
+
        initPyTypes();
        
        bpy_import_main_set(maggie);