Merge branch 'master' into blender2.8
authorAaron Carlisle <carlisle.b3d@gmail.com>
Fri, 21 Jul 2017 22:28:32 +0000 (18:28 -0400)
committerAaron Carlisle <carlisle.b3d@gmail.com>
Fri, 21 Jul 2017 22:28:32 +0000 (18:28 -0400)
1  2 
release/scripts/startup/bl_ui/space_view3d_toolbar.py
source/blender/editors/transform/transform_snap_object.c

index 1444a4ba8e36ef984a8061a9cc4a26cb8291174a,4026bc972fe375f9a9936242405d35a400b6887d..ba0426a649b6dcf2a217c4bba03ede21c4244780
@@@ -1238,11 -1240,12 +1240,12 @@@ class VIEW3D_PT_slots_projectpaint(View
  
          elif settings.mode == 'IMAGE':
              mesh = ob.data
 -            uv_text = mesh.uv_textures.active.name if mesh.uv_textures.active else ""
 +            uv_text = mesh.uv_layers.active.name if mesh.uv_layers.active else ""
-             col.label("Canvas Image")
-             col.template_ID(settings, "canvas")
+             col.label("Canvas Image:")
+             # todo this should be combinded into a single row
+             col.template_ID(settings, "canvas", open="image.open")
              col.operator("image.new", text="New").gen_context = 'PAINT_CANVAS'
-             col.label("UV Map")
+             col.label("UV Map:")
              col.menu("VIEW3D_MT_tools_projectpaint_uvlayer", text=uv_text, translate=False)
  
          col.separator()
@@@ -1275,15 -1278,16 +1278,16 @@@ class VIEW3D_PT_stencil_projectpaint(Vi
          col = layout.column()
          col.active = ipaint.use_stencil_layer
  
 -        stencil_text = mesh.uv_texture_stencil.name if mesh.uv_texture_stencil else ""
 -        col.label("UV Map:")
 +        stencil_text = mesh.uv_layer_stencil.name if mesh.uv_layer_stencil else ""
 +        col.label("UV Map")
          col.menu("VIEW3D_MT_tools_projectpaint_stencil", text=stencil_text, translate=False)
  
-         col.label("Stencil Image")
-         col.template_ID(ipaint, "stencil_image")
+         col.label("Stencil Image:")
+         # todo this should be combinded into a single row
+         col.template_ID(ipaint, "stencil_image", open="image.open")
          col.operator("image.new", text="New").gen_context = 'PAINT_STENCIL'
  
-         col.label("Visualization")
+         col.label("Visualization:")
          row = col.row(align=True)
          row.prop(ipaint, "stencil_color", text="")
          row.prop(ipaint, "invert_stencil", text="", icon='IMAGE_ALPHA')
index 32ac282eb1d122a3f3905b91183832614d8a451d,6c62c091a78163ede06a3bcf5d9ae4cbabc9e3a8..49f8a41d743560f657467e1d0f0d4dfcdcc24428
@@@ -713,8 -709,8 +713,8 @@@ static bool raycastEditMesh
   * \note Duplicate args here are documented at #snapObjectsRay
   */
  static bool raycastObj(
 -        SnapObjectContext *sctx,
 +        const bContext *C, SnapObjectContext *sctx,
-         const float ray_orig[3], const float ray_start[3], const float ray_dir[3],
+         const float ray_start[3], const float ray_dir[3],
          Object *ob, float obmat[4][4], const unsigned int ob_index,
          bool use_obedit,
          /* read/write args */
@@@ -793,8 -785,8 +792,8 @@@ static void raycast_obj_cb(const bConte
  {
        struct RaycastObjUserData *dt = data;
        dt->ret |= raycastObj(
 -              sctx,
 +              C, sctx,
-               dt->ray_orig, dt->ray_start, dt->ray_dir,
+               dt->ray_start, dt->ray_dir,
                ob, obmat, dt->ob_index++, is_obedit,
                dt->ray_depth,
                dt->r_loc, dt->r_no, dt->r_index,
   *
   */
  static bool raycastObjects(
 -        SnapObjectContext *sctx,
 +        const bContext *C, SnapObjectContext *sctx,
-         const float ray_orig[3], const float ray_start[3], const float ray_dir[3],
+         const float ray_start[3], const float ray_dir[3],
          const SnapSelect snap_select, const bool use_object_edit_cage,
          /* read/write args */
          float *ray_depth,
@@@ -2217,8 -2204,8 +2215,8 @@@ bool ED_transform_snap_object_project_r
          Object **r_ob, float r_obmat[4][4])
  {
        return raycastObjects(
 -              sctx,
 +              C, sctx,
-               ray_start, ray_start, ray_normal,
+               ray_start, ray_normal,
                params->snap_select, params->use_object_edit_cage,
                ray_depth, r_loc, r_no, r_index, r_ob, r_obmat, NULL);
  }
@@@ -2246,8 -2233,8 +2244,8 @@@ bool ED_transform_snap_object_project_r
  #endif
  
        bool retval = raycastObjects(
 -              sctx,
 +              C, sctx,
-               ray_start, ray_start, ray_normal,
+               ray_start, ray_normal,
                params->snap_select, params->use_object_edit_cage,
                &ray_depth, NULL, NULL, NULL, NULL, NULL,
                r_hit_list);
@@@ -2429,8 -2416,8 +2427,8 @@@ bool ED_transform_snap_object_project_v
  
        if (snap_to == SCE_SNAP_MODE_FACE) {
                return raycastObjects(
 -                      sctx,
 +                      C, sctx,
-                       ray_origin, ray_start, ray_normal,
+                       ray_start, ray_normal,
                        params->snap_select, params->use_object_edit_cage,
                        ray_depth, r_loc, r_no, r_index, NULL, NULL, NULL);
        }