Merge remote-tracking branch 'origin/master' into blender2.8
authorDalai Felinto <dfelinto@gmail.com>
Fri, 7 Jul 2017 09:27:48 +0000 (11:27 +0200)
committerDalai Felinto <dfelinto@gmail.com>
Fri, 7 Jul 2017 09:27:48 +0000 (11:27 +0200)
intern/cycles/device/opencl/opencl_base.cpp
intern/cycles/device/opencl/opencl_split.cpp
intern/libmv/intern/track_region.cc
release/scripts/startup/bl_operators/clip.py
source/blender/editors/space_image/image_ops.c

index 49d7a228524d826f133e3f946e627d016eb92402..509da7a0a8433809a35d26b9457dddd7cdc0cddb 100644 (file)
@@ -282,7 +282,8 @@ void OpenCLDeviceBase::mem_alloc(const char *name, device_memory& mem, MemoryTyp
        clGetDeviceInfo(cdDevice, CL_DEVICE_MAX_MEM_ALLOC_SIZE, sizeof(cl_ulong), &max_alloc_size, NULL);
 
        if(DebugFlags().opencl.mem_limit) {
-               max_alloc_size = min(max_alloc_size, DebugFlags().opencl.mem_limit - stats.mem_used);
+               max_alloc_size = min(max_alloc_size,
+                                    cl_ulong(DebugFlags().opencl.mem_limit - stats.mem_used));
        }
 
        if(size > max_alloc_size) {
index fdaca2252d97fc76a6d91e34374fd682b77185a0..76d9983e9a225421df4ceb41ef000e5ba9abdddc 100644 (file)
@@ -426,7 +426,8 @@ public:
                clGetDeviceInfo(device->cdDevice, CL_DEVICE_MAX_MEM_ALLOC_SIZE, sizeof(cl_ulong), &max_buffer_size, NULL);
 
                if(DebugFlags().opencl.mem_limit) {
-                       max_buffer_size = min(max_buffer_size, DebugFlags().opencl.mem_limit - device->stats.mem_used);
+                       max_buffer_size = min(max_buffer_size,
+                                             cl_ulong(DebugFlags().opencl.mem_limit - device->stats.mem_used));
                }
 
                VLOG(1) << "Maximum device allocation size: "
index d395b6457d7d071641fc8e2b6adcc41eeed48488..8989897e09fa2840969453ef8cf2f8e5f7f71bd2 100644 (file)
@@ -36,7 +36,7 @@
 
 /* define this to generate PNG images with content of search areas
    on every itteration of tracking */
-#define DUMP_ALWAYS
+#undef DUMP_ALWAYS
 
 using libmv::FloatImage;
 using libmv::TrackRegionOptions;
index 6747bfec1fb7b23dcca3e2d6ff789cc1c5d1aba2..d0e551597333f88e91b520fe7e14975030a50809 100644 (file)
@@ -782,8 +782,8 @@ class CLIP_OT_setup_tracking_scene(Operator):
         tree.links.new(mul_shadow.outputs["Image"], mul_image.inputs[2])
 
         tree.links.new(rlayer_fg.outputs["Image"], vector_blur.inputs["Image"])
-        tree.links.new(rlayer_fg.outputs["Z"], vector_blur.inputs["Z"])
-        tree.links.new(rlayer_fg.outputs["Speed"], vector_blur.inputs["Speed"])
+        tree.links.new(rlayer_fg.outputs["Depth"], vector_blur.inputs["Z"])
+        tree.links.new(rlayer_fg.outputs["Vector"], vector_blur.inputs["Speed"])
 
         tree.links.new(mul_image.outputs["Image"], alphaover.inputs[1])
         tree.links.new(vector_blur.outputs["Image"], alphaover.inputs[2])
index 2962fa0f961baa3ff7dc52d8f25ef0fde817a844..8890aa5d1ac5c6ab466d7b752bc2a5acee830e35 100644 (file)
@@ -1101,6 +1101,7 @@ static void image_open_cancel(bContext *UNUSED(C), wmOperator *op)
 static void image_sequence_get_frame_ranges(PointerRNA *ptr, ListBase *frames_all)
 {
        char dir[FILE_MAXDIR];
+       const bool do_frame_range = RNA_boolean_get(ptr, "use_sequence_detection");
        ImageFrameRange *frame_range = NULL;
 
        RNA_string_get(ptr, "directory", dir);
@@ -1116,7 +1117,8 @@ static void image_sequence_get_frame_ranges(PointerRNA *ptr, ListBase *frames_al
                frame->framenr = BLI_stringdec(filename, head, tail, &digits);
 
                /* still in the same sequence */
-               if ((frame_range != NULL) &&
+               if (do_frame_range &&
+                   (frame_range != NULL) &&
                    (STREQLEN(base_head, head, FILE_MAX)) &&
                    (STREQLEN(base_tail, tail, FILE_MAX)))
                {
@@ -1451,6 +1453,9 @@ void IMAGE_OT_open(wmOperatorType *ot)
                ot, FILE_TYPE_FOLDER | FILE_TYPE_IMAGE | FILE_TYPE_MOVIE, FILE_SPECIAL, FILE_OPENFILE,
                WM_FILESEL_FILEPATH | WM_FILESEL_DIRECTORY | WM_FILESEL_FILES | WM_FILESEL_RELPATH,
                FILE_DEFAULTDISPLAY, FILE_SORT_ALPHA);
+
+       RNA_def_boolean(ot->srna, "use_sequence_detection", true, "Detect Sequences",
+                       "Automatically detect animated sequences in selected images (based on file names)");
 }
 
 /******************** Match movie length operator ********************/