Commit Graph

56172 Commits

Author SHA1 Message Date
Campbell Barton
3ee0ce27fa Cleanup: style 2018-08-26 20:34:33 +10:00
Campbell Barton
9abc2dfa49 Fix T56491: Undo crash while preview jobs run
While the crash is in 2.8, it's possible undo operates on data
which isn't only owned by the current scene (any object for eg).

Thanks to @mont29 for suggesting the fix.
2018-08-24 12:38:11 +10:00
Campbell Barton
b2d32d7fa4 UI: always align item w/ label 2018-08-24 12:16:38 +10:00
Campbell Barton
7ec1a56a41 RNA: avoid redundant property lookups in UI API 2018-08-24 11:44:28 +10:00
Bastien Montagne
c5206e5d2f Fix T56506: Different behaviour of Bounds Clamp with positive and negative axis.
Small typo on minus sign position... ;)
2018-08-23 14:55:40 +02:00
Campbell Barton
53527ac10f Cleanup: use EDBM prefix 2018-08-22 15:23:28 +10:00
34029fc71a UI: disable new text hinting from D3201 by default for now.
This changes the text hinting setting to be an enum with options
Auto / None / Slight / Full. The default is Auto which currently disables
hinting.

The hinting was tested with a new FreeType version, but this is not what
is used on the buildbots an official release environment, and the fonts
look quite bad because of that. Once FreeType has been upgraded we can
change the default.

Even then the results are not ideal, perhaps due to missing subpixel
positioning and linear color blending support in BLF.
2018-08-21 19:07:04 +02:00
Kenneth Perry
5dd64b3c88 Python API: expose missing LAYER_MEMBER property type registration.
Differential Revision: https://developer.blender.org/D3628
2018-08-21 13:03:25 +02:00
Andrew Hale
f52e31a46d Fix BMesh edge_bisect, edge_percent being ignored
Also fix float/int/bool access methods
2018-08-20 13:38:10 +10:00
Campbell Barton
537bf6af0c RNA: Spline.calc_length() utility function
D1810 by @Matpi w/ edits
2018-08-20 11:23:40 +10:00
Campbell Barton
4c22343271 Warn when app-template isn't found 2018-08-18 14:10:07 +10:00
Campbell Barton
506d8448cc WM: app-template command line override
Without this, there was no simple way to have
launchers for different app-templates.

Also allows force-disabling the app-template stored in the preferences.
2018-08-18 14:10:07 +10:00
894a216252 Fix engine.camera_model_matrix() not working in the Python API. 2018-08-17 12:28:27 +02:00
Bastien Montagne
7a7c579dd9 Fix T56404: Shape keys of the curves with multiple splines go haywire in edit mode.
Very dummy mistake (someone forgot to increment one of the variables in
one of the loops in that spaghetti nightmare that is nurbs shapekey
code), took half an age to spot it... :/
2018-08-16 15:49:00 +02:00
Campbell Barton
eebc292b42 Cleanup: rename transform UI values
See: T54858
2018-08-16 08:02:36 +10:00
Campbell Barton
c3e3ccd42c Cleanup: set expand variable for all enum-flags
No functional change, needed for fix in 2.8x
2018-08-15 15:54:27 +10:00
cab013bc5d Fix use of uninitialized variable in some cases, in recent bugfix. 2018-08-14 15:27:49 +02:00
Bastien Montagne
6eb5b418ee Fix T56363: Blender crash when deleting a curve object.
Conversion code could leave object with inconsistent material data
compared to its new obdata.

