Commit Graph

2306 Commits

Author SHA1 Message Date
Campbell Barton
be7de5f239 Cleanup: warnings 2017-08-03 08:08:47 +10:00
Campbell Barton
8ddaa6a4e2 Merge branch 'master' into blender2.8 2017-08-01 10:38:36 +10:00
Brecht Van Lommel
becb413f29 Fix T52224: auto IK not respecting length, after recent bugfix. 2017-07-31 19:22:03 +02:00
Sergey Sharybin
03d258d613 Copy on write: Prevent crash when duplicating object with particle system
Transform system was using global main, which might have been pointing to a
freed scene layer.
2017-07-27 16:28:16 +02:00
Campbell Barton
b01d38ef7d Manipulator: remove names
They weren't used anywhere,
both C & Py manipulators better assign to vars (no lookup needed).
2017-07-27 07:43:15 +10:00
Sergey Sharybin
723f2b292f Fix T52186: Crash on bevel
bContext is not always available in transform, so need to use explicit
scene and scene layer to create evaluation context from.
2017-07-26 16:33:44 +02:00
Campbell Barton
2e83897f91 Cleanup: typedef enums
Manipulator enum types are easy to confuse, use typedefs.
2017-07-26 18:00:26 +10:00
Sergey Sharybin
247ddb6237 Depsgraph: Fix relations update when transform is done and there was no temporary constraints created 2017-07-25 14:38:10 +02:00
mano-wii
7fbd529fb5 Revert "ransform: fix unreported bug: geometry hidden by clipping border (alt + b) is not bypassed in snap to faces"
This reverts commit 7f09b55d01.
2017-07-24 12:08:23 -03:00
mano-wii
7f09b55d01 ransform: fix unreported bug: geometry hidden by clipping border (alt + b) is not bypassed in snap to faces
The geometry behind the farther clip_plane is not bypassed
2017-07-24 11:13:33 -03:00
Aaron Carlisle
3aeabe3afa Merge branch 'master' into blender2.8 2017-07-21 18:28:32 -04:00
mano-wii
a27b6ae4a9 Transform: remove unused argument 2017-07-21 18:04:05 -03:00
mano-wii
64fd45b1df Merge branch 'master' into blender2.8
# Conflicts:
#	source/blender/editors/transform/transform_snap_object.c
2017-07-21 14:20:24 -03:00
mano-wii
34f0250f32 Another solution to bug T38358 and related
Moving the ray_start_local to the new position does not lose as much precision as moving the ray_org_local to the corresponding position.

The problem of inaccuracy is within the functions: `bvhtree_ray_cast_data_precalc` and` fast_ray_nearest_hit`. And not directly in the values of the rays.
2017-07-21 14:02:16 -03:00
Luca Rood
1c4c288727 Pass EvaluationContext argument everywhere
Note that some little parts of code have been dissabled because eval_ctx
was not available there. This should be resolved once DerivedMesh is
replaced.
2017-07-21 14:47:26 +02:00
Campbell Barton
2475dbdc94 Merge branch 'master' into blender2.8 2017-07-18 13:09:36 +10:00
Campbell Barton
16fc2ad28e Transform: avoid possible uninitialized var 2017-07-18 12:13:41 +10:00
mano-wii
a3d9ef2ea5 Merge branch 'master' into blender2.8 2017-07-14 17:26:46 -03:00
mano-wii
8009564503 Snap System: Fixed index of objects used to make snap to volume
*note: make a complete test scene
2017-07-14 17:25:16 -03:00
mano-wii
37242f0a47 Merge branch 'master' into blender2.8
# Conflicts:
#	source/blender/editors/transform/transform_snap_object.c
2017-07-14 16:56:36 -03:00
mano-wii
08b59ab7b9 Snap System: Use function that does the interactor instead of Macro
Macro makes debugging difficult. And in that case I was escaping from the style used in Blender
2017-07-14 16:52:31 -03:00
mano-wii
0736d567f0 Snap System: minor issues
rename obj -> ob_iter
2017-07-14 14:46:07 -03:00
mano-wii
51442b64d6 Merge branch 'master' of git@git.blender.org:blender.git into blender2.8 2017-07-14 11:24:43 -03:00
mano-wii
5fb5b74890 Snap System: missing change 2017-07-14 11:20:28 -03:00
mano-wii
8f14b96f7b Merge branch 'master' of git@git.blender.org:blender.git into blender2.8 2017-07-14 10:42:59 -03:00
mano-wii
c6ddef7359 Snap System: fix rename ob to obj
This would bring problems with dupli objects
2017-07-14 10:41:47 -03:00
Dalai Felinto
0ea4bb51df Another fix for snapping after merge in 2.8 2017-07-14 15:06:17 +02:00
Dalai Felinto
4467efe971 Fix snap in 2.8 after poor merge from master
If you merge from master to blender2.8 after a commit, remember to test in 2.8, otherwise what is the point?
Specially if it's a non-essential commit such as c9817c67fc.

