Commit Graph

56022 Commits

Author SHA1 Message Date
Campbell Barton
f860369ebf Manipulator: use matrix for manipulator direction
Remove type-specific axis functions.
2017-06-18 08:37:50 +10:00
Campbell Barton
49be79693c Manipulator: use matrix instead of origin
This avoids having to use manipulator-type specific functions
to set the orientation.
And will make it simpler to access transformation from Python.

Currently the matrix is still used as an offset in places.
Also per-type orientation values still need to be removed.
2017-06-18 05:38:10 +10:00
Campbell Barton
83c28ff96a Merge branch 'master' into blender2.8 2017-06-18 01:44:08 +10:00
Campbell Barton
54f0f87a4b Cleanup: use uint 2017-06-18 01:34:41 +10:00
Campbell Barton
a56de26704 Manipulator: draw options for dial
- Option to start helper angle lines based on a vector
  instead of the initial mouse coords (useful for bisect & spin).
- Option to show 2x helper lines
  useful when dial is used to rotate an axis value.
2017-06-17 15:32:47 +10:00
Campbell Barton
865bf8ecbc Manipulator: correct dial angle
Calculation was done in screen-space giving inaccuracy,
making the angle incorrect for tool code.

Cast mouse coords onto the dial plane to calculate the angle instead.
2017-06-17 14:34:23 +10:00
Campbell Barton
57c9bc9bb0 Manipulator: fix general purpose dial use
Wasn't checking own location when checking if flip is needed.
2017-06-17 11:55:53 +10:00
Campbell Barton
03f67fd5b0 Cleanup: unused code 2017-06-17 11:32:30 +10:00
Campbell Barton
608cabe2a1 Manipulator: Ignore zoom-level for on-screen widgets 2017-06-17 11:24:26 +10:00
Campbell Barton
41e22cccee Camera widget only drew 3 sides 2017-06-17 11:09:08 +10:00
Campbell Barton
aeeebacd6a Cleanup: minor consistency tweak for type name 2017-06-17 10:04:48 +10:00
Campbell Barton
8c22d31dcc Manipulator: remove type specific 'new' functions
Instead use generic 'WM_manipulator_new', adding a new 'setup'
callback (like wmManipulatorGroup.setup) used to initialize type vars.

This moves conventions closer to wmOperator and simplifies exposing to
Python.
2017-06-17 10:02:54 +10:00
Campbell Barton
71b70b23b3 Manipulator: initial manipulator for spin operator 2017-06-17 06:38:51 +10:00
Campbell Barton
df017f7867 Manipulator: New grab preset, use for bisect 2017-06-17 06:14:29 +10:00
Campbell Barton
2b8d599b3a Manipulator: add array get/set functions 2017-06-17 02:38:49 +10:00
Aaron Carlisle
ed6d88f06a PyAPI: Fix warning about indent 2017-06-16 12:30:18 -04:00
Dalai Felinto
946bc4d3c1 Fix object selection doversion issue since Workspace
Workspace commit (7f564d74f9) made
selection to not be carried away from 2.7x files into 2.8.
2017-06-16 18:12:22 +02:00
Bastien Montagne
34389999b2 Usual i18n/UI messages fixes.
Please do not add useless tooltips! We have enough messages to translate
already...
2017-06-16 12:50:24 +02:00
Campbell Barton
e306499a41 Missed last commit 2017-06-16 08:52:42 +10:00
Campbell Barton
637fa5f670 Cleanup: rename manipulator files 2017-06-16 08:51:14 +10:00
Campbell Barton
65905a76c2 Add bisect manipulator
Example that uses library widgets to control an operator,
the API hasn't been reviewed yet so this can be seen as a test.
2017-06-16 08:25:24 +10:00
Campbell Barton
400d3f85e1 Add support for delayed manipulator removal
This is needed so manipulators can tag themselves for removal
without causing problems from freeing data within a callback.

Also use properties within the dial manipulator and fix an error where
removing a wmManipulatorGroupType didn't remove its keymap.
2017-06-16 08:20:27 +10:00
Campbell Barton
4054914813 UV manipulator from custom widgets branch
This isn't advanced, just adding to get custom
manipulator branch from being too much out of sync with 2.8.
2017-06-16 07:34:23 +10:00
Dalai Felinto
cd21236ea1 Fix duplication of scene, it was missing duplication of layer properties 2017-06-15 18:37:02 +02:00
Campbell Barton
51404724cc Merge branch 'master' into blender2.8 2017-06-16 01:29:20 +10:00
Campbell Barton
1d966ca7a1 Math Lib: add angle_on_axis_v3v3_v3
Use for calculating the angle between 2 directions on an axis.

Also signed version and normalized plane projection,
use when input is normalized.
2017-06-16 01:27:58 +10:00
Bastien Montagne
60c5b3f76f Merge branch 'master' into blender2.8 2017-06-15 16:37:10 +02:00
Bastien Montagne
3d03616772 Cleanup: do not use BKE_libblock_free_ex() unless needed! 2017-06-15 16:20:51 +02:00
Bastien Montagne
a35e733ff1 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/collada/MeshImporter.cpp
	source/blender/editors/object/object_add.c
	source/blender/editors/screen/screen_edit.c
2017-06-15 15:54:11 +02:00
Bastien Montagne
880e96dd66 Fix/workaround 'convert object' messing up linked data.
'Convert To...' Object operation has very weird effect of actually
working at obdata level, not object level, which means *all* objects
(even unselected/hidden/in other scenes/...) using same obdata will be
converted to new selected type.