Ideally, various conversion code would handle that properly, conserving
materials when possible, but for now at least ensure we get valid
result!
2018-08-14 14:06:42 +02:00
Bastien Montagne
932251caea Fix object copying not ensuring validity of material arrays.
Related to T56363, this is not fixing the root of the bug, but ID
copying should always be a good occasion to ensure sanity of our data
(and error checking is always better than a crash!).
2018-08-14 14:06:42 +02:00
Campbell Barton
73234a9122 Cleanup: vpaint face select de-selected twice 2018-08-14 17:37:59 +10:00
Campbell Barton
2044ee00c2 Correct vpaint vertex circle select
Would run validate when not needed.
2018-08-14 17:02:57 +10:00
Campbell Barton
b993e8a17a Cleanup: use boolean argument 2018-08-14 10:42:04 +10:00
Campbell Barton
c29c426925 Cleanup: use braces w/ particle loop macros 2018-08-14 10:14:05 +10:00
Campbell Barton
98f4a8eedf Cleanup: style 2018-08-14 10:00:37 +10:00
Bastien Montagne
bc675d90d0 Fix T55745: Pick Shortest Path tool, inconsistent selection.
To get consistent, user-expected results here, we need to 'fake'
starting immediately after a 'skip' block (such that we start with a
full block of selected elements).

Same issue affected vertices and edges selection of course, did not
check the other usages of WM_operator_properties_checker_interval_test()
though.
2018-08-13 17:48:36 +02:00
Bastien Montagne
798a83e35f Cleanup: avoid too close namings, prone to typo mistakes! 2018-08-13 13:47:06 +02:00
Bastien Montagne
0aefef7f8f Fix T56224: Blender2.8 will force a quit when trying to open a scene containing clip track created by blender 2.79.
Beautiful example of typo going unoticed and firing back up in totally
unexpected place years later. Guess nobody actually duplicated a Clip
data-block before! :P

Most likely own fault, during refactor of ID copying code.
2018-08-13 13:43:35 +02:00
Bastien Montagne
844b40b0c1 Fix T56344: Crash when used Twist for Emitter type of Particles System.
That effect is NOP with emitter particles anyway...
2018-08-13 11:57:18 +02:00
Arto Kitula
1282be0f82 update llvm + clang to 6.0.1 and add openmp for macOS 2018-08-09 17:57:12 +03:00
Andrew Hale
3aee3bbac7 Math Lib: varied size vector multiply
Needed for Python mathutils elementwise multiply.
2018-08-09 08:14:38 +10:00
440ef4235f OpenJPEG: support building against both 1.5 and 2.3.
Patch porting to OpenJPEG 2.3 is by Campbell.

Once all platforms are upgraded we can remove the code for 1.5, and upgrade
or remove the openjpeg version from extern/. This intermediate step makes it
possible for platform maintainers to upgrade to 2.3 without breaking other
platforms.
2018-08-08 20:27:16 +02:00
Campbell Barton
bc63d6f39a Fix T55095: Undo crash w/ linked library data 2018-08-08 19:16:43 +10:00
Campbell Barton
b496bf022b Fix T54584: Crash w/ image undo
Using accumulation undo type (eg painting)
as the first undo step, broke code which adds an initial memfile undo.
2018-08-08 17:12:44 +10:00
Campbell Barton
bb8497fd5d Cleanup: correct header guard
Header guard was duplicated before renaming.
2018-08-08 13:11:57 +10:00
Campbell Barton
f86c965d7f Cleanup: use conforming header guard 2018-08-08 11:49:51 +10:00
Campbell Barton
d07d3e0987 Cleanup: indentation 2018-08-08 11:31:28 +10:00
Andrew Hale
4c4aa65adb PyAPI: Make skin modifier roots settable
This make the root flag writable using the Python API, using the
generic skin vertex flag setter function.

Reviewed By: Campbell Barton

Differential Revision: http://developer.blender.org/D3583
2018-08-06 12:11:35 +02:00
Campbell Barton
907413ca65 Fix T55012: Corruption editing screen keymap 2018-08-06 17:08:39 +10:00
Bastien Montagne
a56ec3dfe3 Fix T56222: Bevel Modifier bug (uninitialized value). 2018-08-04 13:40:38 +02:00
Campbell Barton
cb6d7cb0b2 RNA: make particle enum public 2018-08-02 17:49:03 +10:00
Bastien Montagne
9336aef4eb Fix T56195: Typo in BLI_array_utils.h. 2018-08-01 16:12:36 +02:00
Campbell Barton
583b2f9a3d Cleanup: remove unused array member 2018-08-01 16:38:57 +10:00
Campbell Barton
6a39d72558 Cleanup: declare vars or make static 2018-08-01 08:57:31 +10:00
Campbell Barton
e8d58080df DNA: remove View3D.flag3
Having 'flag, flag2, flag3' is getting out of hand especially
when we support increasing the size of types.

