[Bf-committers] idea for mathutils commands

Jacob Merrill blueprintrandom1 at gmail.com
Sat Feb 27 07:48:22 CET 2016


I have been using BVHTree.rayCast, and it returns a hitPoint, but not a
hitUV,

so to extract this information I have been using python and have tried
transcribing a old unity script, it kinda works, but could we have this as
a feature of BVHtree or as a seperate mathutils command? it seems important
to add features like python based texture painting.



*idea 1 *= add UV return to BVHtree or a command UVBVHTree function for
texture painting in python, without slowing down bvhTree.




*idea 2:*
*get Uv from triangle and point on triangle plane as mathutils command*

uv = mathutils.getUVFromTri([p1,p2,p3],[uv1,uv2,uv3],[point])

where p1 , p2, and p3 are triangle vertex location vectors, and uv1 etc
area the uv cord for each point, point = the area you would like to get a
UV from.

referances - http://stackoverflow.com/a/17186533/1979851




*idea 3 *
uv = mathutils.getUVFromQuad([p1,p2,p3,p4],[uv1,uv2,uv3,uv4],[point])


   - same as triangle but for use with a quad rather than trying to split 2
   triangles from a quad.


Thanks!
BPR


More information about the Bf-committers mailing list