Bug introduced on: f4155d3778 (the merge
that included the above commit).
2017-07-14 14:43:54 +02:00
mano-wii
f4155d3778 Merge branch 'master' of git@git.blender.org:blender.git into blender2.8
# Conflicts:
#	source/blender/editors/transform/transform_snap_object.c
2017-07-13 20:12:17 -03:00
mano-wii
c9817c67fc Snap System: Replace creation and destruction of the object list by a Macro
The macro got a little strange, but it's better than using the MEM_mallocN inside a loop, or repeat the lines
2017-07-13 19:39:17 -03:00
Bastien Montagne
474454be39 Cleanup/rename etc. dashed line shaders.
Goal is to make them more modular, to allow more variants (variable
single-color, thickness, ...) to be added without having to
copy-and-change-one-line of whole chain of shaders.
2017-07-13 16:47:58 +02:00
mano-wii
ffea77253e Merge branch 'master' of git@git.blender.org:blender.git into blender2.8 2017-07-12 20:45:02 -03:00
mano-wii
2771f602e6 Snap System: remove unused function 2017-07-12 20:43:28 -03:00
Campbell Barton
0837d19126 Merge branch 'master' into blender2.8 2017-07-12 13:59:13 +10:00
Campbell Barton
8603424d0a Cleanup: unused vars 2017-07-12 13:58:48 +10:00
mano-wii
ac76a3caba Merge branch 'master' of git@git.blender.org:blender.git into blender2.8 2017-07-11 17:06:43 -03:00
mano-wii
3f39719b5d Fix [T51595]: Snap to edge does not work with high zoom level
That problem occurs because of the imprecision of `short int` (16 bits).
The 3d coordinates are converted to 2d, and when they are off the screen, their values can exceed 32767! (max short int value)

One quick solution is to use float instead of short

The snap code is actually a little tricky. I want to make some arithmetic simplifications in it
2017-07-11 17:03:49 -03:00
mano-wii
593b80143b Merge branch 'master' of git@git.blender.org:blender.git into blender2.8 2017-07-11 14:24:32 -03:00
mano-wii
b3f62b68a9 Style (remove characters that caused "a binary file") 2017-07-11 14:22:07 -03:00
mano-wii
538475dec7 Merge branch 'master' of git@git.blender.org:blender.git into blender2.8
# Conflicts:
#	source/blender/editors/transform/transform_snap_object.c
2017-07-11 13:54:08 -03:00
mano-wii
dd1edb0954 Snap System: Separate raycast functions from nearest2d functions
The only similarity between these functions is that both serve to snap.
However their codes are totally different from one another.
So by separating these functions, it:
- removes the need to put several conditions;
- simplifies and
- optimizes the code
2017-07-11 13:47:28 -03:00
Campbell Barton
2bd908ca6e Merge branch 'master' into blender2.8 2017-07-10 16:35:56 +10:00
Campbell Barton
004a143760 Fix T51665: No orientation for nurbs, polygons 2017-07-10 16:29:54 +10:00
Campbell Barton
2acd05b24c Fix T52007: Cancel bezier curve transform fails
Auto & aligned handles wouldn't restore to their correct locations.

Note that a more direct fix for the bug is possible
(storing the handle locations to restore on cancel).

But that still gives some odd behavior, see code-comments for details.
2017-07-10 13:38:28 +10:00
Sergey Sharybin
9d71ec5f8d Merge branch 'master' into blender2.8 2017-07-06 12:21:21 +02:00
Sergey Sharybin
a7a5c20fbc Fix T51955: Changing Auto-IK length crashes Blender (with new-depsgraph)
New dependency graph is tacking root bone into account when building the graph.
This is required in order to get proper dependencies between bones. so we can
reliably use bones as targets from the same rig (and even indirect relations
via external objects). This forces us to tag relations for update when we change
root IK chain bone.

Since relations rebuild is not fully trivial operation, we only do it for
the new dependency graph. In the future it'll be nice to avoid whole graph
rebuild for such cases, but that's mentioned as a TODO.
2017-07-06 12:15:30 +02:00
Bastien Montagne
f23ed929ee Merge branch 'master' into blender2.8
Conflicts:
	source/blender/makesdna/DNA_particle_types.h
2017-07-04 13:13:49 +02:00
Luca Rood
d1dfd5fa26 Fix T51703: Rigid body with delta transform jumps when transforming
When doing any transformation on a rigid body object that has delta
transforms, the object would be offset by the amount of the delta
transform.
2017-07-04 12:27:21 +02:00
Campbell Barton
bc347f6015 Merge branch 'master' into blender2.8 2017-06-30 13:46:53 +10:00
Campbell Barton
9210a4faf3 Fix unpredictable trackball rotation
D2729 by @IgorNull

Currently, trackball rotation sequentially applies rotation across x axis and y axis,
which produces a strange/unusable result on diagonal pointer motion.

This change fixes the problem by using a single axis which is orthogonal
and proportional to mouse delta - matching view-port trackball.
2017-06-30 11:10:05 +10:00