Make flag2 into an int.

Note, this looses the 'show world' option,
but it's not such an important setting.
2018-08-01 08:08:59 +10:00
Campbell Barton
36389444b0 Fix Shape Key retime starting at frame 10
D3571 by @alm
2018-07-31 18:42:22 +10:00
Campbell Barton
21f61cbe73 BLF: replace global aa pref w/ monochrome flag
Now disabling anti-aliasing doesn't impact sequencer, render stamp etc.
2018-07-31 16:57:05 +10:00
Campbell Barton
18888b7b0c UI: use text hinting (now user preference)
D3201 by @ambient w/ edits not to impact fonts used for rendering
(only change display for UI text).
2018-07-31 16:19:00 +10:00
Campbell Barton
1195a4a040 UI: add check for any kind of popup
Fixes T56155 when merging into 2.8
2018-07-31 10:38:01 +10:00
885cc4cf9a Build: require C11/C++11 for all operating systems in master.
This is in preparation of upgrading our library dependencies, some of which
need C++11. We already use C++11 in blender2.8 and for Windows and macOS, so
this just affects Linux.

On many distributions this will not require any changes, on some
install_deps.sh will need to be run again to rebuild libraries.

Differential Revision: https://developer.blender.org/D3568
2018-07-30 17:12:24 +02:00
Campbell Barton
ff6c6f18c1 Cleanup: id-property creation
D3473 by @JacquesLucke
2018-07-30 16:36:07 +10:00
Campbell Barton
f4379f8b91 Use Ctrl Snap to seconds w/ play-head drag
D3056 by @alourenco
2018-07-30 16:16:44 +10:00
Campbell Barton
9c960557a7 Cleanup: trailing space 2018-07-30 15:38:39 +10:00
Campbell Barton
018c9af446 Fix T56120: bad property access (from 2.8)
Thanks to @brita_ for the fix.
2018-07-29 12:09:00 +10:00
Campbell Barton
fe8d8aa27e Fix Vector.project crash w/ >4 length vectors 2018-07-27 17:41:20 +10:00
Campbell Barton
3e2dfc6db8 Fix T55991: Python ignores scene switch argument 2018-07-27 16:49:41 +10:00
Campbell Barton
98c8094e3a Correct arguments for callback 2018-07-27 16:41:18 +10:00
Campbell Barton
71564debf9 Fix T56074: Remove doubles creates holes
Own regression when moving remove-doubles to kd-tree
(seems to happen only in rare cases).
2018-07-27 10:55:30 +10:00
Jens Verwiebe
1c41dbb079 Fix compiling after ui cleanups 2018-07-26 14:21:15 +02:00
Campbell Barton
ab67c6e46b WM: replace UI draw callbacks w/ property poll
Custom drawing functions were used just to control property display.
Move to poll function.
2018-07-26 17:35:33 +10:00
Campbell Barton
44370a307c UI: hide transform constraints when not used 2018-07-26 15:44:27 +10:00
Campbell Barton
e6c5490323 UI: hide proportional transform options
Adds property poll function to transform.
2018-07-26 11:53:58 +10:00
Campbell Barton
dbd79c097c WM: Add operator property poll callback
This allows operators to filter out properties from the
auto-generated draw functions.

Some custom draw functions can move to using this.
2018-07-26 11:53:53 +10:00
Campbell Barton
2df27fa6cf Cleanup: Use const argument 2018-07-26 11:20:03 +10:00
Bastien Montagne
29d1db9ed6 Fix T55964: Direction not normalized in isect_ray_aabb_v3_simple()?
RNA API Object.ray_cast would not normalize direction vector before
doing first quick bbox intersection test, while using its returned
distance value. This could lead to wrong exclusion of object.
Thanks to @codemanx for finding that issue.
2018-07-25 21:05:44 +02:00
Bastien Montagne
5ba4d059c0 Fix (unreported) potential div-by-zero in ray/bbox intersection BLI code.
Also added note that direction parameter should be normalized vector
in case one intend to use returned distance values.
2018-07-25 21:04:28 +02:00
Alexander Gavrilov
ec640510a8 Fix T55958: allow the user to select between spring and spring2.
The old springs with damping 1.0 operate in a special way that
is more similar to plastic deformation than a spring. Some users
rely on that, so let the user choose which implementation to use.
This also restores full backward compatibility with 2.79.

