Revision: 38479
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38479
Author:   campbellbarton
Date:     2011-07-18 15:05:50 +0000 (Mon, 18 Jul 2011)
Log Message:
-----------
manually make small changes to sync with trunk

Modified Paths:
--------------
    branches/soc-2011-radish/intern/ghost/intern/GHOST_SystemCocoa.mm
    branches/soc-2011-radish/source/blender/blenlib/intern/math_geom.c
    branches/soc-2011-radish/source/blender/editors/armature/armature_ops.c
    branches/soc-2011-radish/source/blender/editors/sculpt_paint/paint_vertex.c
    branches/soc-2011-radish/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2011-radish/source/blender/editors/space_view3d/view3d_select.c

Removed Paths:
-------------
    branches/soc-2011-radish/source/blender/python/generic/mathutils_geometry.c

Modified: branches/soc-2011-radish/intern/ghost/intern/GHOST_SystemCocoa.mm
===================================================================
--- branches/soc-2011-radish/intern/ghost/intern/GHOST_SystemCocoa.mm   
2011-07-18 14:56:13 UTC (rev 38478)
+++ branches/soc-2011-radish/intern/ghost/intern/GHOST_SystemCocoa.mm   
2011-07-18 15:05:50 UTC (rev 38479)
@@ -1498,15 +1498,18 @@
                                                GHOST_TInt32 x_mouse= 
mousePos.x;
                                                GHOST_TInt32 y_mouse= 
mousePos.y;
                                                GHOST_TInt32 x_accum, y_accum, 
x_cur, y_cur, x, y;
-                                               GHOST_Rect bounds, 
correctedBounds;
+                                               GHOST_Rect bounds, 
windowBounds, correctedBounds;
                                                
                                                /* fallback to window bounds */
                                                
if(window->getCursorGrabBounds(bounds)==GHOST_kFailure)
                                                        
window->getClientBounds(bounds);
                                                
                                                //Switch back to Cocoa 
coordinates orientation (y=0 at botton,the same as blender internal btw!), and 
to client coordinates
-                                               
window->screenToClient(bounds.m_l, bounds.m_b, correctedBounds.m_l, 
correctedBounds.m_b);
-                                               
window->screenToClient(bounds.m_r, bounds.m_t, correctedBounds.m_r, 
correctedBounds.m_t);
+                                               
window->getClientBounds(windowBounds);
+                                               
window->screenToClient(bounds.m_l, bounds.m_b, correctedBounds.m_l, 
correctedBounds.m_t);
+                                               
window->screenToClient(bounds.m_r, bounds.m_t, correctedBounds.m_r, 
correctedBounds.m_b);
+                                               correctedBounds.m_b = 
(windowBounds.m_b - windowBounds.m_t) - correctedBounds.m_b;
+                                               correctedBounds.m_t = 
(windowBounds.m_b - windowBounds.m_t) - correctedBounds.m_t;
                                                
                                                //Update accumulation counts
                                                
window->getCursorGrabAccum(x_accum, y_accum);

Modified: branches/soc-2011-radish/source/blender/blenlib/intern/math_geom.c
===================================================================
--- branches/soc-2011-radish/source/blender/blenlib/intern/math_geom.c  
2011-07-18 14:56:13 UTC (rev 38478)
+++ branches/soc-2011-radish/source/blender/blenlib/intern/math_geom.c  
2011-07-18 15:05:50 UTC (rev 38479)
@@ -430,7 +430,7 @@
            l2[1] - l1[1]
        };
 
-       const float a= dot_v3v3(ldir, ldir);
+       const float a= dot_v2v2(ldir, ldir);
 
        const float b= 2.0f *
                (ldir[0] * (l1[0] - sp[0]) +

Modified: 
branches/soc-2011-radish/source/blender/editors/armature/armature_ops.c
===================================================================
--- branches/soc-2011-radish/source/blender/editors/armature/armature_ops.c     
2011-07-18 14:56:13 UTC (rev 38478)
+++ branches/soc-2011-radish/source/blender/editors/armature/armature_ops.c     
2011-07-18 15:05:50 UTC (rev 38479)
@@ -265,7 +265,7 @@
        
                /* set flags */
        WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_toggle", WKEY, 
KM_PRESS, KM_SHIFT, 0);
-       WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_enable", WKEY, 
KM_PRESS, KM_CTRL, 0);
+       WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_enable", WKEY, 
KM_PRESS, KM_CTRL|KM_SHIFT, 0);
        WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_disable", WKEY, 
