[Bf-committers] 2D coordinator to 3D coordinator

dai longquan info.dailongquan at gmail.com
Tue May 17 02:58:53 CEST 2011


Thank you for you reply. I have work out this problem by  similar script
with you. But the numeric algorithm to get inverse of a matrix
invert_m4_m4()   is not consistent with  Matrix.inverted() which cause
significant numeric error for it should be. So from time to time the numeric
error will upsetting me.

2011/5/12 Campbell Barton <ideasman42 at gmail.com>

> Committed a new module r36631 to deal with this.
>
> * region_2d_to_vector_3d: 2d -> 3d direction, mostly useful in perspective
> view.
> * region_2d_to_location_3d: 2d -> 3d location, using a reference
> vector to set the depth.
> * location_3d_to_region_2d: 3d location -> 2d.
>
>
> https://svn.blender.org/svnroot/bf-blender/trunk/blender/release/scripts/modules/view3d_utils.py
>
> will run in 2.57 release too.
>
> On Fri, May 6, 2011 at 10:12 AM, dai longquan
> <info.dailongquan at gmail.com> wrote:
> > Hello everyone! I am working on adding small plugin to blender using
> > python.
> >
> > I meet a problem how to translate 2D screen coordinate to 3D coordinate ?
> >
> > Thank you  reply in advance!
> > _______________________________________________
> > Bf-committers mailing list
> > Bf-committers at blender.org
> > http://lists.blender.org/mailman/listinfo/bf-committers
> >
>
>
>
> --
> - Campbell
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list