Commit Graph

41300 Commits

Author SHA1 Message Date
3ba7a75a6c Correct cast from recent bool changes 2014-04-21 02:48:39 +10:00
55d75f5020 Code cleanup: correct abs use
also minor cleanup to rotation code
2014-04-21 02:02:21 +10:00
1a1bc281e6 Code cleanup: style 2014-04-21 01:01:33 +10:00
1e3f8b517b Nodes: make default group nodes slighly wider, to match other node width defaults. 2014-04-20 14:47:46 +02:00
97409c93fa Fix error making datablock with fake user local, the user count would be wrong afterwards. 2014-04-20 14:47:46 +02:00
f77207b1c3 Math Lib: faster version of rotation_between_vecs_to_mat3
Use axis/angle calculation but avoid calls to sin/cos
2014-04-20 20:56:40 +10:00
a51a0ca772 Math Lib: add shell_v3v3_normalized_to_dist and v2 version
bypass angle calculation to avoids (asin, sqrt, cos).
2014-04-19 22:17:10 +10:00
d6a53bb38f Minor change to recent commit (avoid transpose) 2014-04-19 19:48:07 +10:00
0ed6725aae Math Lib: minor optimization to barycentric_transform
replace rotation_between_vecs_to_quat with axis_dominant_v3_to_m3.
2014-04-19 15:52:01 +10:00
fabc46b41f Math Lib: add rotation_between_vecs_to_mat3
- behaves like rotation_between_vecs_to_quat
- avoids calling sin,cos calls (approx 1.6x faster).
2014-04-19 15:36:47 +10:00
fc9c790563 Math Lib: minor optimization for axis_angle_normalized_to_mat3 2014-04-19 14:10:22 +10:00
dc847607b6 Change Vector.slerp to accept nonunit vectors 2014-04-18 20:49:39 +10:00
e5f4f4d484 CMake was missing header 2014-04-18 20:46:14 +10:00
4a837141c3 Code cleanup: de-duplicated includes. 2014-04-18 15:02:46 +09:00
f60a66f417 Freestyle: New options for sorting to arrange the stacking order of lines.
Line styles now have a set of new options for rearranging the stacking order of lines.
This gives artists more control to determine which lines should be drawn on top of others.
Two available sort keys are the distance from camera and curvilinear 2D length.
Since the distance of a line from camera may vary over vertices, another option called
integration type is used to compute the sort key for a line from the values computed at
individual vertices.  Available integration types are MEAN, MIN, MAX, FIRST and LAST
(see the tool tips for more detail).
2014-04-18 15:02:45 +09:00
6161e4420e Quite compiler warnings. 2014-04-18 15:02:43 +09:00
ad8a35a659 Dyntopo: Solve issue with test file by Jens.
Seems like custom data indices can be mangled when many layers are
present in the mesh, so use more strict calculation of offset (copied
over from BM_CD_LAYER_ID).

I was under the impression that all custom data would be deleted on
entering dyntopo, it seems this is not the case though.
2014-04-18 00:11:05 +03:00
169f831394 Make sure we invalidate the node ID layer each time the PBVH is reset.
It makes code more tidy (avoids having to call invalidation on a myriad
places). Also makes sure other invalidation cases (some mesh change,
e.g.) work as expected.
2014-04-17 20:53:40 +03:00
f7de9efb74 BI: cleanup in autosmooth area. 2014-04-17 18:23:14 +02:00
dc40a97fc1 Optimize and symmetrize operators missed reset of node layer. 2014-04-17 19:13:58 +03:00
38eef8deee Refactor to Dyntopo node customdata commit.
Don't use a dedicated node layer but use temporary int layer instead.
Works like a charm as long as we are careful resetting the layer when
needed (after pbvh clearing and always after bmesh has been filled in
undo)

Tip by Campbell, thanks!
2014-04-17 19:03:08 +03:00
0ba3f76470 Recreating a bmesh log did not account for modified faces.
It shouldn't create issues in practice because modified face ids should
have been reclaimed from an added face on a previous entry, but add for
completeness.
2014-04-17 19:03:07 +03:00
bb507e4941 View3D: use smoothview for localview switching 2014-04-18 00:27:16 +10:00
69d127cade Code cleanup: use const for array args 2014-04-18 00:27:16 +10:00
300f4482e8 View3D: no need to mask mask out localview for each object 2014-04-18 00:27:15 +10:00
e0e05ae85e Add missing node update in dyntopo flood fill. 2014-04-17 16:03:14 +03:00
ddc88ea419 Fix T39765 crash on text with generative modifiers. 2014-04-17 15:58:40 +03:00
d0e80b50e9 Fix another Freestyle building glitch. 2014-04-17 14:51:38 +02:00
d02522b7be Attempt to fix one more issue with Freestyle compilation 2014-04-17 18:46:19 +06:00
ed2ddc9f70 Support multiple distortion models, including a new division model
This commit makes it so CameraIntrinsics is no longer hardcoded
to use the traditional polynomial radial distortion model. Currently
the distortion code has generic logic which is shared between
different distortion models, but had no other models until now.

This moves everything specific to the polynomial radial distortion
to a subclass PolynomialDistortionCameraIntrinsics(), and adds a
new division distortion model suitable for cameras such as the
GoPro which have much stronger distortion due to their fisheye lens.