Reviewers: sergof

Differential Revision: https://developer.blender.org/D3544
2018-07-24 10:10:48 +03:00
Campbell Barton
4d978cc2e4 Cleanup: changes from 2.8 2018-07-24 13:59:35 +10:00
Bastien Montagne
bb98e83b99 Fix T55668: Volume Keyframe on Cut-ted Metastrip.
We actually still had cases of Meta strip duplication resulting in
non-unique strip names. Quiet surprising this went unoticed for so long. :(

Fixed that bug, and think it was last one (at least, no other case of
SEQ_DUPE_UNIQUE_NAME usage should be broken, I think...), and raised
subversion and updated doversion to run uniquename check on strips on
all previous fileversions.

Note: will have to do that again when merging in 2.8...
2018-07-23 17:42:55 +02:00
Bastien Montagne
710a059549 Cleanup: Move 'WAVEFORM_LOADING' of sounds from flags to tags.
This is purely runtime data, so move it to new tags. ;)
2018-07-20 12:11:34 +02:00
Bastien Montagne
f48e81e720 Fix T55414: waveforms are reprocessed when undoing
Add new tag to bSound (runtime flags), and make read code to set a 'no
reload waveform' new tag, since it uses a mapping to get existing
waveform in undo case...
2018-07-20 12:01:38 +02:00
Alexander Gavrilov
0bf8096501 Resolve the opposite vector ambiguity in Damped Track constraint.
Damped Track by specification attempts to arrive at the desired
direction via the shortest rotation. However with opposite vectors
there are infinitely many valid 180 degree rotations. Currently
it gives up and does nothing.

I think that it would be more reasonable to resolve the ambiguity
arbitrarily, so that Damped Track won't have a weird dead zone.
To make it more predictable I use a local axis.

In addition, the singularity area vicinity has some floating
point precision problems that result in significant jitter.
This applies workarounds for two causes of instability.

Differential Revision: https://developer.blender.org/D3530
2018-07-19 17:58:27 +03:00
e81dc0b7bc Fix E key in Python console not working after recent changes. 2018-07-18 22:23:29 +02:00
L. E. Segovia
5078b9d2d0 Cycles: add Principled Hair BSDF.
This is a physically-based, easy-to-use shader for rendering hair and fur,
with controls for melanin, roughness and randomization.

Based on the paper "A Practical and Controllable Hair and Fur Model for
Production Path Tracing".

Implemented by Leonardo E. Segovia and Lukas Stockner, part of Google
Summer of Code 2018.
2018-07-18 13:59:06 +02:00
566b319335 Cleanup: Cryptomatte node style tweaks. 2018-07-18 13:59:06 +02:00
Stefan Werner
bdda0964e0 Compositor: Cryptomatte compositing node.
This patch adds a new matte node that implements the Cryptomatte specification.
It also incluces a custom eye dropper that works outside of a color picker.
Cryptomatte export for the Cycles render engine will be in a separate patch.

Reviewers: brecht

Reviewed By: brecht

Subscribers: brecht

Tags: #compositing

