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)
1  2 
release/scripts/startup/bl_operators/clip.py
source/blender/editors/space_image/image_ops.c

index 6747bfec1fb7b23dcca3e2d6ff789cc1c5d1aba2,d8ef9e1f3efc6fcf9e803fd5b870bc95835ecb0d..d0e551597333f88e91b520fe7e14975030a50809
@@@ -235,7 -235,7 +235,7 @@@ class CLIP_OT_track_to_empty(Operator)
          ob = None
  
          ob = bpy.data.objects.new(name=track.name, object_data=None)
 -        ob.select = True
 +        ob.select_set(action='SELECT')
          context.scene.objects.link(ob)
          context.scene.objects.active = ob
  
@@@ -509,7 -509,7 +509,7 @@@ object's movement caused by this constr
          # XXX, should probably use context.selected_editable_objects
          # since selected objects can be from a lib or in hidden layer!
          for ob in scene.objects:
 -            if ob.select:
 +            if ob.select_set(action='SELECT'):
                  self._bake_object(scene, ob)
  
          return {'FINISHED'}
@@@ -782,8 -782,8 +782,8 @@@ class CLIP_OT_setup_tracking_scene(Oper
          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,772d87a9bf4c953519c8858206b0a855cba43d79..8890aa5d1ac5c6ab466d7b752bc2a5acee830e35
@@@ -56,6 -56,7 +56,6 @@@
  
  #include "BKE_colortools.h"
  #include "BKE_context.h"
 -#include "BKE_depsgraph.h"
  #include "BKE_DerivedMesh.h"
  #include "BKE_icons.h"
  #include "BKE_image.h"
@@@ -69,8 -70,6 +69,8 @@@
  #include "BKE_sound.h"
  #include "BKE_scene.h"
  
 +#include "DEG_depsgraph.h"
 +
  #include "GPU_draw.h"
  #include "GPU_buffers.h"
  
@@@ -793,7 -792,6 +793,7 @@@ static int image_view_selected_exec(bCo
        SpaceImage *sima;
        ARegion *ar;
        Scene *scene;
 +      SceneLayer *sl;
        Object *obedit;
        Image *ima;
  
        sima = CTX_wm_space_image(C);
        ar = CTX_wm_region(C);
        scene = CTX_data_scene(C);
 +      sl = CTX_data_scene_layer(C);
        obedit = CTX_data_edit_object(C);
  
        ima = ED_space_image(sima);
                        return OPERATOR_CANCELLED;
                }
        }
 -      else if (ED_space_image_check_show_maskedit(scene, sima)) {
 +      else if (ED_space_image_check_show_maskedit(sl, sima)) {
                if (!ED_mask_selected_minmax(C, min, max)) {
                        return OPERATOR_CANCELLED;
                }
@@@ -1101,6 -1098,7 +1101,7 @@@ static void image_open_cancel(bContext 
  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);
                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 -1450,9 +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 ********************/
@@@ -2339,7 -2341,7 +2344,7 @@@ static int image_reload_exec(bContext *
        
        // XXX other users?
        BKE_image_signal(ima, (sima) ? &sima->iuser : NULL, IMA_SIGNAL_RELOAD);
 -      DAG_id_tag_update(&ima->id, 0);
 +      DEG_id_tag_update(&ima->id, 0);
  
        WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, ima);