KM_PRESS, KM_ALT, 0);
                
                /* armature/bone layers */
@@ -343,7 +343,7 @@
        
                /* set flags */
        WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_toggle", WKEY, 
KM_PRESS, KM_SHIFT, 0);
-       WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_enable", WKEY, 
KM_PRESS, KM_CTRL, 0);
+       WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_enable", WKEY, 
KM_PRESS, KM_CTRL|KM_SHIFT, 0);
        WM_keymap_add_menu(keymap, "VIEW3D_MT_bone_options_disable", WKEY, 
KM_PRESS, KM_ALT, 0);
 
                /* armature/bone layers */

Modified: 
branches/soc-2011-radish/source/blender/editors/sculpt_paint/paint_vertex.c
===================================================================
--- branches/soc-2011-radish/source/blender/editors/sculpt_paint/paint_vertex.c 
2011-07-18 14:56:13 UTC (rev 38478)
+++ branches/soc-2011-radish/source/blender/editors/sculpt_paint/paint_vertex.c 
2011-07-18 15:05:50 UTC (rev 38479)
@@ -75,7 +75,6 @@
 #include "BKE_paint.h"
 #include "BKE_report.h"
 
-
 #include "WM_api.h"
 #include "WM_types.h"
 
@@ -386,6 +385,7 @@
        DAG_id_tag_update(&me->id, 0);
 }
 
