Commit Graph

34 Commits

Author SHA1 Message Date
e2d60d180e Project Paint: Add symmetry support
- Access from symmetry panel (as with sculpt)
- Supports multiple axis at once.
- Supports all brush types including clone.
2015-04-28 23:34:40 +10:00
56935e23c4 cleanup: float/double promotion, redundant casts 2015-03-02 11:05:34 +11:00
7df4fc5eaf Spelling 2014-08-13 09:34:37 +10:00
fedbb88825 Mistake in last commit 2014-07-03 07:40:40 +10:00
0c78ba1ba8 Correct recent fix for knife in camera ortho mode
now use real view clip ranges for win-to-ray segment
2014-07-03 06:57:06 +10:00
e848cb9e48 Fix for knife when in ortho camera view 2014-06-17 04:07:03 +10:00
48881ad1e0 Code cleanup: doxy comments 2014-05-14 15:00:47 +10:00
a9e7c7b848 Fix T38432, Fix 38432: more stupid error in view3d ray code, sorry about that. 2014-02-01 15:06:13 +01:00
f54ed9f5e0 Fix a nice bug in ED_view3d_win_to_vector() - vector returned for an ortho view was negated compared to vector returned for the same view in perspective...
Found while working on snapping issues, confirmed using bisect tool: previous to this commit, inner/outer parts were swapped when switching from otho to persp!
2014-01-30 16:51:44 +01:00
77089a3bf2 Fix T38358: Face snapping fails on Orthographic view
Issue is caused by start point of ray used to detect faces under the mouse is set rather far away in ortho 3dviews.
The loss of precision on the ray location induced by this can lead to face snapping failures.

Solution is to do the raycasting with a temp start point, much closer to the object we check, and add back
to the found distance the diff to the real start point once detection is done (as we need all hit distances
from all tested objects to be relative to a common point!).

Note this commit only addresses the "face snapping on mesh" case, other kind of snapping do not seem to suffer
from this issue.

Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D268
2014-01-29 20:10:03 +01:00
fc39e895e9 Style Cleanup: whitespace 2014-01-12 22:27:55 +11:00
11c988ba00 Simplify line/plane intersection, add line_plane_factor_v3().
Remove no_flip option for isect_line_plane_v3(), its quite specific and only used for ED_view3d_win_to_3d().
2013-08-31 02:06:23 +00:00
905cb1639a update doxygen congfig and tweaks to warnings when running doxygen. 2013-07-03 04:47:50 +00:00
225c5fee6b move BLO_sys_types.h -> BLI_sys_types.h (it had nothing todo with loading)
remove MEM_sys_types.h which was a duplicate.
2013-05-28 19:35:26 +00:00
ec8d277c64 BLI_math rename functions:
- mult_m4_m4m4 -> mul_m4_m4m4
- mult_m3_m3m4 -> mul_m3_m3m4

these temporary names were used to avoid problems when argument order was switched.
2013-05-26 18:36:25 +00:00
5e347c4f71 code cleanup: typos 2013-05-26 12:02:29 +00:00
30b961abd8 fix own regression with ortho-camera adding points reported as [#35462] 2013-05-24 00:01:20 +00:00
562ed2b42e add in asserts when rv3d->viewmatob, rv3d->persmatob are not initialized.
This is often hard to spot since in many cases it works correctly even
when not initialized but may still fail in other situations.
2013-05-08 13:00:52 +00:00
38652023f0 fix [#34706] Projection precision is zoom dependent
ED_view3d_project_float functions were rounding the results.
2013-04-22 21:13:30 +00:00
36e7a98459 fix [#35007] clipping border error
add clip option to ED_view3d_win_to_ray(), ED_view3d_win_to_segment()
2013-04-22 20:00:37 +00:00
556705f84e add clip_segment_v3_plane_n() to clip a line segment to planes (as used for view clipping).
use in ED_view3d_win_to_segment_clip() and fix error, was clipping by only 4 planes rather then 6.
2013-04-22 19:39:10 +00:00
09721bffc0 replace view3d_get_view_aligned_coordinate with ED_view3d_win_to_3d_int() 2013-03-26 02:37:29 +00:00
8655be437d code cleanup: use bool where values are true/false, for view3d and related functions. 2013-03-20 23:14:18 +00:00
8dd2464626 minor knife refactor to prepare for running non interactively. 2013-03-14 13:58:56 +00:00
2433404e4b add inline function mul_project_m4_v3_zfac() to get the z-depth value from a vector & mat4x4 2013-03-09 15:39:24 +00:00
abd1748e48 code cleanup: move runtime var zfac out of RegionView3D. rename initgrabz() -> ED_view3d_calc_zfac() and have it return the zfac to use. 2013-03-09 11:40:42 +00:00
4f4e45540d fix for harmless glitch rotating the camera in camera mode, having the center point so close to the viewpoint caused the helper line to erratically move about because of float precision. 2013-02-28 11:29:27 +00:00
16afa704cc fix for own error in recent weight paint code, bound-box clip wasnt working. 2013-01-01 14:20:59 +00:00
f576c281ba speedup for face tessellation:
- quads, tris now use direct pointer access rather then iterators.
- for ngons also avoid iterator, just loop over the loops.

also minor change, use floorf rather then floor for ED_view3d_project_short_ex, ED_view3d_project_int_ex
2012-12-21 07:24:31 +00:00
c27d22ab71 fix own regression in 2.65 [#33643] Rotation does not work at certain zoom level
caused by not projecting points behind the perspective view,
even though this worked in 2.64 the values were flipped (rotating direction was reversed and the center point was flipped).

added V3D_PROJ_TEST_CLIP_NEAR, when omitted ED_view3d_project_*** will project points from behind a perspective view plane.
2012-12-21 03:49:47 +00:00
8f262d0413 correct ed_view3d_project__internal() was unnecessarily casting (float -> short -> float). 2012-12-21 02:36:07 +00:00
26d6872ef8 fix for knife tool when the mouse was moved outside the clipped area the mouse line would reset to 0/0/0
a few areas that use ED_view3d_win_to_segment_clip() didnt take into account the case where the segment was filly clipped, some callers even needed the segment not to be clipped.
- added ED_view3d_win_to_segment()
- ED_view3d_win_to_segment_clip() now returns FALSE if the segment is totally clipped, but the start/ends of the line are not zero'd as they were before.
2012-12-10 07:53:20 +00:00
9b948717b0 code cleanup: float <> double conversion. 2012-11-03 18:23:30 +00:00
536d9fec80 code cleanup:
- move object_iterators.c --> view3d_iterators. (ED_object.h had to include ED_view3d.h which isn't so nice)
- move projection functions from view3d_view.c --> view3d_project.c (view3d_view was becoming a mishmash of utility functions and operators).
- some some cmake includes as system-includes.
2012-10-17 04:13:03 +00:00