IMHO this is very bad behavior, but... not a bug really, so do not
change this for now.

But at least, do not do that when working on some linked data, else it
leaves Blend file in invalid (incoherent) state until next reload.

So workaround for now is to enforce the 'Keep Original' option when some
linked object/obdata is affected by the operation.

Also fixed somewhat broken usercount handling in Curve->Mesh part.
2017-06-15 15:47:16 +02:00
Dalai Felinto
60a36f2028 Eevee: Use PROP_NONE for probe grid resolution
It makes no sense to use PROP_PIXEL as unit here.
2017-06-15 15:02:32 +02:00
Dalai Felinto
32cd8ac710 Layers: Scene copy should copy selection as well.
We need this for Depsgraph, otherwise CoW scene will have different selection properties.
2017-06-15 13:47:14 +02:00
Bastien Montagne
9e0a253ea1 Cleanup: make Group Unlink outliner action use `BKE_libblock_delete() too.
Same as in rB2bd51474a44...
2017-06-15 13:06:31 +02:00
Bastien Montagne
ddb8330571 Cleanup: remove useless call to BKE_screen_free() in screen deletion.
`BKE_libblock_free()` will call it itself.
2017-06-15 13:00:11 +02:00
Bastien Montagne
ee5ed2ae26 Fix dangerous code when deleting Scene.
That one was probably not an actual issue, except maybe in some corner
cases (like deleting a linked scene also used by some other linked scene).

Again, better not try to do smart & complex freeing logic outside of
BKE_library area, let's keep spaghetti nitghmare in a single place!
2017-06-15 12:57:08 +02:00
Campbell Barton
830df9b33d Updates to manipulator API
While this is work-in-progress from custom-manipulators branch
its stable so adding into 2.8 so we don't get too much out of sync.

- ManipulatorGroupType's are moved out of the manipulator-map and are now
  global (like operators, panels etc) and added into spaces as needed.
  Without this all operators that might ever use a manipulator in the 3D
  view would be polling the viewport.
- Add optional get/set callbacks for non-RNA properties
  Needed so re-usable manipulators can control values that
  don't correspond to a single properly or need conversion.
- Fix divide by zero bug in arrow manipulator (when moving zero pixels).
2017-06-15 20:56:22 +10:00
Bastien Montagne
2bd51474a4 Cleanup: make Group Unlink operator use BKE_libblock_delete(), since that's what it is doing.
Previous code (same as what `BKE_libblock_free_us()` is doing when
usercount reach 0) was probably OK in that specific case, but still not
good idea, and potentially risky.
2017-06-15 12:49:40 +02:00
Bastien Montagne
7853ebc204 Fix collada importer doing own handling of usercount/freeing.
Better use generic `BKE_libblock_free_us()`.
2017-06-15 12:44:15 +02:00
Bastien Montagne
25c0666b90 Fix potentially dnagerous code in doversionning of brush.
Even though in that specific it was probably safe-ish, there is no
guarantee at this point Brush we want to remove are not used somewhere,
better take the slightly slower, much safer `BKE_libblock_delete()` path here.
2017-06-15 12:38:55 +02:00
Bastien Montagne
7a80c34f52 Fix serious bug in 'curve-to-mesh' conversion code.
Eeeeeek!^2 Calling unconditionnaly ID freeing `BKE_libblock_free()` on a
datablock (ob->data, i.e. Curve) that may be used elsewhere...
Veryveryvery bad!
2017-06-15 12:34:12 +02:00
Bastien Montagne
b488988ab1 Fix potential memory leak in Sequencer sound strip creation code. 2017-06-15 12:32:27 +02:00
Dalai Felinto
1a7099f3ec Fix T51463: Eevee motion blur not working (with AMD)
GLSL needs FragColor to be initialized. The default vec4 value seems to be
implementation dependent. Or it's a bug on Mesa/AMD.
2017-06-15 11:31:45 +02:00
Sergey Sharybin
826f3c715c Fix strict cflags compilation after recent const changes 2017-06-15 10:19:33 +02:00
Sergey Sharybin
35ec72bcb8 Merge branch 'master' into blender2.8 2017-06-15 10:17:51 +02:00
Sergey Sharybin
038b73bab1 Fix compilation error with strict cflags after recent const changes 2017-06-15 10:14:56 +02:00
Bastien Montagne
692ce81d93 Further improvements of text editor for POV-Ray
*tryed "#" as preprocessor used in POV-Ray for language keywords best behaviour was to have it as a punctuation symbol
*moved "finish" to its proper category
*changed order of some POV-Ray ini files keywords to have them work better
*added a few keywords from latest pov version
*Fixed C-style closing of multiline comments (*/)

Reviewers: campbellbarton, mont29

Reviewed By: campbellbarton, mont29

Subscribers: mont29

Differential Revision: https://developer.blender.org/D2707
2017-06-15 09:34:38 +02:00
Aaron Carlisle
44fd84bcc3 PyAPI: Proper Solution to bpy.app 2017-06-15 00:54:41 -04:00
Clément Foucault
f2d7a28a09 Probes: Modify Add Menu and change defaults. 2017-06-15 00:57:16 +02:00
Clément Foucault
f5203e6cba Probe: Fix display of the Influence of grid probes. 2017-06-15 00:57:16 +02:00
Clément Foucault
634dbfa2ed Eevee: Fix grid probe updating when updating cube probe. 2017-06-15 00:57:16 +02:00