I have removed the m_pHitObject, m_xray and m_testPropName and replace them by a temporary struct "RayCastData" which contains these datas and a collision mask. Finally i add a collision mask argument in the python function "rayCast" :
```
rayCast(to, from, dist, prop, face, xray, poly, mask)
```
It can be useful to hit only object which are on the right colision layer. for example if you have hitbox for a charater or vehicle you don't want to hit it with raycast.
test file : {F237337}
left mouse click on two planes and see console messages.
Somewhat more elaborate test file by @sybren: {F237779}
Look around and click on the cubes. One cube lamp responds, the other doesn't, based on their collision groups.
Reviewers: moguri, hg1, agoose77, campbellbarton, sybren
Reviewed By: agoose77, campbellbarton, sybren
Subscribers: campbellbarton, sergey, blueprintrandom, sybren
Projects: #game_engine, #game_physics
Differential Revision: https://developer.blender.org/D1239
This func is long enough, there's no real need to make it even longer with
verbose local varnames and multi-line for loops...
Also, avoid mono-leters names as well for data pointers.
We now keep actions around when they are finished playing so scripts can
still get access to information such as the current frame. Playing a new
action in the same layer still overwrites the previous action as before this
commit. Using an explicit KX_GameObject.stopAction() will free the memory. The
action is also freed when the KX_GameObject is freed as before.
We now have to explicitely enure tesselation of DMs when we need it.
Notes: Maybe we could use looptris here as well?
Not a regression (bug already present in 2.75, but not 2.74), nice to backport to 2.76 nontheless.
Own regression caused by fix for T46067,
edit-mode bvh only contained unselected faces.
This commit adds support for an edit-mode bvh containing all faces.
Depsgraph customdata flag was set on the parent,
then cleared once the parent object was handled.
This is initialized to zero for new nodes, no need to clear.
Expose our `BKE_image_load_exists` feature through an optional parameter to `Image.load()`.
Extend `image_utils.load_image()` with two optional parameters, to return existing image datablock
if possible, and in that case, to force reloading said image.
Needed by incomming 'import images as planes' addon enhancement.
Also, fix own stupidity, no need to define ID callback in case we only have objects,
calling code knows to fallback to `foreachObjectLink()` when `foreachIDLink()` is missing...
- Match layout from stamp buffer (note last so it can wrap)
- Correct vertical spacing (didn't take decender into account)
- Use U.pixelsize when setting font-size.
It would simply remove default units (in most case), cannot see any good reason for such behavior?
Might work in case default unit is the only one present, but breaks consistency (and it may not be
always obvious for user which unit it is). Comes from original patch from five years ago, rB7d8f0fce.
This will break keyboard-setting of values, e.g. '2m 33.4cm' would become '2 33.4cm',
totally useless and invalid entry!
Would write 1.04 seconds as `00:00:01,40` instead of `00:00:01,040`...
Anyway, we already have BLI API for timecodes, much better to add
SubRip timecode format there, heavily simplifies code.
To be backported to final 2.76.
Instead of offsetting along normals, smooth positions are now
calculated on a sphere defined by the vertices and their normals.
This removes visible seams along original edges, which were common previously.
E.g. trackball-arrows (R-R) were no more visible.
Caused by wrong cast of an array from int to float, we need an int version of those helpers (`glTranslatenxv`) too.
Broken by font wrap commit rBf2341f829654c4dc97, there was actually two things here:
* Using non-initialized color (which lead to transparent drawing...), we need to use new
`blf_draw_buffer__start/end` helpers here too, made them shared internally.
* Using `draw_str_i18n_nbr` as `draw_str[i]` length, ugh! That's the number of utf8 glyphs of
translated string, not the length of untranslated string!
This fix must be backported to final 2.76.