Differential Revision: https://developer.blender.org/D3531
2018-07-18 13:03:34 +02:00
Bastien Montagne
efe94793c0 Fix T56003: Opening image files as movies in VSE crashes.
metadata loading code was assuming all videos in Blender were from
FFMPEG... added empty place-holders for other types too, we probably
could load some metadata from pictures or AVI files too!
2018-07-17 13:55:43 +02:00
Bastien Montagne
b85be88655 Fix (IRC-reported) wrong usercount handling of deprecated IPO datablocks.
versionning code would unref those twice... Reported by @ßergey on IRC, thanks!
2018-07-16 22:29:26 +02:00
Sergey Sharybin
1e1c858cf1 Cleanup: Remove obscure flag which was only used for read in subsurf code
Some sort of rudiment from many years ago, is never set by 2.5x code.
2018-07-16 16:15:57 +02:00
Sergey Sharybin
72d1fb9934 Cleanup: Use const qualifier for UV vertex map 2018-07-16 15:58:12 +02:00
Sergey Sharybin
20f3cbfb78 Cleanup: More clear naming in UV vertex/element mappings
Also use unsigned short for loop index within a polygon for UV vertex
mapping, which matches UV element mapping.
2018-07-16 15:44:43 +02:00
Philipp Oeser
43f0af734e Fix T55944: fbx export error with smoothing face
ddee0931b868 added PROP_RAW_BOOLEAN case for foreach_set, but missed
foreach_get

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D3534
2018-07-16 15:03:21 +02:00
Philipp Oeser
96b4e43e8d Fix T55527: creating a Quaternion without args should result in identity
quaternion

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3487
2018-07-16 15:03:21 +02:00
Campbell Barton
ab9bd557ad Cleanup: doxy comments 2018-07-15 20:34:24 +02:00
charlie
83a4e1aaf9 Cycles: add voronoi features and distance settings from Blender.
Features to get the 2nd, 3rd, 4th closest point instead of the closest, and
various distance metrics. No viewport/Eevee support yet.

Patch by Michel Anders, Charlie Jolly and Brecht Van Lommel.

Differential Revision: https://developer.blender.org/D3503
2018-07-15 00:45:42 +02:00
Campbell Barton
a6ec402f5a Remove invalid assert 2018-07-13 17:59:26 +02:00
Campbell Barton
f6367ecfb6 Cleanup: operator type API, header 2018-07-13 12:47:04 +02:00
Campbell Barton
8ff3f7f601 Cleanup: move WM type registration into own files
Type registration is mostly boiler plate logic,
which can be separated from other API's.
2018-07-13 12:20:42 +02:00
Charlie Jolly
30bffb5a3a Nodes: add sqrt, ceil, floor and fract to math nodes.
This works for Cycles, Eevee, texture nodes and compositing. It helps to
reduce the number of math nodes required in various node setups.

Differential Revision: https://developer.blender.org/D3537
2018-07-13 11:00:10 +02:00
Campbell Barton
f4213c1408 Cleanup: id-property API use
Also clarify comments.
2018-07-13 10:51:49 +02:00
Campbell Barton
252ebf6bfd Cleanup: split keymap lookups into own functions
More will be added in 2.8, keep this manageable.
2018-07-13 10:30:18 +02:00
Philipp Oeser
8c957468bc Keymap: dope-sheet hotkey to change falloff 2018-07-13 09:05:41 +02:00
Campbell Barton
fb5597540d Cleanup: right shift arguments 2018-07-13 08:36:10 +02:00
Campbell Barton
e77d2b4e3f Cleanup: remove legacy mesh save support
This was used for saving files for Blender 2.6x.
2018-07-12 21:35:57 +02:00
Campbell Barton
753a600e35 PyAPI: add undo redo handlers
Useful so Python can clean up before/after undo steps.
2018-07-12 14:43:35 +02:00
9a5fb0209e Fix T55949: increase color management exposure hard range. 2018-07-12 11:47:19 +02:00
Campbell Barton
d75b8e5f01 Cleanup: header guards 2018-07-12 11:19:22 +02:00
Campbell Barton
1db47a2ccd Fix PyRNA class registration w/ Python 3.7
In Python3.7 this now raises an error.
2018-07-12 08:30:39 +02:00
Bastien Montagne
08274433e1 Fix T55912: saving Viewer Node image error.
Images from viewer node needs the lock parameter...
2018-07-11 14:32:43 +02:00
Bastien Montagne
59b4c67536 Minor cleanup to logic in BKE's imbuf releasing code. 2018-07-11 14:32:06 +02:00
Campbell Barton
2b963ecb81 Cleanup: duplicate versioning block 2018-07-11 11:39:58 +02:00