+
 /* fills in the selected faces with the current weight and vertex group */
 void wpaint_fill(VPaint *wp, Object *ob, float paintweight)
 {
@@ -401,7 +401,7 @@
        
        me= ob->data;
        if(me==NULL || me->totface==0 || me->dvert==NULL || !me->mface) return;
-
+       
        selected= (me->editflag & ME_EDIT_PAINT_MASK);
 
        indexar= get_indexarray(me);

Modified: 
branches/soc-2011-radish/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- branches/soc-2011-radish/source/blender/editors/space_view3d/drawobject.c   
2011-07-18 14:56:13 UTC (rev 38478)
+++ branches/soc-2011-radish/source/blender/editors/space_view3d/drawobject.c   
2011-07-18 15:05:50 UTC (rev 38479)
@@ -58,7 +58,6 @@
 #include "BKE_anim.h"                  //for the where_on_path function
 #include "BKE_constraint.h" // for the get_constraint_target function
 #include "BKE_DerivedMesh.h"
-
 #include "BKE_deform.h"
 #include "BKE_displist.h"
 #include "BKE_font.h"

Modified: 
branches/soc-2011-radish/source/blender/editors/space_view3d/view3d_select.c
===================================================================
--- 
branches/soc-2011-radish/source/blender/editors/space_view3d/view3d_select.c    
    2011-07-18 14:56:13 UTC (rev 38478)
+++ 
branches/soc-2011-radish/source/blender/editors/space_view3d/view3d_select.c    
    2011-07-18 15:05:50 UTC (rev 38479)
@@ -1993,6 +1993,7 @@
        Scene *scene = CTX_data_scene(C);
 
        view3d_operator_needs_opengl(C);
+       
        if(obedit) {
                if(obedit->type==OB_MESH)
                        retval = mouse_mesh(C, event->mval, extend);

Deleted: 
branches/soc-2011-radish/source/blender/python/generic/mathutils_geometry.c
===================================================================
--- branches/soc-2011-radish/source/blender/python/generic/mathutils_geometry.c 
2011-07-18 14:56:13 UTC (rev 38478)
+++ branches/soc-2011-radish/source/blender/python/generic/mathutils_geometry.c 
2011-07-18 15:05:50 UTC (rev 38479)
@@ -1,1099 +0,0 @@
-/*
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * This is a new part of Blender.
- *
- * Contributor(s): Joseph Gilbert, Campbell Barton
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/** \file blender/python/generic/mathutils_geometry.c
- *  \ingroup pygen
- */
-
-
-#include <Python.h>
-
-#include "mathutils_geometry.h"
-
-/* Used for PolyFill */
-#include "MEM_guardedalloc.h"
-
-#include "BLI_blenlib.h"
-#include "BLI_boxpack2d.h"
-#include "BLI_math.h"
-#include "BLI_utildefines.h"
- 
-#include "BKE_displist.h"
-
-#include "BKE_curve.h"
-
-#define SWAP_FLOAT(a, b, tmp) tmp=a; a=b; b=tmp
-#define eps 0.000001
-
-
-/*-------------------------DOC STRINGS ---------------------------*/
-PyDoc_STRVAR(M_Geometry_doc,
-"The Blender geometry module"
-);
-
-//---------------------------------INTERSECTION FUNCTIONS--------------------
-
-PyDoc_STRVAR(M_Geometry_intersect_ray_tri_doc,
-".. function:: intersect_ray_tri(v1, v2, v3, ray, orig, clip=True)\n"
-"\n"
-"   Returns the intersection between a ray and a triangle, if possible, 
returns None otherwise.\n"
-"\n"
-"   :arg v1: Point1\n"
-"   :type v1: :class:`mathutils.Vector`\n"
-"   :arg v2: Point2\n"
-"   :type v2: :class:`mathutils.Vector`\n"
-"   :arg v3: Point3\n"
-"   :type v3: :class:`mathutils.Vector`\n"
-"   :arg ray: Direction of the projection\n"
-"   :type ray: :class:`mathutils.Vector`\n"
-"   :arg orig: Origin\n"
-"   :type orig: :class:`mathutils.Vector`\n"
-"   :arg clip: When False, don't restrict the intersection to the area of the 
triangle, use the infinite plane defined by the triangle.\n"
-"   :type clip: boolean\n"
-"   :return: The point of intersection or None if no intersection is found\n"
-"   :rtype: :class:`mathutils.Vector` or None\n"
-);
-static PyObject *M_Geometry_intersect_ray_tri(PyObject *UNUSED(self), 
PyObject* args)
-{
-       VectorObject *ray, *ray_off, *vec1, *vec2, *vec3;
-       float dir[3], orig[3], v1[3], v2[3], v3[3], e1[3], e2[3], pvec[3], 
tvec[3], qvec[3];
-       float det, inv_det, u, v, t;
-       int clip= 1;
-
-       if(!PyArg_ParseTuple(args, "O!O!O!O!O!|i:intersect_ray_tri", 
&vector_Type, &vec1, &vector_Type, &vec2, &vector_Type, &vec3, &vector_Type, 
&ray, &vector_Type, &ray_off , &clip)) {
-               return NULL;
-       }
-       if(vec1->size != 3 || vec2->size != 3 || vec3->size != 3 || ray->size 
!= 3 || ray_off->size != 3) {
-               PyErr_SetString(PyExc_ValueError, "only 3D vectors for all 
parameters");
-               return NULL;
-       }
-
-       if(BaseMath_ReadCallback(vec1) == -1 || BaseMath_ReadCallback(vec2) == 
-1 || BaseMath_ReadCallback(vec3) == -1 || BaseMath_ReadCallback(ray) == -1 || 
BaseMath_ReadCallback(ray_off) == -1)
-               return NULL;
-
-       VECCOPY(v1, vec1->vec);
-       VECCOPY(v2, vec2->vec);
-       VECCOPY(v3, vec3->vec);
-
-       VECCOPY(dir, ray->vec);
-       normalize_v3(dir);
-
-       VECCOPY(orig, ray_off->vec);
-
-       /* find vectors for two edges sharing v1 */
-       sub_v3_v3v3(e1, v2, v1);
-       sub_v3_v3v3(e2, v3, v1);
-
-       /* begin calculating determinant - also used to calculated U parameter 
*/
-       cross_v3_v3v3(pvec, dir, e2);
-
-       /* if determinant is near zero, ray lies in plane of triangle */
-       det= dot_v3v3(e1, pvec);
-
-       if (det > -0.000001f && det < 0.000001f) {
-               Py_RETURN_NONE;
-       }
-
-       inv_det= 1.0f / det;
-
-       /* calculate distance from v1 to ray origin */
-       sub_v3_v3v3(tvec, orig, v1);
-
-       /* calculate U parameter and test bounds */
-       u= dot_v3v3(tvec, pvec) * inv_det;
-       if (clip && (u < 0.0f || u > 1.0f)) {
-               Py_RETURN_NONE;
-       }
-
-       /* prepare to test the V parameter */
-       cross_v3_v3v3(qvec, tvec, e1);
-
-       /* calculate V parameter and test bounds */
-       v= dot_v3v3(dir, qvec) * inv_det;
-
-       if (clip && (v < 0.0f || u + v > 1.0f)) {
-               Py_RETURN_NONE;
-       }
-

@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to