This also cleans up the internal API of CameraIntrinsics to make
it easier to understand and reduces old C-style code.

New distortion model is available in the Lens panel of MCE.

- Polynomial is the old well-known model
- Division is the new one which s intended to deal better with huge
  distortion.

Coefficients of this model works independent from each other
and for division model one probably want to have positive values
to have a barrel distortion.
2014-04-17 17:28:41 +06:00
ad2064ae88 Fix compilation error of Freestyle
Seems to be some sort of namespace conflict or so which is
solved by reshuffling the includes a bit.
2014-04-17 16:04:47 +06:00
a1cab0d38d Style cleanup 2014-04-17 20:03:39 +10:00
1c0b6c4f30 Code cleanup: use bools for DM 2014-04-17 20:03:39 +10:00
ef365aaa37 Fix error in last commit 2014-04-17 20:02:56 +10:00
88ae0be1c4 Fix T39758: Blender Crash when removing pinned Scene. 2014-04-17 10:48:32 +02:00
bd3231c760 Fix T39766: bone calculation from edit mode goes wrong
Own logic error in previous commit...
2014-04-17 10:20:19 +02:00
55c9b352c2 Fix mistake in recent DM material changes 2014-04-17 18:05:57 +10:00
3e3efae7e9 Viewport Text Drawing: replace single allocs with a memarena
- pass label strlen since in many cases its already known.
- use single linked list for cached text drawing.
- add BLI_link_utils.h for single linked list macros.

own tests give approx 22% overall speedup.
2014-04-17 16:04:28 +10:00
1b9db9911d Code cleanup: use bools
also rename BLI_omp_thread_count -> BLI_system_thread_count_omp
2014-04-17 16:04:28 +10:00
4219e44f1d Freestyle: removed unnecessary #include "FreestyleConfig.h". 2014-04-17 14:37:14 +09:00
1674a04488 Freestyle: removed unused *_EXPORT qualifiers for building Windows DLLs.
These qualifiers were leftovers of the stand alone Freestyle program and not used
(set to an empty string) in Blender for years.
2014-04-17 14:37:13 +09:00
62258d9f30 Fix for missing changes in commit 6b0b6f876a4d68acd5c9252270a5135d0308d782. 2014-04-17 14:37:12 +09:00
68aea619f5 Replaced assert() with BLI_assert(). 2014-04-17 14:37:11 +09:00
3458bad12d Freestyle: removed unnecessary #include files and made minor code cleanup. 2014-04-17 14:37:10 +09:00
01a4a09f29 Freestyle: Fix for VC++ warnings about 'hypot' macro redefinitions (Part 4).
(See commit e1771e72fbbf828dbf5bed871b814288389f3611 for more detail of
the problem).

Fix for a C++ scope issue caused by 'using namespace Freestyle' that was assumed
even within the Freestyle namespace definition.
2014-04-17 14:37:09 +09:00
77b37fa461 Freestyle: Fix for VC++ warnings about 'hypot' macro redefinitions (Part 3).
(See commit e1771e72fbbf828dbf5bed871b814288389f3611 for more detail of
the problem).

Made changes to intern/view_map/Interface0D.h and intern/python/Director.h to
avoid #include <Python.h> and keep non-Python header files independent of it.
2014-04-17 14:37:08 +09:00
5d4a6a94ef Freestyle: Fix for VC++ warnings about 'hypot' macro redefinitions (Part 2).
(See commit e1771e72fbbf828dbf5bed871b814288389f3611 for more detail of
the problem).

Fixed for #include <Python.h> not properly put in the extern "C" { ... } construct.

Also removed redundant inclusion of the header file in the Freestyle Python API code.
2014-04-17 14:37:07 +09:00
5db8da8105 Freestyle: Fix for VC++ warnings about 'hypot' macro redefinitions (Part 1).
The issue was caused by including both Python.h and BLI_math.h.  Since the macro
definition in Python.h was unconditional, it was necessary to include it first and then
BLI_math.h.

Addressing the issue turned out to affect many Freestyle source files.  There were several
other coding flaws that complicated the situation:

1. intern/system/FreestyleConfig.h was abused just to include BLI_math.h which was in
fact unnecessary in FreestyleConfig.h.  While addressing this, inclusion of both math.h
and BLI_math.h had to be duly dealt with to avoid a compiler error about round().

2. #include <Python.h> was not properly put in the extern "C" { ... } construct.

3. intern/view_map/Interface0D.h and intern/python/Director.h, both of which included
Python.h, were included from within Freestyle header files that were almost or completely
independent of Python.  These non-Python header files were used everywhere in the
Freestyle code base, causing many cases of the reported macro redefinitions.

4. The Director.h file was also declaring 'using namespace Freestyle', which was causing
another scope issue in several Freestyle header files.

This commit is intended to address the first problem above.  Subsequent commits will deal
with the other three.
2014-04-17 14:37:05 +09:00
ba61992cc3 Fix T39767: Parent in Mask mode crashes 2014-04-17 13:23:53 +10:00
64f3774d62 Fix T39768: GLOBAL_X/Y/Z don't exist for bpy.ops.armature.calculate_roll type enum 2014-04-17 15:02:23 +12:00