Compare commits

..

6050 Commits

Author SHA1 Message Date
f1aa4d18d4 Blender 2.81a: Update submodule for addons 2019-12-04 12:32:27 +01:00
96f6520734 Fix crash exiting edit-mode with an active basis shape key
Exposed by T71865, while the bug remains this resolves the crash.
2019-12-04 11:16:37 +01:00
4a440ecb99 Fix T72071: Crash on snap to edge
Caused when the vertices index is dirty due to some mesh editing
operation like Extrude
2019-12-03 14:30:57 +01:00
bdfcee347e Fix T71864: Broken 'Select' > 'More' in face mode in UV Editor
Caused by rBeead6a604602.

Above commit didnt account for different element types being tagged (face
select mode tagged faces, others tagged loops) and always flushed from
loops.

Now restore to flush from faces if we are in face select mode.

Maniphest Tasks: T71864

Differential Revision: https://developer.blender.org/D6315
2019-12-03 14:01:14 +01:00
60e817693c Fix T69332: 'Reset to Default Value' on a custom string property crashes
Thx @campbellbarton for the heads up!

Maniphest Tasks: T69332

Differential Revision: https://developer.blender.org/D6284
2019-12-03 13:56:26 +01:00
73ce35d332 Fix segfault when polling MESH_OT_paint_mask_extract
`CTX_data_active_object(C)` returns `NULL` when there is no active object,
and this was not tested for in the code.
2019-12-03 12:34:17 +01:00
6334f97093 Fix T71558: Hair particles: Brush effect not occluded by emitter geometry 2019-12-03 10:42:41 +01:00
3a344a61e8 Fix T71612: Viewport rotate doesn't work
Error in version patching.
2019-12-03 10:42:37 +01:00
2ccc52a7f1 Fix T71741: Crash showing the object relations menu 2019-12-03 10:42:32 +01:00
893c29c15c Fix T71213: Mask or Mirror before Armature breaks weight paint.
This is a revert of a small fraction of commit rB5e332fd700
that introduced the issue according to bisect.

Doing a break here is wrong, because BKE_crazyspace_build_sculpt
assumes that processing stopped at the first deform modifier
without deformMatrices, and thus skips all modifiers until it
finds one like that. Thus this early loop exit makes the behavior
worse, as instead of skipping just Mask and Mirror, it skips all.
2019-12-03 10:42:28 +01:00
54bff9dc89 Fix T71147 Eevee stops rendering after selection attempt
This is caused by the fallback path used by OSX, which is reconfiguring
the same default VAO. But it seems to be an issue on certain drivers.
2019-12-03 10:42:19 +01:00
c14b164e8a Blender 2.81: Begin corrective 'a' release cycle 2019-12-03 10:41:42 +01:00
26bd5ebd42 Update rest of submodules to correct commit for Blender 2.81 release 2019-11-20 16:27:37 +02:00
e8b0a13c31 Update to correct locale submodule for 2.81 release 2019-11-20 16:22:26 +02:00
ab1b02e389 Blender 2.81: New splash and release cycle bump
Splash by Alex Trevino / aendom.com
Original concept by Anaïs Maamar

Change release cycle to release.
2019-11-20 15:06:14 +02:00
115a5bf65a Correct error in last commit 2019-11-18 23:53:34 +11:00
1cb07530a9 Fix T71564: Undo stroke lags after entering sculpt mode
Regression since 2.80, see: T71434
2019-11-18 23:35:25 +11:00
99640d0622 Fix building on NetBSD 2019-11-18 16:27:06 +11:00
047d2b0559 CMake: GLEW_INCLUDE_PATH wasn't set for system glew 2019-11-18 16:26:32 +11:00
321afe0cd6 Fix building on 32bit systems 2019-11-18 16:25:59 +11:00
eba4a4bd73 Fix active bone flip not activating the wpaint vertex group 2019-11-16 03:32:23 +11:00
b266b1034f Cleanup: quiet warnings 2019-11-16 02:49:15 +11:00
0384cc6f78 API Docs: don't show functions in 'bpy.app.handlers'
This shows the function and it's memory location,
it's not useful for docs so remove it.
2019-11-16 02:41:17 +11:00
4ca87085e0 API Docs: only document built-in types
Some types were documented in bpy.types aren't accessible there.

For now, disable documenting types from add-ons and some types from
bl_operators, bl_ui... since these are mostly for internal use.
2019-11-16 02:39:51 +11:00
dc726fed82 PyAPI: add class and module attributes to rna_info.InfoStructRNA
Module access is needed for documentation generation to exclude
non built-in modules.

This also fixes a bug creating references to non built-in types.
2019-11-16 02:39:51 +11:00
f64064e4b1 Docs: correct indent for to_swing_twist docstring 2019-11-16 02:39:51 +11:00
Dalai Felinto
49db3f6bf1 Fix: Filebrowser saving dialog size when maximized
Reviewed By: Severin

Differential Revision: https://developer.blender.org/D6260
2019-11-15 12:10:16 -03:00
Julian Eisel
f641c60530 Fix T70991: Maximized file browser hides file name bar on Windows
`WS_CHILD` is a different kind of child window that what we define as
child window. See http://forums.codeguru.com/showthread.php?491604.

Setting this style flag seems to mess things up a bit in our
configuration. The name bar is actually being overlapped by the Windows
task bar then. Not totally sure why this happens, but I think it's
because windows with the `WS_CHILD` style are positioned relative to the
parent, not the desktop (screen without taskbar). So it uses the full
space available when maximized, which isn't clipped by the taskbar
anymore.
2019-11-15 16:34:09 +01:00
c25a910e4e Buildbot: Explicitly disable code signer on Linux and macOS
The script requires Python 3.7 as a very minimum, and CentOS is
only 3.6.

On macOC there was an access to a None object, due to missing
implementation of code signer on this platform.
2019-11-14 10:40:28 +01:00
9fff74f144 Sculpt: disable undo from any UI elements in sculpt mode
Causes undo push in sculpt mode, see: T71434
2019-11-14 19:50:48 +11:00
bcff803712 Paint: disable undo when changing the brush or it's size
Causes undo push in sculpt mode, see: T71434
2019-11-14 19:48:08 +11:00
47da01a4db Fix T70211: Brush keybindings failed with non-brush tool active 2019-11-14 17:29:42 +11:00
f16f2f8762 Fix macOS using conflicting key binding Cmd-.
Used for toggle origins, conflicts on macOS, use Ctrl-. instead.
2019-11-14 16:55:31 +11:00
9bd0d8b550 Sculpt: Sculpt template defaults
This commit includes all changes listed in T71366 except for the 2 column toolbar layout.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6225
2019-11-13 17:25:49 +01:00
fe86375d1c Force sculpting on highest multires level
This is a workaround for T58473 to avoid likely event of ruining
sculpted data.

Differential Revision: https://developer.blender.org/D6244
2019-11-13 17:15:54 +01:00
c7b7722254 Fix T71434: Sculpt lags changing brush size
Add a check to wm.radial_control so undo steps are only added
to properties that have undo enabled (as is done with number buttons).
2019-11-14 00:57:26 +11:00
Jeroen Bakker
e527544b76 Cycles: OpenCL Performance
When using OpenCL with Cycles the rendering time increased substantial.
After doing some tests the bottleneck was found in 4d voronoi and 2d and
3d smooth voronoi.

This change will hide these behind a specific compile directive so the
speed will improve.

AMD RX480 + BMW scene

    2.80 (3:10)
    2.81 (5:48)
    2.81 excluding 4d voronoi+2d/3d smooth (3:50)

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D6231
2019-11-13 12:55:44 +01:00
ca1721270a Fix T71503: Wrap + displace + multires + Sculpt crash
The root of the issue goes to the discontinuity between the way how
mesh_calc_modifiers() and BKE_sculpt_multires_active() works.

At some point detection of original data usage by a modifier got
broken: the mesh_final based check is unreliable because deform-only
modifiers will create mesh_final for the connectivity information.

This made it so modifier stack evaluation would skip multires
evaluation, but the sculpt code will assume the multires is properly
applied.

This change makes it an explicit check about whether there are any
non-deform-only modifiers applied.

Pair programming and review together with Bastien, thanks!
2019-11-13 11:29:19 +01:00
5fde907fd3 Modifiers: Correct deform-only modifiers
There was a discontinuity between how deform-only modifiers are applied
for the case when result deform mesh is requested and when it is not.

Namely, the input mesh will always be guaranteed to present in the
former case, but not in the latter.

This change makes it so input mesh to deform-only modifiers is always
at consistent state.

Pair programming and review together with Bastien, thanks!
2019-11-13 11:29:00 +01:00
c73a99ef90 Initial implementation of code signing routines
This changes integrates code signing steps into a buildbot worker
process.

The configuration requires having a separate machine running with
a shared folder access between the signing machine and worker machine.

Actual signing is happening as a "POST-INSTALL" script run by CMake,
which allows to sign any binary which ends up in the final bundle.
Additionally, such way allows to avoid signing binaries in the build
folder (if we were signing as a built process, which iwas another
alternative).
Such complexity is needed on platforms which are using CPack to
generate final bundle: CPack runs INSTALL target into its own location,
so it is useless to run signing on a folder which is considered INSTALL
by the buildbot worker.

There is a signing script which can be used as a standalone tool,
making it possible to hook up signing for macOS's bundler.

There is a dummy Linux signer implementation, which can be activated
by returning True from mock_codesign in linux_code_signer.py.
Main purpose of this signer is to give an ability to develop the
scripts on Linux environment, without going to Windows VM.

The code is based on D6036 from Nathan Letwory.

Differential Revision: https://developer.blender.org/D6216
2019-11-13 09:24:41 +01:00
d32520932f Fix sculpt + undo curve crash
PaintCurve data ID data wasn't being remapped.
Error in initial undo refactor.
2019-11-13 14:04:18 +11:00
4782e941c8 Fix T71494: brush curve transform crash in sculpt mode
Error in 309cd047ef
2019-11-13 13:33:46 +11:00
1252577580 Safer fix for make_update.py on buildbot
Makes it so compilation doesn't fail when the SVN updating
stumbles upon checkout which doesn't have correspondence in
a tag, but which isn't so risky as previous change.
2019-11-12 14:28:39 +01:00
1e19ff8bfd Revert "Fix issues with make_update.py when run from release branch"
This reverts commit 8e9e58895b.

The change broke behavior when typing `make update` from the root of
the sources: tests folder wouldn't be updated anymore.

Getting quite close to release now, so will revert to a safer change.
2019-11-12 14:27:47 +01:00
8e9e58895b Fix issues with make_update.py when run from release branch
The issue was rooting to the fact that the script was iterating into
every directory inside of blender.git/../lib/ and attempted to switch
them to the desired path. This doesn't work in an environment where
both master and release branch are built (or any environment where
non-needed SVN directories are not automatically removed).

This change makes it so script explicitly generates a list of
directories which are required for the build. For example, the script
now stores an exact folder with ABI such as win64_vc14.

Only those explicitly listed directories will be updated.

This allows to:

- Solve compilation failure of 2.81 branch after checkout for
  win64_vc15 libraries has been created.

- Fail compilation if actually expected tag is missing (for example,
  when trying to build release branch prior to libraries tag).

Now, there was a confusing logic about possible .svn folder in
lib_dirpath (effectively, blender.git/../lib/.svn) which is not
something what is supposed to happen with the setup of buildbot we are
using for quite some time now. This logic has been removed now.

This change includes old-style string format(), mainly because it is
not know that the buidlbot scripts are run using python3 on CentOS
builder.

Differential Revision: https://developer.blender.org/D6230
2019-11-12 14:01:06 +01:00
65bc5041c3 Fix T71508: wrong gravity settings in scene defaults
Typo in rBf5e0dfe59c7e.
Showed when creating a new default scene.

Maniphest Tasks: T71508

Differential Revision: https://developer.blender.org/D6229
2019-11-12 12:20:17 +01:00
Kevin Buhr
8c9e6f123a Fix T71461: Add IN_PLACE_INSTANCES to part_prim and part_axis object mode particle shaders
For `Particle Properties -> Viewport Display -> Display As` set to
circle/cross/axis, particle instances are associated with a single
resource handle (and, in particular, a single model matrix), so define
`IN_PLACE_INSTANCES` to get the right index for `ModelMatrix` and
`ModelInverseMatrix` in the shader.

Differential Revision: https://developer.blender.org/D6220
2019-11-11 15:30:27 -03:00
a97cc5389a Fix T71452: instance collection to scene from outliner not incrementing collection usercount
Maniphest Tasks: T71452

Differential Revision: https://developer.blender.org/D6222
2019-11-11 17:32:43 +01:00
Dalai Felinto
c1af9ef031 Fix T71487: Crashes When Calling Texture Space Operators
Issue introduced on 69ad44d5b4.

Differential Revision: https://developer.blender.org/D6224
2019-11-11 11:39:20 -03:00
Dalai Felinto
3e4e346e59 Fix T71489: Video editor crash
Bug introduced on rBb77da65e8c4d.

Differential Revision: https://developer.blender.org/D6223
2019-11-11 10:56:07 -03:00
c3dab45510 Fix lattice deform after undo and edit-mode exit
Follow up on T71414
2019-11-11 20:07:12 +11:00
3316610785 Revert "Fix T71126: add old hotkeys to set start/end frame in the timeline to"
This caused T71483.
Having timeline and dopesheet merged in 2.8 makes using S/E keys in timeline not work well.
2.7x keymap needs to fit with 2.8x internals, so probably 2.7x keymap will have to live with Ctrl+Home / Ctrl+End here.

This reverts commit 4fbcbbfb96.
2019-11-11 09:59:41 +01:00
df4f29b928 Fix T71414: Undoing change of lattice resolution deforms mesh 2019-11-11 13:07:37 +11:00
0a0d735acd Fix T71379: Even edge slide shows random points on screen 2019-11-09 09:59:10 +11:00
8c695404a4 Fix T70778: Library Override dissabled after re-instancing same collection in different scene.
Very stupid mistake in own new generic ID lib_link function, that would try
to link ID pointers for all data-blocks, not only those actually needing it.
2019-11-08 17:47:48 +01:00
76be5b5bf5 Fix T70789: Using Remove Single Override breaks file loading (crash).
We only need to refine rna pointer for actual collection properties,
other arrays we handle directly the the appy callback.
2019-11-08 14:52:57 +01:00
3b66d2ed21 Fix T71405: Trying to Ctrl-C on many buttons crashes Blender
Usually Ctrl+C copies the operator name to the clipboard
["bpy.ops.material.new()", "bpy.ops.object.material_slot_remove()"]
Crash happens for all buttons of UI_BTYPE_BUT without associated
operator [some are defined with callbacks only, often these are created
with e.g uiDefIconBut (instead of e.g. uiDefIconButO)]

Other examples that crash with Ctrl+C:
- animation decorators next to animatable properties
- button to show a modifier texture in the texture tab
- ...

2.79 survived here (result in the clipboard was just not changed hitting
Ctrl+C on these buttons), this is what happens with this patch as well.

Maniphest Tasks: T71405

Differential Revision: https://developer.blender.org/D6208
2019-11-08 14:34:25 +01:00
e8cd2269b4 Fix T71199: Child-parent relationships arent kept after you make instances real.
Comparison function of the of the parent ghash was not fully correct,
could lead to some false positives in some cases...
2019-11-08 14:30:00 +01:00
6900187092 Fix T71372: view layer is not maintained when area is duplicated into new window
Maniphest Tasks: T71372

Differential Revision: https://developer.blender.org/D6205
2019-11-08 14:23:45 +01:00
fe2b92d789 Fix T55632: USE_DRAG_MULTINUM and USE_ALLSELECT not working well together
'is_copy' was not set correctly on all uiButMultiState (it was done once
for uiHandleButtonData), resulting in 'delta' being used on some indices
of the array and not others in `ui_selectcontext_apply`.

Maniphest Tasks: T55632

Differential Revision: https://developer.blender.org/D6201
2019-11-08 14:03:40 +01:00
5cf5dfcfad Fix T71194: UV Face centers wrong location with sub-surface mesh 2019-11-08 22:16:25 +11:00
326b25ae8e Fix T66124: Gizmo orientation doesn't refresh when making face 2019-11-08 19:17:27 +11:00
73b9e86b49 EditMesh: avoid undo push on face creation if no action is made 2019-11-08 19:16:27 +11:00
e9d7fddeb4 Fix dyntopo sculpt not setting vertex indices dirty
This is an old bug exposed by new cursor drawing
which uses vertex indices.
2019-11-08 12:13:23 +11:00
5c2670ca39 Cleanup: spelling 2019-11-08 11:44:23 +11:00
bda58b8a89 Cleanup: clang-format 2019-11-08 11:44:23 +11:00
eefd806afc Fix in addition to T61432: Sampling Subframes not working 2.8
As mentioned in the discussion, emission from particles did not make use of subframes. This commit resolves this issue.
2019-11-07 21:33:56 +01:00
74af698769 Fix T70875: Library Override: Clicking an Library Overriden Object crashes Blender.
We also need to rebuild the whole collection/viewlayer object cache
thing when we relink an objector collection in a collection (since it
might be part of a view layer).

Again, usual disclaimer about how inneficient this is currently, needs a
serious refactor to only tag caches as dirty, and actually rebuild the
whole thing on access.
2019-11-07 16:14:11 +01:00
c37ee984a3 Cleanup: remove debugging prints for bpy.msgbus 2019-11-07 22:38:22 +11:00
aa2904ea13 Cycles: Fix strict compiler warning
Pointer used for math arithmetics in assert().
CUDA device pointer is actually an integer type, not a pointer.
2019-11-07 11:06:41 +01:00
79b703bb63 Fix T69822: Switching sculpt objects breaks undo
This introduces object mode tagging for data which hasn't yet been
written back to the ID data.

Now when selecting other sculpt objects, the original objects data is
flushed back to the ID before writing a memfile undo step.
2019-11-07 16:56:21 +11:00
Dalai Felinto
85637311c2 Viewport: Fix stereo 3d camera framings when pivot is not center
As reported by Clément Foucault. This is a small thing but since we
are refactoring the draw manager for the next blender is nice to
have it fully working before the refactor for comparison.

Note: Camera volume and render were both fine, the camera frame is the
one thing that was not working.

Also in toe-in the convergence plane is always facing the original
camera orientation. It is a known small annoyance.
2019-11-06 17:48:09 -03:00
5abd006c78 Fix T70279: crash loading certain old, possibly corrupt files with nodes
This test should not be needed and the cause is unclear, but better to avoid
the crash. Possibly caused by files saved with development versions that had
different node type IDs.
2019-11-06 20:06:33 +01:00
6528fcaeea Fix T69845: OSL wrong texture node output for fixed vector value 2019-11-06 19:29:04 +01:00
a58c1d4497 Fix 2D paint antialiasing offset
The AA offset should be substracted, not added. I think this was
introduced when I refactored the code in a code review.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6186
2019-11-06 19:25:42 +01:00
265295e6a6 Fix Voxel Remesher preserve volume artifacts
Should Fix T70326

This implements the shrinkwrap options suggested in D5933. I did a few
test and it seems much more stable than the previous options.

Reviewed By: jbakker

Maniphest Tasks: T70326

Differential Revision: https://developer.blender.org/D6176
2019-11-06 19:21:43 +01:00
9b944e530e Clay Strips: Set default normal radius to 1.55
The previous default was 1.7, so the brush was more stable on surface
normal changes, but softer. I don't think users expect this brush to be
that stable, so by using 1.55 we make the brush a little bit stronger on
curved surfaces by default.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6187
2019-11-06 19:14:04 +01:00
64cd9a079b Fix T70952: EXR files bigger than 2GB don't open on Windows 2019-11-06 17:16:46 +01:00
65b414cfb2 Fix T71319, T71015: crash in edit mode with out of range material assignments 2019-11-06 16:08:10 +01:00
Charlie Jolly
3a65ea3b2d Fix: Forward compatibility issue in shader nodes
Raised in https://developer.blender.org/rBe5618725fd1e

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6102
2019-11-06 14:20:00 +00:00
e71963a37e Buildbot: Ensure proper ABI is used
This wasn't an issue in the real buildbot environment since the
precompiled libraries are compiled with same ABI as the compiler
used for Blender build. But it was causing issues when building
Blender using buildbot scripts (for troubleshooting purposes)
on a machine with different default compiler ABI.

Usually ABI detection is happening in platform_unix.cmake when
detecting whether there are any precompiled libraries folder
available. This detection is not happening when library folder
is provided explicitly, expecting ABI to be setup explicitly
as well.
2019-11-06 13:50:43 +01:00
863ca3dd76 Cleanup: remove unused game engine variable 2019-11-06 13:06:04 +11:00
7168dfd005 Cleanup: remove EditNurb from DNA 2019-11-06 12:46:25 +11:00
9d1031b011 Fixed delaunay check, was causing 'desperation' messages.
Check was losing precision -- adjust by translating points
before calculating circumcircle.
Also, needed to check for flippability of edges before flipping.
2019-11-05 13:23:20 -05:00
9ea661f47a Alembic import: fix incorrect 'topology changed' error
When importing subdivision surfaces a 'Topology Changed' error was shown
even though the topology didn't change at all. The code was comparing to
`totpoly` where `totloop` should have been used.
2019-11-05 17:44:37 +01:00
Ha Hyung-jin
9a9e93e804 Fix T71071: errors when using multiple CUDA/Optix GPUs and host mapped memory
The multi device code did not correctly handle cases where some GPUs store a
resource in device memory and others store it in host mapped memory.

Differential Revision: https://developer.blender.org/D6126
2019-11-05 16:40:55 +01:00
1b46b7c42f Fix build errors in GHOST SDL 2019-11-05 15:38:03 +01:00
8c2672db0d Fix T71093: fluid settings not visible for workbench engine 2019-11-05 15:38:02 +01:00
909de57afb Fix compositor Denoise node showing Normal value buttons
Any values typed in here manually would not be used, it needs an image.
2019-11-05 15:38:02 +01:00
Jim Eckerlein
b85e93b24e Fix bug in Draco encoding for glTF, files are now smaller
Data was not quantified properly. It also lets the library choose the suitable
encoding method rather than forcing it to use the edgebreaker method.

Differential Revision: https://developer.blender.org/D6183
2019-11-05 15:38:02 +01:00
a1747b058d Fix T71259: Array Modifier Performance is slow
Was happening when object transform is animated.

Caused by overly aggressive dependency construction introduced a
while back in 9d4129eee6: we shouldn't add dependencies unless
we really need them.

This change removes unneeded transform dependency for cap objects
(since only their geometry is used), and also removes own transform
dependency if there is no offset object (which is the only case when
own transform is needed).

Differential Revision: https://developer.blender.org/D6184
2019-11-05 14:48:44 +01:00
8dfe2801ac Fix T71356: Motion Paths no longer update 2019-11-05 14:31:24 +01:00
63b9f8394f Motionpath: Fix memory leak on early output
This is a part of T71356.
2019-11-05 14:23:01 +01:00
7a93abb264 Fix Cycles failing to compile when "WITH_CYCLES_LOGGING" is off 2019-11-05 14:19:33 +01:00
bb69e62710 Fix T68396: Unable to change any Collision input value after it has been keyframed
'rna_CollisionSettings_update' has a history of tagging ob for update:
rB79312c1912b4 ID_RECALC_TRANSFORM |ID_RECALC_GEOMETRY |
ID_RECALC_ANIMATION
rBf90a2123eedc OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME
rBfaf1c9a4bb27 OB_RECALC_ALL
rB7df35db1b136 OB_RECALC

Since the meaning of OB_RECALC_TIME/ID_RECALC_ANIMATION changed a bit
historically (from "please update my animation if the animation
datablock is tagged for update" to "update animation of this datablock")
this was now always overwriting user edit with animated values, making
it impossible to change those values once animated.

Thx @sergey for guidance!

Maniphest Tasks: T68396

Differential Revision: https://developer.blender.org/D6113
2019-11-05 09:57:43 +01:00
bfa761d046 Cleanup: remove redundant pivot popover 2019-11-05 17:47:35 +11:00
490d5bb750 Fix T68130: Over sensitive number button dragging
When continuous grab, cursor motion was mapped to the min/max.
This caused problems when int/float max values were used.

Now the range is clamped by a value derived from the click-step
so dragging numbers never increases it to an impractically large value.
2019-11-05 14:10:53 +11:00
95a60fe84d Fix errors in fix for T68018 2019-11-05 09:14:47 +11:00
b45828ebe9 Fix T71123: OptiX error in Cycles viewport when adding HDRI
Cycles did not update the "is_enabled" flag on lights when they were synchronized again, which caused all lights disabled by "LightManager::disable_ineffective_light" to be disabled indefinitely. As a result the OptiX kernels were not reloaded with correct features when a change to a light was made. This fixes that by updating the "is_enabled" flag during synchronization.

Differential Revision: https://developer.blender.org/D6141
2019-11-04 18:09:56 +01:00
8ab6ef30ab Fix T68018: Crash on building movie proxy
Skip building proxy if directory can not be created.

Crash happens, when setting custom dir to location of source file itself.
This results in attempt to create directory with the same name as source file.

Differential Revision: https://developer.blender.org/D6148
Reviewed By: sergey
2019-11-02 20:57:11 -07:00
93f93e6b45 Fix T71284: batch rename escape's dashes 2019-11-03 11:28:49 +11:00
07968604ab GPencil: Some NULL checks missing in previous T71260 fix 2019-11-02 11:50:44 +01:00
1c8d76772a GPencil: Fix unreported visual problem for short strokes
When the stroke has less than 3 points, but only the fill material is enabled, the stroke is invisible and makes the shaders to remove any fill because the shader start and end pointers are not correct.

Now, if the stroke has only fill, but it is not fillable, it is drawn with the stroke color to avoid the errors and these ghost strokes.
2019-11-02 11:13:44 +01:00
782f36d6a8 Fix T71260: GPencil crash when drawing very long lines
There were two problems:

1) When the buffer was reallocate, the pointer was corrupted.
2) Short variables were too small to hold long lines.
2019-11-02 10:28:37 +01:00
018b754fb6 GPencil: Show selection in Stroke mode for single points 2019-11-02 10:28:37 +01:00
effe047318 Cleanup: rename undo tile x/y members
Avoid mixing up pixel/tile location.
2019-11-02 12:29:46 +11:00
5b18997543 T71094: anchored & drag-dot brushes paint continuously
Error from 151cc02b6f
2019-11-02 12:22:51 +11:00
4fec2b0660 Fix T48034: Camera image offsets were scaled by image aspect
Offset now matches Blender 2.7x.
2019-11-02 09:07:44 +11:00
0dd9e55d21 Fix T71247: Outliner pose toggle looses bone selection
The outliner didn't account for weight-paint + pose-mode,
making it consider all pose bones unselected.
When syncing selection, bones were unselected.

This adds a context argument to passed to drawing functions since
finding the weight-paint pose-object in the drawing loop isn't efficient.
2019-11-02 04:32:50 +11:00
5840c17970 Fix T70725: Frame Symmetry Stroke
Frame Selected centers around the last valid stroke.
When Symmetry is enabled the last mirrored `location` was added to the
`average_stroke_accum` in stead of the original stroke location.

This patch will add the `true_location` to the `average_stroke_accum`.
This contains the original stroke location.

Issue happened in Vertex and Weight paint.

Reviewed By:
	Pablo Dobarro

Differential Revision: https://developer.blender.org/D6161
2019-11-01 15:10:44 +01:00
1121e1f1a6 Fix T71251: Move Strokes to Layer slider gets wonky
This parameter must be hidden.
2019-11-01 14:30:55 +01:00
c1f8268734 Fix T60607: Spin tool duplicates after Spin Duplicate 2019-11-01 11:24:36 +11:00
61bf51acb5 Cleanup: pep8 for examples 2019-11-01 10:53:47 +11:00
78ad368d12 Fix inability to toggle pose-mode without sync-selection
- There was no way to select some kinds of data without activating them.
- Pose mode could not be activated at all.

No change to behavior with sync-selection enabled.
2019-11-01 06:29:48 +11:00
8c6c46469c Fix T71172: Cycles preferences.get_devices() not refreshing Optix devices 2019-10-31 15:54:44 +01:00
6df0bfad67 Fix oso extension detection in the text editor 2019-11-01 01:48:35 +11:00
0bd51f4fc0 Fix T70687: Deleting sculpting mask extraction causes crash
Reviewed By: jbakker

Maniphest Tasks: T70687

Differential Revision: https://developer.blender.org/D6042
2019-10-31 14:51:42 +01:00
cd827194f7 Paint: Option to disable antialiasing
You may want to disable antialiasing if you are working with pixel art
or low resolution textures. It is enabled by default.

Reviewed By: jbakker, campbellbarton

Differential Revision: https://developer.blender.org/D6044
2019-10-31 14:45:26 +01:00
be2bdaf6aa Fix EEVEE sculpt mask rendering
Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6080
2019-10-31 14:39:41 +01:00
90fd75c869 Fix T70866: Missing PBVH updates after mask undo
With the latest changes, the PBVH needs extra flags each time the mask is
modified to keep the internal fully_masked and fully_unmasked node flags
updated.

Reviewed By: jbakker

Maniphest Tasks: T70866

Differential Revision: https://developer.blender.org/D6088
2019-10-31 14:34:41 +01:00
c6180c2249 Fix T71053: Poly Build tool crashes blender when deleting wire vertices
Dissolve the vertex when it is wire instead of trying to collapse the
edge. When collapsing the edge, ##v_kill->e## was not NULL, so the
assert in ##bmesh_kernel_join_vert_kill_edge## fails.

Reviewed By: jbakker

Maniphest Tasks: T71053

Differential Revision: https://developer.blender.org/D6159
2019-10-31 14:32:09 +01:00
ed079850cb GPencil: Fix unreported missing stroke color for 1st popover material 2019-10-30 22:42:16 +01:00
d9bce6bcf5 Fix image paint showing project-paint settings
Also make projpaint a keyword-only argument to avoid copy-paste errors
like this re-occurring in the future.
2019-10-31 03:16:48 +11:00
5043003584 GNUmakefile: avoid using group/owner for source_archive
Thanks to @JRottm for pointing out this issue.
2019-10-31 00:51:15 +11:00
60d0446db3 GNUmakefile: use tar.xz instead of tar.gz
Also rename "make tgz" to "make source_archive" as it wasn't clear
this only archived the source, not binaries.

D6153 by @JRottm with minor edits
2019-10-31 00:19:05 +11:00
068c6a6f15 Fix T71182: Object Parenting - 'Without Inverse' option missing in menu
Maniphest Tasks: T71182

Differential Revision: https://developer.blender.org/D6150
2019-10-30 14:14:18 +01:00
ff7be96322 Toggle 'PLAY' <> 'PAUSE' icons for pausing preview rendering
mentioned in T70974

Maniphest Tasks: T70974

Differential Revision: https://developer.blender.org/D6119
2019-10-30 10:09:51 +01:00
d45c7c997f Fix T71026: Outliner - Show Hierarchy (Home Hotkey) Not Working Correctly
In 2.8, code would not enter the new 'Objects' and Collections'
'folders'.

Maniphest Tasks: T71026

Differential Revision: https://developer.blender.org/D6123
2019-10-30 09:44:00 +01:00
aff6446e06 UI: remove text alignment icons for sequencer text
This implied paragraph alignment, when the alignment defines
the origin of the text relative to the X,Y coordinates.

Resolves T71082
2019-10-30 07:49:22 +11:00
7ae187c5d4 UI: make color strip 'Only Boost' readable in glow panel
D6115 by @tintwotin
2019-10-30 06:13:32 +11:00
cff00f6b04 Cleanup: pep8, remove redundant parenthesis 2019-10-30 05:50:17 +11:00
10b83a94d9 Cleanup: use "use_" prefix for booleans 2019-10-30 05:50:17 +11:00
8e6882a70d Fix T69468 EEVEE: Collections Holdout Button in Outliner Is Ignored
Not the cleanest implementation but the simplest.

This doubles the number of default shader variations.
2019-10-29 19:44:02 +01:00
1907081f0e Sequencer: add missing Show Seconds in View Menu
D6106 by @tintwotin
2019-10-30 05:18:04 +11:00
f20cd49c30 Fix bones without parents missing head vertex
When the connected was enabled for a parentless bone the head vertex
wasn't displayed and couldn't be selected.
2019-10-30 03:37:50 +11:00
87ac3d14b2 Fix T70905: Image Editor header hides mask, cache and keyframe info if
flipped to bottom

While flipping the header to bottom works in the MCE (because MCE doesnt
allow overlapping UI) we need to take the regions visible rect into
account for the Image Editor.

Also correct clickable scubbing area (poll for frame_change) in the
Image Editor and the MovieClip Editor not taking UI_DPI_FAC into
account.

Maniphest Tasks: T70905

Differential Revision: https://developer.blender.org/D6090
2019-10-29 16:51:55 +01:00
aa841e2bd5 Fix T62116: Delete ruler ignored on edit-mode toggle
D6129 by @smramsay
2019-10-30 02:10:32 +11:00
f17aac33a1 Fix strict compiler warning
Implicit function declaration caused by missing include
in the recent fix.
2019-10-29 15:37:19 +01:00
d0d57f1712 Fix T70091 EEVEE: volumetric broken, not refresh
Thanks @mano-wii for finding the fix.
2019-10-29 15:16:47 +01:00
883e22a92c Fix T71050 EEVEE: Light Path Node broken in 2.81
Also fixes the sampling of hashed shadows.
2019-10-29 15:16:47 +01:00
d758a79557 Fix T71062 EEVEE: Holdout shader is broken in 2.81 2019-10-29 15:16:47 +01:00
9efe12d77a Fix T71171: Problems removing texture packing (without writing anything)
using image.unpack() or bpy.ops.image.unpack()

If we offer this in the UI, also expose this to .unpack

Maniphest Tasks: T71171

Differential Revision: https://developer.blender.org/D6152
2019-10-29 14:30:22 +01:00
8a5f3d38af Fix T71124: UV Editor – Proportional Editing Falloff misses some Options
This mimics the same solution for proportional edit in the 3D View.

Maniphest Tasks: T71124

Differential Revision: https://developer.blender.org/D6142
2019-10-29 10:28:41 -03:00
9389ad3736 Fix Proxy folder not getting deleted
D6145 by @Eitan
2019-10-30 00:14:08 +11:00
4fbcbbfb96 Fix T71126: add old hotkeys to set start/end frame in the timeline to
Blender 27X keymap

Maniphest Tasks: T71126

Differential Revision: https://developer.blender.org/D6151
2019-10-29 14:03:03 +01:00
bcac0ed977 Fix T70913: OpenCL Compiler Errors
Reverting part of a clean up that was done 6 months ago. The
consequence was that OpenCL compositing wasn't working since
then.
2019-10-29 09:40:29 +01:00
7cc489a2c8 Error in last commit 2019-10-29 19:29:38 +11:00
7d7bd02ea7 Cleanup: quiet TBB deprecation warning 2019-10-29 19:25:08 +11:00
Julian Eisel
7c1fbe24ca Fix T71019: Disappearing file thumbnails & crash on area split
When opening the file browser as regular editor, the ID filter flags
as stored in FileSelectParams were not set explicitly, so they were 0.
Since 9100982e80, the value actually passed to the filtering could
differ from that, causing the file list cache to be constantly updated
on every redraw.

Caused by 9100982e80.

Note that this "accidentially" got fixed in master with b546263642,
which is why the issue only showed up in the release branch from that
point.
2019-10-28 19:34:41 +01:00
43a8fdb6ad UI: add icon for drawing space key
Drawing was already added, only the icon was missing.
2019-10-29 04:50:04 +11:00
c050247edc CMake: update cmake_consistency_check
Support for listing files which are known not to exist
(needed by standalone cycles).
2019-10-29 03:46:50 +11:00
312075e688 CMake: add missing headers, use space before comments 2019-10-29 01:33:44 +11:00
Julian Eisel
74c9a4769e Fix: Some ID-Filters not enabled on Link/Append
Caused by 9100982e80.
2019-10-28 15:19:26 +01:00
f5ebe8395d Cleanup: correct argument type mismatch
Add transform_snap.h header which includes DNA enum.
2019-10-29 00:45:05 +11:00
ce0db668ec Fix T50148: Header: Wrong rounding when moving frames
Deduplicate the code and use the same logic used to
calculate individual elements in `t->values_final[0]`.

Differential revision: https://developer.blender.org/D6135
2019-10-28 09:51:53 -03:00
a83bbefec6 Cleanup: use doxy sections for transform_snap 2019-10-28 09:32:59 -03:00
88911e4664 Keymap: use Ctrl-F2 for batch rename
Alt-F2 conflicted for Gnome on Linux,
change the keymap since it doesn't conflict on macOS or Windows.

Resolves T70480
2019-10-28 21:38:56 +11:00
a2bfd28d5e Fix T71150: GPencil: Wrong Naming of Convert GP object to Meshes
The problem was the real menu text must be: `Convert to Polygon Curve` as is Object menu.

A GPencil object cannot be converted to mesh in one step. The conversion must be GPencil to Curve and Curve to Mesh.
2019-10-28 11:03:53 +01:00
9f388c1646 Fix T71037: batch rename bones in pose mode throws exceptions
Maniphest Tasks: T71037

Differential Revision: https://developer.blender.org/D6122
2019-10-28 10:27:06 +01:00
9b6aa740be Cleanup: remove redundant NULL checks 2019-10-28 00:40:51 +11:00
f1824e6ec4 Cleanup: Fix tooltip text 2019-10-27 10:05:08 +01:00
7137d89daa Preferences: remove keymap items created with invalid data path
Before T65397 was fixed, invalid "(null)" data paths were being created.

Remove these keymap items from preferences.
2019-10-25 21:47:16 +11:00
892c3891ed UI: partial revert of renaming Normal -> Regular
These instances refer to winding/direction.
2019-10-25 06:00:46 +11:00
ad3f9c6dfe Fix crash drawing the paint cursor over the redo region
Also fix CTX_wm_region_view3d which didn't check the region type.
2019-10-25 01:25:23 +11:00
ce6e7a0941 Fix T60689: Flip Active/Selected bone fails in weight paint mode
Multiple selection operations failed with weight-paint + pose mode.

Weight-paint + pose mode is a special case that doesn't support
multi-pose mode, so we need to use this instead of the generic
function.
2019-10-25 00:49:39 +11:00
88a346420b Fix T71063: GPencil - Numpad return key cannot be used to confirm primitive 2019-10-24 13:48:16 +02:00
5fa7d8643f Cleanup: comment unused duplicate flags 2019-10-24 19:36:23 +11:00
bf3c382c47 Cleanup: comments, formatting 2019-10-24 18:15:08 +11:00
1afdea624c Transform: reverse absolute, ratio vertical motion
This only impacts push-pull & shrink-fatten.

Flipping this matches zoom where moving the mouse cursor up
increases the zoom-level.

Previous behavior felt unnatural when adding gizmos to these tools.
2019-10-24 17:56:40 +11:00
9be3ef6c72 Fix T71036: Separate loose parts crashes in object mode
Error in own recent optimization.
2019-10-24 15:29:09 +11:00
b9dd87f0cb Doxygen: update configuration
Quiet warnings when generating docs.
2019-10-23 15:02:52 +11:00
4dc443908c CMake: disable OpenMP on macOS bpy_module config
This gives linking errors on build.
2019-10-23 14:50:42 +11:00
Richard Antalik
15d27c1ae5 Fix T70845: Crash when switching scene of scene strip.
Crash on assert in `sound_verify_evaluated_id()`

Reviewed By: sergey

Maniphest Tasks: T70845

Differential Revision: https://developer.blender.org/D6104
2019-10-22 17:34:14 -07:00
ac18c3c28d Cleanup: unused variables, enums, spelling 2019-10-23 02:34:30 +11:00
f8e8f4ee0f GPencil: Calculate inverse matrix only once
Instead to do it for each action, do it only in init.
2019-10-22 11:23:40 +02:00
bfa9ead12a Cleanup: quiet unknown escape warnings
Auto-complete showed errors.
2019-10-22 17:38:55 +11:00
b5f77973a7 Cleanup: remove BLI_dynstr use in py_capi_utils
Needed for standalone mathutils module.
2019-10-22 17:38:48 +11:00
6f779218fb BLI_math: support MATH_STANDALONE without Eigen 2019-10-22 15:22:45 +11:00
388c954cb5 Fix T70888: GPencil Sculpt tools don't work properly in a particular situation
Thanks to @charlie for his help fixing this bug.
2019-10-21 20:07:09 +02:00
d0cba5caf4 Fix T70937: Cycles fails in viewport when rendering with OptiX
Was caused by D6068, which did not handle "MEM_PIXELS" memory
when not in background mode. Before that it always fell back to using
generic device memory, so restoring that behavior. In future this
should be changes to use OpenGL interop for optimal performance.
2019-10-21 14:23:45 +02:00
6a1118092a Fix invalid property shortcuts being created
When there was no way to find the data-path from context
the shortcut was still being created.
It would evaluate to "context.(null)".

Now adding shortcuts will be disabled if the path can't be computed.
2019-10-21 19:57:43 +11:00
34c835cbd1 Fix project from view crash before the GPU is initialized 2019-10-21 19:19:04 +11:00
41ec25d27b Cleanup: style 2019-10-21 15:05:56 +11:00
3ceff8b7bc CMake: fix building as a Python module on macOS
Caused by c553b790fc
2019-10-21 14:48:17 +11:00
71538eaad6 Fix T70864: Separate loose parts runs indefinitely
Large objects with many separate pieces became unstably slow
(run for hours and not finish).

The entire original mesh was being duplicated twice per loose part.

In own tests, millions of vertices and thousands of loose parts
now run in around 5-15 seconds.
2019-10-21 02:47:07 +11:00
98ab0f173c Mesh: add API functions for poly & loop removal
These existed for verts & edges, add for API completeness.
Also add ED_mesh_geometry_clear,
needed to reduce memory for edit-mesh separate.
2019-10-20 18:25:17 +11:00
047c66279a Cleanup: missing declaration warnings 2019-10-20 16:42:49 +11:00
970d7ed860 Fix T70790: Crash in sculpt mode switching from two meshes after reload saved file
This fixes the crash, but it does not fix the core issue. The PBVH should
always be available when an object is in sculpt mode and tools should
not need to check for that.

Reviewed By: jbakker

Maniphest Tasks: T70790

Differential Revision: https://developer.blender.org/D6063
2019-10-18 16:41:41 +02:00
082fb6603d Fix T70839: Sculpt brushes stop affecting after using move, rotate or scale tools
Reviewed By: jbakker

Maniphest Tasks: T70839

Differential Revision: https://developer.blender.org/D6071
2019-10-18 16:24:50 +02:00
6183688c35 Fix T70919: Proxies crash after building motion path
Was cause by recent fix for T65134 which assigned original object's
proxy_from to an evaluated pointer.

This is because motion path depsgraph does not include proxies, so
the pointer in an evaluated object was kept pointing to an original
object.
2019-10-18 16:06:23 +02:00
725b59d9b4 Fix T70903: Opening splash screen from named app_template crashes
Caused by rB46102cf4e0c4 [which removed the check if the image can
actually be loaded].

Maniphest Tasks: T70903

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D6089
2019-10-18 13:29:54 +02:00
8378db40c7 Cycles: Fix out of memory when rendering some scenes with OptiX that work with CUDA
The OptiX implementation wasn't trying to allocate memory on the host if device allocation failed, while the CUDA implementation did. This copies the implementation over to OptiX to remedy that.

Differential Revision: https://developer.blender.org/D6068
2019-10-18 12:23:27 +02:00
16665ad753 Cleanup: remove unused viewport fx_settings 2019-10-18 19:10:25 +11:00
acd98599ff Fix T65397: Assigning shortcut to editor properties gives errors 2019-10-18 18:50:18 +11:00
382e7ce9ec Fix T70678 Workbench: Smoke Sim display has incorrect offset
Fix the ray direction computation.
2019-10-17 17:40:30 +02:00
4142f3993c Fix T70811 EEVEE: Alpha clip/hashed cause wrong alpha values
Was caused by division not giving a fully opaque alpha value.
2019-10-17 17:40:30 +02:00
ade2129f14 Fix T70901: Pose bone with Armature Constraint moves in wrong direction
A regression since previous fix for proxy. Restore old code for copying
values to an original pose channel.
2019-10-17 16:20:14 +02:00
9054b83402 Cleanup depsgraph access in particle_edit.c
'PE_set_data' / 'PE_set_view3d_data' would give us a depsgraph already,
so use it.

Also fix access to PEData->depsgraph without calling 'PE_set_data' prior.

Addresses concern raised in rBcf2c09002fae.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D6067
2019-10-17 13:17:05 +02:00
78f8270ad3 Volumetric: Debug Voxel Size and Location
When displaying the voxel size for an adaptive domain the resolution of the adaptive domain was used to calculate the world size of the voxel.
This patch changes this to use the initial size of the domain.

When using adaptive domain the overlay was not rendered in the right
place.

Thanks to sebbas for part of the patch!

Reviewed By: sebbas, fclem

Differential Revision: https://developer.blender.org/D6076
2019-10-17 12:19:30 +02:00
f45127c6cb Fix T70740: Clicking on proxy bone makes original one jump to initial location
Caused by what appears to be a missing flush from evaluated bone back to
original, which then makes it so copy-on-write operation happening after
click (to synchronize selection flags) pushes original bone to its initial
position.

Differential Revision: https://developer.blender.org/D6051
2019-10-17 11:59:48 +02:00
5115759fdd Cleanup: Fix naming of a function 2019-10-17 11:51:02 +02:00
d89b65cc91 Node shader wrapper: use 'Non-Color' profile for BW textures inputs.
All the single-value texture inputs of Principled BSDF node should use
non-color colorspace profile, not sRGB one (issue raised in
https://blender.stackexchange.com/questions/155617, thanks).

That also revealed another issue - since those color space settings are
stored at the image level itself, not the node one, we need to
duplicate those image data-blocks when we use same picture for e.g. base
color (sRGB) and specular (non-color) inputs...

For now using a basic mechanism for that, might generate several extra,
uneeded copies of the image ID, but that’s better than breaking custom
settings and such.

Note that while this will modify the behavior of the impporters using
that node wrapper, no change should be needed in IO add-ons themselves.
2019-10-17 11:43:11 +02:00
dffe702d78 Fix T69182: Auto-Smooth does not work on Alembic meshes without normals
The auto-smoothing flag can now be used by artists when the Alembic file
does not contain custom loop normals.

- Auto-smoothing disabled: mesh is flat-shaded.
- Auto-smoothing enabled: works as usual; set angle to 180° to ensure
  a 100% smoothed mesh.
2019-10-17 11:26:33 +02:00
2afbd14c59 Fix T70887: GPencil edit lines are not displayed in the right place
The lines were not using the matrix to calc the tarnsformation.
2019-10-17 11:15:22 +02:00
74db523a52 Fix T70739: Make Library Override doesn't re-target Armature constraints.
Missing one step (collection prop itself) in RNA hierarchy of properties
leading to those armature object pointers...
2019-10-17 10:21:52 +02:00
85ddaaa16e Fix invalid flag check
Cast occurs first, making any flag enable this option.
2019-10-17 12:34:20 +11:00
3a51b27734 Cleanup: shadow warning 2019-10-17 12:28:35 +11:00
812b30daf5 GPencil: Fix unreported performance issue with relative onion mode
When the relative mode was used, the calculation of the total number of vertices was not done and it was using the total number of vertices in the datablock. This worked for small files, but with complex files the time to allocate all the data was too long and the performance was very bad.

Now, for relative mode the real number of vertex is calculated.

Also fixed the same problem when onion and multiedit is enabled.
2019-10-16 21:56:25 +02:00
7e78fbf2de Fix assert and memleak in recent Skin Root Display patch
Caused by 4ddf3215a7
2019-10-16 20:16:53 +02:00
131ac2ec82 Fix T70249 EEVEE: Light bleeding on SSS translucency
This was caused by 2 things: Shadow map bias and aliasing.

It made the expected depth of the shadowmap further than the surface
itself in some cases. In normal time this leads to light leaking on normal
shadow mapping but here we need to always have the shadowmap depth above
the shading point.

To fix this, we use a 5 tap inflate filter using the minimum depth of all
5 samples. Using these 5 taps, we can deduce entrance surface derivatives
and there orientation towards the light ray. We use these derivatives to
bias the depth to avoid wrong depth at depth discontinuity in the shadowmap.

This bias can lead to some shadowleaks that are less distracting than the
lightleaks it fixes.

We also add a small bias to counteract the shadowmap depth precision.
2019-10-16 18:58:20 +02:00
4ddf3215a7 Fix T68380 Skin modifier root not displayed 2019-10-16 18:58:12 +02:00
8956666899 Fix T70543 Rigid Body Collision Shape Not Displayed In Viewport 2019-10-16 18:58:05 +02:00
Dalai Felinto
3ff25fa80a Fix multi-object edit mode and local view/collections
Before this patch you could go to a local view with a single object,
while you had other objects also in edit mode, and your operators would
affect all objects even the ones outside your local view (same for local
collection).

Differential Revision: https://developer.blender.org/D6064
2019-10-16 12:31:27 -03:00
Jeroen Bakker
b0476f0631 Workbench: Background Dithering
Background dithering was introduced to solve banding issues on gradient backgrounds.
This patch will enable dithering based on the texture that is used for drawing.
Only when using a GPU_RGBA8 texture the dithering will be enabled.

This disables dithering for final rendering, vertex and texture paint modes.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6056
2019-10-16 15:40:25 +02:00
80f0bc99a9 Fix T70850: Scene.frame_set doesn't update camera from markers 2019-10-16 19:10:28 +11:00
0dcc5572d6 Fix (unreported) VSE scene strip should not be able to set the scene to
self

Spotted while looking into T70845

Reviewers: sergey, ISS, campbellbarton

Differential Revision: https://developer.blender.org/D6073
2019-10-16 09:38:48 +02:00
9dd5e3b6e8 Cleanup: define PY_SSIZE_T_CLEAN for Python
Silence deprecation warnings running with Python 3.8.
2019-10-16 15:58:32 +11:00
36b6fb5cd6 Cleanup: warnings building with Python 3.8 2019-10-16 14:44:36 +11:00
01e2786bdd Fix incorrect limit check in button drawing
Regression in d617466d87
2019-10-16 14:13:34 +11:00
1094c3f276 RNA: region_to_view took int's instead of floats
Internally the function uses float's, RNA exposed args as int's.

Python3.8 warns about int/float conversion in toolbar drawing code.
2019-10-16 14:07:37 +11:00
a7cf7b114f Fix for building with Python 3.8 2019-10-16 13:39:29 +11:00
cfb6ffd48f Fix T70386: Crash when snapping to edges in specific situations
The callbacks get elements through indexes,
so make sure they're not "dirty".
2019-10-15 14:59:30 -03:00
2a9b162d94 Fix T70605: incorrect darken and lighten rgb mix mode
Differential Revision: https://developer.blender.org/D6058

Reviewers: brecht, fclem
2019-10-15 17:31:44 +02:00
c2a7e79047 Fix T70771: Texture nodes in Compositor causes infinite update 2019-10-15 17:07:53 +02:00
Dalai Felinto
cb4fa01fcf Fix GPL block in CMake file
(using this to test the new server-side git hook)
2019-10-15 10:54:13 -03:00
Dalai Felinto
7df7a8f3f1 Fix T70838: crash on cycles render after recent fix
My bad for not figuring out how to run our unittests since I got back to
Windows.
2019-10-15 10:18:11 -03:00
Julian Eisel
4d3a317258 Fix T70815: Missing tool settings redraw when using Annotate Tool 2019-10-15 14:56:50 +02:00
871845b979 Fix T70433: No shortcut in tooltip for viewport X-Ray
While not a bug exactly, it's useful to show the shortcut,
expose the operator in the UI instead of the property.
2019-10-15 20:27:04 +11:00
391b652be4 Cleanup: clang format for rBb77da65e8c4d 2019-10-15 11:16:55 +02:00
d54ccb90ab Fix T70667: crash playing animation (after deleting rigid body obj)
Was crashing due to RBW mssing shared->physics_world [which can happen
when undoing the deletion of the last object in the world].
This can be gained back by BKE_rigidbody_validate_sim_world.

Reviewed By: mont29

Maniphest Tasks: T70667

Differential Revision: https://developer.blender.org/D6037
2019-10-15 10:57:59 +02:00
171a47421d Fix T70590: Python Gizmo API misses opacity & anti-aliasing
Thanks to @mano-wii for finding root cause.
2019-10-15 19:24:40 +11:00
b77da65e8c Fix T68700: Incorrect 'absolute' timing of animated masks in the Video
Sequence Editor

Code in 'seq_render_mask' will effectively do
BKE_mask_evaluate(mask_temp, mask->sfra + (cfra - fra_offset), true)
where 'fra_offset' is zero for absolute and seq->start for relative.

If we really want the scene's current frame (as advertised) if Mask Time
is set to Absolute (effectively ignoring the Mask Settings start/end) we
need to change the fra_offset from zero to mask->sfra.

Also BKE_animsys_evaluate_animdata should take mask->sfra into account
as well (otherwise mask animation [points] and other animation [e.g.
opacity] will run out of sync)

Reviewers: campbellbarton, ISS

Maniphest Tasks: T68700

Differential Revision: https://developer.blender.org/D5495
2019-10-15 10:06:14 +02:00
fa76f08db5 Fix T70560: Large cones are created with double vertices (even though
the radius is zero)

Merge threshold for remove_doubles was hardcoded, now scaled by depth.

Reviewed By: campbellbarton

Maniphest Tasks: T70560

Differential Revision: https://developer.blender.org/D6001
2019-10-15 09:46:59 +02:00
7fb12536b7 UI: increase precision for fps-base value
The default precision displayed 1.001 as 1.00,
leading to confusing final FPS values.

Fixes T70827
2019-10-15 18:25:49 +11:00
0500dcd711 Fix scan-fill normal flipping for displist & mask filling
Missed from fix for T70594 which reversed the normals,
Resolves T70809
2019-10-15 17:23:23 +11:00
4fcdcbe38d Cleanup: pep8 for templates 2019-10-15 15:20:15 +11:00
46102cf4e0 Fix T70812: AppTemplate Splash image is not loading
Allow different splash heights, without this changes the the
default splash would stop app templates splash screen from loading.

This also allows the default splash height to change without
manually editing the layout.
2019-10-15 14:19:25 +11:00
Dalai Felinto
abd7ad01b8 Cleanup: Fix warnings 2019-10-14 22:45:34 -03:00
Dalai Felinto
dc5fa12bd3 Cleanup: Use BKE_object_is_visible elsewhere 2019-10-14 22:45:33 -03:00
Dalai Felinto
280d6b03a7 Fix T70670: Hidden collections are still rendered by Cycles in the Viewport
Now local collections are fully working with cycles preview, while the
collection visibility bug is fixed.

Local collections were not working with cycles viewport even before the recent
commit to allow users to show collections that are hidden in the view layer.

It just got worse with said commit (0812949bbc).

Differential Revision: https://developer.blender.org/D6034
2019-10-14 22:45:33 -03:00
Dalai Felinto
af5cc8cbd4 Fix T69644 / T68586: objects flag unsynced when drag hidden collections
That would lead to crashes and other issues. The solution is not elegant
though, it involves resyncing all the collections again.

Differential Revision: https://developer.blender.org/D6043
2019-10-14 22:45:33 -03:00
Dalai Felinto
9100982e80 Fix Filebrowser Blender ID filter
When the filtering option was disable we should see all the datablock types.

Differential Revision: https://developer.blender.org/D6033
2019-10-14 22:45:33 -03:00
a9fbd05e7d Fix image undo restoring float/byte tiles into the wrong buffer type
This also resolves the (unlikely) issue of undo having uninitialized
zbuf data, now it's cleared instead.
2019-10-15 12:24:26 +11:00
100af18955 Docs: clarify writefile.c format text 2019-10-15 12:02:40 +11:00
695cbf5eef Fix incorrect brush falloff flag use
Harmless currently since they're the same value,
would fail if other options were added.
2019-10-15 10:04:34 +11:00
879d269e87 Py API doc generator: more tweaks to adapt to new release process.
Now we also create a 'version' symlink for master.
2019-10-14 18:46:50 +02:00
5ba41bea8a Fix autokeyframe not working on bones mirrored bones
The previous code for this didn't work as the MIRROR bone flag would be
cleared before the autokeyframe code was run.
2019-10-14 18:16:21 +02:00
15539f7b6d Py API doc generator: tweak to handle new release process.
We need to handle beta stage in a specific way, since it's no longer
master, but not yet 'real' rc/release stage...

For now, only point to version dir of the API doc, but no need to create
any symlink (that way, 'current' remain pointing to 2.80 release, while
'2.81' is no longer a symlink to 'master', but its own actual doc).
2019-10-14 17:39:17 +02:00
6b6b27fd13 Update Py API link in help menu to point to version dir also in beta.
Now that we have beta and master in parallel, we cannot point to API doc
from master in beta builds of incoming release anymore.
2019-10-14 17:39:17 +02:00
841e969580 GPencil: Fix unreported duplicated brushes
The eraser and fill brushes were duplicated due a bug introduced by versioning code.
2019-10-14 15:53:39 +02:00
Julian Eisel
80fe0ac7ff Fix T70581: Node Wrangler output switching broken
When executing the node selection operator through Python, or in fact
any similar select operator with drag-all-selected support, the operator
was enabling modal execution, which should not be done in this case.
Reason was simply a wrong default for an internal property.
2019-10-14 12:11:13 +02:00
0fb55ff845 Fix T70787: Duplicating objects with custom property of type ID creates bogus links.
Note that the issue also affected animdata handling...

Checked all usages of the `BKE_libblock_copy_ex()` function, and
think never handling user count here is valid, although a bit risky
maybe. But other solution would be to add yet another copy flag, so
would rather go with that one for now.
2019-10-14 11:12:13 +02:00
e8220dea60 GPU: prevent assert for zero length arrays
This could happen with the build modifier.
2019-10-14 18:39:16 +11:00
95f020c853 macOS: add opus to FFMPEG_LIBRARIES 2019-10-12 18:33:34 +03:00
60d02b336e Build: also use release branch for source/tools module 2019-10-11 21:43:45 +02:00
3842519a38 Revert "Merge branch 'master' into blender-v2.81-release"
This reverts commit 20b2acf336, reversing
changes made to f185cc0ca5.

Merges should only go form the release branch to master. For backporting
commits, use cherry-pick.
2019-10-11 21:31:58 +02:00
20b2acf336 Merge branch 'master' into blender-v2.81-release 2019-10-11 16:12:11 -03:00
f185cc0ca5 Fix T70729: Multi-object edit UV not transform all meshes
Detail that went unnoticed in rBbfc9d426bb95
2019-10-11 16:11:57 -03:00
4e3f186a8c Fix T70729: Multi-object edit UV not transform all meshes
Detail that went unnoticed in rBbfc9d426bb95
2019-10-11 15:55:35 -03:00
4bb8a3c111 Merge branch 'blender-v2.81-release' 2019-10-11 18:55:26 +02:00
1c2a20c84d Fix T70714: Crash when using OBJECT_OT_material_slot_assign op without UI.
There is no guarantee we can get any valid UI from the context, and that
operator can work without it.
2019-10-11 18:54:43 +02:00
1e5e65fa9f Fix T70695: Scene crashes Blender on open.
Note that this commit fixes the crash itself, but actual issue is *how*
that situation could happen (having insert override operation with local
'source' overriding data-block with an empty bone constraints stack...).
2019-10-11 18:54:15 +02:00
Alessio Monti di Sopra
ecd86c0587 UI: Fix grid scale text not having shadows in the 3d view infos
This commit adds a shadow to the grid scale info text in the 3d View,
to make it more visible like the rest of that section.

{F7798605}

Differential Revision: https://developer.blender.org/D6025
2019-10-11 12:28:35 -03:00
c5ecfd526e Cleanup: Remove unused variable 2019-10-11 15:50:42 +02:00
46e9fc9362 Cleanup: Strict compiler warnings 2019-10-11 15:01:34 +02:00
533a7e25db Add Probot Stale configuration file
This is a configuration of Blender mirror on Github which automatically
closes Pull requests and gives developers instructions how to submit patch
to an official code review.

Differential Revision: https://developer.blender.org/D6027
2019-10-11 14:13:29 +02:00
b57a89f062 Buildbot: don't add branch prefix when building release branches 2019-10-11 13:46:24 +02:00
Antonio Vazquez
5adb3b6882 GPencil: New Eyedropper tool for Material creation.
This patch is only for the eyedropper to create materials.

Options:
Click: Create Stroke Material
Shift+Click: Create Fill Material.
Shift+Ctrl+Click: Create Stroke and Fill Material.

Toolbar:

{F7718606}

Reviewed By: brecht, mendio

Differential Revision: https://developer.blender.org/D5688
2019-10-11 13:33:13 +02:00
ec295c1168 Merge branch 'blender-v2.81-release' 2019-10-11 13:29:43 +02:00
7d3ea8f12b Fix T69964: GPencil: Fill options are not shown on a properties editor
Differential Revision: https://developer.blender.org/D6041
2019-10-11 12:26:57 +01:00
74f9b9d144 GPencil: Remove curve objects after converting to strokes (unreported)
This was detected fixing T69459

Part of Differential Revision: https://developer.blender.org/D6045

Note: done in a separated commit to keep track of changes done not directly related to bug reported in T69459.
2019-10-11 13:18:39 +02:00
15ffa3e7db Fix T69459: Convert Curve to Grease Pencil clears Transform
Also changed to create a grease pencil object for each curve.

Part of differential revision: https://developer.blender.org/D6045
2019-10-11 13:13:43 +02:00
2b35ee3ea2 Fix issue in "make update" checking out submodule branch on buildbot 2019-10-11 13:11:10 +02:00
3f97d62072 Version bump to 2.81 Beta 2019-10-11 12:25:26 +02:00
67b1a15b3f Version bump to 2.82 alpha, master is now open for new features and changes 2019-10-11 12:23:15 +02:00
41d9cf225d Fix "make update" not using the right branch for source/tools 2019-10-11 12:22:28 +02:00
4b570f5b57 Version bump to 2.81.15 2019-10-11 12:17:32 +02:00
057c180c67 Docs: 2.81 release description for Linux appdata 2019-10-11 12:13:26 +02:00
88ba97558f Depsgraph: Inform when update or tag happens during evaluation
It is not allowed to do tagging or updates while dependency graph is
in the middle of evaluation.

This is something what is simple to violate from python code. This
change adds some sanity checks.

The request to update view layer or dependency graph will raise an
exception in Python now, so it's easy for scripters to notice.

Tagging for update will do silent return unless running with debug
command line argument. This is because it's a bit tricky to know
which exact dependency graph corresponds to a context from which
an update tag was triggered.

Differential Revision: https://developer.blender.org/D6035
2019-10-11 10:42:45 +02:00
c9d6eb4fb4 Depsgraph: Cleanup, promote is_evaluating query
This way it might be used for sanity checks in RNA API as well.
2019-10-11 10:42:45 +02:00
f9b7f3e930 Depsgraph: Don't use push-from-thread when scheduling graph
This isn't guaranteed that graph is scheduled from main thread,
so it is actually a miracle how it all worked.
2019-10-11 10:42:45 +02:00
2251c6e046 Fix T70191: Text button in popup doesn't work
F2 rename didn't work with mouse input.
2019-10-11 19:36:51 +11:00
f9cc51788b Cleanup: remove unused variable 2019-10-11 01:31:28 +02:00
00b6f8ef90 Fix T70715: sculpt brush jitter after recent TBB changes
Fix error in the splitting constructor, and some refactoring.
2019-10-11 01:26:56 +02:00
Dalai Felinto
b8f769fee8 Fix T64901: Nesting collection instances could clutter object display 2019-10-10 17:49:46 -03:00
b50b91c25d Cleanup: Fix wrong assert introduced by rBd98ae27f02c7 2019-10-10 20:16:22 +02:00
02f3014ec6 GPencil: Change Paint cursor to DOT
After doing some test, the cross cursor is too intrusive when you are drawing in grease pencil, so we decided to change by Dot cursor.

Reviewers: @brecht @mendio @pepeland @pablovazquez @billreynish
2019-10-10 20:04:39 +02:00
91a26ee745 Fix build error on macOS after recent changes for file delete 2019-10-10 18:30:47 +02:00
f3d9ea0a8a Fix build error on Windows after recent changes 2019-10-10 18:04:40 +02:00
6c302d6529 Sculpt: use TBB instead of BLI_task for multithreading
This solves performance issues on some computers where there is significant
threading overhead. Rather than doing the complicated work of optimizing our
own task scheduler, use TBB which appears to work well. The downside is that
we have another thread pool, but it is already there when using OpenVDB voxel
remesh.

For future releases we can switch to using TBB to replace our task scheduler
implementation entirely, and use the same thread pool for BLI_task, Cycles,
Mantaflow, etc.

Differential Revision: https://developer.blender.org/D6030
2019-10-10 17:36:12 +02:00
86042b7ced Build: add WITH_TBB option, in preparation of sculpt using it
It should no longer be tied to OpenVDB and OpenImageDenoise then.

Differential Revision: https://developer.blender.org/D6029
2019-10-10 17:35:35 +02:00
Robert Guetzkow
8825250f5a File Browser: add back Delete, which now moves files to the trash
In Blender 2.7 delete would permanently delete files, now this function is back
but using more standard behavior.

This patch includes code contributed by Kris (Metricity).

Differential Revision: https://developer.blender.org/D4585
2019-10-10 17:30:57 +02:00
826db891ab Node Shader wrapper: add access to the Emission color of Principled BSDF node.
This did not exist when that wrapper was created, but is supported by
many formats, so worth supporting it now. See also T70666.
2019-10-10 17:21:06 +02:00
8ada685581 Fix T70644 EEVEE: Bump issue with geometry node normal coordinate
Was caused by non-normalized coordinates (normals). Note this is not 100%
correct as the dFdx functions can be the same for packs of 4 pixels and the
derivated value can only be correct for one pixels.

This is because smoothed normals are a non-linear function (because of the
normalization).

The correct fix would be to do the dFdx offset BEFORE any normalization.
2019-10-10 16:57:28 +02:00
eac0f35845 Fix T65134: Duplicated proxies in several scenes don't work
This is something which worked in Blender 2.79.
Need to do special trickery to ensure peoxy_from points to a
proper object.

Differential Revision: https://developer.blender.org/D6040
2019-10-10 16:13:54 +02:00
Julian Eisel
1857aa32bd UI: Only hide locked transform manipulator axes for matching spaces
The manipulator would hide axes that were locked, even if the lock was
applied to a different space. That would lead to confusing behavior of
the manipulator. E.g.:
* Add armature
* Enter Pose Mode and select the bone
* Lock X and Y location in the Sidebar
* Enable the Move tool
* Only the Y axis is visible, but doesn't do anything on dragging
The manipulator would only show the Y axes, even though the lock is
applied to the bone's local Y axis, which matches the manipulators Z
axis.

Differential Revision: D6021

Reviewed by: Brecht van Lommel, William Reynish
2019-10-10 15:17:08 +02:00
Julian Eisel
cf192bdd43 Fix missing manipulator update when toggling bone lock 2019-10-10 15:08:35 +02:00
Julian Eisel
7c88d84515 Fix: Manipulator visible if root or tip of locked bone is selected
When an edit-bone was locked, we hid the transform manipulator for it.
But only if the bone itself was selected, not when the root or tip were
selected, even though they are locked then too. So this makes sure the
manipulator is shown in neither case.
2019-10-10 15:06:11 +02:00
e15ab630c6 Added little explanation of eModifierTypeType_(Non)Constructive
Thanks to @campbellbarton for the explanation.
2019-10-10 13:25:54 +02:00
35c707684b CMake: Allow to use pre-compiled CentOS libraries
The goal is to make it able to use pre-compiled CentOS libraries on a
more modern system. Main issue was that it's possible that the compiler
on a newer version is defaulting to different C++11 ABI.

This change makes it so that if there is NO native libraries in the
lib folder and there IS pre-compiled CentOS folder, it will be used and
compiler will be forced to old ABI.

Differential Revision: https://developer.blender.org/D6031
2019-10-10 10:39:53 +02:00
Antonio Vazquez
ea1174bde9 Annotations: Use flag to determine if the layer is a Ruler
Proposed fix for T70141.

Before, the ruler was using the name of the layer as key, but this is very weak because if the layer name changes, the layer gets an annotation layer.

Now, the layer is marked using a flag and now it's possible to rename it.

Reviewed By: dfelinto

Differential Revision: https://developer.blender.org/D6028
2019-10-10 08:13:32 +02:00
7e020e70d9 Fix T70691: Crash picking object from eyedropper
Caused by 828905190e
2019-10-10 16:41:34 +11:00
b548b3d57e Fix crash versioning file-selector tool region
Loading the file from T69967 was crashing.
2019-10-10 13:55:00 +11:00
3c5bf7d1dc PyAPI: update for change in tessellate_polygon 2019-10-10 11:30:50 +11:00
5910f9f9e9 Fix T70617: mesh.from_pydata() misses first edge if there are faces 2019-10-10 11:16:51 +11:00
dc2cd2d0dc Cleanup: clang-format, spelling 2019-10-10 10:29:50 +11:00
f61a8a2abd Fix T70614 EEVEE: Bump with texture connected to other branches don't work
Was caused by the bump node not being evaluated because the other branch
was evaluated before.

To fix this, we use fromnode instead of tonode.

Also we fix a potential issue with recursiveness because
ntree_shader_copy_branch() also use nodeChainIterBackwards() which would
reset the iter_flag in the middle of the parent iteration. Use iter_flag
as a bitflag for each iteration to fix this.
2019-10-10 00:31:47 +02:00
8163fda9fb Fix T70609 EEVEE: Shader using lots of nodegroups are slow to update 2019-10-09 23:47:56 +02:00
9bd62379d6 Fix T70659 Warning, Regression, slow vertex selection
This changes the fix for T70302 by reducing the number of things we discard.
2019-10-09 23:47:56 +02:00
fb46d273f8 Fix "make update" not working on buildbot after recent changes
The submodules don't have remote branches configured, skip that test since
we assume pulling from the "origin" remote anyway.
2019-10-09 21:48:43 +02:00
d95bb087d0 Sculpt: Fix wireframe drawing
With this commit sculpt mode draws the real mesh wireframe instead of the
triangulated version by ignoring non real edges when building the PBVH GPU buffers

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6032
2019-10-09 21:23:11 +02:00
e846852862 Fix T70596: Wrong default scale value for node wrapper tool.
This affected all exporter add-ons using that wrapper to handle the node
shaders... sigh...
2019-10-09 20:33:22 +02:00
bbd6ebf423 Fix T70677: Annotation converted to grease pencil remains unselectable
The problem was the new object was created byt the tag for update objects in depsgraph was not tagged.
2019-10-09 19:09:01 +02:00
b8e34355c1 GPU: Consider softpipe as software renderer 2019-10-09 16:47:16 +02:00
bc6f439e94 CUDA Wrangler: Fix strict compiler warning
Namely addresses -Wstringop-truncation

Not sure if there is anything to be done for strncpy.

Differential Revision: https://developer.blender.org/D6006
2019-10-09 16:27:27 +02:00
a630e46a58 Fix T70544: Mesh extracted from Mask crash Blender when using Dyntopo
This commit fixes an assert in mesh_runtime_check_normals_valid

Reviewed By: jbakker

Maniphest Tasks: T70544

Differential Revision: https://developer.blender.org/D6013
2019-10-09 16:20:03 +02:00
e79fc33fda Fix multires cursor not displaying the active vertex
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6026
2019-10-09 15:47:37 +02:00
06c5520bda Fix T70554: Snake Hook + Ctrl does not set the brush stroke in its normal direction
This commit also fixes the same issue in elastic deform

Reviewed By: jbakker

Maniphest Tasks: T70554

Differential Revision: https://developer.blender.org/D6014
2019-10-09 15:44:56 +02:00
ec9044e2b2 Fix Delaunay 2d valid bmesh mode bug.
Wasn't checking for repeated vertices.
Also, made choices of edges to keep more aesthetically pleasing.
2019-10-09 09:26:55 -04:00
7e7b205137 Build: prepare "make update" to work for new release cycle branching
Checking out release branches in submodules, and printing some more
informative messages when that fails.
2019-10-09 15:09:53 +02:00
6c9178b183 Fix T61432: Sampling Subframes not working 2.8
Uncommented subframe logic and added correct time getter function (with subframe part in frame) to subframe update function
2019-10-09 15:00:25 +02:00
4aabea8b87 Fix T70640 EEVEE: Alpha hashed material is darker when alpha is not 1.0
Predivide all radiance components as the alpha effect comes from the hashed
transparency (pixel rejection).
2019-10-09 14:56:21 +02:00
7790298f61 GPU: show one-time startup warnings for old Intel drivers with known issues
This is pretty conservative. We do not show warnings for e.g. HD 4000 with the
latest drivers as they appear to be working mostly fine even if unsupported,
and there is nothing the user can do to improve things.

Ref T70520
2019-10-09 13:41:26 +02:00
cf682b9dab GPU: show more descriptive labels on unsupported GPU dialog
Thanks to Ray Molenkamp for the help with the Windows implementation.

Fixes T70521

Differential Revision: https://developer.blender.org/D6023
2019-10-09 13:41:26 +02:00
26b1216629 CMake: Move software-gl to generic install procedure
Removes custom logic from buildbot's packing step.

This also removes icons/ folder, but CMake was already copying the
icons to the root of the install folder.
2019-10-09 13:07:40 +02:00
e0231b14d5 Deps: Fix wrong LLVM prefix used for Mesa
It made it Mesa to be compiled with swrast rather than with llvmpipe.
2019-10-09 12:51:31 +02:00
decdd70dfd Deps: Add libraries needed for Software GL
Only compiled on Linux.
2019-10-09 12:37:04 +02:00
0ae6a8570b Cleanup: typo, style 2019-10-09 20:14:29 +11:00
22996f3dbe Fix make deps libtool detection on macOS 2019-10-09 10:54:55 +02:00
2fd2bced56 Buildbot: Correction to previous commit
Off-by-one calculating parent folders.
2019-10-09 10:37:09 +02:00
06ff734d48 Buildbot: Attempt to point precompiled libraries to a correct folder
The CMAKE_SOURCES variable is not yet initialized when the buildbot
configuration is read. This is similar to the include of full release
configuration happening earlier in the file.
2019-10-09 10:34:12 +02:00
62a7e8d429 Buildbot: Point to pre-compiled CentOS 7 libraries 2019-10-09 09:50:58 +02:00
40a55be82c Buildbot: Checkout precomiled CentOS libraries 2019-10-09 09:42:42 +02:00
340b9c1dfc Fix missing clear of ID types tags
Got lost in previous optimization commit.
2019-10-09 09:38:56 +02:00
d3d6cd2e09 PyAPI: drop Vector requirement for tessellate_polygon
Use mathutils_array_parse which converts any sequence of numbers.
2019-10-09 17:28:49 +11:00
6ff60d9982 PyAPI: avoid normal calculation for tessellate_polygon
Use fixed normal for 2D input, no need to calculate it.
2019-10-09 17:08:51 +11:00
b718d659c9 Fix T70594: mathutils.geometry.tessellate_polygon flips triangles
Some scripts will need to be updated to support this.
2019-10-09 16:56:54 +11:00
95199dca1f Fix T70662: Batch rename adds "\" before "." 2019-10-09 15:13:58 +11:00
d77afcffa3 UI: hide text character options when out of edit-mode
These are overwritten when entering edit-mode so there is no use
in showing them in object mode.

Addresses T70566
2019-10-09 13:55:09 +11:00
8f210f0475 Fix text edit-mode character info initialization
Using EditFont.pos before it was set.
2019-10-09 13:52:30 +11:00
7468227aea Docs: clarify Mesh.from_pydata edges argument usage
Addresses T70617
2019-10-09 12:12:53 +11:00
Dalai Felinto
0812949bbc Local Collections: Allow users to show hidden collections
Users now can turn on in a viewport collections that are temporarily
hidden (eye) in the view layer.

Design task: T61327

As for the implementation, I had to decouple the visibility in the
depsgraph from the visibility in the view layer.

Also there is a "bug" that in a way was there before which is some
operators (e.g., writing a text inside of a text object, tab into edit
mode) run regardless of the visibility of the active object. The bug was
present already (with object type visibility restriction) in 2.80 so if
we decide to tackle it, can be done separately (I have a patch for it
though P1132).

Reviewed by: brecht (thank you)

Differential Revision: D5992
2019-10-08 19:16:05 -03:00
Richard Antalik
6d3c34fe9d Fix T69682: Render Audio ignores animation.
`sound_update_animation_flags_exec` didn't tag depsgraph to update.

Reviewed By: sergey

Maniphest Tasks: T69682

Differential Revision: https://developer.blender.org/D6000
2019-10-08 13:10:37 -07:00
234f346c2f Fix T70601: Lasso select not functioning correctly in Armature Edit Mode
This solution mimics the one used for pose by ignoring the bone line if either end is clipped.
2019-10-08 16:45:32 -03:00
576c782b11 Fix T70586 EEVEE: principled shader alpha bleeding issues
Avoid double multiplication by alpha on ssr/sss data.
2019-10-08 20:29:35 +02:00
47b95a2957 Fix T70561: bad custom normals in mirrored geometry.
Original code from rB1a9e698099b5 used a rather naive approach, now use
proper transpose of inverse of geometry transform for the normals.
2019-10-08 20:19:13 +02:00
d98ae27f02 Fix T68857 EditUV: Crash on Remesh modifier with 'Display in Edit Mode' 2019-10-08 18:42:26 +02:00
656228945e Fix T69363 EEVEE: Blender crash when using Edit mode for Ocean
Use same Mesh* as extraction. We always use the final mesh for shaded geom.
2019-10-08 18:37:38 +02:00
ed9f8bd956 CTest: Fix failing test BLI_expr_pylike_eval_test on clang/windows
clang got a little to aggressive discarding unused variables
see D6012 for details.

Differential Revision: https://developer.blender.org/D6012

Reviewers: brecht, sergey, angavrilov
2019-10-08 09:46:09 -06:00
10ec207a6b Sculpt: support automasking, pose and mask expand for multires
These were the last remaining new sculpt tools that did not support multires.
Performance could be improved still, but it should work.

Fixes T68899
2019-10-08 17:44:46 +02:00
52c02dc311 Fix multires sculpt not setting the active vertex correctly
Also cleanup code to remove duplicated min_depth tracking, ray intersection
already does it.
2019-10-08 17:41:52 +02:00
899b7ff1de Cleanup: avoid converting from CCGElem to SubdivCCGCoord
The other direction is faster.
2019-10-08 17:41:52 +02:00
333293cad7 Cleanup: minor refactoring of mask expand and floodfill 2019-10-08 17:41:52 +02:00
7a1847f0e9 Fix T70585: Walk Navigation keyframe tweaks (still frame)
Walk Navigation was missing rotation keyframes on confirm (when animation
wasnt playing) after rB22bdd08dfd0.

Because for walk [in contrast to fly], the cursor is constantly warped
(WM_cursor_warp in walkEvent), we cant do something reasonable with
comparing mouse positions (to detect rotation) when mouse comes to rest.

Now remember if rotation changed at any time.

Also tweaked the insertion for location keyframes (which was always
happening even if the camera did not move), now checking the real dvec
(instead on relying on speed)

Reviewed By: dfelinto

Maniphest Tasks: T70585

Differential Revision: https://developer.blender.org/D6018
2019-10-08 16:26:37 +02:00
054ab92f8b Depsgraph: Avoid threading for trivial operations
Found this while looking into T70463, solves the high spinning times
mentioned in T70463#791026.

Sounds logical that iterating over an array to modify a single property
is faster than doing it in threads. But strangely, doing it for both
nodes and its components is still faster in threads here.

Gives extra speedup with a file mentioned in the report.

Reviewed By: brecht, mont29

Differential Revision: https://developer.blender.org/D6017
2019-10-08 16:06:46 +02:00
abc36cad83 Sculpt: Fix projection artifacts by changing the voxel remesh isovalue
This should fix most of the shrinkwrap artifacts when the preserve volume option is active. After this commit the default voxel remehser settings should not fail in the default cube.

Reviewed By: zeddb

Differential Revision: https://developer.blender.org/D6010
2019-10-08 15:58:16 +02:00
31a4566685 Fix "make update" error with old git versions, for the buildbot
Just skip convenience test that checks if a rebase/merge is in progress.
2019-10-08 15:13:33 +02:00
df08fcebe8 Cleanup/fix for fix (c).
Sorry for the noise... For once building with everything hid the issue
instead of revealing it.
2019-10-08 14:45:50 +02:00
0b983169da Fix T70626: VSE: Slip Strip Operator doesn't refresh audio on confirm
Maniphest Tasks: T70626

Reviewed By: ISS, sergey

Differential Revision: https://developer.blender.org/D6016
2019-10-08 14:16:48 +02:00
Dalai Felinto
1ba4e472cd Fix build error (missing BKE_global.h) 2019-10-08 09:16:19 -03:00
270562fe12 Fix T70588: Playing animation (after deleting rigid body obj) crashes blender.
Fixing/working around another weakness of current RBW model... This is
not really nice, but it should work for now, and we cannot really do
anything else but that kind of monkey patching here anyway.
2019-10-08 11:53:44 +02:00
Julian Eisel
b1f1c8c33f Fix: region toggle operator being able to toggle regions it shouldn't
Only regions with alignment set should be toggle-able. If this is not
set, then the region is likely either a main region, or entirely hidden
by the user (not just collapsed).
2019-10-08 11:35:24 +02:00
ad876e728c Depsgraph: Cleanup, spelling in comment 2019-10-08 11:12:30 +02:00
9d13321831 Depsgraph: Perform early exit check prior to time tag
Evaluation is not entirely cheap even in the case when there is nothing tagged
in the scene. This is because of all the calculation of pending operations,
cleating runtime flags and so on.

This commit makes it so time operation is tagged for update prior to early exit
check. Improves playback speed in a scene without anything animated.

Maniphest Tasks: T70463

Differential Revision: https://developer.blender.org/D6002
2019-10-08 11:02:22 +02:00
fda1db5ba4 Depsgraph: Cleanup, de-duplicate time source tagging 2019-10-08 11:02:22 +02:00
ae777b0764 Depsgraph: Don't force time update when legacy flag 0 is used 2019-10-08 11:02:22 +02:00
Julian Eisel
95749f5d54 Fix T70522: Sidebars in Clip Editor work incorrectly in Dopesheet mode
Actually, in Dopesheet mode, the regions shouldn't be toggle-able at
all. For the user they should appear to not exist.
Previously the Movie Clip Editor archieved this by setting the region
alignments to NONE, which this restores.

Introduced in 6aef124e7d.
2019-10-08 10:33:48 +02:00
7f52eb287c Keymap: use right mouse for console context menu
Was using 'w' which doesn't work with text entry.
This matches the text editor.
2019-10-08 14:33:50 +11:00
f9a266a226 UI: support passing a function to WorkSpace.status_text_set()
This allows Python operators to draw icons and other UI elements
into the status bar.
2019-10-08 14:21:41 +11:00
a856c5eccf Fix T67753 EEVEE: Crash using transparent shadows with default material 2019-10-07 22:16:53 +02:00
da9ac42588 Cleanup: Change comment 2019-10-07 20:44:55 +02:00
b403b8196b Fix T70610: GPencil Remove Vertex Group don't reassign other groups
When removing a vertex group, the next groups were not reassigned because the loop upper limit was wrong.
2019-10-07 20:40:03 +02:00
Julian Eisel
7dea058546 UI: Move all Selected NLA-Strips when Dragging
Part of T57918. Selecting and dragging items were conflicting actions
previously when both were using the same mouse button. This avoids the
conflict.

See be2cd4bb53 for details on behavior.
2019-10-07 20:34:15 +02:00
ce22efb425 Paint: 2D paint brush stroke antialiasing
This commit enables antialiasing in 2D painting.
It also includes some fixes related to line drawing in the stroke spacing code.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5833
2019-10-07 19:47:40 +02:00
dccdc5df10 Fix T69933: Blender 2.81 doesn't import 2.80 preferences from quick setup screen 2019-10-07 19:41:58 +02:00
Ulysse Martin
e284654fbf Fix T70537: Documentation: bpygpu_offscreen_draw_view3d_doc not up to date 2019-10-07 14:39:27 -03:00
e5858cc5be Fix T70302 Crash on entering solid view after some specific steps 2019-10-07 19:22:41 +02:00
d2e4b13b9c CMake: Add support for building with OpenMP support for clang on windows.
mostly minor c/cxx/linker flags, only tested with clang 9.0.0

Differential Revision: https://developer.blender.org/D5976

Reviewers: brecht, jesterking
2019-10-07 10:24:13 -06:00
fc9e921495 Simplify the quadriflow manifold mesh function for loops
No need to iterate over all polygons if we just want to iterate over all
face loops anyways.
2019-10-07 18:14:30 +02:00
0c0d2f3581 Fix T70406: crash editing keyframes while in sculpt mode 2019-10-07 18:04:35 +02:00
b91290fd2a Fix T70591: missing letters in statusbar keymap display after recent changes 2019-10-07 17:55:14 +02:00
d7465c23c7 Fix T70564: sculpt mask display missing with shape keys or deforming modifiers 2019-10-07 17:38:07 +02:00
e00a00db52 Cleanup: rename some sculpt variables for clarity 2019-10-07 17:38:07 +02:00
ad84f22628 Fix T70602: error baking with Cycles OpenCL after recent changes 2019-10-07 16:53:46 +02:00
78c0be9987 Fix T70452: Crash when clicking "Solve Camera Motion" in Motion Tracking 2019-10-07 15:41:52 +02:00
525a8bdf1d Sculpt/Paint: Invert curve alpha overlay
Reviewed By: billreynish

Differential Revision: https://developer.blender.org/D5998
2019-10-07 15:26:05 +02:00
afb9bdc320 Sculpt: Update only modified grids on multires undo
This makes multires undo much faster and fixes the viewport lag after and undo operation.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5994
2019-10-07 15:24:25 +02:00
29707e3437 Fix T70387: Sculpting with Original Normal rips edges
Reviewed By: brecht

Maniphest Tasks: T70387

Differential Revision: https://developer.blender.org/D5982
2019-10-07 15:22:32 +02:00
4761028fc7 Fix T70508: Wrong snapping default in Node Editor 2019-10-07 10:02:12 -03:00
7a100a3f60 Fix T70555: Crash when attempting to create an override for an object with a cloth modifier.
Was not taking into account the case where pointer RNA prop is valid,
but has no data (i.e. is a 'null' pointer)...
2019-10-07 13:17:56 +02:00
2cb5078ce2 Update NUMA API library to latest version
Brings support of PPC and S390 platforms, which are required to have
Blender compiled on all ports of Debian.
2019-10-07 12:59:51 +02:00
cc1614123e Fix T70476: Sculpting with Subsurf on top produces artifacts
The issue was caused by crazy space distortion orientation happening
for subsurf modifier.

Solved by making it so subsurf only deforms the surface but keeps
matrices as-is. This is not fully mathematically correct, but is better
that the fall-back solution which was doing wrong matrices anyway.
Also, this is closer to have subsurf was handled prior to the
related changes.

Reviewed By: brecht, pablodp606

Differential Revision: https://developer.blender.org/D5991
2019-10-07 12:43:57 +02:00
d4c452ff39 Fix T70573: Crash on enter Cycles render preview with 'Scene world'
disabled and no world assigned to scene

BlenderSync::sync_world still relied on a blender world (mixes the world
viewport color with the studio light), for now just take black if no
world is present.

Maybe we should we use the theme color in the future here (seems eevee
does this in that case) -- we'd have to pass down `b_userpref` from
`BlenderSession::render` down to `sync_data > sync_shaders > sync_world`
then afaics.

Reviewed By: jbakker, brecht

Maniphest Tasks: T70573

Differential Revision: https://developer.blender.org/D6005
2019-10-07 12:26:25 +02:00
60f0a94ab2 Cleanup: clang-format 2019-10-07 15:22:22 +11:00
805ba9fc81 CMake: add GCC 9.2 -Wabsolute-value warning 2019-10-07 12:22:05 +11:00
fae0685113 Cleanup: quiet warnings 2019-10-07 12:22:05 +11:00
54a9649e26 Fix T70582: Gpencil crash when use Shift+Alt+LMB
This keymap was the old polygon mode for old grease pencil and now this have been replaced with Line tool. As this code was not ready for this keymap, the code gets out of control and fails. The solution is to remove this deprecated keymap.
2019-10-06 16:05:42 +02:00
4707f1982d Fix T70568, T70570: wrong AMD driver warning dialog
Remove this entry for now until we have more carefully verified the list.
2019-10-05 22:51:59 +02:00
0905af68ec Fix T70539: file folder color preference not saved
Please always bump the subversion for cases like this.
2019-10-05 22:51:59 +02:00
a498a5494c UI: Split sculpt mask operators into own menu
Differential Revision: https://developer.blender.org/D5997

Reviewers: Brecht van Lommel, Pablo Dobarro
2019-10-05 22:17:22 +02:00
Jeroen Bakker
0bdf4e2f2d Show Background Image Beneath Transparent Objects (Cycles only)
Camera background images were not shown under transparent objects.
This patch performs an alpha under for background images for cycles.

In order to see the difference the Film transparency needs to be turned on.

Note that workbench and EEVEE still needs to be adapted as they don't
write store alpha value in the viewport.

Side note. This implementation is already an improvement of the current behavior, what users are requesting. (Show background images underneath cycles viewport rendering.) It is clear that this patch still needs to be extended to workbench and eevee. For now that should be marked as a known limitation.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5437
2019-10-05 17:18:53 +02:00
629a1c1639 Fix T70418: Text Underline stays Flat on TextCurve Extrude
Underline was implemented in rBa07394ef2cfd.
It seems that the extrude feature never worked.

Ref T70418

Reviewed By: mont29

Maniphest Tasks: T70418

Differential Revision: https://developer.blender.org/D5972
2019-10-05 11:35:57 -03:00
ab519b91b2 Make this link again; needs more work for orbis to work. 2019-10-04 18:33:20 -04:00
1f6a34161d make_deps: Fix building ffmpeg on windows
I have no explanation on why this is needed, but it refused to
find opus without it.
2019-10-04 14:09:50 -06:00
7c2affd350 Fix: Headless build 2019-10-04 13:23:26 -06:00
Dalai Felinto
5287eaac5b Small cleanup 2019-10-04 14:11:13 -03:00
f35bfbb25e Sculpt: mesh filter, mask filter and dirty mask now work with multires
Thanks to Sergey's neighbor access functions.

Mesh filter still needs some improvements to handle open boundaries better.
2019-10-04 19:01:03 +02:00
8f1f756b83 Subdiv CCG: add utility functions for accessing multires vertex neighbors
This is to be used by the new sculpting tools.
2019-10-04 19:00:57 +02:00
bebdb6c824 Fix assert when deleting a RBW constraint object.
Side-reported in T70505.

Code did not ensure deleted object was removed from the RBW constraints
collection, leading to some invalid status (object in constraints
collection but without relevant contraints data).

Also fixed another issue - code deleting RBW objects would try to remove
any constraint one using it as target, in a very bad and broken way,
since you cannot iterate over objects of a collection while removing
some... Now instead just NULLify relevant pointers... I hope it works,
otherwise we'll have to take a different approach.

Needless to stress again how weak the whole RBW code is in general, and
regarding same object being used by RBW in more than one scene in particular,
that is known broken situation anyway.
2019-10-04 18:57:14 +02:00
3c14628381 Cleanup: make context menu last in keymaps 2019-10-05 02:45:37 +10:00
fc517cb079 Cleanup: formatting for text highlighter 2019-10-05 02:43:03 +10:00
dfcda05242 Fix T70467: large cursors option on Linux not showing clear crosshair
Not a great solution, but reverting back to what we had before the recent
changes for this specific case.
2019-10-04 18:02:55 +02:00
Julian Eisel
db66c33efe Fix T70462: Shift+Click on neighbour folder enters it
In fact, the operator implementation seems to have some issues, which is
why this behaved so glitchy. But for properly set up keymaps it should
work fine.
2019-10-04 17:28:45 +02:00
1fa56e72ec Fixed copy-paste error in install_deps.sh 2019-10-04 17:11:23 +02:00
Pedro Reis
eeba31e2ca Fix T69910: crash when using a hotkey for a new or open recent file
Differential Revision: https://developer.blender.org/D5839
2019-10-04 16:57:48 +02:00
Julian Eisel
809ab298f1 UI: Move all Selected Markers when Dragging
Part of T57918. Selecting and dragging items were conflicting actions
previously when both were using the same mouse button. This avoids the
conflict.

See 056fcdfe7bbed3 for details on behavior.
2019-10-04 16:46:32 +02:00
Julian Eisel
d4d036ae14 UI: Move all Selected Dopesheet Keys when Dragging
Part of T57918. Selecting and dragging items were conflicting actions
previously when both were using the same mouse button. This avoids the
conflict.

See 056fcdfe7bbed3 for details on behavior.
2019-10-04 16:46:32 +02:00
Julian Eisel
1f5ae1a5a5 UI: Move all Selected Strips and Strip Handles when Dragging
Part of T57918. Selecting and dragging items were previously conflicting
actions when both were using the same mouse button. This avoids the
conflict.

See 056fcdfe7bbed3 for details on behavior.
2019-10-04 16:46:32 +02:00
Julian Eisel
5f51e78172 Node Editor: Use new operator utilities for node selection and dragging
Previous commit moved most of this code into more general/generic
utility functions, so we can use that in the Node Editor now.
2019-10-04 16:46:32 +02:00
Julian Eisel
be2cd4bb53 WM: Utilities for select operators to work with click-dragging items
Based on work by Bastien and Brecht in the Node Editor, this adds more
generalized support for selecting items so that click+drag actions on
items (nodes, makers, dopesheet keys, etc.) works as wanted.
Note that this only adds the barebones to support this in other editors,
it's not used yet (will be done in followup commits).

The behavior is supposed to work as follows:
* Clicking an unselected item immediately selects it, and deselects
  other items (doesn't wait for release events).
* Click+drag on an unselected item immediately selects it, deselects
  others and drags it in one go (don't require selecting it first!).
* Click+drag on a selected item won't change the selection state (and
  won't send an undo push) and start dragging all selected items as soon
  as the drag event is recognized.
* Clicking on a selected item will still deselect others, but that will
  only happen on mouse release, when we know the intention is not to drag
  the item.

Included in: https://developer.blender.org/D5979

Reviewed by: Brecht van Lommel, William Reynish
2019-10-04 16:46:32 +02:00
0bcada85b3 Fix T67212: No smooth blending in "Push Pose from Breakdown" and "Relax Pose to Breakdown"
The previous method produced non smooth interpolation results and it was
very hard to control. (At least for me it seemed to be broken until I
actually took a look at what the code actually did)

Now we simply linearly interpolate between the breakdown position and
the current bone data.

Reviewed By: Sybren, Hjalti

Differential Revision: http://developer.blender.org/D5892
2019-10-04 16:40:09 +02:00
b9736e8e12 Add Opus audio library and configure FFmpeg to use it
Opus support was enabled in 2ddfd51810. This commit adds the Opus
library and configures FFmpeg to be compiled with Opus support.

NOTE: It may be required to run `cmake -U '*FFMPEG_LIBRARIES*' .` in
your Blender build directory in order to refresh the `FFMPEG_LIBRARIES`
setting and add libopus.
2019-10-04 16:30:01 +02:00
6d8c053187 Fix T70514: VP9 not working
This issue was two-fold:

- In the VPX library build script: missing `--enable-vp8` and
  `--enable-vp9` meant that the choice to enable these codecs or not was
  left to the library's `configure` script, rather than an explicit choice.
  On the build-bot it chose to not enable them.
- Missing pkgconfig paths passed to the FFmpeg build script

Thanks @brecht for helping out.
2019-10-04 16:30:01 +02:00
663d23dd9d Fix T70463 GPU: Very Slow Workbench/Eevee Performance 2019-10-04 16:29:51 +02:00
56dd7feb06 GPU: Platform Support Level
Adds a check when starting blender if your platform is supported. We use a blacklist
as drivers are updated more regular then blender (stable releases).

The mechanism detects if the support level changed or has been validated by the user previously.
Changes can happen due to users updating their drivers, but also when we change the support
level in our code base.

When the user has seen the limited support level message it is saved in the user config.
It would be better to have a system specific config section, but currently not clear
what could benefit from that.

When the platform is unsupported or has limited support a dialog box will appear including a link
to our user manual describing what to do.

**Windows**
Windows uses the MessageBox that is provided by the windows kernel.

**X11**
We use a very lowlevel messagebox for X11. It is very limited in use and can be fine tuned when needed.

**SDL/APPLE**
There is no implementation for SDL or APPLE at this moment as the platform support feature targets mostly Windows users.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5955
2019-10-04 16:23:39 +02:00
OmarSquircleArt
45745f7862 Fix: Gain socket is not available in ridged multifractal.
The gain socket in the Musgrave node should be available in the ridged
multifractal mode. The logic for the availability was incorrect.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5989
2019-10-04 16:07:28 +02:00
295f888433 Fix T70504: Moving nodes in the node editor stops after hotkey is lifted
This basically reverts 540eb2dc1e for an alternative solution that
only enforforces release_confirm [ignoring the preference] on mouse for
the node editor.

Approved by @brecht in T70504.
2019-10-04 15:55:08 +02:00
40492251f2 Fix T70454: Environment Texture Node Properties "reload" and "packing" not working
The bug was basically just caused by a missing 'edit_image' and
'edit_image_user' pointer in context for
'node_shader_buts_tex_environment_ex'.
So adding the following there would be enough to fix the bug:
uiLayoutSetContextPointer(layout, "edit_image", &imaptr);
uiLayoutSetContextPointer(layout, "edit_image_user", &iuserptr);

However, I would suggest using the full-flegged uiTemplateImage (just as
'node_shader_buts_tex_image_ex' does -- instead of a "handmade" subset)
for the following consistency reasons:
- Layout was using single column for image textures, but not environment
textures
- Save / Discard feature on editing the image was there for image
textures, but not environment textures
- Environment textures: Color Space was displayed on node (but not
properties)
- Environment textures: Animation / Sequence settings were displayed on
node (but not properties)

Cant think of a reason for _not_ displaying the whole set for
environment textures (just as for regular image textures)?

Maniphest Tasks: T70454

Differential Revision: https://developer.blender.org/D5988
2019-10-04 15:31:54 +02:00
d590db8370 Sculpt: Clay Strips brush tweaks
- Fix accumulate by allowing normal radius greater than one. Now it works as it should and it should be enabled by default
- Make the square test sharper. This gives a lot more definition to the brush, even when working with fewer polygons

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5984
2019-10-04 15:28:00 +02:00
2b55a1da50 Fix T70499: Can't change Brush Texture Rotation without holding the Shift key.
Reviewed By: brecht

Maniphest Tasks: T70499

Differential Revision: https://developer.blender.org/D5985
2019-10-04 15:24:40 +02:00
OmarSquircleArt
8afa93d82d Fix: Clamping in Map Range node works incorrectly.
The clamp option in the Map Range node doesn't work correctly when the
inputs are linked. The code didn't put that into considration.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5987
2019-10-04 15:21:46 +02:00
f025b625f4 Fix T70095: Quadriflow crash running on a messy mesh
Quadriflow does not support non manifold meshes. (Edges with > 3
connected faces and discontinuous face normal directions)

While it does sometimes "work" in these configurations, the results are
not good and in most cases it just flat out will crash.

Added a sanity check to make sure that the input mesh is manifold.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5877
2019-10-04 14:25:34 +02:00
19b0f69009 Fix T70481: Segfault printing 'private data' evaluated IDs.
This commit solves the bug itself (code was broken when real_id owner of
the private data ID could not be found), and generates a more sensible
representation for all evaluated IDs, makes no sense to display them as
being part of `bpy.data....`!
2019-10-04 12:27:10 +02:00
ba10cd4922 LibOverride: Fix last main issue with overriding custom properties.
Now, custom props defined as overriddable can be overridden, saved,
reloaded, etc. That fixes the last main issue with them.

Note that custom props still have a lot of glitches and weirdness in
their overriding behavior, but for now the most important is finally
achieved, will let them rest and settle a bit, those have been
incredibly painful to tame... :(
2019-10-04 12:27:10 +02:00
837653d735 LibOverride: Fix bad handling of 'store' callback in IDProps case.
We need same kind of default handling for IDProps as we already have for
the diff callback.
2019-10-04 12:27:10 +02:00
03bf290eae GPencil: Reduce VBO memory footprint when using modifiers
Before, the modifiers were evaluated in Draw Engine and this required to calculate a factor to increase the VBO size.

Now, the modifiers are evaluated in Depsgraph and the Draw Engine receives the evaluated stroke with the final number of vertices. As the number of vertices is the final value already, if Draw Manager increases the number with the modifiers only increases the memory with empty space because never would be used. This commit removes this double calculation, reducing the memory usage and removes a loop to calculate the size by modifier too.

Also, the function getDuplicationFactor() has been removed because is not required anymore.
2019-10-04 10:20:15 +02:00
fbc096cf07 Fix expanding paths ignoring data-block libraries
- Image views.
- Sequencer text strip font.
- Text check for modified/reload.
- Collada image export.
- Brush icons.
2019-10-04 07:03:53 +10:00
Kai Jægersen
8096190d11 Text: make selection and cursor editable from RNA 2019-10-04 06:31:32 +10:00
e54747a18c Correct error in last commit 2019-10-04 06:12:27 +10:00
Kai Jægersen
d289a2d4a9 Text: add Text.cursor_set(...)
Place the cursor, optionally set selection.
2019-10-04 06:10:43 +10:00
Kai Jægersen
bf2d92b277 Text: add Text.select_set(...)
Support setting the selection for a text buffer
with support for negative indices, select_set(1, 1, -1, -1)
selects the entire buffer.
2019-10-04 06:00:08 +10:00
2ba8adca4f CMake: quiet warning in quad reflow 2019-10-04 06:00:08 +10:00
6ac2a2061f Fix: Unit tests on windows.
Problem was twofold

1) `GENERATOR_IS_MULTI_CONFIG` is a property not a variable so
the test for it would always be false, unless you set a custom
CMAKE_INSTALL_PREFIX (like the buildbot does) the unit tests
would have a wrong working directory and complain about missing
dlls or blender executable

2) Tests added outside of `/test` (like libmv) would have no working
folder set since the variable would not be visible for them.

consulted @sergey who voiced the opinion that duplicating the code
to the test macro was slightly less evil than moving it to the main
CMakeLists.txt
2019-10-03 11:34:04 -06:00
79ca5ad368 Fix T70484: GPencil particles crash when original stroke is hidden
Due the internal design of the drawing engine and the special requirements for 2D inside 3D, it's required to keep the original stroke visible in order to display the particles. If the original stroke is hidden, the particles are hidden too.

This commit only fix the segmentation fault. Make visible the particles when the original is hidden would require a complete redesign and maybe would break some 2D features.
2019-10-03 19:03:40 +02:00
Julian Eisel
edffb0e9b1 UI: Register File Browser as Child/Dialog-Window for the OS
For many users, this will make the File Browser window behave more like
what they would expect. It addresses the issue of the File Browser
becoming hidden behind the main window by clicking anywhere in the
latter. It communicates the interruptive, but temporary nature of the
operation a bit better.
Further, on tiling window managers the File Browser now opens as
floating by default, like in other applications.

Note that this also makes sure the File Browser is always opened as
separate window, so it doesn't re-use the Preferences, or any other
temporary window anymore. This seems to have been a common annoyance.

More concretely, this makes the File Browser window behave as follows:
* Stays on top of its parent Blender window, but not on top of
  non-Blender windows.
* Minimizes with its parent window
* Can be moved independently
* Doesn't add an own item in task bars
* Doesn't block other Blender windows (we may want to have this though)
* Opens as floating window for tiling window managers (e.g. i3wm/Sway)

Further notes:
* When opening a file browser from the Preference window (or any
  temporary window), the main window, as the file browsers parent is
  moved on top of the Preferences, which makes it seem like the
  Preferences were closed. This is the general issue of bad secondary
  window handling as window activation changes. I made it so that the
  window is moved back once the file browser is closed.
  This behavior is confusing and would be nice to avoid. It's a separate
  issue though.
* On most window managers on Linux the temporary window can not be
  minimized and maximized, they disable that for dialog windows.
* On Windows and macOS, only minimizing is disabled, as there is no
  decent way yet to restore a window if it's not shown in the taskbar.

Reviewed By: Brecht van Lommel, Campbell Barton, William Reynish
Edits and macOS implementation by Brecht.

Differential Revision: https://developer.blender.org/D5810

Part of T69652.
2019-10-03 17:50:27 +02:00
35ae1da16c Mesh: simple extract mask optimizations
- Avoid per-vertex custom-data lookup
- Break once a face has a mask vertex.
2019-10-04 01:14:25 +10:00
1e273dbc3c Fix extract mask freed memory use & leak 2019-10-04 01:14:25 +10:00
67f9b94291 Fix sculpt normal update in SculptDraw brush
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5981
2019-10-03 16:57:27 +02:00
8c991bf63a UI: Add Buttons to Shader Editor Slots Popover
Assign, select, deselect buttons added when in edit mode to complete the functionality
of the shader editor vs. the properties panel.

Reviewed by: brecht

Differential Revision: https://developer.blender.org/D5768
2019-10-03 10:29:25 -04:00
a6ad80d9e8 Fix T70125: crash on startup in Linux with some tablet types connected 2019-10-03 15:36:50 +02:00
3bbe01dad3 Fix T70299: Grab brush not working as expected when Ctrl is press
Reviewed By: brecht

Maniphest Tasks: T70299

Differential Revision: https://developer.blender.org/D5920
2019-10-03 15:34:54 +02:00
ae7bea265d Fix T66312: Undo does not restore normals correctly in sculpt mode
Reviewed By: brecht

Maniphest Tasks: T66312

Differential Revision: https://developer.blender.org/D5895
2019-10-03 15:31:24 +02:00
6db6267d85 Sculpt: Disable remesh operators with Multires
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5964
2019-10-03 15:28:35 +02:00
d6c440bd7a Fix T69227: Ignore inbetween mouse events in Snake Hook
Reviewed By: brecht

Maniphest Tasks: T69227

Differential Revision: https://developer.blender.org/D5977
2019-10-03 15:26:50 +02:00
8a1f4fc8a7 Fix T70102: Mask Extract bad solution
Reviewed By: brecht

Maniphest Tasks: T70102

Differential Revision: https://developer.blender.org/D5978
2019-10-03 15:25:19 +02:00
11768d1c9f Fix T70466 Rendering error when drawing multi-material meshes 2019-10-03 14:44:43 +02:00
9a4042bed8 Subdiv CCG: Cleanup, remove unused data from adjacency storage
Makes it easier to initialze adjacency, avoid extra re-allocations during
initialization, reduces memory footprint.
2019-10-03 12:36:01 +02:00
0cc45eaac4 OpenSubdiv: Add accessor to vertex edges via refiner C-API 2019-10-03 12:36:01 +02:00
f6a90f018c i18n: Add Slovak language. 2019-10-03 11:11:37 +02:00
514c9d14e4 Fix T68945: VSE - Improper audio on frame 1
This has already been fixed in 8d207cdc3b
as fix for T52472: VSE Audio Volume not set immediately, but I failed to
backport it to upstream audaspace which is the reason the problem was
back.
2019-10-03 10:26:48 +02:00
Anthony Eriksson
4ccf02764c Fix T69216: "assert" not highlighted in text editor
Workaround limitations of formatting code by putting longest names first.

Differential Revision: https://developer.blender.org/D5613
2019-10-03 03:11:55 +02:00
540eb2dc1e Fix T69288: release confirms preference should not affect node editor
Was missing from new macro operators.
2019-10-03 03:11:55 +02:00
93e8c962fc Cleanup: unused structs, struct members 2019-10-03 07:39:45 +10:00
c07eaa3384 Cleanup: argument naming, redundant NULL checks 2019-10-03 07:32:28 +10:00
fcdd851858 Fix memory leak in loop-cut error case 2019-10-03 07:32:28 +10:00
d1d21dac51 Fix assert in image crop 2019-10-03 07:32:28 +10:00
6002e2f061 Fix incorrect flag check in gpencil subdiv modifier 2019-10-03 07:32:28 +10:00
14114b37e7 Fix pointer assignment 2019-10-03 07:32:28 +10:00
b87123cf2f Fix F-Key icon display 2019-10-03 07:32:28 +10:00
fb9024bded Fix error in opensubdiv topology refiner face matching check 2019-10-03 07:32:28 +10:00
Richard Antalik
2b29bf25fc Fix T69924: Prefetch stops when moving playhead
Fix T70194: Prefetch freezes Blender in some cases

- Initialize depsgraph in isolated bmain struct.
- Fix prefetching range (forgot in initial prefetch commit).
- Fix crash - Add check if prefetch job is initialized and running.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5899
2019-10-02 13:48:39 -07:00
aabd8701e9 Implement a user preference for the default Auto Handle Smoothing mode.
The default was changed with an initial implementation of the feature.

With the feedback from animators, having a behavior which affects curves
outside of a changing range is not convenient for professional animators
working on high quality character animation. On the other hand, automatic
smoothing is better for casual animation of object motion.

This change adds an ability to change the default via User Preferences.

Differential Revision: https://developer.blender.org/D5875
2019-10-02 20:42:37 +03:00
d1a1302b01 UI: add NLA track and channel theme color
Patch contributed by Paul (Thirio).

Differential Revision: https://developer.blender.org/D5967
2019-10-02 18:56:34 +02:00
03506ee4d1 UI: use consistent text box theme colors in search popups
This solves an issues where these text fields would use menu background colors,
making it difficult to create a correct theme.

Default theme looks the same, only Blender Light now shows a dark text field.

Patch contributed by Paul (Thirio).

Differential Revision: https://developer.blender.org/D5906
2019-10-02 18:56:32 +02:00
de4ebcbe43 Fix T70390: dyntopo smooth shading broken after recent changes
Made the code fully thread safe now.
2019-10-02 18:28:26 +02:00
a1f16ba67f Use PBVH_FullyMasked flag in mesh filter
We don't need to filter the fully masked nodes here after adding the flag

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5973
2019-10-02 16:58:53 +02:00
02ad256f9a Fix T70414 EEVEE: Crash with 2 viewports, UV edit and sync selection 2019-10-02 16:56:22 +02:00
3734ae5d54 Fix T70331 Node group passthrough is broken 2019-10-02 16:56:22 +02:00
f8f28dc784 Workaround for NVidia broken driver
This disable the indirect drawcall on all Nvidia hardware.

This has to be until nvidia fixes their drivers or instruct us
how to correctly fix the issue.

Related to T70011 Various display issues on NVIDIA
after draw call batching.
2019-10-02 16:56:22 +02:00
d596a6368c Preference: option to use OS-Key to emulate MMB
Alt-LMB is used in quite a few areas now, see T69323
using OS-Key allows these conflicts to be avoided.

Currently disabled for WIN32, since it conflicts with the start menu.
2019-10-03 00:25:06 +10:00
2e97d50d2d Fix T70409: Propagate Pose not updating correctly
The Action was changed without tagging it as such in the depsgraph.
Thanks @sergey for the sanity check!
2019-10-02 16:08:56 +02:00
3052229264 Fix T70358: Use face count in Quadriflow by default
Reviewed By: brecht

Maniphest Tasks: T70358

Differential Revision: https://developer.blender.org/D5958
2019-10-02 16:04:48 +02:00
606af693fb Fix T70310: Difficult to change brush size from big to small
Changing this values should only support horizontal movement as we are no longer trying to match the size of the cursor and the size of the circle preview in the widget.

Reviewed By: brecht

Maniphest Tasks: T70310

Differential Revision: https://developer.blender.org/D5931
2019-10-02 16:00:10 +02:00
29f25da769 Fix T70324: Layer Brush has bad behaviours and create artifacts
Reviewed By: brecht

Maniphest Tasks: T70324

Differential Revision: https://developer.blender.org/D5934
2019-10-02 15:58:35 +02:00
fb62c578bc Fix default cursor blue color
The previous one was too light

Reviewed By: billreynish

Differential Revision: https://developer.blender.org/D5959
2019-10-02 15:57:00 +02:00
ed59c32b0c Fix bug in nearest_vertex_get_finalize
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5965
2019-10-02 15:55:11 +02:00
Antonio Vazquez
ddd40985e7 Fix T70399: Grease Pencil Canvas Grid Overlay Broken after DRW refactor
Now the grid matrix is calculated when the shading group is created.

Also, the grid pass is only created when needed and reduce memory usage when the scene is not using grease pencil objects.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5966
2019-10-02 15:33:20 +02:00
31473070b3 Fix T70443: Crash on sculpting with 'Curve' Stroke Method
Caused by rBc31a849a1474.

Reviewed By: brecht

Maniphest Tasks: T70443

Differential Revision: https://developer.blender.org/D5970
2019-10-02 14:59:11 +02:00
6b38c8a1ac Fix T70441: crash after deleting a material output node
Caused by 5c79f2d0fb.
If no valid node_start is provided, we can just skip (e.g.
'ntree_shader_bump_branches' is not done then, but this is not
neccessary without a valid eevee output node anyways...).

Maniphest Tasks: T70441

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5969
2019-10-02 14:01:07 +02:00
9b034355e4 Fix T70405: Geometry node not linking manual derivatives
Maniphest Tasks: T70405

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5954
2019-10-02 13:55:59 +02:00
0091b84df0 Fix T70268: Render failures with Vector pass active with OptiX in Cycles
Rendering would produce invalid results or crash if the Vector pass was active but motion blur was inactive. This caused the OptiX BVH to be built with motion (because objects reported motion available), but the pipeline to be built without motion support (since with disabled motion blur this is not in the list of requested features). The two are not compatible and therefore caused issues. This patch fixes that by not building the BVH with motion if motion blur is not active (which makes sense).

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5968
2019-10-02 13:23:29 +02:00
Yevgeny Makarov
97ba7f3c32 UI: use consistent names and menu organization for blending modes
The Python API is unchanged and remains compatible.

Differential Revision: https://developer.blender.org/D5830
2019-10-02 13:03:27 +02:00
02877bdf39 Python API: remove unnecessary ELASTIC_DEFORM_ prefix from enum identifiers 2019-10-02 13:01:36 +02:00
01c824ac88 Revert "UI: use correct singular and plural nouns in report messages"
Convention is to use (s) postfix for cases where there can be one or multiple,
so stay consistent with that.

This reverts commit 3e8276311e.
2019-10-02 12:54:56 +02:00
a434b30667 Fix building QuadriFlow with Clang on Windows
Boost 1.68 has a bug in its type_traits where it does not include the right
header for the is_assignable macro when building with Clang. Temporarily work
around it until we upgrade to a newer Boost version that fixes it.

Differential Revision: https://developer.blender.org/D5962
2019-10-02 12:40:55 +02:00
Stefan Werner
f97a64aa9b Fix T70252: Reverting to macOS 10.11 compatible API. 2019-10-02 10:22:26 +02:00
3b23685c7d Cleanup: simplify node modal select implementation
Ref T63994
2019-10-01 21:51:21 +02:00
Dalai Felinto
ec85f0e6a5 Silence remesh building warning 2019-10-01 15:46:28 -03:00
34bd23dbb7 MSVC: Support Building clang+ninja+VS2019
1) Clang was given the wrong VS version to emulate when used in
combination with VS2019 causing build issues.

2) The erroneous supplied parameter `-std::c++11`caused CMake to
fail running its compiler detection scripts.
2019-10-01 12:36:11 -06:00
Yevgeny Makarov
c06350d8a7 UI: "text not found" message in text editor, change type from ERROR to WARNING
Differential Revision: https://developer.blender.org/D5736
2019-10-01 20:32:16 +02:00
Yevgeny Makarov
6348ca9da0 UI: tweak layout of boid brain panel
Differential Revision: https://developer.blender.org/D5684
2019-10-01 20:29:33 +02:00
Sebastian Koenig
32d778a773 Keymap: make plane track corners draggable with lmb
Previously when clicking and dragging with LMB you would only move the entire
plane track. In order to move the corners independently you would have to use
your right mouse button. This would also prevent the context menu to show up.

Now LMB click and drag on corners moves them. If you LMB click and drag one of
the 4 edges of the plane track you would move the entire plane track.

Differential Revision: https://developer.blender.org/D5519
2019-10-01 20:23:24 +02:00
Miguel Porces
cca1649b20 Nodes: discard hidden sockets when grouping a single node.
At the moment, grouping a single node that has hidden sockets, exposes all
sockets in the node group. This patch just filters hidden sockets, so that
the node group's interface remains the same as the node being grouped.

Differential Revision: https://developer.blender.org/D5533
2019-10-01 20:21:17 +02:00
Yevgeny Makarov
b196c42d4a UI: use full width for ID blocks in lattice properties
Differential Revision: https://developer.blender.org/D5722
2019-10-01 20:18:48 +02:00
Yevgeny Makarov
3e8276311e UI: use correct singular and plural nouns in report messages
Differential Revision: https://developer.blender.org/D5729
2019-10-01 20:18:48 +02:00
Jean Da Costa
17f6b4d0f8 Sculpt: slight topology rake performance inprovement.
Produces almost the same result but takes in account all the edges instead
of only four, which gets rid of the need to select specific edges. Also,
added a check to prevent it from destroying boundaries.

Differential Revision: https://developer.blender.org/D5763
2019-10-01 20:18:48 +02:00
Yevgeny Makarov
cd9da385b0 UI: fix misaligned popover arrow near the region edge
Differential Revision: https://developer.blender.org/D5872
2019-10-01 20:10:46 +02:00
Colin Basnett
f0f189de76 Fix ImBuf.load failure showing filename as garbage bytes
Differential Revision: https://developer.blender.org/D5879
2019-10-01 20:10:46 +02:00
Yevgeny Makarov
9cda01caf7 UI: don't align popover buttons with opened popovers
Differential Revision: https://developer.blender.org/D5890
2019-10-01 20:10:46 +02:00
b1b4e00076 Fix T70315: Blender exit with code -6 with message Attempt to free NULL pointer.
This is not actually fixing the real issue here, PackedFile structs are
never supposed to have a NULL pointer - and in that monster .blend file,
the pointer is not NULL, but the actual data chunk has been lost
somehow, so it gets NULL during read process.

Very unlikely we ever know how such corrupted .blend was created though
(there's probably a fair chance that this is not even due to a bug in
Blender, but rather a glitch in filesystem or something).

So for now, ensure at read time that we get a coherent state (i.e.
remove any read PackedFile that would have a NULL data field), and add a
few asserts in relevant code to check we never get NULL data pointer
here.
2019-10-01 20:08:04 +02:00
8dd9172aa2 Fix "motion_blur" tests with OptiX in Cycles
Curves with motion blur produced wrong results with OptiX (T69801). This is because the AABBs for the motion steps were calculated from incorrect attribute data because the offset into the attribute data array was incorrect.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5961
2019-10-01 20:01:51 +02:00
6700027863 Fix T70328: Crash when editing loopcuts with AutoMerge & Split option 2019-10-01 14:54:32 -03:00
72666ae3e7 Brush: default the strength to 1.0
This applies to all paint modes except sculpt and grease pencil brushes.

When painting color or weight it's best to paint the color
the user has selected, without them having to make multiple strokes.
2019-10-02 03:37:29 +10:00
710e4847a0 Cleanup: remove redundant id lookups in versioning code 2019-10-02 03:37:29 +10:00
9f4dca8963 Fix mismatch in brush default versioning
Assign a variable to avoid repetition and having this happen again.
2019-10-02 03:37:28 +10:00
Stefan Werner
5eebd7cc1f Cycles: Fixed Camera inside volumes with Embree turned on.
The Embree backend did not properly recognize when the camera was
inside a volume and ended up ignoring those.
2019-10-01 19:35:56 +02:00
a513586cd2 Cleanup: remove ED_image_paint_tile_remove_masks_all
Masks are now temporary, not part of the persistent undo tiles.
Now they're always freed after the stroke.
2019-10-02 02:13:50 +10:00
8ce14aa21f Cleanup: rename image undo_tile to paint_tile
Clearer because they're no longer the same as undo tiles.
2019-10-02 02:04:37 +10:00
7aff48add0 Cleanup: move image undo into space_image/
This isn't just used for painting.
2019-10-02 01:45:37 +10:00
cc092e9ab0 Cleanup: name of image poll function 2019-10-02 01:45:37 +10:00
825a93d7cd Fix T70317: Equal clip range crashing in Hue Correct & RGB Curves Nodes
It takes many changes to support the drawing of zero-sized curves.
Best skip these cases to avoid crash.
Blender 2.79 had no support either.
2019-10-01 12:26:47 -03:00
b155ece0c0 Image: add resize operator
Now possible with new image undo,
was added for testing but seems generally useful.
2019-10-02 00:44:17 +10:00
151cc02b6f Image: support storing full image buffers for each undo step
Update image undo to store buffers for each step:

- Undo buffers share tiles to avoid using too much memory.
- Undo support for different sized buffers
  allowing operations such as crop or resize.
- Paint tiles have been split into separate API/storage.
- Painting speed wont be impacted significantly
  since storing the extra tiles is done after the stroke & only
  for the first undo step.

Resolves T61263, see D5939 for details.
2019-10-02 00:44:17 +10:00
bdd142bc02 Cleanup: convert some macros to functions 2019-10-01 16:36:29 +02:00
2bddf44b11 Cleanup: avoid multiple active vertex loops 2019-10-01 16:21:10 +02:00
96561dbdf0 Sculpt: enable 3D paint cursor for multires 2019-10-01 16:10:38 +02:00
2090b3e5ac Cleanup: internal sculpt refactoring related to multires, no user visible changes 2019-10-01 16:10:38 +02:00
6b3887da4d Cleanup: slightly more efficient access to PBVH multires grid key 2019-10-01 16:10:38 +02:00
b1baebd022 Cleanup: abstract sculpt floodfill code 2019-10-01 16:10:38 +02:00
8a23657f0f Cleanup: avoid accessors, reduce memory usage, multithread dirty mask 2019-10-01 16:10:38 +02:00
5e98187ddb Cleanup: make sculpt vertex random access API read-only 2019-10-01 16:10:38 +02:00
d3c88336cd Cleanup: prefer PBVH iterator over random vertex access in some places 2019-10-01 16:10:38 +02:00
0230148fb7 Cleanup: avoid unnecessary brush radius test in mask expand 2019-10-01 16:10:38 +02:00
81cc2fd1c1 Cleanup: don't go through sculpt accessor functions multiple times 2019-10-01 16:10:38 +02:00
46285e36e9 Cleanup: compiler warning 2019-10-01 16:10:38 +02:00
1524f414db BLI: optimize GSQueue implementation to allocate in chunks, like BLI_Stack 2019-10-01 16:10:38 +02:00
574265f52f Fix T70206 Texture Paint: UV shadow doesnt show up 2019-10-01 16:02:14 +02:00
5c79f2d0fb Fix T70325 EEVEE: Performance regression with large nodetrees
This was caused by nodeChainIter which is not linear complexity.
Introduce nodeChainIterBackwards to iterate backwards faster.
2019-10-01 16:02:14 +02:00
cba1bdc400 Fix T66641: Certain drivers fail to copy when copying a full scene.
The core of the issue here is that 'make single user' functions still
does its own, manual and quite partial, remapping of IDs, which covers
all most common cases but cannot consider *all* possible ID usages
(especially when it comes to drivers or custom properties, that can
essentially point to any kind of data-blocks).

This fix is merely a band-aid, there is no way to fully solve this
without a complete rewrite of that area of code to make use of modern ID
management code.
2019-10-01 14:48:33 +02:00
f983606063 Cleanup: remove unused variables 2019-10-01 12:55:25 +02:00
e82ac9e596 Fix T70376: Lattice point looses state on modeswitch when shape keys are
present

Selection state of lattice points as well as their weight were not kept
when going in and out of editmode, code would just copy positions.
Now copy the whole BPoint instead.

Reviewers: campbellbarton

Maniphest Tasks: T70376

Differential Revision: https://developer.blender.org/D5948
2019-10-01 12:53:23 +02:00
c9b9803a77 RNA: add check for zero step arguments
Avoids errors like T70281 slipping through.
2019-10-01 20:30:18 +10:00
ba798e0412 Image/Clip Space: Add view center to cursor operators
D5932 by @a.monti with edits
2019-10-01 20:20:53 +10:00
3370af2dc1 Fix T70281: Changing Default interpolation also changes curve of new drivers
Having a constant FCurve doesn't make sense for drivers; either linear
or Bezier should be used. Since the code is already creating a Bezier
curve, I just added the flag to not look at the user preferences in this
case.

Reviewed by: angavrilov

Differential Revision: https://developer.blender.org/D5921
2019-10-01 11:56:32 +02:00
2746fbc935 Fix T70397: Dilate/Erode 'distance' increment/decrement arrows not
working

Since rB78b56fa7d973 we always have to specify a valid step value.
2019-10-01 10:24:07 +02:00
b0e7108eda Cleanup: use doxy sections for clip_ops.c 2019-10-01 18:03:33 +10:00
4101d3e400 UI: Changes to Paint Cursors
Changes to cursors that can be used for painting and sculpting.

Differential Revision: https://developer.blender.org/D5951

Reviewed by Brecht Van Lommel
2019-09-30 16:46:05 -07:00
60a827a2a9 UI: Update paint crosshair for Mac
This is based on feedback from users.
Only affects Mac for now, Windows will be committed separately.
2019-10-01 00:00:06 +02:00
9411b0a3c7 Cleanup: use PyC_StringEnum to path access functions
This gives better error messages, simplify code.
2019-10-01 05:19:38 +10:00
aba6fc8208 ImBuf Py API: implement resize method argument 2019-10-01 05:18:30 +10:00
07feb6e814 PyC API: utility to parse a string as an RNA like enum
More convenient than comparing strings,
with the advantage that errors don't need to repeat expected values.
2019-10-01 05:18:25 +10:00
Julian Eisel
ddb157999e UI: Remember File Browser Display Options in Preferences
This makes it so that some display related properties of the file
browser state are remembered in the Preferences. Otherwise, users often
end up doing the same set up work over and over again, so this is a
nice way to save users some work.
It's typical for other file browsers to remember their state too, so
another benefit is having a more conventional behavior, meeting user
expectations better.

Some points:
 * We currently store: Window size, display type, thumbnail size,
   enabled details-columns, sort options, "Show Hidden" option. More can
   be added easily.
 * No changes are stored to the Preferences if "Auto-save Preferences"
   is disabled. This is how Quick Favorites behave too and it's a
   reasonable way to make this behavior optional.
 * The Preferences are only saved to permanent memory upon closing
   Blender, following existing convention of Preferences and Quick
   Favorites.
 * If settings weren't actually changed, Preference saving is skipped.
 * Only temporary file browsers save their state (invoked through
   actions like open or save), not regular file browser editors. These
   are usually used for different purposes and workflows.
 * Removes "Show Thumbnails" Preferences option. It would need some
   special handling, possibly introducing bugs. For users, this
   simplifies behavior and should make things more predictable.
   Left in DNA data in case we decide to bring it back.

Reviewers: brecht, #user_interface, billreynish, campbellbarton

Reviewed By: #user_interface, William Reynish, Campbell Barton, Brecht
             van Lommel (quick first pass review in person)

Maniphest Tasks: T69460

Differential Revision: https://developer.blender.org/D5893
2019-09-30 19:27:02 +02:00
5940f6b3d9 Fix T58683: Reload Scripts breaks toolbar button formatting
Add a function which clears internal cached operator pointers,
run before reloading scripts.
2019-10-01 01:59:31 +10:00
68c2f7a2d0 Revert "Fix T58683: Reload Scripts breaks toolbar button formatting."
This reverts commit ba90d2efa5.

This can be resolved without adding a boolean to all operator types
to check if it's "WM_OT_tool_set_by_id".
2019-10-01 01:57:51 +10:00
6a6ac502f2 Cleanup: unused arguments 2019-10-01 01:57:51 +10:00
bb0b46f78c GPU: Make sure workaround is supported
`context_local_shaders_workaround` is only supported on OpenGL 4.1 or higher.
2019-09-30 12:15:31 -03:00
7dc70feb63 GPencil: Fix unreported keymap missing for Extrude tool
For some reason this keymap was removed and is required to avoid console warnings.
2019-09-30 17:13:31 +02:00
fae5348307 Fix T70375: Typo in label (Height used instead of High).
Also, use Title Caps for labels...
2019-09-30 16:03:21 +02:00
e8f6f70846 PBVH: PBVH_FullyMasked and PBVH_FullyUnmasked flags
This commit introduces flags to tag the PBVH nodes as fully masked or unmasked. This is used in do_brush_actions to filter fully masked nodes during a stroke. Other tools can also be updated to use this flags.
Sculpt updates now require a flag to update the mask or the vertex coordinates.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5935
2019-09-30 15:58:03 +02:00
3dc027add3 Fix T70385: Pose brush breaks when using pose origin offset
Reviewed By: jbakker

Maniphest Tasks: T70385

Differential Revision: https://developer.blender.org/D5945
2019-09-30 15:45:27 +02:00
b89a1687ce Fix "denoise_animation" tests with OptiX in Cycles
The OptiX device only loads the denoising kernels when the "use_denoising" feature is active. This was not set by the calling code however and therefore they were never loaded and attempting to launch them failed (see T69801).

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5946
2019-09-30 15:38:07 +02:00
61efeb6df9 Fix PBVH search callback in pose and elastic deform
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5947
2019-09-30 14:58:22 +02:00
6b419c18b0 Sculpt: Only redraw nodes where the mask changed
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5923
2019-09-30 14:37:19 +02:00
91f6aa6a57 Fix memory leak after using OptiX in Cycles
The "optix_devices" array was not freed on exit, which caused a memory leak (see T69801).

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5944
2019-09-30 14:05:40 +02:00
04ef62177f UI: Use paint crosshair cursor in all paint & sculpt modes
Currently, we use the crosshair cursor in Sculpt mode, but not in the other paint modes.

  - Sculpt Mode: This crosshair cursor is too weighty.
  - Texture, Weight, Vertex Paint: Using the arrow cursor for painting is not right.

This commit makes the following changes:

  - Use the new special paint crosshair instead
  - Use this cursor in all paint modes, not just Sculpt

Reviewed by: Brecht

Differential Revision: https://developer.blender.org/D5940
2019-09-30 13:33:54 +02:00
56854bd177 Fix RNA's "editable" func regarding IDProps and override.
`RNA_property_overridable_get()` need the original RNA property (i.e.
the actual IDProp in case it is one), not the 'proxy' type property
returned by `rna_ensure_property()` for IDProps.

Makes custom properties of library overrides editable at last, now we
only have to keep them overridden values!
2019-09-30 11:01:29 +02:00
64c8e9a219 macOS: don't require python3 to be installed to run "make update"
And fall back to python3 from our libraries for other commands, once checked
out with make update.
2019-09-30 10:51:17 +02:00
a6a0a09197 Cleanup: spelling 2019-09-30 17:07:05 +10:00
Stefan Werner
04133ee863 Revert "macOS: Replaced OSSpinLock with os_unfair_lock."
This reverts commit 9d282d7a8d.
os_unfair_lock requires macOS 10.12 or newer.
2019-09-30 08:29:17 +02:00
64c222ff58 Fix T69334: VSE Very low framerate
Revert "Sequencer: use Alpha Over blend mode by default"

This reverts commit 7c6c5b40ca.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5943
2019-09-29 16:17:56 -07:00
cdcb844d27 Fix T69684: Sound Strip "Pan" function is misleading
Gray-out pan property when sound mono property is unset.

Reviewed By: billreynish

Differential Revision: https://developer.blender.org/D5806
2019-09-29 16:14:42 -07:00
ff10ff782b Fix wrong sculpt flat shaded normals after recent optimizations 2019-09-29 23:43:16 +02:00
24be998b98 Fix T70345: wrong transforms of objects after recent NVIDIA workaround
This reverts commit 44d042094e and adds a
simpler workaround for just the node links display issue. There are other
issues though so this is not a full workaround.
2019-09-29 21:10:12 +02:00
56fe8239ab Fix T70320: View clipping doesn't hide extra wireframe 2019-09-30 04:50:22 +10:00
3a3e5fb365 Fix T69935: Silence Win32 OS Error Dialogs
Call SetErrorMode() at startup to prevent error mode dialogs.

Differential Revision: https://developer.blender.org/D5941

Reviewed by Brecht Van Lommel
2019-09-29 11:43:24 -07:00
Julian Eisel
98c0d16da5 UI: Use responive layout for upper bar in file browser
The upper bar (containing file path, navigation and display buttons) may
now be split into two rows as horizontal space is reduced.
The first row contains the navigation related buttons, the lower one the
filter and display related ones.

Mainly solves the issue where the file path and search buttons became
barely usable in tight layouts, but generally makes things better for
such cases.
2019-09-29 20:37:51 +02:00
Julian Eisel
57519f237a UI: Let file browser tool/bookmarks region push upper bar in
Main reason for doing this is that the navigation buttons are very
close to the file list now, making them much faster to reach.

Initially we let the upper bar (the one with the file path, navigation
and display buttons) use full area width, because designs back then had
more horizontal space problems. The designs have changed meanwhile, and
horizontal space is less of an issue.

However, when the file browser is shrunk horizontally, or if it's open
in a small area (e.g. see "Shading" workspace), having the tool region
open brings back the space issues. But even the file list layout becomes
problematic then, and the same issue was present before the new file
browser design, so we've decided this is an acceptable tradeoff.
2019-09-29 20:37:51 +02:00
02c4410a37 Cleanup: use doxy sections for image_ops.c 2019-09-30 03:47:54 +10:00
Julian Eisel
f8b57dbb81 Keymaps: Don't show confirm prompt when creating directories
* We don't show the prompt when invoked through the button either
* Creating directories isn't a destructive action and it's not dangerous
* The prompt is annoying and users often requested getting rid of it

This change is applied to both, the default and the industry compatible
keymap.
2019-09-29 18:45:52 +02:00
860854b07f Fix (workaround) memory leak cancelling sculpt mask expand 2019-09-29 16:22:09 +02:00
0fd3723b95 Fix small memory leaks in some sculpt tools
Also use MEM_SAFE_FREE to simplify code.
2019-09-29 16:22:09 +02:00
0ffb96f701 Sculpt: minor optimizations for GPU draw buffer filling
Ref T70295
2019-09-29 16:22:09 +02:00
9b0fd5ef2a Sculpt: only update draw buffers for visible nodes during paint stroke
Also applies to some other sculpt tools like filter and mask expand.

The full update happens after the paint stroke is finished, so it does not
happen on view navigation, which would cause a delay.

Ref T70295

Differential Revision: https://developer.blender.org/D5922
2019-09-29 16:22:09 +02:00
f6fc863acd Sculpt: multithread GPU draw buffer filling for workbench
This improves performance of some sculpt tools, particularly those that modify
many vertices like filter and mask tools, or use brushes with large radius.

For mask expand it can make updates up to 2x faster on heavy meshes, but for
most tools it's more on the order of 1-1.1x. There are bigger bottlenecks to
solve, like normal updates.

Ref T70295

Differential Revision: https://developer.blender.org/D5926
2019-09-29 15:28:15 +02:00
c931a0057f Sculpt: use dynamic scheduling and chunk size 1 for multithreading
This is under the assumptions that each node has enough work to avoid
the threading overhead, while also having a possible variable amount of
work. For example most of the vertices being masked or outside of the
brush radius.

Improves performance by about 10% for tools like mesh filter on an
entire 3 million poly mesh, tested on a quad core.

Ref T68873
2019-09-29 15:27:37 +02:00
8b00a73620 Cleanup: move sculpt parallel range threading test into function
Easier to experiment with different settings this way.
2019-09-29 15:27:37 +02:00
1ca105ebdc Sculpt: disable workbench anti-aliasing during stroke painting
This mostly happens automatically anyway since there is usually not enough
time left over for it. But when it does it happen it breaks partial redraw,
and may also have a negative impact on responsiveness.

Ref T70295
2019-09-29 15:27:37 +02:00
c31a849a14 Fix wrong sculpt cursor drawing when using "ignore_background_click"
Not all the necessary state got restored.
2019-09-29 15:04:10 +02:00
ba90d2efa5 Fix T58683: Reload Scripts breaks toolbar button formatting.
Assuming it's actually necessary to do this check very efficiently,
replace the hack based on caching a pointer, with a different one
that caches the string comparison result in the operator object.
2019-09-29 09:28:02 +03:00
44d042094e GPU: Workaround for broken node links on NVidia drivers
Related to T70011 and T70008
2019-09-29 01:19:45 +02:00
2c7365aec7 Fix unnecessary use of atomics in PBVH normal update 2019-09-28 12:29:52 +02:00
5bace9f5dd Cleanup: compiler warnings 2019-09-28 12:29:52 +02:00
b192c01254 Fix build error on Windows 2019-09-28 12:29:07 +02:00
7ea1b8451e Drivers: fix transform channel panel for W rotation and quaternions. 2019-09-28 10:31:51 +03:00
775a13dea0 RNA: fix the name of the parent inverse matrix in Data API Outliner view. 2019-09-28 10:14:46 +03:00
a2457dd7bb Debug: add 888 and 889 debug values for redraw and PBVH node visualizatons
More convenient to use the debug menu than having to modify code every time.
2019-09-28 01:35:53 +02:00
1c1a3198af EEVEE: Speedup: Don't request orco layer if not needed
Should speed up eevee mesh update a tiny bit in certain particular cases
(deform modifier + (shader using texcoord (but not generated output) OR
principled bsdf OR geometry node (except tangent output))).
2019-09-28 00:44:16 +02:00
ad22d3111f Fix T70226 EEVEE: Crash/Assert entering edit mode with instanced meshes...
... and modifiers.

This was caused by wrong mesh being taken into account when in edit mode.
2019-09-28 00:44:16 +02:00
6cbfa8d511 GPencil: Fix compiler warning 2019-09-27 23:23:25 +02:00
1b36c91831 Cleanup: Remove // comments 2019-09-27 23:15:09 +02:00
972edc93d7 Cleanup: Remove blank at the end of tooltip 2019-09-27 23:05:29 +02:00
8ac21cb40a fix:wrong python pdb copied for Windows-VS when building for pydebug 2019-09-27 22:59:08 +02:00
50931192aa UI: small tweaks to sculpt tool icons
Snake Hook: make it more clearly different from Grab, and also better communicate what it can do
Pose: remove arrow, which was hard to see anyway
Pinch: make arrows larger and more visible
2019-09-27 21:12:13 +02:00
387fe3607d UI: Add high quality cursors on macOS
This adds the same high quality cursors on macOS as we have on Windows.

These are stored as 32*32 pt PDFs, same as the built-in OS cursors

Reviewed by: Brecht Van Lommel

Differential Revision: https://developer.blender.org/D5907
2019-09-27 20:41:22 +02:00
e51b93473a Fix T70247 Crash on enter edit mode with UV editor opened 2019-09-27 19:45:27 +02:00
be985bdde2 Sculpt: Sculpt cursor UX improvements
This commit introduces the following changes:
- Invert the direction of the brush strength WM control. It was working in the opposite direction to any other control in Blender. Now dragging to the right increases the strength.
- Increase the alpha of the cursor
- Remove the font shadow of the numbers in the WM control. It was adding too much visual noise when rendered on top of the brush alpha
- Add a second circle to preview the strength in the cursor
- Increase the resolution of the cursor circles. Now they look smooth even when working with large brush sizes.
- Add a line preview to display the brush curve
- Don't offset the cursor preview when changing size and strength

Reviewed By: billreynish, brecht

Differential Revision: https://developer.blender.org/D5889
2019-09-27 19:16:03 +02:00
c372318165 Voxel remesh: Enable adaptivity
This commit enables OpenVDB adaptivity in the voxel remesher. It can be useful to reduce the polygon count if you want to switch to dyntopo after using the voxel remesher workflow.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5918
2019-09-27 19:12:51 +02:00
82136bb36e Sculpt: Use func_finalize instead of mutex
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5905
2019-09-27 18:41:24 +02:00
6a74b7c14b Sculpt: Pose brush origin offset
With the previous behavior, it was impossible to manipulate areas with a lot of complex shapes like fingers, as the pose origin was calculated only with the topology inside the radius.
With pose offset, the previous method is used to calculate the direction of the "bone", and an extra offset is added on top of it. This way you can set the pose origin in the correct place in this kind of situations. The pose factor grows to fit the new rotation origin.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D5841
2019-09-27 18:35:42 +02:00
7ae549448e Fix T70291: Sculpt remesh inverts normal when fix poles is activated
Reviewed By: brecht

Maniphest Tasks: T70291

Differential Revision: https://developer.blender.org/D5916
2019-09-27 17:50:12 +02:00
9df9fb3324 Fix T56497: Snake hook sculpt brush slips off and affects the part of the mesh behind
We should not be updating the cache true location there.
This commit also fixes the snake hook default alpha.

Reviewed By: brecht

Maniphest Tasks: T56497

Differential Revision: https://developer.blender.org/D5915
2019-09-27 17:48:28 +02:00
97f4d4c66e Fix T70280: QuadriFlow remesh with "Use Paint Symmetry" and "Smooth Normals" may give wrong normals
Reviewed By: jbakker

Maniphest Tasks: T70280

Differential Revision: https://developer.blender.org/D5904
2019-09-27 17:46:56 +02:00
2bef8c5ea8 Sculpt: Enable accumulate in scrape brush
This fixes some artifacts when working on curved surfaces. Previous
behavior was with accumulate on, so that is now the default.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D5826
2019-09-27 17:45:13 +02:00
7bbdc6996a Fix T69941 Assert selecting UVs
Was caused by DRW_mesh_batch_cache_get_edituv_faces_stretch_area called
after DRW_mesh_batch_cache_create_requested. So it was created on the wrong
object/mesh.
2019-09-27 17:19:00 +02:00
b22afef72c Cleanup: Replace 'add mode' short for driver FCurve creation with an enum
The 'add mode' was a `short` between -1 and 2 inclusive, and magic numbers
sprinkled throughout the code. It's now an enum with descriptive names.

No functional changes.
2019-09-27 17:02:39 +02:00
3c7707b49f GPencil: New Brush default settings
This patch replaces D5787. Now instead to replace the startup.blend file, all the changes are done in versioning and moved to shared module to be reused by Brush reset.

Reviewers: brecht, mendio

Reviewed By: brecht

Subscribers: pepeland, mendio

Differential Revision: https://developer.blender.org/D5913
2019-09-27 16:52:50 +02:00
c69a771851 GPencil: Simplify smooth average factor calculation
As always uses 4 points, don't need to do calculations for that and also it was wrong with 3 points.
2019-09-27 16:43:31 +02:00
df3891ed81 Fix T69377 Texture flickering when selecting in solid viewport (AMD Pro driver)
Workaround that does not fix the real issue.

The bug is caused by glBufferData inside
DRW_instance_buffer_finish > GPU_vertbuf_use
but only after the selection code which resets the number of items in
idatalist->pool_buffers.

I don't understand why this is happening as the vbo ids are all valid and
no error is reported. What is even more strange, is that it affects another
vbo which has no connection with the ones in DRW_instance_buffer_finish.
2019-09-27 15:31:18 +02:00
c601839176 Fix T70106 Objects with multiple materials are not displaying correctly
Seems to be an issue with OSX and loading objects matrices from uniform
buffers.

Using legacy path for that reason.
2019-09-27 15:31:18 +02:00
12688a6636 GPencil: New smart smooth for strokes
When using the samples, the interpolated points get abrupt steps because the system cannot receive all events in a short period of time.

This is more noticeable when the samples are set to 10 and the pen is moved very fast. The problem with post-processing smooth is that is applied to all stroke and this removes details.

The smart smooth is automatic and detect only the segments in the stroke where the system was unable to capture all movements and apply a smooth algorithm.
2019-09-27 15:28:32 +02:00
770e91703d Fix part of T70295: sculpt drawing not clipping PBVH behind the camera
Use all 6 clipping planes for drawing.
2019-09-27 14:59:41 +02:00
d3a98b2c3b Fix part of T70295: sculpt drawing not clipping PBVH nodes outside of viewport
As before in 2.7, this only works for optimized drawing in workbench mode.
2019-09-27 14:29:40 +02:00
0901a72b6b Cleanup: use consistent clipping plane sign convention 2019-09-27 14:24:49 +02:00
c5db0272d4 Fix T70276: View animation with jpeg 2000 image will crash player
Since our ffmpeg is built with openjpeg support and thus can decode jpeg
2000 (in both J2K and JP2 codec flavors as well as high bitdepths), added
these extensions to the supported list.

Also IMB_ispic > IMB_ispic_type > imb_is_a_jp2 was only testing for jp2,
now do both jp2/j2k.

Reviewers: brecht

Maniphest Tasks: T70276

Differential Revision: https://developer.blender.org/D5909
2019-09-27 12:02:08 +02:00
4b206d9a51 Cleanup: remove unused function 2019-09-27 18:04:44 +10:00
92686c667e Cleanup: structs, cmake file lists 2019-09-27 12:45:54 +10:00
7ae85b54d7 Cleanup: clang-format 2019-09-27 12:37:53 +10:00
c43018cdc0 Fix T69814: Grease Pencil Onion Skin Loop doesn't work as expected
The first element of the loop was not calculated for all onion modes. For select mode the first selected is used, for other modes the first frame in the layer is used.
2019-09-26 18:04:36 +02:00
7ac581cb1b Cleanup: clang format for particle loop macros
See https://developer.blender.org/D5903

Reviewers: JacquesLucke
2019-09-26 17:55:51 +02:00
b0d3ed3d20 clang-format: add particle loop macros
This is so the '{' will be on the same line for those as well.

Reviewers: JacquesLucke

Differential Revision: https://developer.blender.org/D5903
2019-09-26 17:52:49 +02:00
db4571f3c3 Fix T68645: Hair Particle Edit - Particle Mirror crash when children are
visible in the viewport

Seems to be an issue of not correctly freeing the PTCacheEdit (see
T68645 for details), after discussion with sergey we went with the quick
and dirty fix to free the path cache early for now. Other solution of
freeing it in 'psys_cache_paths' for the non-evaluated psys [which would
also fix the particle delete, then undo crash from T69000] needs more
deep investigation and, possibly, reconsideration.

Reviewers: sergey

Maniphest Tasks: T68645

Differential Revision: https://developer.blender.org/D5755
2019-09-26 17:35:17 +02:00
cf2c09002f Fix T69488: Hair particles: rekey disolves the hair then crashes
Caused by rB914427afd512.

Since above commit 'pe_get_current' checks for an active depsgraph. This
caused the skipping of handling
`PT_CACHE_EDIT_UPDATE_PARTICLE_FROM_EVAL`for everything calling
`PE_get_current` (this passes a NULL depsgraph as opposed to
`PE_create_current`). So we now pass a depsgraph here as well...

Note there are two RNA cases where we pass NULL, namely
- rna_ParticleEdit_editable_get
- rna_ParticleEdit_hair_get
I guess these should be fine though (no functional change to current
master)

Reviewers: sergey

Maniphest Tasks: T69488

Differential Revision: https://developer.blender.org/D5752
2019-09-26 17:27:43 +02:00
6a33e3b990 Cleanup: compiler warnings 2019-09-26 17:25:16 +02:00
a933237d68 Fix accumulate in Draw Sharp brush
Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D5814
2019-09-26 16:56:34 +02:00
e5c9bf3aa2 Quadriflow: Symmetry support
This patch adds paint symmetry support to Quadriflow. It bisects and mirrors the input and the output from the remesher to build the final mesh using the preserve boundary option.
This is also an important performance improvement in Quadriflow because it only needs to process half of the mesh with half the resolution.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D5855
2019-09-26 16:43:35 +02:00
b7f27996e7 Cleanup: fix compiler warnings 2019-09-26 16:32:27 +02:00
09dc7bce37 Fix Cycles bake panel showing for other renderers, after recent changes 2019-09-26 16:30:41 +02:00
454c1a5de4 Voxel Remesh: Fix poles and preserve volume
This commit fixes most of the issues we currently have in the voxel remesher. Mesh volume is preserved when doing multiple iterations, so the sculpt won't shrink and smooth each time you run the remesher. Mesh topology is much better, fixing most issues related to mask extraction and other topology based operations.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D5863
2019-09-26 16:30:25 +02:00
da84bd3c11 Cleanup: cursor header file 2019-09-26 16:26:04 +02:00
da63ac5576 Cleanup: remove unused cursors without high resolution image 2019-09-26 16:26:04 +02:00
a0d4c2e607 Sculpt: Brush default settings
- Update default values of current tools
  - Create default values for new sculpt tools
  - Update the color of the cursor to match the color of the tool icon

Reviewed By: jbakker, brecht

Maniphest Tasks: T68745

Differential Revision: https://developer.blender.org/D5813
2019-09-26 16:15:18 +02:00
4d89667663 Fix sequencer Metadata panel sidebar panel to show at the bottom, not the top 2019-09-26 16:07:36 +02:00
7c544626b7 Sculpt: UI fixes and improvements
- Fix vertical spacing in grab brush grab active vertex option
- Move Remesher popover in the top bar to the right of Dyntopo
- Move topology automasking to the options subpanel
- Remove voxel remesher button from the topbar
- Add default shortcut to voxel remesher [Ctrl R]
- Add default shortcut to quadriflow [Ctrl Alt R]
- Add set pivot position operator to the sculpt menu

Reviewed By: billreynish

Differential Revision: https://developer.blender.org/D5880
2019-09-26 16:01:54 +02:00
5603725389 Fix T70126: Can't Snap To Vertex With Rigidbody
The idea is to ignore dependency which comes via rigid body solver.

Reviewers: mano-wii

Reviewed By: mano-wii

Differential Revision: https://developer.blender.org/D5900
2019-09-26 15:25:21 +02:00
5a7fee8132 RNA Manual Reference Update 2019-09-26 09:22:06 -04:00
0ac7b51dee Fix T70107 EEVEE: Crash using Irradiance Volume with Curve inside
This was more of a general nvidia driver bug. Was caused by a
drawcall that had 0 vertex count. This worked in normal drawcalls
but not in indirect drawcalls.
2019-09-26 15:48:29 +02:00
c525d0e3ae Object Mode: Fix missing ubo assert with irradiance grid 2019-09-26 15:48:29 +02:00
e02ecd599b Fix T70259: Hair particle point selection if 'use_fade_time' is set
If fade_time is used, particles would be flagged PEK_HIDE (depending on
time settings), but since this is not respected in drawing in 2.8 yet
the user would have no indication of them keys being hidden.
Also doing this for hair doesnt make much sense anyways...

Reviewers: jacqueslucke

Maniphest Tasks: T70259

Differential Revision: https://developer.blender.org/D5901
2019-09-26 15:01:06 +02:00
39d855f8f3 Fix particle lasso selecting non-visible keys
Even though hidden/faded keys are not supported in drawing in 2.8 yet,
the selection tools should not be able to select non-visible keys.

Spotted while looking into T70259

Reviewers: JacquesLucke

Differential Revision: https://developer.blender.org/D5902
2019-09-26 14:41:36 +02:00
b07db54cad Cleanup: clang-format 2019-09-26 14:37:30 +02:00
e56f71d03f Grease Pencil: use standard eraser and paint brush cursors
Ref D5197
2019-09-26 14:31:52 +02:00
47fdac8ad9 WM: always use standard cursors from GHOST when available, over custom ones
Fixes T62417: poorly visible cursors on high Windows DPI displays

Ref D5197
2019-09-26 14:31:51 +02:00
583beea3ee WM: refresh custom cursors designs, add a few more cursors
Cursors designed by Duarte Farrajota Ramos.

Also fixes misnamed vertical and horizontal split cursors.

Ref D5197
2019-09-26 14:31:50 +02:00
b29ad7c91a WM: clean up cursors constants and code
There was a mix of old and new constants. Now have one list of WM_CURSOR_*
cursor types, using GHOST standard cursors when available and otherwise falling
back to our custom cursors.

Ref D5197
2019-09-26 14:31:48 +02:00
3bf4610347 GHOST: refresh standard cursors available for platforms
* Add more standard cursor types, that platforms can optionally support.
* Remove a few unused cursor types that were not properly supported and
  would show the wrong cursor when used.
* Add native cursor files for Windows. These scale well with DPI and have
  anti-aliasing. Designed by Duarte Farrajota Ramos.

Ref D5197
2019-09-26 14:31:47 +02:00
6292cab193 GHOST: add GHOST_HasWindowCursorShape() to test if standard cursor exists
Ref D5197
2019-09-26 14:31:43 +02:00
bab6ede286 Fix (unreported) (2d) paint cursor always drawing in half alpha
Own mistake in rB078fcc62534c (should only switch to half alpha if we
draw the second pressure circle as well...)
2019-09-26 14:19:47 +02:00
f547c396e1 Fix T70260: Stencil Paint Overlay Broken
own error in rB078fcc62534c (doing the overlay only in 3d painting)
2019-09-26 14:19:47 +02:00
cbf2d23ff2 CleanUp
Removed unused define in `edit_mesh_mode.c`
2019-09-26 13:32:55 +02:00
24afa26a50 Clean up
Unused framebuffers in `edit_mesh_mode.c`
2019-09-26 12:56:20 +02:00
bb74bd243f Code Cleanup
Removed unused shading groups in `edit_mesh_mode.c`
2019-09-26 12:37:39 +02:00
ae5bf4c2c8 Fix T67732: metadata "Include Labels" checkbox doesn't work when "Use Strip Metadata" is checked
The 'metadata from sequencer strip' system was using the
`stampdata_from_template()` function, which ignored the 'Use Labels'
setting.
2019-09-26 12:05:40 +02:00
8a7085b9d4 Fix T70163: Error painting with Subdivision at end of stack
Deformation of subdivision surface modifier was using wrong coordinates
for the coarse mesh: as the modifier flow goes the coordinates are to be
taken from the input array of coordinates.
2019-09-26 12:01:52 +02:00
ee47075449 Fix: T70251 update license from gplv2 to v3 in exe properties 2019-09-25 14:42:53 -06:00
f9d7f690b2 Fix T69639: Bevel Info bar Width value not affected by Unit Scale 2019-09-25 17:05:53 -03:00
abc8d6b12c Cleanup: Modernize Smooth modifier code.
Simplify it a bit, hopefully make it clearer, better var names, use
proper types for arrays of vectors, etc.

No behavioral change expected (except for corner-case of vertices being
used by more than 255 edges, which were sort of 'clamped' to those 255
first edges for the smoothed position computation previously, now we use
proper integer, which fixes that bug).
2019-09-25 21:51:13 +02:00
Laurent Noel
ae755c0167 Windows: Fill ProductVersion of blender executable
On windows, the ProductVersion field of the blender executable was empty,
see [1] for more information. This field might be required by windows
tools such as SCCM agent to track usage statistics.

It seems that it was due to the BLEN_VER_RC_STR macro used in
winblender.rc not being a string.

[1] https://docs.microsoft.com/en-us/windows/win32/menurc/versioninfo-resource

Differential Revision: https://developer.blender.org/D5896
2019-09-25 12:06:20 -06:00
9e62cca29d Fix T69542: Corrective Smooth modifier breaks when drivers are involved
Previously the cache for the modifier would not be invalidated if
modifier settings were changed with drivers or keyframes.

Now we compare the current setting with the ones used to generate the
cache and invalidate the cache if they differ.

Reviewed By: Sybren

Differential Revision: http://developer.blender.org/D5694
2019-09-25 16:47:51 +02:00
b393b13524 Fix T70231: GPencil - Moving very fast tablet pen gets ugly stroke ends
When move very fast the pen using a tablet, the end of the strokes was very ugly if the sampling was enabled. The reason for that is the last point and the previous one was interpolated in distance, but not in pressure and strength.

This commit uses several processes to get better endings:

a) If the pressure at the end of the stroke is very low, this part of the stroke is removed. This is a common issue with some tablet that send events with very low pressure when the pen is raised from drawing surface.
b)  The interpolated points created by sampling are interpolated in strength and pressure to get a smooth transition.
c) Active smooth also uses the strength. Before only pressure was used.
2019-09-25 16:13:57 +02:00
f8da7218be Fix T70187: GPU Driver: Merge Vertices Crashes ATI/Linux/OpenSource
This has been tested with 18.2.2, 19.0.8 and 19.3.0~develop.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5886
2019-09-25 15:57:34 +02:00
b651ac6531 Removed auto generated config.h file from quadriflow
The config.h file is autogenerated during compile by a 3rd party library
quadriflow uses. Now we put this file in the build directory to avoid
adding this to the git repository in the future.
2019-09-25 15:55:36 +02:00
f9ef0e1bde Fix T67342 EEVEE: Uninitialized buffer when changing screen size
Was caused by some drawcall not being done if the volumetric resolve pass
was drawn (using dual source blending seems to be the cause).
Not sure why this is needed since it is still reset before the next
drawcall.
2019-09-25 15:37:42 +02:00
7d09c943f6 make.bat: Fix rebuilds with custom build directory.
When calling make.bat multiple times to rebuild blender
make.bat failed to rebuild if a custom build dir was set.

reported and fixed on chat by @dgsantana
2019-09-25 07:17:06 -06:00
1ca5c8491d Pose paste: avoid auto-keying on unselected bones when 'selection only' is enabled
The `pose_bone_do_paste()` function is documented to only return a
non-NULL pointer on a successful paste, and the one caller that checks
the return value is expecting this behaviour. However, before this
commit, when a valid pose channel was found, 'Selected Only' was
enabled, and the bone was not selected, the function would still return
non-NULL. This resulted in auto-keying pose channels that were not
pasted.

Reviewed by: angavrilov

Differential Revision: https://developer.blender.org/D5891
2019-09-25 15:07:57 +02:00
2507b6a489 Added missing documentation for options parameter in keyframe_insert()
The RNA docstring of `keyframe_insert()` didn't mention the `options`
parameter in the function signature.

No functional changes.
2019-09-25 15:04:20 +02:00
615d5fa2fb Motion paths: Use minimal possible dependency graph
This change makes it so motion paths are using minimal possible
dependency graph which is sufficient to evaluate required motion
path targets.

Disclaimer: granularity is done on ID level, but it is possible
to go more granular if really needed.

Brings time down to 0.5 sec when updating motion path for the
Rain animation file used for benchmarks in the previous commits.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5874
2019-09-25 14:40:06 +02:00
eb2ed0ea7a Depsgraph: Implement builder from given set of IDs
The title explains it all actually: this commit introduces special
dependency graph builder API which builds graph which is sufficient
to evaluate given set of IDs.
2019-09-25 14:40:06 +02:00
6aadfa243d Depsgraph: Mark build methods as virtual
Allows to override behavior in a subclasses.

Currently no functional changes. The penalty of calls being virtual
should be neglectable.
2019-09-25 14:40:06 +02:00
c0855f77c0 Depsgraph: Move proxy group and from building to own function
Currently no functional changes, but allows to make it more clear to
implement depsgraph construction from a given subset of scene.
2019-09-25 14:40:06 +02:00
e7507c16e8 Motion paths: Limit updates to changed frame range only
The idea is to only update parts of motion paths which lies between
keyframes around changed frame.

The changed frames are considered to be from second previous to
second next one to work correctly with bezier handles interpolation.

Brings updates in the Rain test animation file from around 11 sec
down to 1 sec.
2019-09-25 14:40:05 +02:00
4db2a08281 Motion paths: Refactor, make update range more explicit
Allows to have a higher versatility in the API.

Should be no functional changes.
2019-09-25 14:40:05 +02:00
c77a0d7dc6 Motion paths: Cleanup, de-duplicate code 2019-09-25 14:40:05 +02:00
7b83ea5c6d LibOverride: tweaks to custom props UI.
For now, do not allow to add custom props to overriding IDs (this should
be possible in the future, by getting basic correct behavior here is
already fairly hard, no reason to complicate things even more).

Also, properly disallow editing of existing custom props in overriding IDs.
2019-09-25 14:27:47 +02:00
1c624a1219 LibOverride: Fix 'overridable' flag desapearing when setting IDProp from py code.
Do not see any reason not to copy over the flag of the old, existing
IDProp to the new one when assigning (e.g. `C.object['prop'] = 0.5`
would nuke that IDProp flag).
2019-09-25 14:27:47 +02:00
1201352217 LibOverride: Fix several issues in handling of overridable status for IDProps.
The triple possible status of an PropertyRNA (actual C-defined prop,
py-defined IDprop behaving similar ot RNA one, or actual 'pure' custom
prop) is really confusing... Not to mention the _RNA_UI ugly thingy on
top of that. :/
2019-09-25 14:27:47 +02:00
ef60cf8fca Cleanup: remove override's 'static' references in some py API docs strings. 2019-09-25 14:27:47 +02:00
a1e40087c5 Cycles: Fix undefined behavior which can causes crashes with a misaligned address error
Cycles casts a pointer from ShaderDataTinyStorage to ShaderData, these structs by default had different alignments however (the former was 1-byte aligned, the latter 16-byte). This caused undefined behavior on at least the CUDA platform. Forcing both structs to use the same alignment fixes this.

CUDA toolkits newer than 10.1 run into this because of a compiler optimization.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5883
2019-09-25 14:22:21 +02:00
900a9a4b06 Sculpt: Cleanup, use more suitable utility function
No functional changes, just more clear semantic and shorter call.
2019-09-25 12:44:42 +02:00
d6dcf5b1ff Sculpt: Fix crash hovering mouse onto multire surface
The check around function which is only supposed to be used for
non-multires case was gone after aea8c0102a.
2019-09-25 12:43:27 +02:00
fae122f12f Sculpt: Cleanup, grant expected usage with asserts
Don't just rely on a comment next top the code, do an assert as well.

Also, don't use `default` since that silences compiler warnings when
new enumerators are added and related code is to be verified.

More switch statements might need an adjustment, but this is something
what is easier to go over by Pablo.
2019-09-25 12:40:10 +02:00
9fff5c2965 Fix T70236: voronoi misspelling in description 2019-09-25 10:26:57 +02:00
fbfa904bce Fix T69573: Driver Value does not slide along the actual value in the Driver Editor
This change is two-fold:

- Ensure the result of the F-Curve evaluation is stored on the FCurve
  object. This was done in 2.79 but lost when we moved to more granular
  per-curve evaluation from the depsgraph.
- Flush this result from the CoW copy back to the original.

Reviewed by: sergey

Differential Revision: https://developer.blender.org/D5888
2019-09-25 10:32:14 +02:00
d0279f7d36 Cleanup: use const for image blending functions 2019-09-25 17:19:08 +10:00
Dalai Felinto
3142ae19d2 Fix T70080: Newly created objects not visible with local collections
The tricky part here is to support a hidden parent and a "visible" child
collection. In this case the object should obviously be invisible. It is
all working now.
2019-09-24 14:25:42 -03:00
9dced206dd Cleanup: removed 7-year-old commented-out code marked 'for now' 2019-09-24 18:22:46 +02:00
c6995b3095 Fix T70004 EEVEE: Texture Coordinate Node in world shader render artifacts 2019-09-24 18:21:39 +02:00
dcee994af6 Tracking: Highlight keyframes in path visualization
This gives better idea of what's going on with your track. Example:

{F693806}

Color of keyframes are configurable from theme editor of clip editor.

Reviewers: keir, brecht, Severin

Differential Revision: https://developer.blender.org/D2772
2019-09-24 17:20:16 +02:00
9a0a556d3b Fix T70202: Typo error in message 2019-09-24 16:16:31 +02:00
a2cc855dba Fix T68736 EEVEE: Loose subsurface node breaks shader 2019-09-24 16:11:53 +02:00
f94f4e1d79 Fix T66555: Handler render init ignores output placeholders
Blender now calls render hooks before taking copy of `scene->r` in
`RE_RenderAnim()`.

A change to the render output filename made in the render-init hook
would not be picked up by by the copy. As a result, placeholders were
touched using the old name, whereas the rendered images would be saved
with the new filename.

Reviewers: sergey

Maniphest Tasks: T66555

Differential Revision: https://developer.blender.org/D5887
2019-09-24 15:59:06 +02:00
aea8c0102a Fix T70140: Topology Automasking and 2D Falloff don't work correctly together
Reviewed By: jbakker

Maniphest Tasks: T70140

Differential Revision: https://developer.blender.org/D5878
2019-09-24 15:51:47 +02:00
a9d3e95bea Fix T69875: Sculpt Scene Spacing breaks with Adjust Strength for Spacing enabled
Reviewed By: jbakker

Maniphest Tasks: T69875

Differential Revision: https://developer.blender.org/D5849
2019-09-24 15:49:23 +02:00
a7904dff4b Fix crash in dynamic mesh preview edge list update
Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D5824
2019-09-24 15:47:03 +02:00
Dalai Felinto
0dd83b385e Fix T70046: Linked instanced collections not working with local collections 2019-09-24 10:34:03 -03:00
Dalai Felinto
8cb8853ebc Make new objects (from enabled collections or append) visible to local views
This fix T67162.
2019-09-24 10:34:03 -03:00
561dfd12be Fix T70124: Motion path not drawn for Armature in Object Mode 2019-09-24 15:33:32 +02:00
22abc205ac Fix T69743: Armature display issues with Intel 5x0 GPU
Apparently this workaround solves the problem.
2019-09-24 08:47:15 -03:00
bf61f217e7 GPencil: Fix wrong icon for Brush presets
It was using the old 2.7 icon.
2019-09-24 13:17:28 +02:00
4e7faf5ffa GPencil: Keep Options panels open by default 2019-09-24 10:36:43 +02:00
9c62ac562c Cleanup: clang-format 2019-09-24 10:15:43 +02:00
36683475d1 Fix T68457: Cycles OpenCL Displacement Shading
When doing simple scenes the displacement shading failed during final
rendering when the displacement method is set to `Displacement + Bump`.

When this option is enabled the shader uses the Vector math
node. This node is part of the node group level 1. When doing simple
shading only using nodes that are part of the node group level
0 the shading was rendered black.

This only happened in final rendering as there the OpenCL programs are
optimized to save registries. Viewport rendering rendered correctly

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5859
2019-09-24 09:44:19 +02:00
5a6ab6f594 UI: Small tweaks to sculpt tool icons
Draw Sharp: More pronounced difference between it and Draw
Mask: Fits in with other similar tools
Border Hide: Fits in with other similar tools
Pinch: Much better communicates what it does
Simplify: Fix a small issue with caused by inverted normals
2019-09-23 22:20:21 +02:00
Daniel Grosse
14acac0bb7 Fix T70013: slow OpenGL calls for every vertex and weight painting step
Stroke update use now the location from Strokecache instead of the mouse
position.

Differential Revision: https://developer.blender.org/D5861
2019-09-23 17:18:15 +02:00
2713921e8a Fix T70143: GPencil Multiframe selection is not updated when use Box select in Dopesheet
Differential Revision: https://developer.blender.org/D5868
2019-09-23 17:03:45 +02:00
e2e567e0b4 Fix file browser new directory prompting for confirmation
This is only needed for the case where it's automatically done when entering a
file path that does not exist, not when pressing the button.
2019-09-23 16:44:06 +02:00
a168c3d282 Modifiers: every modifier now copies mesh settings, fixing texture space issues
Modifier stack evaluation would copy mesh settings other than mesh topology
automatically, outside of the individual modifier evaluation. This leads to hard
to understand code, and makes it unclear which settings are available in following
modifiers, and which only after the entire stack is evaluated.

Now every modifier is responsible to ensure the mesh it outputs preserves materials,
texture space and other settings, or alters them as needed.

Fixes T64739: incorrect texture space for various modifiers

Differential Revision: https://developer.blender.org/D5808
2019-09-23 16:27:23 +02:00
69ad44d5b4 Cleanup: remove unimplemented texture space rotation variables 2019-09-23 16:27:23 +02:00
9208146199 Cleanup: remove Mesh.bb and Curve.bb, no reason for these to be persistent
These were only strictly valid for texture space calculation, don't store them
since they should not be used after that. Only store a flag to indicate if the
auto texture space has been evaluated.

In the future it might make sense to store bounding boxes at the mesh level to
speed up bounding box computation for multiple objects using the same mesh, but
then it will need to be implemented differently.
2019-09-23 16:27:23 +02:00
5c89c689db Fix selection and snapping misusing texture space as boundbox
This fixes the regression from T70103 introduced by the fix for T70103.
2019-09-23 16:27:03 +02:00
8634c4646e GPencil: Use correct comparison for non-bit values 2019-09-23 12:55:16 +02:00
1d1ef2e797 Revert part of "GPencil: Invert Paste operator and make Paste to Active default"
This commit accidentally undid a bunch of previous commits. Only the intended
changes are left now.
2019-09-23 11:09:00 +02:00
3a1b0c0f30 ShaderNodeTree: Add flatten function to get rid of nodegroups
This makes a lot of shader node wiring code less complex.

This only add the flatten mechanism (which fixes T69672).

~~Cleanup to remove the complexity in ntree_shader_relink_displacement,
ntree_shader_bump_branches and ntree_shader_tag_nodes will be commited
separately.~~(already included)

The code is only added for shader nodes for now but could be exported to
other internal nodetree types in the future.

Cleanup: Node Shader Tree: Remove GPUmaterial special nodegroup handling

Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T69672

Differential Revision: https://developer.blender.org/D5829
2019-09-23 11:34:34 +02:00
4987f28ed2 Fix T70177: Crash when calling to_track_quat() without arguments 2019-09-23 09:46:31 +02:00
73a6fcfa80 ImBuf: add planes, channels attributes
D5857 by @cmbasnett
2019-09-23 09:56:46 +10:00
381a274909 Cleanup: use braces 2019-09-23 09:36:12 +10:00
4031bc1478 Cleanup: quote use 2019-09-23 09:35:27 +10:00
a083ddf49b Sequencer: correct fcurve map usage 2019-09-23 09:31:08 +10:00
52bdf522af Fix T69593: Color strip won't update
Reviewed By: JacquesLucke

Differential Revision: https://developer.blender.org/D5803
2019-09-22 13:38:39 -07:00
2e55171e71 Fix T69564: Empty fcurve prevents waveform drawing
Add check if fcurve is empty to skip fcurve evaluation.

Reviewed By: JacquesLucke

Differential Revision: https://developer.blender.org/D5805
2019-09-22 13:38:39 -07:00
29a7b1b64d VSE: Remove the use of eval in Fades operators
Fix security issue introduced in rB2ec025d7be3c

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D5807
2019-09-22 13:38:39 -07:00
d025119aeb Fix T69352: Audio strips don't update when changing frame_start
Tag depsgraph update as a part of cache invalidation.

Author: mdewanchand

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D5718
2019-09-22 13:38:38 -07:00
aa697496e9 UI: Updated Sculpt Simplify tool icon
Fits better with the other tool icons.
2019-09-22 21:36:18 +02:00
012b5e6b22 Cleanup: MOD_explode: Sanitize code some more.
This happens to be a non-behavioral change, but previous code here was
*very* confusing, and only ended up generating expected results by mere
chance (since `facepa[i]` == `totpart` in case the face has no (valid)
particle, i.e. `pa == NULL`)...
2019-09-22 18:51:45 +02:00
591c1a1372 Cleanup: MOD_Explode: sanitize face-without-particle case.
Systematically reset particle pointer to NULL and use it to detect
invalid particle case, instead of checking value of the face's
particle index everywhere in a confusing and prone-to-bug way
(see T70150 and previous commit).

No behavioral change expected here.
2019-09-22 18:48:00 +02:00
6eea69a7ad Fix T70150: Explode modifier crashes with empty vertex group.
There’s be a lot to say about that explode modifier code, for now just
follow other places in code... But the handling of 'invalid'/'unkown'
particle case is... quiet confusing to say the least.
2019-09-22 18:29:05 +02:00
981b063473 UI: Move new sculpt mode tools to correct places in toolbar
Follows general logic, and are placed next to similar tools.
2019-09-22 15:10:15 +02:00
41853a566e UI: Add missing toolbar icons for Sculpt Mode 2019-09-22 14:54:14 +02:00
22a478e5ee GPencil: Fix missing last point when sculpt in Multiframe
This was a mistake when fixed the problem with multiframe sculpt. I missed change the index and use active point in the check.
2019-09-22 13:16:02 +02:00
b3aa8f0fad Mathutils: expose the swing + twist Quaternion decomposition to Python.
This decomposition is useful in rigging, and involves a math trick.
2019-09-22 13:19:33 +03:00
c71be416e0 GPencil: Performance improvement for Multiframe and Onion Skin
Before when Onion or Multiframe was enabled the VBO length was the total of points on the object for all frames and this results in a big size when the scene had a lot of frames.

Now, the size of VBO length is calculated more precisely and reduce the time to alloc the VBO.This also reduce memory footprint.
2019-09-21 19:21:37 +02:00
886adbbe49 Cleanup: Fix comment mistake 2019-09-21 17:18:11 +02:00
a5b15931c3 GPencil: Apply transformed rotation only if needed
If there aren't modifiers or they are not transform type, the rotation is not needed.
2019-09-21 16:13:30 +02:00
ef45d1c8cd GPencil: Use Object location instead of 3D cursor for Grab Brush
Instead to use the 3D cursor as reference point (legacy code), it would be better use the object location.

Tested by: @pepeland
2019-09-21 10:48:40 +02:00
cdf489d101 GPencil: Remove Sculpt rotation effect for multiframe sculpt
As multiframe does not use modifiers, this is not required and only gets weird results.

Related to T70116
2019-09-21 10:29:25 +02:00
35114b0e4e GPencil: More changes to use original data in multiframe sculpt
Related to T70116
2019-09-21 10:29:25 +02:00
c4cc4b5794 GPencil: Multiframe Show only Edit lines was inverted
The flag was working in the oposite mode.

Related to T70116
2019-09-21 10:29:25 +02:00
db7b3de918 GPencil: Copy temp color in multiframe
As the evaluated data is not calculated in multiframe, needs to have the original colors.

Related to T70116
2019-09-21 10:29:25 +02:00
bf4fa5792d GPencil: Rename function 2019-09-21 10:29:25 +02:00
b1cac03fe5 GPencil: Fix error in previous commit
Related to T70116
2019-09-21 10:29:25 +02:00
fe9d522273 GPencil: Use evaluated or original data in Sculpt for Multiframe
The evaluated frame is only available when the frame is the active one.

Related to T70116
2019-09-21 10:29:25 +02:00
c8443d8340 GPencil: Fix unreported select not working in multiframe mode
The selection was not working because the evaluated frame was only working for active frame, so when the evaluation was changed to use eval data instead of original data, the data was not available and the loop did not use it.

Related to T70116
2019-09-21 10:29:24 +02:00
3fcedae8c8 Cleanup: extra semicolon, comma warnings 2019-09-21 11:34:39 +10:00
3589701f6d Cleanup: unused headers in editors 2019-09-21 10:18:29 +10:00
7926e8ea4c Revert "Modifiers: every modifier now copies mesh settings, fixing texture space issues"
This reverts commit e7a514369f, it introduces
a bug in selection in edit mode.

Fixes T70103: can't select extruded Vertex

Ref T64739
2019-09-21 00:35:46 +02:00
bf14e323e6 Fix build error in debug build on macOS
NDEBUG is the standard define, not DEBUG.
2019-09-20 23:41:54 +02:00
Julian Eisel
ac15bf1646 UI: Avoid file browser directory change if path didn't change
E.g. entering the file path field and then pressing enter without any
change would call an unneccesary directory change, causing flickering.
So the main point of this is to avoid flickering.

Without this the text field could also be used to refresh the file list,
but for that we have a proper button.
2019-09-20 20:47:39 +02:00
Julian Eisel
adfe68e202 UI: Replace big options button in file browser
The big options button in the lower left is now gone, it's replaced by a
smaller icon toggle button in the upper right.
That means I could also remove code for the region we had just for this
button.
I also added versioning code for the removal, to make sure the region is
removed cleanly when reading old files.
2019-09-20 17:42:08 +02:00
8c60205bef Fix T70109: Crash with the Data Transfer Modifier (with any 'Edge Data' option)
The BVHTree was erroneously marked as not cached.
2019-09-20 12:18:22 -03:00
Julian Eisel
f0ec7c2ec6 UI: Use vertical file list for "Recover Auto Save"
Pablo and William agreed that the main purpose of the layout should be
to list files in a way that it's easy see which files were
created/modified when. Previously it was set to "Long List" to show the
modification time, now the vertical list is much better suited. The time
is shown anyway.
2019-09-20 16:20:44 +02:00
c460b7e0c6 Fix T70112: Spot cone prevents selection 2019-09-21 00:19:09 +10:00
Julian Eisel
2f1e8f4b97 Remove redundant file bookmarks region toggle operator
For the default keymap we were only using the regular toolshelf
operator, doing this for the industry compatible keymap too now (we
could even remove it there, we don't use it in other editors).

Since we "now" have proper operators for toggling regions, this specific
one is totally redundant.
2019-09-20 15:54:59 +02:00
Julian Eisel
b20182e334 Refactor: Ensure there's always a valid file editor tool region
So far the file browser code had some lazy creation for the tool region,
even though it should always be there. The only reason I can see for
this is compatiblity. So I simply added versioning code to add the
region in case it's not there. Now we should be able to savely assume
the tool region to be there, whithout any unusual lazy-creation.
2019-09-20 15:35:28 +02:00
Julian Eisel
d1cc340e56 Rewrite file region handling for non-editor mode
This makes it so that regions only needed when the file browser is
invoked as an operation (e.g. Ctrl+O rather than a regular editor) are
lazy created then, and removed if the file browser is changed into a
regular editor then (e.g. Ctrl+O over regular file browser editor ->
Cancel).

That should remove some troublesome assumptions and makes versioning
redundant.
It also fixes the issue of an empty execute region at the bottom after
cancelling a file operation invoked from a regular file browser editor.
2019-09-20 15:18:25 +02:00
Yevgeny Makarov
7a83b64f7b UI: Fix Capitalization
Differential Revision: https://developer.blender.org/D5716
2019-09-20 14:31:24 +02:00
Himanshi Kalra
60af4d207b UI: Incorrect info message after batch rename
Differential Revision: https://developer.blender.org/D5744
2019-09-20 14:15:32 +02:00
c8b293ec05 Fix T69097: Empty context menu for dimensions
Adjust empty menu check to skip the menu title.
2019-09-20 21:05:28 +10:00
f431c19954 Cleanup: discarded-qualifier warning 2019-09-20 21:05:28 +10:00
Pedro Reis
fb6ef2ec8d Fix T69486: Reloading file in text editor marks file as modified
Differential Revision: https://developer.blender.org/D5847
2019-09-20 12:46:26 +02:00
Julian Eisel
f5dc979a7e Cleanup: Add/use utility to remove regions 2019-09-20 12:28:15 +02:00
Julian Eisel
09b728ff3e Fix empty file options region in regular editor
This would happen when opening a file browser as regular editor, opening
a temporary file browser from there (e.g. Ctrl+O) and cancelling the
operation.
In some cases this would cause most of the editor to be filled with an
empty operator options region:
* Go to Shading workspace
* File -> Append
* Cancel
2019-09-20 12:13:28 +02:00
078fcc6253 Fix paint cursor drawing asserts
The new paint cursor (introduced in rBe0c792135adf) mixed 3d and 2d
drawing leading to asserts [e.g. when tablet pressure sensitivity was
enabled for size, see D5820 also].

We could get away with always drawing in 3D [using vertformat with
comp_len 3 / GPU_SHADER_3D_UNIFORM_COLOR / imm_draw_circle_wire_3d],
even if in the Image Editor, but this patch clearly separates what is
drawn in 3d and what is in 2d.

part of T69957

Reviewers: jbakker

Differential Revision: https://developer.blender.org/D5836
2019-09-20 11:56:53 +02:00
fde8682d96 Fix T69995: Object Drawtype Set To Solid Issues
When setting an object draw type to Solid it always used the Material
color mode. This change only sets the material color when the viewport
is set to display textures.
2019-09-20 11:21:41 +02:00
44d0c868bf Fix T70101: Displace modifier handles empty vertex group incorrectly 2019-09-20 10:41:49 +02:00
f83a8a61ff Fix T69600: Bridge edges creates UV's with wrong rotation 2019-09-20 18:29:19 +10:00
cd236bc22d Fix T69355: Closing window stops video but not audio 2019-09-20 16:37:07 +10:00
01cb4f9862 Fix T65264: Quick Favorite use in node-editor
Each node tree type now has it's own quick-favorites.
2019-09-20 14:56:08 +10:00
3794d9ef6e Fix T69797: Shear gizmo doesn't update on pivot point change 2019-09-20 14:11:43 +10:00
9dd64cb088 Fix T67174: Weight paint gradient has empty redo panel 2019-09-20 12:49:13 +10:00
fd51d5d412 Mesh: support face-maps when joining
Resolves T64320
2019-09-20 12:09:22 +10:00
6dc7cefb78 Fix T69999: Active element pivot crashes without active object 2019-09-20 10:23:47 +10:00
5356577e4c Cleanup: shadow warning 2019-09-20 10:23:37 +10:00
Julian Eisel
c8df6f2cf9 Fix Preferences opens file browser in wrong window
Steps to reproduce were:
* Open Preferences in a new window (Edit -> Preferences)
* Set file browsers to open fullscreen (Interface->Editors->Temporary
  Windows)
* Open a file browser in the Preferences (e.g. Add-ons -> Install)
The file browser would be opened in the parent window, rather than the
preferences.
2019-09-19 22:35:48 +02:00
27642f24e1 Fix T69855: 3DView glitches involving depth buffer
The problem is that `DST.vmempool->passes` was not cleared, so passes
previously created in another drw function were being reused.
2019-09-19 17:25:25 -03:00
b11272a007 DRW: Deduplicate drw_draw_depth_loop functions 2019-09-19 17:25:25 -03:00
Julian Eisel
4a5af65fe9 Fix T70048: Assert when cancelling Append window
If the file browser was opened from an existing file browser editor
(using File -> Append would make the mouse hover the file browser in the
 Shading workspace), we need special handling for closing the fullscreen
area.
This change brings back the old way of handling fullscreen closing.
2019-09-19 20:21:42 +02:00
3791d7abfd UI: Consistent Tooltip for Add Torus Operator
Changes "Add" to "Construct" to be consistent with the other
primitive mesh add operations.
2019-09-19 13:52:46 -04:00
f4f190a399 Fix T69971 EEVEE: Bump does not work using a UVMap node as input
This fixes both the attribute and the uvmap node. Some other nodes are not
supported but I think it makes little sense.
2019-09-19 19:43:28 +02:00
5e2f0adb1b UI: layout support for fixed size buttons, and use for file browser open/cancel
Not exposed to Python API yet, this should get more detailed testing with different
layouts before that happens.

Ref T69652
2019-09-19 18:40:58 +02:00
Julian Eisel
ee12af9c97 Fix T70074: Missing file execute region in some files (crashes)
I'm not sure how a .blend file could get into this state, but apparently
for some files saved with versions of Blender after the file browser
changes, the execute region would not have been created. File browser
code assumes this region to be there however.
Luckily I found a file with which I could recreate the issue. My guess
is that the error only happens with files that were stored before
certain versioning fixes were done after the file browser redesign.

To fix this, we just let the versioning code for the execute region run
even with newest files. We can run this safely, it only acts if the
execute region actually doesn't exist.
2019-09-19 18:03:05 +02:00
5883b6fde2 Fix T70021: Alembic incomplete crease import
Creases are stored by the vertex indices of the edges. Sometimes they
were stored with (v1, v2) when the edge itself was stored with (v2, v1).
We now search for both orientations.

Sorting the vertex indices before searching avoids the second search
altogether when loading the example file of T70021.
2019-09-19 17:36:18 +02:00
c1612ca114 Fix T67471: hidden particle emitter occludes in Cycles rendered viewport 2019-09-19 17:31:53 +02:00
ee44f8a289 Fix T67724: Cycles renders metaballs with wrong texture space 2019-09-19 17:31:53 +02:00
08b0c08577 Fix the rest of T68666: Animated mesh UVs, vertex colors don’t update on
time change

followup to 815ca2310f, this one fixes the RNA_MeshLoopColor case, adds
RNA_VertexGroupElement and RNA_LatticePoint.

coop with @sergey, thx.

Fixes T68666
2019-09-19 17:22:49 +02:00
2480c9236f Fix T69610: Outliner doesn't update for text new and unlink
Redraw the outliner when text data-blocks are created and unlinked. This
also fixes a crash when unlinking.
2019-09-19 09:14:27 -06:00
fb09d229dd Alembic: Fix compiler error on Windows
Error was introduced in 34143e4510.
2019-09-19 17:10:50 +02:00
b5702d9bc0 Fix T55403: Alembic: export of animated child hairs
The parent hairs were written to Alembic even when the 'Parent Particles'
checkbox (`use_parent_particles`) was disabled. In this case the parent
hairs were not correct in Blender's memory, and thus also not correct in
the exported Alembic file. The Alembic exporter now respects this setting
and doesn't write the parent hairs when 'Parent Particles' is off.
2019-09-19 16:59:10 +02:00
931d280af7 Fix buffer overflow using bbone segment interpolation
Do proper segment clamping to a proper value.

Thanks Brecht for pair-coding!
2019-09-19 16:55:14 +02:00
1bf0384111 Fix T70077: GPenci Controls points are not displayed in right location
The problem was the unit matrix was not set in the uniform variable.
2019-09-19 16:38:24 +02:00
d0c772f68b Fix T69853: Object orientation is wrong with some AMD deprecated drivers.
This solution only reuses the performance workaround made for Intel.
But the original problem was not solved.
Not much we can do to solve it.
2019-09-19 11:18:18 -03:00
cb5ed2e5f4 Manpage gen script: fix for python < 3.7, and missing Blender build info.
Python3.7 is still fairly recent, not all distro use it as system python
yet, fallback to code compatible up to py3.5.

Also, often distro builds of Blender do not have the buildinfo, in that
case fallback to `SOURCE_DATE_EPOCH` envvar, and as last resort to
current time, as in orig patch D5756 (we still use blender builddate
when available).

Issues raised in recent own rBcd5c70630318.
2019-09-19 15:57:33 +02:00
815ca2310f Fix part of T68666: Animated mesh UVs, vertex colors don’t update on time change 2019-09-19 15:56:02 +02:00
34143e4510 Fix T70070: Path always absolute when importing Alembic
Importing an Alembic file with a relative path is now also possible.
2019-09-19 15:55:19 +02:00
Julian Eisel
1353158aa2 Fix crash in local collections with excluded layer
Steps to reproduce were:
* Add a new collection
* Put an object into it
* Exclude the selection (the checkbox in front of the name)
* Enable "Local Collections" in any viewport
-> Crash

Did not skip the excluded collections, causing an unsuccessful object
lookup (returned null-pointer).
2019-09-19 15:42:48 +02:00
3c09e4d8cc Fix T69993: vertex instancing only works on original vertices
This behavior was accidentally changed in 3e6f37b9, now it works compatible
with 2.79 again.
2019-09-19 15:27:02 +02:00
3977854c70 Cleanup: rename anim::duration to anim::duration_in_frames
Units should be explicit, and not left to be guessed by the reader.

The field is only used in a single C file, so it's a relatively low-risk
change.
2019-09-19 15:26:17 +02:00
71f2229b0d Fix T68091: Adding a corrupt video crashes/confuses Blender
The problematic video from T68091 clearly has an invalid stream duration
(it would be 55 centuries long if interpreted at 30 FPS, and given that
it was recorded with an Android 9 device, it's unlikely that recording
started that long ago). I've added a heuristic to check the stream
duration against the container duration; if the stream is more than 4x
longer than the container, Blender now falls back to the container
duration.

We could use MIN(stream duration, container duration), but there might
be video files out there where the container duration is less precise
than the stream duration; they are measured in different units of time
(microseconds for the container vs. frames for the stream).

Includes a unit test for the above heuristic.

Reviewed by: jbakker

Differential revision: https://developer.blender.org/D5853
2019-09-19 15:12:53 +02:00
fba35aa8c5 Use FFmpeg's own av_guess_frame_rate() function instead of guessing ourselves
This was introduced in FFmpeg lavf 55.1.100 in 2013. For systems that are
still on LibAV or older FFmpeg there is a fallback implementation that
performs the same guess as we did before in `av_get_r_frame_rate_compat()`.
2019-09-19 15:12:53 +02:00
1e09dd094b Cleanup: don't index the same array multiple times
There is now a clearer distinction between `video_stream` (the stream itself)
and `video_stream_index` (its index), and no more repetition of accessing
the same item of an array. This also makes the code a bit more readable in
preparation for an upcoming functional change.
2019-09-19 15:12:53 +02:00
2f6a064765 Fix T70068: sculpt mode hide masked not working after show all 2019-09-19 14:40:33 +02:00
441f6cf020 Fix T64855: smooth view not working in Eevee rendered mode 2019-09-19 14:09:49 +02:00
8927d416f6 Fix missing 3D viewport solid shading mode request for UVs and vertex colors
This probably fixes no current issues, because there is another one causing
these to be computed unnecessarily.
2019-09-19 14:03:03 +02:00
87ebc4ef4f Fix T70060: Add bgl wrapper for glVertexAttribIPointer 2019-09-19 12:54:37 +02:00
745088cb30 userdef_defaults for 'Render In' and 'File Browser'
Otherwise --factory-startup would e.g render as `Keep User Interface`
(which is supposed to be `New Window` by default)

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5851
2019-09-19 12:07:24 +02:00
658d7eeed2 Clean-up/safety check in new BKE_mesh_copy_settings().
From rBe7a514369fe70, since I did not have time to do proper review
in D5808...

Note that we could also consider that shallow copy of src should never
be dst of that function and add some asserts instead. For now going the
safest and simplest way though.
2019-09-19 12:06:07 +02:00
7a78bc5d24 Cleanup: Spelling in comment 2019-09-19 11:51:25 +02:00
5e332fd700 Fix T67934: Weight paint doesn't work with Subsurf/Multires
This is a regression since PBVH was introduced for weight paint.

The solution is: treat subsurf and multires modifiers as deforming
ones for the weight painting. This is an easiest solution to make
PBVH use subdivided location of original vertices.

This change could simplify some of the weight paint by removing
the grids check, since PBVH is not supposed to be built from grids
in this case anymore.

Differential Revision: https://developer.blender.org/D5751
2019-09-19 11:51:25 +02:00
74d27bb0ef Subdiv: Add vertex deformation callback to multires/subsurf
Currently unused but the intention is to use this to hook up these
modifiers to a generic deformed PBVH to make it easier to sculpt or
paint on a subdivided mesh.
2019-09-19 11:51:25 +02:00
65d8c771c7 Subdiv: Add deformation-only subdivision
Is intended to be used to generate an array of coordinates of coarse vertices
placed to the final subdivided position.
2019-09-19 11:51:25 +02:00
b2333a3534 Subdiv: Cleanup, comments 2019-09-19 11:51:25 +02:00
659ccd9cd2 Fix T66154: viewlayer hide/exclude settings getting lost for linked collections
The problem was that the object and collection pointers in Base and
LayerCollection would get lost of file read. Normally such ID pointers would
be resolved by pointing to an ID_ID placeholder which has the datablock name,
and then replacing it will the real datablock. However ID_ID is only written
for directly linked datablocks.

This adds the concept of an indirectly linked datablock with a weak reference
to it. For this we write an ID_ID_WEAK_REF code, which is a reference that
will only be resolved if the datablock was read for another reason.

Differential Revision: https://developer.blender.org/D4416
2019-09-19 11:32:35 +02:00
e7a514369f Modifiers: every modifier now copies mesh settings, fixing texture space issues
Modifier stack evaluation would copy mesh settings other than mesh topology
automatically, outside of the individual modifier evaluation. This leads to hard
to understand code, and makes it unclear which settings are available in following
modifiers, and which only after the entire stack is evaluated.

Now every modifier is responsible to ensure the mesh it outputs preserves materials,
texture space and other settings, or alters them as needed.

Fixes T64739: incorrect texture space for various modifiers

Differential Revision: https://developer.blender.org/D5808
2019-09-19 11:32:35 +02:00
5516e52fad Fix QuadriFlow build error on FreeBSD and compiler warnings on Linux 2019-09-19 11:30:08 +02:00
6f4e595e9b Fix T68852: Link select crashes after knife project
Knife project switches out of vertex selection mode, but wouldnt do this
for all participating meshes.
Logic in edbm_select_linked_pick would switch the viewcontext multiple
times and the meshes selectmode was not in sync then, leading e.g.
finding a vertex in 'unified_findnearest' (because last of the meshes
selectmode was SCE_SELECT_VERTEX), but then later in
'EDBM_elem_from_selectmode' other meshes selectmode was not matching
SCE_SELECT_VERTEX, leading to crash...

Reviewers: campbellbarton

Maniphest Tasks: T68852

Differential Revision: https://developer.blender.org/D5536
2019-09-19 11:27:51 +02:00
1888990934 Cleanup: Remove redundant name checking
The BKE function already does this checking.
2019-09-19 11:23:57 +02:00
05de43d843 Fix T70009: GPencil copied layer is linked to its original layer
As the layer and frame memory was duplicated, the pointers were connected to old data. This was solved when saved the file, but this was a bug. Also this required a duplication and clean all listbase items.

Now, instead to duplicate and clear memory for layers and frames, just create a new layer and frame. This solution fix the problem, it's faster and also keeps the code cleaner.
2019-09-19 10:38:15 +02:00
4e9aadac5e Fix T70033: Crash editing keymap operator
Expanding operator names could buffer overrun.
2019-09-19 17:15:19 +10:00
86590b90aa Cleanup: use uint,ushort,uchar for modifiers 2019-09-19 13:33:44 +10:00
d8a7e5ee32 Cleanup: spelling 2019-09-19 13:19:53 +10:00
741d7d60ed Cleanup: Manpage: use 'https' blender.org URL instead of 'http' one. 2019-09-18 23:04:23 +02:00
cd5c706303 Blender manpage generator: use blender build date instead of current time.
It makes much more sense to use the build timestamp of the Blender
binary used to generate that manpage, than the current time.

As a bonus, when Blender building makes use of the SOURCE_DATE_EPOCH envvar
(through CMake, since previous commit), this also propagate automatically
to that man page.

Inspired by D5756 by Bernhard M. Wiedemann (@bmwiedemann), thanks.
2019-09-18 23:04:23 +02:00
Bernhard M. Wiedemann
ea6c9f17bd Use cmake TIMESTAMP for BUILD_DATE+TIME
Use cmake TIMESTAMP for BUILD_DATE+TIME
this simplifies code a lot
and even makes it more portable to other platforms

TIMESTAMP is available since cmake-2.8.11 ; blender already requires
cmake>=3.5 so that is fine.

Note that with CMake>=3.8, if defined, the SOURCE_DATE_EPOCH envvar
will be used by CMake here.

Reviewers: mont29, campbellbarton

Reviewed By: mont29, campbellbarton

Differential Revision: https://developer.blender.org/D5760
2019-09-18 23:04:23 +02:00
6f7a64b57f GPencil: Create blank texture only once by engine
This texture is used for missing textures as replace.

Differential Revision: https://developer.blender.org/D5845
2019-09-18 20:55:38 +02:00
e7fde3a0f3 Fix transforming paint curve edit points also doing
ED_sculpt_end_transform in sculpt mode

followup to rB67310ed97618, thx @mano-wii for the heads up.
2019-09-18 19:58:42 +02:00
85acd72c9b Fix remesher operator poll function
This commit also removes the name "voxel" from the messages because this function
is now used for the voxel remesher and quadriflow.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5842
2019-09-18 19:45:58 +02:00
67310ed976 Fix T70006: crash when transforming paint curve edit points in sculpt mode
This was caused by rB309cd047ef46.
Above commit introduced code that would skip early for sculptmode
(leaving out the neccessary createTransPaintCurveVerts).

Reviewers: pablodp606, jbakker, mano-wii

Maniphest Tasks: T70006

Differential Revision: https://developer.blender.org/D5837
2019-09-18 19:27:47 +02:00
383c4ba3d8 Fix excessive dependency graph evaluation while painting strokes
Particularly noticeable when vertex painting with a subsurf modifier.

In some cases every sculpt or paint stroke step would evaluate the dependency
graph. This should only happen for redraws. Now more selectively choose if the
dependency graph should be evaluated to initialize the view context. Doing it
in the view context evaluation is somewhat hidden, now it's more explicit.

Differential Revision: https://developer.blender.org/D5844
2019-09-18 18:19:27 +02:00
3e230cecf0 Depsgraph: Cleanup, spelling in comment 2019-09-18 17:56:22 +02:00
296c03a389 Subvid: Initial support of subdiv topology query
Just some higher level functions to access topology information.
2019-09-18 17:56:22 +02:00
acf1c027ce Subdiv: Cleanup, split function into smaller ones 2019-09-18 17:56:22 +02:00
2409a9f0af BLI_tasks: simplify/generalize heuristic computing default chunk size.
That code is simpler and more general (not limited to some specific
values of thread numbers). It still gives similar default chunk size as
what we had before, but handles smoother increase steps, and higher
number of threads, by keeping increasing the chunk size.

No functional change expected from that commit.
2019-09-18 17:38:08 +02:00
84bd9e284e GPencil: Fix unreported error using Grab sculpt in empty frame
When the grab brush was used in an empty frame, a new frame was created, but as the depsgraph was no tagged, the evaluated data was wrong and the Grab hash failed.
2019-09-18 17:37:55 +02:00
77f1f13663 GPU: AMD: Remove workaround that doesn't work 2019-09-18 12:33:23 -03:00
f9beb1bef1 Fix (unreported) missing viewport update deleting a particle
If children hairs were displayed in particle editmode, these would not
update when a particle was deleted.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D5840
2019-09-18 17:19:33 +02:00
a9a8eedd16 Fix T65816: Alembic export of procedural mesh results in a static mesh and crashes
The static mesh issue described in T65816 has been resolved by @Sergey
in T60094.

This commit fixes the last bit of the puzzle, which was two-fold:
- A missing depsgraph update when setting `orig_object.data = new_mesh`
  from Python. Thanks @Sergey for providing the fix :)
- Properly locking the interface while exporting. This prevents crashes
  as described in T60094. The previous approach of calling
  `BKE_spacedata_draw_locks()` was not enough.
2019-09-18 17:08:33 +02:00
a1318d2415 Fix T69580: Smooth brush freezes on highpoly mesh
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5831
2019-09-18 16:40:58 +02:00
4dbea85a3f Fix preference for file browser and new window not being saved
The subversion should just be bumped for cases like this, it doesn't cost
anything and functioning correctly is most important.
2019-09-18 16:36:07 +02:00
6278ab59bc Revert "UI: Open file browser in fullscreen by default"
This reverts commit b962aca800. We may revert
to the fullscreen file browser if it's not good enough by the time of the 2.81
release. But then it first needs some changes since the in between state now
is not good enough either.
2019-09-18 16:36:07 +02:00
16a384b485 Fix T69984: Cursor curve Alpha doesn't display curves other than Custom
Reviewed By: jbakker

Maniphest Tasks: T69984

Differential Revision: https://developer.blender.org/D5823
2019-09-18 16:37:13 +02:00
04843d1572 Sculpt: Split original normal into original normal and plane
This allows to create different effects with some brushes that use the sculpt plane.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D5818
2019-09-18 16:34:24 +02:00
Julian Eisel
b962aca800 UI: Open file browser in fullscreen by default
Fullscreen as in, maximized area.

This may be a temporary change until we consider the temporary window
mode as working well enough.
Note that you can still enable the windowed mode in the Preferences
(Interface > Editors > Temporary Windows).
2019-09-18 14:51:40 +02:00
Julian Eisel
f5bbaf55ac UI: Preference for file browser as fullscreen area
Addes a Preference setting to choose between opening new file browsers
in a maximized area (like with the old file browser) or in a new window
(like the new one).
2019-09-18 14:37:11 +02:00
Julian Eisel
cac756a92a UI: Move render display type to Preferences
Moves the render display type (to choose between rendering in a new
window, in a fullscreen area, in an Image Editor, etc) from the scene to
the preferences.
2019-09-18 14:32:21 +02:00
Julian Eisel
95373e2749 Refactor temp-space opening for optional fullscreen mode
Will be put to use in followup commits.
2019-09-18 14:22:50 +02:00
e2cbf8b117 Cleanup: minor changes to paint undo
Use a shared tile freeing function.
2019-09-18 18:49:53 +10:00
8c0dea72b6 Fix segfault when polling OBJECT_OT_voxel_remesh without active object
The active object can be `NULL`, which causes a segfault in
`BKE_object_is_in_editmode(NULL)` (and if that were made NULL-safe, the
segfault would happen further down in `object_remesh_poll()`).
2019-09-18 10:23:42 +02:00
dc6cec65af Cleanup: includes for readfile.c 2019-09-18 13:29:08 +10:00
OmarSquircleArt
9609840b5e Fix T69989: Correct Mapping node min/max versioning.
The old min/max options specified the target min/max values, they didn't
act as min/max operators. So the versioning code should be adjusted
accordingly.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5828
2019-09-17 21:54:09 +02:00
e13a2cde28 GPU: Comment incorrect asserts
These asserts are too simple and triggers false positive.
2019-09-17 19:56:43 +02:00
3009429c90 Fix T69809, T69810: sculpt gone or crashing after render
Make a distinction between flush sculpt changes for rendering, and forcing
sculpt data structures to be rebuilt after mesh changes. Also don't use PBVH
for renders.
2019-09-17 19:20:08 +02:00
884a385287 GPU: Fix broken assert 2019-09-17 16:22:11 +02:00
41d6d1463f Fix paint cursor crash
The new paint cursor (introduced in rBe0c792135adf) could crash for 2d
painting without an active object.

Note there are still drawing asserts (because we are mixing 2d and 3d
drawing in 'paint_draw_cursor'), but these will be handled in a seperate
commit.

part of T69957

Reviewers: jbakker

Maniphest Tasks: T69957

Differential Revision: https://developer.blender.org/D5820
2019-09-17 15:43:05 +02:00
3a08153d7a DRW: Refactor to support draw call batching
Reviewers: brecht

Differential Revision: D4997
2019-09-17 15:16:43 +02:00
41299bce93 Fix T69808: crash using custom Node.draw_label
Start happening after 9ecbd67dfb, but code was already wrong.
2019-09-17 15:12:14 +02:00
71803f2c94 Fix T69687: Edit Curve culling
Curve edit points could disappear when the deformed curve is out of view
area. Fix similar to rB0f983e854052.

Reviewers: jbakker

Maniphest Tasks: T69687

Differential Revision: https://developer.blender.org/D5748
2019-09-17 15:03:53 +02:00
fb39f1776f Fix enabled dynamic size in pose brush
Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D5816
2019-09-17 14:59:49 +02:00
0927e7b835 Sculpt: Rename pinch to magnify in some brushes
Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D5815
2019-09-17 14:56:44 +02:00
54b690897e Fix topology automasking when starting from a boundary vertex
When starting automaking from a boundary vertex it was only updating the automasking factor in connected boundary vertices. This also fixes other similar functions like mask expand or dynamic mesh preview.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D5812
2019-09-17 14:52:48 +02:00
58214ab52a Sculpt: Add pose origin preview to the Pose Brush
This commit makes the pose brush easier to control. It also includes a refactor of the pose brush init code.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D5761
2019-09-17 14:46:45 +02:00
9be5a94cf3 Fix part of T69728: drawing glitches with sculpt dynamic mesh preview
Depth test must default to off for drawing outside the 3D viewport and
overlays like cursors.
2019-09-17 12:24:31 +02:00
398de6a86f Alembic: fix updating of GUI when export progress is made
The `do_update` variable wasn't set after changing the `progress`
variable, causing the GUI only to update on redraw (f.e. when the user
was waving the mouse around).
2019-09-17 14:10:47 +02:00
a3c8afc7cd Cleanup: Alembic: use pointers instead of references when passing progress variables
Using pointers instead of references when passing progress variables
makes the C++ code more in line with the C code (as it doesn't transform
pointer parameters to reference parameters). Also makes it easier to
spot when a common Blender pattern is implemented incorrectly (fix will
be in the next commit).
2019-09-17 14:09:42 +02:00
c25f5a375e Fix T61313: gravity not displayed correct when changing unit scale
Display of velocity and acceleration units should be affected by unit scale.
Arguably the behavior of the physics simulation should be for gravity to remain
constant, but such design changes are outside the scope of bug fixing. At least
the UI should correctly reflect what the physics simulation will do.
2019-09-17 13:43:00 +02:00
8f662e84e0 Fix T69716: Can't select geometry hidden by faces created by modifiers
This kind of reverts rBc060a835 that was committed without discussion.
2019-09-17 08:26:57 -03:00
6ee2d10005 Fix T69974: crashes in .blend files where 3D viewport was split
This was caused by a missing copy of the recently adding 3D viewport shading
ID properties.
2019-09-17 13:20:11 +02:00
df5fae1fcc Fix T69963: GPencil Hotkeys (1,2,3) do not work to switch Select Mode in Edit Mode 2019-09-17 13:07:29 +02:00
271c6794d6 Cycles: Viewport Rendering Memory Improvement
Small memory reduction change by only storing the pixels of the combined
pass when it is being shown in the viewport. Previously the combined pass
was always calculated and present in the output buffer. The combined pass
will still be calculated.

It is a limitation in Blender that Cycles always had a combined pass.
This patch will remove the limitation from the code base of Cycles.
Blender still has the limitation, but will always request the combined
renderpass when doing final rendering.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5784
2019-09-17 11:24:55 +02:00
11b0c2080c UI: use unique name for install add-on operator
Was called "Install", which isn't useful in operator search.
2019-09-17 18:18:50 +10:00
aca58ae970 Tracking: Early output when drawing 0 path points
The rumors says that immBegin() will assert fail on 0 count. Not sure where exactly
that happens (can't reproduce that), but early output can't hurt.
2019-09-17 09:31:21 +02:00
e40dc53c44 Fix T69960: Track path tries to draw negative point counts 2019-09-17 09:29:56 +02:00
2b1e0c038c Tracking: Restore check for marker being disabled
A regression since refactor from yesterday which made it so path is displayed at
a frame where marker is disabled.
2019-09-17 09:29:13 +02:00
bac3184540 Tracking: Use proper wrapper around line width and point size 2019-09-17 09:18:22 +02:00
76650402f3 Fix T69931: Materials with keyframes duplicated by 'make single user' are linked.
Another sneaky bite from the infamous private ID data: While those
monsters are not in bmain, the actions used by their animdata are
regular cute little ID's, living with the herd in the safe and sound
Main DB...

So we have to be careful not to propagate the nasty black magic
required to handle the formers when we duplicate their animdata.

Saying it again: private ID datablocks should never have had their own
animdata & actions, this is endless issue also with RNA paths... And
makes copying of animation between materials and such needlessly
complicated.
2019-09-16 23:02:38 +02:00
7a0ca9f98f Cleanup/sanitize a bit Action copying within BKE_animdata_copy().
Whole animdata copying code would need much more love, but we can as
well sanitize some pieces of it when we hit them, for now.
2019-09-16 23:02:38 +02:00
8b53445e8d Fix T69612: Two instances of Bridge Edge Loops entries in Edge Context Menu 2019-09-16 22:36:09 +02:00
Julian Eisel
28ee0f97c3 UI: Open file options region for more operations
Open the file options region for image saving, linking and appending.
2019-09-16 18:35:27 +02:00
Julian Eisel
8d6b0eda5d UI: Show in-/decrement buttons for exporters
As per Brecht's suggestion, use the check_existing property to control
visibility of the '+' and '-' icons. It is typically set for save
operations.

Adds another FileSelectParams flag (to avoid duplicated propertie
lookups) and removes the recently introduced
FileSelectParams.action_type again.

Fixes T69881.
2019-09-16 18:25:31 +02:00
3618b2c359 Fix part of T65397: accidentally assigning shortcuts gives errors
This is not a proper solution, that will come later, this avoids the main
problematic error for now.
2019-09-16 14:33:19 +02:00
39e760fa1d Fix eevee volumetrics distribution at 1.0
reported in T69662

Reviewers: fclem

Differential Revision: https://developer.blender.org/D5809
2019-09-16 13:16:25 +02:00
9d2c8aa3c4 Tracking: Refactor path drawing code
Split into set of smaller functions, making it easier to tweak behavior.

Should be no functional changes.
2019-09-16 12:54:48 +02:00
7b9093e768 Cleanup: Spelling in comment 2019-09-16 12:54:48 +02:00
Julian Eisel
af9ca138ba Fix T69755: 'Enter' over file name not working
Was breaking event handling at the wrong place.
2019-09-16 12:46:56 +02:00
94ecad5809 Cleanup: Use const variables 2019-09-16 10:51:25 +02:00
95b60634c7 GPencil: Enable subdiv for 2-point strokes.
It makes sense when adding points to a straight line, e.g. for creating thickness variation in later modifiers.
2019-09-16 10:40:32 +02:00
345fb22ea3 Fix T64238: Scene Full Copy: Cameras bound to markers does not update.
That's exactly why we should get rid of all those 'custom cases'
remapping code, it's hard enough to keep a single place
(library_query.c) up to date and 100% valid, but having more areas doing
their own remapping is just impossible to maintain... Some day...
2019-09-16 10:03:41 +02:00
330a37f389 Revert "PyAPI: expose OperatorType.modal_keymap"
This reverts commit b53ee963b1.

Full support for defining modal enums and access through events
is more involved, revert for now.
2019-09-16 16:42:25 +10:00
f97eb0e338 Cleanup: use fixed indent in Python
Reduce right-shift.
2019-09-16 16:17:46 +10:00
b53ee963b1 PyAPI: expose OperatorType.modal_keymap
Support assigning modal keymaps once the operator is registered.
2019-09-16 16:05:53 +10:00
6cb1e38c87 ImBuf Py API: add filepath access
D5804 by @cmbasnett with setter support added.
2019-09-16 10:39:24 +10:00
367ce71b47 ImBuf Py API: rename filename to filepath
Match RNA image naming.
2019-09-16 10:31:08 +10:00
b043bef000 Cleanup: quiet warning -Wparentheses 2019-09-16 04:34:31 +10:00
00319df9fc Fix bl_app_override keyword argument use
D5737 by @cmporces
2019-09-16 04:31:22 +10:00
4a6f43d47b UI: Add extra file browser icons
Desktop, External Drive & Network Drive

These were already in the icon sheet, but not added in the Blender side.
2019-09-15 19:12:54 +02:00
bdc94ef4b9 Fix T69883: Deleting keyframe crashes blender
When delete in multiframe node the active frame gets NULL.
2019-09-15 18:56:57 +02:00
8e62fdbcbd UI: Add XYZ mirroring to the Tool Settings viewport header for Edit and Weight Paint modes
Previously, only X mirror was available here, but since we can now mirror on Y and Z, these should also be added.
2019-09-15 15:43:30 +02:00
87c0179857 Industry Compat keymap: Use Ctrl/Cmd + Up/Left/Right for navigating the file browser in addition to Alt
Windows generally uses Alt, and Mac uses Cmd. This commit makes both possible.
2019-09-15 12:29:25 +02:00
55e02e7931 Fix T69877: missing dependency update when setting PoseBone.custom_shape. 2019-09-15 11:15:58 +03:00
c9048e8e41 Sequencer: disable fades add/remove until eval() use is removed
2ec025d7be introduced 'eval()' on blend
file data-paths which can be used for code injection.
2019-09-15 10:59:31 +10:00
e2df789c48 fix: (unreported) When converting nurbs or curves to Mesh the generated UVMap is now named 'UVMap' 2019-09-14 23:16:38 +02:00
e9c18ea982 Cleanup: redundant code from recent sequence fade operator
No need to define class variables which are all overwritten,
also use __slots__ to avoid mistakes.

Remove redundant length check too.
2019-09-15 05:57:59 +10:00
14c160334d Cleanup: remove duplicate information in docstring
No need to document all options in the doc-string
since each option has it's own description.
2019-09-15 05:43:34 +10:00
19fc50ca6f Cleanup: pep8, unused args, indentation 2019-09-15 05:35:42 +10:00
96ff40859d Cleanup: quiet unused arg warning 2019-09-15 05:26:15 +10:00
2743eaf24e Cleanup: pep8
Quiet pylint warnings on keymaps.
2019-09-15 05:18:05 +10:00
Stefan Werner
2b9f4bcfa0 macOS: Replaced deprecated Cocoa API calls.
Most of these calls were replaced with the successors as suggested
by Xcode's Fix-It. Functionality should not be affected.
This reduces the number of warnings when building on macOS.
2019-09-14 20:27:16 +02:00
Stefan Werner
9d282d7a8d macOS: Replaced OSSpinLock with os_unfair_lock.
OSSplinLock is a deprecated API, os_unfair_lock is its successor.
This reduces the number of warnings when building on macOS.
2019-09-14 20:23:29 +02:00
ea70bd2abf MSVC: Fix macro collision with MSVC Headers
Picked up while investigating a build error on the functions branch
which seems to use this specific header in a way master doesn't.

The problem:

The MSVC headers define a `_CONCAT` macro, so does BLI_kdtree_imp.h
however at the end `BLI_kdtree_imp.h` undefines the macro making the
MS headers that still rely on it "unhappy".

Who's fault is this:

Ours, C99 Spec says

```
7.1.3 Reserved identifiers

- All identifiers that begin with an underscore and either an uppercase letter or another underscore are always reserved for any use.

...

if the program removes (with #undef) any macro definition of an identifier in the first
group listed above, the behavior is undefined.
```

So we should not have defined it, and we definitely should not
have undefined it.

We have *tons* of these violations, although fixing them would be great
at one point lots of them are in /extern or in the 3rd party deps,
I'd rather deal with them on a case by case basis when it actually
causes issues.

Differential Revision: https://developer.blender.org/D5790

Reviewers: campbellbarton, JacquesLucke
2019-09-14 09:59:42 -06:00
5fe14f32cf Quiet self assignment warning 2019-09-14 17:00:19 +02:00
5055a55bc4 VSE: quiet missing prototype warnings 2019-09-14 16:54:59 +02:00
7aeedf71b8 UI: quiet warning when drawing markers
The compiler was warning that it assumed that
crfa - 4 < cfra is always true even though that might not
be the case due to overflow. This patch just removes
the condition that caused the assumption.
2019-09-14 16:52:56 +02:00
38cc53a168 BLI: make Map.add_or_modify more powerful
The function now allows custom return types defined
by the callbacks. This can be useful when a user of the
data structure has to implement some custom behavior.
2019-09-14 16:25:17 +02:00
d6057b919d BLI: add utility to print VectorSet stats 2019-09-14 15:03:25 +02:00
a98760f7da BLI: speedup adding to VectorSet by removing a check 2019-09-14 14:41:19 +02:00
5b00ecf70b BLI: remove non const accessors in VectorSet
With this the values could have been changed without
updating the hash table.
2019-09-14 13:30:24 +02:00
dd8a70c246 BLI: add missing include 2019-09-14 12:44:23 +02:00
e73030e336 BLI: rename SetVector to VectorSet
The structure is a set built on top of a vector and not the other
way around.
2019-09-14 12:37:58 +02:00
79e1165bd7 BLI: Improve forwarding semantics of some data structures
This makes it possible to use e.g. `std::unique_ptr` in a map.
2019-09-14 12:11:14 +02:00
Stefan Werner
ca76ecfa0e Cleanup: clang-format 2019-09-14 09:26:51 +02:00
2ec025d7be VSE: Add operators to add and remove fades
Fades add:
Adds or updates a fade animation for either visual or audio strips.
    Fade options:
    - In, Out, In and Out create a fade animation of the given duration from
    the start of the sequence, to the end of the sequence, or on boths sides
    - From playhead: the fade animation goes from the start of sequences under the playhead to the playhead
    - To playhead: the fade animation goes from the playhead to the end of sequences under the playhead
    By default, the duration of the fade is 1 second.

Fades clear:
Removes fade animation from selected sequences.
Removes opacity or volume animation on selected sequences and resets the
property to a value of 1.0. Works on all types of sequences.

Author: gdquest

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D5166
2019-09-13 17:24:42 -07:00
a960dc4519 BLF: make library glyph cache handling thread-safe
Functions that utilize glyph cache should lock and unlock cache by
calling `blf_glyph_cache_acquire()` and `blf_glyph_cache_release()`.
Function `blf_glyph_cache_acquire()` will create glyph cache, if it doesn't exist.
Locking mutex is global and shared by all fonts.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5701
2019-09-13 17:24:42 -07:00
ab3a9dc1ed VSE: prefetching
When enabled prefetching(preview panel>view settings), a pernament running job
is created, that will render frames in the background until the cache is full.
If the cache is not filled fast enough, prefetch job suspends itself
at the last moment and will wait until it has chance to "catch up".
Effectively this will decouple rendering to separate thread, so rendering
itself is a bit faster.
Cache recycling behavior will be changed to "free furthest frame to the left
of playhead if possible, otherwise rightmost frame".

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5386
2019-09-13 17:24:42 -07:00
0547a77536 Cleanup: use const args, variables 2019-09-14 08:12:53 +10:00
d30ec73d76 Cleanup: undeclared variable warnings, extra semicolon 2019-09-14 08:05:57 +10:00
1cdfc1d199 Fix T69857: image.load() API function does not load pixels
Broke after recent changes for DNA default initialization.
2019-09-13 23:07:08 +02:00
fd5c1972cd Revert "DRW: Refactor to support draw call batching"
This reverts commit ce34a6b0d7.
2019-09-13 23:03:10 +02:00
Stefan Werner
c80564ef9f macOS: Enabled posix_memalign() like on other Unix platforms. 2019-09-13 22:49:26 +02:00
57e0e520e8 Fix (unreported) 'smooth vertex colors' operator not respecting vertex
paint mask selection

followup to rBr27bbe7cbd9b, might as well make this consistent across
all the color operations [with the exception of 'Dirty Vertex Colors'
which is python]

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5786
2019-09-13 22:29:14 +02:00
89cc5c2bd3 Fix Particles: Keyed Physics crash when clicking on a particle slot
without a valid target

rB95b9680597f5 introduced code that would skip creation of GPUVertBuf
for ParticlePointCache if the keyed physics would not have a valid
target. Missing vertex buffer would lead to assert/crash.

This code is now removed (dont see a reason why this was done? afaict
2.79 also just displayed the particles without physics in this case and
this seems to be working just fine in 2.8 as well)

part of T69741

Reviewers: fclem

Maniphest Tasks: T69741

Differential Revision: https://developer.blender.org/D5781
2019-09-13 22:15:58 +02:00
Stefan Werner
2520f78971 Fixed macOS build, header cleanup was too agressive. 2019-09-13 21:29:05 +02:00
83e4991c16 Cleanup: unused headers for readfile, versioning 2019-09-14 05:21:25 +10:00
dc1f002fb7 Cleanup: unused headers for the windowmanager 2019-09-14 05:06:03 +10:00
5d4cbbb16c UI: don't mark batch rename as internal
Prevented it showing in operator search.
2019-09-14 02:39:58 +10:00
0ab550d8e0 UI: rename transform options
When added to quick-favourites, these names are used which
didn't make much sense out of the panel context.
2019-09-14 02:03:49 +10:00
Dalai Felinto
92736a7b75 Per-Viewport Collection Visibility
Support per-viewport collection visibility options.

Note 1: There is no way to show a collection that was not visible before
due to depsgraph. Otherwise we would risk having all the collections in
the depsgraph and I believe this is not the idea.

An alternative would be to have a new depsgraph for viewports that are
not local. Something to keep in mind if we do per-viewport current frame
in the future.

So for now what we do is to only allow collections visibility to be
disabled/hidden in this mode.

Note 2: hide_viewport (the eye icon) doesn't really matter for
depsgraph. So after the merge we can still ignore it to show the
collections locally in a viewport with no problems for the depsgraph.

Reviewers: brecht, sergey
Subscribers: billreynish

Related task: T61327
Differential Revision: https://developer.blender.org/D5611
2019-09-13 12:37:35 -03:00
ce34a6b0d7 DRW: Refactor to support draw call batching
Reviewers: brecht

Differential Revision: D4997
2019-09-13 17:32:18 +02:00
f7e8b58098 Fix BLI_bvhtree_overlap_ex assert 2019-09-13 12:19:54 -03:00
23a4149778 Fix "minimum twist" curve flipping issue
Correct the code to actually do what the comment says.
This fixes an issue where the curve would flip 180 degrees under certain
conditions.
2019-09-13 17:18:35 +02:00
6b0d1ef7e1 Cleanup: compiler warnings 2019-09-13 16:51:51 +02:00
27b82bbb75 Fix T69816: Using Transform gizmos in Sculpt Mode while MultiRes is activated crashes Blender
Reviewed By: jbakker

Maniphest Tasks: T69816

Differential Revision: https://developer.blender.org/D5779
2019-09-13 16:43:05 +02:00
f71d89bb04 Fix T69804: Transform tools in sculpt mode fails with transformed objects
Reviewed By: mano-wii

Maniphest Tasks: T69804

Differential Revision: https://developer.blender.org/D5777
2019-09-13 16:30:06 +02:00
0ec6564668 Cleanup: unused headers (GPU) 2019-09-14 00:22:24 +10:00
59f9c39f74 Fix T69846: Segment fault converting Curves to GPencil strokes
The problem was when the material slot had something, but the material was NULL.
2019-09-13 16:22:02 +02:00
d4fb850366 Fix T69829: Gpencil sample memory leaks. 2019-09-13 21:43:40 +08:00
Anthony Eriksson
77399283d4 Fix T69037: Automerge is greyed-out in popover
Split "use_mesh_automerge_and_split" and "double_threshold" into their
own column so .active doesn't have to be applied for the entire layout.

Reviewers: billreynish, mano-wii

Differential Revision: https://developer.blender.org/D5618
2019-09-13 09:29:50 -03:00
fcf94c772f UI: don't show decorators in Remesh panel 2019-09-13 14:06:41 +02:00
27bbe7cbd9 Fix vertex paint: color transform operators not respecting vertex paint
mask selection

for 'Invert', 'Levels', 'Hue saturation Value' and 'Bright/Contrast',
face mask was respected, but vertex mask wasnt...

Same code as done in 'Set Vertex Colors'.

reported in T69835

Reviewers: brecht

Maniphest Tasks: T69835

Differential Revision: https://developer.blender.org/D5783
2019-09-13 13:30:55 +02:00
cf858e7738 Cleanup: Use bool instead of int 2019-09-13 13:19:22 +02:00
f795bdbf21 Cleanup: use header guards 2019-09-13 21:12:43 +10:00
9e60e86057 Cleanup: clang-format 2019-09-13 21:12:43 +10:00
Joep Peters
95ef6dfa9e UI: use pageup/down and home/end to scroll to start/end of menus
Differential Revision: https://developer.blender.org/D5582
2019-09-13 13:06:06 +02:00
f7ee2348c0 Fix Particles Keyed Physics target UI greyed out
Picking the 'Target Object' as well as the 'System' number was greyed
out as long as 'Use Timing' was disabled. 'Use Timing' is unrelated for
the above two, these should always be active...

part of T69741

Reviewers: sergey

Maniphest Tasks: T69741

Differential Revision: https://developer.blender.org/D5782
2019-09-13 12:38:49 +02:00
f85ea4ae3c BLI: add non-const lookup methods for StringMap 2019-09-13 12:28:19 +02:00
08539312b2 BLI: add some missing methods to Map and SetVector 2019-09-13 12:10:40 +02:00
592a3d7b47 Tracking: Perform tracking and solving from a locked interface
Solves stability issues with possibly doing destructive changes to the
tracking setup. Locking interface is the simplest and most reliable way
to avoid crashes.

It is still possible to run non-destructive changes such as clip view
navigation. More operations can be marked as safe if needed.

Fixes T67012: Software closes when a processing marker is deleted
2019-09-13 11:59:34 +02:00
49c36d3430 Tracking: Move Lock Selection to an own operator
There are no functional changes as far as users are concerned,
just allows to mark operator as safe to be run from a locked
interface.
2019-09-13 11:59:34 +02:00
11b776d215 Tracking: Mark view operators as safe for locked interface 2019-09-13 11:59:34 +02:00
fa26012f51 Tracking: Cleanup, use bool type instead of int 2019-09-13 11:59:34 +02:00
a2b52dc571 Cycles: add Optix device backend
This uses hardware-accelerated raytracing on NVIDIA RTX graphics cards.

It is still currently experimental. Most features are supported, but a few
are still missing like baking, branched path tracing and using CPU memory.
https://wiki.blender.org/wiki/Reference/Release_Notes/2.81/Cycles#NVIDIA_RTX

For building with Optix support, the Optix SDK must be installed. See here for
build instructions:
https://wiki.blender.org/wiki/Building_Blender/CUDA

Differential Revision: https://developer.blender.org/D5363
2019-09-13 11:50:11 +02:00
53932f1f06 Cycles: add Optix support in the kernel
This adds all the kernel side changes for the Optix backend.

Ref D5363
2019-09-13 11:46:22 +02:00
7eb293a37b Build: output log file to tests/log.txt when running "make test" 2019-09-13 11:46:22 +02:00
577239d2ce GPencil: Fix unreported memory leak for weights
As the total of points was changed before free memory, if the total was lower than before, the remaining points were not released.
2019-09-13 11:18:48 +02:00
bb7c858598 BLI: make more integer type conversions explicit 2019-09-13 11:03:49 +02:00
394318da74 BLI: fix some integer conversions 2019-09-13 10:39:37 +02:00
57e55906f0 Add QuadriFlow remesher 2019-09-13 10:36:05 +02:00
1c44d08a69 BLI: new C++ hash table data structures
This commit adds some new hashing based data structures to blenlib.
All of them use open addressing with probing currently.
Furthermore, they support small object optimization, but it is not
customizable yet. I'll add support for this when necessary.
The following main data structures are included:

**Set**
A collection of values, where every value must exist at most once.
This is similar to a Python `set`.

**SetVector**
A combination of a Set and a Vector. It supports fast search for
elements and maintains insertion order when there are no deletes.
All elements are stored in a continuous array. So they can be
iterated over using a normal `ArrayRef`.

**Map**
A set of key-value-pairs, where every key must exist at most once.
This is similar to a Python `dict`.

**StringMap**
A special map for the case when the keys are strings. This case is
fairly common and allows for some optimizations. Most importantly,
many unnecessary allocations can be avoided by storing strings in
a single buffer. Furthermore, the interface of this class uses
`StringRef` to avoid unnecessary conversions.

This commit is a continuation of rB369d5e8ad2bb7.
2019-09-13 10:06:02 +02:00
8d12c2a836 UI: Fix Mask popover crumpled
Make popover wider and image ID widget full width, like in textures properties.
Not ideal but at least the image name can be read now, until the ID widget
gets a more compact redesign.

Fixes T67748
2019-09-13 00:20:59 +02:00
7137d1470a Docs: update link 2019-09-13 07:46:25 +10:00
bc109be34c Object Mode: don't use origin axis helpers for selection 2019-09-13 06:34:36 +10:00
b6838fd04f Revert "BLI: fix unregistering timer with same id twice"
This reverts commit a1d61c1c84.
Put by error
2019-09-12 22:23:07 +02:00
d7f594ae3a GPencil: New set of Brush icons
Added: Airbrush and Chisel
Changed: Marker

Design: @mendio

Subscribers: mendio

Differential Revision: https://developer.blender.org/D5774
2019-09-12 22:15:19 +02:00
a1d61c1c84 BLI: fix unregistering timer with same id twice 2019-09-12 22:14:23 +02:00
0672cc884c macOS fix typo on Frameworks dir 2019-09-12 23:13:52 +03:00
85a6c07670 macOS fix T67686 , use absolute path to load 3Dconnexion framework 2019-09-12 22:46:49 +03:00
6472662d66 Build: add "make test" command for Windows, output log file
Differential Revision: https://developer.blender.org/D5715
2019-09-12 20:23:03 +02:00
38d62a195b Fix build error on Windows 2019-09-12 19:58:11 +02:00
3062f341b3 BLI: fix illegal zero sized array 2019-09-12 18:46:31 +02:00
852c727073 Transform: AutoMerge & Split: Create and merge vertices at edge intersections
Differential Revision: D5635
2019-09-12 13:32:44 -03:00
ca5e1615a1 BMesh: New tool BM_mesh_intersect_edges
Along with the new utility `BM_vert_weld_linked_wire_edges_into_linked_faces`
2019-09-12 13:32:44 -03:00
f9ef59ccc8 BLIKdopBVH: New BLI_bvhtree_overlap_ex utility 2019-09-12 13:32:44 -03:00
5b2cebf49b Fix T69752: Texture paint sampling colors always 'merged down'
Rgression from rBaf4dcc6073fa.

paint_sample_color > imapaint_pick_face uses the the selection buffer
(DRW_select_buffer_sample_point) and to get flat colors [select_id_flat] we
need to be in SCE_SELECT_FACE mode. This was already fine if you had
'Face Selection Masking' turned on, but got colors including lighting
when turned of [select_id_uniform].

There was already an exception in 'select_cache_init' that turns on
SCE_SELECT_FACE for weightpaint, we just need this for texture paint
(vertex paint) as well... Also moved the logic into
select_id_get_object_select_mode.

Note we were also asserting here:
BLI_assert failed: /blender/source/blender/draw/engines/select/
select_engine.c:174, select_cache_init(), at 'e_data.context.select_mode
!= 0'

Note also this is not working correctly for vertexpaint (yet), but has
been discussed in T69752 and there is a solution by @mano-wii in P1032.

Reviewers: mano-wii

Subscribers: mano-wii

Maniphest Tasks: T69752

Differential Revision: https://developer.blender.org/D5775
2019-09-12 18:23:36 +02:00
OmarSquircleArt
2ea82e86ca Shading: Add Vertex Color node.
This patch adds a new Vertex Color node. The node also returns the alpha
of the vertex color layer as an output.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5767
2019-09-12 17:42:13 +02:00
f80018b5f7 Fix: missing atomic include 2019-09-12 17:03:03 +02:00
058d218254 BLI: new StringRef and StringRefNull data structures
These two data structures reference strings somewhere in memory.
They do not own the referenced string. The string is considered
const.

A string referenced by StringRefNull can be expected to be
null-terminated. That is not the case for StringRef.

This commit is a continuation of rB369d5e8ad2bb7c2.
2019-09-12 16:55:35 +02:00
Julian Eisel
914f4308fb Fix T69791: Fix crash reading old file browser in temporary window
When reading a old .blend file (from before the new file browser
design), we wouldn't create the execute region for existing file
editors. This usually wasn't an issue, but it could become one when a
file browser was opened in a temporary screen before, and that screen
was still visible. Then code spawning the new file browser would re-use
the old file browser data, assuming the execute region was there.

Handle this in versioning code and let rest of the code keep sane
assumtions (e.g. that there always is a execute region, even if
invisible).
2019-09-12 16:36:07 +02:00
52b32fde18 GPencil: Add Simplify panel to Workbench engine 2019-09-12 16:21:34 +02:00
78496331f5 GPencil: Fix missing Simplify panel in Cycles
Differential Revision: https://developer.blender.org/D5776
2019-09-12 16:21:34 +02:00
c40171c60d Themes: Update Blender Light theme.
Fixes T69531
2019-09-12 16:08:58 +02:00
2e10cb02fb UI: Two-column layout for User Interface theme settings.
Group related settings in columns:
* Align Inner, Inner Selected and Outline.
* Align Text, Text Selected and Item.

Place Shaded settings in its own sub-panel.
2019-09-12 16:08:58 +02:00
c168092014 Fix T69792: Auto-merge split faces creates faces with unrelated wire edges. 2019-09-12 10:58:18 -03:00
62c820cdaa UI: avoid using parenthesis
Convention is not to use parenthesis,
Details are included in tool-tip.
2019-09-12 22:53:29 +10:00
c6221f5ce4 BLI: fix unregistering timer with same id twice 2019-09-12 14:44:33 +02:00
369d5e8ad2 BLI: new C++ ArrayRef, Vector, Stack, ... data structures
Many generic C++ data structures have been developed in the
functions branch. This commit merges a first chunk of them into
master. The following new data structures are included:

Array: Owns a memory buffer with a fixed size. It is different
  from std::array in that the size is not part of the type.

ArrayRef: References an array owned by someone else. All elements
  in the referenced array are considered to be const. This should
  be the preferred parameter type for functions that take arrays
  as input.

MutableArrayRef: References an array owned by someone else. The
  elements in the referenced array can be changed.

IndexRange: Specifies a continuous range of integers with a start
  and end index.

IntrusiveListBaseWrapper: A utility class that allows iterating
  over ListBase instances where the prev and next pointer are
  stored in the objects directly.

Stack: A stack implemented on top of a vector.

Vector: An array that can grow dynamically.

Allocators: Three allocator types are included that can be used
  by the container types to support different use cases.

The Stack and Vector support small object optimization. So when
the amount of elements in them is below a certain threshold, no
memory allocation is performed.

Additionally, most methods have unit tests.

I'm merging this without normal code review, after I checked the
code roughly with Sergey, and after we talked about it with Brecht.
2019-09-12 14:23:21 +02:00
1954723635 Cycles: Fix Show Instanced Local View Objects
The local view check in the RNA didn't support instanced objects. Every
object has a copy of the local_view_bits from the base. This patch
changes the check to look at the local stored bits.

This patch removes the check if the object is part of the view_layer.
In the cases we are using it this check is not relevant. The `mesh_tissue`
add-on also uses it, and is not effected by this change.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5773
2019-09-12 13:33:46 +02:00
OmarSquircleArt
613b37bc2c Shading: Add More Features To The Voronoi Node.
This patch allows the Voronoi node to operate in 1D, 2D, and 4D space.
It also adds a Randomness input to control the randomness of the texture.
Additionally, it adds three new modes of operation:

- Smooth F1: A smooth version of F1 Voronoi with no discontinuities.
- Distance To Edge: Returns the distance to the edges of the cells.
- N-Sphere Radius: Returns the radius of the n-sphere inscribed in
the cells. In other words, it is half the distance between the
closest feature point and the feature point closest to it.

And it removes the following three modes of operation:

- F3.
- F4.
- Cracks.

The Distance metric is now called Euclidean, and it computes the actual
euclidean distance as opposed to the old method of computing the squared
euclidean distance.

This breaks backward compatibility in many ways, including the base case.

Reviewers: brecht, JacquesLucke

Differential Revision: https://developer.blender.org/D5743
2019-09-12 13:09:31 +02:00
0137509476 Fix T69789: Assert when create a new Full Copy scene base on 2D template.
Private ID data (nodetrees and scene collections...) need special care
and handling of their copy flags, and checks must be adapted too.

In that case, issue came from the fact that even though those IDs have
to be copied outside of bmain, we may still require usercount handling.

That commit also fixes a somewhat related issue - we cannot use the
non-id private data copying flag for private IDs copying, due to
difference in handling of usercount again.
2019-09-12 12:27:39 +02:00
4df75063e1 UI: Sub-type for Screen Grab Size.
Set to Pixel.
2019-09-12 12:23:51 +02:00
1885246015 UI: Wrong label in Screen Grab Size.
It was using "screen_grab_size" as label.
2019-09-12 12:23:51 +02:00
b6027b4efd UI: Labels capitalization.
Capitalize the first letter of a word, except articles and prepositions.
2019-09-12 12:23:51 +02:00
492a7998d5 Fix T69785: crash dragging in empty space in edit mode 2019-09-12 11:34:42 +02:00
9fa8614b32 Cleanup: compiler warnings 2019-09-12 11:34:42 +02:00
2cec4af124 Fix T69582: Empties no longer support Rigid Body Constraints
This is caused by rB1342d1879e12 and would also break the whole
"Connect" workflow [which relies on empties]

Reviewers: mont29, brecht

Maniphest Tasks: T69582

Differential Revision: https://developer.blender.org/D5772
2019-09-12 11:24:23 +02:00
bbae7874c0 Fix T69782: crash using gizmos in grease pencil edit mode 2019-09-12 11:14:44 +02:00
a22c2ceb0f Cleanup: line breaks with comments 2019-09-12 18:59:44 +10:00
1e2f2f27e9 Fix crash when doing cycles rendering
During F-12 Rendering the passed screen was Null, but decoded as a
number. In stead of a Null a 0 will be send to cycles python wrapper.
2019-09-12 10:25:39 +02:00
861697c9e5 Cycles: Initial Support For Local View
This diff will add support for local view to Cycles rendered preview mode.

Currently the implementation shows same results as EEVEE does. This entails
a difference with Blender 2.79, where lights were automatically added to the
local view. {T69780} describes this should be solved before the next release.

This patch also solves missing `owner_id` issues when using the RNA CPP Api
from Cycles. Cycles didn't provide the `owner_id` making some functionality
fail, what then was worked around in Blender. It also fixes an issue in
`makesrna` where incorrect CPP code was generated when only `PARM_RNAPTR`
was provided.

An optional `view_layer` parameter is added to the `Object.local_view_get`
method to reduce lookups.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5753
2019-09-12 09:08:22 +02:00
70a9347705 Fix T69737: Crash using the Elastic Deform brush and Compressibility
Also renamed "compressibility" to "volume preservation"

Reviewed By: brecht

Maniphest Tasks: T69737

Differential Revision: https://developer.blender.org/D5757
2019-09-12 03:55:53 +02:00
1e375ab5a1 3D View: only show origin axes when in object mode 2019-09-12 07:31:46 +10:00
32b49f9e9f Fix transforming armature origins
Using geometry update doesn't work on armatures.
2019-09-12 07:28:49 +10:00
62ffc0c2c9 DNA: use defaults for SceneEEVEE 2019-09-12 06:53:25 +10:00
ff085e85d3 DNA: move View3D, View3DOverlay into DNA_view3d_defaults.h 2019-09-12 06:48:13 +10:00
6db00065c5 Cleanup: remove redundant RNA defaults
These are now set from DNA defaults.
2019-09-12 06:25:32 +10:00
9a076dd95a DNA: defaults for ID types 2019-09-12 04:58:09 +10:00
2f08a25d83 Cleanup: Warning: 'sld': local variable is initialized but not referenced 2019-09-11 15:22:00 -03:00
3bd4f229be Transform: Edit Mesh: Support mirror on all axes
Part of T68930

Now two other mirror options that can be enabled simultaneously: Mirror Y and Z.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Subscribers: ThatAsherGuy

Differential Revision: https://developer.blender.org/D5720
2019-09-11 13:49:18 -03:00
OmarSquircleArt
003802db83 Cycles: Ignore links with unavailable sockets.
Ignore links with unavailable/disabled sockets during shader graph
generation.
2019-09-11 18:32:50 +02:00
6d85280ec3 Fix T69458: Edit Mesh selection bug from camera view 2019-09-11 13:06:28 -03:00
7e245e482c Fix T59143: Frame Selected Doesn't work in hair particle editmode
This is caused by rBeb521b22b2b1.

Looks like `PE_minmax` doesnt play nice with the evaluated view_layer.
If we look inside `PE_get_current`, then `BKE_ptcache_ids_from_object`
will actually return a list of `PTCacheID` for the evaluated object.
However, looking further, then `PTCacheEdit` / `psys->pointcache->edit`
is always NULL for the evaluated object.

Without a valid `PTCacheEdit`, `PE_minmax` will basically do nothing.
So now we are passing the non-evaluated view layer in the case of
particles.

Regarding to @sergey, in a longer term we should probably make it so
evaluated pointcache have pointer to edit.

Reviewers: sergey

Maniphest Tasks: T59143

Differential Revision: https://developer.blender.org/D5758
2019-09-11 18:01:45 +02:00
30aa67d5d5 Fix T69558: crash in BKE_scene_update_sound for a soundstrip without
linked sound

Crash could be triggered by just adding any object to the scene.

Reviewers: sergey

Maniphest Tasks: T69558

Differential Revision: https://developer.blender.org/D5764
2019-09-11 17:47:58 +02:00
d84d49280b Fix T69722: Pose brush crashes with multires modifier
Reviewed By: brecht

Maniphest Tasks: T69722

Differential Revision: https://developer.blender.org/D5759
2019-09-11 17:42:58 +02:00
ee734dcc73 Fix T69754: crash in sculpting after library overrides were enabled
The rest of this function uses G_MAIN, so do the same.
2019-09-11 17:32:44 +02:00
6283b5b817 UI: move transform settings from pivot to options panel
These weren't related to pivot, so add in a new options panel.
2019-09-12 00:52:46 +10:00
5f47adc0f7 UI: enable topbar by default
This lets us add settings to the options panel without them being
hidden from the user.
2019-09-12 00:52:46 +10:00
4665a08873 Python: Fix to support old-style handlers
Can not re-use single typle even if there is a single input pointer:
the all-arguments-typle consists of 2 elements.
2019-09-11 15:53:36 +02:00
fc16cf8d2d LibOverride: Enable them in UI by default.
This is minimal 'flip-switch' commit, proper cleanup and removal of the
option thing will happen later, once we are sure that we can release
2.81 with it enabled.

For now, we have a `--disable-library-override` now. ;)
2019-09-11 15:19:14 +02:00
e0ca19152f DNA: initialize defaults for output paths 2019-09-11 22:21:39 +10:00
0c2a314443 RNA: automatically initialize defaults from DNA
Use defaults from DNA_*_defaults.h headers, this avoids calling
RNA_def_property_*_default explicitly & having to repeat values.
2019-09-11 22:21:13 +10:00
a941e9de89 DNA: make DNA_elem_size_nr a public function
Needed for getting struct member offsets.
2019-09-11 22:20:36 +10:00
3f5c54575f RNA: separate internal allocation function 2019-09-11 22:16:36 +10:00
309cd047ef Sculpt: Transform tool
The sculpt mode transform tool applies the sculpt pivot transformation to all vertices, taking XYZ symmetry into account.
This commit also includes an operator to set the pivot point initial position.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5717
2019-09-11 13:07:19 +02:00
ef18b672f5 GPencil: New Brush postprocesing Simplify
This option allows to apply a simplify when the stroke is completed. The simplify use the Adaptive option to keep the shape.
2019-09-11 12:28:23 +02:00
7e61e59725 Cycles: Display RenderPass in Viewport
This change allows the user to select a renderpass in the 3d viewport.

Added support for external renderers to extend the `View3DShading` struct.
This way Blender doesn't need to know the features an external render engine wants to support.
Note that the View3DShading is also available in the scene->display.shading; although this is
supported, it does not make sense for render engines to put something here as it is really
scene/workbench related.

Currently cycles assumes that it always needs to calculate the combined pass; it ignores the
`pass_flag` in KernelFilm. We could optimize this but that was not in scope of this change

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5689
2019-09-11 12:19:44 +02:00
d4f8bc80a4 Armature: convert the length Python property of bones to a RNA property.
This allows accessing it from drivers and using it in UI, as
demonstrated by adding it to the transform panel of 3D View.

As an aside, properly mark transform-related properties of Bone
read-only, as they can only be changed correctly in edit mode.
2019-09-11 12:49:04 +03:00
Julian Eisel
69e0f485c9 Fix T69736: Flipping bookmarks region empties it 2019-09-11 11:39:58 +02:00
9bb6058489 Cleanup: typo/spelling 2019-09-11 11:29:45 +02:00
f7fce00297 Depsgraph: Allow non-keyed changes from frame_change_post handler
Makes it possible to do custom edits to animated properties from a
python handler.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5738
2019-09-11 10:43:27 +02:00
ea513a97f5 Render: Only run callbacks for non-preview renders
Those handlers are usually done to edit scene which is being rendered,
and this is not supported due to a fully localized nature of the preview
bmain.

There is still non-conditional callback in stats_background which is a
bit tricky to cover with check, but this code is not supposed to be run
for previews anyway.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5731
2019-09-11 10:43:27 +02:00
a650258158 Python handlers: Pass depsgraph to events where it makes sense
The goal is to make it possible to access evaluated datablocks at a
corresponding context. For example, be able to check evaluated state
if an object used for rendering.

Allows to write scripts in a safe manner for T63548 and T60094.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5726
2019-09-11 10:43:27 +02:00
022de797f1 Depsgraph: Introduce depsgraph registry
Allows to access dependency graphs created for render engines
to inform them about changes in .blend file structure from the
Python handlers.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5724
2019-09-11 10:43:27 +02:00
73a199e96a Depsgraph: Pass bmain to depsgraph object creation
Currently unused, but will allow to keep of an owner of the depsgraph.

Could also simplify other APIs in the future by avoiding to pass bmain
explicitly to relation update functions and things like that.
2019-09-11 10:43:27 +02:00
559df2fed9 Transform: Snap: Fix mixed snap without edge
Face snapping was disregarded when approaching an edge.
2019-09-10 22:09:05 -03:00
4ce3fbd52a UI: File Browser Friendly Volume Descriptions
File Browser Volumes list gets nicer friendly drive names with volume label or device description.

Differential Revision: https://developer.blender.org/D5747

Reviewed by Brecht Van Lommel
2019-09-10 15:12:42 -07:00
fa12428ede Fix T69729: Missing Direction buttons in Draw Sharp brush
Reviewed By: brecht

Maniphest Tasks: T69729

Differential Revision: https://developer.blender.org/D5746
2019-09-10 22:05:12 +02:00
f1b52ef211 EEVEE: Volume: Fix error in fallback integration algo 2019-09-10 21:59:33 +02:00
caf494444c EEVEE: Volume: Speedup: Use Image load store extension
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5740
2019-09-10 21:59:16 +02:00
Julian Eisel
42c062c98a UI: File browser deselect on click on empty space
For the default and industry compatible keymap, clicking on empty space
in the file browser will deselect all files.

Also makes selection use same operator description we use for other
select operators.
2019-09-10 18:40:31 +02:00
01a3a9c818 Fix SDNA error expanding names not updating name array sizes
This doesn't cause problems at the moment,
it just makes using name sizes possible in the future.
2019-09-11 01:51:15 +10:00
2f4153396c Cleanup: no need to add Brush.flag2
Also use 'use_' prefix for RNA booleans.
2019-09-11 01:51:15 +10:00
5ba0726bc1 GPencil: Deduplicate function
The same code was duplicated and now it was moved to shared function.
2019-09-10 17:49:27 +02:00
841df2b98e Fix T69723: Crash with mask expand operator while in rendered or material view
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5745
2019-09-10 17:45:41 +02:00
0174185e2f GPencil: New Simplify Tint option
This is useful to disable all layers tint in one step and it will be used for future operators.
2019-09-10 17:41:23 +02:00
8f55794c0e UI: File Browser Custom Folder Color
Allows file browser folders to be shown in a theme-selectable color, default of manila.

Differential Revision: https://developer.blender.org/D5713

Reviewed by Brecht Van Lommel
2019-09-10 08:07:39 -07:00
a3e7440cfd Sculpt: Grab Active Vertex and Dynamic Mesh Preview
Grab active vertex snaps the maximum strength of the grab brush to the highlighted active vertex, making it easier to manipulate low poly models or meshes with subdivision surfaces.
Dynamic Mesh Preview generates a list of connected vertices from the active vertex and draws them from the cursor code. This helps to visualize the real geometry the user is manipulating from sculpt mode when there are active modifiers.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5646
2019-09-10 16:24:09 +02:00
e0f7ada0d2 Fix warning and naming in mask expand
Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5742
2019-09-10 15:53:02 +02:00
a13b1b18de Fix T69702: crash using particles rendered as whole collection
This happened when the 'Whole Collection' option was enabled next to the
'Use Count' option. These two are exclusive but some code paths only
checked for 'Use Count'.

Reviewers: brecht

Maniphest Tasks: T69702

Differential Revision: https://developer.blender.org/D5741
2019-09-10 15:39:38 +02:00
cfb3011e52 Sculpt: Mask Extract operator
This operator extracts the paint mask to a new mesh object. It can extract the paint mask creating a boundary loop in the geometry, making it ready for adding a subdivision surface modifier.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5384
2019-09-10 15:19:48 +02:00
0083c96125 Sculpt: Mask Expand operator
This operator is a combined version of mask expand and mask by normal from the sculpt branch. It can be used to quickly isolate parts of a model based on topology or curvature.
- Shift + A starts the operator in topology mode from the active vertex
- Shift + Alt + A starts the operator in curvature mode from the active vertex

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5657
2019-09-10 15:13:37 +02:00
ef47c99fcb Fix T69651: Inpaint node distance parameter: Default value does not match minimum value
probably makes sense to allow for zero iterations...

Reviewers: jbakker

Maniphest Tasks: T69651

Differential Revision: https://developer.blender.org/D5728
2019-09-10 13:35:49 +02:00
b2b52c6c91 Fix T69432: Hair particle editmode: hiding not working
PTCacheEditPoint flag PEP_HIDE was not respected at all...

Reviewers: brecht

Maniphest Tasks: T69432

Differential Revision: https://developer.blender.org/D5739
2019-09-10 13:15:29 +02:00
df8341a486 Python: don't include distutils Windows installer executables for Linux/macOS
They were detected as (false positive) malware with ClamAV. It's unlikely
someone would need these files, and e.g. the Debian Python package also
excludes them with a custom patch.
2019-09-10 12:44:52 +02:00
bf6e05562c Fix assert hiding selected particles
was trying to get a boolean with RNA_enum_get (instead of
RNA_boolean_get)

Spotted while looking into T69680, T69432
2019-09-10 11:31:40 +02:00
3e81c1c1d5 Fix (unreported) crash after new mapping node commit.
Blatant obvious usage of freed memory in rBbaaa89a0bc54.

And also fix a memleak in same code/commit...
2019-09-09 22:20:32 +02:00
c8c3e7d284 Cleanup: trailing space, remove tabs, pep8 2019-09-10 06:17:59 +10:00
51334dd3a6 Fix T69686: Cycles OpenCL build error after recent changes 2019-09-09 22:11:23 +02:00
0426866eb0 Fix T67637: Selected edges hard to see with wireframe
Always show selected edges in wire/xray modes.
2019-09-10 05:59:50 +10:00
OmarSquircleArt
f2176b3ff3 Shading: Extend Musgrave node to other dimensions.
This patch extends Musgrave noise to operate in 1D, 2D, 3D, and 4D
space. The Color output was also removed because it was identical
to the Fac output.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5566
2019-09-09 21:06:55 +02:00
c2d37929b4 Fix T69633: weird behavior of operator_menu_enum tooltips.
For operators with dynamic tooltips the tooltip calculation is
deferred until the moment it is actually shown for performance
reasons, with the tooltip field left blank for the time being.
Enum menu code shouldn't jump in and assign a tooltip either.

The menu button itself can't show a dynamic tooltip because it
does not actually call the operator, and has no reference to it.

As a side change, allow returning None from the python callback
as the most natural way to fall back to the default tooltip.
2019-09-09 21:13:34 +03:00
ee9fb174f4 Added function to calculate the total area of a mesh. 2019-09-09 19:41:12 +02:00
9f859528e9 DNA: use defaults for Object, Mesh, Material 2019-09-10 03:27:27 +10:00
b24fdaed65 DNA: add theme & preferences to defaults
Use existing theme & preferences for defaults.
2019-09-10 03:27:27 +10:00
6be3348505 Cleanup: fix compiler warnings 2019-09-09 19:22:54 +02:00
828ef61cd1 Fix crashing mask brush after recent changes 2019-09-09 19:19:59 +02:00
8594cdb456 Fix build error after DNA defaults changing
dna_type_offsets.h must be generated before we use it in blenkernel,
similar to what we already do for blenloader.
2019-09-09 19:09:13 +02:00
bfbee87831 Sculpt: Pose Brush
This brush lets the user pose a model simulating an armature-like deformation. The pivot point for rotation is calculated automatically based on the radius of the brush and the topology of the model.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5647
2019-09-09 17:55:16 +02:00
55245ed6ad Fix (unreported) non-official X3D add-on enabled in factory startup.
Forgot to remove it from there when I moved it to community-supported
status last week.

Also raising subversion.
2019-09-09 17:42:44 +02:00
22d157d469 I18n: dirty workaround for PITA ghost classes remaining after unregister.
Spent again a whole day trying to understand what happens here, with no
luck. For some reasons, OperatorProperties children of unregistered
operator classes remain accessible, with their `bl_rna` member, although
that one is 100% invalid (freed memory, crashes with ASAN builds).

Funny thing is, I cannot reproduce that situation when disabling the
add-on from the py console of a Blender-with-UI.

Note: issue revealed by X3D add-on, which is still enabled in factory
settings, while not being officially supported any more, this has to be
fixed in a separate commit.
2019-09-09 17:42:44 +02:00
e781e9565d UI: Format Memory Strings in Binary
Show all memory-related byte size strings calculated with a base of 1024.

Differential Revision: https://developer.blender.org/D5714

Reviewed by Brecht Van Lommel
2019-09-09 08:38:01 -07:00
6d4b311888 UI: File Browser Sizes in Binary for Windows
This adds per-platform change so Windows users will see file sizes calculated with a base of 1024.

Differential Revision: https://developer.blender.org/D5714

Reviewed by Brecht Van Lommel
2019-09-09 08:29:21 -07:00
2b2739724e Sculpt: Topology automasking
The sculpt automasking feature assigns a factor to each vertex before starting the stroke. This can be used for isolating disconnected meshes, masking cavities, mesh boundary edges or creating topological falloffs.

This commit implements automasking in all brushes and topology automasking without topology falloff.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5645
2019-09-09 17:02:04 +02:00
5fe83ffb3a Cleanup: unused functions 2019-09-10 00:42:04 +10:00
Julian Eisel
2aa3e9c67c UI: Add superimposed + and - icons for file number
Brings back + and - icons to the file name button, but now as
superimposed icons.
2019-09-09 16:37:47 +02:00
Julian Eisel
828905190e UI: Refactor and improve buttton extra icons
Without this patch there could only be one superimposed icon
and the operators were hard coded for the button types.
This keeps the previous, sort of predefined extra icons working in a
rather generic way, but allows adding specific ones for specific case
through `UI_but_extra_operator_icon_set()`.

Reviewed by: Campbell Barton

Differential Revision: https://developer.blender.org/D5730
2019-09-09 16:37:47 +02:00
9b6233b27c Partial revert "Edit Mesh: Change color behavior"
Using a lighter color for faces than edges makes edges hard to see
in wire-frame display mode. See T67637.

This partially reverts commit 203f9a49e2.
2019-09-10 00:33:31 +10:00
2541d03917 Fix T69382: Crash - Regression - GPU Intel HD 4000
Workarounds were not being enabled for drivers like `10.18.10.5069`.
2019-09-09 11:32:32 -03:00
13206a6dc0 Sculpt: Mask Filter and Dirty Mask generator
The mask filter operator modifies the whole paint mask. In includes multiple operations like smooth, grow or contrast accessible from a pie menu.
The dirty mask generator is similar to Dirty Vertex Colors, but it generates a paint mask. It can be used to mask cavities in the sculpt.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5496
2019-09-09 16:30:12 +02:00
87c7135da5 Cleanup: GPencil small improvements in comparison
As the function `gpencil_onion_active()` has a loop, if some condition is false before we can avoid the loop.
2019-09-09 16:25:44 +02:00
bb8d859a68 GPencil: Fix unreported problem when main Onion switch is disabled
The main switch was not checked and the function was doing all calculations, but the data was not used. This makes all slower than expected because the user had the Onion Skinning disabled, but internally was running.
2019-09-09 16:20:40 +02:00
3d2b0c9b40 Cleanup: expand tabs 2019-09-10 00:04:02 +10:00
e22bae15aa Cleanup: missing break & shadowing warnings 2019-09-10 00:04:02 +10:00
6a4df70d41 Sculpt: Mesh Filter Tool
The mesh filter tool applies a deformation to all vertices in the mesh at the same time. It includes multiple deformation modes and the option to lock the deformation axis.
This commit also includes the FilterCache, which is needed in some new operators and tools.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5513
2019-09-09 15:50:17 +02:00
97a5f961c4 Fix compiler error in Windows introduced in 322c03f13c 2019-09-09 15:45:48 +02:00
74dcfaf172 GPencil: Fade layer using background color
Now the fade layer uses the same logic used to fade objects and also is available in all modes.

Reviewers: mendio, pepeland

Reviewed By: mendio, pepeland

Differential Revision: https://developer.blender.org/D5707
2019-09-09 15:41:11 +02:00
70c1aaf59b Sculpt: Elastic Deform Brush
This patch implements the paper "Regularized Kelvinlets: Sculpting Brushes based on Fundamental Solutions of Elasticity" https://graphics.pixar.com/library/Kelvinlets/paper.pdf

It includes grab, biscale grab, triscale grab, scale and twist.
All deformation modes are accessible under the same tool. This helps to keep the code organized and it should not make any difference to the user when a better brush management system is implemented.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5634
2019-09-09 15:34:25 +02:00
8127bbbe39 Cleanup: clang-format 2019-09-09 15:23:00 +02:00
5d9c01c53f Fix T69663: 2.81 Cant open/append/link a blend file but 2.8 can
Was a problem in the versioning code from rBbaaa89a0bc54, since the
TexMapping struct could already be freed and node->storage could already
be set to NULL (if a file with the new mapping node [saved from (2, 81,
8) or newer] is opened in a blender version prior to (2, 81, 8) and
saved from there again).

Reviewers: brecht

Maniphest Tasks: T69663

Differential Revision: https://developer.blender.org/D5723
2019-09-09 15:19:12 +02:00
f5e0dfe59c DNA: initial DNA defaults support
This provides an API to access structs
with their members set to default values:

- DNA_struct_default_get(name)
- DNA_struct_default_alloc(name)

Currently this is only used for scene & view shading initialization,
eventually it can be used for RNA defaults and initializing
DNA struct members on file reading.
2019-09-09 23:17:03 +10:00
e164afe9b5 GPencil: Change Arrange Strokes menu order
Before: Bring Forward, Send Backward, Bring to Front, Send to Back.

After: Bring to Front, Bring Forward, Send Backward,  Send to Back.
2019-09-09 15:15:29 +02:00
70991bfd94 Sculpt: Draw Sharp Brush
This brush is similar to the draw brush but it deforms the mesh from the original coordinates. When used with the sharper curve presets it has a much more pleasant crease/cut behavior than any of the other brushes. This is useful for creating cloth wrinkles, stylized hair or hard surface edges.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5530
2019-09-09 15:12:15 +02:00
056bb7721e Cleanup: remove unused scene struct members 2019-09-09 22:39:58 +10:00
322c03f13c Move callbacks API from BLI to BKE
Preparing for the bigger changes which will be related on passing
dependency graph to various callbacks which need it.

Differential Revision: https://developer.blender.org/D5725
2019-09-09 14:26:42 +02:00
103d29e2b2 Timer: Use explicit re-initialization on file load
Before this the timer API was relying on using a callback API to do
initialization when new file is loaded. This isn't how rest of Blender
works and it gets in a way because callbacks API is to be move to the
BKE level.

Use explicit call to timer API from where the file is loaded.
2019-09-09 14:26:29 +02:00
423435bd2e Cleanup: sort struct, file lists 2019-09-09 21:09:19 +10:00
98d3a16281 Fix (unreported) Freestyle modifiers element-wise multiplication error 2019-09-09 10:46:25 +02:00
d865ac8b1b Fix T69653: Freestyle modifiers "Distance from ..." python error
Was a wrong rename in rBaeb8e81f2741
2019-09-09 10:45:24 +02:00
f3a4f12ac0 Batch Rename: Rename Title Caps to Title Case 2019-09-08 17:40:46 -04:00
Julian Eisel
de12057365 UI: Allow context menu in all file browser regions 2019-09-08 21:27:58 +02:00
Julian Eisel
1601413b63 UI: Allow file number shortcuts ouside main region
Makes the numpad + and - type of shortcuts to increase/decrease the file
number suffix work in the upper and lower bar of the file browser.

Had to add keymap handlers to the execute region for this to work.
2019-09-08 20:35:56 +02:00
7ab936c5b9 Fix T69640: make update not working with Python older than 3.7 2019-09-08 18:45:08 +02:00
a9dbc2ef4a Edit Mesh: select interior faces now detects regions
The previous method only worked in simple cases where faces were
surrounded by non-manifold edges.

Now face regions surrounded by non-manifold edges are marked as interior.
Starting with regions most perpendicular to the surrounding geometry.

Resolves T68401
2019-09-09 01:48:25 +10:00
Julian Eisel
e7476b667e Fix T67756: File drag starts on file browser open
When the file browser was opened (from a temporary window since the file
browser redesign) using a button in the UI, under certain conditions
moving the mouse would trigger files to be dragged.

Note that this has been an issue before the new file browser design was
introduced, although under slightly different conditions.

Steps to reproduce:
* With factory settings, press F12
* Open a different image in the appearing Image Editor (not Render
  Result)
* Make sure the window is not maximized
* Press N to open the side bar, open Image tab
* Click the folder icon there to change the image
* Change to thumbnail display type in the appearing file browser
* Cancel, click the folder icon again
Moving the mouse now would start dragging files in most cases.

The same issue could be reproduced in a similar way when installing
lights/MatCaps or HDRIs through Preferences -> Lights -> Install...
2019-09-08 17:03:48 +02:00
5de51b46b6 Fix T69634: GPencil:Cutter Tool removes unexpected strokes on another layer
The function was not checking the locked flag.
2019-09-08 16:49:47 +02:00
c3be14e151 Cycles: add bump map shadow terminator softening term for diffuse BSDFs
This avoids artifacts for bump mapping and diffuse BSDFs, where the bump
normal deviates far from the actual normal.

Differential Revision: https://developer.blender.org/D5399
2019-09-08 15:32:08 +02:00
ad21a6c224 Fix script_load_modules test failure in power sequencer 2019-09-08 15:17:06 +02:00
b6114c3849 Build: skip Blender repository pull in "make update" when not possible
This prints a more informative message, and is convenient when working with
local changes or in a branch where you only need to update submodules or tests.
2019-09-08 14:52:33 +02:00
Julian Eisel
a566b71333 Fix crash closing stacked file browser window
Caused by ab823176d3.
Steps to reproduce were:
* Open Preferences
* Open file browser through Lights -> Install (doesn't matter which)
* Close browser through the window controlls

The window was freed earlier, but still referenced by new handler
context storage.
2019-09-08 14:37:12 +02:00
f5ad622009 Update RNA Manual References 2019-09-07 20:23:13 -04:00
4764362ebb Fix GTests failing on Windows buildbot
Run these tests from the install directory so they can find dlls.
2019-09-07 22:51:19 +02:00
fd05f01be6 Partially revert "Cleanup: use post increment/decrement"
This partially reverts commit 0b2d1badec

Post increment can deep-copy for C++ iterators, while in my own checks
GCC was able to optimize this to get the same output,
better follow C++ best practice and use pre-increment for iterators.
2019-09-08 04:08:10 +10:00
abeab4fcad Fix buildbot not reporting error when tests fail 2019-09-07 18:22:48 +02:00
2028302f44 Tests: run tests from install path
Blender can only be run correctly from the install path since it requires Python
scripts, dynamic libraries and other files to be present. By default the install
path is the same as the build path, so it works anyway. But on the buildbot it
isn't. There was a workaround but it failed on Windows and macOS.

Now tests run from the install path. Detecting that path for ctest is more
complicated than I would like, but I couldn't find a better solution.

Ref T69541.
2019-09-07 18:09:41 +02:00
708e81bdfa Fix buildbot error building release on macOS 2019-09-07 18:09:41 +02:00
ea6992d0e5 Fix missing LLVM include directories on macOS
These are not used in master yet, but they are needed for the functions branch.
2019-09-07 18:09:41 +02:00
d5642584cd Fix redo panel button alignment
Menu's in the redo panel left a space for decorators.
2019-09-08 01:18:51 +10:00
b380a98887 Fix two bugs in delaunay blenlib function.
Bugs were: (1) needed an epsilon test in CCW test in order to
handle new costraint edge that intersects an existing point
but only within epsilon; (2) the "valid bmesh" output mode
sometimes left a face that included outside frame point.
2019-09-07 20:31:24 +05:30
0b2d1badec Cleanup: use post increment/decrement
When the result isn't used, prefer post increment/decrement
(already used nearly everywhere in Blender).
2019-09-08 00:23:25 +10:00
Julian Eisel
ab823176d3 Fix saving images from temp Image Editor failing
Steps to reproduce were:
* Ensure //Render//->//Display Mode// is //New Window//
* F12
* In the opened Image Editor, Alt+S to save the image
* Save the image
The saving would fail silently.

Issue was that wm_handler_op_context() would fail to find the correct
area to activate, as the wrong window was active in context. So allow
overriding this window and do so when creating the file-select handler.
2019-09-07 16:08:56 +02:00
fa7ee622f0 Cleanup: includes in headers
Forward declare structs where possible.
2019-09-07 23:17:40 +10:00
1b0dd5a215 Cleanup: style, spelling 2019-09-07 21:28:05 +10:00
ed779333bb EEVEE: Shadows: Fix correlation issue between Shadows and Anti-Aliasing
To fix this, we just scramble the halton sequence by multiplying by a large
prime number.

It seems to work fine in practice.

We also tried Sobol sequence but it has a less uniform pattern for low
number of sample.

Fix T68594 Eevee: Soft shadows causing flickering in animation and temporal AA in scenes
2019-09-07 00:44:20 +02:00
963a266faf EEVEE: Fix tests crashing if file is in edit mode 2019-09-07 00:44:20 +02:00
44aaee573a EEVEE: Shadows: Fix incorrect shadowing near point lights source 2019-09-07 00:44:20 +02:00
Jean First
d288776cef Fix T68843: wireframe node in Eevee fails on macOS
Differential Revision: https://developer.blender.org/D5712
2019-09-07 00:01:48 +02:00
87d0033ea9 Fix node_shader_utils problems with new mapping node
Since rBbaaa89a0bc54 we have to access the mapping node differently.
This doesnt take actual linkage of the new sockets into account (but
this wasnt done for most sockets on the Principled BSDF node either)

Also the min/max of the mapping node was removed entirely.
It was decided upon removing this from node_shader_utils as well (and
replace this by existing access to the Extension parameter of the
Texture node).

Part of solving T69526.

Differential Revision: https://developer.blender.org/D5693
2019-09-06 23:39:19 +02:00
bbcb4be04f Fix T69597: Changing Grease Pencil Layer in Dopesheet unlocks all layers
The Dopesheet was unlocked all layers because it was using the same logic used in UI panel, but this was wrong.
2019-09-06 23:33:29 +02:00
9ecbd67dfb Python API: implement an Operator callback for dynamic description.
Blender UI Layout API allows supplying parameters to operators via
button definitions. If an operator behavior strongly depends on its
parameters, it may be difficult to write a tooltip that covers all
of its operation modes. Thus it is useful to provide a way for the
operator to produce different descriptions based on the input info.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D5709
2019-09-06 22:05:20 +03:00
b0b24b77ff Fix T68796: stereo side-by-side and pageflip not drawing correctly 2019-09-06 20:38:58 +02:00
7cec119c57 EEVEE: Fix Ambient Occlusion on backfaces
N is already the Facing normal! Dummy!
2019-09-06 19:15:15 +02:00
5289b16d77 UI: File Browser Preview Outlines
File Browser image thumbnails get just a contrasting outline and no shadow.

Differential Revision: https://developer.blender.org/D5708

Reviewed by Brecht Van Lommel
2019-09-06 10:03:22 -07:00
d83734aa4b EEVEE: Fix bump mapping
Fix issue in latest patch and assure derivatives calculation is correct on
all GPU.
2019-09-06 19:02:15 +02:00
073624d4cc Eevee: Improve Test setup
- Remove use_screen_refraction as it conflict with SSR and SSS
- Increase GTAO distance
- Add a simple lightprobe setup that works well in most cases
- Enable soft shadows

Baking the lightprobes adds some overhead to the test time (+33%).

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5507
2019-09-06 18:31:30 +02:00
a5a003ed55 GPencil: New option to fade not selected objects
Before, it was only possible to fade the active object. The new option allows to fade all non gpencil selected object. This is a common request by artists.

{F7719513}

Reviewers: mendio, pepeland

Reviewed By: mendio

Differential Revision: https://developer.blender.org/D5704
2019-09-06 17:23:00 +02:00
6d8a86c07d Fix T69548: Sculpt scene spacing breaks when object pivot not at origin
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5699
2019-09-06 17:20:32 +02:00
Huseyin Karakullukcu
6222cb575f Fix T68950: Adding lots of edge loops to cylinder produces a crash
Instead of fixed size, `IMM_BUFFER_SIZE` is adjustable now. The internal buffer can expand if there is a need a bigger buffer. All other behaviors are still the same.

Reviewed By: fclem, #gpu_viewport

Differential Revision: https://developer.blender.org/D5570
2019-09-06 17:03:15 +02:00
ffd5e1e6ac Eevee: Use manual derivatives for better quality bump.
We basically duplicate the height map branch plugged into the bump node,
and tag each node in each branch as dx/dy/ref using `branch_tag`.

Then we add a one pixel offset on the texture coordinates if the node is
tagged as dx or dy.

The dx/dy branches are plugged into (new) hidden sockets on the bump node.

This match cycles bump better but have a performance impact. Also, complex
nodetrees can now become instruction limited and not compile anymore.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5531
2019-09-06 16:59:15 +02:00
Julian Eisel
83a7d98a32 Fix: File browser report popups not showing up
Popup would be closed immediately after creating, because of incorrect
mouse coordinates stored in window (popup is set to close if mouse is
some distance away from it).

Completes fix for T69581.
2019-09-06 16:49:59 +02:00
24d05b5ff9 UI: File Browser Large Icon Update
Replaces the large icons used in the File Browser with updated versions by Andrzej Ambroz (jendrzych).

Differential Revision: https://developer.blender.org/D5698

Reviewed by Brecht Van Lommel
2019-09-06 07:44:50 -07:00
OmarSquircleArt
61cc604da7 Fix: Rename the dimensions property in Noise nodes.
The `dimensions` property of the noise nodes has been renamed to
`noise_dimensions` because it conflicted with and overwrote the
`dimensions` property of the base node.

Reviewers: brecht, JacquesLucke

Differential Revision: https://developer.blender.org/D5705
2019-09-06 16:06:54 +02:00
d83f62e185 WM: batch rename support for regex groups
Optionally use regular expressions for the destination name,
allows re-ordering words while renaming.

Initial patch by @jmztn with error handling and UI changes.
2019-09-06 23:24:13 +10:00
a94bf0e134 GPencil: Guides: Refactor and add new ISO option
+ Simplify code, move into own function and run once rather than on every point
+ Improved snapping when a stroke is between increments
+ Added ISO grid option for lines specified by Angle under guide settings
+ Radial snapping mode uses Angle as an offset

Differential Revision: https://developer.blender.org/D5668
2019-09-06 14:07:26 +01:00
Julian Eisel
4c20c53b89 Fix: File browser errors not reported in the UI
This is a partial fix, in that it only brings back the banner reports in
the status bar. The popups still don't show up but I need to investigate
more.
It's really ugly that reports rely on wmWindowManager.winactive, but
that's how it is...

Partialy fixes T69581.
2019-09-06 12:48:23 +02:00
39f3474cf1 Fix T69536: Setting dimensions for parented objects fails
Parenting/constraints/delta-scaled all caused setting dimensions to fail.

Take the difference between the input scale and final scale into
account when applying the dimensions.
2019-09-06 20:04:09 +10:00
e858d21ae4 Transformation Constraint: implement a Mix Mode option.
Allow selecting how the new location/rotation/scale is combined with
the existing transformation. This is most useful for rotation, which
has multiple options, and scale, which previously could only replace.
2019-09-06 12:53:35 +03:00
a23ce7f3b7 Transformation Constraint: initialize scale range values to 1 instead of 0. 2019-09-06 12:53:35 +03:00
Julian Eisel
5fd46d27f5 Fix failing assert on directory auto-creation
The failing assert was there before the recent file browser design
overhaul. Might have been in there for quite a while in fact.

Auto-creation in this case means that the file path would be created if
a non-existent path was entered in the file browser path button.
2019-09-06 11:21:47 +02:00
Julian Eisel
e10f8c27a2 UI: Confirmation prompt for file path auto-create
This confirmation prompt was there earlier, we removed the prompts for
creating new directories all together, but in this case it's reasonable.
Without it, it's simply too easy to create new directories by accident.
2019-09-06 11:06:32 +02:00
f1659c5dd8 Cleanup: function grouping
Also rename widget color blending functions more clearly.

- color_blend_v3_v3, was widget_state_blend
- color_blend_v4_v4v4, was round_box_shade_col4_r
- color_ensure_contrast_v3, was rgb_ensure_contrast
2019-09-06 16:47:59 +10:00
ebb7096bb1 Cleanup: use doxy sections 2019-09-06 16:46:00 +10:00
1b287230a4 Viewport Shading: StudioLight Intensity
Add option to change the Intensity of the HDRI in the 3d viewport. This works for both EEVEE and Cycles

Reviewed By: brecht, fclem

Differential Revision: https://developer.blender.org/D5674
2019-09-06 08:35:14 +02:00
f8362836a5 Copy Transforms: add a mixing mode option.
Allow combining location, rotation and scale at the same time,
using one constraint. The mixing modes are based on matrix
multiplication, but handle scale in a way that avoids creating
shear.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5640
2019-09-06 07:58:13 +03:00
f4056e9ec3 Copy Rotation: implement new mixing modes that actually work.
Upon close inspection, the way the Offset mode works in the
Copy Rotation constraint makes no sense, and in fact, destroys
the rotation of its owner unless either it's single axis, or
the order is set specifically to `ZYX Euler`.

Since it can't simply be changed because of backward compatibility
concerns, replace the checkbox with a dropdown that provides a set
of new modes that actually make sense.

Specifically, add a mode that simply adds Euler components together,
and two options that use matrix multiplication in different order.

The Python use_offset property is replaced with compatibility stubs.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5640
2019-09-06 07:57:16 +03:00
Julian Eisel
9972d6c306 UI: Bring back features for file path button
Adds back auto-completion and auto-creation (inserting a non-existing
file-path would create it) for the file path button. The second feature
was left out knowingly, but seems there are reasonable use cases for it.

We can't add these features to the button in the Python script, we have
to call into C. So using a template to do that.
Note that this is based on the old file browser code, I've copied over
the TODO comment.
2019-09-06 01:31:45 +02:00
Julian Eisel
4c4a8bf588 Fix T69498: Crash on export UV Layout
Ensure there's a drawable context after the file browser window is
destroyed.
2019-09-06 00:13:24 +02:00
Julian Eisel
fbf6898f58 Fix T69495: Crash changing action in file browser
We need to ensure the file browser window doesn't manage the handlers
for itself.
The special file browser closing code that we used previously isn't
needed anymore, wm_window_open_temp() and the handling of
EVT_FILESELECT_FULL_OPEN  already manage it fine.
2019-09-05 23:38:45 +02:00
e77ecfa8cb UI: tweak 3D view space between navigation gizmo & buttons
Align the lower side of the navigation gizmo with the top of the icons.
2019-09-06 06:21:25 +10:00
524e000678 Revert "UI: Add Dimensions to Object Transform panel"
This reverts commit 82fc9d778e.

This doesn't use the workaround from v3d_object_dimension_buts
needed for dimensions properly update.

Doing this would require moving the panel to C.

Issues from T69536 should be resolved before adding this back.
2019-09-06 06:05:31 +10:00
051f98baf3 LibOverride: Initial attempt to ignore missing place-holders IDs.
Ideally, when a reference linked ID is missing (and replaced by linking
code with an empty place-holder), we should just keep the local
overriding datablocks as-is, until broken links are fixed.

Not really working yet though, needs more work here...
2019-09-05 21:31:01 +02:00
5f4caa8c4f LibOverride: add a generic macro to check whetehr an ID is overridable.
...and use it in code generating library overrides.
2019-09-05 21:31:01 +02:00
8622849beb LibOverride: give more remapping control to BKE_override_library_create_from_id() too.
Similar change to the one done for tagged IDs overriding some days ago.
We do not always want to remap all local usages of a linked data-block
to its new local overriding copy.
2019-09-05 21:31:00 +02:00
23d19c2b0d Fix T63653: Industry Compatible Keymap can't be saved & loaded
Replace keymap specific operator.
2019-09-06 04:44:12 +10:00
493fa59225 Fix keymap export of enum-flag properties 2019-09-06 04:44:12 +10:00
1efd857430 Object: Mode switching operator
Remove unused OBJECT_OT_mode_set_or_submode, add
OBJECT_OT_mode_set_with_submode which can switch to edit mode as well
as a sub-mode - currently only mesh select mode is supported
(others may be added later).
2019-09-06 04:44:12 +10:00
c25c3f73c4 Cleanup: reuse mesh select mode enum 2019-09-06 04:44:12 +10:00
3a15643b90 Cleanup: Cmake submodule checks
It is a pain if the subfile we are checking if it exists gets
renamed/removed.

Instead we can check if the directory is empty.

Reviewers: mont29

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D5653
2019-09-05 14:28:20 -04:00
08991c01f0 Fix unreported: snapping to 3d tracking markers sometimes fails 2019-09-05 14:48:18 -03:00
4e731ec97b Transform: Split transform_conversions into multiple files.
Part of T68836

`transform conversions.c` is a file that is getting too big (almost 10,000 lines).
So it's a good idea to split it into smaller files.

differential revision: https://developer.blender.org/D5677
2019-09-05 14:35:38 -03:00
c90b81172b Fix T69513: Grease Pencil Fade Layers Overlay only works in Material and Texture Shading
The overlay factor was not used in other modes.
2019-09-05 19:10:15 +02:00
Erik Abrahamsson
caaaac1365 Improve some textures UI properties click-drag precision
When click-dragging to change values in textures (for example Musgrave-
>Size to give an example) the step size is too big.

Reviewers: brecht, lichtwerk

Reviewed By: brecht, lichtwerk

Differential Revision: https://developer.blender.org/D5661
2019-09-05 17:55:37 +02:00
1bafa3139c Fix T68840: Metaballs update 'NEVER' method not working
Was always evaluating due to typo in rB34ab90f546f0.

Reviewers: brecht

Maniphest Tasks: T68840

Differential Revision: https://developer.blender.org/D5695
2019-09-05 17:45:42 +02:00
d8aaf25c23 Eevee: Shadow map refactor
Reviewed By: brecht

Differential Revision: http://developer.blender.org/D5659
2019-09-05 17:37:50 +02:00
ca58936f2f Cleanup: de-duplicate code 2019-09-06 00:59:25 +10:00
411adadf67 Depsgraph: Ensure it's fully evaluated after POST callbacks
It is possible that POST callbacks will modify objects or relations.
This change makes it so an extra update pass is done if needed.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5690
2019-09-05 16:35:07 +02:00
7825697827 UI: use boolean for sequencer reverse frames
Revert part of 04b86c21bf

The option to reverse frames is used elsewhere as a boolean
which makes sense since reversing playback is a special case.
2019-09-05 21:47:06 +10:00
d0462dca90 GPencil: New Operator to set the active object material based on the selected stroke material
The operator set as active object material the material used in the selected stroke.

Access to the operator were added in the stroke menu and context stroke menu.

Reviewers: antoniov, pepeland

Tags: #bf_blender, #grease_pencil

Differential Revision: https://developer.blender.org/D5692
2019-09-05 13:29:13 +02:00
OmarSquircleArt
3a0b22b2da Fix T69532: Wave texture fails with a compile error.
`noise_turbulence` was renamed to `fractal_noise`.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5691
2019-09-05 13:25:13 +02:00
OmarSquircleArt
c060a4a714 Fix: Compile error due to undefined isinf function.
Some implementations of the standard c++ library doesn't define its
functions in the global namespace. So the `isinf` function might
fail in some systems. To fix this, we use the `ensure_finite`
function instead.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5687
2019-09-05 13:21:21 +02:00
b6e7e173ec Buildbot: enable tests to run again
These will not stop the build on failure yet, first step is to get them passing
more reliably.
2019-09-05 12:52:54 +02:00
Sebastian Koenig
83875e978d Tracking: Enable "Render Undistorted" only if there is actual distortion
Applies to "Setup Tracking Scene" operator which configures background
images for the viewport.

Solves unnecessary slowdown and higher memory usage when camera's model
does not have any effective distortion.

Differential Revision: https://developer.blender.org/D5520
2019-09-05 12:06:09 +02:00
31c2929496 Depsgraph: Free user code from worry about updates flush 2019-09-05 11:57:20 +02:00
ac060232aa Depsgraph: Pass bmain to evaluation function
Currently unused, makes code ready for an upcoming change.
2019-09-05 11:57:20 +02:00
f2400c1bb5 Industry Compat keymap: Add Batch Rename to Alt-Return 2019-09-05 10:51:02 +02:00
c2a0f5c3d4 File Browser UI: Use 'Install' instead of ''Install Add-on from File...' as the name of the execute button
The old name didn't fit inside the button, and this fits with simpler Open/Save labels too.
2019-09-05 10:21:24 +02:00
ab158cd00a Fix T69522: Render Region not refreshing Output Properties
setting/clearing render region uses ND_RENDER_OPTIONS notifier, but
listener was only refreshing RENDER and VIEWLAYER tabs in that case,
whereas the render region buttons are located in OUTPUT tab.

Reviewers: billreynish

Maniphest Tasks: T69522

Differential Revision: https://developer.blender.org/D5685
2019-09-05 10:14:28 +02:00
05721cd00a Mesh Batch Cache: Fix threading issue
I believed the crash I experienced happened because:
1. The `extract_pos_nor_init` function is called.
2. Tasks are added to the task pool for `extract_pos_nor`.
3. The tasks begin to be executed while more tasks are added.
4. In some rare cases, all existing tasks are finished, but not all have been added yet.
5. This let the task-counter go down to zero.
6. This triggered a call to `extract_pos_nor_finish`.
7. Then more tasks are added and in the end `extract_pos_nor_finish` is called again.

A solution is to use a task pool that is suspended when created.
Unfortunately, there was an outdated comment, that was probably the root cause of the issue.

Reviewers: fclem, sergey

Differential Revision: https://developer.blender.org/D5680
2019-09-05 09:57:30 +02:00
Sebastian Koenig
17baa43e59 MovieClip: Make name of Active Clip consistent in UI
Using the currently active movie clip had different names in the interface:
In scene context it was "Active Movie Clip", in Camera Background Images it was "Camera Clip", in Constraints it was "ActiveClip".
I made all those instances use "Active Clip", which is descriptive enough and also the shortest of the three.

Reviewed By: billreynish

Differential Revision: https://developer.blender.org/D5400
2019-09-05 09:32:13 +02:00
d813cc706d File Browser: Add Zip files as native recognised file type
Differential Revision: https://developer.blender.org/D5683

Reviewers: Brecht
2019-09-05 07:54:41 +02:00
6fc6f2504d Cleanup: use backslash for doxygen commands 2019-09-05 12:56:55 +10:00
adae93281c Cleanup: clang-format 2019-09-05 12:56:34 +10:00
410f3bc1d3 Fix 'make icons' on Linux
CRLF line ending caused shebang to fail.
2019-09-05 12:28:30 +10:00
OmarSquircleArt
baaa89a0bc Shading: Rewrite Mapping node with dynamic inputs.
This patch rewrites the Mapping node to support dynamic inputs. The
Max and Min options have been removed. They can be added as Min and
Max Vector Math nodes manually.

Texture nodes still use the old matrix-based mapping. A new SVM node
`NODE_TEXTURE_MAPPING` has been added to preserve this functionality.
Similarly, in GLSL, a `mapping_mat4` function has been added.

Reviewers: brecht, JacquesLucke
2019-09-04 23:17:13 +02:00
f098f6df76 UI: Remove 'Context.' string when hovering over Properties tabs
Differential Revision: https://developer.blender.org/D5679

Reviewers: Brecht
2019-09-04 22:33:32 +02:00
5d442440f8 File Browser UI: Add Select menu to File Browser
Adding this for consistency with other editors. Seems as if we never had this in the past.
2019-09-04 22:09:01 +02:00
fc0b51d516 UI: Icons update
New icons from Andrzej Ambroż (jendrzych)

  - Many tweaks to existing icons, such as folders and drives for the new file browser, as well as snapping
  - New icons for Checkmark, Transform Origins, Snap to Face Center, Zip Files (currently unused)
2019-09-04 21:42:25 +02:00
36e23c95e8 Python API: add methods for reordering constraints.
Order matters for constraints, but there was no way to change it.
The API follows other collections like idprops and node sockets.
2019-09-04 22:38:33 +03:00
e52ad1835a Fix hair collision instability with 'Quality Steps' > 1
This was removed in rB0666ece2e2f9 because it is handled differently for
"real" cloth in cloth_solve_collisions(), but hair still needs this
apparently [does its thing in cloth_continuum_step() instead].

And since we have a default 'Quality Steps' setting of 5, it made many
simulations unstable.

Fixes T65038, T59742 (possibly others)

Reviewers: brecht

Maniphest Tasks: T65038, T59742

Differential Revision: https://developer.blender.org/D5681
2019-09-04 21:05:54 +02:00
49ff9ca613 Missed from last commit 2019-09-05 03:28:45 +10:00
1715d09d7c Cleanup: userpref UI options into their own struct
Mixing options for showing preferences with other flags was confusing.
2019-09-05 03:25:55 +10:00
933725ab46 Cleanup: use doxy comments 2019-09-05 03:16:22 +10:00
c7b9ae310b Cleanup: correct UI_THEMESPACE_START/END macros 2019-09-05 03:16:09 +10:00
OmarSquircleArt
6f32f0ea27 Versioning: Bump subversion for the Noise node.
D5560 was missing a subversion bump.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5678
2019-09-04 19:02:40 +02:00
82fc9d778e UI: Add Dimensions to Object Transform panel
This makes the Transform panel complete, so you don't need to open the Sidebar for such a basic concept.

Differential Revision: https://developer.blender.org/D5577

Reviewers: Brecht, Pablo Vazquez
2019-09-04 18:37:33 +02:00
OmarSquircleArt
23564583a4 Shading: Extend Noise node to other dimenstions.
This patch extends perlin noise to operate in 1D, 2D, 3D, and 4D
space. The noise code has also been refactored to be more readable.

The Color output and distortion patterns changed, so this patch
breaks backward compatibility. This is due to the fact that we
now use random offsets as noise seeds, as opposed to swizzling
and constants offsets.

Reviewers: brecht, JacquesLucke

Differential Revision: https://developer.blender.org/D5560
2019-09-04 17:54:32 +02:00
Julian Eisel
45d4c92579 Move file execute region back to C, fixing bugs
We moved this to Python too quickly, causing the following regressions:
* No auto completion for file names
* Additional handling not applied on changes, like automatic extension
  appending (see file_filename_enter_handle)
* Red highlight missing when the file name already exists

Note that earlier (before the file browser redesign), this didn't use
the panel and layout code at all. So even if it's still not in Python,
at least it's integrated into regular panel management now.
OS-specific ordering of the open and cancel button is kept.

Fixes T69457.
2019-09-04 16:30:09 +02:00
Julian Eisel
640c45dc3a Expose button UTF8 check in UI_interface.h
Used in following commit.
2019-09-04 16:30:09 +02:00
68d1f09158 Shading Modes: Material and Render Preview
This change implements the basics as described in {T68312} for the
shading modes.

* LookDev shading mode is renamed to Material Preview. It always uses Eevee as renderer, and is intended to provide a fast material preview suitable for texture painting, and texture and material setup.

* Rendered shading gains "Use Scene Lights" and "Use Scene World" options similar to current Material Preview. These will be enabled by default. When Use Scene World is turned off, HDRIs will be used for lighting instead. These options are available for EEVEE and Cycles.
* Renderers will be able to customize the shading settings panel and add additional settings.

Reviewed By: brecht, fclem

Differential Revision: https://developer.blender.org/D5612
2019-09-04 15:57:00 +02:00
d3ab930c88 Fix/cleanup error handling in paths generation for private ID data case.
When using new `rna_prepend_real_ID_path()`, caller have to handle the
NULL path case and decide whetehr this is a valid case or an error one.
2019-09-04 15:08:32 +02:00
e08dac5f06 UI: use vertical navigation buttons
This addresses crowding in the top right area of the view
with the existing header and tool header.

D5670 by @CandleComet
2019-09-04 23:05:20 +10:00
Yevgeny Makarov
0381727663 Fix T55745: Checker de-select, inconsistent selection
With these changes, successive selections result in an even pattern.
2019-09-04 22:51:48 +10:00
4d995527a9 UI: Rename Select tool to Tweak tool
'Tweak' better communicates what this tool is for

Differential Revision: https://developer.blender.org/D5597

Reviewers: Brecht, Campbell Barton
2019-09-04 11:55:36 +02:00
Julian Eisel
718989d662 Fix T69469: Overrun in file action type RNA enum
Think it was harmless in practice since we didn't actually enumerate the
items, only count them and access the set value. Still...
2019-09-04 10:23:38 +02:00
fcf2a712ec Armature: add Inherit Scale options to remove shear or average the scale.
As an inherent property of matrix-based transformation math, non-
uniform scaling of a parent bone induces shear into the transform
matrix of any rotated child. Such matrices cannot be cleanly
decomposed into a combination of location/rotation/scale, which
causes issues for rigging and animation tools.

Blender bones have options to exclude rotation and/or scale from the
inherited transformation, but don't have any support for removing the
often undesired shear component. That goal requires replacing simple
parenting with a combination of multiple bones and constraints. The
same is true about the goal of inheriting some scale, but completely
avoiding shear.

This patch replaces the old Inherit Scale checkbox with a enum that
supports multiple options:

* Full: inherit all effects of scale, like with enabled Inherit Scale.

* Fix Shear: removes shear from the final inherited transformation.

  The cleanup math is specifically designed to preserve the main
  axis of the bone, its length and total volume, and minimally
  affect roll on average. It however will not prevent reappearance
  of shear due to local rotation of the child or its children.

* Average: inherit uniform scale that represents the parent volume.

  This is the simplest foolproof solution that will inherit some
  scale without ever causing shear.

* None: completely remove scale and shear.

* None (Legacy): old disabled Inherit Scale checkbox.

  This mode does not handle parent shear in any way, so the child
  is likely to end up having both scale and shear. It is retained
  for backward compatibility.

Since many rigging-related addons access the use_inherit_scale
property from Python, it is retained as a backward compatibility
stub that provides the old functionality.

As a side effect of reworking the code, this also fixes a matrix
multiplication order bug in the Inherit Rotation code, which caused
the parent local scale to be applied in world space. In rigger
opinion this option is useless in production rigs, so this fix
should not be a problem.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5588
2019-09-04 10:34:21 +03:00
64f8f7db7c Fix T63755: Area Stretching Overlay
Support for UV Stretching overlay during multi object editing. The
VBO now holds the ratios per fase. In the shader these ratios will
be compared against the global ratios. The global rations are created
from all selected objects.

The current implementation does not fit well with the draw module. The
plan is to move the drawing of other spaces towards the draw manager what
leads to a better fit. Currently the details on this solution is unclear
but this requirement will become an attentionpoint in the future design.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5665
2019-09-04 08:08:27 +02:00
0cb730146b Transform: remove X/Y shear tool option
Instead use vertical cursor motion for Y axis shear.

This removes the shear_axis option completely since we now have two
axis options used by shear it's not needed.
2019-09-04 15:33:07 +10:00
966c00060f Transform: Improve hierarchy in mixed snap edge detection. 2019-09-04 02:16:50 -03:00
Julian Eisel
da25aca267 Fix T69463: File Browser opens off-center on hiDPI
wmWindow.sizex/y doesn't have system's pixel size applied.
2019-09-04 02:01:44 +02:00
Julian Eisel
0c7bfdf9a5 Fix T69467: Temporary Info Editor window crashes
Code called editor creation twice, once for SPACE_INFO, once for
SPACE_EMPTY. Caused by a incorrectly solved merge conflict.
2019-09-04 01:47:16 +02:00
1886a2f3f5 Industry Compat keymap: Add support for tool hotkeys in paint modes
Use D for Draw, B for Blur.
2019-09-04 00:58:47 +02:00
c69130e9f9 Industry Compat keymap: Fix for opening folders in new File Browser 2019-09-04 00:51:43 +02:00
Julian Eisel
197653e087 Fix selecting multiple files ignoring first file
E.g. box selecting wouldn't allow selecting the first file.
Work selection and shift/ctrl selection had similar issues.

Code assumed that the first item was the '..' parent item and manually
removed it from the selection. I could just remove this special
handling, but instead I made the behavior more dynamic. So the file list
checks if the '..' item is there and only then applies special
treatment.
That way we can easily bring the '..' item back or make it optional if
wanted.
2019-09-03 23:15:31 +02:00
5ba0ce8544 UI: Minor fixes to Delta Transform panel
Removes some wrong gaps appearing
2019-09-03 22:34:55 +02:00
1af0f1fed9 File Browser: Fix Windows Execute/Cancel button order
Was using wrong check for Windows, causing this to fail
2019-09-03 21:45:39 +02:00
Julian Eisel
9e3cd98529 Fix T69451: Walk-select in empty directory asserts
Code assumed the '..' was there, which isn't the case any more. Just
early exiting for empty directories is fine.
2019-09-03 19:51:52 +02:00
0df6224d48 GPencil: Context menu update
Add missed 'Insert Blank keyframe in All Layers' to context menu

Reviewers: antoniov, pepeland

Tags: #bf_blender, #grease_pencil

Differential Revision: https://developer.blender.org/D5669
2019-09-03 19:04:36 +02:00
1abb1ba9a3 GPencil: Fix unreported autolock layers using Dopesheet
When select a layer in Dopesheet, the autolock layer was not working.

Now the Dopesheet code calls the function for autolock. Also some code cleanup to move the logic to new function.
2019-09-03 18:59:12 +02:00
e91ea20ebe Drivers: support decomposing rotation into swing followed by twist.
In order to correctly drive corrective shape keys from a freely
rotating organic joint it is very often found necessary to
decompose the rotation into separate bending and twisting
motions. This type of decomposition cannot be reproduced by
any Euler order or a single quaternion.

Instead this is done by using a helper bone with a Damped Track
constraint aimed at the tail of the control to pick up the bending,
and its helper child with Copy Transforms to separate the twist.

Requiring two additional bones to drive a shape key or a correction
bone seems inconvenient, so this implements the necessary math as new
options in the recently introduced Rotation Mode dropdown of the
Transform Channel driver variable type. The data is also accessible
as a Transformation constraint input.

The output is in the form of Quaternion-derived 'pseudo-angles',
which for `Swing and Y Twist` would represent the following:

* W: true bend angle, independent of bend direction.
* Y: true twist angle.
* X, Z: pseudo-angles representing the proportion of bending around X/Z.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5651
2019-09-03 19:35:36 +03:00
b3b59e3b56 Transform: support snap to children with 'Affect Parents'
Resolves T69398
2019-09-04 02:04:01 +10:00
e5c8f096f8 Cleanup: expand checks for selection when snapping
Adding extra checks here was getting unreadable,
expand to allow for easier to follow logic.
2019-09-04 02:04:01 +10:00
4f92725283 Fix buildbot unsuccessfully trying to update Blender repository for branches 2019-09-03 18:01:57 +02:00
bc1781cf6a EEVEE: Fix broken bump regression
Regression introduced by 7f4a2fc437
2019-09-03 17:45:58 +02:00
4c14a7484c Cleanup: unused flag, spelling 2019-09-04 00:53:05 +10:00
Julian Eisel
ee8f69c96c UI: File Browser Design Overhaul
This is a general redesign of the File Browser GUI and interaction
methods. For screenshots, check patch D5601.

Main changes in short:
* File Browser as floating window
* New layout of regions
* Popovers for view and filter options
* Vertical list view with interactive column header
* New and updated icons
* Keymap consistency fixes
* Many tweaks and fixes to the drawing of views

----

General:
* The file browser now opens as temporary floating window. It closes on
  Esc. The header is hidden then.
* When the file browser is opened as regular editor, the header remains
  visible.
* All file browser regions are now defined in Python (the button
  layout).
* Adjusted related operator UI names.

Keymap:
Keymap is now consistent with other list-based views in Blender, such as
the Outliner.
* Left click to select, double-click to open
* Right-click context menus
* Shift-click to fill selection
* Ctrl-click to extend selection

Operator options:
These previously overlapped with the source list, which caused numerous
issues with resizing and presenting many settings in a small panel area.
It was also generally inconsistent with Blender.
* Moved to new sidebar, which can easily be shown or hidden using a
  prominent Options toggle.
* IO operators have new layouts to match this new sidebar, using
  sub-panels. This will have to be committed separately (Add-on
  repository).
* If operators want to show the options by default, they have the option
  to do so (see `WM_FILESEL_SHOW_PROPS`, `hide_props_region`), otherwise
  they are hidden by default.

General Layout:
The layout has been changed to be simpler, more standard, and fits
better in with Blender 2.8.
* More conventional layout (file path at top, file name at the bottom,
  execute/cancel buttons in bottom right).
* Use of popovers to group controls, and allow for more descriptive
  naming.
* Search box is always live now, just like Outliner.

Views:
* Date Modified column combines both date and time, also uses user
  friendly strings for recent dates (i.e. "Yesterday", "Today").
* Details columns (file size, modification date/time) are now toggleable
  for all display types, they are not hardcoded per display type.
* File sizes now show as B, KB, MB, ... rather than B, KiB, MiB, … They
  are now also calculated using base 10 of course.
* Option to sort in inverse order.

Vertical List View:
* This view now used a much simpler single vertical list with columns
  for information.
* Users can click on the headers of these columns to order by that
  category, and click again to reverse the ordering.

Icons:
* Updated icons by Jendrzych, with better centering.
* Files and folders have new icons in Icon view.
* Both files and folders have reworked superimposed icons that show
  users the file/folder type.
* 3D file documents correctly use the 3d file icon, which was unused
  previously.
* Workspaces now show their icon on Link/Append - also when listed in
  the Outliner.

Minor Python-API breakage:
* `bpy.types.FileSelectParams.display_type`: `LIST_SHORT` and
  `LIST_LONG` are replaced by `LIST_VERTICAL` and `LIST_HORIZONTAL`.

Removes the feature where directories would automatically be created if
they are entered into the file path text button, but don't exist. We
were not sure if users use it enough to keep it. We can definitely bring
it back.

----

//Combined effort by @billreynish, @harley, @jendrzych, my university
colleague Brian Meisenheimer and myself.//

Differential Revision: https://developer.blender.org/D5601

Reviewers: Brecht, Bastien
2019-09-03 16:10:40 +02:00
545f565426 Fix selection engine checks
- Don't use vertex selection in texture paint mode.
- Don't allow mixing vertex & face flags in vert/weight paint modes.
2019-09-03 23:43:15 +10:00
8be800dcdf Fix T69424: Weight paint sample doesn't work 2019-09-03 23:38:12 +10:00
51d8facbc3 Fix buildbot Python executable not found on Windows 2019-09-03 14:35:57 +02:00
fc99297411 Fix T66950: WeightPaint Bone Selection Overlay
In weightpaint it is possible to enable the bone selection mode. During
drawing the overlay was rendered, but during selection this was ignored.
Users needed to double click in order to select bones even when the overlay
was enabled.

This patch makes bone selection possible during weight painting using the pose mode bone
selection overlay with a single click.

Reviewed By: fclem, campbellbarton

Differential Revision: https://developer.blender.org/D5629
2019-09-03 14:09:44 +02:00
Lucas Boutrot
97f7f5fdbb Fix T69384: Noise Depth widgets steps set to 0
Reviewed By: brecht, lichtwerk

Maniphest Tasks: T69384

Differential Revision: https://developer.blender.org/D5652
2019-09-03 13:42:43 +02:00
21c099c5be Fix compiler warning after recent change to splash screen version 2019-09-03 13:05:55 +02:00
a620501acb Fix T62152: Shear X and Y are swapped 2019-09-03 20:36:31 +10:00
85b1506c6e Fix Credits link not working in About menu 2019-09-03 12:35:17 +02:00
81849e7c9d Buildbot: support building releases, make non-releases more consistent
* Auto detect rc and release version cycle in BKE_blender_version.h.
* On Windows, generate zip and installer if a release is detected.
* On macOS, always generate a dmg instead of zip.
* Use standard package names without hash if a release is detected.
* Buildbot package names now match platform names in releases.

Ref T67056

Differential Revision: https://developer.blender.org/D5643
2019-09-03 12:23:39 +02:00
ad5e91a107 Subsurf: Show error when Blender is built without OpenSubdiv 2019-09-03 11:45:52 +02:00
42478436ae Add OpenSubdiv information to bpy.app
Allows to customize interface and inform about lack of
subdivision surface support.
2019-09-03 11:45:52 +02:00
5ea6545ad5 Fix library link errors after building with install_deps.sh on Ubuntu
On some systems this would use the builtin echo command without support for
the -e option.

Thanks Alexander Gavrilov for helping find this.
2019-09-03 11:20:29 +02:00
9be138bf63 Fix empty image wire drawing with front/back depth
The vertex shaders depth offset was ignored in this case.
2019-09-03 19:16:37 +10:00
65db18fc56 Fix T68868: Assert in depsgraph debugging logs
Was happening when tagging for LEGACY_0 was used.
2019-09-03 11:06:41 +02:00
abfb8b6963 3D View: option only to show axis aligned image empties
Useful for using reference images that only make sense to see
in aligned axis-views.

This restores functionality possible with 2.7x background images.
See: T52668.
2019-09-03 19:01:27 +10:00
8a7a7af627 Fix T69326: Parent type ARMATURE doesn't work 2019-09-03 10:48:29 +02:00
841346df5d Depsgraph: Cleanup, more clear variable name 2019-09-03 10:43:40 +02:00
f45e55c9c8 Depsgraph: Cleanup comment 2019-09-03 10:43:05 +02:00
d74cc6c08c Drivers: add separators to the Transform Channel type enum menu.
It's hard to find things quickly in the wall of '...ation' without breaks.
2019-09-02 23:51:09 +03:00
d4a905fd85 UI: Fix Bug With Join Area Tolerance
Join area tolerance not properly checking all vertices on shared edge.

Differential Revision: https://developer.blender.org/D5662
2019-09-02 13:06:42 -07:00
47cde3292c Return proper RNA path in py console for 'private ID' data.
We can now generate a proper path here, make use of it.

Note: not sure how property pyrna path is supposed to be accessed? code is
similar to the struct pyrna path anyway...
2019-09-02 18:46:20 +02:00
6f1fa7aa25 Fix/enhance new RNA path from real ID helpers.
Main issue was that `rna_prepend_real_ID_path()` would return
nothing in case given path was NULL, when it should actually return the
`prefix` computed by `RNA_find_real_ID_and_path()` in that case...

Also make return `real_id` pointer optionnal, no reasons to make it
mandatory here. And some general naming fixes.
2019-09-02 18:43:43 +02:00
1fd5c90e63 DatablockManagement: Cleanup: get rid of BKE_collection_copy_master().
Now that we 'properly' support private ID data in lib management, there
is no reason anymore to have that custom func, badly named and
by-passing the whole generic ID management code.
2019-09-02 18:39:08 +02:00
99e8aeaa4a DatablockManagement: Fix/sanitize handling of flags for private ID data in copy functions.
Not sure exactly why that was working with nodetrees in depsgraph (could be some special
code in the despgraph), but we always want to allocate memory for the nodetrees here!
2019-09-02 18:39:08 +02:00
3850557073 Cleanup: get rid of BKE_collection_master() useless accessor.
In its current version that was a totally useless extra layer of crap
that we can totally avoid. Plus name was bad too.
2019-09-02 18:39:08 +02:00
0ebc76354f DatablockManagement: Cleanup logic of private IDs handling in BKE_libblock_copy_ex().
Now that we have the private ID data flag, we can be more simple *and*
generic here.
2019-09-02 18:39:08 +02:00
64efbbca8e Make Scene Master collection 'Private' ID data, like root nodetrees.
Same issue here as with root nodetrees, those are private ID data owned
by another ID, and not in Main DB. This requires special handling.

there are still quiet a few things to do here, like getting rid of
special code for master collection (regular ID copying should handle
that just as it already does for root nodetrees), cleanup in ID copying
code, etc.
2019-09-02 18:39:08 +02:00
283d96de11 Buildbot: refactor all build slave code
* Move common code into buildbot_utils.py
* Remove legacy code from removed builders
* Split code into smaller functions

Differential Revision: https://developer.blender.org/D5642
2019-09-02 17:37:22 +02:00
a565096109 GPencil: Add suport to Poly Curves to Convert to Strokes operator
The Poly curves were not supported when convert curves to grease pencil strokes, but now are supported.

Also, some code cleanup to make it more readable.
2019-09-02 17:24:05 +02:00
a3559a70dd Fix T69404: Merge by distance crash with Unselected
Error introduced when removing the automerge bmesh operator.
2019-09-03 00:35:22 +10:00
Julian Eisel
2356f60c62 UI: Don't show button context menu for drag-labels
While the vast majority of labels would never get a button context menu
(as opposed to the regular context menu of this region), draggable
labels would still reach code for such context menu creation. From what
I can tell only file browser icons/thumbnails and the properties editor
data path would be affected. The button context menu doesn't make sense
for them, so let the region context menu show up instead.

If at some point we want button context menus for specific labels, we
can make checks more granular.
2019-09-02 15:41:46 +02:00
591db72ee2 GPencil: New Strength mode for Opacity modifier
This new option applies the opacity using the strength of the stroke instead to use the alpha channel of the material.

Tested in greasepencil-object branch

{F7712796}

The vertex group filter has been removed because this filter is not logic in Material mode and must be valid only in Strength mode.

{F7713147}

Reviewers: pepeland, mendio

Reviewed By: mendio

Differential Revision: https://developer.blender.org/D5650
2019-09-02 13:31:37 +02:00
a6816bf5db CMake: De-duplicate test target name construction 2019-09-02 09:42:44 +02:00
b8be0557a7 Fix noisy GFlags warnings when building tests
Split include directories into regular and system ones, which
makes it so strict flags are properly cancelled out for GFlags
headers.
2019-09-02 09:42:44 +02:00
2c68d50421 CMake: Cleanup, unset temporary variables
Was happening in macros, polluting the namespace.

No functional changes, just making things cleaner.
2019-09-02 09:42:44 +02:00
7f2b4c871e WM: batch rename, regular expression support
Find/Replace can now use regular expressions.
2019-09-02 15:23:39 +10:00
928e0258fe GPencil: Set fill material when curve is 2D and has filling
Now the material is set as fill if the curve is 2D and is filled with a material. This is done in the Convert operator only, because the SVG add-on works totally different due the SVG has more parameters to determine the type of filling.
2019-09-01 22:47:23 +02:00
35bc4c2cf4 GPencil: Add Convert to Grease Pencil to context Object menu 2019-09-01 22:30:47 +02:00
8ca9626985 UI: Active Default Button Highlight
Buttons marked as the default action are shown in full selected color. Simplification of all the related active_default code.

Differential Revision: https://developer.blender.org/D5574

Reviewed by Campbell Barton
2019-09-01 09:40:28 -07:00
a9e389b8c4 WM: make find/replace default for batch rename
Use this since it's a common operation for batch naming.
2019-09-02 01:57:39 +10:00
6ff675f830 Fix transforming origin affecting unselected children 2019-09-02 01:39:34 +10:00
460e4024e8 WM: batch rename, material & object-data support 2019-09-02 00:58:39 +10:00
18d4ad5a59 Copy Rotation & Transform: add Euler order override options.
For reasons similar to drivers, it should be possible to set an
explicit Euler rotation order in constraints that use Euler angles.

The Transform constraint in a way approaches drivers in its use,
in that it effectively alters channels using values of other
channels after applying a fixed form mathematical expression.

For this reason, instead of just specifying the euler order for
its inputs, it uses the same enum as driver variables. However
Quaternion components are converted to a weighted pseudo-angle
representation as the rest of the constraint UI expects angles.
2019-09-01 14:13:23 +03:00
ae43b1d51b Fix T69364: GPencil Array Modifiers causes crash
This bug was introduced when adding the support for default materials.
2019-09-01 09:31:20 +02:00
883706395e Drivers: support accessing Quaternion rotation channels.
After adding the Euler order option, it's an easy addition to
the enum. The list of channels had of course to be expanded too.
2019-08-31 20:53:32 +03:00
a5b1231de7 WM: batch rename operator
Matches rename active, supports objects, bones, sequence strips & nodes.

Support chaining actions, these can be extended, initially support:

- set/prefix/suffix
- search replace
- stripping characters
- capitalization.
2019-09-01 03:36:00 +10:00
284e4d18be Fix non-functional return argument in new gpencil code
Also remove unused arguments.
2019-09-01 03:35:48 +10:00
ebafb46e4a Build: don't require svn to be available for "make update" when not used
Specifically on Linux, when not having a tests checkout.
2019-08-31 18:52:28 +02:00
505340202e Fix T66452: Convert Curve to Grease Pencil Strokes
This commit adds support to convert curves to Grease Pencil strokes and create the materials too.

Also, there is a new python API. This API is required by the modified SVG import addon to create strokes( see T67065).

All curves selected in one operation are converted in the same Grease Pencil object.
2019-08-31 17:48:44 +02:00
a098bd094c Build: use non-interactive svn commands for "make update"
Needed for buildbot, but interactively solving svn conflicts in the middle
of manual make update is also not ideal.
2019-08-31 15:52:11 +02:00
82ef1edce4 Drivers: support explicit euler rotation order for transform channels.
The meaning of the euler angles completely depends on the rotation
order. Currently the rotation order is taken from the target of the
driver variable, which somewhat makes sense if it uses euler, but if
it's quaternion, then the order is always set to XYZ.

Add a new option for the rotation channels of the Transform Channel
driver variables that defaults to the old behavior, but allows setting
an explicit rotation order.
2019-08-31 14:22:12 +03:00
9821dd72ba Cleanup: rename natural string comparison 2019-08-31 17:32:30 +10:00
e72053a201 Outliner: fix unnecessary syncing
Depending on the outliner display mode and the outliner dirty state,
a sync may not be needed on each draw. This commit adds a check
before syncing to prevent syncing when not needed.
2019-08-30 21:09:40 -06:00
82627c5016 Outliner: always sync object selection
This changes from-outliner selection syncing to always sync the
selection state of objects. This allows selecting objects while in
edit mode for parenting or adding hooks. This also fixes a few issues
where the sync algorithm would fail when no active object existed.
2019-08-30 20:47:27 -06:00
6726e98fe2 Cleanup: clang-format 2019-08-30 13:33:49 -06:00
6c16c2c233 MSVC: Fix BlendThumb debug build.
Spotted by @deadpin on chat
2019-08-30 13:27:56 -06:00
5b547932fa GPencil: Fix move_to_layer menu in Stroke context menu
Missing in previous commit
2019-08-30 20:53:01 +02:00
dacc773c29 make_deps: remove blendthumb
now in regular codebase.
2019-08-30 11:56:02 -06:00
74763d1ae8 Transform: use recalc geometry depsgraph tag
Better be specific with the data that needs updating.
2019-08-31 03:52:49 +10:00
a785835b2c Fix T69299: Transform origin & skip-children jitters 2019-08-31 03:42:37 +10:00
503716bb65 Cleanup: 2 space indentation 2019-08-31 03:42:37 +10:00
f430685d2d Windows: Fix compatibility with older cmake
Older cmake did not find the BlendThumb sub project.
2019-08-30 11:40:46 -06:00
d8bc28ca20 Fix possible crash with new sculpting cursor, due to stack overflow 2019-08-30 19:34:11 +02:00
c65febf396 Cleanup: Silence debug prints in readfile code.
Not sure since when that one has been enabled, but there is no reasons
to print all that for regular users...
2019-08-30 19:08:09 +02:00
0f3b910c3a Cleanup: redundant lowercase in BLI_natstrcmp 2019-08-31 02:40:34 +10:00
bed321f6da Cleanup: remove debug print 2019-08-30 18:13:10 +02:00
86b9470037 Tests: reorder render tests so cycles/eevee/workbench are not interleaved 2019-08-30 18:01:50 +02:00
718747c589 Tests: auto download test files when running "make test" 2019-08-30 18:01:50 +02:00
464e545c72 Tests: move "make test" on macOS and Linux to Python script 2019-08-30 17:57:18 +02:00
e218d8c24b Build: integrate make_update.py into Windows make.bat 2019-08-30 17:57:18 +02:00
fd48e17461 Buildbot: add script to update libraries and submodules
This is meant to replace the individual build steps for the various libraries
and submodules, so we can easily get the correct revisions associated with
different branches and releases.
2019-08-30 17:57:18 +02:00
53cd445785 Build: support updating for release branches in make_update.py 2019-08-30 17:57:18 +02:00
018fe9e006 Build: move "make update" on macOS and Linux to Python script
Differential Revision: https://developer.blender.org/D5545
2019-08-30 17:57:18 +02:00
410cde82e3 Fix "make deps" error when building deps with make and Blender with ninja 2019-08-30 17:57:18 +02:00
bb8a9a6f8b Fix BLI_array macro so can use BLI_strict_flags.h.
Was doing int comparision against size_t, so added casts.
2019-08-30 11:39:27 -04:00
OmarSquircleArt
8cd0da88e5 GPU: Split gpu_shader_material into multiple files.
This patch continue the efforts to split the `gpu_shader_material` file
started in D5569.

Dependency resolution is now recursive. Each shading node gets its own
file. Additionally, some utility files are added to be shared between
files, like `math_util`, `color_util`, and `hash`. Some files are always
included because they may be used in the execution function, like
`world_normals`.

Some glsl functions appeared to be unused, so they were removed, like
`output_node`, `bits_to_01`, and `exp_blender`. Other functions have
been renamed to be more general and get used as utils, like `texco_norm`
which became `vector_normalize`.

A lot of the opengl tests fails, but those same tests also fail in
master, so this is probably unrelated to this patch.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5616
2019-08-30 17:28:57 +02:00
ac646bc20d Cleanup: spelling 2019-08-31 01:21:42 +10:00
ec51355a47 UI: Outliner Natural Sort
Collection contents alphabetical sort now uses a Natural Sort that takes number magnitude into account.

Differential Revision: https://developer.blender.org/D5636

Reviewed by Brecht Van Lommel
2019-08-30 07:50:11 -07:00
e0c792135a Sculpt: New brush cursor, active vertex and normal radius
This commit includes the new brush cursor, active vertex updates and the normal radius brush property for all sculpt brushes.
  -The new brush cursor previews the real stroke radius over the mesh and the sampled sculpt normal.
  -The active vertex is used in sculpt tools and brushes as a starting point for an operation, similar to a preselection. It is also mirrored following the enabled symmetry options to preview the stroke symmetry.
  -The normal radius brush property limits the radius that is going to be used to sample the sculpt normal and area center. It controls how closely the cursor follows the surface and it improves the behavior of most brushes, making them suitable for hard surface sculpting.

Reviewed By: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D3594
2019-08-30 16:46:20 +02:00
8a07ec582e Install_deps: Do not take sub-versions '6' numbers of RHEL/CentOS versions as main '6' version. 2019-08-30 16:40:26 +02:00
66ec72045f Windows: Move building of blendthumb into the blender codebase.
Previously this was done in the deps builder due to the fact we needed
both 32 and 64 bit versions of this dll and CMAKE does not support that
in a single build folder. Now that 32 bit support has been dropped, this
can be safely moved into the codebase.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5633
2019-08-30 08:40:08 -06:00
26c110f2d2 Cleanup: Fix typo error 2019-08-30 16:19:35 +02:00
93f1d76bf0 DrawManager: UV Stretching
Calculating UV Stretching on large meshes showed garbage. The reason
is that the calculation is not thread save. Temporarily disable
threading for UV Stretching
2019-08-30 16:16:57 +02:00
30d900934c UI: assert on invalid click-step for integer buttons
Avoids T69305 going by unnoticed.
2019-08-30 23:41:22 +10:00
a209681bee UI: Remove Colons From Number Fields
Removes the colon separating label and number inside some number fields.

Differential Revision: https://developer.blender.org/D5628

Reviewed by Brecht Van Lommel
2019-08-30 05:54:39 -07:00
f7b47ce16d Fix T69324: Console error in particle systems using "Follow Leader" boid
brain rule

Was missing from rna renaming in rBeee445590a29.
2019-08-30 14:33:45 +02:00
d5d3dc4189 GPencil: Use default material when slot material is empty
When a material slot is empty, the default material is used.

The default color used is Gray to get a good contrast in dense scenes with dark and white background.

Reviewers: brecht, dfelinto, mendio, pepeland

Differential Revision: https://developer.blender.org/D5625
2019-08-30 14:26:39 +02:00
4608220c9b Fix (unreported) 'Duplicate Particle System' operator not ensuring
unique name

This was leading to equally named particle systems, causing problems
later on.
Spotted while looking into T67958.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5632
2019-08-30 14:07:59 +02:00
b9ed30c25c Cycles: OpenCL Separate Compilation Debug Flag
OpenCL Parallel compilation only works inside Blender. When using cycles in a different setup (standaline or other software) it failed compiling kernels as they don't have the appropriate Python API and command line arguments.

This change introduces a `running_inside_blender` debug flag, that triggers out of process compilation of the kernels. Compilation still happens in subthread that enabled the preview kernels and compilation of the kernels during BVH building

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5439
2019-08-30 13:53:23 +02:00
040d075f17 GPencil: Fix unreported problem with Move to Layer popup
As the operator was designed to use only as popup, when it was used as menu option, the popup was displayed again.

Reviewers: mendio, pepeland

Differential Revision: https://developer.blender.org/D5630
2019-08-30 13:00:41 +02:00
44ace647a8 Fix interger number buttons increment/decrement arrows not working in
some cases

Since rB78b56fa7d973 defining a button with 'but->a1 = 0' wasnt
automatically setting its step value to 1 in 'ui_do_but_NUM' anymore.
Instead of handling this more forgiving in 'ui_do_but_NUM', went over
the remaining cases of buttons and and defined them with a step value of
1.

Fixes T69305

Reviewed By: brecht

Maniphest Tasks: T69305

Differential Revision: https://developer.blender.org/D5631
2019-08-30 12:45:38 +02:00
f033fa0fbc GPencil: Set active layer when click in Dopesheet keyframe area
Now, when clicking in the keys area, the layer is synchronized, not only in the left area with the names. This is one of the most requested feature by artists.

Also, removed some old comments.

Reviewers: brecht, angavrilov

Reviewed By: brecht

Subscribers: pepeland, mendio

Differential Revision: https://developer.blender.org/D5627
2019-08-30 11:58:02 +02:00
e33b4572af GPencil: Make visible active layer when hide others
To make more consistent the UI, when hide all other layers, the active layer is always set to visble.
2019-08-30 11:26:18 +02:00
cc49644551 Build: check necessary software is installed for make deps on macOS and Linux
To avoid errors deep into the build process. Fixes T69297.
2019-08-30 11:21:23 +02:00
a771fdb5dc Cleanup: clang-format, spelling 2019-08-30 10:55:31 +10:00
2fca31a5d6 Cleanup: no need to zero the area in beautify calculation
Also correct comment.
2019-08-30 10:50:06 +10:00
7c44182c4a GPencil: Minor Menu tweaks
- Added 'Hide Inactive Layers' operator and reordered 'Show/Hide' menu items
- Move 'New Layer' to bottom in 'Move to Layer' operator for consistency.
- Removed extra end points in some menu items (...)

Reviewers: antoniov, billreynish

Tags: #bf_blender, #grease_pencil

Differential Revision: https://developer.blender.org/D5626
2019-08-29 20:12:39 +02:00
33cd0535a0 Build: install_deps add lib64 paths for ldconfig
Building deps on some systems will install to opt/lib/library/lib64
directories rather than opt/lib/library/lib. This adds additional
lib64 paths for ldconfig to ensure the libraries are found at
runtime.
2019-08-29 11:15:43 -06:00
5c7852ef9c LibOverride: Create override operator: various fixes.
* `make_override_library_exec` was not properly cleaning `LIB_TAG_DOIT`
from all IDs in the Main DB.
* `BKE_override_library_create_from_tag` was doing dangerous things
(like iterating over a BMain listbase while adding items to it...).
* It would remap *all* local usages of overridden linked IDs to new
overriding local IDs, which was very inconvinient.

New handling of remapping now allows to only remap inside of the group
of IDs that is being overridden, in other words you can still have e.g.
other empties still instancing the same linked collection...
2019-08-29 18:11:12 +02:00
b9c400cee2 BKE_libblock_relink_ex: pass all remapping flags instead of a single boolean.
There is no reasons to limit access to remapping flags here, we may want
to use other options than only the ID_REMAP_SKIP_NEVER_NULL_USAGE one...
2019-08-29 18:11:12 +02:00
f4307d4bd9 LibOverride: Add entry to create a liboverride to object->relations menu. 2019-08-29 18:11:12 +02:00
497297850a Copy Scale: support copying arbitrary non-uniform scale as uniform.
Uniform scale is superior to non-uniform scale in that it works with
parenting without causing shear. Thus it is a valid desire in some
cases to turn arbitrary scale into guaranteed uniform scale.

Implementing this in the Copy Scale constraint allows one for instance
to 'inherit scale as uniform' by disabling Inherit Scale, and using
Copy Scale from parent with Offset and Make Uniform.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5614
2019-08-29 17:22:27 +03:00
c160853b04 UI: Correct Sequencer Text Alignment Tooltips
Pointed out in rBM5719
2019-08-29 10:06:09 -04:00
7745c6e35c Fix T56532: Boolean locks up Blender
Actual issue is with triangle beautify,
avoid precision error by scaling the epsilon
by the face area when it's over 1

The mesh in the report was very large (approx 2000 on each side),
causing precision issues with a fixed epsilon.
2019-08-29 23:11:18 +10:00
7f23c91478 LibOverride: Fix use-after-free error when freeing whole Main DB.
We do not want to touch to other ID pointers in that case, those might
have already been freed...
2019-08-29 14:49:54 +02:00
6b33bd1067 GPencil: For Stroke select don't display points
Now, when it's selected the stroke select mode, the points are not displayed and the stroke is fully selected automatically extending the selection.

Differential Revision: https://developer.blender.org/D5622
2019-08-29 10:44:24 +02:00
6b5e2f61b9 Cleanup: unused warning 2019-08-29 13:22:10 +10:00
c61a47d521 Cleanup: use custom data for object transform data 2019-08-29 13:22:10 +10:00
f4424727de Outliner: fix sync select on read file without loading UI
Tag for a complete sync when loading a file with load UI disabled.
2019-08-28 20:49:15 -06:00
5b96dc2381 Fix T69267: Missing Boids force field tooltip 2019-08-28 21:14:18 -04:00
749567e0b2 Move math and vector double routines into blenlib from delaunay code 2019-08-28 18:33:24 -06:00
07b1a5e05c Fix T69273: Rotate tool gizmo not showing incremental snapping tick marks 2019-08-28 20:36:56 -03:00
b1079ec3f2 Edit Mesh: AutoMerge and Split: Improve detection of the best split face 2019-08-28 20:07:43 -03:00
7aed8f69d1 Fix possible endless loop in AutoMerge and Split 2019-08-28 20:04:26 -03:00
a7ac8a22f8 GPencil: Animation menu updates
Animation menu updates for Edit Mode and Draw Mode (header and context menu):

- Rename menu items for a better understanding of what the operators really do.
- Change shortcuts (legacy from the old Grease pencil)

{F7708018}

Reviewers: antoniov, pepeland, billreynish

Tags: #bf_blender, #grease_pencil

Differential Revision: https://developer.blender.org/D5617
2019-08-28 22:33:44 +02:00
34ed58dcaf Fix T68971: Copy As New Driver from Material node creates a bad reference.
NodeTree structures of materials and some other data blocks are
effectively node group datablock objects that are contained inside
the parent block. Thus, direct references to them are only valid
while blender is running, and are lost on save.

Fix Copy As New Driver to create a reference that goes through
the owner datablock, by adding a new ID flag to mark private
pseudo-datablocks.

Also fix functions that return full paths to structures and
properties, e.g. used in python tooltips. Functions for paths
from ID to struct or property can't be changed because of
Animation Data related code.

Reviewers: mont29

Differential Revision: https://developer.blender.org/D5559
2019-08-28 21:52:54 +03:00
69a966aca0 Transform: option to transform parent objects without children
Supports parent/child chains with mixed selections.

Currently accessible from the pivot popover
(may be moved along with the other options here).
2019-08-29 01:53:07 +10:00
01bd22929f Fix T69221: inconsistent handling of filenames derived from image names.
We did not properly sanitize image data block name when using it to init
file name...
2019-08-28 17:51:40 +02:00
d5192d6fd6 Fix strict compiler warning in release mode 2019-08-28 16:00:40 +02:00
6f97855d06 CMake: Remove unsupported G++ strict flag
According to the documentation this flag is only supported
by C and Objective-C languages:

  https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

Solves noisy output on every C++ file in the project when
using latest GCC-9.
2019-08-28 15:47:05 +02:00
f88022b96f Cleanup: make transform data in object mode flag public
This fits better with intended flag usage.
2019-08-28 13:44:21 +10:00
ed066f231d Cleanup: remove automerge BMesh operator
Move logic into EDBM_automerge since this is meant to run after
transform and isn't a generic editing operation.
2019-08-28 13:20:05 +10:00
f93b69c17a Cleanup: split automerge logic into own file
This isn't closely related to selection & this file was over 5k lines.
2019-08-28 13:19:55 +10:00
697fd86506 Cycles: Stitching of subdivided and displaced meshes
This patch stitches the vertices along patch edges so that cracks can
no longer form when applying subdivision or displacement a mesh.

Subpatches are now formed in a way that ensures vertex indices along
subpatch edges are equal for adjacent subpatches. A mapping of vertices
along patch edges is built to preform stitching. Overall performance is
roughly the same, some gains were made in splitting, but some was lost
in stitching.

This fixes:
- T49049 (cracks between patches from material and uv seams)
- T49048 (discontinuous normals with true displacement)

Reviewers: sergey, brecht

Differential Revision: https://developer.blender.org/D3692
2019-08-27 14:27:53 -04:00
7aef075ef6 Cleanup some outdated dead code and comments in Outliner. 2019-08-27 19:49:01 +02:00
9bda62c136 Fix T69176: Outliner->BlenderFile->Delete not working on some objects.
Object not referenced in any scene would not be deletable with previous
code... that was fine in 2.7x since it was not supposed to happen, but
now we can just use the nuclear `BKE_id_delete` for objects as well,
will take care of properly unlinking everything as needed.
2019-08-27 19:44:49 +02:00
490f966af5 Fix multires modifier using too much memory outside of sculpt mode
This reduce memory usage by about 25% in object mode for multires meshes.
2019-08-27 18:22:29 +02:00
c5b8d3b6d7 Cleanup: fix compiler warning 2019-08-27 18:22:29 +02:00
ec9e2dc3c0 Cleanup: spelling 2019-08-28 01:57:09 +10:00
179226977b Cleanup: clang-format 2019-08-28 01:57:09 +10:00
d5ed3de654 Fix Poly Build crash with empty meshes
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D5609
2019-08-27 17:44:36 +02:00
6d37654ce8 UI: Area Join Tolerance
Allow area joining even if the areas are not quite perfectly aligned.

Differential Revision: https://developer.blender.org/D5595

Reviewed by Brecht Van Lommel
2019-08-27 08:30:36 -07:00
a758dce0fa UI: Graph Editor Dot Scaling
Scale Graph Editor keyframe dots and handles based on Resolution Scale rather than Line Width.

Differential Revision: https://developer.blender.org/D5600

Reviewed by Brecht Van Lommel
2019-08-27 08:05:17 -07:00
ce47dc5e70 LibOverride: Fix broken Hook modifier case.
Hook modifier uses same kind of parent inverse matrix as regular object
parenting, so we need to bypass that matrix re-computation when setting
the overridding object here as well.

Also cleanup some minor glitches in object parents' override_apply func.
2019-08-27 16:31:03 +02:00
d8baafd693 Edit Mesh: Poly build tool improvements
This commit changes the functionality of the Poly build tool to make it more suitable for retopology tasks:
  - Click and drag from a boundary edge extrudes a new quad
  - Click and drag on vertices tweaks the position
  - Ctrl + click adds geometry. There is a geometry preview in the gizmo. It also can automatically convert triangles to quads.
  - Shift + click deletes mesh elements (faces or vertices)
  - Updated preselection code. Different mesh elements take priority depending on the selected action.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D5573
2019-08-27 16:24:16 +02:00
2a2fd75ef9 Cleanup: Fix build error with MSVC
`BLI_cpu_support_sse41` needs BLI_System.h.

Reviewers: brecht
2019-08-27 08:13:23 -06:00
d667105ba9 Fix T69210: Crash on Making GPencil Materials zero user
The evaluated data must not copy the material if it's NULL.

Still the stroke exists in the file, so maybe need some thinking in how resolve this, but anyway this is a different topic not related to bug.
2019-08-27 15:58:58 +02:00
0067b3b09b GPencil: Draw Mode menu update
- Rename menu 'Stroke' to 'Draw': the menu includes not only strokes related things and the name follows the usage in other paint modes in Blender.
- Remove duplicate animation operators.
- Menu updates to include clean up and layers operators that don't need previous selection.

{F7705120}

Reviewers: antoniov, pepeland, billreynish

Tags: #bf_blender, #grease_pencil

Differential Revision: https://developer.blender.org/D5599
2019-08-27 15:47:43 +02:00
8e4f3b2bb0 Fix T68763: Smooth Brush not working in LookDev or Rendered Mode
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5585
2019-08-27 15:02:38 +02:00
87cafe92ce Sculpt/Paint: Brush world spacing option for sculpt mode
New brush option to calculate the distance to generate a new brush step using the cursor position over the mesh instead of the screen coordinates. This avoids artifacts when sculpting across curved surfaces.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5432
2019-08-27 14:58:24 +02:00
Stefan Werner
cd890c4c25 Compositor: Reversed order of Normal and Albedo in Denoising Node. 2019-08-27 14:43:48 +02:00
Stefan Werner
d547f9d3d2 Fix T68944: Added check for SSE4.1 to denoising node.
Since OpenImageDenoise requires a CPU with SSE 4.1 or newer,
let the node act as passthrough on unsupported CPUs and display
a message in the node itself.
2019-08-27 14:03:49 +02:00
e39528b351 Fix marker name drawing without intended offset in some cases
Order of arguments matters here.
2019-08-27 13:04:43 +02:00
Yevgeny Makarov
ed92a1ff65 UI: fix jumping of play/pause buttons, add more space when showing subframes
Differential Revision: https://developer.blender.org/D5604
2019-08-27 12:52:42 +02:00
Robert Fornof
b19099346a UI: rename Energy to Power in context menu, for consistency
Differential Revision: https://developer.blender.org/D5310
2019-08-27 12:50:08 +02:00
Yevgeny Makarov
41b27a4def UI: add title to assign shortcut popup, tweak padding
Differential Revision: https://developer.blender.org/D5576
2019-08-27 12:50:08 +02:00
Alex Fuller
ee2bed7947 Fix undefined symbols for ccl::Node with some compilers and build options
Differential Revision: https://developer.blender.org/D5590
2019-08-27 12:50:08 +02:00
Yevgeny Makarov
9169d40175 UI: tweak warning messages style and layout in save/close dialog
Differential Revision: https://developer.blender.org/D5589
2019-08-27 12:32:42 +02:00
Yevgeny Makarov
1a40f089ea UI: improve layout of curve widget clipping options popup
Differential Revision: https://developer.blender.org/D5593
2019-08-27 12:32:35 +02:00
Yevgeny Makarov
811ac2965a UI: fix some menus and popups not taking into account UI scale for padding
Differential Revision: https://developer.blender.org/D5581
2019-08-27 12:27:23 +02:00
Yevgeny Makarov
9d5fb3491d UI: make layout in adjust last operator popup consistent with corner panel
Differential Revision: https://developer.blender.org/D5581
2019-08-27 12:25:52 +02:00
a7609598fa Cleanup: clang-format 2019-08-27 12:18:28 +02:00
Vinay Mulakkayala
af71be23c2 Build: run ldconfig for OpenImageDenoise in install_deps.sh
Differential Revision: https://developer.blender.org/D5580
2019-08-27 12:18:28 +02:00
1c21b79108 Fix T69165: wrong update function on Bone b-bone properties crashes.
Obvious fix suggested by @lichtwerk.
2019-08-27 12:52:06 +03:00
666be7d886 Fix T69166: built-in start-up file has unnecessary screen data 2019-08-27 19:20:38 +10:00
ebe7a407d7 Cleanup: use static set instead of list 2019-08-27 19:20:34 +10:00
90751d1835 Fix compiler error in Windows
This error was introduced in commit https://developer.blender.org/rB66700196074ad168f3322f2766846a0a07f7a00f
2019-08-27 11:14:36 +02:00
Stefan Werner
b91b9a8eca Compositor: Run only one instance of OIDN at a time.
Running multiple instances of OIDN simultaneously can use dozens
of GBs of memory. Since OIDN is multithreaded internally, we can run
only one instance at a time and should not lose much performance.
Fixing T69006
2019-08-27 11:06:48 +02:00
6670019607 Workbench: Specular Highlighting for MatCaps
With Blender 2.80 we introduced a more flexible matcap system. One
change we did was to multiply the matcap with the base color that was
shaded. As matcaps contains diffuse and specular lighting in a single
texture this lead to rendering artifacts. Artists were complaining that
everything looked to metalic.

We now support a separate `diffuse` and `specular` pass for matcaps.

`shaded_color = diffuse_light * base_color + specular_light`

For matcaps to support this feature they need to be multilayer openexr
files with 2 renderpasses (named `diffuse` and `specular`). In the future
we can change this to first pass/second pass in stead of this naming
convention.

Reviewed By: fclem, brecht

Differential Revision: https://developer.blender.org/D5335
2019-08-27 08:56:56 +02:00
bc51250c1f UV Editor: Remove Unimplemented Show Edges Option
Show Edges option in the UV editor does not do anything. Only RNA/DNA
code could be found, so it is save to be removed.

Differential Revision: https://developer.blender.org/D5446
2019-08-27 08:35:47 +02:00
21daeaa95a Cleanup: rename max_len -> alloc_len 2019-08-27 15:38:38 +10:00
13f54f65c4 Cleanup: struct member name wasn't descriptive 2019-08-27 15:07:51 +10:00
2b618b0f2d Cleanup: unused warning 2019-08-27 15:01:41 +10:00
e57b14feae Edit Mesh AutoMerge: Improve Split Edges & Faces option
Now all wire edges linked to the merged vertex are used for split faces.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D5603
2019-08-27 01:42:02 -03:00
60ba7d4539 Clean: style 2019-08-27 14:25:05 +10:00
2435850961 Fix crash transforming origins when no editable origins exist 2019-08-27 14:25:05 +10:00
963a991a20 Fix specific case where a vertex is ignored in snapping
Sometimes the index of the edge and the vertex may coincide.
2019-08-27 01:06:30 -03:00
3df04851cf Cycles/Windows: Fix over estimation of System RAM.
`system_physical_ram` reported 1024x more System RAM than what
was actually available.
2019-08-26 18:34:54 -06:00
d9be59e872 Fix T68687 Eevee: Modulo node behaves unexpectedly/inconsistently
This was a regression.
2019-08-27 01:50:01 +02:00
ce2368cf69 Fix T69122: Area Join Error on Invalid Cursor Position
Improved error handling of Join Area operator in cased it is passed cursor position that is not valid.

Differential Revision: https://developer.blender.org/D5598

Reviewed by Brecht Van Lommel
2019-08-26 13:39:25 -07:00
378a13483f Fix T69185: Cycles kernel OpenCL compile error after recent changes 2019-08-26 22:06:02 +02:00
c69d75e880 GPencil: Fix typo error in previous commit 2019-08-26 21:04:04 +02:00
e148873f3f GPencil: Temporary fix to keep running Cycles + GPencil object in background.
This is a temporary solution to keep the render running.
2019-08-26 21:00:20 +02:00
8c7cbad542 Gpencil: Splitting and rearranging Context Menu in Edit Mode
Following the changes in the Edit Mode menus on the header, this patch split the current context menus into Point and Stroke and also rearrange the operators.

{F7704949}

Reviewers: antoniov, pepeland, billreynish

Reviewed By: billreynish

Tags: #bf_blender, #grease_pencil

Differential Revision: https://developer.blender.org/D5596
2019-08-26 20:53:16 +02:00
7f840426fd GPU: add mechanism for splitting up big gpu_shader_material.glsl file
Compiling this big file for every Eevee material is bad for performance, and
now that we are adding more nodes it gets worse. This patch adds a simple
mechanism to split up that file, and use only the parts used by shader nodes.

When a function is used by GPU_link, we detect which GLSL file it came from
and use it in GLSL code generation automatically. Dependencies between GLSL
files are manually specified, and function names must be unique across all
GLSL files.

Most of the actual splitting up will be done in later commits.

Differential Revision: https://developer.blender.org/D5569
2019-08-26 19:18:34 +02:00
6b189d2bcf Edit Mesh: New option "Split Edges & Faces" to "AutoMerge"
Ref T66423

Differential revision: https://developer.blender.org/D5562
2019-08-26 14:15:25 -03:00
7273dbd47b Fix T69051 Vertex Paint: Selection not show in vertex select mode. 2019-08-26 18:43:53 +02:00
1a6491639a Fix T68954 UVEdit: Auto Smooth option conflicts with uvs display 2019-08-26 18:43:53 +02:00
d5f3f4410d Missed adding file in recent commit 2019-08-27 01:53:00 +10:00
6d87ad08a4 Keymap: Use Ctrl-Period to toggle origin editing
Add a key binding since this option is typically for quick adjustments.
2019-08-27 01:49:21 +10:00
7fee153bf5 3D View: show selected object axis when affect origins is enabled
This replaces temporarily enabling draw-axis.
2019-08-27 01:46:03 +10:00
487cd7237c DRW: check exact draw flags before getting wire-frame color
Only some options need this.
2019-08-27 01:46:03 +10:00
c32377da98 Cycles: support move semantics for device_memory
Ref D5363
2019-08-26 17:42:52 +02:00
f6da680946 Cycles: refactor of BVH building to prepare for Optix
Ref D5363
2019-08-26 17:39:57 +02:00
2dd1e6b376 GPencil: Add missing update of modifiers
This was missing in previous commit for T66294
2019-08-26 17:31:55 +02:00
8f8e6a7c7b Fix Cycles session being (re)created twice
In most cases this only makes a small startup time difference, but there is
no reason to do this.

Ref D5363
2019-08-26 17:12:45 +02:00
2b55f621fe Cleanup: fix compiler warnings 2019-08-26 16:08:17 +02:00
1ff939f3f7 Cleanup: avoid unnecessary primitive type lookup and variable initialization
Ref D5363
2019-08-26 16:07:01 +02:00
6055db084d Cycles: optimize Sobol loop
Ref D5363
2019-08-26 16:07:01 +02:00
030a023eb2 Cleanup: add zero bit counting functions 2019-08-26 16:07:01 +02:00
d133934ea4 Cycles: code to optionally zero initialize some structs in the kernel
This will be used by Optix to help the compiler figure out scoping. It is not
used by other devices currently, but worth testing if it helps there too.

Ref D5363
2019-08-26 16:07:01 +02:00
39439a3afe Fix T69156: Blender crash when baking rigid body world.
Issue was exposed by recent own rB03bf84db86b commit, but was actually
present in RNA API for PointCaches since (probably) ages: whole accessor
code here was assuming that owner ID was an Object, when it is actually
a scene for RigidBody simulations...

Had also to make `BKE_ptcache_id_find()` and friends a bit more
flexible, now they also accept a NULL object pointer parameter...
2019-08-26 16:03:58 +02:00
51d9f56f87 GPencil: Invert Paste operator and make Paste to Active default
Before there were two options: Paste to original layer called "Paste" and Paste to active   layer called "Paste & Merge"

Now, by default the paste is in active layer and the "Paste & Merge" has been renamed "Paste".

For old "Paste", now is called "Paste by Layer" and it's not the default value anymore.

Note: Minor edits to add icons not present in Differential revision.

Differential Revision: https://developer.blender.org/D5591
2019-08-26 15:49:16 +02:00
742119bcb5 Fix T68826 Eevee: Multi-Mat not working if switching from Solid shading
The correct fix would be to avoid all those hacks but this is needed if
we want to be able to parallelize object vbo extractions.

This is the fixed version of the hack. The issue was that the ibo ranges
were saved before the batch were reset and the IBO was discarded, leading
to a read after free error. All previous reported crash were tested and
are now not reproductible.
2019-08-26 15:43:28 +02:00
b9f61eb874 Cycles: Fix Architecture logging on x64.
x64 builds with WITH_CYCLES_OPTIMIZED_KERNEL_SSE2 not defined
since SSE2 is the lower bar for x64 cpus. Turning the architecture
logging related if into the last if in the architecture detection
chain, which will never execute unless you turn off all kernels
in de debug flags.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5579
2019-08-26 07:22:44 -06:00
16c1b10ed2 Fix T69146: Segment Fault using Undo for file with several scenes and script.
The specifc bug here came fro; some IDProperties ID pointer storing
references to workspaces.

But that was actually a main loophole in that 'unndoing data while
keeping same UI' process, as we never know who might store a pointer to
one of those datablocks that we want to keep the 'old' version off.

It might actually be ever more needed when we start undoing (changing)
only the IDs actually modified in an undo step...

Notes:
* While not ideal, I think we can afford an extra looping over the whole
Main DB here... Remapping process in itself is fairly cheap, thanks to
the hashes.
* This commit is considered rather risky (especially thanks to 'private'
IDs), think it should work fine for now, unless some IDPointers start
storing references to private IDs...

Once D5559 is in, we shall do another pass here, probably also forbids
assigning private IDs to IDProperties, etc.
2019-08-26 14:51:30 +02:00
81e2fdcd1d Cleanup: simplify perlin noise function definition
Ref D5363
2019-08-26 14:13:00 +02:00
7b150e8767 Cleanup: use saturate3() for float3 clamping
Ref D5363
2019-08-26 14:11:08 +02:00
b5daed9680 Cleanup: fix compiler warning 2019-08-26 13:47:00 +02:00
2778754925 Cleanp: fix compiler warnings 2019-08-26 11:27:04 +02:00
fd52dc58dd Cycles: GPU code generation optimizations for direct lighting
Use a single loop to iterate over all lights, reducing divergence and amount
of code to generate. Moving ray intersection calls out of conditionals will
also help the Optix compiler.

Ref D5363
2019-08-26 10:26:53 +02:00
f491c23f1e Cycles: inline more functions on the GPU
This makes little difference for CUDA and OpenCL, but will be helpful
for Optix.
2019-08-26 10:26:53 +02:00
2b999c6a68 Cycles: change svm node decoding for more efficient code generation on GPU
These functions no longer accept NULL. They were renamed for clarity and to
avoid hidden merge issues.

Ref D5363
2019-08-26 10:26:53 +02:00
db257e679a Cycles: remove workaround to pass ray by value
CUDA is working correct without it now, and it's more efficient not to do this.

Ref D5363
2019-08-26 10:26:53 +02:00
edbb755dfe Cycles: tweaks for better GPU code generation
Uninitialized variables are harder to handle for the compiler.

Ref D5363
2019-08-26 10:26:53 +02:00
b05e7ea719 Cycles: fixes for building kernel without certain features
Ref D5363
2019-08-26 10:10:35 +02:00
7a15b938bd Cleanup: fix use of wrong constant
Ref D5363
2019-08-26 10:10:35 +02:00
7b0cd21750 Cleanup: fix compiler warning 2019-08-26 10:10:35 +02:00
dc216c89e0 Fix render test Python error on crashes 2019-08-26 10:10:35 +02:00
b2608af702 Gizmo: match the DOF gizmo size with the non-gizmo indicator 2019-08-26 17:12:42 +10:00
c70e6a2e21 Fix T69153: Camera DOF gizmo fails
Regression from bc3139d792
2019-08-26 17:04:47 +10:00
abd1a2d07d Gizmo: report error when property isn't found
Also add assert so this doesn't go unnoticed, see: T69153
2019-08-26 16:58:26 +10:00
db851c78b4 Transform: support snapping origins onto the objects geometry
Normally it wouldn't make sense for the object to snap onto it's self,
when moving origins this is a common use-case.
2019-08-26 14:40:00 +10:00
7b61fe1638 Cleanup: use BLI_assert 2019-08-26 14:32:35 +10:00
8d03e04493 Fix assert restricting allowed operation 2019-08-26 01:18:40 -03:00
22822b0572 Cleanup: unused arg 2019-08-26 12:20:02 +10:00
af8e8be7b1 Cleanup: Move RNA Manual References to Modules
This file used to be stored in the Add-ons repository
to allow easy commit access for updating.
Since then, we have created an automated process,
the script can now easily be updated by anyone.

This also makes more logical sense to store the file here
as it is not an add-on.
2019-08-25 15:05:25 -04:00
fd9614de0c UI: Dim Disabled Menu Items on Hover
Dims the text and background of disabled menu items while mouse is hovering.

Differential Revision: https://developer.blender.org/D5575

Reviewed by William Reynish
2019-08-25 12:01:29 -07:00
b876fe3f3d GPencil: Show edit points in Sculpt only if mask is enabled
If the masks are disabled, the edit points must not visible.
2019-08-25 20:56:09 +02:00
de0fc96dfe cleanup: collada: removed unused public class variable 2019-08-25 19:38:12 +02:00
2f1604cef7 fix: Removed Debug statement from Collada CMakeLists. cmake now silently determines which collada library version it uses 2019-08-25 19:38:12 +02:00
f2c3dc94b1 Fix T69127: Node sockets location bug after a keyframe is inserted 2019-08-25 16:37:06 +01:00
63533a0c7d Cleanup: Clarify alloc comment text 2019-08-25 17:13:13 +02:00
a67f218b54 GPencil: Use evaluated data for Sculpt Brushes
As part of T66294 is needed to use the evaluated data for Sculpt brushes to make possible to Sculpt a transformed stroke.

Without this commit, it was impossible sculpt the stroke if the modifier moves away the stroke point from original position. Also, some calculation is done in order to determine the rotation to transform the brush effect too.
2019-08-25 16:04:23 +02:00
6917ac06a2 Fix error accessing a named UV layer when baking 2019-08-25 16:45:47 +10:00
755c11c3db Curve: remove tessface calculation when calculating modifiers
- All parts of the code that need tessface should calculate it on demand.
- The check for tessloopnormal mask isn't correct
  (since this is loop data, not tessface data).
2019-08-25 16:45:47 +10:00
6eadd40597 Cleanup: redundant struct declarations 2019-08-25 16:45:47 +10:00
f1ddc6ed0a Cleanup: clang-format 2019-08-25 16:45:47 +10:00
8df6673165 Cleanup: skip adding tessface loop & color layers
Also correct check in unused poll function
2019-08-25 16:45:47 +10:00
7585d47b36 Cleanup: remove UV name syncing function
MTFace's on the mesh are now only used for conversion.
There is no need to keep both UV layers in sync at once.
2019-08-25 16:45:47 +10:00
5572986aad Cleanup: rename mesh looptri/tessface functions
Use consistent terminology.
2019-08-25 16:45:47 +10:00
2626a6fca2 Cleanup: remove tessface check when entering edit-mode 2019-08-25 15:49:32 +10:00
bada34c766 Cleanup: remove BKE_mesh_calc_normals_tessface
This was used for versioning, now normals are calculated after
initializing MPoly data.
2019-08-25 15:49:26 +10:00
4ab50eb7fa Cleanup: remove unused ED_mesh_*_tessface functions 2019-08-25 15:06:12 +10:00
f8d7993eec Cleanup: remove unused DM_to_mesh function 2019-08-25 14:09:09 +10:00
19f27cf3e9 RNA: remove Mesh.update() calc_loop_triangles argument
This calculated tessfaces, not loop-triangles.

Remove this since they aren't accessible from RNA anymore.
2019-08-25 12:39:15 +10:00
17e1c97e43 Cleanup: remove USE_TESSFACE_DEFAULT define 2019-08-25 12:21:09 +10:00
d42a23b31a Cleanup: remove tessface loop from set-smooth function 2019-08-25 12:08:18 +10:00
6bb2912704 GPencil: Fix unreported unable to deselect when masking is OFF
When the mask is disabled, all select operators must be disabled, but the deselect all operator must work or it's impossible to deselect.
2019-08-24 17:59:32 +02:00
a53ed1e049 Fix crash when snapping ruler 2019-08-24 09:21:13 -03:00
3437fcf2f1 BKE_bvhutils: implement hiden check
Accidentally unused in rB7c3bbe93aaa2
2019-08-24 09:20:55 -03:00
091e7979d3 GPencil: Use evaluated data in selection
Now the selection is using the position after evaluating the modifiers and makes possible to select a stroke point that has been moved from the original location.

Related to T66294
2019-08-24 13:46:00 +02:00
b1ed72f152 Cleanup: use eval as suffix
Follow conversion already used in most places.
2019-08-24 13:27:08 +02:00
8b806b8e64 Fix object origin transform with vertex snapping 2019-08-24 21:23:04 +10:00
d9d1c68809 UI: Add Meta strip icon to Sequencer sidebar
Patch by Peter Fog (tintwotin).

Differential Revision: https://developer.blender.org/D5567

Reviewers: Brecht Van Lommel (brecht), William Reynish (billreynish)
2019-08-24 12:25:51 +02:00
b7f786c0b1 GPencil: Fix typo error 2019-08-24 09:02:42 +02:00
ae0b855a32 Fix T68807: smoothing group issue
Showed in OBJ export.
Caused by comparison mistake in rB2e91fc39ac7.

Reviewers: mont29

Maniphest Task: T68807

Differential Revision: https://developer.blender.org/D5561
2019-08-24 08:50:58 +02:00
c9923baf84 Fix BKE_bvhtree_from_editmesh_get not setting cached value
The stored value was always false because of shadowing.

Also disable unused code.
2019-08-24 12:16:30 +10:00
fd43854fa3 Cleanup: use doxy sections for editfont 2019-08-24 12:06:58 +10:00
dc434bc273 Cleanup: correct use of term 'split' 2019-08-24 12:06:58 +10:00
67d9647ae4 Cleanup: use eval as a suffix
Follow conversion already used in most places.
2019-08-24 12:06:58 +10:00
a68e8ac993 BKE bvhutils: create and use new BKE_bvhtree_from_editmesh_get
With this function it is easier to create and have control over editmeshes `BHVtree`s.
2019-08-23 19:51:18 -03:00
4c353205ea UI: Various tooltip corrections and fixes
Patch by Yevgeny Makarov (jenkm)

Differential Revision: D5514
2019-08-24 00:45:21 +02:00
bf242362f6 UI: Sequencer: Move header spacer in to Preview modes
Patch by Peter Fog (tintwotin)

Differential Revision: D5511
2019-08-24 00:24:43 +02:00
beb025b3ab UI: Clip Editor: Move fractional zoom values into sub-menu
Patch by Peter Fog (tintwotin)

Differential Revision: D5525
2019-08-24 00:22:38 +02:00
acdb14d264 Transform: option to transform origins in object mode
Currently supports mesh, armature, lattice, curve & metaballs.

Access from pivot popover.
2019-08-24 07:34:43 +10:00
71c43e9225 Cleanup: unused args 2019-08-24 07:34:43 +10:00
e270b6f34c Cleanup: Fix PEP8 issues 2019-08-23 23:24:07 +02:00
ee4ec69b28 Fix T66924 : Move GPencil Modifiers evaluation to Depsgraph
Before, the evaluation of modifers were done in draw manager. The reason of the old design was grease pencil was designed before depsgraph was in place.

This commit moves this logic to depsgraph to follow general design and reduce Draw Manager complexity. Also, this is required in order to use modifiers in Edit modes.

Really, there is nothing really new in the creation of derived data, only the logic has been moved to depsgraph, but the main logic is the same. In order to get a reference to the original stroke and points, a pointer is added to Runtime data as part of the evaluated data. These pointers allow to know and use the original data.

As the modifiers now are evaluated in Depsgraph, the evaluated stroke is usable in Edit modes, so now it's possible to work with the evaluated version instead to use a "ghost" of the final image over the original geometry as work today.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5470
2019-08-23 23:10:48 +02:00
d795dd1fa7 GPencil: Object data UI updates
Some tweaks for the Grease Pencil object data UI:
- Update main layers controls for consistency (Opacity, Blend mode).
- Move "Show only On Keyframed" checkbox to Display section.
- Change "Duplicate Layer" icon in Layer menu.

{F7695928}

Reviewers: antoniov, pepeland, billreynish

Reviewed By: billreynish

Tags: #bf_blender, #grease_pencil

Differential Revision: https://developer.blender.org/D5571
2019-08-23 23:01:37 +02:00
f16a28c4af Revert "Fix T68826 Eevee: Multi-Mat not working if switching from Solid shading"
This reverts commit d357e7b065. This caused crashes in UV editor drawing and
updates in lookdev mode.

Fixes T69087, T69083, T69088, T69096.
2019-08-23 20:32:51 +02:00
777ca2dcdb Snapping System: Improve drawing indicating Perpendicular snap
Since pependicular snap depends on `snapTarget` it is important to indicate where this target is so as not to confuse users.
So draw a pivot where the target is and a dotted line toward the perpendicular snap point.

Reviewers: campbellbarton, brecht, billreynish

Differential Revision: https://developer.blender.org/D5557
2019-08-23 15:20:37 -03:00
9574ac1c8d LibOverride: Disable the re-parenting of overriding objects to the instancing empty.
Does not seems to be that useful... And it's breaking the objects also
'parented' to an armature through a modifier...
2019-08-23 18:58:21 +02:00
Yevgeny Makarov
e33fc3c37b UI: layout padding changes to autorun dialog, to match save dialog
Differential Revision: https://developer.blender.org/D5568
2019-08-23 18:42:26 +02:00
c3e4a26816 UI: layout and text changes for unsaved changes dialog
Patch by Harley Acheson, with additional changes by Yevgeny Makarov.

Differential Revision: https://developer.blender.org/D5133
2019-08-23 18:36:30 +02:00
77f01748e7 GPencil: Fix unreported set origin from Python
The set origin was not working from python because the operator was checking if the stroke was valid in the console area.

As the stroke only can be valid for GP obects, this check is not needed.
2019-08-23 17:20:12 +02:00
18f4182e98 LibOverride: Fixed bug in removing override op operator.
In case the property is a RNA pointer, `RNA_path_resolve()` will try to
resolve it and return that pointer, instead of returning expected
container... That is a bad inconsistency in the rNA path API, but no
proper way to solve it for now...
2019-08-23 15:55:00 +02:00
6d64da1e67 Fix potential issues when loading files with missing libraries
This is a continuation of rB39f005eae8eed8b939579aff8c9a05a4f50e5e38

Now all the fields where we check for object type in RNA (like
rna_Curve_object_poll) will have a safe guard for when this isn't the
case.  For example when loading files that has missing object libraries
and all missing objects are replaced with empties (placeholders).

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5425
2019-08-23 15:54:11 +02:00
8eb2296872 UI: use consistent "Color Burn" name for blend mode
Previously it was named just "Burn" in some places.

Differential Revision: https://developer.blender.org/D5186
2019-08-23 13:14:15 +02:00
2f8ea1c11e Fix T67140: transforming bone does not update bone tab in properties editor 2019-08-23 13:04:54 +02:00
3d1cb78336 Fix T69075: OSL build with install_deps.sh failing at runtime
Now uses the same cmake flags as make deps.
2019-08-23 12:04:54 +02:00
162c320a75 LibOverride: Add some basic non-nodal material properties to override realm. 2019-08-23 10:27:22 +02:00
a1aa4a2597 RNA: Cleanup PointerRNA struct
The old layout of `PointerRNA` was confusing for historic reasons:
```
typedef struct PointerRNA {
  struct {
    void *data;
  } id;

  struct StructRNA *type;
  void *data;
} PointerRNA;
```

This patch updates it to:
```
typedef struct PointerRNA {
  struct ID *owner_id;
  struct StructRNA *type;
  void *data;
} PointerRNA;
```

Throughout the code base `id.data` was replaced with `owner_id`.
Furthermore, many explicit pointer type casts were added which
were implicit before. Some type casts to `ID *` were removed.

Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D5558
2019-08-23 09:52:12 +02:00
232049dd94 Armature: use BKE_armature_transform when applying transformation
Keep ED_armature_transform for RNA Armature.transform
since it operates on edit-bones in edit-mode.

Rename ED_armature_transform_bones to ED_armature_edit_transform
since it wasn't obviously an edit-mode function.
2019-08-23 12:03:11 +10:00
30582c59cc Armature: add BKE_armature_transform
ED_armature_transform uses edit-mode conversion which re-creates bones.
Needed for efficiently transforming object-data in object-mode.
2019-08-23 11:53:28 +10:00
adfb9ec87c Cleanup: const args, naming, doxy groups, clang-format 2019-08-23 09:09:38 +10:00
1de7717ed7 Outliner: new icons for sequences and contraints
Adds a new icon for the action constraint so the icon draws with the
constraints color. Also adds two new icons for sequencer meta strips
and duplicate strips for use in the outliner sequence display mode.

The meta strip icon could be used in the sequencer sidebar.
2019-08-22 14:40:33 -06:00
22ebc57987 UI: Changes to Area Options Menu
Adds more options to the context menu that pops up on area edges. Both Split types, Join, and Swap.

Differential Revision: https://developer.blender.org/D5459

Reviewed by Brecht Van Lommel
2019-08-22 13:19:11 -07:00
7c3bbe93aa Cleanup/Refactor: Simplify/deduplicate bvhutils code
This is a step that allow using `bvh_cache` for `EditMeshe`s.
2019-08-22 14:07:40 -03:00
d09b1ff1a6 Cleanup: undeclared variable warnings
Forward declare variables, or make them static.
2019-08-23 02:29:45 +10:00
4457c92fa3 GPencil: Fix missing variable due typo error 2019-08-22 18:28:19 +02:00
5888a2283e Cmake/MSVC: Enable Edit and Continue for debug builds.
This change switches the debug symbol format from /Zi to /ZI for
debug builds of blender, allowing Edit and Continue to work.

This allows limited [1] code changes in the debugger without
having to stop the process and recompile a new binary leading
to improved developer productivity.

All MSVC versions we support support this flag, Clang on
windows does not mind the /ZI flag, but doesn't currently
emit the required information to have this feature work.

[1] https://docs.microsoft.com/en-us/visualstudio/debugger/supported-code-changes-cpp
2019-08-22 10:20:40 -06:00
ec07340004 UI: Remove "Show Frame Indicator" option
This option was doing nothing in Blender 2.80.
I don't really see a reason for keeping it around.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D5552
2019-08-22 17:55:21 +02:00
e6f3d8b3e1 Revert "Fix T68971: Copy As New Driver from Material node creates a bad reference."
This reverts commits 54fd8176d7, 4c5becb6b1 and 8f578150e.

Those kind of commits must be reviewed and approved by project owners.

That one:
* Broke Collada building by not properly updating all calls to modified
function.
* Broke *whole* ID management by not properly updating library_query.c.

And in general, I am strongly against backward ID pointers, those are
*always* a serious PITA for ID management. Sometimes  they cannot be
avoided, but in general other ways to get that kind of info should be
investigated first.
2019-08-22 16:07:36 +02:00
eae9b86297 Fix crash using 'Mesh > Normals > Point to Target' from the header menu
This was working from Alt+N menu but was passing wrong ARegion
(alongside wrong mouse coords) to ED_view3d_win_to_3d_int when called
from the header menu.

Operator context INVOKE_REGION_WIN takes care of this.

This also fixes wrong behavior of 'Mesh > Normals > Rotate' when called
from the header menu.

part of T69019

Reviewers: billreynish, mont29

Maniphest Tasks: T69019

Differential Revision: https://developer.blender.org/D5555
2019-08-22 16:01:47 +02:00
54fd8176d7 NodeTree: also assign the owner pointer when copying. 2019-08-22 16:55:02 +03:00
33a287e5c0 Snapping System: Return element type in 'ED_transform_snap_object_project_view3d_ex' 2019-08-22 10:53:21 -03:00
8965a81271 Cleanup: Split some code out of rna_access.c
That file was getting out of control, now comparison/override RNA code is
in `rna_access_compare_override.c`. 1K lines of code for now, but that
area is likely to grow more in the future...

Note that we can probably split more out of `rna_access.c`, but for now
that will do.
2019-08-22 15:33:44 +02:00
Dalai Felinto
662d94e020 Multi-View user interface minor tweak
There is no reason to not expand this enum as we did for 2.79.
It is self explanatory enough and it has only two options.
2019-08-22 10:16:43 -03:00
4c5becb6b1 Fix missing argument.
Missed because of broken dependency tracking in msvc build process.
2019-08-22 16:14:48 +03:00
8f578150ea Fix T68971: Copy As New Driver from Material node creates a bad reference.
NodeTree structures of materials and some other data blocks are
effectively node group data block objects that are contained inside
the parent block. Thus, direct references to them are only valid
while blender is running, and are lost on save.

Fix Copy As New Driver to create a reference that goes through
the owner data block, by adding a new runtime field to bNodeTree.
2019-08-22 15:46:37 +03:00
443586f34d LibOverride: Enforce full override operations check on file save.
We try to avoid diffing too much things during edition, but when saving
a file we need to check all possible overridable IDs to ensure we have
all needed override operations...

Was pretty sure that was already in code, but apparently not (or it got
lost at some point...).
2019-08-22 14:34:09 +02:00
e3442c8864 LibOverride: Cleanup: tget rid of G.main usage when we can get it from context. 2019-08-22 14:33:56 +02:00
df5237ec5e LibOverride: Fix broken logic in code checking and adding new override ops.
When we wanted to force all overidable IDs to be checked, code would end
up checking the whole Main DB, instead of only overrideable ones.
2019-08-22 14:33:56 +02:00
OmarSquircleArt
08ab3cbcce Shading: Add object color to Object Info node.
The object color property is added as an additional output in
the Object Info node.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5554
2019-08-22 14:26:09 +02:00
a244384864 Fix T68969: current value '0' matches no enum in 'ToolSettings', '(null)', 'snap_node_element'
I don't think a versioning solution is necessary in this case.
But it can still be implemented.
2019-08-22 09:10:46 -03:00
75127b6be7 Revert "Fix grid snap value in recent snapping updates"
This reverts commit 48a7f979a5.

Another solution to come.
2019-08-22 09:10:46 -03:00
OmarSquircleArt
c6f8ea7b45 Fix T69044: OpenCL fail due to bad fract function.
The fract function in OpenCL does more than just return the fraction.
It also writes the floor to the second argument. Which wasn't put
in consideration.

Instead, we use a simple `a - floor(a)` like the Math node.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5553
2019-08-22 13:51:39 +02:00
b208096538 Transform: Snap Perpendicular: Avoid snapping to snapTarget 2019-08-22 08:07:41 -03:00
3f9c0ab993 Transform: Snap Perpendicular: Use snapTarget instead of center_global 2019-08-22 08:00:53 -03:00
d13952e603 LibOverride: Cleanup: rename parameters in RNA apply code.
We cannot use local/reference here, that is very confusing, since at
that stage current local is kind of src of data for the future local ID,
that is currently a mere copy of the linked data... ;)

So we are much better with src/dst names here.
2019-08-22 12:21:25 +02:00
Charlie Jolly
2ba233a31f Nodes: Support for socket shapes other than circle
Previously there was already "draw_shape" property,
but it was doing nothing. This commit renames the
property to "display_shape". Furthermore, different
shapes like SQUARE and DIAMOND are supported now.

Currently, the shapes are drawn using the shader that also
draws keyframes. In the future we might want to separate
this.

The new shapes are not used anywhere yet, but they can
be used by addon developers and will probably be useful
when we want to support different kinds node systems later.
For example, different shapes can be used to distinguish
between data and control flow.

Differential Revision: https://developer.blender.org/D2829
2019-08-22 11:10:11 +02:00
0356c8f25b Cleanup: remove edit-mode check in vertex coordinate access
This makes the function more predictable since other object
types don't access edit-mode data.
2019-08-22 13:23:27 +10:00
c2442541a6 Cleanup: typo in last commit 2019-08-22 09:13:17 +10:00
189aa32a3a Cleanup: vertex coordinate access, naming & minor changes
This also splits vertex access and allocation so it's possible
to copy coordinates into an existing array without allocating it.
2019-08-22 06:48:10 +10:00
4a2d1953f3 Cleanup: use doxy groups 2019-08-22 04:56:18 +10:00
e6f8f18902 Cleanup: clang-format 2019-08-22 04:38:05 +10:00
OmarSquircleArt
e83f092201 Shading: Add Volume Info node.
The Volume Info node provides the Color, Desnity, Flame, and Temperature
of smoke domains.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5551
2019-08-21 20:22:24 +02:00
OmarSquircleArt
133dfdd704 Shading: Add White Noise node.
The White Noise node hashes the input and returns a random number in the
range [0, 1]. The input can be a 1D, 2D, 3D, or a 4D vector.

Reviewers: brecht, JacquesLucke

Differential Revision: https://developer.blender.org/D5550
2019-08-21 20:04:09 +02:00
OmarSquircleArt
7f4a2fc437 Shading: Add more operators to Vector Math node.
Add Multiply, Divide, Project, Reflect, Distance, Length, Scale, Snap,
Floor, Ceil, Modulo, Fraction, Absolute, Minimum, and Maximum operators
to the Vector Math node. The Value output has been removed from operators
whose output is a vector, and the other way around. All of those removals
has been handled properly in versioning code.

The patch doesn't include tests for the new operators. Tests will be added
in a later patch.

Reviewers: brecht, JacquesLucke

Differential Revision: https://developer.blender.org/D5523
2019-08-21 19:36:33 +02:00
6785da095d Cleanup: remove old Windows scons installer, this is handled by CMake now 2019-08-21 18:44:22 +02:00
6086a6d939 Cleanup: Fix build error with MSVC
Previously eigens internal include order somehow implicitly provided
M_PI and friends. The recent eigen version bump broke this implicit
behaviour, better to be explicit that we need the math defines for MSVC.
2019-08-21 10:38:33 -06:00
34921e9e56 Timeline: refactor cache drawing
I did this mostly to get to know the point cache from this direction.
This should not change anything from the user perspective.
2019-08-21 17:21:50 +02:00
922da6dfb4 LibOverride: Fix inverted logic in RNA collection operation application.
Note to self: need to recheck the namings of whole override code,
currently this is way to confusing and inconsistent.
2019-08-21 17:13:51 +02:00
654fd58270 Cleanup: minor error in assert message in libOverride collection code. 2019-08-21 17:13:51 +02:00
d357e7b065 Fix T68826 Eevee: Multi-Mat not working if switching from Solid shading
The correct fix would be to avoid all those hacks but this is needed if
we want to be able to parallelize object vbo extractions.
2019-08-21 15:53:57 +02:00
8a11e70252 GPU: Fix Element index range calculation
Fix T68880 2D line display is broken
2019-08-21 14:47:57 +02:00
b19c437eff Update Eigen to 3.3.7
This is in preparation for the QuadriFlow remesher lib.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5549
2019-08-21 14:15:28 +02:00
1658fd1f7e Fix T68837 Eevee: Fix "GPU failed to find function math_max" message
Was a missing rename.
2019-08-21 13:39:09 +02:00
de232f8887 Update CUEW to latest version 2019-08-21 11:49:29 +02:00
ecfe020e6c Fix T68951: Incrementing int property causes overflow
This was probably introduced in rBfdef1a6712b.
2019-08-21 11:31:10 +02:00
8f50cdd7d5 Fix T68943: GPencil Time modifier gets strange value in offset parameter
This is due a limitation in the RNA property when the range is too extreme. As we don't need that, the value was set to SHRT_MAX frames as maximum offset.

Also fixed the same problem in other modules of Grease Pencil.
2019-08-21 11:08:10 +02:00
Julian Eisel
6e8a76c96a UI: Don't left align operator buttons in toolbars
This hack would make operator (push down) buttons without icons align
their text to the left in toolbars. Everywhere else in Blender, we
center it by default.

We barely use operator buttons in toolbars anymore. Even if we do and
there's a good reason to make text left aligned, it's better to use
`uiLayout.alignment = 'LEFT'` to achieve the same effect, but without
lowish-level hacks for a specific region type.

Differential Revision: https://developer.blender.org/D5527
2019-08-21 10:35:46 +02:00
Demeter Dzadik
f041d2f116 Fix T65671: Armature X-Mirror inconsistencies
This fixes bendy bone properties not being mirrored correctly

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5408
2019-08-21 09:59:11 +02:00
3d8f158697 GPencil: add new filter by material to modifiers
This commit adds a new filter by material using the name and not only the index.

Reviewers: antoniov, pepeland

Differential Revision: https://developer.blender.org/D5544
2019-08-21 08:41:19 +02:00
8ffbe39834 Cleanup: pass lattice directly vertex coord utilities 2019-08-21 15:05:52 +10:00
666d74e4d6 Fix T68444: outliner bone visibility not updating
Tags for update when pose bone visibility is toggled in the outliner.
2019-08-20 22:30:32 -06:00
55c626770e Fix T68429: wrong pose bone hide icon in outliner
The hide icon was drawing instead of the disable in viewports icon.
2019-08-20 22:17:27 -06:00
50fdbf3ec0 Cleanup: use const arguments for vertex coords 2019-08-21 11:58:41 +10:00
0050a044fa Cleanup: remove unused derived-mesh API calls 2019-08-21 11:41:40 +10:00
48a7f979a5 Fix grid snap value in recent snapping updates
Increase the size of the snap mode so the flag can be used.
2019-08-21 11:41:40 +10:00
899d2461bf Fix T68911: "illegal recursive expansion of macro id"
I imagined that could be a problem for some drivers.
I should have avoided.
2019-08-20 21:56:39 -03:00
daba3e871f Fix conflict with "Edge Center" snap mode
`SCE_SNAP_MODE_GRID` is used for both nodes and objects.
I don't think it's worth versioning in this case.
2019-08-20 19:35:11 -03:00
dd08d68df8 Transform: New Snap Option: Edge Perpendicular
Part of T66420

Option for snapping to the nearest point of a reference coordinate.
The patch also adds Edge Center and Perpendicular snaps to the ruler.

{F7675906}

Reviewers: campbellbarton, brecht

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D5543
2019-08-20 19:18:50 -03:00
2db09212fc Fix T68869: outliner missing subversion bump
The recent commit of synced selection added an active color theme to
the outliner, and synced selection enabled by default. The subversion
bump was missed.
2019-08-20 15:59:22 -06:00
f39145b211 Cleanup: remove redundant operator data in keymap 2019-08-21 07:23:20 +10:00
2930fbd86c Keymap: Shift-Ctrl-Click didn't allow toggle selection
D5518 by @jenkm
2019-08-21 07:13:23 +10:00
b6b01c48fa GPencil: Hide self_overlap parameter for Texture strokes
This property is not supported in this mode and must be removed from UI.
2019-08-20 20:26:48 +02:00
58341242bf Editor Transform: New Snap Option Middle
Part of T66420

Reviewers: campbellbarton, brecht

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D5532
2019-08-20 15:07:48 -03:00
1876e18b1b Fix use of uninitialized variable in Cycles math node 2019-08-20 18:19:22 +02:00
a23e1c38f3 Fix T68877: GPencil - Missing remove unused slots in menu
The operator was missing in the menu for grease pencil materials.
2019-08-20 18:11:26 +02:00
14c4a217eb Liboverride: Add more missing ID RNA pointers as overridable. 2019-08-20 17:48:33 +02:00
207f2137dd Fix T68789: Do not use new python format strings thingy in UI code.
This is 100% incompatible with translation...
2019-08-20 17:48:32 +02:00
OmarSquircleArt
be002bb57f Cycles Tests: Fix Math tests when use_clamp is true.
The clamp option is implemented using graph expansion, where a Clamp node
named "clamp" is added and connected to the output. So the final result
is actually from the node "clamp".

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5540
2019-08-20 17:21:40 +02:00
247507a85f Cleanup: remove undefined function 2019-08-20 11:47:50 -03:00
c48d1d54f1 Select Engine: Move some private members out of select context 2019-08-20 11:36:36 -03:00
0827110a35 Cleanup: Move select_engine function to corresponding header 2019-08-20 11:36:35 -03:00
61ff578eab UI: add URL presets
This adds a url-preset operator to simplify opening re-usable links.

- Standard websites have their own tool-tip.
- De-duplicate logic to get URL's that include version information.
- Reporting bugs no longer needs to have all information
  included in the URL.

D5498 by @luisbg with edits.
2019-08-20 23:44:18 +10:00
e6a81ad61e Cleanup: comparison warning 2019-08-20 23:42:04 +10:00
8bee9af462 BLI: double version of some math functions. 2019-08-20 21:09:55 +08:00
a942d97b79 Fix release notes showing twice in the splash-screen 2019-08-20 22:47:25 +10:00
8919c1cad5 Cleanup: clang-format, sorted lists 2019-08-20 22:47:25 +10:00
3dbe172344 Fix crash with no grid unit 2019-08-20 09:11:32 -03:00
859f2561c8 Fix T61286: Viewport grid units not visible
The original code was commented on.
Unlike blender 2.79, the grid units are now displayed only when RV3D_VIEW_IS_AXIS.
The visible subdivisions in the grid are made by the GPU and depending on the pixel.
The code used here only mimics this behavior and adds a bit of overhead.

Reviewers: fclem, campbellbarton

Subscribers: FloridaJo, zlsa, rl.amorato, EitanSomething

Differential Revision: https://developer.blender.org/D4325
2019-08-20 08:58:07 -03:00
f2cab8267f Memory: Fix guarded aligned malloc with small alignment
When calling `MEM_guarded_mallocN_aligned` with an alignment of 4,
a pointer that was returned that is 4 byte but not 8 byte aligned.
When freeing this pointer, `MEM_guarded_freeN` thinks that it is an
illegal pointer, because it asserts that `((intptr_t)memh) & 0x7 == 0`.

The fix is to always use at least 8 byte alignment.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5529
2019-08-20 09:45:47 +02:00
6367845c51 Cleanup: outliner range selection
No functional changes. This commit simplifies the recursive call,
removes unneeded function calls, and adds comments.
2019-08-19 17:08:38 -06:00
4421eb684d Outliner: Add range extend select
Add support for ctrl+shift+lmb to default and industry compatible
keymaps to select a range without removing the existing selection.
2019-08-19 16:49:43 -06:00
74d05eb71a GPencil: Improve reproject operator in surface mode
This change was applied to GP branch during the period 2.80 cannot be updated. Now the patch can be moved to master.

The commit fix the problem when reproject over surface in multiframe mode and the surfaces can moved.

Also improved the surface algorithm thanks to Lukas W (@geloescht).

New Algorithm: Differential Revision: https://developer.blender.org/D4878

Tested by @mendio and @pepeland
2019-08-19 21:05:48 +02:00
beab06b242 GPencil: Change UI scale for z-depth offset
Actually, the value for this parameter must be in the order of 0.00001 and this makes the UI uncomfortable.

Now, the value is divided by 1000 internally and the UI values are more logic.

Reviewers: mendio, pepeland

Differential Revision: https://developer.blender.org/D5528
2019-08-19 20:32:20 +02:00
d1017027af Fix build error with OpenImageDenoise after recent changes for dynamic linking
CMake variables are case sensitive.
2019-08-19 20:19:55 +02:00
e54cde403c Fix T68831: use NULL instead of the wrong pointer to read default array.
The pointer argument is supposed to be the object the property belongs
to, not a pointer to the property metadata itself. This only worked
before because the argument was never used.
2019-08-19 20:23:06 +03:00
953264138d LibOverride: add some more missing override flags for RNA ID pointers. 2019-08-19 19:11:35 +02:00
5fa17ce720 Mesh Batch Cache: Fix crash caused by rB3cbf2462391c 2019-08-19 18:08:44 +02:00
4bf37bafc2 View3D Grid: fix imperial grid drawing
This is a step to finish the D4325 and fix the T61286.
Currently the grid is highlighted in steps of 10 out of 10, which is wrong for the imperial units as seen in `buImperialLenDef`.
The idea of the code is to pass the steps of the grid already dimensioned as a uniform.

Another important thing to note is that subdivisions now only affect the grid without unity.
This matches the 2.7x Blender versions.

No performance loss (almost no gain too).

Reviewers: fclem

Subscribers: zlsa, rl.amorato

Differential Revision: https://developer.blender.org/D4379
2019-08-19 12:05:57 -03:00
3cbf246239 Fix T68719 Viewport: Wrong material index when switching between view mode
This was due to the GPUIndexBuf ranges only computed when requesting
the triangles indices. If the tris were already calculated, the new shading
batches would never have the GPUIndexBuf ranges and instead use the full
triangle index buffer.

So since this only happen when shading data does not match, we just save
the previous GPUIndexBuf ranges and reuse them for the new batch.

This patch is a bit of a hack on top of a hack but it works fine.
2019-08-19 17:02:27 +02:00
0b2e0877de Outliner: sync selection on undo/redo
Tags all outliner sync types on undo and redo operations.
2019-08-19 09:00:42 -06:00
c8e775180b Fix crash when loading a file with existing proxy, and lib has been edited.
Editing a lib char should never, ever be done once you have proxies of
it in your project, that will most certainly break a lot of things...

But at leats let's try no to crash here.
2019-08-19 16:48:04 +02:00
caed5b04d2 Outliner: rename filter "invisible" to "hidden"
No functional changes. Renames the "invisible" object filter to
"Hidden" to be more consistent.
2019-08-19 08:20:13 -06:00
45a09de9dd Fix building with shared OIDN libraries
Previously cmake would error out if it couldn't find the static
libraries even though it can build with shared libraries just fine.
2019-08-19 15:21:44 +02:00
04f9c795aa UI: replace "reports to text" operator with showing info log
This operator only existed to be able to see multiple reports, now instead the
info log can be opened and contents can be copy/pasted.

Patch by Valentin (Poulpator)

Differential Revision: https://developer.blender.org/D5510
2019-08-19 14:56:37 +02:00
Luis de Bethencourt Guimera
aebc596175 Fix T68672: splash screen does not remain centered when window resizes
Differential Revision: https://developer.blender.org/D5508
2019-08-19 14:56:31 +02:00
3f725f10cc Fix T68647: objects cannot be moved to collection if there is no active
object

This showed e.g. when deleting active object, then selecting using box
select.
This commit also lifts the restriction that linked objects could not be
moved to a collection.

Reviewers: campbellbarton, dfelinto

Maniphest Tasks: T68647

Differential Revision: https://developer.blender.org/D5485
2019-08-19 14:48:37 +02:00
5615c675af Fix T68779: "Match Texture Space" causes blender to crash
need to access curve_cache from evaluated object.
thx @sergey for pointing that out.

Reviewers: sergey

Maniphest Tasks: T68779

Differential Revision: https://developer.blender.org/D5526
2019-08-19 14:30:54 +02:00
ce5477d993 Fix T68802: Paint brush's Fill Threshold option is lost 2019-08-19 14:25:55 +02:00
ca3f25fc64 build deps macOS: add PUGI_XML home to OSL 2019-08-19 15:00:28 +03:00
79710a417c UI: re-order sequencer effects panel in side-bar
When working with Effect strips it is not optimal to have to scroll
downwards to get to the important settings for these kinds of strips.

D5512 by @tintwotin
2019-08-19 20:50:52 +10:00
6f17527062 Fix T68806: UI: underscores instead of spaces in some labels. 2019-08-19 10:41:59 +02:00
edbd47b78a LibOverride: Fix some more broken characters after override.
Think pretty much any ID pointer property should be overrideable
actually, without this reconstructing a local hierarchy of overriding
data-blocks simply cannot work properly...
2019-08-19 10:06:36 +02:00
10001d9099 Mesh Batch Cache: Fix regression with mesh that have poly mat id > mat_len 2019-08-18 22:41:12 +02:00
38380ddca3 Fix T67008: Missing move handle and flickering in FileBrowser
Fix T67008: Missing move handle and flickering in FileBrowser

Allow split regions (child regions) to contribute to the action zones (azone) of the parent region.
This fixes the issues in file browser and also in the user preferences.

Reviewers: Severin, mont29, campbellbarton

Reviewed By: Severin, mont29, campbellbarton

Subscribers: brecht, campbellbarton

Maniphest Tasks: T67008

Differential Revision: https://developer.blender.org/D5273
2019-08-18 16:42:41 +02:00
454b120f48 GPencil: Interpolate pressure in active Smooth
Now the pressure is interpolated in active smooth and not only position as before.
2019-08-18 11:40:23 +02:00
8ac40e4163 Cleanup: spelling, change breaked to braked 2019-08-18 19:30:33 +10:00
14e3c0b3e3 Cleanup: unused warning 2019-08-18 19:30:13 +10:00
OmarSquircleArt
e5618725fd Shading: Refactor Math node and use dynamic inputs.
- Implement dynamic inputs. The second input is now unavailable in single
operand math operators.
- Reimplemenet the clamp option using graph expansion for Cycles.
- Clean up code and unify naming between Blender and Cycles.
- Remove unused code.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5481
2019-08-18 11:16:04 +02:00
e12c17b305 Industry Compat Keymap: support new outliner features
Adds support for changes in the outliner from the soc-2019-outliner
branch. All changes made in the default keymap are made in the
Industry Compatible  keymap, except for renaming. Renaming is done
with Return in the Industry Compatible keymap.
2019-08-17 19:43:46 -06:00
e3d90abac7 Fix: Outliner gsoc versioning
Move outliner versioning for syncing and themes to the block
for the next subversion bump. It was not moved from the first
location it was placed in the soc-2019-outliner branch.

Old files will now load with synced selection enabled reliably.
2019-08-17 19:24:32 -06:00
e69fb44027 Fix T68782: false occlusion in selecting vertices and edges with objects in any wire view 2019-08-17 18:40:08 -03:00
b1959a96a2 Cleanup: spelling 2019-08-18 04:26:34 +10:00
2aef1347f9 Cleanup: correct comments 2019-08-18 04:26:29 +10:00
fdb0f3bc0b Fix T68760: "Reload Scripts" '_sys_path_ensure' missing
Missed this in recent update.
2019-08-18 02:32:43 +10:00
c3d037e88f DRW: Fix couple of issues in DRW_draw_select_id
Theses 2 function calls are mandatory.
2019-08-17 17:27:28 +02:00
85f90ed6fd Fix T68723: GPencil - Split Select mode for Sculpt and Edit mode
Actually, the selection mode is not visible in Sculpt mode when mask is enabled, but still is used.
Also, the mode is shared between Edit mode and Sculpt mode and for meshes the selector is by mode.

This commit splits the select mode in different properties and show the selector in Sculpt mode to define the Select mode. Also, the Select Mask button has been removed and now the Select Mode buttons work equal to Meshes where the select buttons are the mask enable too.

Fixed some old code not valid detected during these changes.

Differential Revision: https://developer.blender.org/D5500
2019-08-17 16:26:46 +02:00
0e1d4dec7a Fix T68722: Improve Smooth algorithm for Thickness and Strength
Now the GPencil smooth algorithm uses a average value instead to use only two points and the interpolated value.

Differential Revision: https://developer.blender.org/D5489
2019-08-17 12:51:05 +02:00
a477c2e0e0 Fix unreported GPencil Thickness modifier affecting strokes not in Vertex Groups
Prior to this commit: If the Grease Pencil Thickness modifier is set to Normalize and a Vertex Group is selected, the thickness of all strokes are effected when changing the Thickness parameter. Points on strokes are only normalised (= pressure set to 1.0) if they are part of the Vertex Group; the strokes themselves may still change thickness.

With this patch: If Normalize is selected with a Vertex Group, Blender now pre-checks each stroke to determine whether it has vertices within or outside the Vertex Group. If all the points on the stroke belong to the Vertex Group, it normalises the whole stroke to a uniform thickness. If some or none of the points of the stroke belong to the Vertex Group, the stroke is now left as is.

Reviewed By: @antoniov
Differential Revision: https://developer.blender.org/D5483 with minor edit.
2019-08-17 11:17:12 +02:00
463eef36d3 Fix T68753: GPencil tooltip typo 2019-08-17 11:04:03 +02:00
e8ffe25eb1 PyRNA: include class name in double-register exception
Helps debugging errors when classes are registered twice.
2019-08-17 04:51:50 +10:00
fdcae9ed0c Outliner: Add range extend select and modify keymap
Modifies selection keymap to be more conventional, with
shift click for range selection and ctrl click for extend
selection.
2019-08-16 12:30:54 -06:00
7ee2392887 Outliner: Support box select on click+drag 2019-08-16 12:30:54 -06:00
7ba2de8f8f Outliner: set parent for entire selection
Set and clear parents for all elements in the selection in the outliner.

This also removes the popup menu for setting the parent to curves,
armatures, and lattices. It makes more sense to keep the outliner
simple and only do object parenting.
2019-08-16 12:30:54 -06:00
1e51411db4 Outliner: Fix scenes in scene display not starting open 2019-08-16 12:30:54 -06:00
6bc6d016c5 Outliner: Fixes to show active and scroll page
Adjusts the scrolling of show active and scroll page operators
to use the `outliner_scroll_view` operator to ensure scrolling
does not leave the outliner bounds.

Also changes show active to expand subtrees containing all
instances of the active object, which may be linked to multiple
collections.
2019-08-16 12:30:54 -06:00
b83b0d73a6 Outliner: set scene camera on camera data activate 2019-08-16 12:30:54 -06:00
05f2ccd6d4 Outliner: Draw sequencer and vertex group icons
Draw icons for sequencer and vertex groups. The sequence
types need updates because they all draw in various colors
and some sequence types do not have an icon.
2019-08-16 12:30:54 -06:00
4902094440 Outliner: Use F2 to rename active outliner item
Previously with F2 mapped to the global rename active object
operator, it was not posible to use the conventional F2 to rename any
outliner element like collections or object data. This adds F2 to the
outliner keymap to call the outliner rename operator rather than the
popup rename object operator.
2019-08-16 12:30:54 -06:00
252fb48997 Outliner: walk navigation operator and openclose fixes
Adds a keyboard walk navigation and selection operator to the
outliner. Up and down arrow keys walk up and down the list of
elements, and left and right will open and close elements if
the elements are closed or opened respectively. Holding shift
while walking up and down the tree expands the selection.

Holding shift while clicking or pressing left and right arrows
will expand or collapse all children elements recursively.
Pressing enter to openclose the hovered element is removed.

Also allows click+drag for openclose of element subtrees.

This moves openclose toggling to the openclose operator to
remove duplicate code. The outliner tree building is tweaked
slightly to set the proper parents in scene display mode for walk
select to walk to parents without errors.
2019-08-16 12:30:54 -06:00
eb92ac05d6 Outliner: invisible object filter
Adds an invisible object filter in the outliner to show hidden
objects. This is useful to quickly locate hidden items in a large outliner
tree and easily toggle visibilty back on. Invisible refers to an object
being hidden, or viewport visibility restricted.
2019-08-16 12:30:54 -06:00
01006aa45d Outliner: Allow select on row icons
Allow selection of subtree elements on a collapsed element's
row. Because subtree elements are aggregated by type, a select on
an icon that represents multiple subtree elements will invoke a
popup menu to select the specific subtree element.

Also draws highlights on cursor hover over a row icon.

Any child elements that are linked to multiple collections will
only be listed in the popup one time, and selection from the
popup will select the first instance in the subtree.
2019-08-16 12:30:54 -06:00
bf95ab6bb2 Outliner: Draw constraint icons and enable button
Draw all constraint icons and enable/disable restrict buttons.

The action constraint needs its own icon. It currently draws white
instead of the blue modifier color.
2019-08-16 12:30:53 -06:00
35a5dee2ef Eyedropper: Support datadropper in the outliner
Adds support for using the eyedropper in the outliner in addition to
the 3D view.
2019-08-16 12:30:53 -06:00
0a903e7ab1 Collections: change active if hidden or excluded
When the active collection is hidden or excluded, change the active
collection to the first visible parent collection. This behavior existed
previously for excluding collections, and is now expanded to also
switch the active collection when viewport hidden or restricted.

This does not prevent viewport hidden or restricted collections from
being reactivated later. This could be added as a separate commit.
Excluded collections cannot be activated, so it may make sense to
extend this behavior to hiding collections.
2019-08-16 12:30:53 -06:00
71eb653280 Outliner: Synced selection and active element highlighting
Adds a toggle to the filter menu for outliner synced selection. Enabled
by default, this ensures selection is synced between objects, bones, and
sequences. An active outliner element theme color is added to indicate
which element is active.

Synced selection is controlled on the operator level. Each operator
that modifies selection for objects, bones, sequences, or outliner
elements needs to call the respective ED_outliner_select_sync_from..
function to tag outliners to be synced.

Syncing is done lazily on outliner draw.
2019-08-16 12:30:53 -06:00
7ba2720a70 Fix T68103: bevel sometimes infinite loops with patch miter.
Needed to null terminate list of chain to process width adjustments on.
2019-08-16 13:20:48 -04:00
Rémi Verschelde
b57d386dc1 Fix T68009: Recognize X.Org/AMD as GPU_DEVICE_ATI and open source driver
Reviewed By: #gpu_viewport, fclem

Differential Revision: https://developer.blender.org/D5392
2019-08-16 18:41:43 +02:00
OmarSquircleArt
25f1783673 Fix T68702: Input socket in the Normal node isn't drawn properly.
The Normal vector socket in the Normal node wasn't drawn properly and
couldn't be controlled. Additionally, the socket name was drawn over it.

This happened because the socket had a default value of a zero vector.
To fix this, we set the default value to the unit vector `(0, 0, 1)`.
Moreover, we don't draw the UI name if the subtype is `PROP_DIRECTION`.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5503
2019-08-16 17:59:12 +02:00
39288768b5 Revert "Outliner: only activate outliner items when clicking on icon/text"
The soc-2019-outliner branch relied on the previous behavior,
since this is going to be merged soon, postpone this change.

This reverts commit 9dab57a9f8.
2019-08-17 01:25:11 +10:00
66bd96e0bb Cleanup: remove gawain reference 2019-08-17 01:17:30 +10:00
d489aa2955 Cleanup: clang-format 2019-08-17 01:17:11 +10:00
2790740813 Cleanup: spelling 2019-08-17 00:57:05 +10:00
05edcf6329 Cleanup: unused args/vars 2019-08-17 00:53:32 +10:00
145f851731 UI: click on status bar report message now opens window with Info editor
Patch by Valentin (Poulpator)

Differential Revision: https://developer.blender.org/D5468
2019-08-16 16:49:04 +02:00
42cee6ab21 Fix part of T62917: selected edge not highlighted with black and white overlays
Differential Revision: https://developer.blender.org/D5369
2019-08-16 16:49:04 +02:00
ea8e0df672 Fix T55054: possible use of unsupported instructions in Cycles texture code
Differential Revision: https://developer.blender.org/D5326
2019-08-16 16:49:04 +02:00
4f03217dad Fix Unreported crash when opening linked material using nodegroups
This removes the recursive conversion of material using old blend modes.

With the approval of @brecht
2019-08-16 16:42:19 +02:00
d8bb429964 Fix T68651: LibOverride: Fix bad handling of RNA collections pointers.
We were storing the 'item' part in the RNA path of the override op
itself, which will not work with IDs because overriding local one might
not have the same name as the linked one (when some local ID with same
name already exists).

Now we are properly handling  this using the expected actual override
operation, which stores necessary data (names or indices) from both
local and linked data.
2019-08-16 16:25:52 +02:00
d436d67fcc Cleanup: proper use of UNUSED_VARS_NDEBUG instead of random hack. 2019-08-16 16:25:52 +02:00
dc0376555f LibOverride: do not allow diffing on collections' all_objects member.
This is useless (as diffing on `objects` + `children` shall be enough),
and potentially very time consuming in case of heavy hierarchy of
collections.
2019-08-16 16:25:52 +02:00
078d02f557 User Preferences: Added "Enabled add-ons only" preference
This checkbox replaces the "Disabled" and "Enabled" entries in the
filter drop-down. As a result, it now takes a single click to limit the
shown entries to enabled add-ons only. This is also an actual flag in
the preferences, and thus its state is saved between runs on Blender (in
contrast to the filter, which is always reset to "All").

Reviewed by: brecht, billreynish
2019-08-16 15:02:09 +02:00
ecc3b033a7 Fix T68715 Hidden polygon Edit mode are hidden in Object level 2019-08-16 15:00:50 +02:00
ee8aad79c1 Fix T56408: Hair children recalc on every frame on Alembic mesh
This fixes the glitching hairs described in T56408, T63534, and possibly
also T63534.

The fix consists of returning the original mesh (i.e. as visible in edit
mode) when constructing the ORCO mesh. This allows a static set of
coordinates to be used when computing the child hair positions.

The original mesh is only returned when it has the same topology (at
least same number of vertices, loops, and polys. It's up the author of
the Alembic file to ensure stable geometry when it's desired to be
compatible with Blender's hair system.

Reviewers: mont29, brecht

Differential Revision: https://developer.blender.org/D5492
2019-08-16 14:52:08 +02:00
c70f975d5c Fix T67999: calling Mesh.materials.clear() crashes Blender
The `BKE_material_pop_id()` and `BKE_material_clear_id()` functions had
a parameter `update_data` that, when `false`, would cause the mesh polys
to keep their material index, even when the indexed material slots were
removed. This behaviour was never used in the C code and not supported
by the drawing code, making polygons disappear and causing crashes. The
Python binding in RNA, however, defaulted to `update_data=False`.

This commit removes the `update_data` parameter altogether, and makes
the functions always fix up the material indices.

Reviewed by: mont29, brecht
2019-08-16 14:36:57 +02:00
82e719ff87 Fix T64998: Multi window spin tool crash
There could be a more direct way to initialize a gizmo in a view,
for now this resolves the crash.
2019-08-16 22:21:44 +10:00
Stefan Werner
8e4f55aba6 build_env: Added OpenImageDenoise to install_deps.sh
Building OIDN still needs to be enabled explicitly with --with-oidn.
It will fail with older versions of CMake or TBB, so I can't make
any guarantees for various Linux distributions or versions.
2019-08-16 14:01:37 +02:00
13c9df10a8 Fix T68710: crash on applying modifier after removing all shape keys
This was a mistake in rB87629b2a7443

`BKE_object_shapekey_free` would never return `true`, so DEG updates
would not happen...
So `ob->shapenr` was not up-to-date etc., leading to crash in
`BKE_mesh_nomain_to_mesh` shapekey handling...

Reviewers: brecht

Maniphest Tasks: T68710

Differential Revision: https://developer.blender.org/D5501
2019-08-16 13:58:47 +02:00
f8920bd8c7 Cleanup: fix compiler warnings 2019-08-16 12:44:06 +02:00
bdf8450713 Transform: use a kd-tree to calculate proportional distances
While speedup is non-linear, it gives ~30% speedup for ~6 million verts.

D3993 by @Al with edits.
2019-08-16 18:35:35 +10:00
9dab57a9f8 Outliner: only activate outliner items when clicking on icon/text
This is 2.7x behavior, while there are plans to improve on this,
committing in case larger changes take longer.

Without this it's not easy to select object data without changing modes.

See D5493
2019-08-16 07:07:22 +10:00
8f565f5a6f WM: reuse visible region calculation
Avoids calculating the visible part of a region whenever
on-screen overlays are drawn.
2019-08-16 06:44:25 +10:00
266e7b67fd Cleanup: use boolean 2019-08-16 06:44:25 +10:00
0f79c346c6 Fix check that validates a selection index 2019-08-15 17:08:38 -03:00
50ad4428ac Windows/MSI: Rework MSI installer.
The installer always upgraded the last version installed and did not allow for two versions to be installed side by side.

The reworked installer will allow side by side installs

install order:
```
2.81 -> 2.81a -> 2.82  : Allowed , will result in both 2.82 and 2.81a being installed
2.82 -> 2.81  -> 2.81a : Allowed , will result in both 2.82 and 2.81a being installed
2.82 -> 2.81a          : Allowed , will result in both 2.82 and 2.81a being installed
2.82 -> 2.81a -> 2.81  : Not Allowed, 2.81 will only install if you manually remove 2.81a first.
```

Do note though that this will not apply to any previously issued installers and even for 2.80a this is not something we can fix.

This patch is for landing in 2.81 *only* and should be excluded from any possible 2.80a release.

Second change is a change to the compression level, building the MSI takes 30 minutes, which is crazy, perhaps worth it if the compression actually pays of.

```
MSI - none     1:35  247.0 MB (260,025,634 bytes)
MSI - mszip    2:02   89.6 MB ( 94,022,946 bytes)
MSI - low      2:35   81.6 MB ( 85,646,626 bytes)
MSI - medium   4:11   77.3 MB ( 81,136,930 bytes)
MSI - high    28:01   74.7 MB ( 78,384,418 bytes)

zip            1:32   93.2 MB ( 97,732,293 bytes)
7Z             2:22   65.0 MB ( 68,171,614 bytes)
```

It didn't, so I lowered it to medium, seemed reasonable.

Differential Revision: https://developer.blender.org/D5494

Reviewers: brecht, jesterking
2019-08-15 13:43:44 -06:00
Dalai Felinto
cbd1739004 Fix T68705: Changing any editor to the properties crashes Blender
Issue introduced (more like exposed) in b7f86ff722.
2019-08-15 16:39:51 -03:00
b5fe838d44 Fix T68689 Fix infinite recursion cause by versioning code
Complex nodetrees could fire infinite recursion with previous algo.
Now using another gset we make sure we can only evaluate a tree once.
2019-08-15 18:46:37 +02:00
5d72ceb8d8 Fix broken text editing of integer number buttons, after recent changes 2019-08-15 18:20:33 +02:00
f61c6a2a1f Build: enable OpenImageDenoise, now that we have libraries for all platforms
Note that we are still missing an update for install_deps.sh to easily build this
on Linux. Only "make deps" has it for now.
2019-08-15 18:13:22 +02:00
c883fe25da Cleanup: clang-format, unused arg 2019-08-16 01:59:32 +10:00
8856c26fc3 Windows: add cycles debug logging to helper batch file. 2019-08-15 09:42:00 -06:00
4aad773061 Cleanup: Silence C4115 warning
`'ParticleSystem': named type definition in parentheses`
And prevent the need for struct `Object` to be defined.
2019-08-15 12:35:28 -03:00
f4faf6d856 Cleanup: Remove redundant headers 2019-08-15 12:35:28 -03:00
9684971add Fix T56843 : fix case sensitive filenames on win10
When building with case sensitive folders there were some linker errors.
2019-08-15 09:27:15 -06:00
4d320f4313 Edit Mesh Selection: Refactor: Redraw idmap buffer at runtime with only objects inside the rect
But in the future the selection code may also be used in object mode (eg for snapping).
So to avoid using too much VRAM resources, it is good to avoid drawing all objects in the viewport.

The solution was to create an array with only objects that are detected within the selection area.
If the selection operator is modal, objects already detected are not removed from the array until view3d is moved or orbited.
To detect the object, its BoundBox is tested.
Since the Select Engine does not have a dedicated depth texture, whenever a new object is "found" the depth of the objects in the array already drawn is redrawn.

Reviewers: campbellbarton, fclem

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5435
2019-08-15 10:31:54 -03:00
261a02fc59 DRW: New function DRW_culling_min_max_test
For testing intersection with frustrum planes without having to transform all bound box vertices into global space.
2019-08-15 10:20:21 -03:00
78b56fa7d9 Fix T65461: IntProperty does not respect its 'step' field
Originally D5020 by @deadpin, refactored to make the change simpler.
2019-08-15 22:57:41 +10:00
fdef1a6712 UI: make int/float button clicking logic consistent
- When no change is performed on a float button, cancel the action.
- Move left/right clicks into the same block.
- Replace ambiguous names: temp, tempf.
2019-08-15 22:57:41 +10:00
e4084f8b24 Fix CDT bug causing crash with some output modes.
Forgot to properly maintain the edge for faces while
dissolving edges.
2019-08-15 07:55:29 -04:00
48a6997e2a Fix T64888: full-screen button overlaps side-bar 2019-08-15 21:34:16 +10:00
95a0144293 Fix T68684: Vertex snapping with median not working if the object is not at center of the world 2019-08-15 08:29:49 -03:00
9e54e6bdc5 Cleanup: Minor change to previous commit 2019-08-15 13:17:28 +02:00
143a44caeb GPencil: Fix unreported missing VFX in Video Editor
As the video editor mode is not Render mode the VFX was omitted.

Now, the mode is only checked for View3D.
2019-08-15 13:15:15 +02:00
ff1ea600c9 Fix T68675: particle edit mode makes blender crash
In rB9c010c44f420, DRW_mesh_batch_cache_create_requested was changed to
take a scene (instead of toolsettings directly), but
DRW_draw_depth_object is calling this with with NULL, just checking for
this seems to fix...

Reviewers: fclem

Maniphest Tasks: T68675

Differential Revision: https://developer.blender.org/D5488
2019-08-15 11:56:57 +02:00
eac2a7ab0e Fix full-screen button overlapping navigation gizmo 2019-08-15 19:51:28 +10:00
e6fa174fd7 UI: skip drawing the full-screen when alpha is zero 2019-08-15 19:51:28 +10:00
a2a9c95845 Fix T68678: Invisible fullscreen button
Regression from 6148ed8cf9
2019-08-15 19:51:28 +10:00
c7598cd1a5 Cleanup: spelling
Missed in recent commit.
2019-08-15 19:51:28 +10:00
5b04829d43 Cleanup: replace commented out code by comment 2019-08-15 11:28:42 +02:00
32395dd4e2 UI: Finalize old TODO in UI float number handling.
Just enable some commented-out code from rB636289b755f6ce (disabled at
that time because we were too close of 2.79 release...).

Issue raised in D5486, thanks.
2019-08-15 11:13:54 +02:00
63b3cc1702 Cleanup: spelling 2019-08-15 16:56:24 +10:00
1ddc12ceb9 Cleanup: unused warnings
Reminder not to leave in unused code, or comment why it should be kept.
2019-08-15 16:55:48 +10:00
bb2394a298 Fix T68014: Add-on's override Python built-in modules
Append addon paths to the sys.path to avoid name
collisions with system modules.
2019-08-15 16:09:15 +10:00
7c258a8ad1 Mesh: bypass legacy tessface conversion step when remeshing 2019-08-15 15:59:58 +10:00
f4d548d384 msvc: Enable /bigobj on all object files.
bf_intern_openvdb makes a significant number of template instantiations
causing it go over the maximum number of sections (int16) in a coff file
when doing a debug build.

This change switches the compiler to use the extended coff format which
has this field extended (int32) all linkers post msvc2005 can process
this format so there's no reason not to turn this on globally.

Clang on windows does not need this change since clang switches implicitly
to the extended format when required. [1]

[1] https://reviews.llvm.org/rL217812
2019-08-14 17:57:01 -06:00
Dalai Felinto
cb7ead2e3b Fix T68658: Text offset makes scale to fit not to work
Differential Revision: https://developer.blender.org/D5484
2019-08-14 19:18:51 -03:00
5ff8fcfa72 Eevee: Fix tangent map node not using the right UVMap 2019-08-14 23:59:34 +02:00
6fcd071c7b GPU: Vertex Format: Increase number of byte per attribute name
This reduces the risks of hash collision while maintaining a small number
of character per attrib.
2019-08-14 23:59:34 +02:00
80e9eb66d5 Mesh Batch Cache: Split UV an tangent into 2 distinct VBOs
This is done because they don't have the same update frequency. UV can be
persistent even on geometry update (ex: skinned object) but tangents
can change if the normals change.

Also the name buffer per vbo was too small to contain all names.
2019-08-14 23:59:33 +02:00
deb5416a1a GPU: Vertex Format: ADd function for safe GLSL attrib name
This remove code duplication and use base63 encoding of the hash.
Use mumur hash to have more randomness.
2019-08-14 23:59:33 +02:00
67f49f9c03 Cleanup: fix compiler warnings 2019-08-14 23:40:12 +02:00
037cf920b4 Sculpt: mesh abstraction API
These functions make possible porting the tools from the sculpt branch, making them compatible with PBVH_FACES and PBVH_BMESH without duplicating the code. They can also help to simplify some existing code.

These functions should not be used when working with PBVH_GRIDS data in SculptSession. PBVH_GRIDS needs to be removed from the sculpt code and converted to PBVH_FACES to be compatible with this API.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5352
2019-08-14 22:59:31 +02:00
5489611e53 Compositor: Added denoising node
This node is built on Intel's OpenImageDenoise library.
Other denoisers could be integrated, for example Lukas' Cycles denoiser.

Compositor: Made OpenImageDenoise optional, added CMake and build_env files to find OIDN

Compositor: Fixed some warnings in the denoising operator

build_environment: Updated OpenImageDenoise to 0.8.1

build_environment: Updated OpenImageDenoise in `make deps` for macOS

Reviewers: sergey, jbakker, brecht

Reviewed By: brecht

Subscribers: YAFU, LazyDodo, Zen_YS, slumber, samgreen, tjvoll, yeus, ponomarovmax, getrad, coder.kalyan, vitos1k, Yegor, DeepBlender, kumaran7, Darkfie9825, aliasguru, aafra, ace_dragon, juang3d, pandrodor, cdog, lordodin, jtheninja, mavek, marcog, 5k1n2, Atair, rawalanche, 0o00o0oo, filibis, poor, lukasstockner97

Tags: #compositing

Differential Revision: https://developer.blender.org/D4304
2019-08-14 21:40:35 +02:00
1845f0ee8b Cleanup: Fix build error with MSVC
C99 style initializers are C++20 feature and should not be used.

Reported by @deadpin on chat.
2019-08-14 12:52:51 -06:00
655f5818a5 Cleanup: use BKE_mesh_ prefix for the remesh API
These functions deal with voxel remeshing of Mesh data,
and aren't related to MOD_remesh.c for e.g.

Name so other kinds of remeshing wont cause confusion.
2019-08-15 04:46:51 +10:00
76e5b4bee4 Fix T68657: Voxel remesh crash
Mesh was being double freed.
2019-08-15 03:51:06 +10:00
8ee3e7da28 Cleanup: use doxy sections for wm_operators.c 2019-08-15 03:42:04 +10:00
966f4a162b Cleanup: warnings, unnecessary nested header 2019-08-15 03:42:04 +10:00
9c010c44f4 Mesh Batch Cache: Refactor + Multithread
For clarity sake, the batch cache now uses exclusively per Loop attributes.
While this is a bit of a waste of VRAM (for the few case where per vert
attribs are enough) it reduces the complexity and amount of overall VBO
to update in general situations.

This patch also makes the VertexBuffers filling multithreaded. This make
the update of dense meshes a bit faster. The main bottleneck is the
IndexBuffers update which cannot be multithreaded efficiently (have to
increment a counter and/or do a final sorting pass).

We introduce the concept of "extract" functions/step.
All extract functions are executed in one thread each and if possible,
using multiple thread for looping over all elements.

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D5424
2019-08-14 19:05:26 +02:00
45a45f7d66 OpenVDB: Voxel Remesher
The voxel remesher introduces a new workflow for sculpting without any of the limitations of Dyntopo (no geometry errors or performance penalty when blocking shapes). It is also useful for simulations and 3D printing.

This commit includes:
- Voxel remesh operator, voxel size mesh property and general remesh flags.
- Paint mask reprojection.
- Geometry undo/redo for sculpt mode. This should support remesh operations as well as future tools that modify the topology of the sculpt in a single step, like trimming tools or mesh insert brushes.
- UI changes in the sculpt topbar and the mesh properties pannel.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5407
2019-08-14 18:58:19 +02:00
16c28b5a67 UI: suppress Copy/Paste/Edit Driver options on whole array property fields.
When a button represents the whole array (e.g. color picker buttons),
these context menu options were available, but didn't really work
correctly. Since it's not clear how they could reasonably work without
a valid index, it's better to hide them.
2019-08-14 19:18:13 +03:00
9ac3964be1 OpenVDB: mesh/level set conversion, filters and CSG operations
This code is needed to implement the Voxel Remesher as well as other features like a better remesh modifier with filters and CSG operations.

Done by Martin Felke and Pablo Dobarro

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5364
2019-08-14 18:13:56 +02:00
5ca5357e08 Install_deps: bump official numpy version to 1.17.0
Following recent ;ails re python version bump (looks like py version
itself had already been bumped in that script).
2019-08-14 17:49:15 +02:00
4b9e05b428 Cleanup: clang-format, sort structs & cmake files 2019-08-15 01:34:58 +10:00
8cbe9f1b9a Cleanup: headers 2019-08-15 01:32:46 +10:00
c5c4012b10 Cleanup: split out splash screen into own file
`wm_operators.c` is mainly for generic operator logic
where as the splash screen is one of a kind.
2019-08-15 01:32:46 +10:00
9bc10c1f54 Cleanup: remove comment to workaround weak code parsing
This is quite an old comment, recent IDE's/editors
should be able to handle escaped quotes in strings.

If kludges like this are needed, developers should note exactly why.
2019-08-15 01:32:46 +10:00
2623e68c3b GPencil: Revert commit d727f4f223 (Interpolate menu)
The menu is not redundant,  it is just another way to reach the tool and also give more discoverability of the operator shortcut (Many tools in Blender are also on menus, toolbar or header, just think of Move, Rotate, Scale).

There is also no reason to force the user/artist to change to edit mode for interpolate strokes, when the tool works perfectly in drawing mode too. It would only slow down the 2D animation workflow.

Reviewers: @mendio
2019-08-14 17:32:23 +02:00
63bf2ddc5d Fix main part of T68646: Library overrides: Broken parenting (parent inverse matrix gets reset) after reload.
We need a custom 'apply override' callback here to prevent resetting
the inverse parent matrix.

Things are now working for basic cases, but complex ones (in production
rigs e.g.) are still partially broken...
2019-08-14 17:27:34 +02:00
05417b2220 Text editor: syntax highlighting + line numbers on by default
The most common use of the text editor seems to be for scripting. Having
line numbers and syntax highlighting enabled by default seems sensible.

Syntax highlighting is now enabled by default, but is automatically
disabled when the datablock has a non-highlighted extension.
Highlighting is enabled for filenames like:
    - Text
    - Text.001
    - somefile.py
and is automatically disabled when the datablock has an extension for
which Blender has no syntax highlighter registered.

Reviewers: billreynish, campbellbarton

Subscribers: brecht, billreynish

Differential Revision: https://developer.blender.org/D5472
2019-08-14 16:59:37 +02:00
72eb70f933 Added missing forward declaration 2019-08-14 16:55:51 +02:00
f0f5e11b33 Eevee: Fix: Regression when using ssr and default shader 2019-08-14 16:43:52 +02:00
0dcd442c1f Fix T68487: double free when inserting keyframe outside of action clip range 2019-08-14 16:12:16 +02:00
Julian Eisel
b7f86ff722 Fix Area.ui_type invalid during area change
To reproduce:
* Split 3D View to show Info Editor
* Change 3D View a few times to various subtypes (Timeline, UV Editor
  etc).
Every now and then, the Info Editor should show `UNKNOWN ENUM`. Other
prints may also be lagging behind.

Reviewed By: campbellbarton, brecht
Differential Revision: https://developer.blender.org/D5325
2019-08-14 15:51:54 +02:00
03b2371387 Cleanup: move trailing comments to avoid wrapping code
Some statements were split across multiple lines because of their
trailing comments.

In most cases it's clearer to put the comments above.
2019-08-14 23:32:24 +10:00
bc4fe45aef Cleanup: pep8, prefix unused arg 2019-08-14 23:32:24 +10:00
Julian Eisel
e6425aa2bf Manage GPU_matrix stacks per GPUContext
Previously, we had one global `GPU_matrix` stack, so the API was not
thread safe. This patch makes the stack be per `GPUContext`, effectively
making it local per thread (`GPUContext` is located in thread local
storage).

Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5405
2019-08-14 15:27:10 +02:00
4074ab361e Eevee: Fix background alpha regression 2019-08-14 14:29:02 +02:00
7ae3aa7b63 Cleanup: don't unnecessarily use ustring in IES file parsing 2019-08-14 14:16:11 +02:00
d2195d9ef2 Fix T68637: Crash assigning caps-lock shortcut
Report that this isn't supported instead, also for unknown key.
2019-08-14 21:40:16 +10:00
67c10dbf13 Eevee: Add support for the holdout node
Support should be full when using Alpha Blend mode and partial if using
any other blend mode (opaque / alpha clip / alpha hashed).
2019-08-14 13:36:56 +02:00
13d469e6f0 Eevee: Remove Additive & Multiply Blend mode
This commit also provide a compatibility code that will convert old
materials using Additive or Multiply Blend mode to their node equivalent.

This conversion is only done on outputs that are enabled for eevee.
2019-08-14 13:36:56 +02:00
d5002f007e Eevee: Improve Transparent BSDF behavior
Alpha blended Transparency is now using dual source blending making it
fully compatible with cycles Transparent BSDF.

Multiply and additive blend mode can be achieved using some nodes and are
going to be removed.
2019-08-14 13:36:56 +02:00
8a338950c6 Fix T68537 Eevee: Modulo node behaves unexpectedly/inconsistently
There was still some float imprecision when both input values are equal.
2019-08-14 13:36:56 +02:00
55c38f476e Custom Properties: allow changing the property UI to color picker.
To fully support storing colors as a custom property, it is necessary
to allow switching the property UI to the standard color picker button.
That means in effect supporting custom property subtype values.

Change RNA_property_subtype to look for a 'subtype' string field
in _RNA_UI and parse it as an enum value. To minimize performance
impact, only do it if the property is an array; also, don't use
the custom subtype during RNA path parsing.

On the python side, allow setting some most useful seeming values
from the custom property settings editor.

Also, since some color picker code seems to run into a risk of
buffer overruns if the array size is wrong, check the size in
the UI layout code to be safe.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D5475
2019-08-14 13:38:23 +03:00
c47c7a44b2 Fix T68623: bpy.types.UI_UL_list.filter_items_by_name is case sensitive.
Was a mismatch with default behavior from C-defined basic UI list...
2019-08-14 11:43:25 +02:00
b4051db4fc Fix cycles crash when voxel attributes changed
This could happen e.g. when changing smoke type from flow to domain or
connecting a volume shader with to a domain without an actual flow type
around.

Fixes T58569, T68359

Reviewers: brecht

Maniphest Tasks: T58569, T68359

Differential Revision: https://developer.blender.org/D5478
2019-08-14 10:54:28 +02:00
OmarSquircleArt
7a7eadaf7f Shading: Add a clamp option to the Map Range node.
If the option is enabled, the output is clamped to the target range.
The target range is [To Min, To Max]. The option is enabled by default.

The clamp option is implemented in EEVEE by linking to the `clamp_value`
GLSL function. And it is implemented in Cycles using a graph expand
function.

Reviewers: brecht, JacquesLucke

Differential Revision: https://developer.blender.org/D5477
2019-08-14 10:53:19 +02:00
c9acc5faad Fix T68597: GPencil Dope Sheet can fail to display active GP object
Now, the dopesheet is activated if the object is in any Edition mode.
2019-08-14 10:30:58 +02:00
b3c3c83560 cleanup: fix python related build error on windows.
Recent python changes caused issues on some systems.
2019-08-13 19:55:33 -06:00
fc0f47e349 make.bat: Support running python from lib folder for make format
We are no longer depended on a system python being installed.
2019-08-13 17:03:09 -06:00
c538903558 deps: python 3.7.4 for windows.
This also updates to a new packaging method where python is runnable
from the library folder rather than having tarballs in the release
folder.
2019-08-13 17:02:19 -06:00
87d3685e93 deps/cleanup: remove partial boost-python support.
boost python was not required by any dependency nor was it ever properly supported.
2019-08-13 17:00:23 -06:00
54013d541c build_environment/python: Bump versions of our site-packages
IDNA     2.8
CHARDET  3.0.4
URLLIB3  1.25.3
CERTIFI  2019.6.16
REQUESTS 2.22.0
NUMPY    1.17.0
2019-08-13 16:58:26 -06:00
OmarSquircleArt
313b789289 Shading: Add Clamp node to Cycles and EEVEE.
This patch adds a new node that clamps a value between a maximum and
a minimum values.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5476
2019-08-13 22:22:15 +02:00
42798a5ca1 Fix T67516 VSE: Animation evaluated incorrectly when scene strip present
The calls to `BKE_animsys_evaluate_all_animation()` and
`BKE_mask_evaluate_all_masks()` used the wrong timecode to evaluate the
animation system. This happened:

- Sequencer in scene A was rendered at frame X.
- Scene strip for scene B which should be evaluated at frame Y.
- BKE_animsys_evaluate_all_animation() was called with frame Y, which
  also re-evaluated the animation data in scene A.
- Other sequencer strips with animated values were then evaluated for
  frame Y and not frame X.

Since the depsgraph for rendering the scene strip is already OK and does
its job, it's no longer necessary to re-evaluate all the animation in
this way.

Removed `BKE_mask_evaluate_all_masks()` because it's no longer used.

Reviewers: sergey, brecht, iss

Differential Revision: https://developer.blender.org/D5394
2019-08-13 16:38:22 +02:00
OmarSquircleArt
71641ab56d Shading: Add Map Range node to Cycles and EEVEE.
This patch adds a new Map Range node that linearly remaps an input
value from a range to another. This node is similar to the compositor's
Map Range node.

Reviewers: brecht, JacquesLucke

Differential Revision: https://developer.blender.org/D5471
2019-08-13 16:38:56 +02:00
aef08fda3a Custom Properties: officially support int and float arrays in the UI.
In some rare cases it is convenient to store a short array value
as a custom property, e.g. a vector or color. For example, it may
be helpful when importing/exporting certain formats that support
custom or nonstandard attributes on objects.

The custom property storage already can handle arrays in order to
support properties defined via python. The only thing missing is
UI support (and some bugs), and this patch fixes that:

- Allow editing short array properties via Custom Properties panel.
- Fix a UI layout sizing bug triggered by the previous item.
- Fix a dependency graph bug with drivers using such properties.
- Make RNA_*_get_default_array code robust in case of size mismatch.
- Support custom default values for array properties, allowing
  both an array and a scalar value.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D5457
2019-08-13 17:13:19 +03:00
6e7ea807e1 UI: Fix wrong properties being grayed out
This has been mentioned in T68610.
2019-08-13 15:47:03 +02:00
03bf84db86 Fix T66373: Strange translation text behaviour.
i18n code does not work from threads on some plaforms, so it is disabled
in Blender when called from non-main thread.

Means that we have to go to a slightly different approach, with dirty
tag and generating string on request for UI.

Note: Also had to update the `info` string size, to fit with expensive
asiatic scripts in utf-8... Using mem for that kind of runtime data is
not really nice, but for now it will have to do.
2019-08-13 15:37:11 +02:00
6f9cbbc8ec Add mathutils.geometry.delaunay_2d_cdt() function to Python API.
Provides Python API access to recently added Constrained Delaunay
Triangulation routine.
Reviewed in D5467.
2019-08-13 07:31:14 -04:00
918150a0b9 Fix T65670: bone envelope head radius missing from transform panel
Make the transforms section of the properties panel consistent with
the transforms section of the side-bar, and to expose some currently
hidden BBone properties in the Bendy Bone section.

- Object transformations were not consistent with Pose Bone
  transformations in that they did not use single-column layout.

- Even in Pose Bone transformations,
  the rotation mode option was after Scale.

- Edit Bone Transforms panel included "Tail Radius" and
  "Envelope Deform Distance", neither of which belong there. See T65670.

- Expose bbone_x and bbone_z.

D5454 by @Mets
2019-08-13 18:20:05 +10:00
b84db342a5 Fix build errors with older GCC versions like 4.9
We can add more fine grained checks for when these flags are supported so
that adding asan flags manually still has all the workarounds, but for now
compiling succesfully is more important.
2019-08-13 06:04:17 +02:00
af3f0bf9d4 Fix T68507: Gpencil: Show always the Select Menu in Edit Mode
In Grease Pencil Edit Mode the Select menu should always be visible. Right now the menu visibility is controlled by the Selection Mask button next interpolate popover

Differential Revision: https://developer.blender.org/D5466
2019-08-12 23:22:08 +02:00
bb1719ddb5 Fix T68547: Plane Constraint inaccuracy
If it is to prevent division by zero just check if the `factor` is zero (instead of using an epsilon).
2019-08-12 17:13:32 -03:00
1a8dccd70a UI: Use singular noun form in add menus 2019-08-12 15:46:07 -04:00
3c014fe3fb Fix T68187: Factory Preferences doesn't update gizmo colors 2019-08-13 04:44:25 +10:00
ef5bf8d67e Fix T68557: Incorrect property reported in error
Error spotted by @gbayliss
2019-08-13 03:45:29 +10:00
b5f5f6e319 Cleanup: rename BaseOffset to ObjectOffsets 2019-08-12 12:29:38 -03:00
4815bd7748 Fix wrong detection in recent ninja build change 2019-08-12 17:28:01 +02:00
44d95cbf95 Cleanup: DRW manager: Move select_buffer.c utilities out of the selection engine internals 2019-08-12 12:10:44 -03:00
37b4384b59 Fix T67032: Do not systematically link 'orphaned' indirectly linked objects to scene.
Not even in append case. If those objects are already part of a
collection, we can now leave them fully un-instantiated in any scene,
since user can easily do it themselves as they need to.
2019-08-12 15:44:17 +02:00
102035373a Build: automatically detect ninja build system when running "make"
So that you don't have to specify "make ninja" every time.
2019-08-12 15:24:23 +02:00
922e77036b Fix Bullet build error with Clang 8 and Xcode 11
See D5366 and upstream:
https://github.com/bulletphysics/bullet3/commit/7f6c479ea6
2019-08-12 15:12:27 +02:00
3736dabd93 Fix running space_node directly
Part of T65393
2019-08-12 22:54:17 +10:00
961d43c623 Fix T68539: transferring uv (Ctrl+L) does not update immediately in
object mode
2019-08-12 14:49:27 +02:00
f555379ce3 Fix T66922: Merge by distance tooltip text wrong
merge/dissolve distance is actually a maximum, not a minimum

Reviewers: campbellbarton

Maniphest Tasks: T66922

Differential Revision: https://developer.blender.org/D5462
2019-08-12 14:44:51 +02:00
ca9698b8e0 Sculpt/Paint: Ignore INBETWEEN_MOUSEMOVE events on certain brush tools
Some brush tools were being executed too often when using devices with high polling rates, causing performance issues. This should improve the performance of brushes that don't need those updates.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5429
2019-08-12 12:58:08 +02:00
761aeb4899 Fix crashes caused by library placeholders.
This fixes inconsistencies in materials between objects and obdata
due to placeholders generation for missing libdata.

Note that we cannot do that when generating the obdata placeholder,
as not all objects using it might be already loaded...
So this has to be done near the end of the reading/linking process.

Reported here by Blender Studio.

Reviewers: brecht

Subscribers: jbakker, zeddb

Tags: #datablocks_and_libraries

Differential Revision: https://developer.blender.org/D5428
2019-08-12 11:54:37 +02:00
35a9a85b27 Fix T68542: ParticleSystem.uv_on_emitter returns always 0,0 while Particle.uv_on_emitter returns a value.
'cached' particles (for paths actually) are only generated for some kind
(hair, keyed, and baked system afaik), not for all.

Note that we could probably just use directly `totpart` and `totchild`,
but keeping code as close to what it was as possible, for now...
2019-08-12 11:47:08 +02:00
2b5575cc35 Fix error displaying brush panel (sidebar) in Vertex Paint mode
oversight in rB83fc8342d827
2019-08-12 11:37:24 +02:00
52421e9ace View3D: Circle Select optimization
Don't recreate `select_bitmap` for each edited object.
2019-08-11 22:12:11 -03:00
0d719fcacb Cleanup: spelling 2019-08-12 01:10:43 +10:00
a5f59bffd6 Cleanup: use doxy comments 2019-08-11 22:41:04 +10:00
63c463ac45 Docs: improve comments 2019-08-11 22:34:22 +10:00
1cd65b274b BLI_math: add isect_tri_tri_v2, wrap via mathutils.geometry 2019-08-11 21:50:48 +10:00
c3a9fc5efb Text: support comment without selection
D5451 by @Poulpator with fixes.
2019-08-11 20:52:45 +10:00
e2c6cfec18 Preferences: tag as dirty when loading factory startup 2019-08-11 18:03:17 +10:00
18ba66d75e UI: clarify auto-save preference
- Grey out the option when factory settings have been loaded.
- Note it it's tool-top that it's ignored when factory settings
  have been loaded.

Suggestions by @JulienKaspar
2019-08-11 17:51:09 +10:00
22cdadaa32 Cleanup: clang-format 2019-08-11 02:47:32 +10:00
cd91ff98c0 Cleanup: unused var 2019-08-11 02:47:32 +10:00
OmarSquircleArt
26911ba1e2 Nodes: Display vector values expanded, except when specified as compact.
Change the default drawing method of vector sockets to use a column layout.
This allows more interactive use of nodes and avoids the one or two clicks
needed to edit vector sockets in the old default component layout.

Developers may still use the component layout by flaging the socket with the
`SOCK_COMPACT` socket flag. For now, we choose to draw the SSS scale vector
of the Principled and SSS nodes in a compact form because they don't require
much interactivity.

Reviewers: brecht, JacquesLucke

Differential Revision: https://developer.blender.org/D5458
2019-08-10 17:57:54 +02:00
f51f4355b9 GPencil: Refine tooltip for Simplify modifier 2019-08-10 17:22:58 +02:00
7440144e2b GPencil: Hide selection tool in sculpt mode when mask is disabled
The selection tool must be hidden if the sculpt mask is not enabled because these options are not usable in this mode.

Also, the Select tools have been moved to the bottom of the toolbar.

Now, the logic is similar to Meshes.

Differential Revision: http://developer.blender.org/D5452
2019-08-10 17:20:12 +02:00
7029810b04 GPencil: Add new Distance property to Simplify modifier
Before, the length variable was reused for Sample and Merge Simplify. Now, the Merge has its own distance property and variable in the modifier struct.
2019-08-10 17:16:12 +02:00
745f773d92 GPencil: Fix tooltips for Simplify modifier 2019-08-10 17:00:49 +02:00
049c50e095 GPencil: Disable Select operator for Sculpt mode if Mask is OFF
The selection is only valid when the mask is enabled, so the operators must be disabled.

This modification is part of D5452
2019-08-10 16:50:21 +02:00
9e68b560a6 GPencil: New macros to check Sculpt and Weight Paint modes 2019-08-10 16:26:59 +02:00
b99c616b9b Fix T68414: GPencil crash after using L key and Ctrl+Z in Draw Mode
There is a segment fault because the operator was in modal but the Ctrl+Z breaks the custom data. Now, the Ctrl+Z ends the operator.
2019-08-10 16:04:42 +02:00
b91643c711 Add Constrained Delaunay Triangulation routine to Blenlib.
See Design task T68277, and patch D5423.
This commit includes edits by @ideasman42 to patch in
branch temp-D5423-update, plus responses to his comments.
2019-08-10 08:24:20 -05:00
553b581f25 GPencil: Improves Close stroke when the closing gap is very small
For very small gaps, we don't need generate geometry.
2019-08-10 13:15:20 +02:00
41f8f08e51 UI: Add initial context menus for Info and Console editors
Both keymaps are also updated
2019-08-10 11:35:16 +02:00
77516c25e4 GPencil: Fix segment fault using Search menu
The poll was not checking Object type
2019-08-10 10:20:30 +02:00
a571ff2c16 Text: minor change to text prefix behavior
Don't keep the cursor at the start of the line,
this was creating a selection when adding a prefix without a selection.
2019-08-10 04:48:59 +10:00
d20d9aa3e8 Fix T68486: GPencil ehen interpolate strokes, only display one stroke not all
The drawing loop exit too early.
2019-08-09 20:28:12 +02:00
3c81c53a31 UI: add menus for the info editor
D5444 by @tintwotin with edits
2019-08-10 01:48:53 +10:00
0944750921 Keymap: Ctrl-G now maps to Find Set Selected
This finds using the current selection instead
of using the text in the find side-bar.

More useful for quickly jump to other instances of a word.
2019-08-10 01:48:53 +10:00
18668a20cb Cleanup: Remove blank lines and trim end line spaces 2019-08-09 17:46:05 +02:00
810caad80e Fix T67591: Gpencil reorganize Edit Menu
The Grease Pencil Stroke Menu in Edit mode is cluttered with operators that act over stroke, points or the entire object.

To keep the consistency of the edit menu with other Blender Objects, we should separate the menu in: Grease Pencil - Stroke - Point.
Also we should add some missing operators and other menus like Show/hide or Weights among others

Differential Revision: http://developer.blender.org/D5449
2019-08-09 17:39:34 +02:00
899c85a118 Fix T67821: Snap to Symmetry not updating
Added a missing depsgraph update.
2019-08-09 17:26:54 +02:00
58f38ff5c1 UI: add back header icons to toggle text display options
These were removed in D5028, adding back by popular demand.
2019-08-10 01:14:40 +10:00
2b029234ba Cleanup: alternate fix for T66019
Prefer triple quoting to avoid having to escape quotes.
2019-08-10 00:44:50 +10:00
62ff55167c Cleanup: simplify preview check in sequencer
Also removed XXX comment which is now resolved.
2019-08-10 00:22:22 +10:00
a148056841 UI: Show suffix '*' instead of graying out 'Save Preferences'
Save preferences still works when preferences have not been edited.
2019-08-10 00:09:39 +10:00
c274151afe Cleanup: move space types under DNA_DEPRECATED
Prevent accidental use
2019-08-10 00:05:12 +10:00
b88d4ae12e Cleanup: remove redundant time check 2019-08-10 00:05:12 +10:00
65408cba20 UI: Clean up Sequencer/Preview Menu and Preview Menu
The Sequencer/Preview Menu is a mixture of both the Sequencer and the Preview menu functions, but they are currently not presented in an organized way.

Moved the Preview Zoom functions up next to the Sequencer Zoom functions with a separator in between.
Moved the Preview Show functions up next to the Sequencer Show functions with a separator in between.
Uncommented Show Framenumber Indicator, since it does not work or have a function after scrubbing in the timebar was implemented.
Renamed Show Metadata to Show Image Metadata, since it does only show metadata for images.
Added Show Annotations to View Menu for consistency.
Added Frame Overlay to View Menu for consistency.
Added Fractional Zoom to a sub-menu, since Sequencer/Preview View menu became too long. This sub-menu is in consistency with the Fractional Zoom menu in the Image Editor.
In Sequencer/Preview mode the Fractional Zoom will be named Fractional Preview Zoom, to specify that this function is only for the Preview.

Patch by Peter Fog (tintwotin)

Differential Revision: https://developer.blender.org/D5339
2019-08-09 15:35:42 +02:00
e1665905df Fix T68322: Shear in Dopesheet causes crash
The Shear transform operator is now disallowed in the timeline and
dopesheet editors.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D5440
2019-08-09 14:53:25 +02:00
9deb73df3d Clarify "Save on Exit" tooltip
The old text, "Save modified preferences on exit" suggests that only the
modified preferences are saved. This is not the case: all preferences
are saved at once. This distinction is especially important after having
loaded factory default settings.

As discussed with @campbellbarton and @JulienKaspar.
2019-08-09 14:35:28 +02:00
fbc90ae2bf UI: Sequencer Sidebar Text-Strip Panel adjustments
The functions are now divided into two nested sub panels, since it makes it easier to navigate through the options.

The Location values are moved above the Alignment values, to avoid the confusion that the alignment values could be presets for the location.

In the menu and context menu the Text Effect strip was among the functions which had the Input sub menu visible. Text strips do not take strip inputs, so this is a bug, which is solved with this diff.

Patch by Peter Fog (tintwotin)

Differential Revision: https://developer.blender.org/D5142
2019-08-09 14:08:20 +02:00
97336dbb3d Cleanup: Fix stupid style error in previous commit 2019-08-09 11:41:50 +02:00
8aa2f3b6ce GPencil: Add "Self Overlap" parameter to materials to disable Stencil
This parameter was removed in 2.80 and we decided to back again, but now is inverted.
2019-08-09 11:37:02 +02:00
533e48520e UI: expand on console menus
Some features weren't exposed anywhere in the interface.

D5443 by @tintwotin
2019-08-09 19:16:35 +10:00
4c9fe65745 UI: Sculpt menus cleanup
This removes the Brush pulldown menu from Sculpt and Paint modes. This menu only contained a random duplicated subset of brush options. Now everything is accessible centrally in the Brush Tool Settings.

The Sculpt menu likewise contained various random brush options. These are removed and replaced by a list of commands, just like the other paint modes.

Also removes the Show Mask option from the mode options panel since this is also in Overlays.

Reviewers: Campbell Barton

Differential Revision: https://developer.blender.org/D5420
2019-08-08 22:54:57 +02:00
634621d54d BMesh: add utility to calculate normal from a vertex cloud
Extract from BM_verts_sort_radial_plane & simplify.
2019-08-09 05:44:27 +10:00
1eead85cdc Cleanup: remove function already implemented in BKE_deform 2019-08-09 02:02:32 +10:00
47cd57eedc Docs: improve description of 3D view distance offset utility 2019-08-09 01:55:05 +10:00
39b5b22174 Cleanup: use doxy sections 2019-08-09 01:55:05 +10:00
a0d9043f43 Cleanup: warnings 2019-08-09 01:55:05 +10:00
e18e9aa0d0 Cleanup: Typo in naming (BLE instead of BKE, tssttt). 2019-08-08 17:20:39 +02:00
1342d1879e Fix T52551: undo causes crash after enabling a new rigid body when scene uses a referenced rigid body world.
Poll functions were not correct here, we cannot make objects part of
rigidbody sim if the RB collection is a linked one...
2019-08-08 17:20:39 +02:00
45ec08dc99 GPencil: Add mode Merge to Simplify modifier
This option uses the same logic of the merge by distance but as an option of modifier to allow dynamic merge.

This option will be very useful for LANPR generated strokes.
2019-08-08 17:16:17 +02:00
179e886ab3 GPencil: New Simplify modifier mode Sample and operator
This mode simplify the stroke doing a resampling of the points and generate new geometry at the distance defined.

Sample function developed by @NicksBest

New Resample Stroke operator

This operator recreates the stroke geometry with a predefined length between points.

The operator uses the same code used in Simplify modifier.

Reviewers: @mendio
2019-08-08 16:43:54 +02:00
5ca3bc7a14 Fix T68393: lift hardcoded limit on particle children 'child_radius'
Reviewers: jacqueslucke

Maniphest Tasks: T68393

Differential Revision: https://developer.blender.org/D5436
2019-08-08 15:22:56 +02:00
2fb42816cf Fix T68375: Polyline: can not make segment (cyclic)
Reviewers: campbellbarton

Maniphest Tasks: T68375

Differential Revision: https://developer.blender.org/D5438
2019-08-08 15:13:49 +02:00
3504b4c9c3 Fix T68360: Zoom too sensitive with hi-dpi
Scale pixel-input by pixel size for zoom operators.
2019-08-08 22:53:30 +10:00
01aae653a1 Cleanup: use static for undeclared function 2019-08-08 22:51:01 +10:00
b9d0f33530 Fix T67545: GPencil - New Merge by Distance operator
Merge points when the distance is less than a predefined value.

The method to interpolate the position created a wrong merge. Now, always the secondary point is merged with the first one (merge at first), except the last point.
2019-08-08 14:13:01 +02:00
9d4a8cbd88 2nd attempt to fix build error from rB22bdd08dfd08
sorry for the noise, if that doesnt do it, I'll revert and check this
thoroughly...
2019-08-08 10:44:32 +02:00
6689614e39 attempt to fix build error from rB22bdd08dfd08 2019-08-08 10:38:01 +02:00
22bdd08dfd Fix T68250: Camera keyframing (Walk/Fly) despite canceling movement
Reviewers: campbellbarton (thx!)

Maniphest Tasks: T68250

Differential Revision: https://developer.blender.org/D5418
2019-08-08 09:41:19 +02:00
3241a29990 Keymap: don't use 'any' modifiers for the text editor context menu 2019-08-08 16:40:40 +10:00
8c0daaecdf Cleanup: rename text toolbox to context menu 2019-08-08 16:39:50 +10:00
512b562b3b Text: reorganize menus
- Add "Live Edit" to Text menu.
- "Top/Bottom of File" renamed to "Top/Bottom" and placed in Navigation sub-menu.
- Added navigation functions to Navigation menu,
  since they were not exposed in the menus.
- Added selection functions to Select menu,
  since they were not exposed in the menus.
- Moved the Select menu to the Header in consistency with the 3D View.
- Inserted comment in context menu.

D5434 with edits.
2019-08-08 16:15:59 +10:00
7bc300a74b Fix T67587: Fix Drawing in Wireframe Non X-Ray Mode
When using Vertex or Weight paint mode on a wireframe the overlay was
blended with the background. In this case we now use alpha blending.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5340
2019-08-08 08:00:57 +02:00
66356dae94 Fix T67638: Stretched Camera Background Images
The matrices that projects background images in the 3d view
were incorrect. The root cause was that the coordinate systems were not
respected, that was most noticeable when rotating a stretched image.

We re-validated conversions of coordinate spaces (UV -> Image -> Camera -> Window)
and made sure that the rotation is done in image space.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D5431
2019-08-08 07:53:21 +02:00
9fd9d90247 Keymap: only use Alt-Left/Right for legacy keymap
Ctrl-Left/Right aren't in conflict for the default keymap.
2019-08-08 15:31:47 +10:00
d727f4f223 UI: Remove Grease Pencil Interpolation from stroke menu
This is a bit redundant because there is the interpolation popover.
Also these options were available while drawing which is not useful.
2019-08-07 19:56:52 -04:00
5e77fb2482 API Docs: Correct Hotkey
Here we can link to the manual and keep the hotkey updated in the manual 
rather than the API docs.

Fixes T68371
2019-08-07 17:20:40 -04:00
ba0870713b Fix T68268: Crash switching to Weight Paint mode
Also applied to sculpt mode
2019-08-08 04:36:43 +10:00
7c08cddedb Fix unassigned return argument in recent select refactor 2019-08-08 04:36:43 +10:00
764cc75e1f Edit Mesh Selection: Move ED_view3d_select_ functions to bf_draw
It is easier to deal with private values of the DRW_select engine and gives room for improvement.

Reviewers: campbellbarton, fclem

Differential Revision: https://developer.blender.org/D5415
2019-08-07 12:43:31 -03:00
9d7d34c12a Select utils refactor: remove lagacy ED_view3d_select_id_read_rect
`ED_view3d_select_id_read_rect` serves only as a bridge to `DRW_framebuffer_select_id_read`.
Keeping these codes similar only increases the complexity of some functions.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D5415
2019-08-07 12:43:31 -03:00
dafecfa683 UV: select overlap operator
New operator to select overlapping UV's,
from all visible edit-mesh UV's.

D5421 @deadpin with edits.
2019-08-08 01:28:03 +10:00
3e27dd5b55 Fix T67623 Eevee: Modulo node making unexpected/inconsistent behaviour
This was a precision error. Using a more robust approach
2019-08-07 13:08:48 +02:00
be4063dbbb Fix error in recent trackball aspect cleanup
Error in 7f8d620e20
2019-08-07 21:02:19 +10:00
b560e15028 Fix T68348: Hotkeys do nothing when over viewport gizmos
This was done intentionally so mouse press events tools didn't prevent gizmos
receiving click events before `USE_GIZMO_MOUSE_PRIORITY_HACK` was added.
2019-08-07 20:36:48 +10:00
8f8e91987b Fix tool-tips remaining after operators start
It was possible for e.g. to have a header tooltip displayed,
then start walk-navigation which didn't close the tool-tip.
2019-08-07 20:36:44 +10:00
c3ef1f8db3 3D View: utility function to set the depth from a location
Avoids having to do projection/offset calculations inline.
2019-08-07 18:27:21 +10:00
7fcf1f2d9c Fix T68340: Add reference image to hidden collection fails 2019-08-07 16:40:27 +10:00
Julian Eisel
85c843b115 Remove compiler fix for unsupported MSVC version 2019-08-07 01:55:16 +02:00
f4e27bc2c9 Fix not reported: Face selection sometimes does not work in weight, paint and texture mode. 2019-08-06 17:27:00 -03:00
00cb31de65 Cleanup: use BKE_ prefix for BKE_colortools.h 2019-08-07 03:38:01 +10:00
e2630f388d Cleanup: clang-format 2019-08-07 03:34:59 +10:00
3227b37141 Fix Dopesheet transform regressions due to rB81dc76c19cff
Functions that begin with the name `apply` closely resemble the main callback to apply.
Ref T68137
2019-08-06 14:02:29 -03:00
317033a1be Annotations: Remove Simplify option from Userprefs
This option was an old option for Grease Pencil tools and it's not logic for Annotations.

Differential Revision: http://developer.blender.org/D5426
2019-08-06 18:53:39 +02:00
467b0aa227 Fix T68320: measure tool memoryleak
It was a stupid mistake with the wrong pointer being referenced.
It was a serious problem because the memory leak was considerable.
2019-08-06 12:50:08 -03:00
edb828d0d7 DrawManager: Fixed Assertion In Workbench 2019-08-06 16:49:02 +02:00
88a872dd6e Fix T68227: Pinning the particles system data-block causes error
The 'Seed' setting is not part of the pinned data-block. When pinning,
the local variable `psys` is `None`, and this wasn't properly checked for
when drawing the 'Seed' setting.
2019-08-06 15:31:49 +02:00
6b0c97466f Keymap: add sequencer left/right select
Matches graph editor keys.

D5192 by @tintwotin
2019-08-06 22:40:34 +10:00
39f005eae8 Fix crash when opening files with missing armature libaries
In the case where the library is missing, the armature object is
replaced with an empty. This would crash the armature modifier.

Now we check if the armature object really is an armature or not.
2019-08-06 14:34:48 +02:00
dcad1eb03c Cleanup: move utf8 offset conversion into BLI_string_utf8
There isn't anything specific to text data with these functions.
2019-08-06 21:59:13 +10:00
8b2810a32f Cleanup: spelling (neighbor) 2019-08-06 21:59:13 +10:00
199c37d7e4 Fix T68291: crash snapping to both verts and edges with linked meshes
this was also happening in snapping with the measure tool

same method as in snap_mesh_polygon() (from rB59286ddcf80c) now used in
snap_mesh_edge_verts_mixed() as well...

Reviewers: mano-wii

Maniphest Tasks: T68291

Differential Revision: https://developer.blender.org/D5422
2019-08-06 13:28:20 +02:00
45ae33a952 Fix T66731: Part 3: Labels translations when tools are in 'compact' mode.
Very annoying that this whole UI thingy uses its own cooking... This is
more a quick-slap fix than a proper solution, would expect it to work in
nearly all cases though...
2019-08-06 12:18:42 +02:00
785301e5ac Annotation: Simplify only 3D annotations and reduce factor
The old factor was too much and the lines could be changed. Anyway, when use simplify the number of points is reduced and the general shape is the same but not as smooth as original stroke.

Also, the simplify is only used in 3D view.

Note: Not sure if we would have to remove this simplify option for annotations.
2019-08-06 09:06:29 +02:00
bb53d2b07a Sequencer: frame offset feature usability
- Expose the operator in the panel,
  (wasn't available in the UI at all).
- Offset frame was hard coded to a color matching the background.
  Use the current frame color with dashes instead.
- Overlay toggle had wrong name.
2019-08-06 17:05:07 +10:00
1aabb0bfcf Cleanup: redundant const usage 2019-08-06 17:05:07 +10:00
85c3e12049 Fix T66100: WorkBench Banding Issues
Color banding issues can appear, as result of the 8 bitdepth RGBA that
is used in the viewport.

This change will use `GPU_RGBA16F` for final renderings and for drawing textures. This
allows displaying HDRI textures. Vertex Colors uses `GPU_RGBA16` to resolve
color banding issues. All other modes use `GPU_RGBA8` to reduce
bandwidth and gpu memory.

Reviewed By: fclem, brecht

Differential Revision: https://developer.blender.org/D5179
2019-08-06 08:34:39 +02:00
0394f2ab30 Fix T66671: Memory Leak Material Preview
During generating of a material preview with world lighting only the
copy world was being freed. The material was removed from the main, but
was not freed.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5224
2019-08-06 08:30:59 +02:00
694f9cb18c DrawManager: Fix Camera Images Interfere During Selection
When drawing the selection buffer the camera images were drawn. This
resulted in unneeded extra clicking for the user. This change will
ignore camera images during the selection.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5276
2019-08-06 08:26:43 +02:00
972c05537d Refactor Paint Overlay Opacity Panel
It is now possible to translate this panel. Due to the previous
structure the translation tools were not able to pick the strings up as
translatable strings.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5279
2019-08-06 08:20:56 +02:00
08717f4a2c Fix T67437: Vertex Colors Not Visible In SculptMode
Recently Shader parameter names for UVMaps and vertex colors were renamed.
The sculpt drawing code still used the old parameter names.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5320
2019-08-06 08:18:28 +02:00
4cdc5a12da UI: rename Border to Box Select
Missed in previous renaming commits.
2019-08-06 16:10:48 +10:00
95de738953 Fix T68283: Missing operator in graph context menu 2019-08-06 14:49:59 +10:00
dcbce4b924 Fix T6813: Dopesheet Editor: Moving keyframes by a number value doesn't work
It was a mistake to add the line `t->values_final[0] = t->values[0];`
2019-08-05 21:47:22 -03:00
cdeda1fa6c Fix T68272: Annotations segment fault when use Simplify option
This error was introduced with the array dynamic system for very long stroke.

Now, instead to use a custom code for simplify annotations, it uses the standard simplify BKE function more robust and with better results.

The factor of 0.15f has been set fixed after testing a good result value.
2019-08-05 20:52:10 +02:00
b4a325f535 Cleanup: use unsigned char for theme colors
Nearly all byte-color functions use 'uchar'
causing casts when then colors were passed in.

Declare as uchar to remove the need for casts.
2019-08-06 04:35:22 +10:00
17f299c5d1 Cleanup: quiet cast warnings in recent commit 2019-08-06 04:35:22 +10:00
ad417f73c0 New BLI Function: projmat_from_window_region
Creates a projection matrix for a small region of the viewport.

Reviewers: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D5412
2019-08-05 14:04:43 -03:00
0c4ee9e13d Fix T67665 "Affect Alpha" in Texture Paint mode doesn't work as expected
The "alpha lock" check was missing for the smear and soften brush.
Added checks to make sure that the alpha values are kept the same.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5416
2019-08-05 18:50:34 +02:00
9fe592ab8f Fix (unreported) transfer mesh data operator not enabling autosmooth.
When we transfer custom normals and allow for data creation, we should
also enable autosmooth on destination meshes.
2019-08-05 18:44:10 +02:00
64b092974c Cleanup/windows: Remove 32 bit support from make.bat helper script
This change removes 32 bit support from the helper make.bat scripts
as we are dropping official 32 bit support, you can still build for
32 bit by configuring your build yourself using cmake and pointing
the LIBDIR cmake variable to your own 32 bit library folder.
2019-08-05 10:31:51 -06:00
592759e3d6 Fix T68211: Transfer Mesh Data with Custom Normal crash when Auto Smooth is enabled.
Code in modifier stack ensuring requested CDLayers are provided was not
working very well for polynors in several cases:
* We cannot share the orig mesh if we have to generate pnors/lnors;
* Generating pnors without lnors was not possible.
2019-08-05 18:07:49 +02:00
52f83011c8 Fix T67259 : Auto depth not working with multires in sculpt mode
Basically the solution is to call `DRW_shgroup_call_sculpt` when `BKE_sculptsession_use_pbvh_draw(...)` is true.

Ref T67259

Reviewers: fclem, jbakker, brecht

Reviewed By: fclem, brecht

Maniphest Tasks: T67259

Differential Revision: https://developer.blender.org/D5396
2019-08-05 11:04:40 -03:00
58229b191a Fix T68145: Bone Rotate Individual Axes fail.
Rotation matrix would not get updated every time it would need to, after
own changes to handle 'big' rotations from keyboard input (rBcee484a4c51a3d2).
2019-08-05 15:47:28 +02:00
8f1a55831c Cycles: Fix wrong number of threads on multi-socket machines
The issue was caused by a limitation of GetNumaNodeProcessorMask():
on systems with more than 64 processors, this parameter is set to the
processor mask for the node only if the node is in the same processor
group as the calling thread. Otherwise, the parameter is set to zero.

Patch from Max Dmitrichenko, thanks!
2019-08-05 15:33:47 +02:00
afff94f09f Build: add ninja target to make wrapper
To use the ninja build tool which is typically faster than make, especially
for quick rebuilds.
2019-08-05 15:25:36 +02:00
2d60a54649 Build: add config for developers
This has faster builds, error checks and tests. The number of cmake options
for this type of thing has grown over the years and it's convenient to be
able to point new developers to a single target.

Previously the combination of all these options did not work correctly, now
all tests should pass.

The easiest way to use this is with the make wrapper, for example:
make full developer debug

Or set it manually with CMake:
cmake -C ../blender/build_files/cmake/config/blender_developer.cmake .

Differential Revision: https://developer.blender.org/D5149
2019-08-05 15:25:36 +02:00
47bf754de4 Build: disable address sanitizer for Cycles optimized kernels with GCC
It's extremely slow to compile and run, so just disable it unless
WITH_CYCLES_KERNEL_ASAN is manually enabled. For Clang it's always
enabled since that appears to work ok.

This also limits the -fno-sanitize=vptr flag to the Cycles kernel, as it
was added specifically to work around an issue there.

Differential Revision: https://developer.blender.org/D5404
2019-08-05 15:23:57 +02:00
916e51a407 PyRNA: support separators in enum-items lists
Resolves T68260
2019-08-05 23:10:44 +10:00
fa1d470692 GTest: test cases for polyfill2d bug T67109 2019-08-05 22:44:16 +10:00
e31a1c6fd3 Fix T67109: n-gon tessellation error with co-linear edges
Improve the area calculation method for better precision,
so faces offset from the center don't have a less precise area.
2019-08-05 22:43:23 +10:00
f9cf815160 ED_view3D: Remove and replace ED_view3d_select_id_read
It is very similar to `ED_view3d_select_id_read_rect`.
2019-08-05 09:30:55 -03:00
38d7e14dc8 Fix (unreported0 bad usage of do_versions_find_region() in versionning code.
When NULL pointer can be a valid return value, one has to use
`do_versions_find_region_or_null()` instead...

Fixes asserts as reported in rBa2fe386153e.
2019-08-05 14:24:44 +02:00
9620b8f6bb Cycles: Fix compilation on 32bit Linux with GCC-9
We don't use explicit SIMD flags on 32bit, so trying to use
intrinsics was causing issues.
2019-08-05 11:47:47 +02:00
94dce826a9 Text: only un-comment blocks which are completely commented
It's common to select a block of code and comment it
which may already contains some comments.

Now only un-comment blocks which are completely commented
(ignoring white-space).

Makes toggle comments behave more usefully, resolves T68060.
2019-08-05 15:53:27 +10:00
91fa07dfb1 Text: merge toggle comments into a single operator
This allows users to map comment/un-comment to be mapped to keys.
2019-08-05 13:54:27 +10:00
8b4f00269c UI: rename rotate to orbit for viewport sensitivity
Matches names of related preferences.
2019-08-05 13:15:36 +10:00
cd02fe5d70 Cleanup: remove underscore prefix for used vars
Also remove unused vars.
2019-08-05 12:47:55 +10:00
f69ea92599 Cleanup: add braces 2019-08-05 12:46:58 +10:00
9fbf522dd8 Cleanup: Fix eeve_lut arrays being duplicated in blender binary.
Both eevee_materials.c and workbench_deferred.c include eeve_lut.h which has its arrays marked as static leading to the blue_noise array being embedded into our binary twice.

This change takes the arrays out of the header and properly marks them as const since they are lookup tables and should not be written to.

Reviewers: fclem, brecht

Differential Revision: https://developer.blender.org/D5346
2019-08-04 14:32:53 -06:00
418fdee5dc Cleanup: Mark large arrays of of constant data as const.
For background information see D5345

Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D5345
2019-08-04 14:24:29 -06:00
37cef86f0d Fix: msgfmt add support for cr-lf style line endings
linux did not recognize cr as a valid character.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5337
2019-08-04 11:46:00 -06:00
Your Name
f08662d3ed Sculpting: Remove Show Diffuse Color Option
This should have been removed in 2.80 as the functionality was removed.
This feature now does not do anything and can be removed.

Differential Revision: https://developer.blender.org/D5411
2019-08-04 11:53:48 -04:00
47335b4e61 Add a new Copy As Driver context menu option for properties.
It is a very common need to create drivers that set the value of
a property to the value of some other property, but it currently
requires multiple actions: Copy Data Path on the input property,
adding a driver to the output property, selecting the input ID
reference, and pasting the path.

This adds a new Copy As Driver context menu option, which creates
a complete driver in the clipboard that reads the current property,
so all that remains is to paste it to the output property. It is
also possible to paste just the new driver variable into an existing
driver to combine multiple inputs.

Reviewers: brecht, billreynish

Differential Revision: https://developer.blender.org/D5382
2019-08-04 13:58:15 +03:00
a2fe386153 Text Editor UI
Tweak Text Editor to fit better with the rest of Blender 2.8:

  - Move sidebar to the right
  - Add proper context menu
  - Move view toggles to the View menu
  - Change the indentation option to be an enum between spaces and tabs
  - Several layout tweaks

Patch by @tintwotin / Peter Fog with additional tweaks by me.

Differential Revision https://developer.blender.org/D5028

Reviewers: Brecht, Campbell
2019-08-04 12:51:28 +02:00
c0aada58c9 Tweak Brush Gradient UI
Gradient and Color are mutually exclusive, so we now communicate this in the UI much more clearly

Differential Revision: https://developer.blender.org/D5395

Reviewers: brechrt
2019-08-04 12:37:22 +02:00
dd3cdf6f1e Fix T68202: GPencil Set Origin do not refresh until object is moved 2019-08-04 10:21:02 +02:00
18540f41d7 Cleanup: improve comments 2019-08-04 12:53:06 +10:00
2425401a59 Cleanup: spelling 2019-08-04 12:51:44 +10:00
Your Name
85a7cebd53 UI: Fix Small inconsistency in particle emission
This property was being called something
else depending on the distribution type
2019-08-03 16:22:04 -04:00
edcefb739a Cleanup: Fix build error with msvc
math.h does not define M_PI on windows, needs BLI_math_base.h to get them.

thanks to @quollism on chat for spotting it.
2019-08-03 10:47:35 -06:00
e82b7f1527 3D View: preferences for rotate sensitivity
Added because the current default is too fast
for painting with tablets, see D5385.

Turntable and trackball have different settings because
turn-table uses an angle-per-pixel, where as trackball
values are relative to the view-port size so a scale is used.

The sensitivity is scaled by the pixel size so hi-dpi views don't rotate faster.
2019-08-04 01:31:25 +10:00
27aef8b551 3D View: aspect correct trackball rotation
Hard coded aspect was used, doubling horizontal input
however this caused sliding for views which didn't match this aspect.

Calculate the aspect based on the view bounds instead.
2019-08-04 01:19:22 +10:00
7f8d620e20 Cleanup: trackball direction calculation
Remove z axis flipping, only needed because x & y were flipped.
2019-08-04 01:18:23 +10:00
5e5cf9ea9f Fix T68161: typo in ui_text of RNA scene.objects 2019-08-03 12:22:23 +02:00
3232fc335d Deps: Fix build error with theora on windows. 2019-08-02 13:29:29 -06:00
6de4123ebd GPencil: Replace Separate menu by operator Enum to display assigned key
As the operator was using a menu, the keymap was not displayed. Now, the operator is used directly and don't need the menu.
2019-08-02 21:24:00 +02:00
f7d5941faa Fix freestyle tests failing when using WITH_PYTHON_SAFETY 2019-08-02 19:53:59 +02:00
15e224dca3 Build: disable RTTI for the entire Cycles module, not only the kernel
The partial disabling was causing issues with Clang and ASAN, and it seems we
don't need to restrict it to the kernel anymore now that we are no longer using
boost directly.
2019-08-02 19:03:57 +02:00
a744fedc85 Fix T68129: Bridge edge loops fails on small edge loops 2019-08-03 02:52:30 +10:00
26d5fae284 Fix T68135: Do not return NULL/None when converting an object to a mesh.
Does not make sense in the use-cases of that function, especially since
we don't know whether it is actually due to an error, or some glitch
(like an empty curve).

Think we always want to get a mesh when using either operator
conversion, or the `bpy.data.meshes.new_from_object` function.

Note that an assert was also added to ensure we do try to convert from a
valid 'geometry' object type.
2019-08-02 18:24:59 +02:00
dda0de4a3d Fix address sanitizer overflow warnings for bit manipulation functions
Perform with unsigned int instead of signed int.

Differential Revision: https://developer.blender.org/D5402
2019-08-02 17:25:25 +02:00
256c412b31 Tests: also don't fail on memory leaks for gtests 2019-08-02 17:25:25 +02:00
5ba070ce53 DRW: Select Engine: Create DRWPass only when context requests it 2019-08-02 12:14:12 -03:00
454daf9b6b Upgrade Python from 3.7.0 to 3.7.4 2019-08-02 16:49:26 +02:00
53ae209d25 make deps: avoid running pdflatex as part of building Theora
On machines with pdflatex installed, this is run to build Theora.pdf.
Unfortunately this process breaks, at least on my Ubuntu 18.04 LTS
system. By setting `HAVE_PDFLATEX=no` (or any other value that is not
"yes") this can be avoided. I don't think that it's important to have
this PDF file built anyway, as it's not a dependency of Blender itself.
2019-08-02 16:49:26 +02:00
369ffbd911 Fix T68073: Wacom Intuos 5S no pen pressure on Wayland
The issue is that wayland seems to impose a generic device naming scheme
when using Xwayland For example any table stylus will show up with the
following naming convention: xwayland-stylus:33

For this to work in blender, I had to modify how the identifier string
is extracted. I also renamed the two char pointers in the search
algorithm to be more logical.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5401
2019-08-02 16:42:24 +02:00
455a1e210b Fix T68021: GPencil After using eraser when draw primitives, next primitive has missing handles
The problem was related to wrong Brush. After using the Eraser or Fill, the default brush was not the drawing one, so the handles were missing.

Now, the operator force the drawing brush.

Reviewer: @campbellbarton
Differential Revision: http://developer.blender.org/D5403
2019-08-02 16:25:49 +02:00
9198ff4306 Cleanup/Win: Fix build folder name if no target is set
When you call make.bat without a target the build folder name would
have a double underscore in it which looked odd.
2019-08-02 08:25:18 -06:00
630747ca66 Fix T66731: Translated texts remain original english (Tools' tips part).
This should fix all remaining issues reported in T66731 I think.
2019-08-02 16:20:06 +02:00
820522d514 Fix (unreported) missing/broken translations in Text space.
As a reminder, no new fancy python string formatting is just
not working (tm) with i18n translations system...
2019-08-02 16:20:06 +02:00
15b848ef60 Fix most (if not all) untranslated Panel-labels reported in T66731. 2019-08-02 16:20:06 +02:00
8936479f76 Cleanup/Win: Remove unused game engine variables in build helper scripts 2019-08-02 08:19:04 -06:00
e5a5d28c3e Fix T67670: Sculpt doesn't mark the file as modified
Was also an issue for texture & paint curve.
2019-08-03 00:12:55 +10:00
05226e1512 Fix T68122: Settings for Select root and Select tip in particle edit mode are missing
Do not hide the redo window for root/tip select anymore.
2019-08-02 16:03:26 +02:00
cb1b7e8a48 Cleanup: clang format
Strange, this was not applied automatically.
2019-08-02 11:00:49 -03:00
8fbe18dc8d DRW: Select Engine: Set uniform only once per ShadowGroup 2019-08-02 10:48:16 -03:00
ae7137cdf8 View3D Mesh Selection: Specify select_mode directly for Circle, Lasso and Box selection
No functional changes.
2019-08-02 10:48:16 -03:00
5f4e99b7a2 Fix broken add_python_test after recent changes 2019-08-02 15:45:01 +02:00
ab3de09591 Fix T68112: Align View on object add is broken
No need to use BKE_object_where_is_calc() in this case: there is no
parenting or constraint system involved on object add.

So simply use direct object matrix calculation from it's local
transform. No need in dependency graph either in this case.
2019-08-02 15:15:41 +02:00
5cf6d7e2b0 Fix edge selection ignoring clipping in wire-frame display 2019-08-02 23:01:19 +10:00
d8c6105366 Fix ignored window clipping test in foreach edge function 2019-08-02 22:54:17 +10:00
38ff5064b3 Tests: don't fail on leaks detected by leak sanitizer
These often happen in external libraries that we can't fix. The leaks are
still printed in the logs.
2019-08-02 14:42:25 +02:00
f4b0900856 Cleanup: refactor tests executing Blender to use add_blender_test function 2019-08-02 14:42:25 +02:00
22f17551e5 Fix scene units test failure after recent changes 2019-08-02 14:42:25 +02:00
b5807be437 Fix T68126: Cycles not enabled with factory settings 2019-08-02 13:04:10 +02:00
0c7a4c74d3 Cleanup: clang-format, also typo fix. 2019-08-02 20:04:45 +10:00
67e5422970 Fix text editor undo sync when mixed with other undo systems
Undo rewrite broke test_undo.text_editor_edit_mode_mix.

Relatively harmless since it's only out of sync by one action.
2019-08-02 19:48:08 +10:00
8949dd6cb6 Cleanup: correct name for scene frame conversion
Thanks to @sybren for pointing out issue from 299ff91ea1
2019-08-02 19:30:38 +10:00
a89ecd9617 Cleanup: GPencil dissolve operator now uses GP_EDITABLE_STROKES_BEGIN macro
This reduces the number of loops
2019-08-02 11:29:12 +02:00
cb6e3e82b0 GPencil: Make GP_EDITABLE_STROKES_BEGIN macro safe when stroke is removed
If the macro was used in a loop where the stroke was removed, the macro failed.
2019-08-02 11:29:11 +02:00
eb2a078f4d GPencil: New function to dissolve points in stroke
This function will be used for new operators.
2019-08-02 11:29:11 +02:00
b54528fa1e BrightContrast not working correctly with negative contrast
followup to rB8dd95abb2ff9 (which fixed this for the Compositor node),
turns out this was also wrong for the VSE modifier and in vertex color
operator.

- also adjust min/max for VSE modifier
- also guard against division by zero

Reviewers: brecht

Maniphest Tasks: T67808

Differential Revision: https://developer.blender.org/D5398
2019-08-02 10:09:29 +02:00
31da3936b4 GPencil: Add Frame parameter to modifier deformStroke Callback
This commit adds the frame to deformStroke Callback as a preparation for new modifiers that will need this variable.

Actually, the existing modifiers are not using the frame.
2019-08-02 09:50:33 +02:00
a897c8e342 Fix unreported: length measure displayed on the "Sequence Slide" operator panel 2019-08-02 01:49:49 -03:00
2074d850ee Docs: correct comment for PROP_THICK_WRAP 2019-08-02 14:32:17 +10:00
81dc76c19c Fix T63570: Proportional editing resets scaling along Y and Z axis on mouse wheel
`applyResize(...)` considers that `t->values` always represents a `ratio`.
But this is only `true` with the `MOUSEMOVE` event.
The solution proposed is to never change `t->values`.
The result of the final transformation is now written to `t->values_final`.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D5212
2019-08-02 01:15:33 -03:00
14b2c41216 Cleanup: doxy sections 2019-08-02 12:30:57 +10:00
c060a835bb Fix unreported: Selection of mesh_cage element occluded by the mesh_cage itself.
The right thing is to be occluded by the visible mesh (in the case with modifiers).
2019-08-01 23:19:00 -03:00
58a2b2dd7e Cleanup: spelling 2019-08-02 12:05:13 +10:00
9be956c326 Cleanup: unused variable 2019-08-02 12:05:13 +10:00
53a0916636 DRW: Select Engine: Add a utility to detect select_node 2019-08-01 23:00:34 -03:00
65b6d4a34d Edit Mesh Select: Remove redundant and deprecated FAKE_SELECT_MODE_... 2019-08-01 23:00:34 -03:00
eff91da4df DRW: Select Engine: Use specified offset.
Due to current uses, this does not bring functional changes.
2019-08-01 23:00:34 -03:00
abebb27644 DRW: Select Engine: remove unnecessary DRWShadingGroup creations 2019-08-01 23:00:34 -03:00
ec131e2d53 Object Mode: add back non '_ex' versions of mode-switching functions
While these aren't currently used, its strange to have
extended versions of a function without the non-extended versions
it also avoids callers needing to add them back if they need -
or duplicating the same boiler plate when calling the '_ex' versions.

Reverts 11da3b132a, 11da3b132a, adds depsgraph argument
so the caller is responsible for the evaluation state.
2019-08-02 11:44:01 +10:00
7a47c0031f Cleanup: quiet maybe-unused warnings
While harmless, use flow control that always sets the variable.
2019-08-02 11:44:01 +10:00
7f9b1fe73c Cleanup: quiet maybe-unused warning
While harmless, use flow control that always sets the variable.
2019-08-02 11:21:22 +10:00
cfaef2db30 Cleanup: padding in windowmanager 2019-08-01 18:32:12 -06:00
066a7173c0 Keymap: add fractional zoom shortcuts for sequencer preview
Matches shortcuts from the image editor.

D5341 by @tintwotin
2019-08-02 08:36:03 +10:00
f66b5edf98 VSE: Use sequencer boundbox for view_all operator
Fix T67279
Fix T59954

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5368
2019-08-01 12:43:46 -07:00
2c4dfbb002 Fix T66028: Move sequence, movieclip and text editor progressbars to status bar
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5219
2019-08-01 12:42:01 -07:00
aa0322524e GPU: more complete coverage of drivers for Intel shader compilation workaround 2019-08-01 21:11:28 +02:00
80123efc5f Fix T67939: GPencil Noise modifier wrong random calculation
There were several problems in the old random calculation:

* Different result in the viewport and render.
* Noise "pop" in some frames. 
* Random number was calculated every time the file was opened, so get different results.

Now, instead to calculate the random numbers when n number of frames changed, the random values are calculated using a unique seed by stroke.

Also, a new Seed parameter has been added and this adds more control in the noise generated. This value can be animated and get more variations.

Differential Revision: http://developer.blender.org/D5393
2019-08-01 18:07:57 +02:00
49b2162309 Cleanup: remove unnecessary include 2019-08-01 11:31:25 -03:00
895201808c Fix T66040: Make Data Transfer' Mix Factor multiply with vgroup weights when given, instead of ignoring it.
Brings behavior of those options in line with the VGroup editing
modifiers ones e.g.
2019-08-01 16:01:50 +02:00
21c039f6ef Alembic: fix heap-use-after-free error
The mesh can be freed by BKE_mesh_nomain_to_mesh(), so we need to get
the `ME_AUTOSMOOTH` flag before that call, and not after.
2019-08-01 15:14:57 +02:00
2741992f66 Fix T61935: load camera transforms from Alembic files written by Meshroom
Meshroom writes two hierarchies to Alembic, one rooted at
`/mvgRoot/mvgCameras` and the other at `/mvgRoot/mvgCamerasUndefined`.
These paths have no schema definition, and thus are ignored by Blender.
The cameras themselves have those schemaless paths as parent, and have
their transforms marked as "inherited", e.g. relative to their parent.
As these cameras have no valid parent, there is no Blender object to use
to convert their local matrices to world matrices, and Blender just
decided to reset them to the unit matrix.

Now "inherited" transforms without a parent in Blender are interpreted
as world transforms. Reparenting those objects to a Blender object will
re-interpret the transforms as local to the parent again.
2019-08-01 14:54:22 +02:00
08a6321501 FFmpeg pixel format conversion improvements
FFmpeg expects Blender to feed it pixels in the output pixel format. If
the output pixel format is different than Blender's RGBA, a conversion
is needed (via FFmpeg's `sws_scale()` function). There were a few issues
with this conversion (and surrounding code) that are fixed in this
commit:

- When conversion was necessary a temporary buffer was allocated and
  deallocated for every frame. This is now allocated once and re-used.
- Copying data to the buffer was done byte-for-byte. On little-endian
  machines it is now done line-by-line using `memcpy` for a little speedup.
- The decision whether pixel format conversion is necessary is now
  correctly done based on the pixel format Blender is actually using.
- The pixel format of the buffer sent to FFmpeg is no longer hard-coded
  incorrectly to a fixed pixel format, but uses the actual output pixel
  format. This is fixes T53058 properly, making RGB QTRLE export possible.
- I added some comments to make it clear which pixel format is referred
  to (either Blender's internal format or the FFmpeg output format).

Combined these improvements not only correct a bug (T53058) but also
results in approximately 5% speed improvement (tested with a 117-frame
shot from Spring, loaded as PNGs in the VSE, encoding to h.264 with
preset 'realtime').

Reviewed By: brecht, sergey

Differential Revision: https://developer.blender.org/D5174
2019-08-01 13:37:48 +02:00
eb7fe7546c Fix T68055: mesh selection issues, once blend is loaded second time in a Blender session
The depth attachment of the framebuffer was missing.
2019-08-01 08:30:57 -03:00
6786c336bd Added FFmpeg preset for WebM + VP9 video + Opus audio
This is a standard combination (VP9 video, Opus audio, in WebM container),
so it's nice to have as a preset.
2019-08-01 12:53:11 +02:00
4cbcbacc6a I18n messages extraction: do not report multi-lines messages anymore.
Those are now supported for tooltips.
2019-08-01 12:52:52 +02:00
4b37abd61f Cleanup a bit i18n message extraction code. 2019-08-01 12:52:52 +02:00
5fde4494f6 Keymap: use Ctrl-/ to toggle comments
Consistent with many code editors, see: D5175
2019-08-01 20:32:25 +10:00
433eb3f35d Text: toggle comment operator 2019-08-01 20:31:57 +10:00
3a47fbfac5 Cleanup: quiet gcc warning 'alloc-size-larger-than' 2019-08-01 20:28:39 +10:00
7c5838cfd6 Cleanup: use doxy sections for text operators 2019-08-01 19:27:59 +10:00
765ed6ffb9 Fix T68036: VSE: 'Remove Gaps' causes audio to go out of sync
Reviewers: sergey

Maniphest Tasks: T68036

Differential Revision: https://developer.blender.org/D5391
2019-08-01 11:22:46 +02:00
eb0902243e Linux: resolve issue compiling on mint 18.3
size_t wasn't declared. While this could be resolved differently,
convention is to include BKE after BLI.
2019-08-01 19:17:22 +10:00
b5b0804c5a Cleanup: use _ex suffix instead of _ext
Convention is to use ex, not ext for extended
versions of a functions.
2019-08-01 18:39:21 +10:00
502c2c233d Cleanup: misc spelling fixes in variable names & defines
T68045 by @luzpaz
2019-08-01 17:35:59 +10:00
46c22f33b2 Cleanup: remove redundant LMB select default. 2019-08-01 17:23:58 +10:00
d1848b80f1 Fix error setting the user preferences
User preferences from the startup.blend was still being used,
fixing this exposed missing theme initialization, now fixed.
2019-08-01 17:23:41 +10:00
036312ecff Fix error de-duplicating BLI_file_read functions
Own error in recent code de-duplication: a345f56ce3
causing issues on Windows.

Flipped argument for reading the exact size.
2019-08-01 16:14:54 +10:00
760dbd1cbf Cleanup: misc spelling fixes
T68035 by @luzpaz
2019-08-01 14:02:41 +10:00
135413e324 Cleanup/msvc: Remove math.h from creator_signals.c
Was never needed, looks like it was copy/pasted from creator.c

spotted by @campbellbarton
2019-07-31 21:36:52 -06:00
fc982c102b Cleanup: Remove FMA3 Disable for msvc
We no longer build with or support msvc2013, so this hack can be removed.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5298
2019-07-31 20:18:44 -06:00
421280a3f7 Cleanup: remove unused member 2019-07-31 22:46:41 -03:00
2b99faed52 Cleanup: move defaults into U_default struct 2019-08-01 10:03:20 +10:00
1ec1797d35 Cleanup: remove unused compute-id from preferences 2019-08-01 09:08:43 +10:00
059d61ae9d Cleanup: use braces, unused variable, unused enum 2019-08-01 09:03:50 +10:00
d8fb63661b Fix T67951: Bone selection is broken on some Intel GPUs
The problem is that the `glDrawArraysInstancedBaseInstance` is ignoring the last parameter.
The solution is to indicate that `GLEW_ARB_base_instance` is not supported in these cases.

Reviewers: fclem, brecht, jbakker

Reviewed By: fclem, brecht

Differential Revision: https://developer.blender.org/D5383
2019-07-31 16:36:18 -03:00
ea3690e329 Fix several undefined-behaviour-sanitizer warnings
Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4222
2019-07-31 12:24:34 -07:00
77d7cc9ba7 UI: Correct Spacing for Short Unit Names
This adds a space between a value and its short unit name except for foot, inch, degree, arcminute, arcsecond

Differential Revision: https://developer.blender.org/D5051

Reviewed by Brecht Van Lommel
2019-07-31 12:17:33 -07:00
a2f357edc2 Add operator for removing unused material slots
Reviewers: campbellbarton, brecht

Reviewed By: brecht

Subscribers: brecht

Differential Revision: https://developer.blender.org/D4991
2019-07-31 12:08:18 -07:00
feed46c4ae Merge per-shader SVM nodes in the main update thread to avoid locking and resizing overhead
In a test file containing 1300 copies of the same shader, this reduces shader update time from 3.1 sec to 0.05 sec.

Thanks to @swerner for noticing this issue.

Reviewers: brecht, sergey, swerner

Subscribers: swerner

Differential Revision: https://developer.blender.org/D5376
2019-07-31 12:03:45 -07:00
c72f6b713f Fix T66785: Blender Menu As Text When Main Menu Collapsed
This makes the blender logo menu appear as text if 'Show Menus' is off

Differential Revision: https://developer.blender.org/D5244

Reviewed by Brecht Van Lommel
2019-07-31 11:38:55 -07:00
881675dff1 Clarify in FloatProperty generated docs: single precision floats.
At least one script writer was upset that this was not specified,
as it is different from "floating point" in Python.
Also, docstring for hard and soft min and max for FloatProperty
was wrong, using sys.float_info.min and sys.float_info.max.
2019-07-31 14:01:42 -04:00
f7c13f2d76 Revert "UI: remove checks for other popovers when switching menu"
This reverts commit 7761657129.

This commit broke overlapping popovers. For example in the color
management tab it would be impossible to select and of the popover
alternatives as it would switch to the menu button under the cursor.
2019-07-31 19:16:47 +02:00
81d4cf5f5a Fix build error after recent cleanup 2019-07-31 18:57:55 +02:00
6bda1fbd2e Cleanup: typo in parameter name in function declarations. 2019-07-31 18:47:26 +02:00
Habib Gahbiche
ffda674893 Fix: test object_modifier_array is passing when it shouldn't.
From D5253.
2019-07-31 18:31:15 +02:00
4c12764a7f Fix negative boolean
Was a nice looking invention, but is obviously wrong.

Is likely no function changes, since -false is like -0
which is 0 and which false. And -true is like -<non-zero> which
is non-zero as well.

Spotted by Sybren, thanks!
2019-07-31 18:21:08 +02:00
bcda8cc89b Fix T65837: "Zoom Axis" is not working on the node editor
We would not take into account the user "Zoom Axis" setting in certain
2D space viewports.  In addition to this, the "Scale Zoom" didn't work
consistently in these spaces either.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5132
2019-07-31 18:16:37 +02:00
0516d49d0c Fix T63921: Unable to use confirm on release for keyboard shortcuts
The first issue was that we were still working around a Xorg bug that
has been solved since a very long time:

https://bugs.freedesktop.org/show_bug.cgi?id=22515

The second issue was that the global "confirm on release for mouse
clicks" was used for keyboard shortcuts as well.
2019-07-31 18:01:28 +02:00
e34587922c Cleanup: remove unused boost code 2019-07-31 17:52:07 +02:00
92a3995c6d Fix T67999: calling obj.data.materials.clear() crashes Blender
The `BKE_material_clear_id()` didn't call `test_all_objects_materials()`,
which caused the object and mesh material slot count to go out of sync.
2019-07-31 17:18:21 +02:00
3566b81c8b Refactor access to dependency graph
This change ensures that operators which needs access to evaluated data
first makes sure there is a dependency graph.

Other accesses to the dependency graph made it more explicit about
whether they just need a valid dependency graph pointer or whether they
expect the graph to be already evaluated.

This replaces OPTYPE_USE_EVAL_DATA which is now removed.

Some general rules about usage of accessors:

- Drawing is expected to happen from a fully evaluated dependency graph.
  There is now a function to access it, which will in the future control
  that dependency graph is actually evaluated.

  This check is not yet done because there are some things to be taken
  care about first: for example, post-update hooks might leave scene in
  a state where something is still tagged for update.

- All operators which needs to access evaluated state must use
  CTX_data_ensure_evaluated_depsgraph().

  This function replaces OPTYPE_USE_EVAL_DATA.

  The call is generally to be done in the very beginning of the
  operator, prior other logic (unless this is some comprehensive
  operator which might or might not need access to an evaluated state).

  This call is never to be used from a loop.

  If some utility function requires evaluated state of dependency graph
  the graph is to be passed as an explicit argument. This way it is
  clear that no evaluation happens in a loop or something like this.

- All cases which needs to know dependency graph pointer, but which
  doesn't want to actually evaluate it can use old-style function
  CTX_data_depsgraph_pointer(), assuming that underlying code will
  ensure dependency graph is evaluated prior to accessing it.

- The new functions are replacing OPTYPE_USE_EVAL_DATA, so now it is
  explicit and local about where dependency graph is being ensured.

This commit also contains some fixes of wrong usage of evaluation
functions on original objects. Ideally should be split out, but in
reality with all the APIs being renamed is quite tricky.

Fixes T67454: Blender crash on rapid undo and select

Speculation here is that sometimes undo and selection operators are
sometimes handled in the same event loop iteration, which leaves
non-evaluated dependency graph.

Fixes T67973: Crash on Fix Deforms operator
Fixes T67902: Crash when undo a loop cut

Reviewers: brecht

Reviewed By: brecht

Subscribers: lichtwerk

Maniphest Tasks: T67454

Differential Revision: https://developer.blender.org/D5343
2019-07-31 16:55:15 +02:00
f5f3003874 Fix: build error with MSVC
Reviewed By: Brecht

Differential Revision: https://developer.blender.org/D5381
2019-07-31 08:45:41 -06:00
0b2cb96725 Depsgraph: Fix wrong check for need-to-be-evaluated
Was missing since 1693a5efe9.
2019-07-31 16:40:10 +02:00
96843ae85c Fix T67883: Time Remapping doesn't work
Was caused by 1693a5efe9.
2019-07-31 16:40:10 +02:00
bc42092a7d Fix T67597: Texture painting: Texture slots that correspond to nodes inside node_groups don't remain active
Unlike `fill_texpaint_slots_recursive`, `rna_Material_active_paint_texture_index_update` did not search for texture nodes that are inside node groups.

Reviewers: sergey, psy-fi, zeddb, brecht

Subscribers: brecht

Differential Revision: https://developer.blender.org/D5338
2019-07-31 11:39:30 -03:00
8dd95abb2f Fix T67808: Bright/Contrast node wrong for negative contrast
strange nobody noticed since 2012...

thx @jenkm for spotting

Reviewers: brecht

Subscribers: jenkm

Maniphest Tasks: T67808

Differential Revision: https://developer.blender.org/D5378
2019-07-31 16:29:51 +02:00
Alessio Monti di Sopra
200c9f37d6 Fix T67573: Missing offset in marker names on current frame
Differential Revision: https://developer.blender.org/D5333
2019-07-31 16:18:10 +02:00
fb03a86b1b Have CMake be more strict when optional x11 libraries are missing but enabled
Previously cmake would silently disable features that depended on
certain x11 libraries if they were not found. Now we instead error out
and inform the user that these are missing but optional.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5380
2019-07-31 16:18:17 +02:00
b0531227d4 Fix T68001: Rotating vertices on the UV map by a fixed number immediately crashes Blender.
Spaghetti Transform code can use same code for different kind of data.
The 'stepped rotation' process is actually only useful/doable in a few
cases (when we do have some real place to store rotation value, and we
are using Eulers).
2019-07-31 16:14:34 +02:00
03be31e817 Cleanup: Remove unused function 2019-07-31 15:42:42 +02:00
4328b56980 Fix T66031: Text Material Change broken.
font_to_curve code was not handling properly the case where it has nop
object to check for mat indices validity. Check should just not happen
then, not reset mat indices of chars to default 0 value.
2019-07-31 15:38:01 +02:00
8b1041d510 Fix Visual Studio compatibility in writeffmpeg.c
This fixes an incompatibility with Visual Studio 2019 introduced in
631d5026c7. It is likely caused by using
`#  ifdef` inside the use of the `ELEM()` macro.
2019-07-31 15:26:29 +02:00
64e029ea92 Animation: Remove depsgraph argument from a lot of API
Use explicit boolean flag to indicate whether flush to original data
is needed or not. Makes it possible to avoid confusion on whether an
evaluated or any depsgraph can be passed to the API.

Allows to remove depsgraph from bAnimContext as well.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5379
2019-07-31 15:11:38 +02:00
9c0e7f7dd6 Animation: Remove depsgraph argument from direct keyframing
It was used to access evaluated object and pose and was done prior
to implementation of flushing values back to original data for an
active dependency graph.

Removing the argument allows to simplify API and solve issues with
accessing missing dependency graph on redo.
2019-07-31 15:10:49 +02:00
0d3493d6d9 Fix: Cycles reporting incorrect number of samples in viewport render
During viewport rendering where the viewport samples are set to 0 the UI
showed 16777216 as number of samples. We should not show the number of
samples when the number of viewport samples are set to 0.

Differential Revision: https://developer.blender.org/D5301
2019-07-31 14:32:41 +02:00
604fdb6e85 Spelling fixes in comments and descriptions, patch by luzpaz
Differential Revision: https://developer.blender.org/D3744
2019-07-31 14:27:35 +02:00
136a7a7fe8 Fix error in user preferences commit
Add include & initialize variable.
2019-07-31 22:25:49 +10:00
0272b7c814 Fix T67652: editing UV vertex location does not work with multiple objects
Patch contributed by matc.

Differential Revision: https://developer.blender.org/D5355
2019-07-31 14:03:33 +02:00
f7adb78828 Cleanup: remove BLO_update_defaults_userpref_blend
Merge into BKE_blendfile_userdef_from_defaults
2019-07-31 21:52:42 +10:00
07499c04f6 Preferences: don't store preferences in the startup
Simplify preferences by removing the ability to load them from
either the startup.blend or userpref.blend.

Also simplifies updating default preferences by moving
them to a struct definition.
2019-07-31 21:36:12 +10:00
86029b5071 UI: tweak naming in snapping popover to be "Snap with" and "Snap to"
To replace "Target" and "Snapping", this should be more clear.

Differential Revision: https://developer.blender.org/D5242
2019-07-31 13:11:38 +02:00
4bb9fbd3a8 Sculpt/Paint: Brush curve presets
This patch introduces the same presets that are used for proportional editing in the brush falloff menu. The user can select any of these presets or use the regular custom falloff curve. The presets are hardcoded formulas, so the falloff curve is not used when they are active.

This change improves the general feeling of the brushes and it is more convenient and simpler to use. The CUSTOM curve option should now be used in the case that an unusual deformation is needed, in other cases, the hardcoded curve presets should be the default.

The smooth curve presets is a must in the grab brush, as it fixes the deformation issue with the current custom curve setting. The user may try to adjust the deformation by tweaking the curve, but it is nearly impossible to replicate this desired behavior.

{F7636217}

Other brushes that are included in the sculpt branch also rely on this as they need specific hardcoded falloffs to produce the desired effect.

Reviewers: brecht, billreynish

Reviewed By: brecht

Subscribers: JulienKaspar

Differential Revision: https://developer.blender.org/D5367
2019-07-31 13:04:55 +02:00
03f652b2c1 FIx T66019: Text cutoffs for descriptions in keyframe insertion (keyingsets). 2019-07-31 12:30:03 +02:00
6d2f9b1dfa Added BKE_mesh_clear_geometry() function
This function makes it possible to clear/remove/nuke all the geometry in
a mesh, allowing functions like `Mesh.from_python()` to construct a new
mesh in its place. Without this function, code like in T67627 have to
allocate a new Mesh datablock, fill that, and swap out the old Mesh for
the new one. This introduces issues when exporting, as the new mesh
could be seen by an exporter as unrelated to the old one.

Shape keys are not freed by this function. Freeing those would require
tagging the depsgraph for relations update, which is an expensive
operation. They should be removed explicitly if necessary.

Material slots are also not cleared by this function, in the same way
that they are not cleared when manually removing all geometry from a
mesh.

The `BKE_mesh_clear_geometry()` function is available in Python as
`mesh.clear_geometry()`.

Reviewed by: mont29, brecht

Differential Revision: https://developer.blender.org/D5373
2019-07-31 12:23:56 +02:00
e51067505b Cleanup: Use explicit forward declaration 2019-07-31 11:58:53 +02:00
7761657129 UI: remove checks for other popovers when switching menu
I'm unable to redo the original report,
Revert fix for T43247..
2019-07-31 19:50:13 +10:00
94b81d51a6 UI: simplify check for active menu button
Dragging to select another popup now checks the menus active button.
2019-07-31 19:50:13 +10:00
ce0582ee2b Particle: Cleanup, remove unused depsgraph argument 2019-07-31 11:51:38 +02:00
11da3b132a Cleanup: Remove unused functions 2019-07-31 11:46:45 +02:00
2ddfd51810 FFmpeg: Added support for writing Opus audio.
This audio format is often used in conjunction with VP9 video in a WebM
container. Opus was created with the intention to replace Vorbis and
Speex ([source](https://en.wikipedia.org/wiki/Opus_(audio_format))).

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5156
2019-07-31 11:28:48 +02:00
ca0b5529d0 FFmpeg: Added writing of WebM containers
This commit adds support for the WebM container. Previously we only
supported the WebM/VP9 video codec, but still required that it was
stored in a Matroska, MP4, or other compatible container format.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5156
2019-07-31 11:28:38 +02:00
43b7512a59 FFmpeg: Added support for writing alpha values in WebM/VP9 video
The VP9 video codec supports writing alpha values; now this is available
in Blender too.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5156
2019-07-31 11:28:36 +02:00
631d5026c7 Cleanup: Simplification of BKE_ffmpeg_alpha_channel_is_supported()
Simplified `BKE_ffmpeg_alpha_channel_is_supported()` to use `ELEM()`
instead of a row consecutive `if`-statements.

No functional changes.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5156
2019-07-31 11:28:33 +02:00
af4dcc6073 DRW manager: select engine: create generic draw_select_id_mesh 2019-07-30 20:47:18 -03:00
43ec8d7ae9 Cleanup: Rearrange Select Engine into multiple files 2019-07-30 20:47:18 -03:00
5359b7a033 cleanup: Fix typo in last commit
Accidentally took the C flags as a base.
2019-07-30 14:50:53 -06:00
19b72f50d7 CMake/Windows: Enable JMC on compilers that support it.
JMC [1] enables more productive debugging of C++ code in visual studio
this change enables it on debug builds for builds with visual studio 15.8
or higher.

[1] https://devblogs.microsoft.com/cppblog/announcing-jmc-stepping-in-visual-studio/
2019-07-30 14:40:05 -06:00
fe47c7bf84 DRW manager: select engine: remove redundant calls 2019-07-30 16:32:08 -03:00
34b3a9583a Cmake/windows: Fix vcpkg bypassing our libs folder.
Occasionally we get reports of people that build blender and end up
with either build errors or end up with builds that do not run on
other systems. The root cause is when you install vpckg and integrate
it into the build system it puts the search path for its includes and
libraries before anything else.

previously we told people to either uninstall vcpkg or remove the
conflicting packages, which was not great.

this change opts out of the use of vcpkg for blender only, so people
can keep using it for other work without issues.
2019-07-30 11:46:13 -06:00
9d7a03ab11 Fix T67939: GPencil Noise modifier step is ignored in render
The value of the step was calculated using a variable that was removed when the render frame change.

Now, the step is calculated using the modulus of the current frame and recalculate noise only if the remainder that results from performing integer division is equal to 0.

To calculate current frame, the first used frame is calculated to adjust real frame range.

This approach is more stable in viewport and render.
2019-07-30 19:43:17 +02:00
28bd15cdf0 Fix snap package to work with 2.80 version number
Without this it rounds to 2.8.
2019-07-30 18:11:42 +02:00
7f29fc7415 Fix T65691: GPencil Drawing long strokes turn invisible
There was a fixed limit to the number of points available in a buffer stroke.

Now, the array is expanded as needed using a predefined number of points for each expansion, instead to add one by one. This is done to reduce the number of times the memory allocation is required.

As part of the fix, some variables have been renamed to reflect better their use.
2019-07-30 17:11:56 +02:00
f69e57a53f Alembic export: fix exporting of loop normals
When the mesh is using custom normals, those should always be exported,
regardless of the `ME_SMOOTH` flag on the invidivual polys.

Also replaced the loop normal writing with the same logic as we use for
reading (less pointer arithmetic, more normal counting).
2019-07-30 17:06:47 +02:00
e9c149d911 Alembic import: load face-varying normals
Loop normals are called 'Face-varying normals' in Alembic. Before this
commit, the existence of such normals was used to enable smooth shading.
This is incorrect, as the normals could encode flat faces just as well.

This commit adds the loading of these normals as custom loop normals. It
then also enables Auto-Smoothing on the mesh (which is a bit of a
misnomer and indicates to Blender that the custom normals should be
used).

Fixes the glitching described in T65959.

Differential Revision: https://developer.blender.org/D5191
2019-07-30 17:06:47 +02:00
dde978d149 Cleanup: Alembic: renamed 'smooth_normals' to 'export_loop_normals'
The name now indicates what happens when the variable is set to true.

No functional changes.
2019-07-30 16:59:10 +02:00
e74847e6bb Alembic: changed 'void *user_data' to 'Mesh *mesh'
The only thing that is stored in this pointer is a `Mesh*`, and casting
it from/to `void*` is unnecessary and confusing. Maybe the entire
CDStreamConfig class could/should be removed at some point.

No functional changes.
2019-07-30 16:59:10 +02:00
3568d56bcc Alembic: transformed chain-of-ifs into switch statement
By having a switch statement that lists all the values of the enum, it is
clear which cases we're not handling, and it also allows for warnings in
the future when the enum expands.

No functional changes.
2019-07-30 16:59:10 +02:00
d65a4b5990 Alembic: use r_ prefix for return variables
No functional changes.
2019-07-30 16:59:10 +02:00
7f552be7d1 Alembic: removal of always-zero parameter
The `poly_start` parameter was always 0, so adding it to a poly index
from Alembic is a no-op.

No functional changes.
2019-07-30 16:59:10 +02:00
0dece50667 Fix T65717: Alembic (camera - also mesh) import scale issue
The w-component of the translation column of the scaled matrix wasn't
set to 1.0, which, apart from being incorrect, caused drawing problems.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5290
2019-07-30 16:55:29 +02:00
406e960327 Fix T67904: GPencil clone brush doesn't copy the right color and layer
When using the clone brush, the first time the brush worked, but the next time no. The reasons were two:

1) The strokes were copied to the active layer, but if there were more than one layer, the stroke must be copied to the original layer.

2) The materials were not assigned properly and the materials were set as the first slot in the list always.

Now, the original layer name is used to try to find the same layer in destination. If the layer is missing, the active layer is used.

For materials, the bug in the hash lookup is fixed and the material is assigned to the right slot.
2019-07-30 16:51:37 +02:00
77cc69d66f Fix T67460: Vertex painting: Sampling color opens empty options window in viewport
The issue was that the redo panel area would call with region type HUD (not WINDOW).
Now we make sure that the redo panel always polls the operator in the original area type context.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5361
2019-07-30 16:01:51 +02:00
d87fb0356a Make 3d projpaint iteration lockless.
While speedup is hard to detect (highly fluctuent), it seems to be
around 5% on average on my 8 threads machine...

It also remove usage of a 'global' thread lock, which is always good.

Note that I also tried to use proper foreach threaded iterator construct
(see D5372), but that proved to be relatively slower (presumably due to
the very high dissymmetry between tasks, usually during a paint stroke
only a few chunks will require most of the computing effort, overhead of
threaded foreach management is then noticeable).

This concludes (for now) the work on
T51133 Bad performance with texture painting depending on multi-thread settings.
2019-07-30 15:42:16 +02:00
363dd97ae8 Fix T67370 Normal Tools(Alt +N), copy and paste not work
The copy operator requried at least a vert AND a face to be selected.
It should only require that a vert OR a face is selected.
2019-07-30 15:41:19 +02:00
5f405728bb BLI_task: Cleanup: rename some structs to make them more generic.
TLS and Settings can be used by other types of parallel 'for loops', so
removing 'Range' from their names.

No functional changes expected here.
2019-07-30 14:56:47 +02:00
b9c257019f BLI_task: tweak default chunk size for BLI_task_parallel_range().
Previously we were setting it to 1 (aka no 'chunking'), to follow
previous behavior. However, this is far from optimal, especially with
CPUs that can have tens of threads nowadays.

Now taking an heuristic approach (inspired from the one already existing
for `BLI_task_parallel_listbase()`, which tries to guesstimate best
chunk sizes based on several factors (amount of threads/parallel tasks,
total number of items, ...).

Think this is a reasonable base ground, more optimization here would of
course be possible.

Note that code that was already explicitely settings some value here
won't be affected at all by that change.
2019-07-30 14:36:59 +02:00
ae7db53744 Fix T66629: Library override - fails when armature and mesh are in separate collections.
Some ugly very low-level collection code was using the generic
LIB_TAG_DOIT tag... should never happen, that one is for rather
high-level code to use, core process shall use own tags.
2019-07-30 14:25:41 +02:00
cee484a4c5 Fix T67067: Wrong rotation input values when using shortcuts on keyboard like rx720.
This allows to type in numinput 720 and indeed get a rotation of 720°, not 0°...

This patch basically applies 'big rotations' in steps < 180°, such that
compatible rotation works as expected. This implies resetting current
rotation to initial one first, otherwise we'd end up applying much more
turns than expected when that code is called more than once.

It also makes things somewhat slower for big rotations (millions of degrees),
Hence we clamp to 1000 turns max.

And since that's a case that cannot happen with regular tool/widget-driven rotation,
it's only enabled when numinput is used for now.

Review task: https://developer.blender.org/D5289
2019-07-30 14:25:41 +02:00
b9718299ea Fix crash clicking in the 3D view on startup
Setting the 3D view cursor on startup could crash because the
viewport hasn't been assigned to the region.
2019-07-30 21:43:40 +10:00
51be0a765e Tracking: Fix wrong usage of draw buffers
Curve drawing was attempting to draw reprojection error curve when it was
not visible.

Worst thing is that the imm was not informed about vertices, so the code
was causing an assert in debug mode. Probably, it is also what have caused
random crashes after recent changes.
2019-07-30 13:00:22 +02:00
edb3b7a323 Fix T67274: Graph Editor Normalization broken by Keyframe that uses Easing or Dynamic interpolation
We didn't include and of the newer interpolation types in the
normalization function.
Besides taking into account these newer types, we now also only evaluate
the curves when needed. If the values between the control points won't
exceed the control point values, we only use the start/end values for
our normalization

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5365
2019-07-30 12:25:39 +02:00
5662a5969b Particle: Fix incorrect access to evaluated mesh
Mesh can not be requested from original object, and it can not be
copied into evaluated modifier because there is no such a thing yet.

It can not be done this way now, because getting evaluated object
will force it to re-calculate, which kind of defeats idea of this
code to preserve un-baked particles.
2019-07-30 11:57:33 +02:00
651d8bfd98 3D View: Move selection API to a Selection engine.
This commit moves the API of selecting faces, vertices and edges to a DRW manager engine.

Reviewers: campbellbarton, fclem

Subscribers: jbakker, brecht

Differential Revision: https://developer.blender.org/D5090
2019-07-30 06:46:59 -03:00
a85963bed8 Fix T67906: empty menus for hooks if non-hook modifiers are present 2019-07-30 11:30:13 +02:00
db0782e946 Py node shader wrapper: Add clamping to official min/max values.
Taking values from relevant node definition C file...

Related to T67889.
2019-07-30 11:24:10 +02:00
286c921c25 Tracking: Fix crash happening after removing object 2019-07-30 11:11:54 +02:00
58b554c7a4 Fix T66591: GPencil layer visibility control via driver doesn't work 2019-07-30 10:27:13 +02:00
6fa47f656e Fix T67882: buttons are interrupt drag actions 2019-07-30 17:39:06 +10:00
d2063f7bc3 Fix edit-mode interfering with brush swap color
D5353 by @robert-wallis
2019-07-30 15:37:45 +10:00
369b574fd5 UI: add use_button option to popovers
This is useful when popovers are launched from operators
instead of as button popover types.
Where the connection between the button and the popover is useful to keep.
2019-07-30 10:57:47 +10:00
a345f56ce3 Cleanup: de-duplicate file reading code
Also remove goto's.
2019-07-30 10:43:07 +10:00
f1516ae637 Cleanup: check is_startup parameters instead of the path 2019-07-30 10:41:34 +10:00
0a2fd63383 Cleanup: replace unused return defines with bool 2019-07-30 10:31:27 +10:00
1178046ed2 GPencil: Remove Annotations panel from non-preview Sequencer areas
Fix by: Peter Fog (@tintwotin)

I did some small changes to original differential code.

Differential Revision: http://developer.blender.org/D5306
2019-07-29 22:43:25 +02:00
2b8bc1a22e Doxygen: update version number to 2.81 2019-07-29 19:10:48 +02:00
daa7b56890 Fix T67874: Show gizmo incorrectly uses Cmd-` on macOS 2019-07-30 01:55:06 +10:00
770b496729 Cleanup: GPencil replace cfra_eval by cfra or CFRA
Don't need these variable because this code was part of using depsgraph frame number, but now using scene framenumber only add noise to the code.
2019-07-29 17:07:37 +02:00
453586be06 Fix T67849: Offset after "Hook to Selected Object" 2019-07-30 00:36:10 +10:00
0ae52711b6 Fix T67857: crash assigning None to the data of an empty using python
Assigning None is allowed for (image) empties.

Reviewers: sergey

Maniphest Tasks: T67857

Differential Revision: https://developer.blender.org/D5362
2019-07-29 15:28:00 +02:00
baff245b9d Fix T67860: missing 3d cursor update when picking texture clone location
Reviewers: sergey

Maniphest Tasks: T67860

Differential Revision: https://developer.blender.org/D5360
2019-07-29 15:24:25 +02:00
a7d9e2f57e Fix T67221: Auto-offset in VSE doesn't refresh audio
Reviewers: sergey, ISS

Maniphest Tasks: T67221

Differential Revision: https://developer.blender.org/D5300
2019-07-29 15:21:04 +02:00
a3c66680fd Fix T66931: "reset to default value" of metaball - viewport resolution is way too high
Maniphest Tasks: T66931

Differential Revision: https://developer.blender.org/D5251
2019-07-29 15:10:38 +02:00
537209cb4b Remove debug prints from previous commit.
Sorry for the noise...
2019-07-29 14:45:56 +02:00
3b6c75dc31 Fix T67620: Font preview translations malfunction in Blender 2.8
We cannot reliably use translations API from non-main threads.

Now storing translated strings in a static cache, with basic mechanism
to update it on language change.

Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D5350
2019-07-29 14:11:35 +02:00
b83a1b62c7 Fix T66233: Grease Pencil Swirl Effect not working at origin
If the control object is in the origin the radius is wrongly calculated because the result is 0.

Now, this value is clamped to avoid this situation
2019-07-29 12:41:24 +02:00
13f57237f2 Fix T67331: Annotations: Rename old grease pencil panels
These panels were using the old names, but now they are not grease pencil, but annotations.

Also removed old Tools panel. This must be replaced with new Toolbar
2019-07-29 12:39:39 +02:00
3ee246f614 Fix T67338 : GPencil Disable material properties when material is locked
When the material was locked, the properties were deactivated but not disabled.

Differential Revision: http://developer.blender.org/D5309
2019-07-29 12:35:12 +02:00
92f6e60f46 Fix T67876: 2D Stabilization doesn't compensate rotation in spacial cases
This was caused by 2D stabilization trying to be smart and lower weight
of tracks which are too close to the rotation center. This was causing
algorithm to ignore a single track which was set to constant 1 weight and
used for rotation compensation.

It is quite tricky to quantify this change without having comprehensive
regression suit, so can only hope that initial intention is still working
as expected.
2019-07-29 12:30:45 +02:00
60d71ffbe9 Fix T67811: GPencil Weights shift when use dissolve in Edit Mode
The problem was the index was not right calculated for unselected points.
2019-07-29 12:13:39 +02:00
801962e2b6 Fix T67813: Remove mask from Weight Paint
Weight Painting was using mask if "Selection Mask" in Sculpt Mode is turned on.

This can be quite confusing because the option to turn it off is not available in Weight Painting and the selection is also not visible.

Now the mask is not checked in weight paint mode.
2019-07-29 12:12:43 +02:00
d438e71729 GPencil: Use uniform_int_copy instead to pass reference
The constant variable was passed as reference to constant variable, but it's better use the new function to copy values.

This could be the problem with T67772
2019-07-29 12:10:48 +02:00
fd730fce0c GPencil: Add inverse diff matrix to iterator macro
GPencil: Cleanup inverse mat code

This calculation is done in the macro, so don't need do it again in loop.
2019-07-29 12:10:48 +02:00
d3ca0bf6f8 Version bump to 2.81 alpha, master is now open for new features and changes 2019-07-29 12:00:52 +02:00
7ac0c87473 Fix T67800: Incorrect behavior of simple Subdivision Surface
Stupid typo in an original fix, need to operate in 3D, not in 2D.
2019-07-29 11:26:16 +02:00
0528ef0b4d Fix T67777: Linked rig crashes Blender 2.8 RC3 on File|New.
Sync back between proxy armature pose and linked one was not properly
clearing the posebone runtime data, ending up with shared memory between
both (direct cause of reported crash), and probably some other nasty
issues.

While this crash is not critical in itself, I would suggest to add this
fix to 2.80 branch, as it is super-safe and simple, and is probably
fixing some other un-reported issues?
2019-07-29 10:54:28 +02:00
a38759f017 Fix T67863: Crash pressing Ctrl +/- in gpencil action editor 2019-07-29 17:22:12 +10:00
314891b1c5 Fix T67826: View selected fails with files from 2.7x
Grease pencil could have edit mode enabled in old files.
2019-07-29 15:31:00 +10:00
matc
a542f50b51 Fix T67523: Incorrect UV's for grid primitive 2019-07-29 14:28:02 +10:00
a49838ccb0 Tracking: Fix missing camera depsgraph update tag
Was causing lack of proper viewport update when camera solve assigned
new focal length to the camera.
2019-07-28 17:07:39 +02:00
fc5ba7e0bd Tracking: Support selecting tracks by their reprojection error curve
Quite straightforward after previous refactor: now speed and error curves
are handled in the same exact manner.
2019-07-28 17:04:10 +02:00
bf637984d1 Tracking: Refactor, generalize curve iteration API
Make it generic enough to support iterating over reprojection error
in the same manner as coordinate speed.
2019-07-28 17:04:10 +02:00
1c40227bfa Fix related to T67385: disallow some modifiers ops from Edit mode.
Some modifier operators cannot be reliably executed from Edit mode
currently, so disable them from the generic mod ops pool function.

Have been very conservative here from now, keeping existing behavior
most of the time, and only forbidding Edit mode when code was already
doing it in its own way, or when it was obviously not possible.
2019-07-28 16:11:42 +02:00
3e45f01494 Fix T67385: Bind in Laplacian Deform Modifier with new vertex group in Edit Mode crashes Blender.
Main issue in that report was that meshes generated from
`mesh_create_eval_final_view()` and the like need some
special freeing handling (as, among other things, they borrow and do not
own their potential editmesh data...).

Factorized that into a helper func also used by
`BKE_object_free_derived_caches()`.
2019-07-28 16:11:42 +02:00
c4cf14d161 Cleanup: Spelling in comments 2019-07-28 15:31:20 +02:00
1f47916664 Depsgraph: Fix changes in tracking invalidating movie cache
Added special exception in legacy tag with 0 flag.
2019-07-28 15:08:41 +02:00
11814080a6 Depsgraph: Fix missing cases of SOURCE ID recalc tag 2019-07-28 15:07:06 +02:00
5e56cfa958 Cleanup: Fix strict compiler warning 2019-07-28 15:05:10 +02:00
2cce65de96 Fix T66872: Changing clip color space does not update background images
Such reload can no longer happen directly and is to be done via dependency
graph.

Eventually, the movie cache will become shared across all copies of the
clip, but even then we still need to have dependency graph mechanism because
we need to update FFmpeg animation handle (which can not be shared across
the copies).
2019-07-28 13:24:18 +02:00
233f78c017 Cleanup: remove unused ID-map undo API
Removing this since it was added for TexFace support
which has since been removed.
2019-07-28 17:53:41 +10:00
ae19f68d45 Cleanup: pep8 2019-07-28 17:45:55 +10:00
79ce2054d4 Linux: add script and instructions for creating snap packages
We will now maintain the Blender package on snapcraft.io/blender.

Differential Revision: https://developer.blender.org/D5342
2019-07-26 17:34:45 +02:00
d25386b8a7 Linux: update appdata description 2019-07-26 17:34:45 +02:00
963b761144 WM: Pre-fill bug-reports for addons
This is an increment of the proposed changes in D4507.

Differential Revision: https://developer.blender.org/D5303
2019-07-26 11:19:21 -03:00
9270c15af8 GPencil: Get current frame from scene
This change makes it so current frame is queried from a scene rather
than from a dependency graph. This makes it possible to avoid the
fact that dependency graph might not be fully evaluated yet.

There are still some cases where it frame is queried from the graph,
but those seems to be in a code path where we need to ensure valid
dependency graph anyway.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5349
2019-07-26 15:16:52 +02:00
ad18d331d7 Cleanup: Remove unused depsgraph pointer 2019-07-26 15:16:12 +02:00
6cb8bd0a1c Modifiers: Update LaplacianDeform error message about vgroups.
Vgroup might be also 'invalid' because it is empty (and no other vgroup
with vertices currently exists on that mesh).

Related to T67385.
2019-07-26 14:45:55 +02:00
523de7ae9b Fix T66325: Animation Keyframe Undo/Redo Bug
The issue was caused by dependency graph always ignoring animation
update when it is first time constructed. This was a way to make it
preserve unkeyed changes on undo/redo. This, however, made it so
changes of animation data itself (such as deleting/moving keyframes)
did not trigger animation update by the dependency graph.

This worked prior to copy-on-write because animation recalc flags
were stored in the DNA and never re-set on file/undo load. This was
giving dependency graph a clue that animation is to be re-evaluated
when operator explicitly asked to (more precisely, when such operator
was undone/redone).

This change makes it so original ID's recalc flags are storing
recalc flags when ID is tagged for update as an response to user
input. This way re-building dependency graph can force animation
to be updated on redo.

Tricky part here is that ID's recalc flag is no longer to be zeroed
when loading undo step (which is the same as reading .blend file).
This is something what works differently comparing to legacy
dependency graph, which was zeroing object's recalc flags there but
not animation data's recalc flags.
Shouldn't be causing issues, since unkeyed changes are not preserved
upon opening a file anyway, at least to my knowledge.

Related reports which are to be taken into account and verified
they are not re-introduced when making changes in the area:

- T63111: Auto-Bake stuck at constant re-rendering
- T54296: Cycles viewport render stuck on constant re-render

Reviewers: campbellbarton, brecht

Reviewed By: campbellbarton, brecht

Maniphest Tasks: T66325

Differential Revision: https://developer.blender.org/D5316
2019-07-26 14:33:51 +02:00
ba94aaedba Fix T67639: Default cube UVs are incorrectly arranged 2019-07-26 21:55:53 +10:00
9e9c6eac6a Fix T67595: bevel concave cube corner.
The special case test for cube-like corner did not work if normals
are flipped.
2019-07-26 07:41:28 -04:00
11b994e26e Fix T67671: Blender crashes when resizing sidebar with a colorbamp
The amount of triangles drawn by the button depends on its `sizex`.
See:
```
immBegin(GPU_PRIM_TRI_STRIP, (sizex + 1) * 2);
```
Therefore the `sizex` cannot be 0.

Solution a bit similar to rB56b0cd1d.

Ref T67671

Reviewers: fclem, brecht

Maniphest Tasks: T67671

Differential Revision: https://developer.blender.org/D5347
2019-07-26 08:29:38 -03:00
1d7be99ba4 Fix missing ID pointer updates for texture paint undo
Partial fix for T61263, however mem-file undo sometimes reloads imbuf's.
2019-07-26 20:05:04 +10:00
81043397d7 Undo System: correct fix for T67709 2019-07-26 20:04:28 +10:00
62338abde4 Cleanup: Remove unused depsgraph pointer 2019-07-26 11:51:43 +02:00
1693a5efe9 Fix T66378: Missing animation update when switching view layer
Current frame is stored in a scene, and scene might have multiple view
layers. The inactive view layers were not informed about scene's frame
being changed, so when user switched back to view after changing scene
frame it was in an inconsistent state between current scene frame and
animation.

Now we tag scene for time changes, so dependency graph can catch up
and do proper update.

Currently tagging is from quite generic place. Probably better approach
would be to tag from where frame is actually being assigned. Downside
of this is that it's easy to miss some places.

Reviewers: brecht, mont29

Reviewed By: brecht

Maniphest Tasks: T66378

Differential Revision: https://developer.blender.org/D5332
2019-07-26 10:23:38 +02:00
250995d67b Fix T67507: Set origin on armature moves incorrectly parented objects
Need to copy changes from original armature to evaluated one prior to
BKE_pose_where_is(), otherwise the pose matrix in pose channels will
not be correct.

Can not use dependency graph update here, since we must not re-evaluate
possible dependencies of the changed armature.

Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T67507

Differential Revision: https://developer.blender.org/D5331
2019-07-26 10:15:39 +02:00
cf0f2f2d3d Fix T67256: Add object redo duplicates, after exiting sculpt mode 2019-07-26 14:33:00 +10:00
ac7fe46ec3 Fix T67709: Texture paint undo gets out of sync 2019-07-26 13:14:24 +10:00
cb10bd379b Fix T67599: Issue with Simple subdivision of loose edges
They were always acting as a B-Spline subdivision.
2019-07-25 16:34:01 +02:00
4f363283eb Fix T67593: Crash when making link for instance collection 2019-07-25 10:02:00 +02:00
829cbd88ff Fix T67588: Crash after clearing animation in outliner 2019-07-25 09:47:43 +02:00
6a7fcf725e Fix app-template keymap preferences being ignored 2019-07-25 17:39:32 +10:00
d24300da5f Fix app-template keymap being ignored 2019-07-25 16:36:59 +10:00
e51943bd73 UI: clarify tip for viewport mouse position property
This is an hidden property only visible in the keymap editor.

Addresses T67589
2019-07-25 13:47:47 +10:00
410eddcbcc Fix T67603: Selecting toolbar from search raises error 2019-07-25 13:35:01 +10:00
2e92791074 Fix crash validating mesh polygons with invalid loop-start
Add check for negative loop-start,
fixes crash validating test file from T67605.
2019-07-25 13:23:05 +10:00
419f137c64 Doxygen: update version number 2019-07-25 13:08:44 +10:00
76dfbee423 Fix T67472: Gizmo overlap causes cursor to get stuck 2019-07-25 10:53:04 +10:00
bfe580642f Fix background image rotation and offset
- Offset was halved & not compensating for non-square aspect.
- Rotation was flipped.
2019-07-24 22:32:17 +10:00
4fe0fafb87 Fix T67548: Camera background-image ignores shift
Regression from 2.79
2019-07-24 20:42:39 +10:00
552cc30f3a Fix T65980: Boolean crash with many intersections on a single face 2019-07-24 19:33:55 +10:00
52fb8b1e80 Fix T67117: Font thumbnails crash to desktop
We were missing a null pointer check for invalid fonts.
2019-07-24 11:26:21 +02:00
53944e2f9f Fix T67315: Redo transform disables snap 2019-07-24 17:07:55 +10:00
796a2b5fc7 Fix T66768: Grid fill span not working 2019-07-24 16:32:15 +10:00
b63f0266a0 Fix T67459: Dope Editor, muting channels with shortcut doesn't work 2019-07-23 15:52:39 +02:00
4cf8f35cc1 Tracking: Give more reasonable error message directly in the interface
Before this the message could be too generic which was simply saying
that console is to be checked. This isn't very useful in cases when
we know that reconstruction is failed because of lack of good keyframes
or failure of initial reconstruction if there is no enough parallax
on the selected keyframes.
2019-07-23 15:12:35 +02:00
7d65827980 Fix T67089: Solve camera motion generates "Solve error: nan"
The code was missing some checks for whether keyframe selection
went successfully and whether reconstruction has been successfully
initialized.

The interface still gives quite generic message, with the details
printed to the console. This can be addressed separately.
2019-07-23 15:12:35 +02:00
361d578f9d fix: unreported: Collada using incompatible Enumeration types for compare 2019-07-23 15:09:02 +02:00
9e3ff9e059 Fix T67334: Blender does not exit after saving 2019-07-23 14:32:32 +02:00
ef0e06d764 Fix T65386 Eevee: Crash after baking indirect lights or cubemap
I'm not sure this fixes the root of the problem. The file from the ticket
seems to have been corrupted in some way.

We MIGHT want this in 2.80.
2019-07-23 13:21:03 +02:00
84c11e8644 Cleanup: Rearrange the order of isect_ray_ray_v3 parameters
And remove redundant add operation.
2019-07-23 08:11:46 -03:00
19aa873f70 Fix T67299: UV Stretching Overlay of type "Area" fail when any face is hidden
We want to include this for 2.80
2019-07-23 07:51:16 -03:00
matc
2d98ac33be Fix T65402: Syntax error causes CPython assert 2019-07-23 20:31:27 +10:00
34ad6da4a0 Fix T67450: Crash undoing edit-mode lattice resolution 2019-07-23 17:25:28 +10:00
07f3ad06fc Fix T63775: Toolbar icons ignore BLENDER_SYSTEM_DATAFILES
The environment variable to locate system data-files was
ignored by toolbar icons.

Add bpy.utils.system_resource
to match Blender's internal data-file access.
2019-07-23 16:30:26 +10:00
6e72d3e00e Fix T67389: Transform constraints fail at large distances 2019-07-23 14:56:49 +10:00
0a0e2dd8a2 Fix T67040: Undo crashes after renaming
Correct fix that doesn't cause T67217.

Temporarily removing the excluded undo step broke memfile-undo
since freeing the undo steps needs to access other steps in
the list to merge shared chunks, see: memfile_undosys_step_free.

Pass the exclude step as an argument instead.
2019-07-23 13:06:26 +10:00
8c61837150 Incompatible usage of the Collada transparency value
Some external tools seem to have issues with the definition
of Collada <transparency> - a float value in range (0,1).
However it is possible to use the <transparent> color as a container
for the <transparency> value. This seems to be a more reliable
method to export transparency values from Blender PBSDF Shaders.

The relevant documentation is in the collada 1.14 reference manual,
page 7-5 about the usage of transparent and transparency.

This fix makes export and import of the <transparency>
and <transparent> values more convenient and more reliable.

Reviewers: brecht, jesterking

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5305
2019-07-22 19:03:56 +02:00
2de95e8149 Fix missing subversion bump for 2.80 release.
We need a final subversion bump before release in case there are
remaining 'unversioned' code in our versionning callbacks...

Should have been done before first RC actually. ;)

To be ported to 2.80 release branch.
2019-07-22 18:44:22 +02:00
02c5c091df Bevel modifier: let it work on wire edges when vertex_only. 2019-07-22 07:13:04 -04:00
2c1d23f209 fix unreported: typo in python documentation
Fix as approved by dr.sybren in blender chat
2019-07-22 11:43:07 +02:00
45ae9edbd5 Revert "Fix T67040: Undo crashes after renaming"
This reverts commit c635663e4a. This is causing
crashes with sculpt mode and object mode switching.

Fixes T67217.
2019-07-21 12:59:36 +02:00
e2b0647272 Industry Compat keymap: Fix inconsistencies and conflicts with color swatches and other over-widget hotkeys
Sample hotkey is set to the I key now, similar to other apps.

Reported on Devtalk
2019-07-20 14:45:45 +02:00
4b980e2f57 Fix T67196: bevel bad at a 3-edge bevel.
The test for whether or not this was a "pipe" neglected to use
fabsf() around a dot result.
2019-07-20 08:38:41 -04:00
c2e8e249ac Fix assert in some cases when using DataTransfer modifier for custom normals.
Reported by @sybren on IRC, thanks.

Should be safe for 2.80.
2019-07-19 16:17:09 +02:00
65aac86d5a GPencil: Fix wrong material when apply Opacity, Hue or Tint modifier
When apply the modifier a new material is created, but it was assigned wrongly. The problem was the index was base 0 already, so subtract 1, got a wrong value.
2019-07-19 15:22:42 +02:00
23ea4b56ad GPencil: Fix showing wrong material in brush panel with pinning
The options of the material are from object material not pinned material.

If the brush is pinned, the material must be the brush material and not the object material.
2019-07-19 15:22:42 +02:00
d5c0a02f86 Fix T67033 EEVEE: Random Flickering Materials
This was a read after free error. This only fix the undefined behavior.
The result is still not correct in certain cases (see T67226).

We want to include this for 2.80
2019-07-19 14:38:09 +02:00
69ba3b98e4 Fix new Text ID usercount handling in add/load cases.
Text datablocks should always have a 'single user' flag set, and they
usually do not have any user (since neither text editor itself, nor
Freestyle usage are text users - the second is odd btw...), the only one
am aware of is the script node (e.g. for OSL).

Add text case was simply not doing anything, so added.

Load text case was doing things in inversed logic (setting user count to
zero in BKE, then setting 'real user' flag in ED code). Made it the
other way around (BKE ID creation code should not care about usercount
usually, this is up to higher-level code to decide what to do
(operators, RNA...).

Note: tried to check all cases, but there might very well be some more
hidden bugs here...
2019-07-19 13:58:26 +02:00
48418ec125 Revert "Fix assert unlinking text"
This reverts commit b0b2546d4a.

Please do not sweept the dirt under the carpet like that! If there is a
bug, either report it or fix it, but do not silence it!
2019-07-19 13:58:01 +02:00
0d3e055bda Cleanup messed-up comment formating from codestyle apply... 2019-07-19 13:58:01 +02:00
fb84ef58c4 Fix T67191: Redo fails for 3D text operations 2019-07-19 19:21:00 +10:00
7fe81fe5a3 Fix T63090: Delete keyframe reports invalid for multiple objects 2019-07-19 18:43:12 +10:00
5f140e61c2 DRW: lattice vertices were too small 2019-07-19 10:44:09 +10:00
1ae4311902 Fix T66492: Divide by zero with cursor to selected 2019-07-19 10:31:51 +10:00
48b4d42bce CMake: Fix WITH_CODEC_SNDFILE detection
D5296 by @frispete
2019-07-19 09:24:08 +10:00
4b2e6d4e22 Fix T67062: Movie Clip Editor does not update Editor Type when changing Editing Context
Previously when switching modes, the code didn't check if we were in the
correct view for the masking mode.

Reviewed By: Sergey

Differential Revision: http://developer.blender.org/D5288
2019-07-18 15:29:03 +02:00
2e6139dfc2 Fix context menu Remove Shortcut not being available for non-keyboard shortcuts 2019-07-18 14:15:31 +02:00
b58a6a3e72 Disable b-bone spline gizmo for now
This wasn't working properly and needs to be finished,
disable for release.
2019-07-18 22:04:21 +10:00
687f1df5db Fix T66811 Eevee: Flickering in weight paint mode
This was caused by TAA offset being computed as the 2nd sample even if the
sampling was reset afterwards.

The fix is to update the matrices after any potential reset.
2019-07-18 12:55:26 +02:00
7a82896fbc Keymap: use number keys to change particle modes
Match behavior for meshes.

Fixes T67161
2019-07-18 20:27:21 +10:00
5c8b1a1266 Fix edit-mode particle vertex draw size
Vertices were hard to see, draw the same size as edit-mesh vertices.
2019-07-18 20:11:18 +10:00
c6c9e168e2 Fix T58447: Unselected bone used for constraint target 2019-07-18 19:12:09 +10:00
20c725ed62 Cleanup: remove redundant preference check
Missing from f2df520698, harmless but confusing to leave
in checks for preferences having asked to skip them.
2019-07-18 16:58:38 +10:00
098f60f1b8 Fix T67105: Missing Update Add Camera Background Image
Reviewed By: brecht, sergey

Differential Revision: https://developer.blender.org/D5284
2019-07-18 08:44:30 +02:00
5d4bd8f1bb Fix T66949: Can't select bones from multiple objects in wpaint mode
This fix relies on 2.7x logic, only de-selecting other armature objects,
making multiple armatures in weight paint mode usable.
2019-07-18 15:45:39 +10:00
bf8393c1c9 Fix weight-paint & pose-select & lock-mode combination
Extend pose object checks to all pose-mode objects
used by the mesh.
2019-07-18 15:42:14 +10:00
8a083ef3b7 Fix weight paint mode setting with multiple armatures
Selecting multiple armature objects and entering weight paint mode
wasn't working.

Entering weight + pose modes at once was only done when
object mode locking was enabled. Now it's done even when
mode-locking is off - because it's still inconvenient to setup
and useful default behavior.

Resolves issues raised by T66949
2019-07-18 15:40:52 +10:00
0b4c0472a3 Fix T61117: Selecting an armature doesn't select the bone
Regression from 2.7x caused by 28dfc47cf0
2019-07-18 14:26:34 +10:00
112f0db40d Fix pose de-selection when selecting from object mode 2019-07-18 14:24:55 +10:00
807b6c4848 Revert "Fix T66949: Can't select bones from multiple objects in wpaint mode"
This reverts commit 9e9fbb39d7.

Adding back object+pose bone selection support removes the need for this fix.
2019-07-18 12:22:39 +10:00
Dalai Felinto
a6b7ee2a1e Fix T66948: Outliner - collections/objects with wrong active state
If the parent collection was out of view we were not taking its
properties into consideration. We need it even when not drawing the
parent to set active/inactive values for its children.

Related Task: T66948

Reviewers: brecht

Subscribers: Zachman

Differential Revision: https://developer.blender.org/D5272
2019-07-17 19:38:54 -03:00
Dalai Felinto
bfa6cb3a7d Fix T64312: Selection inconsistencies when switching collections
Basically layer_collection_sync was calling BKE_base_eval_flags right away while
iterating over the bases.

However when a parent/sibling collection is to influence the collection flag of
an object that exists in more than one collection, it is too late since we
deselect the object in BKE_base_eval_flags right away.

Related to T64312.

Reviewers: sergey, brecht

Differential Revision: https://developer.blender.org/D5243
2019-07-17 19:38:16 -03:00
158eb98c22 GPencil: Fix usability problem with curve control points apart
Based on feedback from @matiasmendio

There was a problem with the control points because it was very difficult to know what point move. Now the points are moved apart and makes easy to know what point use.
2019-07-17 22:24:39 +02:00
eee46769ce Fix T66515, T67112, T61607: failure to read EXR files with single, named layer
Like Blender renders without a Z channel. The single layer case assume that channel
names are just R/G/B/A without any layer name prefix, and would not read channels
like "Image.R".

Carefully tested for regressions with the openexr project tests images, so this
should be safe.
2019-07-17 20:55:53 +02:00
709f126e81 Fix T59713: Armature layer dots not updated on changes
`layer_used` runtime data, which controls the drawing of dots in the UI was not getting refreshed properly.
This used to happen in the drawing code, but was no longer working for reasons explained in:
{rB2b09062defa093a243b5fe64b099accb07b440a3}

The solution was to update each layer manually in the operators:
* ARMATURE_OT_bone_primitive_add
* ARMATURE_OT_delete
* ARMATURE_OT_dissolve
* ARMATURE_OT_fill
* ARMATURE_OT_merge
* ARMATURE_OT_separate
* ARMATURE_OT_bone_layers
* POSE_OT_bone_layers

Differential Revision: https://developer.blender.org/D5281
2019-07-17 14:17:34 -03:00
4ddc7e8d1b Fix T66919: Force field does not affect particles
Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T66919

Differential Revision: https://developer.blender.org/D5275
2019-07-17 16:51:02 +02:00
c722c5204f Fix T67075: make object.visible_get() and similar APIs more forgiving
When objects are not in the view layer, just return false rather than throwing
an error. As far as the script is concerned the object is not visible or
selected when it's not in the current view layer.
2019-07-17 16:30:42 +02:00
c1bd5bcbfa Fix T66091: paint curve point slide conflicts with 2D cursor 2019-07-17 16:30:42 +02:00
b69c33aeba Fix T67099: entering color picker hex value #FF results in 1.000001 2019-07-17 16:30:42 +02:00
f17e2f8dac Fix T67127: Crash Missing DEG tag update mask layer
When ng mask layer operations (add, remove, move) the
original mask was not tagged to be updated resulting
in missing data on the copy. The Masking function
assumes that the copy and the original is always
structured the same.

Reviewed By: brecht, sergey

Differential Revision: https://developer.blender.org/D5283
2019-07-17 16:24:00 +02:00
2e15b72089 Clip editor: Fix missing frame update on undo
It is possible that undo will change current scene frame and that was
not synchronizing current frame from scene to movie clip user.

Reported as a part of T66519.

Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T66519

Differential Revision: https://developer.blender.org/D5280
2019-07-17 16:05:33 +02:00
58db64a3b6 Revert "Fix T59713: Moving bones between layers in edit mode doesn't show the dot icon in the layers UI"
This commit did not follow the protocol that requires a review first.

This reverts commit 580acab173.
2019-07-17 10:32:50 -03:00
580acab173 Fix T59713: Moving bones between layers in edit mode doesn't show the dot icon in the layers UI 2019-07-17 10:16:17 -03:00
11741ff682 Fix T67001: Studio and Flat lightning in single color do not respect clipping region
`DRW_STATE_CLIP_PLANES` has to be enabled independent of the workbench material.

Reviewers: fclem, jbakker

Differential Revision: https://developer.blender.org/D5278
2019-07-17 08:51:57 -03:00
526272bf7c Fix T67115: Changing the Shape of a Force Field object does not refresh the animation 2019-07-17 08:30:37 -03:00
366865dd02 Undo System: replace with simpler binary diffing buffer storage
Applying/undoing incremental changes didn't fit well when
mixed with periodic snapshots from mem-file undo.

This moves to a much simpler undo system.

- Uses array storage with de-duplication from `BLI_array_store`.
- Loads the buffer into existing text data,
  for better performance on large files.
- Has the advantage that Python operators can be supported
  since we don't depend on hard coded undo operations.

Solves T67045, T66695, T65909.
2019-07-17 21:19:22 +10:00
9e9fbb39d7 Fix T66949: Can't select bones from multiple objects in wpaint mode 2019-07-17 18:39:42 +10:00
f8a70db556 Fix T67047: Can't jump to frame when using jack in A/V sync mode
Similar fix to 495aff7.

Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T67047

Differential Revision: https://developer.blender.org/D5268
2019-07-17 09:56:47 +02:00
d8cebcfebf Fix object selection when in pose mode
The new selected object was activated but not selected.
2019-07-17 16:57:45 +10:00
Dalai Felinto
d90201aee2 Edge Slide: Fix multi-object for loop early exit
Part of D5274, reviewed by Campbell Barton.
2019-07-16 23:01:42 -03:00
Dalai Felinto
5ca302cb0c Fix T67078: Crash with vertex slide and multi-objects
If one of the objects had invalid selected edges, it would lead to a
crash since none of the for loops were checking for whether the edge
slide data is valid.

We could refactor the macros to create a new
FOREACH_TRANS_DATA_CONTAINER_WITH_DATA

However we are too close to 2.80 final release so we manually skip them
for now.

Note: TRANS_DATA_CONTAINER_FIRST_OK cannot be used either for the same
reason.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D5274
2019-07-16 23:01:03 -03:00
4a5e046c92 UI: remove button to enable auto-save after load factory preferences
Based on feedback from T66675, the current interface is confusing,
leading to users accidentally overwriting their preferences.

Now, once factory settings are loaded preferences are not saved
and the save button is shown (as when auto-save is disabled).

Tool tips note that factory settings require manual saving
afterwards.

Also rename preference menu items for better consistency
(settings/state -> preferences).
2019-07-17 09:38:30 +10:00
a36a44bb81 Fix paint curve not drawing selection colors properly
This code is not guaranteed to run with any specific space theme, so pass
it explicitly.
2019-07-16 20:31:23 +02:00
9742fa6668 Fix T66964: sculpting box hide tool can't select multiple areas
Only deselect all on mouse release when no box dragging was done.
2019-07-16 19:10:18 +02:00
35aa13734d Fix T66862: crash with bevel modifier harden normals applied to curve object 2019-07-16 18:06:49 +02:00
8a7dedc9d2 Fix T66011: Transformed objects break sculpt tools
The Pinch, Push, Twist and Clone were not using the object transformation to compute point changes, so the point was way off of the right place.
2019-07-16 17:57:25 +02:00
1f1d302950 Fix T66940, T67005, T60651: append workspace from old startup file fails
Don't try to use old screens as workspaces, just leave them out of the menu.

Differential Revision: https://developer.blender.org/D5270
2019-07-16 17:46:45 +02:00
91f539b384 Fix T66862: crash with mirror modifier applied to curve object 2019-07-16 17:46:42 +02:00
28c684f66b Fix T66999: Blender creates new cache for particles with step 10 instead 1
Update the default init step values to be the same for all caches.
This is actually a small hack as these values are not used on the
creation of the first cache. But the default init value is 1, so this
will not be noticeable anymore.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5271
2019-07-16 17:33:24 +02:00
105ae3be99 Fix T66944: Rigid Body Constraint in duplicated collection is not added to RigidBodyConstraints collection.
We only had a very limited, specific handling of that in collection
duplication code, but this has to be handled at a much more general
level in Object copy code itself, since it makes no sense to duplicate
rigidbody object data without adding new copy to relevant rigidbody
collections...

WARNING: This is a fairly risky rework of rigidbody handling logic
when copying an Object data-block. It is *NOT* considered safe enough
for 2.80 release.

I tried to take into account copy flags to not mess with other IDs
(collections) when we are copying outside of Main, and also not do deg
tags when this is forbidden, but risk of something going wrong here is
too high...
2019-07-16 16:08:32 +02:00
e6e69a28ab Fixed crash when adding/removing custom normals from pinned mesh
When a mesh is pinned in the properties panel, Blender crashes when you
click the "Add Custom Split Normals Data".

The code calls `ob = ED_object_context(C)` which returns NULL when the
mesh is pinned in the properties panel, causing a segfault when trying
to get the mesh via `ob->data`.

A new function `ED_mesh_context(C)` avoids this by first checking
whether a mesh was pinned in the context. If not, it checks the pinned
object's data. If that's not there, or it's not a mesh, it returns the
active object's mesh. Finally it returns NULL if there is no active
object, or if the active object is not a mesh object.

Reviewed By: brecht, mont29

Differential Revision: https://developer.blender.org/D5223
2019-07-16 15:06:25 +02:00
dd3e3474ab fix T66899: Collada: Shininess/Reflectivity not handled correct
Fixed: The Collada Exporter only supports export of
Lambert Shaders. But Shininess is not supported with
Lambert Shaders. The exporter must not add Shininess
to the Shader data!

Fixed: The Collada Importer adds an illegal value of -1
for reflectivity when this parameters is not defined in
the imported collada data. Now reflectivity is only
set when the import data contains a valid value.

Discarded: The Collada Importer handles shininess in a
dubious way. I have discarded import for now.
This needs to be reworked carefully in 2.81.

Differential Revision: https://developer.blender.org/D5262
2019-07-16 13:28:40 +02:00
965bd4c8c3 Fix T66742: Frame selected last weightpaint/vertexpaint stroke not
working

Mouse values [for 'paint_last_stroke_update()'] gone missing in
rB4f616c93f7cb.

Thx @campbellbarton for hinting at convention to get mouse from sculpt
caches.

Reviewers: campbellbarton

Maniphest Tasks: T66742

Differential Revision: https://developer.blender.org/D5267
2019-07-16 13:27:12 +02:00
c4a62493de Fix T66835: Dynamic Paint weight group isn't updated unless weight has been assigned
The dvert layer was not assigned to the mesh data if it had to be
created by the dpaint modifier.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5263
2019-07-16 11:44:08 +02:00
6b3c1192e1 Fix error in app-template image size check 2019-07-16 19:40:23 +10:00
b0b2546d4a Fix assert unlinking text
Interferes with debugging.
2019-07-16 17:27:53 +10:00
c635663e4a Fix T67040: Undo crashes after renaming
Caused by error keeping the first memfile undo step.
2019-07-16 17:14:19 +10:00
d5f725a238 Cleanup: typos in comments 2019-07-16 16:58:04 +10:00
1fa61c8843 Fix typo in background_job template
D5264 by @dimtion
2019-07-16 16:56:25 +10:00
d5fa230736 Fix T67002: Crash redoing an action after ID rename 2019-07-16 15:53:15 +10:00
fdf2d8728a Docs: remove debug value, matching source 2019-07-16 13:26:37 +10:00
af51988115 Fix T67009, T67013: crash with Intel HD Graphics and some older drivers
Add more versions to the workaround list.
2019-07-15 22:44:29 +02:00
f3899c13cd Fix T64827: "Batch-Generate Previews" crashes.
Second completely unrelated issue reported in same task (tssst...),
caused by missing doversion code of some changes in recent-ish 2.80
development (tsst... again).

Proper fix for the issue (reverted rB8a5a8282ce48 was merely sweeping
the dirt under the carpet...).
2019-07-15 22:33:55 +02:00
125e0cfb25 Revert "Fix T64827 (part two): "Batch-Generate Previews" fails with certain files"
This reverts commit 8a5a8282ce.
2019-07-15 22:33:55 +02:00
c42b7f8434 Fix T66986: fix dylib plugins on macOS not working in code signed release
Add more entitlements for code signing.
2019-07-15 22:22:50 +02:00
8faaeef5fb Fix T67016: crash drawing image editor without image 2019-07-15 22:22:50 +02:00
d061154b93 Fix T66983 Wireframe Display in edit mode edges missing when overlays are disabled 2019-07-15 19:55:09 +02:00
4404a0dcd4 Fix T66707 Modifying bone's 'Custom Object' reference shape causes blender to crash
This was caused by an instancing batch not being initialized correctly.
2019-07-15 19:27:54 +02:00
0b25566143 Fix T66955: Cannot delete data from file in outliner.
That switch on ID types had not been updated since quiet some time it’d
seem... Using the ID_Type enum type now, so this should not happen again
(compiler will yell at you if you forget to add here any new ID type ;) ).

Also had to change a bit the code layout then, to deal with fake NLA ID
type...

Note that for now, Screen IDs remain excluded from the ID menu usage,
due to T67004.
2019-07-15 18:10:26 +02:00
9cdd2df277 Fix T66712: A model shows artifacts in the sculpt mode
Was a mistake in normals calculation: need to consider all grids for correct
average in the center of the face.

Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T66712

Differential Revision: https://developer.blender.org/D5254
2019-07-15 17:38:47 +02:00
ff1b5af307 Fix compositor ignoring mask parenting
There are two aspects to the problem:

- Dependency graph update for compositor preview was missing
  updates flush.

  Apparently, update for new frame style of update will take
  care of flushing, but not the update tagged style of update.

  This goes to a legacy dependency graph and is to be changed
  at some point, but not so close to the release.

- Movie clips were missing from the compositor dependency graph.

This fixes part of T66519.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5256
2019-07-15 17:36:54 +02:00
ee55ac19dc Fix T66870: AutoIK-Len stops working after releasing the mouse
The code didn't check if we should initialize the transform auto IK parameters.
Cleaned up the code a bit too.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5260
2019-07-15 17:30:12 +02:00
daff18dd28 Fix T63349: image texture garbage collection causing freezes
Images were being freed often because the tagging for when the image was last
used was missing.

Differential Revision: https://developer.blender.org/D5252
2019-07-15 17:24:20 +02:00
846e5f1dc0 Fix T66812: Particles + Build Modifier = Crash
Particles can not be used with a destructive modifiers, so we can not
maker such configuration fully reliable.

Not sure this specific setup ever worked in 2.7x, maybe DM index was
somehow reset somewhere in particle system in older Blender version,
or maybe all of Blender version were crashing.

Anyway, seems to be very easy to avoid obvious index past the array
boundary in the mapping,

Reviewers: brecht, zeddb

Reviewed By: brecht

Maniphest Tasks: T66812

Differential Revision: https://developer.blender.org/D5257
2019-07-15 17:03:33 +02:00
69aa5bba4f Fix T66941: GPencil wrong interpolation calculation for last keyframe
The range used for frames was wrong and the last keyframe was way off of the correct place.

Thanks to @MagnumOctopus for catching the bug.
2019-07-15 16:56:54 +02:00
8a5a8282ce Fix T64827 (part two): "Batch-Generate Previews" fails with certain files
Some values (not properly handled by do_versions?) could cause
'rna_backup_restore()' to throw an error resulting in the whole preview
generation not being saved to the .blend file.

I've checked folowwing demo files:
- race_spaceship.blend
- wasp_bot.blend

Here the offending seetings were:
- `UnitSettings` (`length_unit`, ...)
- `FFmpegSettings` (`ffmpeg_preset`, ...)

For now, these are now excluded in `exclude_props`

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5255
2019-07-15 16:38:59 +02:00
70d193203b Fix T66668: frame selected bone not working in weight paint mode
'viewselected_exec()' [which uses evaluated view layer] would query
BASE_SELECTED flag, but it was not set on base_eval, but on its
base_orig.

reason for this is 'ed_object_select_pick()' would modify base flags
[through 'ED_object_base_select()'], but not tag scene
ID_RECALC_BASE_FLAGS.

thx @sergey for hinting.

Reviewers: sergey, brecht

Maniphest Tasks: T66668

Differential Revision: https://developer.blender.org/D5235
2019-07-15 16:20:11 +02:00
914427afd5 Fix T66686: Crash on Particle Edit, then Render
Reviewers: brecht, zeddb

Reviewed By: brecht

Maniphest Tasks: T66686

Differential Revision: https://developer.blender.org/D5259
2019-07-15 15:54:27 +02:00
9db772fe9a Fix T66991 Crash when deleting edit bones when pchan is referenced by bendybone
This was caused by loose pointers.

This diff takes care of clearing the fields of other bones before deleting the pchan.

Reviewers: brecht, sergey

Reviewed By: brecht, sergey

Differential Revision: https://developer.blender.org/D5258
2019-07-15 15:13:45 +02:00
e66c3589a2 Fix T66986: errors with add-ons using ctypes in macOS release
Add extra entitlements to allow the kind of unsigned executable memory access
that cytpes does.
2019-07-15 14:20:27 +02:00
ef35dc68d6 Fix T66774 Lookdev: Assert switching from rendered to lookdev
The View was being reused accross different redraw (not allowed).
2019-07-15 13:14:50 +02:00
65a3624877 Fix T66860 Crash on opening .blend file from 2.79
This was caused by the preview render of the material property panel being
1px wide. The computed half buffers width were rounded to 0.
2019-07-15 13:07:42 +02:00
761135a284 Fix showing "__pycache__" in templates menu 2019-07-15 19:40:27 +10:00
d2a4a03890 Fix reading directory as file content on Linux
Reading a directory as a file on Linux was attempting to allocate LONG_MAX,
this happens in template file lists (fix for that coming next).
2019-07-15 19:40:27 +10:00
576963d7c1 Fix crash running GPU shader.format_calc() with attributes like gl_VertexID
When using opengl attributes such as gl_VertexID in a shader its
location is set to -1. This location was used without checking in an
attribute array. This fails big time when called from python. For
example `print(shader.format_calc())` made python crash immediately.

this fixes https://github.com/JacquesLucke/animation_nodes/issues/1141

Reviewed By: fclem, brecht

Differential Revision: https://developer.blender.org/D5231
2019-07-15 11:24:38 +02:00
872025c4e5 Fix crash HD Graphics 4000 Series On Windows
There was an workaround implemented for specific the Intel HD Graphics
4000 GPU on Windows platform. Other GPU from the same series also need
this workaround.

We will enable the workaround for specific drivers.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5239
2019-07-15 11:22:35 +02:00
8fa50b522a Fix T66587: Can't bake second dynamic paint canvas to image sequence
The issue was the the copy data function didn't copy the active canvas number.
So it would always be 0 and thus use the first canvas when trying to bake.

Also fix not copying unused type data (unused canvas/brush settings).

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5220
2019-07-15 10:47:49 +02:00
bb165d6df1 Fix T66957: GPencil material isolate crash when slot is empty
When the slot of the material is empty, the loop to lock the materials tried to use the material but this was NULL.

Check if material is NULL before using it in other operators too.
2019-07-15 09:53:27 +02:00
986c283c07 Fix T66953: Duplicate items in pose context menu 2019-07-15 14:22:22 +10:00
65168825e0 cleanup: typo in cycles 'min_transparent_bounces' tooltip
Reviewers: brecht

Differential Revision: https://developer.blender.org/D5249
2019-07-14 23:02:51 +02:00
1f57157601 Cleanup: Do not use camel case for "Freestyle" 2019-07-14 15:29:15 -04:00
e3c586e262 macOS: clarify bundle script instructions 2019-07-12 19:50:39 +02:00
1c73b60484 macOS: allow bundle script to re-codesign a Blender.app that was already signed 2019-07-12 19:19:10 +02:00
b94df17ae5 macOS: remove hardcoded paths for code signing python/dylib/so
Differential Revision: https://developer.blender.org/D5234
2019-07-12 18:59:27 +02:00
8d4800990c Fix T66601: Redo Panels are empty the first time a workspace is active
We need to indicate a preferred size to avoid `RGN_FLAG_TOO_SMALL` the first time the region is created.

Differential revision: https://developer.blender.org/D5238
2019-07-12 11:37:18 -03:00
18310ad509 Fix T66773: Active edit-bone isn't updating 2019-07-13 00:20:28 +10:00
3569fdb745 Cleanup: use _orig as a suffix 2019-07-13 00:14:14 +10:00
53a7ce1f8a UI: increase contrast for active bone
Follow up for T66747 fix, active color didn't contrast enough.
2019-07-12 22:30:25 +10:00
f3848e8e1e Fix T66747: Active bone not showing in edit-mode 2019-07-12 22:24:37 +10:00
325501247d Fix AttributeError in mesh properties panel when mesh is pinned
When a mesh datablock is pinned in the properties panel,
`context.object` is `None`. This in turn causes `obj.mode` to raise an
`AttributeError` exception as `None.mode` doesn't exist.

Since there is no (fast/simple) way to check whether the owning object
is in edit mode or not, the properties will be disabled. Not ideal, but
better than spewing an exception on every panel draw.

Reviewed By: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D5237
2019-07-12 14:18:17 +02:00
439777f081 Fix T66689: Viewport isn't updating children hair particle on particle edit
Reviewers: fclem, brecht

Maniphest Tasks: T66689

Differential Revision: https://developer.blender.org/D5229
2019-07-12 14:09:20 +02:00
2048db06d3 Fix T66694: depthdropper (camera focus distance) not working from View3D context menu
Reviewers: campbellbarton, brecht

Maniphest Tasks: T66694

Differential Revision: https://developer.blender.org/D5233
2019-07-12 14:03:58 +02:00
83010c2f02 Fix T66446: UV editor "Deselect on Nothing" not working 2019-07-12 19:19:37 +10:00
f1af8908b3 Fix keymap editor missing tools for UV/Image space 2019-07-12 19:05:03 +10:00
1499994557 Fix T66675: Auto-Save override button has no tooltip 2019-07-12 15:45:52 +10:00
f2df520698 Preferences: disable reading preferences for regular file loading
Although the Auto-Run Python Scripts flag isn't used,
this is still a security risk since exclude paths list is.

Further this isn't what users would expect when loading a file &
only some preferences were being loaded so it's not useful.
2019-07-12 15:04:36 +10:00
7ad21c3876 Fix T66604: Cycles bake crash on specific scene with volume
The issue was caused by un-initialized local storage for volume
intersection hits which are supposed to be stored in per-thread
KernelGlobals.

Fix is to make thread_shader() be the same as thread_render() in
respect of KernelGlobals.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5230
2019-07-11 15:44:09 +02:00
f0b72a776e Fix T66706: crash in viewport shading popover for workbench engine
Differential Revision: https://developer.blender.org/D5226
2019-07-11 15:03:13 +02:00
8a1552545a Fix T66672: auto and manual texture space affected by modifiers
It should be based on the mesh bounds before modifier stack evaluation, but
some modifiers were causing it to be recomputed. The flag to disable texture
space recomputation was not preserved through modifier evaluation.

Differential Revision: https://developer.blender.org/D5225
2019-07-11 14:44:57 +02:00
d663048696 Fix T66691: Ceash trying to render the 2.80 splash image
Was caused by ray direction becoming NaN after some of the bounces.
2019-07-11 13:00:26 +02:00
03d8bfb144 API Doc link: make releases/RC's point to their own version of the doc.
Sounds kind of stupid to have 2.79 pointing to "current" which is now
2.80 API doc... Let's try to avoid that in future.
2019-07-11 12:13:11 +02:00
7c48b6c84c Fix for RC release step to also point at 'current' API doc link.
RC's are supposed to be like "real" releases...
2019-07-11 12:13:11 +02:00
3c4f6399d9 Fix T66628: "Auto Saved Modified Image" not working
Reviewer: brecht
2019-07-11 12:06:21 +02:00
a7ac40888f Text: buffer from text, optional length return arg
No functional changes (currently unused).
2019-07-11 14:19:55 +10:00
676543d91f Fix T66658: Undo steps gets out sync with text/edit-mode 2019-07-11 09:46:47 +10:00
1544b9322c Undo System: add is_final argument (no functional changes)
This is needed step out of undo steps which accumulate changes,
larger changes could be made to handle this but better not
make them at this point.
2019-07-11 09:36:59 +10:00
e60d35153f Cleanup: avoid recursion for undo/redo step skipping
Simplifies making further changes.
2019-07-11 09:22:42 +10:00
d3a8d25fb3 Cleanup: clang-format 2019-07-11 09:22:42 +10:00
de203b26c2 Cleanup: quiet warning 2019-07-11 09:22:42 +10:00
bb7b741d2f Fix T66654: wireframe overlay crash in vertex paint in some cases
Differential Revision: https://developer.blender.org/D5218
2019-07-10 17:05:19 +02:00
91d3b00395 Splash: new image for 2.80 by Andy Goralczyk and the Spring team 2019-07-10 16:48:06 +02:00
53c8fd5447 Fix T66567: Weight painting crashes with specific mesh
Seems the deform group index and deform vertices went out of sync somehow.

Added extra NULL pointer check, which seems to be safe and matches checks
in other places in the neighbourhood.
2019-07-10 16:03:19 +02:00
a6ae53ef49 Fix strict compiler warning 2019-07-10 15:03:57 +02:00
8d8ebc73b6 Splash: put version number in top right, refactor code for easier changes 2019-07-10 14:56:19 +02:00
dc2b562ace Splash: use red heart icon for development fund
Now that the development fund image will disappear from the splash, this
draws a little more attention to this link.
2019-07-10 14:51:30 +02:00
7a431d40e3 Fix splash screen margins not being even and buttons not centered 2019-07-10 14:51:14 +02:00
7695fd9cff Fix release notes not showing in splash without recent files 2019-07-10 14:51:14 +02:00
526876a634 Fix T61770 Multiple Hair Systems Not visible while in particle edit mode
The check was for the whole object instead of individual particle system.
2019-07-10 14:44:09 +02:00
b39d7e484c Fix T66631: Crash when converting objects from Curve to Mesh
When `BKE_mesh_new_from_object()` cannot convert an object to a mesh, it
returns `NULL`. This case was not handled at all in
`BKE_mesh_new_from_object_to_bmain()` or `curvetomesh()`, causing a
segmentation fault.

This commit fixes the segmentation fault, and leaves the curve object as
a curve object.

Reviewed By: mont29, brecht, sergey

Differential Revision: https://developer.blender.org/D5217
2019-07-10 14:13:42 +02:00
Dalai Felinto
d3e1782abc Fix T66530: set_stereo_3d (pageflip) exists Blender
Note: Although this fixes the issue (as in, it prevents a crash)
BKE_reports are not working because of CTX_wm_window_set().

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D5210
2019-07-10 09:11:33 -03:00
Dalai Felinto
fde88ad9d2 Fix T66627: Multiobject Edit UV constraint to image bounds
This was broken since the original commit to handle multi-object
editing: rBbfc9d426bb95.
2019-07-10 09:04:24 -03:00
91b4262728 Fix T57489 Eevee: Texture coordinate object reference not working for world 2019-07-10 13:46:28 +02:00
956d38488a Undo System: ensure the text ID for each undo step is used
In practice this wasn't causing errors,
however it could be an issue in the future.
2019-07-10 21:42:17 +10:00
56ec8108e2 Fix T65850 Sculpt: Vertices not hidden if using shape keys 2019-07-10 13:23:54 +02:00
ee4fa41245 Fix T66560 Sequencer: Shortcut keys no showing in menu for 'Move' and 'Refresh All'
The menu shortcut context for 'Refresh All' was wrong and the actual operation
exectuted in the menu for the 'Move' command was different from the shortcut.
2019-07-10 12:57:58 +02:00
12ceea0434 Fix crash when clicking in window while Blender starts
A mouse click in the window will trigger the `VIEW3D_OT_cursor3d` operator
before the viewport is available. This causes a segfault in
`GPU_viewport_engines_data_validate()`.

Other callers of `WM_draw_region_get_viewport()` already check for `NULL`
being returned and handle it gracefully.

Reviewed By: jbakker, fclem

Differential Revision: https://developer.blender.org/D5216
2019-07-10 12:32:10 +02:00
f9232c080d DrawManager: Crash Face Selection
Init the scene of the draw context when selecting. When using face dot selection on
when the subsurf modifier is active on the cage, the scene needs to be
valid. It is read from the context in the
`DRW_mesh_batch_cache_create_requested` and used in the `isDisabled`
method of the SubSurfModifier.

Reviewers: fclem, sergey

Differential Revision: https://developer.blender.org/D5214
2019-07-10 12:18:41 +02:00
6f1190cbf0 Fix T66630 X-Ray + Subdivision surface Face select problem 2019-07-10 12:13:08 +02:00
d3b42fc167 Fix T66626: Crash when using JACK audio device
Restore some context overrides which were originally happening in 2.79.

Made it a bit more paranoid, by storing old values and restoring them
afterwards, so the context is not being changed at the end of the function.
2019-07-10 11:58:37 +02:00
f4b963dbdd Undo: print the undo stack when ed.undo logging is enabled
Print the undo stack on undo/redo when ed.undo logging is enabled.
2019-07-10 19:39:53 +10:00
167f5a61e5 C Logging: add macro to check if logging is enabled 2019-07-10 19:39:53 +10:00
d4d16e7a03 Docs: note about select debug value 2019-07-10 19:39:53 +10:00
2e91fc39ac Fix broken Mesh 'calc_smooth_groups' logic.
We need to check both polygons of a manifold edge to be sure it is
actually smooth...

Reported by Hugo Sales (@someonewithpc) on blender.chat, thanks.
2019-07-10 11:24:37 +02:00
e9d3e056d1 Fix T66571: Unable to change input color space of PSD
Image reader must not override file's color space specification if it
is already specified.
2019-07-10 10:08:18 +02:00
0829bd7b66 Alembic export: avoid BLI_assert() failure when object is not in depsgraph
When the object we iterate over is not part of the depsgraph, we cannot
get the evaluated copy to export. This workaround is temporary to avoid
a BLI_assert() failure getting the evaluated mesh of this object.

This will be handled more elegantly in the new AbstractHierarchyIterator
that I'm working on, but that requires a bigger change than we should
allow this close to the 2.80 release candidate.

This fixes a problem described in T58686.
2019-07-10 09:56:27 +02:00
e927ce8acb Cleanup: avoid line breaks from trailing comments 2019-07-10 14:41:19 +10:00
91b8e57d65 Cleanup: avoid accessing same vars multiple times 2019-07-10 14:01:39 +10:00
31f922bff6 UI: use a label for strip 'frame_final_end'
This is intended for Python access and allows temporary negative frames
which is a problem when accessed from the UI.

This allows:

    seq.frame_final_start, seq.frame_final_end = frame_range

However it allows invalid sequence strips,
using a label is fine since there is a duration property here which
can change the length.
2019-07-10 13:48:03 +10:00
95fcdb0401 Cleanup: reserve single quotes for enums 2019-07-10 13:39:56 +10:00
3b4054cb58 Revert strip start property to strip_start
Using strip_final_start affects strip offset while not moving content.
2019-07-09 15:45:45 -07:00
2893417d67 Fix T62580 Workbench: Shadow glitch due to degenerate threshold
Fix by adding a threshold instead of direct null comparison.
2019-07-09 20:38:46 +02:00
29ebb37419 Fix T66565: crash linking unused light datablock during Cycles preview render 2019-07-09 19:49:09 +02:00
23f1bc7414 Fix T66605: Operation on origins not working correct 2019-07-09 18:52:41 +02:00
3f208ed927 Raise particle count limit for 2.8 release
Blender 2.8 features significant improvements in the creation of particles.
Removed hard limit and increased soft limit.

Patch by Gottfried Hofmann.
Differential Revision: https://developer.blender.org/D5120
2019-07-09 17:43:54 +02:00
b77c01924a Alembic import: fix crash when loading invalid mesh
These were just some missing nullptr checks.
2019-07-09 17:39:02 +02:00
817e2796cb Fix T52814 and T58686: Alembic crashing on fluid sim export
The velocities std::vector was allocated in too narrow a scope, causing
use-after-free errors.
2019-07-09 17:39:02 +02:00
6510ab8676 Fix T66456: UV Editor missing update after selection change in 3D viewport
Reviewers: brecht

Maniphest Tasks: T66456

Differential Revision: https://developer.blender.org/D5207
2019-07-09 15:49:40 +02:00
32f591c0a3 Fix T66610: Planar Track extremely laggy when 3D View is open
The issue was caused by modifications to planar track tagging clip for
copy-on-write, which was invalidating its cache and forcing current
frame in 3D viewport to be re-load.

Ideal solution would be to share movie cache across original and
evaluated movie clips which will reduce memory usage. However, doing
such ownership changes so close to the code freeze is not something
comfortable to do.
2019-07-09 15:46:29 +02:00
fd48ef25a0 Fix (minor) some typos and other errors in UI messages. 2019-07-09 15:30:24 +02:00
b1020ca169 Fix crash on redo applying transforms
When accessing evaluated objects, make sure access to an
evaluated dependency graph is done. This solves possible
access to NULL data on redo.

See https://developer.blender.org/D5209
2019-07-09 14:59:30 +02:00
7bf820fb96 Fix uninitialized loop variable
Fix commit 226c6f086a
2019-07-09 14:55:32 +02:00
977c48b88d Fix T64149: Texture paint can act as a canvas and brush at the same time
I don't know if it was the intended behavior or not, but having brush
and canvas data at the same time with dymanic paint, would lead to the
object trying to act as a brush and a canvas at the same time.

We can't currently handle this with the new depsgraph, and it could
legitimately lead to bad feedback loops.

So now, to be more consistent with the GUI, I've made it only use the
current set type (brush or canvas) as the final type of the object.
That is, you can only have a object be a brush or a canvas, not both at
the same time.
2019-07-09 14:49:08 +02:00
dd84ff212a Fix crash when redoing Set Origin operator
The operator was using a non-evaluated depsgraph to get the evaluated
scene, which caused the crash.

This fixes the crash reported in T66605, but not the problem where
sometimes object origins aren't set.
2019-07-09 14:45:20 +02:00
484794ce67 Eevee: Fix first sample being accumulated without SSR
We check if the previous iteration (sample) was using a valid double buffer.
If it wasn't, we request another iteration.

This fix the issue for viewport,viewport render and image render.

Related to T65761 Eevee render inconsistency between 3D View, Viewport render, and F12 Render
2019-07-09 14:34:56 +02:00
986ff461fb Fix T65761 Eevee: SSRefraction not working on first sample
There is no reason to disable the refraction on the first sample like SSR
does.

This was caussing issues when rendering.
2019-07-09 14:34:56 +02:00
7e34846176 Cleanup: GPU: Correct comment 2019-07-09 14:34:56 +02:00
db45aaafab Fix T61474: laggy interaction on Windows/NVIDIA when gizmos are visible
Thanks to Sergey and Clément for helping to track this down.
2019-07-09 14:03:25 +02:00
89c762dd99 Fix T57652: Multires undo broken with shared object data 2019-07-09 12:12:54 +02:00
25a0acd0a6 GPU: ATI Proxy check
The AMD PRO driver on linux PROXY check also fails. Now the
configuration ATI/Unix/Official driver  will also bypass the
Proxy test.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5205
2019-07-09 12:01:25 +02:00
805cabdf17 Fix T64483: crash when hovering over outliner after closing render window
The `tselem->id` pointer can also be used for non-ID data (according to
this comment in DNA_outliner_types.h:

```
/* XXX We actually also store non-ID data in this pointer for identifying
 * the TreeStoreElem for a TreeElement when rebuilding the tree. Ugly! */
```

As such, I don't mind adding a `NULL`-check in the
`is_object_data_in_editmode()` function. After all, when there is no
object, its data certainly is not in edit mode.
2019-07-09 11:52:16 +02:00
2b43ec56af Fix T66274: Object Texture Coordinate mode not updating in Lookdev / Eevee 2019-07-09 11:24:39 +02:00
516afd0162 Implement Movieclip filter for action editors
Allows to disable keyframes from movie clips in dopesheet.

Reviewers: brecht

Reviewed By: brecht

Subscribers: sebastian_k

Differential Revision: https://developer.blender.org/D5203
2019-07-09 09:59:34 +02:00
ef5d0a927e Fix T66516: WPaint crash selecting bone with wire & face-mask 2019-07-09 15:14:46 +10:00
05d14c4560 Fix T66359: UV editor ignores face-dot size
D5178 by @deadpin
2019-07-09 12:25:19 +10:00
52cf94eeb5 API Docs: Change handling of Blender Version 2019-07-08 20:53:15 -04:00
75d48c6efd API Docs: Hide Home Icon in Seach Area 2019-07-08 20:53:15 -04:00
ac8c795429 GPU: added debug value to investigate lagging issue in T6147 2019-07-09 01:33:20 +02:00
a42cae1600 Fix T55192: Speed fx applied to scene messed up animation
Don't update animdata after rendering scene
Rendering host scene from sequencer is not supported, removed code is unnecessary.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5199
2019-07-08 15:16:46 -07:00
f04424a15d Fix T66573 Heap Corruption when baking to irradiance volume probe
This is an AMD Proprietary driver bug. Will be reported upstream.
2019-07-08 23:52:06 +02:00
96f5918407 Fix (unreported) UI: useless setting shown for Text data-blocks.
Since we do not have start/end settings for bevel object for Text,
mapping taper to those ends makes no sense here, we can hide that
setting.
2019-07-08 22:48:17 +02:00
fa27d81937 Fix T61401: Failure to register a GizmoGroup after unregistering it
It does not seem right to rely on the python code to fix problems in the C code.
But this already works like this with the other Python Classes.
2019-07-08 13:48:01 -03:00
ff91f605f0 Revert "Fix T61401: Failure to register a GizmoGroup after unregistering it"
Problems with ClangFormat

This reverts commit c1bcde0c0f.
2019-07-08 13:44:03 -03:00
be5911571e Revert "Revert "Fix T63447 Particle system: No particles after switching from hair to ...""
This reverts commit 45761e4c7c.
2019-07-08 13:41:27 -03:00
45761e4c7c Revert "Fix T63447 Particle system: No particles after switching from hair to ..."
Problems with clang style

This reverts commit 8d6a5fb5d3.
2019-07-08 13:40:06 -03:00
c1bcde0c0f Fix T61401: Failure to register a GizmoGroup after unregistering it 2019-07-08 13:37:51 -03:00
8d6a5fb5d3 Fix T63447 Particle system: No particles after switching from hair to ...
... emitter type
2019-07-08 18:09:52 +02:00
3f6e17ddaf Fix T63659 "Viewport render image" don't process corectly "Display As" option 2019-07-08 18:09:52 +02:00
7767e080a0 Fix T66008 Viewport: hidden edges are partially visible
This was a regression from 2.79. The zoffset was doubled for some reason.
2019-07-08 18:09:52 +02:00
1715c396e4 Fix T65534 Eevee don't respect active UVmap 2019-07-08 18:09:52 +02:00
8a7c2c4192 Fix T66351 Wireframe display in sculpt-mode broke when hiding parts 2019-07-08 18:09:52 +02:00
9526e236fc Fix T66348 Eevee: Broken shader if using textures and shader_to_rgb node
Was caused by a missing texture resource.
2019-07-08 18:09:52 +02:00
473259f98b Fix T66475 Spin Modifier: Merge Vert Makes mesh disappear 2019-07-08 18:09:52 +02:00
6b7bc30c64 Fix T66470 Planar track is not adjustable
The issue was that the shader used was expecting GL_LINES and the points
were using GL_TRIANGLE_FAN.
2019-07-08 18:09:52 +02:00
226c6f086a Fix T62941 Subdivision Modifier Showing all face dots
Previously in 2.79 we were using a specialized drawing using derivedMesh.

Now the subsurf modifier tag each center vertex as facedot and let the
DRWManager pick it up.

Some modifiers (deforming ones) do not clear the tag so we can use this
technique even if there is deforming modifiers after subsurf modifiers.
2019-07-08 18:09:52 +02:00
0a16519f5d Fix T61129 Eevee: alpha texture shadow bug
Seems like the AMD pro driver does not consider dead code the same as other
glsl compiler.
2019-07-08 18:09:52 +02:00
9a0a952f72 API Docs: Fix file name 2019-07-08 11:45:25 -04:00
867cd8218a Fix T66556: Noisy drivers relations in certain cases 2019-07-08 17:38:40 +02:00
b2a9627600 Fix T62903: black line in UV editor on 32 bit 2019-07-08 17:34:22 +02:00
50d0a74833 Fix T66538: Menus in popups opening on mouse over
Caused by b708917d94

Solve by restricting this change to popovers
instead of other kinds of menus (enums mainly).
2019-07-09 00:55:26 +10:00
a4bc6aca0e Fix T66554: Measure doesn't snap with Ctrl 2019-07-09 00:18:24 +10:00
6546442f4f Fix (unreported) broken 'compse' feature when editing text.
Looks like that code was not updated when we switched to unicode, it was
still returning axtended ascii codes (iso-8859-15 ones I think)...

That was breaking some chars, which have a very different value in
unicode. Found while working on Text section of the Manual! ;)
2019-07-08 16:11:55 +02:00
9cb1810551 Fix T66431: SE - Audio Caching crash
Moved the caching code from direct calls in DNA to dependency graph.

In fact, not much was needed to be done apart form removing the direct
cache updates. The rest seemed to work fine.

Possible to avoid full sound file re-load, but doesn't seem this is
causing any issues.
2019-07-08 15:57:33 +02:00
8066784ac2 Fix T66499: Parenting a Mask to Plane Track doesnt work 2019-07-08 14:48:42 +02:00
27adc4aa33 UI: Update tooltip of Vertex Selection masking
Since it is now possible to use it in Vertex Paint, not just Weight Paint.
2019-07-08 14:40:48 +02:00
4ca054617b Fix T66526: child's objects move if change their origin position
Reviewers: sergey

Maniphest Tasks: T66526

Differential Revision: https://developer.blender.org/D5201
2019-07-08 14:06:10 +02:00
90dae36213 Fix T66524: Eyedropper in popover crashes 2019-07-08 20:40:34 +10:00
d6ebd04bb3 Fix T66525: Wrong apply scale for children chain
The operator did not behave correct when there was a chain of parents
longer than 1.
2019-07-08 12:23:24 +02:00
118a0df7a7 Fix T66517: Clip editor doesn't respect the 2D cursor
Was caused by 91b768ccb1 which re-defined masks menu with the wrong
invoke type.
2019-07-08 11:46:40 +02:00
08aad00a5d Fix wrong colors when creating a float normal map image in texture paint 2019-07-08 11:05:45 +02:00
f49692f429 Cleanup: Spelling in function name 2019-07-08 10:53:37 +02:00
bb2abacb4b Keymap: Vertex Paint: Add ctrl to temporarily swich colors
This now matches Texture Painting
This was added in rB7d5fb2e103e03046194d69640aadf7e76a700620 but was 
lost probably when migrating to python keymap.
2019-07-07 19:53:44 -04:00
d19d0ff99e Fix T66376: Problem with Gpencil fill tool
The fill material has an alpha > 0, but the show fill is disabled, but as the fill tool is considered the fill as visible and the stroke is not drawn, the fill area had a gap.
2019-07-07 22:28:41 +02:00
ad16af7a7e Cleanup: split enum types, use PF_CMP prefix 2019-07-08 00:43:44 +10:00
1357dd7d3c Cleanup: move enum unto BKE_packedFile.h
Use enum type for functions arguments.

Removed -1 check in switch statement, this isn't needed.
2019-07-08 00:17:40 +10:00
084d545202 Cleanup: use BKE_packedfile prefix for function names
Avoid ambiguity with terms check & compare.
2019-07-07 23:57:35 +10:00
28057d54de Cleanup: clang-format 2019-07-07 23:45:35 +10:00
9e12d762a2 Fix crash running an operator from a popup,
Cell fracture redraw option was crashing.
Change operator popup behavior to close the UI before executing
since the operator may perform operations which change/remove the UI.
2019-07-07 22:35:52 +10:00
414875ce96 Cleanup: unused vars, redundant parenthisis 2019-07-07 22:33:35 +10:00
d7f687c833 Cleanup: use static set 2019-07-07 22:33:35 +10:00
0735c12ca8 GPencil: Hide reference points when use Parallel or Grid guide
These options are not used by these modes. Detected while writing the manual.
2019-07-07 09:38:52 +02:00
cd6b49f995 Cleanup: spelling 2019-07-07 15:38:41 +10:00
a3e2076bc4 Docs: update window/screen introduction
Include global region/areas.
2019-07-07 15:22:16 +10:00
f2a11550b9 Fix T66493: Enable Add-on name not showing in favorites 2019-07-07 14:17:33 +10:00
b1c3038f18 Fix Filter Add-ons panel display for missing add-ons
Check the add-on exists before getting it's info.
2019-07-07 14:15:28 +10:00
e68c8ba24e Cleanup: rename gpencil chess -> checker
Match existing texture name.
2019-07-07 13:54:25 +10:00
7a6c50e79c UI: Correct tooltip 2019-07-06 20:35:52 -04:00
313097c267 API Docs: Fix Links 2019-07-06 19:46:05 -04:00
903b5e1082 UI: Cleanup tooltip format 2019-07-06 19:39:48 -04:00
e106765c96 UI: Cleanup tooltip format 2019-07-06 18:58:03 -04:00
e1fbab12dc API Docs: Update Changlog for 2.80 2019-07-06 17:01:11 -04:00
8933a3bbd0 API Docs: Fix Update changelog script to python3 2019-07-06 17:01:11 -04:00
1f2f5f660b API Docs: Use Opensearch 2019-07-06 17:01:11 -04:00
f702830a79 API Docs: Theme: Prevent Super Long Enums 2019-07-06 17:01:10 -04:00
6fad70d551 Cleanup: API Doc Gen: move copying static dir to own function 2019-07-06 17:01:10 -04:00
df5f06cac2 GPencil: Close Box and Circle primitives with geometry
Before the primitives were closed only with cyclic flag, but this doesn't create geometry for the gap. Now, a new geometry is created using close stroke function to have geometry for sculpt or edit.
2019-07-06 16:10:21 +02:00
741f80864e Fix T66501: Eraser very slow with guides
After testing the file, the problem was related to the fill material. As the fill material had the alpha channel set to 1.0, the fill triangulation was calculated, but the fill was disabled.

Now, the fill flag is checked in order to avoid fill triangulation update.
2019-07-06 13:50:24 +02:00
6c1419d1f4 GPencil: Don't add missing events for Eraser mode
This avoid some code that can delay the easer, but still some problems with the test file.

Related to T66501
2019-07-06 13:10:51 +02:00
a0f3ea7da3 Fix T62101: GPencil: selection order is wrong
Following the advices of @Germano Cavalcante (mano-wii) , I have exposed as a workaround the free function to be called from draw manager for selection.

Now, the free function is not called for selection inside gpencil draw_scene, but it's called from draw_manager.c.

The real fix would be create a new Scene_finish callback in draw manager, but as the release of 2.80 is almost here, we fix this with a workaround that must be removed when new callback is in place.

Differential Revision: http://developer.blender.org/D5193
2019-07-05 23:52:26 +02:00
a7a9c0e50d transform_snap_object: return type of element snapped.
This can be useful for filtering some of the returns.
2019-07-05 18:23:06 -03:00
699193713f Fix T66282: Make Instances Real: Keep Hierarchy option broken with recursive instancing.
Preserving/rebuilding relashionships in recursive instancing was simply
not supported at all, code handling that was assuming a single level of
instancing.

This commit makes the following changes:
* Mixing DupliCollection and DupliVerts/Faces in the recursive chain is
now supported (by using a same GHash in all cases, differences of
persistent_id handling in hashing and comparison is now down inside the
relevant functions).
* When both "keep hierarchy" and "parent" options are enabled, code will
attempt to parent new objects to their version of instancer (instead of
parenting them systematically to the root object). This will preserve
the hierarchy much better.
* Collection is removed from dupli empties that have been made 'real'
(the duplication flag itself was already cleared, but the link to the
instantiated collection was kept).
2019-07-05 18:36:47 +02:00
Dalai Felinto
784121d62a Fix T66327 2/2: Make instance real does not clear collection 2019-07-05 12:24:31 -03:00
Dalai Felinto
68c39e2b41 Fix T66327 1/2: Outliner dupli empty is shown as collection when a different duplitype 2019-07-05 12:24:31 -03:00
7b93aebff9 Transform Snap: Fix dependency cycle between transformed object and object with modifiers 2019-07-05 12:13:08 -03:00
18e619ac69 Fix strict compiler warnings 2019-07-05 16:08:51 +02:00
599626edd5 Fix T64342: Incorrect snapping of focus object in camera view
Use more granular dependency graph traversal, which allows to ignore
dependencies which are not related on transform.

Reviewers: mano-wii, brecht

Differential Revision: https://developer.blender.org/D5184
2019-07-05 16:06:13 +02:00
16307d1e2a Depsgraph: Cleanup, more clear naming 2019-07-05 16:06:12 +02:00
97aa43c364 Depsgraph: Make component traversal more granular
Now it is possible to start traversal from a given component.
2019-07-05 16:06:12 +02:00
9e155eb1f0 Depsgraph: Add dependencies traversal which is aware of component
Sometimes it is required to know which exact part of ID is being
dependent on the given iD. Now it is possible.
2019-07-05 16:06:12 +02:00
03ac94f46a Depsgraph: Add inverse of node type conversion functions 2019-07-05 16:06:12 +02:00
ea05edceaa Depsgraph: Make object component conversion more accessible 2019-07-05 16:06:12 +02:00
609e16339f Fix "child of" constraint "set inverse" problematic with bones
For bone owners we want to do this in evaluated domain since
BKE_pose_where_is() / BKE_pose_where_is_bone() rely on (re)evaluating
parts of the scene and copying new evaluated stuff back to original.

Fixes T66080, T66397

Reviewers: sergey

Maniphest Tasks: T66080

Differential Revision: https://developer.blender.org/D5189
2019-07-05 16:00:52 +02:00
34a0b65ba6 GPencil: Remove select keymap definition for Weight Paint mode
This removes the keymap, but the B key is still available, so in some top level the selection is enabled.

Related to T66458.
2019-07-05 16:00:30 +02:00
5cb3d9df1e Fix T66006: View 3D select enumerate + other options fail
Support other options when using the enumerate option.
2019-07-05 23:55:23 +10:00
9ffb87c629 Fix T66296: Black artefacts on materials with refraction on CPU
The issue was in the optimization code path for opaque shadow rays
which was wrongly considering all primitives in the node to have
same visibility flags.
2019-07-05 15:48:50 +02:00
3c7814d7de Workbench: Disable texture paint drawing for final render 2019-07-05 15:40:48 +02:00
d1349bd0c7 TexturePaint: Force Workbench Texture Color Mode
When in texture paint mode and in solid mode the object that is being
texture painted will be rendered by the workbench engine with textures.
All other objects would render the same. For other cases the texture paint
draw engine will still draw the texture.

The texture mode draw engine now only drawn the masks. The opacity
sliders influences the texture mask.

This change has been implemented conserably. In the future we need to
look into making this better, like adding support that every object
can be colored differently. Currently when rendering in the workbench
we can have up to 3 different color types active (what the user selected,
the fallback in case no materials have been configured and this one,
forcing textures)

Reviewed By: fclem, brecht

Differential Revision: https://developer.blender.org/D5190
2019-07-05 15:21:11 +02:00
15cc4c4cb3 Cleanup: use doxy comments for WM_types.h 2019-07-05 21:42:21 +10:00
db8c93c02f DRW: add back gl_PointSize for AMD drivers 2019-07-05 21:42:35 +10:00
3640a58b9b Keymap: add V-key to toggle vertex select in vertex paint mode
Match weight paint mode.
2019-07-05 20:20:26 +10:00
4125a330b9 Cleanup: remove redundant gl_PointSize assignment 2019-07-05 20:07:33 +10:00
e7325bedfb DRW: weight-paint wire overlay made vertex selection hard to see 2019-07-05 20:06:47 +10:00
68ec4c26b9 Fix paint modes using edge-selection in non-selection modes 2019-07-05 19:04:37 +10:00
5d75672720 DRW: tweak paint edge drawing to show all unselected edges
32d3bce1ea changed behavior when it shouldn't have.
2019-07-05 18:43:32 +10:00
Alessio Monti di Sopra
1468f77a29 VSE: draw cache on top of markers area
Differential Revision: https://developer.blender.org/D5104
2019-07-05 09:51:12 +02:00
Eitan
baf3887207 UI: Smaller minimum size of scrollbar
Differential Revision: https://developer.blender.org/D5086
2019-07-05 09:46:18 +02:00
c27d70853d Fix T66404: knife tool doesn't use knife cursor 2019-07-05 17:44:47 +10:00
338cbe4ad6 Fix T66453: navigation gizmo doesn't refresh on theme change 2019-07-05 16:36:01 +10:00
31d762c3a8 Fix T66356: runtime assert disabling a collection 2019-07-05 16:28:01 +10:00
66684bdff3 Cleanup: redundant scene access, duplicate flag clear 2019-07-05 16:13:24 +10:00
4a08b974f4 Workaround T61948: Undo steps created for non-paint operations
Changing the brush size for example,
was adding redundant undo steps in paint-modes.

For now, don't store undo steps for property changes
in paint & edit modes.

While not ideal, this is similar to 2.7x behavior.
2019-07-05 13:48:17 +10:00
fdcfc263e9 Use latest/version number for manual links
We want users to go to the current version for their current version 
when possible if not point to latest.

/dev should really only be for development related work. End users 
should not be browsing /dev unless they are reading about upcoming 
features ahead of time.
2019-07-04 18:24:36 -04:00
2740bdfff9 Fix T66362, T66004: Cycles holdout should override indirect only
Now it works again like 2.7, rather than objects disappearing from camera
rays when both options are on.
2019-07-04 18:16:36 +02:00
eed19d9f45 Fix T64253: missing update when moving nodegroup input/output sockets up or down
Reviewers: brecht

Maniphest Tasks: T64253

Differential Revision: https://developer.blender.org/D4959
2019-07-04 18:03:27 +02:00
ab71991a78 Fix T66433: skin resize (Ctrl+A) crashes non-mesh objects
slow poll was altered in rBc252fe7a32ab after recent fix, now be a bit
more specific about meshes only.

Reviewers: brecht

Maniphest Tasks: T66433

Differential Revision: https://developer.blender.org/D5185
2019-07-04 17:39:17 +02:00
178bae9504 GPencil: Fix unreported error with occlude eraser
The option was inverted in RNA and worked opposite of expected.
2019-07-04 17:38:40 +02:00
9ffce6da65 T66266: Grease Pencil Simplify Adaptive is not behaving correctly
Now the simplify code works correctly in 3D space. Before it was trying
to project the strokes down into a local 2D space, but that didn't work
nicely for strokes with overhangs or big changes in the stroke
direction.

The code in question was simplified as well which lead to some nice code
reduction.

Reviewed By: Antonio Vazquez

Differential Revision: http://developer.blender.org/D5183
2019-07-04 16:29:05 +02:00
7ba096e1e7 Fix T63788: Crash if particle system is turned off in particle editing mode
Make sure particle system edit never points to a modifier or particle system
which becomes inactive.

This is needed because copy-on-write will change pointers of them and those
pointers are supposed to be restored from particle system evaluation. But
since the particle system is disabled it never updates pointers.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5180
2019-07-04 15:47:41 +02:00
9e8e479a52 Cleanup: Suppress warning
Introduced by previous commit
2019-07-04 15:44:49 +02:00
88d8f3a765 Workbench: Support for MatCap + Textured models
Now it is possible to enable MatCap lighting on top of textured models
in the workbench engine.

Reviewed By: fclem, brecht

Differential Revision: https://developer.blender.org/D5182
2019-07-04 15:42:46 +02:00
e2bf240cbf GreasePencil: Image render artifacts
When doing image rendering with grease pencil, it reused the view of
workbench or EEVEE. These views might be offsetted due to TAA.

This shifted the view a tiny bit. We will not reset the view in between
render engines.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5171
2019-07-04 15:41:36 +02:00
2ee257e2c3 ImBuf Py API: add crop method 2019-07-04 22:18:30 +10:00
c06eb4ab94 Fix T66414: Brush Color Flip from keyboard (X) does not update color picker panel
Reviewers: brecht

Maniphest Tasks: T66414

Differential Revision: https://developer.blender.org/D5181
2019-07-04 13:39:44 +02:00
c497a7efab ImBuf: add crop function (move out of screendump.c) 2019-07-04 21:15:18 +10:00
b2e3f23bec Cleanup: remove redundant cast 2019-07-04 21:14:12 +10:00
acf26dee5f Fix T66412: crash with displacement and AO node in viewport renders 2019-07-04 13:11:55 +02:00
33987caf3e Fix T63260: Rigid body connect 2019-07-04 13:10:27 +02:00
944458fe6c Industry Compat keymap: Fix keymap conflict related to snapping
There were some keymap conflicts and inconsistencies here. After this change, it works as follows:

Snap toggle on/off: X
Snap pie: Shift-X
Viewpoint pie: V

This is now consistent in all editors and the 3d View conflict should be gone
2019-07-04 13:04:40 +02:00
711960b3c2 node_shader_utils: add possibility to override image colorspace
'is_data'

since the move from 'cycles_shader_compat' (2.79) to
'PrincipledBSDFWrapper' (2.8) we lost the ability to (automatically) set
this colorspace setting for imported textures. This was useful for e.g.
normalmaps to always assume 'Non-Color' data.

This adds the possibility to overide and uses this for normalmaps...

Fixes T66368

Reviewers: mont29, brecht

Maniphest Tasks: T66368

Differential Revision: https://developer.blender.org/D5176
2019-07-04 12:32:25 +02:00
669d50f803 Fix T66405: Python API documentation
removed glVertex from the Python bgl api documentation as they are
deprecated.
2019-07-04 09:19:48 +02:00
d2788510fb API Docs: Update Build Dependencies 2019-07-03 22:47:44 -04:00
66a69fa220 API Docs: Theme Options
- Limit Nav depth to 1
- Turn off stick nav
- Add canonical_url
2019-07-03 22:46:52 -04:00
c252fe7a32 Transform: don't inspect all scene objects in poll
From fix for T66311, c6a199e254

Poll functions should never loop over entire scene,
in this case behave as other transform operators,
only checking the active screen.
2019-07-04 08:34:25 +10:00
cc667854a9 Fix T66372 Convert to mesh with subdivision breaks topology
This was caused by a check that was not taking the restart index into
account.
2019-07-03 21:06:33 +02:00
b8ed75ab6d Fix T61808: remove confusing graying out of workspace that already exist
This was meant to help users see which users are likely useful to add, but
it's not so obvious and there are cases where it's useful to re-append the
same workspace.
2019-07-03 20:44:04 +02:00
0a3e73a91f Fix T65899, T66314, T61808: various issues appending workspaces
This fixes crashes, wrong names and inability to append workspaces in
edit mode. We now bypass the append operator so we can easily return
a datablock pointer and work in any mode.
2019-07-03 20:44:04 +02:00
466cc3fbe4 Fix invalid state after calling append/link operator without any items 2019-07-03 20:44:04 +02:00
771ea2d73f Fix missing update when setting rigid body world collection 2019-07-03 20:44:04 +02:00
4d6172044c Fix T66332: Move gizmo stays in place when vertex is deleted
Reviewers: brecht

Maniphest Tasks: T66332

Differential Revision: https://developer.blender.org/D5177
2019-07-03 19:48:57 +02:00
2866c74208 Fix T59225 Screw modifier not displayed when using single vertex 2019-07-03 18:39:10 +02:00
c6a199e254 Fix T66311: skin resize (ctrl+a) could crash
could happen when used on multiple objects with multi edit, and skin
modifier was not present on all participating objects

Reviewers: brecht

Maniphest Tasks: T66311

Differential Revision: https://developer.blender.org/D5165
2019-07-03 17:51:13 +02:00
5277557755 Fix T66165: RGB Curve node generates too bright color
The issue was that the end point would be extrapolated and it would lead to
very high values if the curve had a near inf slope. Now we use the actual end
point value and only extrapolate values that are outside of the start and
endpoint range.

Differential Revision: https://developer.blender.org/D5151
2019-07-03 17:18:13 +02:00
82990ce2b5 Cleanup: rename variables for easier understanding 2019-07-03 17:11:19 +02:00
eb0142e9af Cleanup debug print left in by mistake.
Thanks to @brecht for noticing it. :)
2019-07-03 16:45:35 +02:00
21668359b7 Fix T66234: Issue on switching material mode between Object and Data
The root of the issue comes to the fact that part of dependency graph
is being removed, without doing any further remapping.
This was happening because only materials used by objects were pulled
in, so when material mode is changed some material became unused and
removed from the dependency graph and freed, causing object or its
data to point to a freed memory in its materials array.

Simplest and safest way to solve this is to pull materials referenced
by both object and object data. This causes somewhat higher memory
usage but keeps evaluated state of scene in an always consistent state,
without any need to tag/update object's data on material mode change.

Don't think it is a problem in practice.

Reviewers: brecht, fclem

Reviewed By: brecht, fclem

Differential Revision: https://developer.blender.org/D5172
2019-07-03 16:32:13 +02:00
5b2705adf6 Fix T66353: VSE: Missing updates when moving strip with animation 2019-07-03 16:31:33 +02:00
c441448359 Fix T66369: Excessive WARN messages in console when opening older files
CDData checking on file load was not taking into account deprecated
CD_MTEXPOLY datatype, which unfortunately shows same weird glitch as
CD_PAINT_MASK and CD_FACEMAP ones...

Note that it was annoying (due to amount of warnings in console), but
totally harmless, since that data type is just deleted anyway.

This commit also generally cleans up the CD_MTEXPOLY deprecation code, we
have a system to handle that, let's use it, instead of defining local
static values to replace it...
2019-07-03 16:05:31 +02:00
3d187a2764 Fix T66377: Applying rotation/scale on a parent changes location of a child 2019-07-03 16:03:17 +02:00
65b2cc2301 Fix T66370: add_relation Message in Console with certain shaders 2019-07-03 14:27:28 +02:00
bad5c379c6 Fix T66374: Crash when adding non-mesh object 2019-07-03 14:06:54 +02:00
f990c23bcf Fix T66366: Multi object edit makes blender crash
Two issues here:

- Evaluated object data is to only be updated for selection only after modifier
  stack is done its job. Otherwise it's possible to have selection batch update
  called on an input data, at the same time as original object data is being
  evaluated.

- If object's modifier stack did not create its own evaluated mesh (in case
  when there is no effective modifiers, for example) can not update selection
  on object's data, as it might cause threading issues between objects sharing
  same data.
2019-07-03 11:54:56 +02:00
055289a95f Fix: failing test gp_workbench 2019-07-03 08:23:52 +02:00
c122bcc182 BKE Particle: Simplify recent changes in distribution code 2019-07-03 00:58:14 -03:00
Dalai Felinto
50ccbe6bb2 Fix T63302: Crash when baking normals from selected to active with no cage
When we create the cage procedurally, we need to remove any edge split
modifiers. Since the new depsgraph in 2.80 we were removing the
modifiers straight from the evaluated object (it is a copy anyways).

On top of that we need to reset its eval data state (BKE_object_eval_reset)
to make sure the call to BKE_object_to_mesh to generate the cage would take the
new modifier stack state into account.

However doing so was freeing the low poly mesh we use later to convert
the normal space.

The solution (and this patch in fact ;) ) as suggested by Sergey Sharybin is to
use BKE_mesh_new_from_object() directly as well as force the modifiers to be
recalculated when any edge split modifier is removed.
2019-07-02 19:33:49 -03:00
2d35fed6f8 GPencil: Fix unreported error in stroke thickness when applies scale.
When apply the transformation, the thickness of the stroke was wrong because the scale was not applied to pressure.
2019-07-02 19:17:38 +02:00
a5b7cf9b5f Fix T53058: Crash when rendering to Quicktime RLE codec
The root cause seems to be an assumption in
[generate_video_frame()](https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/intern/writeffmpeg.c)
that we're always using 4 bytes per pixel. This is not true when using
QTRLE in RGB mode, because that uses the RGB24 pixel format (so 3 bytes
per pixel). Just updating the `linesize` property doesn't fix it though,
but just creates a crash somewhere else.

This at least fixes the crash by always forcing RGBA to be written, even
when the user selects RGB.
2019-07-02 18:20:52 +02:00
09ea5dfd09 Fix assert in Alembic tests with constraints
Leave the reader to be created on the CoW object in the depsgraph evaluation,
don't assign the one used for importing to the original object.
2019-07-02 18:09:01 +02:00
2062d649bf Fix workbench render crash in background mode 2019-07-02 18:09:01 +02:00
87c39f1123 Fix T65798: Incorrect auto-tex space for Curves
There are several aspects to the fix:

- Always calculate bounding box for meshes and curves from dependency
  graph evaluation function.

  There is a reason why mesh was tagged for geometry update, so can not
  be spare here in attempts to avoid calculation.

- Copy bounding box and texture space to original object for active
  dependency graph.

  This matches object-level bounding box and allows to remove bounding
  box evaluation from RNA.
2019-07-02 16:51:17 +02:00
65bc59a56d Fix T66340: Missing particles in Grid and Volume distribution.
This solution only alleviates the problem.
2019-07-02 11:44:50 -03:00
57c26453f8 Fix T66295 Collection instance duplicates don't have selection outline
Was cause by shgroup reuse even if select state changed from previous dupli.

Also fixes T64438 Collection Instance object highlight wrong
2019-07-02 16:04:38 +02:00
c362ca3b8a Fix (unreported) untranslatable title of Quick Favorites menu.
Side minor fix found while checking on T66235.
2019-07-02 15:41:20 +02:00
1f65606911 Buildbot: Disable test step for now
It causes some false indication of a failed build on soma platforms
where it times out.

Windows and macOS needs extra work to properly support python paths
and path to the bundle.

This can now happen without poking git every time by doing local
modifications on a builder prior to commit.
2019-07-02 15:39:47 +02:00
e7356bb011 Buildbot: Fix missing configuration for Win ctest 2019-07-02 15:31:06 +02:00
e4df8b005f Fix T64805: Can't generate particle hair edit 'comb cache' in blender 2.8
Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5162
2019-07-02 15:19:02 +02:00
26e6bb3fa3 Fix T65778: Missing selection update with linked objects in edit mode 2019-07-02 15:17:17 +02:00
71099a3d67 Fix T66290: new Node's init api callback was not handling ID usercount.
As Usual...

Note that we have to edit each C-defined of those callbacks that set
Node->id pointer, instead of just moving the generic call to
`id_us_plus()` in `node_init()` below the call to
`ntype->initfunc_api()`, since that one manipulates RNA pointers, which
are supposed to already handle usercounts themselves on assignment.

The C callbacks are moving back to manipulating directly DNA, so it's
their responsability to handle user count then (Py code should do that
automatically through RNA assignement).
2019-07-02 15:12:59 +02:00
163996b681 Cleanup: move comments onto own lines to avoid breaking lines 2019-07-02 22:17:22 +10:00
b708917d94 Fix T66316: "Open on Mouse Over" doesn't work in some popovers
Popovers created from `UILayout.prop_with_popover` opening on mouse-over.
2019-07-02 22:16:33 +10:00
df330ab2bb Buildbot: Fix missing environment for schroot tests 2019-07-02 14:15:44 +02:00
bc0a0a1005 Fix T66322 Object with particle system have expanded selection region
This was caused by wrong pixsize calculation during selection.

Note that this was affecting selectability of lamps too.
2019-07-02 14:06:03 +02:00
ef750790d2 Compositor: Background Fit UI Scale
Make the fit background relative to the UI scale.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5150
2019-07-02 13:35:23 +02:00
5439f682fd Buildbot: Correct previous commit 2019-07-02 12:56:07 +02:00
3cc51cf28c Buildbot: Use correct path to scripts
The `scripts` is to be included into the path, not just the
folder where the scripts are.

Also specify path to datafiles.
2019-07-02 12:52:53 +02:00
6b17b51baa Buildbot: Attempt to make ctest use proper installed scripts 2019-07-02 12:36:07 +02:00
3ff984d746 Buildbot: Enable GTests and test step 2019-07-02 12:07:20 +02:00
10b694877b Cleanup: spelling 2019-07-02 18:05:10 +10:00
a9635c6384 Cleanup: rename set_inverted_drawing, move to GPU_state 2019-07-02 12:34:27 +10:00
1278853849 Fix T61360: Smooth Weights affects all objects 2019-07-02 08:59:40 +10:00
4f321a3373 Fix crash unlinking non-ID types in the outliner 2019-07-02 08:45:28 +10:00
5892233319 Fix submodules hash in previous commit 2019-07-01 23:50:50 +02:00
983ca12d82 Fix T65468 Nurbs: Broken display when hiding control points 2019-07-01 23:49:31 +02:00
9fbfa218e0 Updated tooltips for operators 'Transfer Mix' and 'Join Shapes'. Fixes typo 2019-07-01 23:06:32 +02:00
fcc567b797 GPencil: New python API for closing strokes with geometry
Adds to API the last function created to close strokes in a previous commit.
2019-07-01 23:03:03 +02:00
05a54beb88 GPencil: Add new parameter to python API for activating the new created frame
Sometimes is required to enable the frame created and new "active" parameter allows to do that.

Use: `gpl.frames.new(5, active=True)`
2019-07-01 22:48:48 +02:00
cbc0ad07b3 Fix T65974 Workbench: transparency rendering broken 2019-07-01 22:32:25 +02:00
2002b29ecd Workbench: Combine Xray Alpha with object/material alpha ...
... instead of overiding it (previous behavior).

In practice it's not really noticeable.
This means an object with alpha will never be more opaque when enabling
xray.
2019-07-01 22:29:16 +02:00
c2a762c8e6 Fix T65771 Eevee: Volume Emission not working if density is zero 2019-07-01 20:05:13 +02:00
dcf520cdad UI: increase size of scale gizmo circle
The scale gizmo wasn't working usefully for uniform scale.
2019-07-02 01:48:58 +10:00
016d5cf919 Gizmo: support for filled circle with inner non-zero radius
Needed for changes to the scale gizmo.
2019-07-02 01:48:58 +10:00
4749edccdd Tests: Point ffmpeg data to a new folder 2019-07-01 17:19:01 +02:00
c6d073f6a4 Revert "Rename operator 'Join Shapes' to 'Transfer Mix'."
This reverts commit 741967079c.
We are in UI and API freeze, and this changes both.
2019-07-01 16:53:41 +02:00
510daea545 Linux: add initial 2.80 release information in appdata 2019-07-01 16:53:41 +02:00
69b5a06823 Docs: for release builds, link to specific manual version 2019-07-01 16:53:41 +02:00
9197462e07 Revert "Fix T65798: Incorrect auto-tex space for Curves"
The fix broke a lot of Cycles regression tests. Reverting for now.

This reverts commit 6b9c41719b.
2019-07-01 16:49:12 +02:00
6b3e709feb Theme: minor tweaks to state colors
Use full saturation (since some intensity is lost when blending),
Set blend back to 0.5, made color look dull which isn't good when
some of the colors are similar (faded orange/yellow).
2019-07-02 00:35:27 +10:00
32d3bce1ea DRW: replace edge hash with an edge aligned bitmap 2019-07-02 00:29:31 +10:00
a6fe4d112f Fix: widget states had too low contrast
It was very hard to read the sliders when they had states such as animated or changed.
Slightly increase contrast to alleviate this.
2019-07-01 16:26:06 +02:00
31b2c4c10a Fix T60289: changing gizmo properties causes excessive redraws 2019-07-01 16:15:07 +02:00
bbbb5cad31 Fix T66277: Pinning Fluid Domain properties causes bake error
Reviewers: brecht

Maniphest Tasks: T66277

Differential Revision: https://developer.blender.org/D5161
2019-07-01 15:47:43 +02:00
28fee762ae DRW: Fix Crash in DRW_draw_depth_object when object batch cache is not init
This can happen if the viewport is not redrawn before calling an operator
(frequent in python scripting).

Related to T64805
2019-07-01 15:46:28 +02:00
2698544db2 Fix T66262: slow preview icon loading 2019-07-01 15:36:02 +02:00
3c6260d42d Fix T66301: Crash on vertex slide when the vertex is not linked to a face. 2019-07-01 10:27:26 -03:00
7a4c99de5a Fix T66292: Alpha Blend transparency glitches with volume 2019-07-01 14:44:01 +02:00
809f81cc3a Fix T66207: Invalid depsgraph relation when driver uses object dimension
Would be nice to find a more proper and generic solution instead of name
based comparison, but can not really think a nice way to go currently.
2019-07-01 14:34:23 +02:00
e1cb15c5d6 Fix T66300: GPencil layer context menu not working in topbar layer popover 2019-07-01 13:24:41 +02:00
76aff66301 PaintingModes: Facemask Wireframe Drawing
The wireframe drawing for face masks is intrusive as selected wires
were solid white and always drawn. This made it hard for users to see
the exact color near edges.

This patch draws only the border of the selected faces,
edges between two selected faces are not drawn at all.

Reviewed By: brecht, fclem

Differential Revision: https://developer.blender.org/D5147
2019-07-01 12:47:12 +02:00
6b9c41719b Fix T65798: Incorrect auto-tex space for Curves
There are several aspects to the fix:

- Always calculate bounding box for meshes and curves from dependency
  graph evaluation function.

  There is a reason why mesh was tagged for geometry update, so can not
  be spare here in attempts to avoid calculation.

- Remove texture space evaluation from RNA accessor.

  Such data is to be evaluated by a dependency graph.

  Don't see a reason to be different here: we never force evaluation of
  any kind from RNA.

- Copy bounding box and texture space to original object for active
  dependency graph.

  This matches object-level bounding box and allows to remove bounding
  box evaluation from RNA.
2019-07-01 12:42:42 +02:00
67fc4f4bed Fix T66267: only add DEG cloth collision relations if collisions are
enabled

was detecting unneccessary dependency cycle

Reviewers: sergey, brecht

Maniphest Tasks: T66267

Differential Revision: https://developer.blender.org/D5160
2019-07-01 12:31:41 +02:00
1f79aa602e Fix T66297: Blender on macOS does not open on case-sensitive file system 2019-07-01 12:17:58 +02:00
c64b72998c Fix T66283: Crash on redo/undo during playback 2019-07-01 11:31:53 +02:00
89946834a1 Fix T66279: Strip sound keeps playing after toggling to Camera
Before this change using Sequencer input for the scene strip would
permanently enable sound playing back for that strip. Going back to
Camera would have been still playing sound from the strip, which is
rather misleading since rest of the nested sequencer is not used.
2019-07-01 11:14:18 +02:00
65d770ffa3 Fix T66287: use keyword argument in freestyle text style loading 2019-07-01 09:44:08 +02:00
cf73569d89 UI: run interactive 'Point From Normal' in normal menu 2019-07-01 16:48:47 +10:00
cfea0d9eb8 GPencil: Fix wrong title missing in previous change 2019-07-01 08:40:31 +02:00
c74626c54f Fix keymap editing not tagging dirty
Partial fix for T65629
2019-07-01 16:11:37 +10:00
6f61b6aa44 Fix T66289: Default keymap conflict selecting curve/channels
The default keymap conflicted selecting by curves and channel.

Caused by 325b0ad2ed

Revert to original keys, use click instead of press
to avoid conflicting with box-select.
2019-07-01 16:04:17 +10:00
8eae674eee Fix preferences setting dirty when editing keymap items 2019-07-01 15:16:23 +10:00
fc10a5cf9e Fix T66229: gizmos overlap when switching modes 2019-07-01 13:51:13 +10:00
1a5e1273c1 Fix T66192: Remove gizmos label from topbar 2019-07-01 13:24:57 +10:00
05129ffb3e Cleanup: move screen region find into utility function 2019-07-01 12:10:49 +10:00
26e05cf67a Fix T66246: Key accelerators crashing on save dialog 2019-07-01 11:47:01 +10:00
bbb3500c97 UI: Use Plural Panel Names 2019-06-30 15:51:01 -04:00
ea4b279c32 UI: Use term "3D Viewport" 2019-06-30 15:51:00 -04:00
35045b6135 Fixed compiler warning
`(1L << 31)` can cause an integer overflow on 32-bit systems, `(1UL << 31)`
won't. Fixed as per LazyDodo's suggestion in
https://developer.blender.org/rB956cb4f403dd3a6ddb379202dc1f2770b9820073#238718
2019-06-30 21:49:10 +02:00
789c6e94fb GPencil: Improve Cyclic operator to generate geometry
Now, when close a geometry with cyclic is possible generate new geometry for the gap.

The cyclic operator now supports multiframe edition too. Before only worked with active frame.

Also added the corresponding missing menu options and the new F keymap. All these features were missing, pending of the fix of the alpha glitches in stroke already done.
2019-06-30 21:06:10 +02:00
741967079c Rename operator 'Join Shapes' to 'Transfer Mix'.
The new name is consistent with the 'Transfer Shape' operator.

- Updated the UI descriptions for both transfer operators.
2019-06-30 20:07:17 +02:00
7c8bf77e13 Fix T66204, bevel numeric input respect scene units. 2019-06-30 11:32:38 -04:00
f8f3aca1d4 Fix T66264: UI: Repeated word typo 2019-06-30 11:26:32 -04:00
e40f3f5c48 GPencil: Fix text for Pattern stroke as Stencil Mask
Detected while writting manual.
2019-06-30 09:30:05 +02:00
be060c3990 Fix T65929: multi-object editing for new normals tools.
Leaving the modal point-at as a TODO for now.
All the rest of the new split normal tools converted to
operate on all selected objects.
2019-06-29 16:58:11 -04:00
3994084e6a Cleanup: Fix build warnings with MSVC
gflags emits a few unused variable warnings since the main
CMakeLists.txt raised the warning from w4 down to w3. This
restores it back to w4 in the remove_strict_flags macro.
2019-06-29 09:42:49 -06:00
e981d93fa6 UI: Make Panel Name Plural
This is more consistent with other panels; for example "Shadows"
2019-06-29 11:35:30 -04:00
6f002d1a92 Fix T66250: Repeated word typo 2019-06-29 11:12:50 -04:00
f566212aa2 Fix T66230: delay in the material preview panel after recent changes 2019-06-29 16:01:28 +02:00
1044a3b657 Fix wrong usage of U.ui_scale, drawing code must use U.dpi_fac 2019-06-29 16:01:28 +02:00
8637ff5c96 Fix T66240: clip editor shows Python error about tool header 2019-06-29 16:01:28 +02:00
dd6aff71a7 Fix compilation error without Cycles logging 2019-06-29 13:54:38 +02:00
f021635bd5 WM: support window context override
This makes it possible to take a screenshot from any window in Python.
2019-06-29 18:21:53 +10:00
71086995a5 Cleanup: Fix build warnings with MSVC.
ffmpeg defines some of the math constants if they are not
found before including any of its headers, this lead to
a build warnings about M_E, M_LN2 and M_SQRT1_2 being
redefined once BLI_math_base.h gets included.
2019-06-28 22:53:58 -06:00
97e3af9a05 RNA: Add Screen.is_temporary
Useful to check if the current window is temporary.
2019-06-29 13:39:34 +10:00
b7a03eed8b Fix T66238: Spelling typo 2019-06-28 22:01:26 -04:00
b93e57dcdf Fix T66102: Animation color hard to see when sliders is set to full
Change logic for slider coloring, instead of reducing the blend,
de-saturate the slider and ensure contrast.
2019-06-29 11:24:14 +10:00
4afc9d8e4d Cleanup: de-duplicate button color flag checks 2019-06-29 11:20:09 +10:00
648e8a1f1d UI: Add "(Walk/Fly)" to navigation operator name
Without this, searching for the operator is more difficult.

D5148 by @a.monti
2019-06-29 08:08:02 +10:00
5762137f35 Fix T66224: Grammar in Key Set error messages 2019-06-28 21:44:19 +02:00
daf8e73886 Sequencer: Assign Refresh All to Ctrl-R.
This is needed based on studio feedback to make it quicker to refresh the sequencer clips.
2019-06-28 19:16:04 +02:00
b31af8682c Fix audio not updating when snapping strips in sequencer 2019-06-28 18:02:54 +02:00
c9238e638f Cycles: add back control to render first N bounces with path termination
It's found in the Sampling > Advanced panel and 0 by default. This helps to
reduce noise in some scenes, while making others slower.
2019-06-28 17:47:53 +02:00
4e8c5f4bc8 Fix Cycles OSL assert when running tests 2019-06-28 17:42:35 +02:00
d44aebd3fe Previews: delay icon preview renders a bit for smoother interaction
With Eevee the user interface, 3D viewport and small icon materials previews
are rendered on the same GPU. This can lead to some choppy interaction when
dragging sliders. Delaying the icon preview render until the user is done with
that helps a bit, though it's no guarantee.
2019-06-28 16:47:55 +02:00
e8cb477f8a Creator: Clarify verbosity command line argument
Hopefully it is now clear that verbosity needs to be used with
flags which are enabling debug messages.
2019-06-28 15:45:29 +02:00
0511de99bb Fix non-working verbosity when set prior to --debug
Before this change doing something like `--verbose 10 --debug-cycles`
did not properly set verbosity, only using those arguments in an other
way around was leading to a correct verbosity level.
2019-06-28 15:45:29 +02:00
8401ee24ff Fix issue in Blender 2.7x mask keymap after recent changes 2019-06-28 15:05:36 +02:00
533e267e95 Remove Sticky option from the Floor constraint
This option from the very beginning of its existence needed more work
to make it work correct and this was never done.

This option was working fine during continuous playback, when there
are no skipped frames, but it was failing when AV-sync of framedrop
was enabled.
It was never working correct when jumping between frames, including
rendering on a farm which usually does frame-range based rendering.

With copy-on-write things became even more tricky, since the "stuck"
flag was never preserved between re-evaluations.

Fixes T65683: Sticky Option in Floor Constraint for Bones Not Working
2019-06-28 15:03:24 +02:00
Dalai Felinto
f5e0ae655e Python Templates: Small fix for gizmo custom geometry
The mouse offset was inverted (the widget was going the opposite direction as the
mouse movement).
2019-06-28 09:57:16 -03:00
Dalai Felinto
30d65c326a Python Templates: Update Custom Nodes tooltip
Since we exposed the editors sub-types to the type editor selector, this template
no longer shows in the head, but in the type editor selector.
2019-06-28 09:57:16 -03:00
Dalai Felinto
0519bb584b Python Templates: Silence _MT_ warning in pie menu template 2019-06-28 09:57:16 -03:00
Dalai Felinto
da25748be7 Python Templates: Fix Operator Mesh Add
This was broken since: 06fe2a5e0c
2019-06-28 09:57:16 -03:00
2ffcb80cb6 Python tests: replaced imp with importlib
The `imp` module has been deprecated since Python 3.4, and is replaced
by `importlib`.
2019-06-28 14:37:04 +02:00
dee6fe1441 GPencil: Rename "Clamp Layer" to "Mask Layer"
The old name was not meaning what this option does. Dtected while writting the manual.
2019-06-28 14:24:23 +02:00
4f3f68df30 Fix T66126: Non-active Grease Pencil object stuck in draw mode
Now the modes are reset for grease pencil objects.

Differential Revision: http://developer.blender.org/D5138
Reviewers: @dfelinto
2019-06-28 13:56:16 +02:00
d7d9320f09 Tests: disable keymap hierarchy tests until they are fixed
This is not a critical issue, and it's important to have tests always passing.
Ref T65963.
2019-06-28 13:49:04 +02:00
Dalai Felinto
40a1c67165 Fix T65263: Outliner doesn't display selected object if parent not selected
This works for most situations, however if you have:

```
A
 |-> B
     |--> C
```

And only A and C are selected, C will be shown nested under A, instead
being by its side.

I still have to think on how to address these cases since they are
slightly misleading.

Related: T65263.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5134
2019-06-28 08:38:04 -03:00
782813e463 Fix T65956: node reroute no longer working in right click keymap
It's now always on shift + RMB drag, regardless of the keymap.
2019-06-28 13:06:50 +02:00
980726c1d4 Fix issues with masking tools and RMB/LMB keymaps
This makes things work more similar to 2.79 until there is a toolbar for
mask editing. Select & slide is now always on the left mouse button.

For the LMB keymap the context menu is on the right mouse button. For the
RMB keymap the select & move is on the right mouse button, which is almost
the same as select & slide but for historical reasons there is still a
distinction.

Differential Revision: https://developer.blender.org/D5070
2019-06-28 12:34:02 +02:00
56d52466ef Fix message subscriber using the wrong workspace 2019-06-28 19:38:44 +10:00
f35ef57c8c Revert "Fix invalid area tool being set from message passing"
This reverts commit 9ec8887599.

Causes assert when selection changes modes.
2019-06-28 19:38:44 +10:00
6f0de2328c Fix OpenMP library for tests on macOS 2019-06-28 11:22:33 +02:00
9bcab8050f Fix T63694: Crash using tool gizmos with multiple windows
Gizmo group types now store a user count so they aren't unlinked
while other tools are using them.

The tool system now works with multiple windows.
2019-06-28 18:22:53 +10:00
eac11046a1 Fix T62990: Selecting bones causes pose to be re-evaluated 2019-06-28 10:13:57 +02:00
2110f4a76c Fix T66105: Changing force field does not update simulation 2019-06-28 09:48:44 +02:00
37d5d10849 Fix T66200: Changing workspaces / modes doesn't update tools
Changing the workspace or mode from one window may need to change the
active tool in another window since two different workspaces
may share an object.
2019-06-28 17:43:14 +10:00
9ec8887599 Fix invalid area tool being set from message passing
This wasn't working with multiple windows,
WM_toolsystem_do_msg_notify_tag_refresh could use a workspace
from a different window to the screen that owned the area.

Instead of fixing, remove these since they aren't needed anymore
since changing modes now refreshes the tool system.
2019-06-28 17:38:42 +10:00
bd227d1378 install_deps: Bumped OSL version to 3.4.0_RC2 2019-06-28 08:38:34 +02:00
83d92f55b8 Fix error for tools that share gizmo types doubling up gizmos
Introduced in recent commit c93af8529d
2019-06-28 11:27:11 +10:00
651e574153 Cleanup: unused var, sort structs 2019-06-28 10:07:21 +10:00
5dd8c3f0cb GPencil: Cleanup commented lines from previous commit 2019-06-27 23:28:44 +02:00
d06671b3d9 GPencil: Don't hide Cursor while drawing
This is a partial solution for T62446 while we prepare a way to hide the cursor all the time.
2019-06-27 23:19:05 +02:00
b5a1a2d186 GPencil: Fix missing Fill area when drawing an stroke
There was a mistake in the shading group name.
2019-06-27 19:34:04 +02:00
b2c92d90c8 Cleanup: fix compiler warnings 2019-06-27 19:11:19 +02:00
c187fc09b6 Masking: make image editor UI consistent with clip editor
* Mask Display menu is now part of the header
* Sidebar now has a separate Mask tab
* Add context menu when in mask mode

Differential Revision: https://developer.blender.org/D5102
2019-06-27 19:11:19 +02:00
1cd11c9d75 Fix T66166: NLA invisible source list selection 2019-06-27 18:22:34 +02:00
7ee5ea7751 Fix T65010: Affect options not being displayed in the UV editor snap settings.
Reviewers: brecht, billreynish

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5141
2019-06-27 12:24:03 -03:00
c5eceb3582 Cleanup: EditMode: Remove uneeded shader depth bias
The bias is done using the DRWView now, no need to double it.
2019-06-27 17:02:22 +02:00
19d90c8602 Fix T66119: Assert editing Lattice 2019-06-27 17:02:22 +02:00
4b124143b1 ObjectMode: Fix selection points of LightGrids 2019-06-27 17:02:22 +02:00
c74ccf6a97 DRW: Fix point shaders not using gl_PointSize
All Shaders inside DRW should use gl_PointSize.
2019-06-27 17:02:22 +02:00
58996e3057 Cleanup: GPencil remove DRW_ prefix for internal functions.
The prefix DRW_ must be used only for modules inside Draw Manager and not in the Engines.
2019-06-27 16:42:38 +02:00
91e00bd703 Fix compositor preview not respecting un-keyed changes
This is a part of T66099.
2019-06-27 16:21:18 +02:00
ccfb98511b GPencil: Fix Control points of primitives clampoed by Stencil
The control points were clamped to the stroke thickness due the last stencil change.

Now, the shading group is not clamped.
2019-06-27 16:05:58 +02:00
658aa00718 Build environment: Update OpenSubdiv to 3.4.0 RC 2
Newer OpenSubdiv brings fixes and improvements for non-manifold meshes,
which fixes some crashes we've experienced in the recent past when using
Gregory patches.

Additionally, thing new version of OpenSubdiv brings sparse patches,
which allows to multi-thread topology refinement step.
2019-06-27 15:15:08 +02:00
2a22b8af04 Eevee: Make use of dual source blending for volumetric resolve
This simplify the code and add an example use of dual source
blending.
2019-06-27 14:41:35 +02:00
1f4e9754c0 DRW: Add DRW_STATE_BLEND_CUSTOM
This one enable dual source blending, enabling more fine tuned
blending parameters inside the shader.
2019-06-27 14:41:35 +02:00
7f5a21177a Cleanup: de-duplicate flag checks for button colors 2019-06-27 21:20:29 +10:00
0f983e8540 Fix T65893: Edit Mesh Culling
The edit mesh is culled by object. When the object is not visible on
screen, the edit mesh may still be visible. This change will not  cull the
edit mesh anymore.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5144
2019-06-27 12:53:17 +02:00
5eb156e769 Fix T66171: Cycles OSL trace() crashing in displacement shaders
This is not supported, meshes do not exist in the BVH before displacement.
2019-06-27 12:46:04 +02:00
6f516fcc63 Tests: speed up render tests by running multiple in the same process
Blender startup time and shader compilation is a big factor when running
hundreds of tests, so now all renders in the same ctest run in the same
process.

This was previously reverted due to skipping other tests when one test
crashed. Now if a test crashes, Blender is re-run with the remaining
tests so we get results from them still.
2019-06-27 12:46:04 +02:00
219a10e46a Cleanup: clarify WM_gizmoconfig function naming 2019-06-27 19:58:59 +10:00
1c60f30d04 Fix: Text Location lost X/Y text
Use PROP_XYZ instead, and user Slider=True to make them display as sliders in the UI
2019-06-27 11:15:56 +02:00
c93af8529d Tool System: don't unlink gizmos when changing tools
Needed for tools not to unlink each other with multiple windows.
2019-06-27 18:48:45 +10:00
3366b333e4 Fix switching tools with multiple windows & gizmos
The gizmo would only added if the gizmo type wasn't already linked.
2019-06-27 17:22:05 +10:00
d3f9a722fe Cleanup: error in last commit 2019-06-27 16:48:48 +10:00
4758b4033e Cleanup: remove unused context check in toolsystem_ref_link
Also comment corrections.
2019-06-27 16:40:25 +10:00
3128fe4591 Tool System: don't unlink tools when changing workspaces
Caused gizmos to be lost with multiple main windows whenever one of them
switched workspaces.

Rely on tool gizmos poll function to unlink to gizmo.
2019-06-27 11:13:17 +10:00
155c62b070 Cleanup: GPencil Clarify comment 2019-06-26 21:03:34 +02:00
96af590d58 GPencil: Change HSV modifier to use the same range of parameter that other areas of Blender
The value of the Hue must be between 0 and 1, but the value was between 0 and 2.
2019-06-26 20:58:30 +02:00
69b3c26e75 GPencil: Change "lock_material" tooltip and text
The old name was not clear. Detected while writting the manual.
2019-06-26 20:58:30 +02:00
d93558e914 Make deps: Fix detection/linking of PugiXML on Linux
This time both full `make deps` and final compilation is tested on
a freshly installed CentOS 7.

The thing is: OpenImageIO is not configured to use an external PugiXML
library, so it was compiling its own.
At the same time the OpenShadingLanguage library was commanded to use
an externally compiled PugiXML. This caused some sort of discrepancy
which lead to Blender-link-time errors. Could be linking error, could
be namespace related, could be ABI related. In any case since we do
have PugiXML in the OpenImageIO already lets just stick to it.
2019-06-26 19:50:38 +02:00
a7e32dbcb0 Buildbot: Fix undefined architecture string for CentOS 2019-06-26 19:40:46 +02:00
b98428e046 Buildbot: Fix undefined bits for CentOS based builder 2019-06-26 19:37:17 +02:00
171e0d4283 Fix T66141: missing viewport texture update after find missing files 2019-06-26 19:36:17 +02:00
14de0d6a5d Buildbot: Fix pack stage for CentOS based builder 2019-06-26 19:35:10 +02:00
ae396912fb Buildbot: Fix scl command prefix
Now it should work correct with command passed as an individual
elements of a list.
2019-06-26 18:07:03 +02:00
andreas atteneder
28f472472b Fix typo pratially breaking node shader wrapper (used by IO add-ons).
Reported with patch as D5140 by andreas atteneder (@atti), thanks!
2019-06-26 17:57:07 +02:00
6e016a451e Revert "Fix T63921: Unable to use confirm on release for keyboard shortcuts"
This reverts commit 30bf48c9ca.
2019-06-26 17:55:47 +02:00
81b11b795c CMake: Cleanup, remove explicit Python version
This is now coming from a common CMake configuration.
2019-06-26 16:19:49 +02:00
846b4f1360 CMake: Initial support of CentOS for buildbot configuration 2019-06-26 16:17:08 +02:00
8218fdd89f CMake: Cleanup, remove unused legacy hardcoded paths 2019-06-26 16:12:38 +02:00
93f1703900 Buildbot: Preliminary support for CentOS based builder 2019-06-26 15:42:46 +02:00
3471fde8cc Buildbot: Cleanup, remove unused option
It was originally needed for various migration needs, now CUDA
binaries are always to be built for 64 bit platforms and never
to be built on 32bit platforms.
2019-06-26 15:42:46 +02:00
74ffcad90e PyAPI Doc: Fix presets menu example. 2019-06-26 15:35:34 +02:00
9d79ca24c9 Fix Workbench Memory Leak
Memory leaks happened when using final multi view rendering together with workbench.
Workbench assumed that the textures were always NULL

Reviewers: fclem

Differential Revision: https://developer.blender.org/D5136
2019-06-26 15:15:55 +02:00
11dc736033 DrawManager: Sanatize default_view reset
Grease Pencil already reset the default view so the draw_manager wouldn't assert. During multi view rendering the same assert still happened. This patch will reset the default view when starting to render a new view.

Reviewers: fclem

Differential Revision: https://developer.blender.org/D5137
2019-06-26 15:13:56 +02:00
6d22633a96 Fix T66137: added normal map for painting has wrong color space until refresh 2019-06-26 15:06:49 +02:00
4f386999ea Fix T66111: animated lights not updating in Cycles 2019-06-26 15:06:49 +02:00
6d64565524 Tests: put output of IO tests in subdirectory 2019-06-26 15:06:49 +02:00
51c6dfd7f0 Tests: add navigation links for HTML test reports, and other tweaks 2019-06-26 15:06:49 +02:00
0e327968a9 PyAPI Doc: Minor updates to UIList examples... 2019-06-26 15:06:18 +02:00
310bd2f811 Fix T65942 Eevee: Reflection plane has "show data" checked by default
Disable by default and rename option to "Show Preview Plane".
2019-06-26 14:05:55 +02:00
b3a2de9d18 Fix T65951 Saving project right before rendering (Cycles) causes empty render-preview
Since we are now using the full framebuffer (color+depth) inside the image
editor, we need to disable the depth test by default.
2019-06-26 13:42:47 +02:00
57bb575aa8 Fix T65958: GPencil glitches in line strokes with alpha
Following @fclem comments, I have implemented the use of Stencil for Solid line strokes. For Dots, Boxes and Lines with texture, the stencil is not activated because "kill" some artistic effects.

We have done test in greasepencil-object branch and all it's working as expected and the FPS are equal, so the stencil hasn't any appreciable impact in the drawing time.

The Stencil is used in groups of 255 and the passes are done in the same way. If the stencil is not use for the type of stroke (Dot/Box/Texture), the drawing is grouped as much as possible to reduce GPU overhead and limit the times the stencil bit must be cleared.

For doing this patch I had to add 2 new functions for reading private data to Draw manager. We decided add these function as a temporary solution while the Draw Manager implements the option to clear the stencil by groups. When this option will be implemented, these functions must be removed.

Thanks to Clément for his help and support. It's always a pleasure working with him.

Review by: @fclem
Testers: @mendio @pepeland
See D5126 for more details
2019-06-26 13:38:10 +02:00
9dea69149a DRW: New function to retry stencil_mask value
This function is a workaround to use the stencil in grease pencil and reduce the number of clears.

Reviewed by @fclem.

Note: This function will be removed when draw manager supports stencil clearing by group.
2019-06-26 13:28:26 +02:00
b6cf4a715b Fix missing volume update via scene strip's settings
This is a part of T66117.

The entire sequencer+3d sound was never reliable, so this is as much as i can
fix currently.
2019-06-26 13:00:18 +02:00
5b3530e480 GPU: Add better support for displacement relinking behavior
Previously displacement relinking was trying to be smart and seems to be
broken in some cases. This fixes all cases by brute force.

We copy the whole branch linked to the displacement socket and tag it
accordingly. Then we only relink the nodes that are not tagged.

Moreover, we bypass bump nodes inside the dispacement trees so that the
resulting bump is the same as cycles.

Fix T66000 EEVEE: Unexpected results when displacement interact with nodegroups
2019-06-26 12:03:59 +02:00
e47ce1f2d6 Fix T65755 "In Front" (X-Ray) doesn't work with wire objects
We fix by separating the drawing of wire xray objects.

These wire objects gets drawn before normal wires and set the stencil to
0x0 just like the solid counterparts. Also a prepass is done to "dig"
through non-xray solid.
2019-06-26 12:03:59 +02:00
bf1b00212a Revert "Build script: Don't use external Pugi for OSL"
The change did break compilation on default Ubuntu install for Stefan
and on default CentOS install for myself.

This reverts commit 64671e53d2.
2019-06-26 10:52:24 +02:00
005f90a434 Fix T66132: Unable to move bone in special configuration
Animation needs to wait for the sub-data datablock copy-on-write,
but tagging that copy-on-write should not enforce animation evaluation.
2019-06-26 10:51:17 +02:00
a55aa1a2ca Fix T64796: Default Spacing Smear Brush To 3%
Reviewers: brecht

Differential Revision: https://developer.blender.org/D5129
2019-06-26 10:21:47 +02:00
94af455e37 RNA: only search necessary space types when unregistered panels 2019-06-26 12:50:42 +10:00
545610d3aa Cleanup: un-wrap lines in headers, use doxy comments 2019-06-26 12:44:22 +10:00
abaf6b106d Revert "GPU: Create and use new GPU_texture_read_rect utility."
This reverts commit e061cb4437.
This function is problematic on some operating systems.

# Conflicts:
#	source/blender/draw/intern/draw_manager.c
#	source/blender/gpu/GPU_texture.h
#	source/blender/gpu/intern/gpu_texture.c
2019-06-25 20:26:46 -03:00
9ab0247b6e MSVC: Don't share pch between debug and release builds.
Precompiled headers were sharing the PCH file between debug and
release builds which is 'bad'. Adding the configuration to the
path fixes the issue.

Reported on chat by @mano-wii
2019-06-25 15:27:21 -06:00
Dalai Felinto
7037ff9204 Partial fix to T66126: Non-Active Grease Pencil object stuck in drawmode
This only handles the issue after file load.

To make it an all-around solution we need to deal with
this in ed_object_select_pick, do_outliner_item_activate_tree_element(),
...
2019-06-25 18:03:18 -03:00
f24f70b162 Fix (unreported) missing Scene's GPencil pointer handling in library_query... 2019-06-25 21:18:20 +02:00
0e7187f359 GPencil: Fix User count error when use python to create object
The user count was 2, when the real value must be 1.

The problem was the datablock was created with one user by default.

See: D5131
Reviewers: @mont29
2019-06-25 21:11:49 +02:00
79f9b9083a Industry Compat keymap: LMB-dragging in UV Editor box selects
This makes it possible to drag outside of the Transform gizmo to select
2019-06-25 20:04:09 +02:00
3ea548ef67 Industry Compat keymap: Use Move, Rotate, Scale tools for UV transform, instead of modal operators 2019-06-25 19:28:08 +02:00
Dalai Felinto
a6d2f9ffd0 Fix T65999: Crash when disabling an addon while its panel is visible
Note, the performance of the tests we run here is still bad since we have plenty
of panels around. But better than the crash.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5116
2019-06-25 14:10:31 -03:00
367cd72b23 UI: rename navigation buttons -> controls 2019-06-26 01:46:02 +10:00
72cf239780 Tool System: add UV transform tools 2019-06-26 01:46:01 +10:00
1b064697f1 Cleanup: tweaks to fix for T66065
This fix changed repr() to str().
2019-06-26 01:46:01 +10:00
787e2ddbd7 Fix T66065: Missing text in the UI translations files due to 'fstring' usages.
Am not even sure that it is possible to use fstrings at all when UI
translation is required (that is, is a sensible, reasonable way that
does not make things even more complicated than they already are), but
one thing is certain, this won't be trivial to get it working, so
definitively not a job for now.

Instead just do not use fstrings for UI translatable strings.
2019-06-25 17:26:56 +02:00
24b47c00ea Fix related to T65963: Ctest: Failing test script_load_keymap passes.
Fix things to make test actually fail as expected (one cannot compare
functions to strings, so no more sorting for now).

Not sure how to actually fix the test though, not even sure test make
any sense anymore actually, with all those weirdo gizmos and tools
keymaps thingy...
2019-06-25 16:08:56 +02:00
c8034993ff Fix (unreported) call to wrong func in gizmos' keymaps code.
Found while investigating T65963.
2019-06-25 16:08:56 +02:00
d08312463b Preferences: changes to navigation gizmo
- Add 'Navigation Buttons' preference, used for 2D views
  (previously this couldn't be disabled).
- Add "Off" option for 3D view axis.
- Support minimal axis with navigation buttons.
2019-06-25 22:55:49 +10:00
f472ac391c Fix: Remove 'Separate Images' from Sequencer Movie options
Separate Images does not have any effect on Movie strips, so this removes this option from the Movie menu.

Author: Peter Fog

Differential Revision: https://developer.blender.org/D5130
2019-06-25 14:23:21 +02:00
81e8b8f88a Use prop_factor instead of prop_percentage for Sequencer text placement
Since it goes from 0-1 and not 0-100.
2019-06-25 14:10:15 +02:00
0c2c57167b Sequencer: Fix missing icons for text alignment
Now is consistent with Text objects

Also fix wrong unit for text placement and tooltip-
2019-06-25 14:06:47 +02:00
c186cfe419 GPencil: Add Lattice modifier when use Ctrl+P to Lattice Deform
When parent a Grease Pencil object to Lattice, automatically a Lattice modifier is added.
2019-06-25 14:00:34 +02:00
30bf48c9ca Fix T63921: Unable to use confirm on release for keyboard shortcuts
The issue was that we were still working around a Xorg bug that has been solved since a very long time:
https://bugs.freedesktop.org/show_bug.cgi?id=22515
The second issue was that the global "confirm on release for mouse clicks" was used for keyboard shortcuts as well.

Reviewed By: Campbell

Differential Revision: http://developer.blender.org/D5128
2019-06-25 12:32:00 +02:00
34143592b4 Compress macOS DMG background image
From 2.3 mb to 34 kb

Required adjusting background color. Also fixed blurry Blender logo.
2019-06-25 11:37:02 +02:00
f93d3bd42b Sequencer UI: Move Refresh button from header to the View menus
This button didn't need to be so prominent, and clashed with the Sequencer sidebar
2019-06-25 10:00:20 +02:00
3fa728a98e Fix: Wrong check in Sequencer sidebar
Didn't reflect recent naming changes.
2019-06-25 09:39:40 +02:00
586a044d83 TexturePaint: Fix Shader Compilation 2019-06-25 08:07:50 +02:00
40a396792d Fix T66096: Crash in Cycles versioning 2019-06-25 11:29:17 +10:00
4d42f4b944 Fix building without bullet enabled 2019-06-25 11:29:17 +10:00
c0c1b4542f Fix T65996: metaballs converted to meshes appear to render at an incorrect isosurface.
Not much to be done here really, besides adding yet another hack to that
giant pile of hacks that are mballs...

So to avoid newly created copy of basis of mball to influence to mball
computation, we simply switch it to Empty object for the depsgraph
update run.

Not nice, but working (besides a weird change of basis obflag which
should not happen), and presumably reasonably safe change.
2019-06-24 20:46:07 +02:00
a5ff780065 Fix T63828, T62005: copy/paste or append loses rigid body object
Previously settings were removed, now add to the rigid body world automatically
even if it's a bit ill defined, since this is confusing for users.

Fundamentally the concept of a rigid body world collection could be revised, and
left only as an optional thing.
2019-06-24 18:46:36 +02:00
7d3a28d2d9 Cleanup: clarify branch which shouldn't be possible 2019-06-25 01:16:51 +10:00
b2a20c2d9e Fix T66074: Number shortcut for brushes doesn't work
Add number brush switching for 2.7x map.
2019-06-25 01:08:13 +10:00
4fcc3b8ba2 WM: add operator to set the tool by it's index
Needed for 2.7x brush switching keys.
2019-06-25 01:08:13 +10:00
d61a9b297b Cleanup: use doxy groups 2019-06-25 01:08:13 +10:00
187c696cae Fix T66030: [CRASH] Modifying Normals with Skin Modifier.
clnor editing code was simply not checking at all whether it has
something to work on... Guess nobody had idea to edit custom normals on
a mesh that has no normals before! :P

This should probably be handled in a poll function too, to completely
disable those tools when there are no faces/loops, but let's keep it to
minimal changes at that point.
2019-06-24 16:29:37 +02:00
b617a233aa Fix T66050: Textbox is not updated, when controlled with drivers 2019-06-24 14:58:18 +02:00
4f97e33e90 Fix T66076: crash deleting imported Alembic object 2019-06-24 14:48:32 +02:00
d6d36b9892 Cycles: Cleanup, remove unused argument
Became obsolete/unused after recent fix.
2019-06-24 14:42:20 +02:00
a699a9680b Fix T65812: Image empty has wrong aspect with limit texture size 2019-06-24 22:10:43 +10:00
d51b74f9e3 Fix T66053: hair shape panel shows for emitter particles 2019-06-24 14:02:23 +02:00
6dfdf1f82d Cleanup: use doxy comments for DNA_windowmanager_types.h 2019-06-24 21:41:55 +10:00
1c94030238 Fix T65824: Span property ignored in mesh.fill_grid
The fix for T60777 caused this operator not to work from Python.

Add a repeat_last flag for operator execution.
2019-06-24 21:41:17 +10:00
037956f13f Fix T66075: memory leak in Cycles render tile updates 2019-06-24 13:37:31 +02:00
52b4afacb2 Fix errors raised at generating Python API docs
D5121 by @Nutti
2019-06-24 20:07:20 +10:00
3fb099bf81 Fix T66072: GPencil "stroke placement:surface" uses "stroke placement:stroke"s target parameters
The stroke parameters were used in Surface mode becaus ethe mode was not checked.
2019-06-24 10:14:39 +02:00
829561c03c Fix T66071: Navigation tooltip shows outside of 3D view
Clear gizmo highlight when the cursor leaves the region.
2019-06-24 17:06:44 +10:00
9bc49c051e UI: Rename "Dupli" to "Duplicate" in Spin Tool 2019-06-24 01:29:57 +02:00
59f1eed26b UI: Rename Make Duplicates Real to Make Instances Real
Part of T56648
2019-06-24 00:54:42 +02:00
9c5d54bfaf UI: Rename Dupli-Face to Instance Face
Part of T56648
2019-06-24 00:45:12 +02:00
91069fd47e GPencil: Cleanup code 2019-06-23 17:49:46 +02:00
74ebbafb3e DNA: reduce Object size by 16 bytes
No need to use int for boolean value.
2019-06-23 20:58:24 +10:00
cb817d9f38 Cleanup: unused args 2019-06-23 20:51:07 +10:00
3695513ff7 UI: Only Origins: Correct tooltip 2019-06-23 04:11:16 +02:00
589fa691fd Cleanup: pep8 2019-06-23 11:38:26 +10:00
90d262abe1 Cleanup: unused args 2019-06-23 11:38:26 +10:00
447443e4c4 UI: Rename "Zoom Border --> Zoom Region"
Part of T56648
2019-06-23 03:31:49 +02:00
82c112e4b4 UI: Rename "Viewer Border" to "Viewer Region"
Part of T56648
2019-06-23 03:16:33 +02:00
e7a0f0a993 UI: Rename "Draw Thin" to "Display Thin"
Part of T56648
2019-06-23 01:57:25 +02:00
6182531baf UI: Adjust naming for recent Scene Strip options
- Use Sequencer rather than Sequence
  - Use Camera rather than 3D Camera
2019-06-23 00:19:28 +02:00
a7c4eda3e3 UI: Add Strip Type Icons in the VSE Sidebar Header
This helps users identify the active strip type much more clearly.

Differential Revision: https://developer.blender.org/D5124
2019-06-23 00:16:26 +02:00
ae6300a8b7 Fix T66022: crash adding subdivision surface modifier to some meshes
This reverts commit 7c9f64d008:
"Fix T63766: Multiresolution behavior when using crease edge"
2019-06-23 00:03:36 +02:00
ab94926483 GPencil: Fix Fast Drawing and MSAA disabled in previous commit
The previous commit disable the fast drawing if the background texture was not ready, but it did not detect the Painting mode, so the fast was always disabled.

Now the check is done inside paint mode.
2019-06-22 17:47:00 +02:00
d51ad19f8c GPencil: Don't use MSAA for background texture
This texture has already the MSAA applied.
2019-06-22 17:11:53 +02:00
8bf1977d31 Fix T65955: GPencil: drawing shapes on surface causes intense viewport flickering
There were some problems in the engine because the data was saved inside e_data struct, but this struct is reset sometimes and the background texture is not valid.

Now, the data has been moved to stl->g_data and all creation and free has been moved to use stl->g_data. This fix also some small memory leak for the Buffer GPUBatch data.

The background texture has been moved to texture list because must be available all the time. When is not drawing, the texture is removed to safe memory. Also, if the mode is painting and the texture is not ready because it was removed by Draw Manager, the texture is reloaded with the background image again. This ensure the background image is always visible when painting.

Also I have used this patch to reduce the size of texture used for background to 16F instead of 32F and the blank texture to 1x1 pixels instead of 16x16.

Reviewed by: @fclem

See D5115 for more details
2019-06-22 16:50:01 +02:00
3c8f8a9d24 macOS: tweaks for macOS bundle script
* Follow Blender code style a bit more closely
* Fix mixed tabs and spaces
* Remove old README now that it's part of the script
* Make less tied to specific Blender version numbers
2019-06-22 16:00:06 +02:00
0b988a0aad Nodes: show shader -> other socket type as invalid link 2019-06-22 16:00:06 +02:00
8b633745ff Cleanup: add braces 2019-06-22 23:07:01 +10:00
dc6a6f1828 Keymap: Add Alt-A, Ctrl-I to file-select space 2019-06-22 20:13:56 +10:00
f2e601ebd8 File Selector: add options to select all operator
Add common select options (toggle/invert etc).
2019-06-22 20:10:53 +10:00
dd7e1c23ab Cleanup: use doxy groups 2019-06-22 19:00:09 +10:00
4774657370 UI: remove Visible IPO icons
These are duplicates of HIDE_ON/OFF.
2019-06-22 15:04:46 +10:00
2642ba13b4 GPU_matrix: Add GPU_matrix_unproject_precalc
Pre-calculates values needed for unprojecting to avoid
a matrix invert and extracting projection matrix dimensions for
every call to GPU_matrix_unproject.

Use for gizmo selection drawing.
2019-06-22 13:21:30 +10:00
1b2b9c6b1f Cleanup: redundant static set use 2019-06-22 11:08:12 +10:00
d0fe116dc8 Cleanup: assign strip type to a variable before use (call strip_type)
This was only done in some parts of the sequencer UI,
existing vars were named seq_type & stype.
2019-06-22 11:02:33 +10:00
31d6dc6abf Cleanup: sequencer source panel
Split sound from image/movie branch (since image/movie share logic).
2019-06-22 10:53:52 +10:00
90cb821e23 Fix error in recent UI changes
Image file is meant to be next to the directory in the Source panel.
2019-06-22 10:46:33 +10:00
b555e07585 Fix sub-panel UI offset
The offset for check-boxes in sub-panels wasn't being scaled correctly.
2019-06-22 10:11:15 +10:00
158f799a96 Cleanup: warnings, formatting 2019-06-22 10:11:15 +10:00
953419c641 macOS: install license files inside Blender.app bundle
Since we are planning to install Blender as /Applications/Blender.app without
being contained in a folder.
2019-06-21 23:37:40 +02:00
c553b790fc macOS: rename blender.app to Blender.app
Using a capitalized app name fits the platform guidelines. Since macOS file
systems are case insensitive by default this should not break scripts that
assume lowercase.
2019-06-21 23:37:40 +02:00
ad4f5092ec UI: Remove redundant Running Jobs from Sequencer header.
You would see the running jobs thrice, once in each Sequencer header and in the Status Bar too.
One instance of this is more than enough.
2019-06-21 20:34:24 +02:00
84040b8613 UI: Use enum for Sequencer vs 3D Camera input in Scene panel in Sequencer sidebar
Also move Time and Source below other panels for consistency
2019-06-21 20:01:08 +02:00
e60a01483f macOS DMG bundle, codesign and notarization script 2019-06-21 20:30:17 +03:00
Alessio Monti di Sopra
f9e4568550 UI: use force icon for objects in outliner, fix missing redraw when changing type
Differential Revision: https://developer.blender.org/D5008
2019-06-21 18:29:24 +02:00
9bbd9d9b3b Fix small memory leak in Cycles principled BSDF 2019-06-21 18:15:04 +02:00
5e754b6320 Add macOS disk image background image 2019-06-21 18:10:25 +02:00
Dalai Felinto
dbd3d76447 Rename: Save custom Studio light > Save Custom Studio Light 2019-06-21 13:02:30 -03:00
eeffa8a7f4 macOS: remove blenderplayer.app, don't include Blender Foundation in version 2019-06-21 18:00:48 +02:00
19488ee125 Fix (harmless) Cycles ASAN warnings 2019-06-21 18:00:48 +02:00
a887e1ea43 UI: Restore minimized windows when raising them
Separate temporary windows, like Preferences, should be restored (if minimized) before bringing to top

Differential Revision: https://developer.blender.org/D5105

Reviewed by Brecht Van Lommel
2019-06-21 08:07:12 -07:00
3039d86f8b Fix T65834: Circle Select does not update select_id buffer after orbiting view3d.
This solution checks if `persp_mat` has changed. If positive, the selection buffer is redrawn.

Differential Revision: https://developer.blender.org/D5081
2019-06-21 12:05:47 -03:00
7c9f64d008 Fix T63766: Multiresolution behavior when using crease edge
Switch to Gregory basis patches which are tangent continuous across their
boundaries.

Originally we've used BSpline basis patches to be more compatible with the
old subdivision code, but a lot of things changed anyway.
2019-06-21 15:37:46 +02:00
83a4f5600d Fix T65957: Cycles crash with OSL and UV maps 2019-06-21 14:46:50 +02:00
d6b542b854 Fix T65948: boolean modifier does not merge UV maps with the same name 2019-06-21 14:12:50 +02:00
8691a58a80 UI: Add decorators to Sequencer sidebar
These items you are very likely to want to animate.
Only adding for panels where it makes sense, so not Time or Source.
2019-06-21 13:37:33 +02:00
Alessio Monti di Sopra
99e8346bab Fix T65969: missing update of properties editor for Dyntopo checkbox
Differential Revision: https://developer.blender.org/D5111
2019-06-21 13:31:12 +02:00
4162d0ea3b Fix error in recent sequencer UI update
Use of unset variable, however the value was already assigned
2019-06-21 21:19:59 +10:00
648956b5b5 Fix T65976: switching to workbench engine in lookdev mode shows wrong state 2019-06-21 13:02:58 +02:00
7070e4c15e Revert "Particle system: Move runtime data to runtime field"
This reverts commit 36faf739a7.

Somewhat annoying but this change had some unforeseen consequences,
which lead to an actual bug.

Since this change was not sufficient to get original report fixed
is easier to simply revert for now.

Fixes T65842: Hair disappears when clicking on particle system name
2019-06-21 12:09:45 +02:00
964e319a39 Fix: Alembic import segfault when importing mesh with null UVs
This fixes an issue introduced in 4337bc2e63.
2019-06-21 11:32:57 +02:00
820e431167 Fix: wrong greying out in Sequencer sub-panels 2019-06-21 11:30:11 +02:00
1e7c3a159f UI: Further tweaks to Sequencer sidebar:
- Move strip name to the top (easier to see which strip you are adjusting, and more consistent with other areas)
  - Move Mute next to this, since it affects everything, both audio and video, and completely disables the clip
  - Mute now greys out all the Strip panels, since none of them apply if the strip is disabled
  - Rename Info to Time, since now this panel only includes timecodes and related controls
  - Move Lock to the Time header, since you are locking the time controls
  - Move clip resolution to Source, since it's not related to time
2019-06-21 11:22:56 +02:00
fed6c1a970 Fix T62876: Camera Background Images
Migrate old legacy code to the draw mamager/object mode. The old legacy
version did not work with wireframe. By migrating the code
to modern draw manager code we have mode control on the drawing process.

Still background images do not work with OIT, the cause seems to be that the transparent pixels are treated as background pixels.
Also There are some artifacts when working with Holdouts and DoF, this
is because the draw engines do not pass the correct alpha values.

Reviewers: fclem, brecht

Differential Revision: https://developer.blender.org/D4638
2019-06-21 09:53:51 +02:00
a3a6cda8fb Fix T65745: Bone Selection X-Ray Drawing.
The Pose Bone Selection used normal matric multiplication, but that
mismatched the Depth buffer from all draw engines. They used the
optimized matrices from common_view_lib.

This change will use the optimized version, so the depth buffer matches
and the render artifacts would be correct.

Please note that bone selection is not using shcfg and therefore render clipping is still off.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5100
2019-06-21 09:47:03 +02:00
0c538fc923 Cleanup: spelling, grammar, and other corrections
D5084 by @nBurn with edits
2019-06-21 10:18:53 +10:00
1e050bd08e Fix T65975: Memory leak adding movie sequence strip
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D5106
2019-06-20 16:06:29 -07:00
197661c733 Keymap: toggle all gizmos with Ctrl-`
Was only toggling transform gizmos, which is too specific
in cases where users might want to remove gizmos from the view.

This also follows the top-level button which is most prominent in the UI.
2019-06-21 08:36:49 +10:00
d2e474d043 Cleanup: use trailing commas for multi-line arguments 2019-06-21 08:36:03 +10:00
91b8e24db3 Cleanup: don't use plural for forward/backward enum
Match existing enums.

Also use the term 'strip', instead of a 'clip'
(again, follow existing terminology, clip is used for movie-clip strips).
2019-06-21 08:34:27 +10:00
2cad071761 Fix dashed line drawing
The dash_factor wasn't being set in many places, having the graph editor
open for eg, caused box-select in the 3D view not to show dashes.
2019-06-21 08:29:08 +10:00
b30f3f6c19 Fix T65960 Crash on entering Edit Mode of BesierCurve with modifiers 2019-06-21 00:06:46 +02:00
2f3f1f6038 Cleanup: sequencer UI code
- Remove `str()` on strings.
- Remove duplicate layout assignment.
- Don't assigning sub-layouts the name 'layout' (hard to follow logic).
- Spaces around operators.
- Import smpte_from_frame name-space.
2019-06-21 07:59:32 +10:00
04b86c21bf UI: Tweak Sequencer Sidebar panels
Even though we are in UI freeze, we agreed that this should be better, and so we are changing a few things:

  - Clearer separation of controls that affect the image transform vs the video
    - New Transform panel houses Flip X/Y, Offset and Crop
    - Flip X/Y now uses toggle buttons like we do for mirroring elsewhere (clearer + takes up less space)
  - Video panel only includes things that relate to playback, ie Playback Direction, Strobe etc.
  - Backwards/Forwards playback is now an enum rather than a toggle (we should always use enums when it's not an on/off switch)
  - Rename Input panel to Source
    - Just more immediately understandable and correct
    - Move Deinterlace here since it's source file dependent
    - Move Source panel to be a top level panel
  - Merge Info and Timecodes panels
    - Move Lock toggle to Info panel (was previously attached to name field which made no sense whatsoever)
    - Name field now uses full width and doesn't add redundant text in front of it
  - Re-arrange tabs to be Strip, Modifiers, Proxy & Cache, View
    - Strip and Modifiers should be together

Reviewers: brecht, iss

Differential Revision: https://developer.blender.org/D5098
2019-06-20 19:11:39 +02:00
966dbddf3d Fix sequencer sidebar not being wide enough by default to show timecodes 2019-06-20 19:00:51 +02:00
9123595b52 Fix T64705: can't drive object visibility in collection instances
Not the cleanest solution, but should be fine until we add support for driving
collection visibility and revise this system as a whole.
2019-06-20 19:00:51 +02:00
9a88bd5590 Fix T65802: F-curves modifiers in nodes doesn't updates properly
The other built in modifiers, except the generator modifier, seems to
update the depsgraph thought some RNA magic.
However the generator seem to be a bit special and doesn't get included
into this. Now we manually update the depsgraph on value changes to the
generator modifier.
2019-06-20 17:48:36 +02:00
2f77175fec Fix sculpt mask not visible in EEVEE
Differential Revision: https://developer.blender.org/D5092
2019-06-20 17:03:04 +02:00
ce57185ffb Fix T65775: UV projection is dependant of the object position
The rotation matrix included the global object offset too. Now we only
take into account the actual offset that what sent to the function.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5094
2019-06-20 15:15:02 +02:00
Alexander Gordeev
7d83e7a9df Fix T65877: crash when baking in sculpt mode
Also fixes bug where mesh with multires modifier is invisible in render
while in sculpt mode.

Differential Revision: https://developer.blender.org/D5099
2019-06-20 14:38:44 +02:00
e43e278b38 Cleanup: Remove unused depsgraph function 2019-06-20 10:31:05 +02:00
a4c907af77 Fix T65806: Can't Access bpy.context inside Application Timer
Sound synchronization was messing a bit with the context, for, actually,
no reason.

Use more direct queries rather than relying on a context there.
2019-06-20 10:28:52 +02:00
5dcabc4d57 Fix T65770: File Browser missing "Sidebar" in View menu 2019-06-20 14:49:55 +10:00
79bd5174e4 Fix T65922: Custom property error 2019-06-20 14:34:20 +10:00
d30f72dfd8 Fix sculpt not updating on undo with EEVEE enabled 2019-06-19 20:29:25 +02:00
da83f70754 Fix T65398 - Fix frame rate base use in Python SMPTE functions
Differential Revision: https://developer.blender.org/D5064

Reviewed By: brecht
2019-06-19 10:49:37 -07:00
f47c9ad96f VSE: Draw pre-animated (volume) sound strip waveforms. 2019-06-19 10:39:43 -07:00
ccf06c1ff2 Fix T65780: unnecessary GPU image texture reloads after recent changes 2019-06-19 17:49:39 +02:00
da68f31630 GPencil: Remove unreported duplicated Reproject operator in menu
The reproject option was duplicated. Detected writing the manual.
2019-06-19 17:19:36 +02:00
1699de17bd Fix order of modifications for Set Origin.
The logic of parent update is very similar to Apply Transform, so made it
so parents are handled before children.
2019-06-19 16:44:36 +02:00
1fb5453916 Fix T65900: Apply Scale doesn't work correct with parenting
Parents are to be handled prior to their children.
2019-06-19 16:44:31 +02:00
dd89bcc832 Fix T65614: Sequencer render single layer only
Was noticeable when sequencer uses scene with a compositor.

The way it was using render API was forcing a single render layer.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5095
2019-06-19 16:37:07 +02:00
ab60fe2a12 Fix T65914: Workbench Transparency Film
When performing F12 render on a transparent film all solid objects where
a bit transparent. Single Pass AA and no AA passes were not visible at
all.

Issue was that the first frame was not handled correctly making these
artifacts. This commit changes the order of `GPU_state_init` and
`DRW_state_reset` so the state is correct during the first pass.
2019-06-19 16:20:02 +02:00
72690bbeca Bring mask tools back to Masking Tool Area and update Context Menu
The mask tools in the Tool Area of Clip Editor where never brought back,
after decision was made to postpone proper masking tools to 2.81.

This brings back the Mask Tool Panel in the Mask tab of Masking Tool Area.

This Diff also adds a better Context Menu, which respects whether you're
in Masking or Tracking mode. I have added the most important operators
there, with a focus on those that are otherwise harder to access.

Reviewers: sergey, billreynish

Subscribers: sebastian, brecht, hype

Tags: #motion_tracking

Differential Revision: https://developer.blender.org/D5075
2019-06-19 15:06:10 +02:00
11c9702dd4 Fix T65902: save all modified images should not try to save .psd files
We can't save these without data loss, so don't try to do this.
2019-06-19 15:04:05 +02:00
54e6b262a1 Cleanup: Pass explicit dependency graph
Avoids hash lookup on per-object basis when applying transform.
2019-06-19 14:03:23 +02:00
4dc71367c7 Fix T65918 DRW: Crash when add a any modifier to a curve 2019-06-19 12:20:55 +02:00
c2ad29397c Industry Compat keymap: Some curve edit keymap entries were using Click events
This was inconsistent and make the actions seem slow and unresponsive. Change to using Press, like other modes.
2019-06-19 10:29:15 +02:00
d80b0bdc56 UI: show label in tool-tips
When button text doesn't already show the label,
include the label in the tool-tip.

Without this the descriptions for icon-only buttons
don't always make sense.

This also gives a tool-tip for icon-only popovers.
2019-06-19 11:38:06 +10:00
74364a3928 UI: add popover access for button labels
Needed for tool-tips to access labels.
2019-06-19 11:34:54 +10:00
2f5a79b390 Fix button label access returning empty label
The check the buttons string has content (not just that it's non-NULL).
2019-06-19 11:29:51 +10:00
2299e6d9ba Fix active face-dot color
Unlike edge/vert this was blending with the regular selection color.
2019-06-19 10:44:43 +10:00
Dalai Felinto
e73647bf5b Move to Collection: Fix tooltip
Found this while writing the manual page. A scene collection nowadays is simply
called collection.
2019-06-18 20:46:15 -03:00
fc182e3189 UI: add set upper/lowercase to edit-text menu
Lost when toolbar was removed.
2019-06-19 08:21:25 +10:00
7e4de74f25 3D View: draw edit-text selection on-top (x-ray)
This changes behavior from 2.7x, where selection & cursor could be
occluded by other objects.

Doing this without z-fighting in 2.8x isn't so simple because drawing
the text geometry is separated from edit-selection.

Change behavior since this doesn't seem like an important difference.

Fixes assert drawing text edit mode.
2019-06-19 08:05:59 +10:00
dfe2ca26f7 Cleanup: style, indentation 2019-06-19 07:32:21 +10:00
82afc58f91 CMake: cleanup, unset temporary var after use 2019-06-19 07:19:26 +10:00
ba152cc88d MeshBatchCache: Speedup: Do not return valid batch if geometry is empty
There was a huge overhead of batches that had no geometry. The loose
wire batch was the culprit.
2019-06-18 22:28:31 +02:00
82f569d75e Fix T65631 Eevee: Translucent shader broken in Eevee when AO is enabled 2019-06-18 22:28:31 +02:00
f2651bc338 Cleanup: GPU: Fix codestyle 2019-06-18 22:28:31 +02:00
3c1207e730 File Browser: Various fixes and enhancements to 'autoscroll to item' feature.
Initial trigger to this work was T65782, requesting faster autoscroll
when current folder contains thousands of items. That was a fairly
simple change, just needed to make scrolling steps variable based on
'distance' between current position and desired one.

But several other issues showed up while working on this, among the most
annoying ones, the scrolltimer could keep running forever in some cases,
failing to detect properly an 'end condition', we could even get some
'bouncing' in extreme corner cases, edited item was not always properly
visible in the end, etc.

So as usual with UI, this ended up in a frustrating equilibrium game of
finding the optimal solution among several tradeof, taking unexpected
large amount of time... At least new code seems to work OK in
all possible (reasonable) cases, that will do for now.
2019-06-18 21:53:14 +02:00
b10921f0cc Fix Cycles CUDA suboptimal performance on Windows 10 with recent graphics cards
When compute preemption is available we schedule more work which is more
efficient. However the CUDA driver appears to be incorrectly reporting this as
unavailable, even though it should be supported starting with Windows 10 1803
and Pascal and Turing (10x0 and 20x0) graphics cards.

This reduces render time by about a 25% difference on our benchmark scenes. On
Linux compute preemption appears to be reported correctly.
2019-06-18 20:05:36 +02:00
1dab26afb9 Fix T65689 Geometry overlaps axis selector
It seems that in 2.79 callbacks were drawn with depth test off by default.
2019-06-18 16:14:25 +02:00
1a9e698099 Fix T65660 Mirror modifier didn't work with custom normals. 2019-06-18 10:07:53 -04:00
c8e3fe608e Fix T61912, T63297: error baking tangent space normal map with autosmooth 2019-06-18 15:58:30 +02:00
4337bc2e63 Fix T65901: Alembic crash on out-of-bounds UV indices
An Alembic file saved by 3DS Max caused Blender to crash when importing.
Either the UV indices in the file are out of bounds or they are written
in a way we don't expect. In either case, this now no longer causes Blender
to crash.
2019-06-18 15:08:41 +02:00
0b73817c8c Add a new function to recover the next shading group.
After talking with @fclem, we decided to keep this as a workaround function waiting for the clearing operation to be available inside the shgroups.
2019-06-18 14:01:32 +02:00
c11bfb519f Fix T64153: RenderEngine.update_result does not show result immediately 2019-06-18 13:59:55 +02:00
00b10f9c3f Fix T63359: no render preview when save buffers is on 2019-06-18 13:59:55 +02:00
96f0d22e3b Cleanup: remove unused render buffers 2019-06-18 13:59:55 +02:00
8c40bbb15f Fix --help text output 2019-06-18 21:17:38 +10:00
301accd63e Cleanup: improve description wording 2019-06-18 20:59:50 +10:00
d1297e01ac Docs: correct --help text
Also correct description indentation.
2019-06-18 20:59:50 +10:00
af1e94413a TexturePaint: Projection Edit
Disable all overlays except the texture paint overlay. Add alpha to the
resulting image buffer.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4974
2019-06-18 11:14:25 +02:00
f9e0d51e31 Compositor: File output node sockets
When using RNA to alter the type of socket only the type was changed.
the typeinfo was not updated. Internally the File Output Node used RNA
to update the sockettype. making the socket invalid. When users save the
file and reopened the typeinfo was used. Also the color of the node was
determined via the typeinfo.

Another thing that happened was that the socket conversion was ignored
when empty node groups were present. The empty node groups were
optimized away before the needed data conversion was determined.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4938
2019-06-18 11:10:41 +02:00
5e768200c2 Fix T65852: Cmake fails with paths containing special characters.
MATHES performs a regular expression which in this case is unnecessary.
2019-06-17 23:55:01 -03:00
741641f4c3 Fix T65805 Assert "Too many draw engines enabled at the same time" 2019-06-17 23:07:41 +02:00
28b06b6a05 Fix T57650 UVEdit: selection not visible if behind unselected UVs
Use depth buffer to order the uv edges correctly to always draw selected
edges on top.
We still use the double drawing workaround for points to keep the smooth
antialiased display.
2019-06-17 20:32:02 +02:00
be52b25d39 Fix T65357: wrong facemap indices after applying a boolean modifier
Properly initialize custom data layers to default values when copying from
a mesh that does not have all the same layers.

Differential Revision: https://developer.blender.org/D5003
2019-06-17 19:38:19 +02:00
d2f7b93ba0 Inconsistent Percentage Formatting
Percentage formatting of x% (used elsewhere) when using percentage display factor

Differential Revision: https://developer.blender.org/D5050

Reviewed by Brecht Van Lommel
2019-06-17 10:34:09 -07:00
7c229172a6 UI_GetThemeColorShadeAlpha4fv not clamping alpha channel
Fixing small error in UI_GetThemeColorShadeAlpha4fv() clamping blue channel twice instead of alpha

Differential Revision: https://developer.blender.org/D5048

Reviewed by Brecht Van Lommel
2019-06-17 10:23:07 -07:00
Jean First
d8e7d8b82c Fix missing keyframe type operation in dopesheet and timeline context menu
Differential Revision: https://developer.blender.org/D5055
2019-06-17 18:55:07 +02:00
Dan Koschier
4cc98af3a4 Fix T53581: remesh modifier artifacts in sharp mode
Replace relative threshold for pseudo inverse in sharp remeshing modifier with
0.1 as proposed in the original paper.

Also change pseudo-inverse implementation that works with dynamic heap-allocated
matrix to static 3x3 version, for performance

Differential Revision: https://developer.blender.org/D5078
2019-06-17 18:53:49 +02:00
538f2aeaef Fix AV-sync sometimes putting scene one frame back 2019-06-17 17:52:02 +02:00
f827811a42 Fix T65886: Crash when deleting a scene when "New Main Window" is open.
When we delete a scene, we need to update to new scene pointer all main
widows that might be using it, not only the active one from the context...
2019-06-17 16:38:08 +02:00
495aff71ca Fix frame jump with AV-sync enabled
It was possible to have animation player step happening after manual
jump prior to the dependency graph evaluation.

Now we forbid changing scene frame if it was manually requested to
be changed.
2019-06-17 16:35:36 +02:00
c83848722a Fix T59915: Skin modifier produces inverted normals on end-cap faces when vertically aligned edge is assigned root
Sometimes when the end caps pointed strait up (z axis) their faces would
become inverted.

It seems like the code tried to rely on a certain vertex order to always
happen. However this edge case did manage to produce an order that would
produce inverted cap faces.  So now I introduce a normal check instead
so we can be certain that the face will have the normal direction we
want.

Reviewed By: Jacques Lucke

Differential Revision: http://developer.blender.org/D4138
2019-06-17 16:35:21 +02:00
80fb263aa9 DRW: Make stencil state clearer and distinct
Write and test states are now separate and need to be explicit.

Also add asserts when trying to write without test enabled.
2019-06-17 16:13:28 +02:00
6ae2de0266 Cleanup: Fix typo error 2019-06-17 16:12:50 +02:00
e0b8dccd62 Fix T65674: Rigid bodies in duplicated collections are not automatically added to Rigid Body World.
As title says, we need to add back new copies of objects that are RB
items to the RBW collections...
2019-06-17 16:10:18 +02:00
b46c21364a Fix T62384: Grease pencil blank material slot
Now, when you add an slot and then draw, the automatic created material will use the empty slot, instead to add a new slot and leave a empty one.

This fix only works if you add only an empty slot. We could remove any empty slot in the middle, but as this has no impact  in the drawing or file, it does not worth the CPU time to review every time the material list. Anyway, the user can press delete button to remove any empty slot.

If we see this is a big problem in the future, we can reopen the bug and add this cleaning function.
2019-06-17 16:10:01 +02:00
3b8a14a3c0 Fix T65878: "Bpy.ops.object.camera_add" doesn't take the rotation
argument into account

- if a rotation is given, always take it into account [which means
setting alignment to ALIGN_WORLD prior]
- caused by recent rB06fe2a5e0c5d

Reviewers: brecht

Maniphest Tasks: T65878

Differential Revision: https://developer.blender.org/D5085
2019-06-17 16:09:00 +02:00
e52d78978a Fix crash in sequencer after recent audio changes 2019-06-17 15:23:39 +02:00
f1589630a0 Fix T65737: context menu should not have Show Header for topbar 2019-06-17 15:19:06 +02:00
6b63765f1c Fix compilation error after recent changes 2019-06-17 15:13:35 +02:00
729bd7ddd9 Fix T65693: Crash removing higher on special multires objects 2019-06-17 15:12:06 +02:00
7f5c6834f8 Fix T63706: crash in files with custom node trees that contain builtin nodes
Don't make assumptions about which nodes exist in which node trees when loading.
2019-06-17 14:30:16 +02:00
b84085ef1a Fix T63145: nested instancers not respecting Display Instancer setting 2019-06-17 14:30:16 +02:00
e03b717687 Fix T65620: Sculpting brush size jumping.
The PBVHs raycast function calls `isect_ray_tri_epsilon_v3` with epsilon `0.1` which is inaccurate and may result in the problem presented in T65620.
The solution is to use `isect_ray_tri_watertight_v3` instead `isect_ray_tri_epsilon_v3`.
This can positively affect other areas as well.

Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D5083
2019-06-17 09:16:13 -03:00
5e7e49e00d Fix T65662: Drivers on custom properties doesn't properly update
Happens if custom property is on object data data-block, which doesn't
have translation or geometry components. Not for lights and cameras at
least.
2019-06-17 14:09:01 +02:00
b50de0f8b7 Fix T65651: Crash when changing audio strip source file 2019-06-17 12:55:24 +02:00
96e9caba6e Fix T63867: image sequence not updating in Eevee animation render 2019-06-17 12:12:48 +02:00
4285729d4b Cleanup: Fix comment typo error 2019-06-17 11:46:19 +02:00
0ef473969f Pipeline: Fix memory leak when movie failed to open 2019-06-17 11:10:23 +02:00
7b8d4904d2 Fix T65817: Video Sequencer doesen't render speakers' sounds
Part of the issue was caused by missing speaker objects in the depsgraph
used for post-processing.

Remaining part was caused by missing scene sound update for this depsgraph.
2019-06-17 11:04:17 +02:00
5364e62b05 UI: add back Data-block 'show_hidden_files_datablocks' name
This name didn't indicate items in the ID data-block browser will be hidden too.

Reverts part of:
ad707115d5
2019-06-17 13:02:34 +10:00
a1ef2e4b16 Cleanup: comment, RNA spelling 2019-06-17 12:52:20 +10:00
12da679fa0 UI: remove redundant RNA_TYPE property in the key-map editor 2019-06-17 09:08:17 +10:00
e85635b882 Cleanup: comment spelling 2019-06-17 08:05:58 +10:00
40a8c49088 Revert new grease pencil cursor for paint modes
This reverts commit a412f49e75 and 873c756e5d. The change was only
supposed to affect grease pencil, but also changed the cursor for sculpt mode,
where it's not clearly visible. Since this has not been quickly resolved I'm
reverting the commit.

Ref D5036.
2019-06-16 20:29:22 +02:00
087a489867 Cleanup: simplify GHOST cursor API, no functional changes 2019-06-16 19:58:26 +02:00
5767dcbe60 Fix T65809: Blender crash while using the Normal's "merge" option in edit mode.
Merge code will generate temp normal editing data for affected loops,
but since it will later (by setting some edges/faces to smooth) alter
and extend affected clnor spaces, it will also need temp normal editing
data for some other loops around those vertices...

Using those clnor editing data in that code is a bit of an abuse, but on
the other hand that struct stores exactly what we need.

So simply added an option to generate that editing data for all clnors
of affected vertices.
2019-06-16 18:04:57 +02:00
b1b0781c1e Drivers: shorten the security restriction warning.
A longer string is truncated in the popover, which can't be resized.
2019-06-16 17:14:57 +03:00
3e086af79c Drivers: fix Variable Copy & Paste in the edit popover.
Without these buttons the functionality of the popover is
incomplete compared to the Graph Editor panel. To support
this the operators have to read the active F-Curve from
the context, instead of directly scanning animation data.

Expanding the context would also help Python operators.
2019-06-16 14:16:05 +03:00
985f33719c Fix T65844: wrong eevee hair when vertex colors are used as input
- was using wrong offset [index instead of index * 4]
- also minor correction to variable naming

Reviewers: fclem

Differential Revision: https://developer.blender.org/D5082
2019-06-16 08:34:19 +02:00
87de71a8aa Fix: File browser icons intersecting in thumbnail view
The new icons were colliding in the corners. This moves the ID type icon inside the file box to avoid this clash.
2019-06-16 00:35:22 +02:00
2f12b01c55 Fix Cmake Error.
`LAST_EXT` only works in versions 3.14 or greater.
2019-06-15 19:16:04 -03:00
22b705d2cb Cmake: Add WINDOWS_USE_VISUAL_STUDIO_SOURCE_FOLDERS option
This allows grouping files in a filter corresponding to the source files name.

Differential Revision: https://developer.blender.org/D5077
2019-06-15 15:44:47 -03:00
bfd18c471d Cmake: rename WINDOWS_USE_VISUAL_STUDIO_FOLDERS option to WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS.
Suggested by @LazyDodo
2019-06-15 15:35:36 -03:00
e567468ee1 QtCreator/Visual Studio: Group glsl files in Shaders group. 2019-06-15 15:32:41 -03:00
2696c85ba7 Fix: Clicking in empty area in Node Editor was no longer deselecting all.
There was a missing keymap property on the select operator for both the default and Industry Compatible keymap
2019-06-15 20:09:15 +02:00
2db35ff03a Windows: Clear PYTHONPATH variable in various debugging batch files.
The PYTHONPATH environment variable sometimes causes issues,
clearing it in the helper batch files is easier than talking
every user individually though the process of removing it
to see if it resolves the issue they are having.
2019-06-15 11:30:31 -06:00
aaf65749e9 WM: Remove Cmd-LMB for RMB emulation for apple
The default apple keymap now uses Cmd as Ctrl,
so the key isn't free to emulate RMB.
2019-06-15 13:38:43 +10:00
0fd96b4128 Cleanup: spelling 2019-06-15 09:24:38 +10:00
edda93caf9 Cleanup: clang-format 2019-06-15 09:08:46 +10:00
83661a5cfe Outliner - Replacing GP Layer Icon
This only replaces ICON_GREASEPENCIL with ICON_OUTLINER_DATA_GP_LAYER icon

Differential Revision: https://developer.blender.org/D5073

Reviewed by Dalai Felinto
2019-06-14 14:59:44 -07:00
55c379daea UI: Icons - Adding ICON_OUTLINER_DATA_GP_LAYER Icon
This adds the icon intended for Grease Pencil layer data, in SVG but currently marked as blank

Differential Revision: https://developer.blender.org/D5073
2019-06-14 14:49:44 -07:00
23254ce4ee Cleanup: Rename: Static Override -> Library Override.
Better to make internal code naming match official/UI naming to some
extent, this will reduce confusion in the future.

This is 'breaking' scripts and files that would use that feature, but
since it is not yet officially supported nor exposed in 2.80, as far
as that release is concerned, it is effectively
a 'no functional changes' commit.
2019-06-14 23:21:12 +02:00
f640701858 Fix T65814: Copy pasting audio strip from video crash Blender 2019-06-14 22:47:34 +02:00
0707177ab8 Fix T64913 Eevee: shader compilation does not reset TAA
This tracks the number of compiling shaders and just reset the TAA
if previous number mismatch.
2019-06-14 19:17:06 +02:00
486755460a Cleanup: DRW: Remove one useless matrix multiplication 2019-06-14 19:17:06 +02:00
88cce6faea Fix T65569 Eevee: Volumetrics on alphablend surf. not working in renders
The wrong volume buffer was used one frame out of two.
2019-06-14 19:17:06 +02:00
34644f520a UI: Outliner - GP Icon Changes
Changes all GP layer icons to Pencil and highlights selected layer with background color.

Differential Revision: https://developer.blender.org/D5073

Reviewed by Dalai Felinto
2019-06-14 09:55:07 -07:00
e76b223ea3 Outliner - Notify on GP Layer Change
This adds NA_SELECTED to notifier when selecting Grease Pencil layers so Properties Editor will update

Differential Revision: https://developer.blender.org/D5073

Reviewed by Dalai Felinto
2019-06-14 09:48:42 -07:00
Dalai Felinto
f51de2246c Fix T65641: Move to collection - arrow keys work in the opposite direction
Patch my Germano Cavalcante (mano-wii).
2019-06-14 12:58:36 -03:00
648a352bbf Fix T65630: Paste pose doesn't work with motion paths enabled 2019-06-14 17:35:01 +02:00
0cd720e3a5 Fix pose copy storing action/animation in copybuffer 2019-06-14 17:35:00 +02:00
33571be2af Fix T65632: Connected Proportional Editing is affected by Curve Object's Local Scale
Make curve vertex distance take into account the object scale.
2019-06-14 17:26:33 +02:00
a5a0f158e3 Eevee: Fix Contact shadows with Translucent BSDF 2019-06-14 16:20:29 +02:00
6e414b2910 Fix T65647 EEVEE: Contact shadows "Softness" settings darkens objects
This was commited by mistake.
2019-06-14 16:20:29 +02:00
956cb4f403 Fix T65803: MPEG4 unsupported timebase denominator
- MPEG4/DivX has a maximum value of 65535 for the timebase denominator.
- MPEG1 and 2 have a list of supported frame rate ratios. These use
  ratios like 24000/1001 and need those exact numbers.

This fixes an issue introduced in c5b1e7cd4e
where the correct ratio was passed to FFmpeg, but not with the identical
numbers FFmpeg has in a lookup table.
2019-06-14 13:37:39 +02:00
31a99a3ab4 Fix T65763: Reset GPU when exporting annotations
When exporting annotations using `bpy.ops.render.opengl` the annotations
where only correct in the first frame. In the second frame the
annotations was shifted by half the resolution.

This change will reset the GPU matrices when the annotations are
rendered.
2019-06-14 10:49:05 +02:00
3bfd81ce29 Partial revert of "Theme: Blender Light update"
Partially reverts commit 3b58bf3c7e

Green highlights aren't as bright as yellow/orange & were
reverted for the default theme, do the same for the light theme.
2019-06-14 15:15:07 +10:00
fe555a8073 Theme: Update Blender Light 2019-06-14 14:51:05 +10:00
170541c5c7 Cleanup: remove developer panel
Defined whole panel for a single checkbox which is hidden by default.
2019-06-14 13:56:33 +10:00
a4bd3f7d7e Mesh Selection: Move Selection ID Context Utilities to ED_view3d.
This patch does not bring functional changes, but it is a good change if we want to use these utilities in areas other than those using BMesh (eg painting editors).

This is also a step to replace `ED_view3d_select_id_validate`. That function erroneously checks `V3D_INVALID_BACKBUF` which causes it to update unnecessarily.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D5072
2019-06-14 00:03:00 -03:00
accd8d005b Docs: minor improvements to --app-template help text 2019-06-14 12:59:14 +10:00
8ac0fef4df Cleanup: sort structs 2019-06-14 10:12:10 +10:00
35d49595c6 Cleanup: minor adjustments to --help text formatting
- Single quote args so they show with string literals in the manual.
- Improve the description of animation playback mode.
2019-06-14 10:10:01 +10:00
5e626e7664 Fix T61768 Eevee Offscreen rendering
The issue was caused by a bad usage of GPUOffscreen.

The Framebuffer was created using a window framebuffer and used
in a viewport callback when another GPUContext was bound.

This change allows up to 3 framebuffers per GPUOffscreen.

Most common case will be using 2 framebuffers (one for init and
one for drawing) but in the case of more (bad usage) it will just
degrade performance a bit.
2019-06-13 21:32:02 +02:00
1688a57a8e Fix T65783: Gpencil Edit mode doesn't round data icon
See D5071 for more details

Thanks to @brecht for his help
2019-06-13 20:38:44 +02:00
0b40af97f4 Fix T59275: generated texture coordinates don't stick to mesh for shape keys
No need for this optimization in Eevee anymore, instead the modifier stack will
only compute CD_ORCO when needed.
2019-06-13 20:26:13 +02:00
45145e746d Fix part of T63595: generated texture coordinates don't stick to deforming mesh
Always compute CD_ORCO undeformed coordinates now for rendering, same as before.
There is still a refresh issue to be fixed, when switching from solid to textured
mode in the viewport.

Computing such undeformed coordinates can be expensive and is not actually needed
if the mesh is only using e.g. UV maps. This was the same in 2.79, at least now we
are skipping the computation when there are no deforming mdifiers on the mesh.
2019-06-13 20:14:19 +02:00
15dd289992 Mesh: don't compute CD_ORCO layer when there are no deforming modifiers
This saves memory and evaluation time for simple static meshes with e.g. a
subdivision surface modifier. If no CD_ORCO layer exists then we assume the
actual vertex coordinates are equal to the original undeformed coordinates.
2019-06-13 20:03:06 +02:00
09cc318fd6 T65783: UI Inconsistency with Grease Pencil icons in Properties and Outliner
Fixed Properties and tab icons
2019-06-13 19:19:57 +02:00
c49f91a3b6 Fix T65669 Bones in Envelope Display break apart after selecting bone
This was because the VAOs were not updated if an instance batch was
reusing a VBO containing instances attributes which was reinitialized.

Now we ensure the Batch will reconfigure the VAOs if the VBO is 0.
2019-06-13 18:11:43 +02:00
30116a5274 Fix T65109: Object deleted when removed from the RigidBodyWorld collection.
While user should never do that, it appears many end up using a 'view
layer' instancing collection as RBW collection, and even worse, have
objects in that unique collection.

Therefore, when removing RB simulation from an object, which among other
things has to remove it from the RBW collection, it would fully delete
the object from the blend file.

This fix merely checks the usercount of RB-removed object, and if it is
at 1 (which means object was in a single collection), it adds it to the
scene's master collection first.
2019-06-13 18:02:43 +02:00
245129e8e2 Fix T65445: wrong defaults when appending workspaces from builtin templates 2019-06-13 17:56:42 +02:00
84936ce0ee Defaults: refactor startup.blend code, more consistely apply to templates
There were various changes only applied to specific builtin templates even
though they should apply to all, since it's possible to do e.g. use grease
pencil objects in the general template or use mesh sculpting in the grease
pencil template.

Also, nearly all changes now apply to builtin templates only. This was
already the case for most, and the distinction seems to have been more by
accident than intent.
2019-06-13 17:56:42 +02:00
242b5932ca Industry Compat keymap: Fix broken Tab key in the Text Editor
Was being used for operator search here, which doesn't make any sense
2019-06-13 16:45:37 +02:00
01bcee7efb Fix: Sequencer timecodes was using wrong properties
- The Start value and the Playhead value both used 'frame_start', which only tells you where the strip was originally inserted. Instead 'frame_final_start' is now used, which results in the correct timeline values.
  - When scaling the sidebar some of the the labels weren't scaling correctly, this has been fixed
  - Use Hold Cut/Cut instead of Hard/Soft Cut, for consistency

Patch by Peter Fog

Differential revision: https://developer.blender.org/D5065
2019-06-13 15:54:45 +02:00
9d269a97be Fix "Fix Deform" not working in Blender 2.8
Need to copy changes to the evaluated mesh before requesting
new deformed mesh.

Tested on a file from T32406.
2019-06-13 15:23:47 +02:00
64b759ba88 Fix "Fix Deform" access evaluated data form original objects
This is part of T60517.
2019-06-13 15:09:46 +02:00
1e8b007d50 Set Node Editor to use Box Select tool by default
This makes Shift and Ctrl work properly to extend and subtract selections.
This also moves Cut Links to Ctrl-RMB, which doesn't conflict with the selection tool.
2019-06-13 14:41:21 +02:00
1f1b638b40 Cleanup: clang-format 2019-06-13 13:43:07 +02:00
6f43541d8c GPencil: Reorganize blend shader
Reorganize code and change some functions to mimic other softwares blend modes. Still need more work.
2019-06-13 13:38:31 +02:00
e0c98e18f9 GPencil: Remove blend_opacity from shader
The opacity was already used and using it in the shader only duplicate the blend.
2019-06-13 13:33:04 +02:00
36faf739a7 Particle system: Move runtime data to runtime field
Allows it to be preserved during copy-on-write update when on-geometry
related update is needed.

This is a required part for T63537, where we need to preserve the entire
evaluation data when object is tagged for only RECALC_COPY_ON_WRITE.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5023
2019-06-13 11:34:01 +02:00
27537daee1 Clear Datablocks Preview: add some more generic options.
Sometimes one may want to nuke all previews altogether, running the
operator for all eight individual ID types would be tedious then...
2019-06-13 11:11:32 +02:00
8556b0da70 Fix T65034: Viewing material calls frame update handler
Use lower level dependency graph evaluation which doesn't run any handlers,
doesn't touch sound system, doesn't inform image editors about changes.

Should probably move such evaluation steps to a helper function in DEG module,
but that is more like a cleanup.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5067
2019-06-13 10:54:01 +02:00
d63438e4d1 Cleanup: correct wireframe xray flag name
Revert part of d56c0a0a6a
2019-06-13 17:33:51 +10:00
41acdac2de Cleanup: clang-format 2019-06-13 12:37:01 +10:00
be1e61b093 Cleanup: tweak logic for skipping modules
Startup is the special case, so match against this instead of 'modules'.
2019-06-13 12:35:18 +10:00
2404220e80 Hide from UI overridable option for custom properties. 2019-06-12 20:00:11 +02:00
04c54dec44 Fix T57489: Texture coordinate object reference not updating in Eevee 2019-06-12 16:58:34 +02:00
db5c8c0393 GPencil: Fix clamp alpha problems when using Regular blend
The problem was the alpha was not premult and the opacity factor was applied two times.
2019-06-12 16:55:24 +02:00
da38558da2 Typos in description 2019-06-12 16:26:58 +02:00
abd240332d Compositor: fix linear feather falloff in dilate/erode node
The bug only affected debug builds.
2019-06-12 15:53:37 +02:00
d788f5231e Fix T65741: Removing a GPencil Object's Material Slot deletes the strokes assigned to it
This was a design decision, but now we have decided to change it using the active material for the strokes using deleted material.

If the material slot is empty a new material is created to keep the strokes visible.
2019-06-12 15:52:03 +02:00
7a50d078fe Fix T64930: FFmpeg Output- no color mode by default
The issue was that the valid color modes was checked on the old image
format, not the new one. So if you switched formats it would not
correctly check if the settings were valid.
2019-06-12 15:20:17 +02:00
21b5af766d Transform Snap: When snapping to curve's vertices, consider only the original elements.
When they are occluded or when the snap is done for the generated meshes vertices, it was inconvenient.
An ideal solution needs to be discussed, but for now, for vertices, keep the behavior similar to the pre 2.8 versions.
2019-06-12 09:49:52 -03:00
d7df962e04 Fix T65751: Mask Parenting does not work 2019-06-12 14:02:57 +02:00
524943fca3 Fix T65750: Masking crash with Add Feather Vertex and Slide 2019-06-12 12:47:01 +02:00
27441c7557 Fix T64710: Rigid body stops simulating when an object is selected
Need to preserve last evaluated time through copy-on-write process.
2019-06-12 12:11:49 +02:00
75958326ad WM: re-enable auto-save after loading the users preferences
Minor change, only apples when loading factory settings,
then reverting to saved.
2019-06-12 17:53:18 +10:00
fd2e143eaf Cleanup: --help doc string formatting
STRINGIFY macro was being split across lines
causing problems extracting the strings for the references manual.
2019-06-12 17:01:15 +10:00
934b3c74f3 Unit System: remove 'm' as an alternate name for mile
Now when using imperial dimensions,
using 'm' suffix is treated as meters instead of miles
(use 'mi' or 'mile' instead).

Resolves T65731
2019-06-12 14:25:05 +10:00
30c431d662 Revert "Keymap: Add additional scrubbing affordance (Alt-LMB)"
This reverts commits
dcec863b2f,
f11929c145.

It wasn't possible to set the cursor without accidentally selecting a
column of keys & (vice-versa).
This conflicts with Alt->LMB to select column of keys.

Shift-RMB is already bound to scrubbing.
2019-06-12 13:50:56 +10:00
aa0cd21da0 Fix T65727: Broken button tool-tips in 3D view
Own error in 6868202899.
2019-06-12 12:58:56 +10:00
fcb534e336 UI: alternate fix for T65702, handling of auto-saving userprefs
The behavior for loading factory settings wasn't clear for users.

This commit changes the behavior:

- Loading factory settings always disables auto-save
  for the current session.
- The internal setting to skip saving on exit is now exposed
  in the preferences (when enabled).
- The menu item "Load Factory Settings (Temporary)" has been removed
  since it's always temporary.

This way users can always reset factory settings without
having to consider the combination of options that might cause their
preferences to be overwritten at exit.

If they want to enable auto-save for the current session
this can be done from the preferences.
2019-06-12 12:30:49 +10:00
2459a1a214 WM: optionally override the context with a module for wm.context_toggle
This may be used with other wm.context_* operators in the future.
2019-06-12 12:18:47 +10:00
017b8dfe47 Cleanup: expand left/right select keymap items
This was meant to simplify the keymap but ended up
not having a significant advantage.
2019-06-12 11:11:39 +10:00
15f0315ab1 Keymap: Add Ctrl-SelectMouse in to box-deselect 2019-06-12 10:42:57 +10:00
6529d20d79 Cleanup: spelling in comments 2019-06-12 09:43:49 +10:00
8ce93ef6ae Cleanup: clang-format 2019-06-12 09:07:03 +10:00
96708701ab Cleanup: unused vars 2019-06-12 09:07:03 +10:00
d93a7290e5 View3D Snap: Don't mix original/evaluated in the same function parameters. 2019-06-11 18:45:46 -03:00
f92bb695c4 Fix T64478: Wrong location Snap Selection to Cursor after set camera Follow the path.
In this case it is necessary to use the `object->parent` evaluated to obtain the correct `parentmat`.
2019-06-11 18:12:54 -03:00
23df1a774b Fix/Cleanup: I18N: Bad usage of IFACE_ instead of TIP_.
Cheap tip: anything that is not "Camel Case" and/or that is more than
a few words long should use `TIP_` translation, not `IFACE_` one.

Also added several missing strings (including the one reported in D5056
by Jean First (@robbott), thanks).
2019-06-11 22:25:01 +02:00
d665d12853 Cleanup: remove unused var. 2019-06-11 21:16:36 +02:00
09c32a15d2 Fix T64430: Removing objects from sub-collection doesn't update instances of parent collection.
Collections are a tad annoying with all their caching of objects... When
we modify content of a children collection, we need to tag DeG for CoW
update of all of the ancestors.

For now keeping that recursive tagging helper private, but would not be
surprised if we found more similar cases and needed to expose it to more
code...
2019-06-11 21:13:37 +02:00
14bd257bb7 Fix (unreported) message wrongly using IFACE_ for its translation.
`IFACE_` is for short strings always shown in UI (like labels of buttons,
menu entries...). Every thing else, especially when more than a couple
of words, must use `TIP_`.
2019-06-11 20:54:43 +02:00
42f4c14732 Fix T64608: DOF Focus object, not linked to new copy, Scen "full_copy".
Note that there are probably many other similar cases... This code is
really legacy, should use library_query helpers and other modern
BKE_library code instead of doing its own dirty cooking...
2019-06-11 20:50:10 +02:00
c058c33864 Edit Mode: Fix face alpha being too strong in xray mode
This make the xray & wireframe follows the same style as the solid
mode.
2019-06-11 17:49:19 +02:00
c84c59c81b Fix T65406 Edit Mode: Edge selection is below wireframe overlay
This was due to a double offset of the wireframe. We also reduce
the wireframe offset. The look of the wireframe overlay changes
a little with on distant wires.
2019-06-11 17:49:19 +02:00
c5b1e7cd4e FFmpeg: Fix integer overflow when writing custom FPS with high denominator
FFmpeg uses a fraction of integers to indicate the frame rate, whereas
Blender uses `int / float`. When a custom frame rate is used with
non-integer base, the FPS and Base settings were multiplied with 100000
before passing to FFmpeg as `int`. This could overflow when a high
enough FPS setting was used, which is the case when importing a video of
almost-but-not-quite-integer frame rate into the VSE. The overflow
caused FFmpeg to return an error "The encoder timebase is not set",
which is rather cryptic for users.

The new solution is to take the max int and divide that by the frame
rate, and use that ratio to pass to FFmpeg. This won't overflow, and
thus allows exporting arbitrary frame rates.
2019-06-11 15:51:39 +02:00
bbba447d54 OpenGL Render: Fix crash when using audio
Was very easy to reproduce by rendering sequencer with sound strip.

Need to use evaluated scene to open movie handle, since that is the only
scene which has proper sound handle with everything else attached to it.
2019-06-11 15:40:03 +02:00
86d229f52c Sound: Fix missing sound sequences length update on FPS change 2019-06-11 15:19:32 +02:00
0767f95a63 Sound: Fix queries of sound info
A lot of areas were querying sound information directly using audio handle
which does not exist on an original sound IDs.

This change basically makes it so it's possible to query information about
given sound ID, without worrying about whether it's loaded or not: if it is
needed to load it first it happens automatically (no automatically-opened
handles are left behind though).

While this seems a bit extreme to open files on such queries it is still
better than the old situation when all sound handles were opened on file
load, no matter if it's needed or not. Besides, none of the changed code
paths are performance critical, just handful of tools.

Fixes T65696: Sequencer fails to create a new sound sequence strip via Python
Fixes T65656: Audio strip - SHIFT K crashes Blender

Reviewers: brecht

Reviewed By: brecht

Subscribers: ISS

Maniphest Tasks: T65696, T65656

Differential Revision: https://developer.blender.org/D5061
2019-06-11 15:11:07 +02:00
3a6f6c87e0 Fix T65671: Armature X-Mirror inconsistencies
Apparently the `rna_Armature_editbone_transform_update` function was incomplete because it didn't copy all mirrored transform values.

I also noticed that the same logic seen in `rna_Armature_editbone_transform_update` is also seen in `ED_armature_edit_transform_mirror_update`.
So the solution is expose and use that logic that updates a mirrored bone. Thus deduplicating and fixing T65671.

Reviewers: brecht, zeddb

Differential Revision: https://developer.blender.org/D5058
2019-06-11 09:41:18 -03:00
f58b97a457 Documentation: Update description with documentation 2019-06-11 14:27:18 +02:00
4419dd3bfd fix T65576 collada exporter duplicates node tree when exported material already uses nodes 2019-06-11 13:56:43 +02:00
43d3572655 Fix T65702: Load factory erases setting without confirmation
It could be argued this was correct behavior, since auto-save
defaults to 'on' nevertheless, auto-saving settings once
the user has disabled auto-save can lead to accidents.

Don't reset the preferences flag when resetting preferences.
2019-06-11 21:52:58 +10:00
c9cc4ddf64 Fix T65715: Instant crash when grouping strips in VSE 2019-06-11 13:22:59 +02:00
10869e2431 Fix T65626: Use Nodes checkbox locks after being checked with "insert keyframe"
Not sure if this is something what is supported by render pipeline, but this report
discovered some actual error in logic.
2019-06-11 11:56:52 +02:00
6ec3f4a628 Sequencer: Fix missing relations and recalc tags in RNA 2019-06-11 11:19:17 +02:00
bcd0b6fb8e Fix T65677: Creating a scene sequencer strip with python crash blender 2019-06-11 11:19:17 +02:00
06dd60761c Fix extend being ignored for left/right sequencer selection 2019-06-11 18:13:19 +10:00
325b0ad2ed Keymap: fix conflict introduced by recent Alt-LMB for scrubbing
Use Ctrl-Alt modifier for select-left/right.
2019-06-11 18:13:10 +10:00
83da21ca4e Fix T65393: Error live editing UI scripts
Disable relative imports for UI scripts.
2019-06-11 16:08:32 +10:00
df57ea7f3b Fix panel-type re-registration with parents
The order of panel types changes when re-registering existing types.
Fixes an error exposed by T65393.
2019-06-11 16:01:19 +10:00
3084b4350b Fix T65470: Scale set to zero after extrude 2019-06-11 13:27:10 +10:00
830cd07a90 Fix gpencil weight paint mode having no active tool 2019-06-11 12:28:40 +10:00
6868202899 Fix T62875: Tooltips behave erratically with view gizmos
Improvements to behavior for gizmo tool-tips.

- 2D gizmos no longer cancel tool-tips on cursor motion
  (matching the behavior of UI widgets).

- 3D gizmos still close on motion since 3D gizmos may have a large
  on-screen area which would cause them to stay visible even after the
  cursor has been moved a large distance. The motion threshold is used
  so they don't close on unintended cursor motion.

- Changing highlighted gizmo now cancels the tool-tip & resets the timer.
2019-06-11 12:04:03 +10:00
a0608340ae Fix T65699: gpencil weight paint unresponsive 2019-06-11 09:38:49 +10:00
8aa87972ca Fix T65295: Convert curve to mesh fails with Keep Original.
This code now expects to wrok from fully evaluated data, however when we
keep original, we are actually working from data just copied from orig
one.

Ideally, we'd do a single depsgraph update/eval *after* we have created
all new required data, but that is tricky to do properly in that code
without risking breaking one thing or another.

So for now, just going for the simple, if not optimal solution, and just
repeatedly re-evaluating whole deg every time we duplicate an object to
be converted. Yep, dummy, but simple and... safe. ;)
2019-06-10 11:16:54 +02:00
f11929c145 Fix: Default keymap was missing Alt-click to scrub in the Graph Editor 2019-06-10 09:28:58 +02:00
030c7df19d Fix T65301: Convert to mesh with Keep Original loses adjust operator panel.
That was a dummy typo in `duplibase_for_convert()` in fact...
2019-06-09 23:43:33 +02:00
a44f5a561f Revert "Fix T65301: Convert to mesh with Keep Original loses adjust operator panel."
This reverts commit rB78bbf374f475 (and part of rB702d85d7cddbf81).

Fix for this is actually simpler, done in next commit.
2019-06-09 23:42:18 +02:00
702d85d7cd Fix (unreported) several issues when converting MBall to Mesh.
Redo panel would be hidden (when 'keep original' was not set), due to
same kind of (un)selected issue as in T65301 (see previous commit).

Further more, not all MBall objects of the family were properly removed.
2019-06-09 22:59:36 +02:00
78bbf374f4 Fix T65301: Convert to mesh with Keep Original loses adjust operator panel.
We need to properly select new objects (and deselect 'source' ones) when
converting to another type while keeping original ones. Otherwise poll
check of the operator fails, and redo panel cannot be shown.

Note that this is actually a design flaw in redo system currently, since
*new* state has to still allow last operator to be ran, when it should
actually be previous step in history that matters here...
2019-06-09 22:59:36 +02:00
5dc9797f0b Fix T65657: crash in float texture painting, after recent changes 2019-06-09 22:15:59 +02:00
6797e80f2e Fix T65638: memory leak - modifiers on curves.
We need to tag the `mesh_eval` of curve as owned, when we generate one,
otherwise freeing code would not free it.
2019-06-09 21:11:37 +02:00
8452673a01 Fix: Build error with clang on windows.
clang does not seem support the static_assert with
message overload.
2019-06-08 18:10:48 -06:00
81b68f7279 Industry Compat keymap: Fix nodes interaction
- Dragging to move, scale and setting links now works normally and correctly
2019-06-08 15:24:47 +02:00
749d53effd Cleanup: use doxygen sections for 2D view operators 2019-06-08 09:24:11 +10:00
Dalai Felinto
6a15564682 Fix T65420: Crash in file saved with edit mesh
Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D5041
2019-06-07 19:16:59 -03:00
Dalai Felinto
e70428c80e Collections: Never change the collection views visibility when unhiding it
How to reproduce: use 1-10 to change the visible collection. If the
collection was globally invisible, it would be set to globally visible.

This was a left over from the previous collection visibility design.

Now that we have a more clear separation between temporary visibility
(i.e., layer collection visibiilty) and a global visibility setting
(i.e., collection visibility) we should keep them separated.
2019-06-07 18:45:41 -03:00
b236c2a0ce Fix T65613: Memory leak in Audaspace with 3D sound 2019-06-07 22:30:21 +02:00
424566239f Fix T62121: Cycles crash with viewport render and smoke/pointclouds 2019-06-07 21:07:23 +02:00
4fb4415172 Cleanup: fix compiler warning 2019-06-07 20:51:43 +02:00
fb03f50e06 Fix T64625: Eevee image textures with alpha have dark edges
Now texture storage of images is defined by the alpha mode of the image. The
downside of this is that there can be artifacts near alpha edges where pixels
with zero alpha bleed in. It also adds more code complexity since image textures
are no longer all stored the same way.

This changes allows us to keep using sRGB texture formats, which have edge
darkening when stored with premultiplied alpha. Game engines seems to generally
do the same thing, and we want to be compatible with them.
2019-06-07 20:51:40 +02:00
d05f27c7b9 Fix T65612: Ungroup in Node Editor Crashes 2019-06-07 17:45:58 +02:00
fd556023cb Cleanup: Reformat GPencil multiedit frame selection 2019-06-07 16:08:04 +02:00
bf417d640b Sound: Fix 3D sound coming from scene strips
Need to pull in speakers from scene strips and make sure they
are properly updated.
2019-06-07 15:55:50 +02:00
bda6f7df48 Set lower minimum drag thresholds
Was 3px, but even lower values work too, so setting minimum now to 1px.
2019-06-07 14:29:34 +02:00
Dmitriy Efimov
8efc781ddc GNUMakeFile: Fix bad command line to generate QTCreator project.
Report with fix in D5035 by Dmitriy Efimov (@DarkDemiurg), thanks.
2019-06-07 14:27:46 +02:00
0cfdc8d182 Eevee: Try to fix NaN caused by normal maps + bentnormals
Should help with T65118.
2019-06-07 13:53:30 +02:00
873c756e5d GPencil: Remove unused Cursor function after add new Paint cursor. 2019-06-07 13:25:59 +02:00
a412f49e75 GPencil: Create new CURSOR for paint modes
This new cursor is used instead of the ARROW because it was too disruptive while you are drawing.

The change affects all paint modes that are used Brushes.

See D5036 for details.

Reviewers: @brecht @billreynish @mendio
Cursor designed by:  @billreynish
2019-06-07 12:59:47 +02:00
1f93f9e982 Cleanup: Rename to avoid shadow variable 2019-06-07 12:49:56 +02:00
ede4f31969 DrawManager: OpenGL State Image Rendering
The OpenGL state was not set to blender defaults when using
`DRW_render_to_image` path. This is only used when doing F12-rendering.
Cause of changes with the `RESTART_INDEX` hair rendering was rendering
the restart_index as an actual vertex index.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5039
2019-06-07 12:04:30 +02:00
7081935a30 Sequencer: Fix missing sound from nested scene strips 2019-06-07 11:59:30 +02:00
d4a5691d0f Sound: Use dependency graph instead of bmain
Allows to move scene sound update to dependency graph evaluation.
2019-06-07 11:59:30 +02:00
6e65cd86c3 Cleanup: Remove unused variable and move definition 2019-06-07 11:51:10 +02:00
05101a6cd6 GPencil: Cleanup multiframe code 2019-06-07 11:46:57 +02:00
3ebee7c496 Fix T65591: GPencil Arrange Strokes operator does not work in multiframe 2019-06-07 11:46:54 +02:00
f765e0cd21 Remove Deform Delay armature option
This option can not be supported by a new granular dependency graph,
and, especially, copy-on-write.

It was always doing full update ever since initial commit of new dependency
graph which we are using here in the studio for the past years and lack of
this option was never brought up.

Fixes T65557: Delay refresh option in armatures is broken
2019-06-07 10:47:22 +02:00
b290695149 Sculpt toolbar: Group new Mask Lasso tool with the Mask Border tool
Also flip Simplify and Mask, so that all the mask-related tools are next to each other.
2019-06-07 10:35:07 +02:00
4de7a7f2fa Forgot this file in last commit 2019-06-07 10:33:01 +02:00
27369c0b06 Add Lasso Mask icon for Sculpt Mode toolbar 2019-06-07 10:24:19 +02:00
a666d1b486 Cleanup: keymaps 2019-06-07 18:14:34 +10:00
8f56620a23 Industry Compat keymap: Fix alt-key navigation over gizmos
This broke recently after recent gizmo keymap changes
2019-06-07 09:59:29 +02:00
19782e4f68 Fix missing autosmooth update when animated
Consists of few simple steps.

Don't tag object data's bounding box as dirty before re-evaluaiton

Most of the time this actually tags evaluated mesh which will be tossed
away few lines below anyway. And this causes issues if the evaluated
mesh is actually owned by the mesh datablock.

The bounding box now has clear separation between original object data
and object data after modifiers, so this should not be causing any
issues.

Free evaluated mesh when owner mesh changes

Ensures that evaluated mesh shares the same settings as its owner when
updates related on animation system happens.

Depsgraph: Update mesh when its geometry settings changes

Allows to have options like autosmooth animated.

Reviewers: brecht, mont29

Differential Revision: https://developer.blender.org/D5030
2019-06-07 09:13:51 +02:00
d8bff8e8f6 Free evaluated mesh when owner mesh changes
Ensures that evaluated mesh shares the same settings as its owner when
updates related on animation system happens.
2019-06-07 09:12:54 +02:00
2a5fcfaad0 Don't tag object data's bounding box as dirty before re-evaluaiton
Most of the time this actually tags evaluated mesh which will be tossed
away few lines below anyway. And this causes issues if the evaluated
mesh is actually owned by the mesh datablock.

The bounding box now has clear separation between original object data
and object data after modifiers, so this should not be causing any
issues.
2019-06-07 09:12:54 +02:00
f24a7fa31d Fix T65558: Crash on adding linked scene to Video Sequence Editor
This commit fixes crash but the possible 3D sound is still missing.
Also, sound from sequencer coming from a scene strip is also missing.

This is partially a regression, at least for F12 case. The editing
was already behaving wrong: it was needed to have scene strip to be
actually rendered in preview.
2019-06-07 09:12:37 +02:00
a232d27bba Sequencer: Typo 2019-06-07 08:39:43 +02:00
9337ba7fa6 Tool System: add sculpt mask lasso tool 2019-06-07 16:08:31 +10:00
a5c4dd6b33 Fix T65229: Crash adjusting last operator after using undo history
Undo history also missed updating the tool system and
calling undo pre/post handlers.
2019-06-07 15:33:39 +10:00
bfb05ee154 Fix T64669: Redo transform fails with constrained axis 2019-06-07 14:11:54 +10:00
5b2907ab69 Fly mode: Enable fancy icons instead of text for shortcuts 2019-06-07 13:01:37 +10:00
16b380d5e3 Fix T63744: Overlapping axis gizmo for 3D view translate & scale 2019-06-07 12:51:06 +10:00
b300b4e9cd Missed removing unused property from last commit 2019-06-07 12:22:30 +10:00
99eb4e9cc4 Keymap: expose gizmo press/drag as a preference
- Right click select always activates on press
  since this was added as a workaround to left click select conflict.
- Left click has the option to set this to drag or press.

Make this change based on feedback on 8778dd0c8b.
2019-06-07 12:16:25 +10:00
6dd9e08051 Keymap: gizmos now use a map that optionally activates on press
The legacy keymap now activates on press.
2019-06-07 12:10:56 +10:00
6bc761a12e Fix T65479: Gizmo drag unusable with tools that activate on press 2019-06-07 11:08:43 +10:00
29526504d7 Cleanup: unused var warning 2019-06-07 11:08:43 +10:00
aa003c7324 FIX: use_proxy strip property state has no effect.
Author: Olly Funkster, Richard Antalík

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2504
2019-06-06 16:23:39 -07:00
9c00605729 VSE: Cache invalidation
Add invalidation to strip add functions
Add invalidation for scene and movieclip strips
Skip invalidation for sound strips

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4989
2019-06-06 16:23:39 -07:00
2175fb0217 Fix T65333: VSE: Playback speed regression
3D engine settings were used to select image scaling method.
Use higher quality scaling only for rendering.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4995
2019-06-06 16:23:39 -07:00
76634a23bb Fix T63729 Eevee: Bump does not follow normal direction 2019-06-06 22:26:27 +02:00
6c5ef42549 Fix T65505: crash applying modifiers in paint and sculpt modes
We need to find a better solution for mixing normal refreshes in some corner
cases. We actually had similar issues in 2.79 anyway, not crashing is more
important.
2019-06-06 18:48:37 +02:00
73252d3f60 Fix T63701 Eevee: High Volumetric end distance darkens the image 2019-06-06 18:47:36 +02:00
Bruno Boaventura Scholl
8db514f81d Fix T60441, T60619: incorrect values for color values > 1.0
Modulo makes no sense here at all, is from an old bugfix to prevent a crash
that is no longer an issue.

Differential Revision: https://developer.blender.org/D4727
2019-06-06 18:06:33 +02:00
2be3a75efd Fix T65383 UI graphics glitches on macOS with Intel HD 4000
glDrawArrays is not supposed to be affected by primitive restart
but osx drivers never cease to surprise me.
2019-06-06 17:21:22 +02:00
2239dca7e9 Sequencer: Viewport Rendering Annotation
When rendering the Sequencer using viewport rendering the annotations
were not scaled to respect the scene render size. This was because the
matrices were calculated based on the output size and not the actual
rendersize.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5032
2019-06-06 17:15:24 +02:00
3a7af37e28 Python API Docs: fix some examples 2019-06-06 17:13:02 +02:00
3abb1695cf Fix T64742 Eevee: SSRefract broken with planar reflections 2019-06-06 16:52:21 +02:00
3c231c3810 cmake/msvc: Add ninja support for precompiled headers
Ninja was unable to see the dependency between the cpp
that generated the pch and the compile units that used
it. Explicitly managing this now makes precompiled headers
work with both msvc and clang, with both msbuild and ninja
based generators.
2019-06-06 08:26:15 -06:00
87fde57b63 Particles: remove unused particle settings from UI
Didn't touch rna to make sure that the Python API does not break.
Maybe I missed some, but these don't seem to be used anywere internally.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5034
2019-06-06 15:57:24 +02:00
93ec2c94e5 Fix T64533: Using "X-Axis Mirror" while posing with auto keyframe on does not keyframe the mirrored bone
Use an additional pose bone flag so we can keep track of mirrored bones that should be autokeyframed.

Reviewed By: Brecht

Differential Revision: https://developer.blender.org/D5033
2019-06-06 15:54:49 +02:00
3a20c056e8 Fix T58920: Dyntopo sculpt and snake hook brush artifacts.
This is a mix of solutions rBe60b18d51d58 and rB52af5fa31fbc.
What happened was that when a node of the BVH gets 0 vertices, the batch is untouched and therefore still drawn.
2019-06-06 10:46:47 -03:00
d8ec8a0272 Fix: Build error with ninja on windows
Ninja has issues detecting the implicit dependency on the
precompiled header output for freestyle. Disabled ninja
support for now until a proper solution can be found.
2019-06-06 07:19:58 -06:00
095df1ac21 Python API: allow external render engines to use Eevee for LookDev shading
This is enabled with bl_use_eevee_viewport = True. It allows external engines
to generate an Cycles/Eevee shader node setup to emulate their materials in
the realtime viewport, or to leave it to users to do manually.

Removed bl_use_exclude_layers and bl_use_shading_nodes that did nothing
anymore. This should not break API compatibility, any scripts setting those
should continue to work the same as before.

Also adds descriptions for some RenderEngine settings.
2019-06-06 15:07:09 +02:00
54021da58b Python Templates: fix operator_mesh_uv template 2019-06-06 14:36:08 +02:00
fbd9c09ef0 Depsgraph: Add relations for spline animation
Currently only obvious setting which can be animated is Smooth.

The rest requires more proper support from animation update on
the Curve datablock.

But at least with this change it's not a "dependency graph fault"
2019-06-06 14:21:39 +02:00
9e8e32e117 Fix T59176: Missing Animation Update for Surface Resolution U & V
While fix in dependency graph for those is trivial, adopting underlying
code to become aware of animated settings is quite a rabbit hole: there
are non-obvious hidden inter-dependencies between settings, which are
especially tricky for NURBS.

For until we have more dedicated time for this disabling animation.
2019-06-06 14:19:04 +02:00
a8e5ad9a56 Fix T65490: linked property in object duplicate should not persist
These things are somewhat arbitrary, but since there are separate shortcuts
and menu entries this seems the more expected behavior.
2019-06-06 12:19:05 +02:00
358c71cf2c Fix typo in tooltip (reported in T65555). 2019-06-06 11:58:14 +02:00
3325b19ee7 Fix T64788: Double keymap entry in preferences
A display issue for tools which share keymaps.
2019-06-06 19:06:18 +10:00
0f26332d5d Remove mutex lock from node localization
There is no obvious threading-unsafe code in the localization.
The main source of issues were the new_node/new_socket pointers
which are no longer used during node tree duplication.
2019-06-06 10:39:44 +02:00
2819b60933 Fix T63035: Undoing in pose mode destroys the entire pose
Respect do_time flag in on_visible_update, matching behavior of old
dependency graph and avoids unwanted animation updates.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5026
2019-06-06 09:58:09 +02:00
0afa9d6ae6 Industry Compat Keymap: Update tweak/select for animation editors to follow latest changes
- Proper support for dragging in empty areas using tweak events to either move or box select
  - Avoids transforming immediately on press, same as the built-in keymap
2019-06-06 09:32:47 +02:00
3c4a16acc5 Python: GPU Offscreen Rendering
When using python offscreen rendering the background was not drawn in
EEVEE. Users would expect that when calling the `draw_view3d` method
that it shows the same as in the 3d viewport.

Seems to be a difference between the meaning of draw_background in b279
and b280. In B279 the world background would be drawn. In B280 the
transparency is changed.

Reviewed By: campbellbarton, fclem

Maniphest Tasks: T61768

Differential Revision: https://developer.blender.org/D5022
2019-06-06 08:38:05 +02:00
d7e7452067 Quiet warning creating sculpt brush tooltips 2019-06-06 15:59:27 +10:00
b69ed14ff7 Fix T65108: GPencil Sculpt mode select tools don't work
Move the sculpt keymap from the mode to the tool.
2019-06-06 15:53:11 +10:00
f0ff593d97 Cleanup: indentation
Also add comment to `FRS_precomp.h`.
2019-06-06 14:50:12 +10:00
c257e1a298 Fix use of removed Image.use_alpha property
Change missing from 7aaa7aa9dd
2019-06-06 14:45:11 +10:00
7944a1aede Cmake/Windows: Fix numpy being unpacked every build.
Every time you build cmake it unpacks numpy. It is seemingly
very unhappy with OUTPUTS being directories rather than files.

The creating of the directory is not needed, so that step was easy
to resolve, next problem: was there was not a target that outputs
the tarball so it too was deemed out of date. Losing that dependency
as well, fixes the issue, while this is not great if we ever update
the libs in svn, we are planning to drastically change the way we
package python for windows so this is ok for now, but needs to be
addressed with the next python update, T65547 is the tracking ticket
for this.

Tested with VS2015/2017/2019 with both msbuild and ninja generators
2019-06-05 20:51:00 -06:00
9c76b2c3b6 Freestyle: Use precompiled headers with MSVC.
This brings down the build time for freestyle with MSVC from a
minute to 10-20 seconds.

vs2019 bf_freestyle debug   before: 60464 ms  after: 11028 ms
vs2019 bf_freestyle release before: 56984 ms  after: 20526 ms

Differential Revision: https://developer.blender.org/D2606

Reviewed By: brecht , sergey
2019-06-05 19:05:16 -06:00
8b2b79c210 Cleanup: quiet missing variable declaration warning 2019-06-06 10:27:57 +10:00
5db4608f70 Cleanup: extra-semi-stmt warning 2019-06-06 10:16:18 +10:00
0f6ac1883d CMake: pass link deps to library targets with INTERFACE
Introduced since removing BLENDER_SORTED_LIBS.

This caused building a library to build all it's dependencies.
2019-06-06 10:16:06 +10:00
41ee85115d Fix missing header for gpu_state.c
Failed to build without WITH_LEGACY_OPENGL.
2019-06-06 10:06:54 +10:00
600ca3190a Cleanup: argument sign mismatch warning 2019-06-06 09:55:53 +10:00
8fa65ed31b Fix T65118 Eevee: NaN when using bent normals 2019-06-05 21:33:08 +02:00
94e6526ed0 fix T65480: Collada exporter did not export image texture for Base Color 2019-06-05 21:15:32 +02:00
ce66b22c42 Fix crash when editing shaders on Intel HD 4000.
In the Intel HD 4000 driver a shader has to be deleted in the same context in which it is created.
However, because you can't use a rendering context on different threads, to maintain the multithreaded compilation, the solution was to use the `GL_ARB_get_program_binary` and copy the binary generated for the shader and generate a shader on the main context using that binary.
This solution is limited only to Intel HD 4000 and windows.

Reviewers: fclem

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5019
2019-06-05 13:50:58 -03:00
Dalai Felinto
dd81efa4a3 Tooltip: Fix use_preview_range tooltip (OpenGL > View)
In 2.80 the old OpenGL render is called View render.
Also made the tooltip shorter (it was too repetitive).
2019-06-05 14:44:40 +00:00
365ba6f5a1 Fix T65437: sculpt dyntopo undo not showing correct mesh 2019-06-05 16:30:07 +02:00
806d4fbc5e GPencil: Fix mirror modifier rotation around object
Still pending when the original object is rotated or scaled.
2019-06-05 15:55:28 +02:00
f5908e45d5 Fix T64336: Switching to a Camera which is hidden, does not evaluate the animation data
Changing camera might require more objects pulled into the dependency graph,
so need tag relations for update.
2019-06-05 15:53:26 +02:00
b79976a9bd Dopesheet: drag to box select in dopesheet
This includes refactoring of the `mouse_action_keys` to
make it easier to just detect if there is a key under
the mouse. The refactoring mostly consists of extracting
methods and reducing vertical scope of variables.

Reviewers: billreynish, brecht

Differential Revision: https://developer.blender.org/D5024
2019-06-05 15:48:30 +02:00
fb4ec706cd make.bat: Support optional paths for make format
make.bat now supports optional parameters to restrict
the formatting to a specific folder. Multiple paths
may be given

example:
make.bat format source/blender/blenkernel source/blender/gpu
2019-06-05 07:30:45 -06:00
328f7e1365 Fix T63384: Vertices are moving in different directions 2019-06-05 15:17:53 +02:00
112cd86eb5 Cleanup: Remove unused argument 2019-06-05 15:14:48 +02:00
5f737cc18f Fix T65520: Assigning Material a second time crashes Blender 2019-06-05 14:53:00 +02:00
a73b250fc5 Code Style: Make Format 2019-06-05 14:30:44 +02:00
eeda9369b6 TexturePaint: Missing Texture Depth Test
Depth testing was off as it used the precomputed ModelView matrix. As
draw engines currently use a different approach the depth was sometimes
a bit off making the color disappear.

This change will use a different vertex shader that will write the
correct depth. I expected the same change to be needed in the bone
selection overlay but was not able to reproduce it.

Reviewed By: fclem

Maniphest Tasks: T64615

Differential Revision: https://developer.blender.org/D5006
2019-06-05 14:29:27 +02:00
957c8f1305 Workbench: World Space Cavity
When using the world space cavity shader together with viewport or image
rendering only a single pattern was used. This was that the iteration of
the cavity shader was updated when the cache is initialized.

Now the cavity iteration is updated together when the TAA samples are
updated.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5021
2019-06-05 14:24:58 +02:00
bbaa1bffe9 Sound: Port to a copy-on-write concept
This change makes it so sound handles are created for evaluated scene,
sequencer and speakers. This allows to have properly evaluated animation
on them.

For the viewport playback sound uses regular dependency graph.

For the final render sound uses dependency graph created for render pipeline,
which now also contains sequencer and sound datablocks.

All the direct sound update calls are replaced with corresponding dependency
graph recalc tag.
2019-06-05 14:23:54 +02:00
863b7b3668 Depsgraph: Store recalc tag in ID->recalc
Allows to have more granularity in checks compared to a node-factory
based tagging in a generic tag/flush code.
2019-06-05 14:23:53 +02:00
4674e23220 Cleanup: Make comment around DEG evaluation functions more clear 2019-06-05 14:23:53 +02:00
6d143f3775 Fix T65389 Edit Mesh: Face dots are not shown in Xray mode 2019-06-05 14:21:26 +02:00
f2da21e052 Python GPU Shader: Fix crash when uniform is not found.
Error in string format.
2019-06-05 08:45:12 -03:00
8db6b1e2dd Fix empty name shown for operators opening menus without a title
For some cases like the edit mode context menu we don't currently have a fixed
title since it's dynamic. This should be improved, but we should at least still
show Call Menu if there is no menu title.
2019-06-05 13:27:41 +02:00
eda377c223 update Collada Importer: reworked export and import of Materials
- added import of transparency and emission into principled BSDF Shader
- added support for importing all default collada material parameters

  * diffuse
  * emission
  * index_of_refraction
  * shininess (mapped to BSDF Roughness)
  * reflectivity (mapped to BSDF Metallic)
  * transparency + transparent mapped to BSDF Alpha)
  * ambient (creates unconnected texture node)
  * specular (creates unconnected texture node)
  * reflective(creates unconnected texture node)

- added support for exporting collada material parameters:

  * diffuse
  * emission
  * index_of_refraction
  * shininess (mapped to BSDF Roughness)
  * reflectivity (mapped to BSDF Metallic)
  * transparency + transparent mapped to BSDF Alpha)

- prepared support for exporting the following parameters
  but currently commented out:

  * ambient (creates unconnected texture node)
  * specular (creates unconnected texture node)
  * reflective(creates unconnected texture node)

  Problem: For now we only allow export of principled BSDF based
  materials. I am not sure from where to get ambient, specular
  and reflective as those values are not included in the
  principled BSDF Shader (wip).
2019-06-05 12:42:54 +02:00
98cea7edce Fix T65298 Eevee: Principled BSDF doesn't use specular with metals
This does add some more register pressure as it passes a new vec3 down
the shading function. But for now we care more about accuracy than
efficiency.
2019-06-05 12:20:49 +02:00
cd1ac4d908 Fix T65492: make material slots popover wider 2019-06-05 11:46:27 +02:00
d46aee2982 GPencil: Create new set of brushes for Win32 damaged files when use primitives
Some old Win32 files could have the brushes damaged and this produces a segment fault. Now, if the brush is damaged, a new set of brushes is created.

Related to T61413
2019-06-05 09:57:21 +02:00
Dalai Felinto
e80cbdac33 Fix T65502: Crash when moving Collection into disabled Collection 2019-06-04 19:32:55 -03:00
Dalai Felinto
fa24ec41aa Outliner: Fix drawing of collection with disabled parent
If the layer collection had a parent that was disabled we wouldn't draw
it altogether.

Note: In this case I'm moving any enabled collection with a disabled
parent up in the hierarchy.

All in all I'm happy with this but I would like us to tackle the 1-20
shortcut, Ctrl+H menu and Collections viewport panel to do something
similar.
2019-06-04 19:21:23 -03:00
1324659dee GTests: BLI_task: Add basic tests for BLI_task_parallel_listbase(), and some performances benchmarks.
Nothing special to mention about regression test itself, it basically
mimics the one for `BLI_task_parallel_mempool()`...

Basic performances benchmarks do not tell us much, besides the fact that
for very light processing of listbase, even with 100k items,
single-thread remains an order of magnitude faster than threaded code.
Synchronization is just way too expensive in that case with current
code. This should be partially solvable with much bigger (and
configurable) chunk sizes though (current ones are just ridiculous
for such cases ;) )...
2019-06-04 23:51:03 +02:00
30d9366d17 Fix (unreported) Broken BLI_threadapi_exit().
Function would not clear the static scheduler pointer, which lead to
crash (mem use after free) when trying to re-init and use the task API
again. Should not happen in Blender itself, but could in other cases
(like some future gtests ;) ).
2019-06-04 23:51:03 +02:00
b640265f77 Cleanup: Freedesktop: Use 2.79b release date 2019-06-04 15:08:21 -04:00
d77c2305a3 Fix T65372: Can't turn off Freestyle line anti-aliasing in Eevee
Freestyle was not copying the eevee settings when creating a scene
copy.
2019-06-04 20:08:04 +02:00
2820870a13 Partial revert of e388cd8bb4
The constraint icons are now no longer shown in the Outliner again.

This needs a more robust implementation that also works for bones & pose mode.

The new constraint icons are still shown in the Constraint Properties.
2019-06-04 19:21:11 +02:00
4ddc840314 Fix T65378 Eevee: Glitches in ESM shadowmapping
This happen to be a NaN caused by an infinite sum in the shadow
copy shader.
2019-06-04 18:42:50 +02:00
942a748d5d Eevee: Merge shadow map processing into one drawcall per light
This removes a lot of framebuffer configuration and binding.
2019-06-04 18:42:50 +02:00
ff7401b02c Fix T64214 Eevee: Issue with Emission node and Alpha blending
Emission node was outputing alpha information but is was not
supposed to. Match cycles reference.
2019-06-04 18:42:37 +02:00
2e4d27669b Fix T65042 Eevee: Hair Info Tangent Normal not working correctly 2019-06-04 18:41:19 +02:00
5916b09670 Fix T65032: selection conflicts between motion tracks and masks in clip editor 2019-06-04 18:26:02 +02:00
5158896d7d Fix T65486: Cycles f-stop value from old files not preserved 2019-06-04 18:26:02 +02:00
0dbbc5aac7 Fix status bar and keymap editor showing Call Menu instead of menu name 2019-06-04 18:26:02 +02:00
e388cd8bb4 UI: Add icons to Constraints
Each constraint now has a unique icon, just like modifiers.

Icons are designed by Andrzej Ambroż & Alessio Monti, with user input.

Patch by Alessio Monti.
2019-06-04 18:10:47 +02:00
636751bb36 GPencil: Clarify Target weight tooltip and remove lower limit
The target value was affecting the lower value and this was weird. Now the value is clamped between 0 and target weight.
2019-06-04 17:42:39 +02:00
8b1ca3ec53 NLA Editor: drag in empty region to invoke box-select
Reviewers: brecht, billreynish

Differential Revision: https://developer.blender.org/D5010
2019-06-04 16:20:30 +02:00
Pelle Johnsen
ddc19819f3 Fix T60971: Apply visual transform not working
Fix issue with 'apply visual transfrom' not working.
Based on fix for https://developer.blender.org/T55494

Reviewers: campbellbarton, sergey

Maniphest Tasks: T60971

Differential Revision: https://developer.blender.org/D5007
2019-06-04 15:24:41 +02:00
2fb54ef86e Fix T65054: Blender 2.80 crashes when opening a scene created by blender 2.7x with hierarchy duplication set to "group".
Regression introduced by rB7fe3d1e7d718 (fixing T57934).

This effectively reverts rBrB7fe3d1e7d718, since changing the type of an
object is a very bad idea in general, and would need a careful and
complex check of all of its usages (many object usages assume a specific
type of object...).

Instead, we simply remove duplicollection on those objects, and give a
warning in case dupligroup was effectively used (in many reported cases,
dupligroup was a 'mistake setting', without actually instancing
aniything).

Note that the otehr idea to fix that versioning issue (to create a new
empty object for the instancing) is much less easy than it might look
(one would need to take into account potential animations, relations
between objects, etc.). Doable probably, but way overkill for a
corner-case 'bad' usage of the feature in the first place.
2019-06-04 15:24:23 +02:00
5361fc2c33 GPU: High Definition Color Buffer
For offscreen rendering a high definition color buffer is needed.
Without it there are banding issues when doing multi-sampling viewport
rendering.

Reviewed By: fclem

Maniphest Tasks: T65287

Differential Revision: https://developer.blender.org/D5009
2019-06-04 15:15:59 +02:00
19691e3ae2 Image Info
The image information for multilayer openexr files are only shown on the
first draw. In the second draw the render result property is filled of
the image, making blender think the image is a render result and it want
to display information about the renderpasses. Which are not present.

It could be that in the first draw the image data is not requested as
the buttons are drawn, before the main area

This change will display both information. We should investigate how to
actually detect if this is a render result or not as similar code is
present in the `node_shader_buts_tex_environment_ex`.

Reviewed By: brecht

Maniphest Tasks: T65345

Differential Revision: https://developer.blender.org/D4987
2019-06-04 15:14:15 +02:00
7484ed9bdc NLA Editor: box-select was selecting wrong elements
This was missing in rBfa59346c134.
2019-06-04 14:52:31 +02:00
33e8db94b1 Fix (unreported) missing updates in scripts/docs after scene.update() removal.
This should really have been done together with API changes, simple
usage of grep does the trick to catch most places needing updates.
2019-06-04 14:39:51 +02:00
1d2e4c44bd Fix T64827: "Batch-Generate Previews" crashes.
Missed when py API for depsgraph was changed... tsst...

Based on D4917 by @lichtwerk, thanks.
2019-06-04 14:39:51 +02:00
c0c2f8663e Fix T65303: fix and improve autorun-scripts popup
Now, the file does not have to be reloaded in all cases.
Instead, just scripts are enabled and all depsgraphs freed.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5000
2019-06-04 13:37:45 +02:00
f5f1407a7e Fix T65451: Changing driver expression doesn't update relations 2019-06-04 12:10:42 +02:00
30c0d780f9 Depsgraph: Only run editors ID update on manual edits
This is how it worked in 2.79 and it is how it is expected to be working.

Avoids unintended icons update during animation playback.

Fixes T64318: Update of material icons during animation 2x performance penalty
2019-06-04 11:43:27 +02:00
04bac38731 Graph Editor: drag to box select keyframes
There is a keymap conflict with ctrl+tweak.
Therefore, I did not include this yet.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4999
2019-06-04 11:35:57 +02:00
c3f00d7879 Fix T65447: Mask doesn't update in compositor unless there's motion blur on
This is probably just one of the related issues.

Root of the problem was that compositor job was using original scene and node
tree for compositing. It is not guaranteed to have all the evaluated data.

Switched compositor job to use it's own render-pipeline-like dependency graph
which has everything evaluated in it.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4998
2019-06-04 09:41:33 +02:00
b998a7b384 Fix T64247: Crash on playback with special shader node tree
The root of the problem goes to the fact that node tree copying
uses source tree and nodes for a temporary storage.

This makes it so multiple dependency graphs can not be reliably
evaluated from different threads if they are using same original
node tree.

Solved by doing the following:

- Commonly used tree copying function (which is used by library
  manager) keeps source tree, nodes and sockets untouched.

- All the related areas (like node tree's callback) now have
  const qualifier on the input.

- Areas which needs to have those temporary pointers assigned are
  now using explicit function.

  Would be really cool to get rid of those temporary pointers
  completely, but this is a bit tricky due to hairy nature of the
  code. Can happen any time now though: is easy enough to generalize
  the new pointers mapping.

Note that this change is only intended to solve the crash.
The fact that icons shouldn't be updated on playback will be fixed
as a separate change.

Reviewers: brecht, fclem

Reviewed By: brecht, fclem

Subscribers: brecht, fclem

Differential Revision: https://developer.blender.org/D5002
2019-06-04 09:34:35 +02:00
351e68e0a4 Docs: update quick-start
Resolves T64146
2019-06-04 13:12:59 +10:00
0b36780fb4 Revert "Cleanup: Cleanup: style, use braces for GHOST (X11/SDL)"
This reverts commit 935c9ab0de.

Clang-tidy was making unrelated *fixes*.
2019-06-04 11:36:54 +10:00
935c9ab0de Cleanup: Cleanup: style, use braces for GHOST (X11/SDL) 2019-06-04 11:30:31 +10:00
0dbd05ffdd Cleanup: Cleanup: style, use braces for collada (BCMath) 2019-06-04 11:14:59 +10:00
ea3a652fbf Cleanup: style, use braces for draw (fxaa_lib) 2019-06-04 11:14:37 +10:00
271ec9ff53 Cleanup: rename 2D scroll defines
- Use `V2D_SCROLL_` prefix.
- Use more descriptive names.
2019-06-04 11:05:32 +10:00
c13e10a740 Cleanup: clang-format, remove tabs 2019-06-04 10:52:20 +10:00
d62a749fcf Fix T65352: bpy.data.meshes.new_from_object() doesn't increment user count for materials referenced by the mesh.
We cannot do refcount operations in a non-Main ID, this is forbidden.

While that whole func could probably use some love and refactor, for now
sticking to minimal changes and just moving refcounting op after mesh
has been transferred to Main database.
2019-06-03 21:00:44 +02:00
0ee75698d0 transform_snap_object: Ignore occlusion test on curves in edit mode. 2019-06-03 15:17:54 -03:00
EitanSomething
cd90986bcb UI: Prevent scrollbars from getting too small to grab
Differential Revision: https://developer.blender.org/D5001
2019-06-03 18:17:24 +02:00
Dalai Felinto
c39a8657be Fix T65448 - Outliner - Show all inside in disabled collection crash 2019-06-03 13:11:29 -03:00
de0cae29cf GPU: Fix Restart index bug
Restart index can have been changed in another context and the static
var can get out of sync. A better solution is to set the restart index
when binding the VAO. It also have less perf impact.

Fix T65364 Corrupted mesh display on macOS
2019-06-03 17:58:28 +02:00
0efe89bdd8 Cleanup: style, use braces in GPU 2019-06-04 00:42:22 +10:00
97e53d2385 fix collada: get Alpha and Emission from principled BSDF Shader 2019-06-03 16:35:01 +02:00
1f650c402d Cleanup: style, use braces in RNA 2019-06-04 00:24:38 +10:00
e3f2034e7b Cleanup: Cleanup: style, use braces for collada 2019-06-04 00:18:35 +10:00
482f4ca100 UI: Fix wrong use of icons in the Object > Visibility panel when using Cycles 2019-06-03 16:15:12 +02:00
95f5272bda Cleanup: style, use braces in draw 2019-06-04 00:14:05 +10:00
7b28a31f2c Cleanup: style, use braces in makesrna 2019-06-04 00:10:44 +10:00
d5f6e573ed Cleanup: use const arguments 2019-06-03 23:58:10 +10:00
6dca5ff41f Cleanup: remove unused arg to wm_event_add_ghostevent 2019-06-03 23:48:56 +10:00
39919e3532 Fix T65391: Wrong drag threshold for mouse motion 2019-06-03 23:41:57 +10:00
4d8ffa5ac5 Fix T65328: Offset when outliner gains focus
I'm not actually not sure under which circumstances
this code is actually doing something useful.
2019-06-03 14:10:43 +02:00
24f625f345 Cleanup: differentiate drag-and-drop from drag events 2019-06-03 21:42:08 +10:00
ab5219af34 Markers: Click-drag in empty area to box select markers
To make this work, other changes were necessary:
* To select a specific marker you have to click more exactly on the icon.
* Moving markers with click-drag only works when starting on a marker.

Additionally this patch implements that all markers are deselected,
when the user clicks in an empty area.

Reviewers: billreynish, brecht

Differential Revision: https://developer.blender.org/D4975
2019-06-03 11:37:47 +02:00
a2a05acb4a Fix T65399: crash playing animation after applying smoke flow modifier
missing DEG update.

Reviewers: sergey

Maniphest Tasks: T65399

Differential Revision: https://developer.blender.org/D4996
2019-06-03 11:25:41 +02:00
ccc7ebf7b1 Fix T65408: GPencil Weight Paint, strength and falloff are ignored when painting a lesser vertexweight
The value was clamped to minimum value before checking the influence.
2019-06-03 10:00:38 +02:00
3041705c51 Fix T65294: Orbit navigate gizmo fails in paint modes 2019-06-03 17:55:56 +10:00
4fbc71a320 Fix T65439: quick explode error
Material setup for quick explode was assuming a shader with a "BSDF"
output socket connected to the material output node whereas other socket
names are valid ("Shader", "Emission", "BSSRDF", "Holdout"...)
2019-06-03 09:49:58 +02:00
2c18e400e8 Fix return type in recent gizmo key-map refactor 2019-06-03 16:59:22 +10:00
19dcb22a88 fix collada Importer: Set bone transformation type when importing unskinned skeleton 2019-06-02 23:33:22 +02:00
b7bd8d813f feature collada: Allow export/import of skeletal animations as curves 2019-06-02 23:00:57 +02:00
0731b88ddb refactor collada: Added utility functions bc_string_before() and bc_string_after() 2019-06-02 23:00:57 +02:00
820e4d4303 fix T34062 Collada exporter: changed order of export for decomposed transformation.
1.) The Blender order of applying transforms is:

 Scale
 Rotation
 Transformation

Reasoning: This order ensures there is no shearing, which happens
when you do scaling after rotation, see also:

https://blender.stackexchange.com/questions/1806

The Collada exporter now exports in the order how the transforms
need to be applied upon import.

2.) Also removed obsolete #if 0 lines
2019-06-02 23:00:57 +02:00
0bcf29b8cd refactor: use Quat and BCQuat instead of float[4] arrays for Quaternions (wip) 2019-06-02 23:00:57 +02:00
d04622e427 fix: enforce transform export as <matrix> when exporting animated armature"
Currently we can not export Decompsed Transforms in combination with
Armature asnimations. As a temporary workaround enforce export
of transformations as Matrix for armature objects.
2019-06-02 23:00:57 +02:00
b646da8d85 fix: add back changes after last pull from master 2019-06-02 23:00:56 +02:00
122b9478c6 refactor collada: replace bc_sanitize_mat() by static class method in BCMatrix 2019-06-02 23:00:56 +02:00
70bc179c45 refactor Collada: rename BCMatrix.* class files to BCMath.* 2019-06-02 23:00:56 +02:00
e17990bab7 refactor Collada: Add new class Quat (wip) 2019-06-02 23:00:56 +02:00
692edf4301 refactor collada: Moved BCMatrix to its own file 2019-06-02 23:00:56 +02:00
345304058f refactor collada: Moved basic typedefs in own file 2019-06-02 23:00:56 +02:00
a591424268 refactor collada: reorganize class methods in file 2019-06-02 23:00:55 +02:00
04c3692124 Industry Compat keymap: Fix inability to use Ctrl-S to save while in Weight Paint mode
Was a keymap conflict
2019-06-02 22:47:07 +02:00
c91c00ae6c UI: Fix inconsistent use of 'LookDev' vs 'Look Dev' 2019-06-02 20:48:54 +02:00
4ca34e6e34 UI: Fix small naming inconsistency in the UV Editor View menu
Now it's consistent with 3D View
2019-06-02 20:30:55 +02:00
1c28d07065 Fix: Dynamic Paint Image Bake button missing when using certain Surface types
This required doing a very slight UI re-org of a few properties to work reasonably.
2019-06-02 20:24:54 +02:00
fbc11a86c8 FreeDesktop: Add Release information to AppStream
This commit improves Blender's AppStream metadata with minor punctuation and grammar improvements to the description, and a new `<release>` tag for the current release.

The `<release>` tag benefits Blender in the following ways:
- Flathub users get to see the actual release number instead of "stable"
- Make it easy for all packagers to include changelogs, so Blender's users gets to see what's new in 2.79
- Blender gets featured in GNOME software to reward it for having Release information in its AppStream metadata (KDE Discover [[ https://bugs.kde.org/show_bug.cgi?id=389509 | plans do do the same thing ]])

If the prior objection to adding release data to the AppStream metadata was the ongoing maintenance burden, I volunteer to take it on for subsequent Blender releases.

Author: @ngraham

Differential Revision: https://developer.blender.org/D3065
2019-06-02 10:24:03 -04:00
8d1666fc6d Fix T65416: outdated location description for Cycles add-on 2019-06-02 13:23:04 +02:00
2a192624bc Fix T65082, T65084: duplicating workspace does not preserve mode and order 2019-06-02 13:03:13 +02:00
Tomoaki Kawada
99de160340 macOS: fix viewport lagging, by using CAMetalLayer instead of NSOpenGLView
On GPUs that support it, we now present OpenGL contents via CAMetalLayer. This
fixes frame skipping issues found in T60043. If the system does not have a Metal
capable GPU, NSOpenGLView will continue to be used.

Patch by Tomoaki Kawada, with some changes by Brecht Van Lommel.

Differential Revision: https://developer.blender.org/D4619
2019-06-02 12:54:46 +02:00
1418eee5f5 macOS: increase minimum required version to 10.11
This is in preparation of an the upcoming fix where we need to use a Metal
layer to avoid performance issue when drawing with OpenGL. Note that we already
only officially support 10.12+, the difference with this change is that Blender
will not start at all on 10.9 and 10.10.
2019-06-02 12:53:41 +02:00
Tomoaki Kawada
62fe7e9a9d GPU: support default framebuffer with ID not equal to 0 2019-06-02 12:50:50 +02:00
2a5dc454f6 Cleanup: minor comment cleanups in GHOST 2019-06-02 12:50:50 +02:00
01a5e087aa Cleanup: move CocoaOpenGLView into own header 2019-06-02 12:50:50 +02:00
593eab66b5 Cleanup: remove use of deprecated macOS API 2019-06-02 12:50:50 +02:00
e7e52f7cff Fix T65185: Cycles viewport render no refreshing overlays properly
Don't rely on detecting view matrix changes to refresh depth buffer, instead
detect redraw tags coming from progressive render samples.
2019-06-02 12:47:52 +02:00
114973584d Cleanup: better comments and naming for redraw flags 2019-06-02 12:47:52 +02:00
f332a71180 GPencil: Cleanup unused lines
These lines were related to other brushes and were copied in the function by error, but not required.
2019-06-02 12:12:33 +02:00
079c7f918c Cleanup: make.bat remove noge option from help
The noge option has been removed but was still
shown in the help text.
2019-06-01 16:51:31 -06:00
893467a8e2 make.bat: Add convenience option to disable buildinfo
Optional parameter nobuildinfo turns WITH_BUILDINFO Off
which is helpful when doing development.
2019-06-01 16:49:21 -06:00
0360a2920d Fix: Trailing directory separator missing in default font path on windows.
This caused the file browser to open in c:\windows with the fonts
folder selected instead of opening c:\windows\fonts\ and listing
the fonts.

Reported on chat by @blendify
2019-06-01 10:51:19 -06:00
cc600de669 Cycles Denoising: Get rid of halos around bright edges
Previously, bright edges (e.g. caused by rim lighting) would sometimes get
halos around them after denoising.

This change introduces a log(1+x) highlight compression step that is performed
before denoising and reversed afterwards. That way, the denoising algorithm
itself operates in the compressed space and therefore bright edges cause less
numerical issues.
2019-06-01 00:45:03 +02:00
Dalai Felinto
d5b813301a Fix T65330: Blender crash when double click on face
The fix itself is by Germano Cavalcante (mano-wii).

But since I was investigating this with him, I'm including here an
assert in EDBM_select_id_bm_elem_get to help catching this sooner
in the future
2019-05-31 18:41:18 -03:00
Dalai Felinto
6f9518f243 Fix T64990: Isolate collection wrong reaction
Bringing the same logic we do in the outliner restrict column callback
and the menu call.

Also removing the "change depsgraph" logic there. Isolate collections
should not affect depsgraph relations (if it does it is to be tackled
separately anyways).
2019-05-31 15:51:45 -03:00
5902a9cb63 Fix T65265: File > Quit shortcut assign different depending if file is saved 2019-05-31 19:26:20 +02:00
Dalai Felinto
d0258abdd7 Fix Outliner: New collections are hidden
Users could change the master collection flags, but they should not.

That would not effectively affect the master collection objects
(depsgraph flag evaluation ignores master collection flags).

However we use the layer collection flags of the parent collection when creating
a new child collection.

We *could* solve this differently by creating a new RNA type for the
master collection (and layer collection) and hook this with rna refine.
But this patch seems to work well enough and it is simpler.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4981
2019-05-31 14:02:26 -03:00
3f23299403 Fix T65308: edit studio light state stays active after restarting Blender
This is only temporary for editing, should not be preserved.
2019-05-31 18:17:19 +02:00
acab6f7175 Fix T65317: crash applying wave modifier with texture 2019-05-31 18:17:20 +02:00
a55d79ed25 Fix T65311: crash using 3D viewport panning outside viewport 2019-05-31 18:00:08 +02:00
f87bba0368 Fix T62282: multires sculpting does not update smooth normals
It may be good to move the normals update out of the drawing code. But it was
already there for the non-multires sculpt cases, and does not have an obvious
place since we bypass the depsgraph and want to avoid the cost of updating the
normals multiple times when multiple events are handled before a redraw.
2019-05-31 17:17:03 +02:00
151f69a5c2 Fix various missing updates in sculpt mode, when changing modifiers and dyntopo
This restores the code that updates the sculpt session and PBVH from dependency
graph evaluation.
2019-05-31 17:17:03 +02:00
692891f69e Fix sculpt mode drawing with modifiers still being wrong in some cases
Centralize logic for when to use the PBVH for drawing, fix missing tests in
mask drawing, fix missing tests for multiple windows, only do more expensive
update for all viewports at end of the stroke.
2019-05-31 17:17:03 +02:00
9899999e94 Fix crash on certain changes in edit mode
Was missing re-set evaluated mesh to NULL.

Fix T65302: Crash after selecting one of multiple materials
Fix T65346: Blender crashes when selecting material in editing mode and LookDev view
Fix T65344: Blender crashes in edit mode when changing object
2019-05-31 17:06:06 +02:00
4620bd4f79 GPencil: Cleanup some comments 2019-05-31 16:55:06 +02:00
Dalai Felinto
c01e43d024 Update Python GPU example to latest depsgraph API 2019-05-31 11:31:04 -03:00
3a72c9aa33 Cleanup: use static_assert on MSVC versions that support it.
This greatly improves the error message
2019-05-31 08:12:21 -06:00
Dalai Felinto
6eebeb577d Walk mode: Enable fancy icons instead of text for shortcuts
Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D4988
2019-05-31 10:51:39 -03:00
Dalai Felinto
db67a17d17 Fix T65278: Stats info and instancing "misinformation"
Object could and polygon count should ignore multiple instances of
the same data, yet count it at least once even if linked.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4986
2019-05-31 10:50:37 -03:00
aba4e6810f Cleanup: style, use braces in source/ (include disabled blocks) 2019-05-31 23:22:52 +10:00
72a563cdee Fix bmesh_to_mesh freeing possibly referenced vertices
Fixes Godot exporter issue reported in T65285.
2019-05-31 15:07:15 +02:00
d8dbd49a2f Cleanup: style, use braces in source/
Automated using clang-tidy.
2019-05-31 22:55:15 +10:00
8987f7987d Fix missing file read/write of proxy/transform/crop settings when not used
This was inconsistent with other data handling in Blender.
2019-05-31 14:47:08 +02:00
aec28acc75 Industry Compat keymap: Fix UV Editor shift-click to extend selection
Also set Transform to T key, consistent with 3D View
2019-05-31 13:59:24 +02:00
a9450dbf0d Gizmo: add 2D navigation for image/clip/sequencer views 2019-05-31 21:51:02 +10:00
56a533c071 WM: option to ignore cursor image/clip/view2d zoom
In preparation for view navigation gizmos.
2019-05-31 21:48:43 +10:00
455e14eccd Fix T65200: Crash by hiting "tab" after sculpting with dyntopo
Make sure object is properly evaluated to the new state when
it is expected to.

Reviewers: brecht, mont29

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4985
2019-05-31 12:55:02 +02:00
23064248d7 DrawManager: Color Management
The draw manager used to determine if the view transform should be
applied by checking if the scene was not rendered to an offscreen image.

As the sequencer and texture painting needs to render to an offscreen
image with the view transform applied we need to separate the
`do_color_management` from the `is_image_render`.

Reviewed By: fclem

Maniphest Tasks: T64849

Differential Revision: https://developer.blender.org/D4909
2019-05-31 12:44:18 +02:00
d0fb602e2c DrawManager: Sculpt Mesh Drawing
More accurate determination when to draw the PBVH and when to draw the
regular mesh. PBVH drawing is done for Multires, Dyntopo and normal
sculpting with no active modifiers.

Maniphest Tasks: T62070

Differential Revision: https://developer.blender.org/D4731
2019-05-31 12:39:21 +02:00
2f78bd1d52 Fix build error on FreeBSD
Don't rely on indirect header includes.
2019-05-31 12:14:42 +02:00
aa55581776 EEVEE: Baking + Volumetrics
Missing init cache call to volumetrics during light baking

Reviewed By: fclem

Maniphest Tasks: T65206

Differential Revision: https://developer.blender.org/D4984
2019-05-31 12:12:09 +02:00
77d119a231 Fix T63981: Factory default memory cache limit is 4096 MB
The initialization of default settings and cache limit and audio.
2019-05-31 12:08:10 +02:00
fdb83d98f7 Cleanup: simplify static assert definitions, assuming C11 and C++11 2019-05-31 12:00:31 +02:00
8d95dcd87d Fix: Don't use a slider to control the Background Image Scale property.
It makes no sense to control this with a slider, since it became difficult to scale in normal ranges, and scale factors aren't represented well this way.
2019-05-31 11:19:56 +02:00
9f0107bb14 Fix compilation previous commit 2019-05-31 11:11:57 +02:00
e3dfe29110 Fix T65334: use _Static_assert on clang as well, to avoid macOS build error
Still needs a proper solution for older compilers with custom static assert.
macro that can conflict when there is an assert on the same line in multiple
files.
2019-05-31 10:49:36 +02:00
26d4a2a516 Fix T55494: Apply transforms on parents and children
Fix T63790: Crash when applying Scale of Object with vertex parent

Made apply transform to fully live in the evaluated domain.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4976
2019-05-31 10:33:34 +02:00
963917e1b9 Fix T65285: Crash with Object.to_mesh() in certain conditions
Was happening when modifier stack detected that mesh is not deformed
and is not modified and attempted to share result across multiple
objects.

This was introduced in 2f77119.

Now functions which are supposed to return mesh owned by caller will
do so again. Shouldn't be a huge impact on memory print since the
data layers are referenced.
2019-05-31 10:05:56 +02:00
2c4a9f7718 Keymap: Add back Ctrl-Up/Down for 2.7X 2019-05-31 16:33:39 +10:00
b4071c56ce Fix T65147: Rotate normal not interactive from menu 2019-05-31 16:24:58 +10:00
41dce8af6a Cleanup: clang-format 2019-05-31 15:44:47 +10:00
6b286ca667 Cleanup: undeclared variable warning 2019-05-31 15:44:47 +10:00
b5dc3d43e4 makesrna: quiet re-declared enum warning
Note that BLI_STATIC_ASSERT use in headers is likely to cause this
error again, we could have a version that takes a unique ID
to be used in headers.
2019-05-31 15:44:47 +10:00
451c533e25 VSE: Menu bug fixes
- Return Toggle Meta to Strip Menu
 - Move position of Lock/Mute in Strip Menu to match position in Context Menu.
 - Remove Lock icon.

Author: Peter Fog

Reviewed By: billreynish, ISS, brecht

Differential Revision: https://developer.blender.org/D4957
2019-05-30 15:47:25 -07:00
7ccc7ef61f VSE: don't add crop and transform data for sound strips
This also fixes commit rB1fd7b380f4cf8a0489b405de2819f228a4da5ea2 which
didn't do allocation for effect strips properly.

Reviewed By: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D4970
2019-05-30 15:47:25 -07:00
fc336f973d Fix T65319 Crash when selecting vertices in edit mode 2019-05-31 00:28:03 +02:00
846056de6b Fix T64510 Armature: Empty Not Visible as Bone custom shape 2019-05-30 19:34:54 +02:00
493eaaf213 DRW: Fix crash when object has no bounding box 2019-05-30 19:33:48 +02:00
8f4b7083d3 Fix T65049 Crash cause by NULL geom pointer 2019-05-30 18:28:05 +02:00
8a4a05ae85 Selectoin: Remove armature bone filters
They seems to do nothing as the filtering seems to already be
done at a higher level.

This fixes T65022 Tracking Markers are not selectable
2019-05-30 17:54:05 +02:00
f962c701fe Fix T65017 Eevee: Render error if a SSS node is unconnected 2019-05-30 16:13:26 +02:00
b4df509f7b Cleanup: GPUMaterial: Remove unused struct members 2019-05-30 16:13:26 +02:00
05138d2c4e Fix T65231: Null audio device and AV Sync halts playback 2019-05-30 14:22:48 +02:00
296527eab7 Eevee: Fix volumetric shader if nodetree uses a bsdf node 2019-05-30 13:43:34 +02:00
7cdd5ed7bd DRW: Add unit_state to avoid lots of DRWCallState duplication
A lot of drawcalls don't use the object's properties and don't
need a dedicated DRWCallState. We allocate a unique one at
the begining and use it for all calls that uses the default
unit matrix.
2019-05-30 13:43:34 +02:00
9f2e154e02 Eevee: Fix crash caused by visibility calculation 2019-05-30 13:43:34 +02:00
596492e639 DRW: Refactor to use object pointer for drawcall by default
This cleans up a bit of duplicated code and some confusion about
what was culled and what wasn't.

Now everything is culled based on the given object pointer.

If the object pointer is NULL there is no culling performed.
2019-05-30 13:43:33 +02:00
32a2bfddcb GPencil: Remove uneeded storage->unit_matrix
When passing NULL to DRW_shgroup_call(), ModelMatrix is assumed
to be unitmat.
2019-05-30 13:42:21 +02:00
092962cf72 GPU: Enforce Uniform buffer alignment to 16bytes
This seems to be a requirement and remove some errors in
renderdoc.
2019-05-30 13:42:21 +02:00
77f5210f22 GPU: Remove GPU_INDEX_U8
This type of indices is not natively supported on modern GPU and
gives warning on some implementation. The memory savings it
provides is also quite minimal and unlikely to be visible on
nowadays hardware.

This remove some uneeded struct members and makes primitive
restart always enabled by default. This can be broken by addons
if they are not careful enough but many other states have this
problem.

Also leverage GL_PRIMITIVE_RESTART_FIXED_INDEX if
ARB_ES3_compatibility is supported. This removes all API calls
to change restart index depending on indices length.
2019-05-30 13:42:21 +02:00
dc0c490b76 Tool System: Use circle cursor for non-3D circle select 2019-05-30 21:31:42 +10:00
2991713722 GPencil: Add missing blend factor to Regular blend 2019-05-30 13:23:26 +02:00
0f8746e724 GPencil: Rename Blend mode "Normal" to "Regular"
The UI used "Regular" already, but internally the code didn't.
2019-05-30 13:23:26 +02:00
1cb74768c1 GPencil: Remove wrong premult in Blend shader
The process was doing two times the same and the alpha was totally wrong.

Related to T65279
2019-05-30 13:23:26 +02:00
9c00429ee7 Cleanup: use const argument, r_ prefix return arg 2019-05-30 20:37:16 +10:00
671827549a 3D View: Support light probe data clipping 2019-05-30 20:02:05 +10:00
8cc1154aa2 Fix industry compat keymap transform gizmo plane constraint
Modifier keys were disabled, removing support for shift-clicking
on the transform gizmo to constrain to the plane.

The gizmo keymap matches the default, no need to re-define it.
2019-05-30 15:33:37 +10:00
8778dd0c8b Gizmo: activate some gizmos on drag instead of press
Use drag-only keyamp to adjust gizmos which use drag motion
to change a value. By default gizmos still activate on press.

This allows for left click select to be used with transform
without the gizmos getting in the way.

Even though this isn't necessary for right click select
it allows click events to pass through and be used by tools
which can be useful.

Resolves T63996
2019-05-30 15:22:19 +10:00
0c8c160202 WM: use different drag thresholds for mouse/tablet events
Now a small threshold is used for mouse input,
avoiding delay when gizmos are activated on drag.

Tablet input threshold remains unchanged since
it's easier to make small movements when using a tablet.

A larger threshold for non-cursor input is now used (typically keyboard)
which improves usability when the "Pie Menu on Drag" key-map preference.
2019-05-30 15:03:19 +10:00
82e8e5c871 Cleanup: move click/drag events to functions
Simplifies future changes to dragging checks and avoids
each check for drag using slightly different logic.
2019-05-30 15:02:53 +10:00
2437a8b6f0 Cleanup: rename callbacks to match the struct member name 2019-05-30 15:02:49 +10:00
fee600f479 GPencil: Cleanup - Remove storage Grid matrix and replace with local variable
Now the matrix is copied when creating shading group and don't need to be saved in storage.
2019-05-29 20:17:46 +02:00
a8a95806b3 Cleanup: Remove duplicated comment from previous commit 2019-05-29 20:03:40 +02:00
6ef39cbdf0 GPencil: Rename viewmatrix field to parent_obmat
The name of the field was not clear about the use.
2019-05-29 19:59:54 +02:00
7fae3e375a GPencil: Cleanup code to avoid double matrix copy
Thanks @fclem for catching the problem.
2019-05-29 19:52:00 +02:00
9dafc8ee2c Snap: add support for meshes generated from other types of objects.
Curves with modifiers generate a mesh internally.
These can be used for raycasting.
2019-05-29 13:18:29 -03:00
dff24f96f0 Fix T64817: Active tool gizmo doesn't respect toggle
Error in 14884cda1f

D4973 by @cto.abid
2019-05-30 01:20:26 +10:00
b79aeb5ca1 Fix T64995: box and circle select summary in Grease Pencil dopesheet.
The issue is that generic ANIM_animchannel_keyframes_loop can't
handle non-FCurve keyframes, so every selection operator does
its own looping over special key types, and the box and region
select operators didn't have code to deal with the summary.

This adds code to handle that in a similar way to other ops.
2019-05-29 17:50:39 +03:00
0721ee4587 Fix T51133: Bad performance with texture painting depending on multi-thread settings.
This is more of a temp urgent hack than a proper fix, chenages required
for the later are too involved for 2.80 at that point of time and will
be done later.

That commit merely keeps the whole existing logic for 3D painting
textures, but instead of re-creating a pool of threads for *every* (!)
stroke evaluation (i.e. mouse move event during painting), we instead
use Blender's task scheduler.

That remains sub-optimal, there are likely more improvements possible in
that code, but it should address the main issue reported (which is
presumably caused by  windows thread launching being rather heavy process).
2019-05-29 16:29:42 +02:00
68adbf80cf Fix T65275: missing dereference 2019-05-29 16:17:10 +02:00
a63ac425d0 Outliner: Correct outliner width computation
Before it was not possible to see everything in the outliner
when there are e.g. long icon rows. This is because Blender
did not allow panning the view to the right, since it did not
know the actual width.

Most of the code to compute the width correctly was there already,
but there were a couple of issues that made it not work.

* The tree width was computed before the tree was drawn.
This does not work, since the width is only known, after
it is drawn.
* Every `TreeElement` stores its right-most position in `xend`.
However, in the current code, the `xend` of e.g. an object is
the position where the text ends. The `xend` of the icons
is stored in the sub-tree-elements. Therefore, to compute
the maximum width, you may not skip the closed tree elements.
* The current drawing code had an early exit when the icon row
would not be visible anymore. This also skipped the calculation
of `xend`. So it would work correctly, when the icon was visible
a little bit, but not when it was not visible at all.

This patch fixes these issues. So even in more complex files, the
width is computed correcly. At least I haven't found a case, where
it does not.

Unfortunately, some optimizations had to be turned off, to make
it correct.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4887
2019-05-29 16:02:04 +02:00
2069b3b888 DrawManager: Cycles+GPencil
Fix for GPencil and Cycles Render draw type. GPencil objects were only
shown when overlays were turned on. The cause of this is an
optimization we did to not populate any draw engine when an
external renderer was used with overlays turned off.

This will check if there is any visible GPencil object in the scene. if
so it will still perform the loop.

`DEG_id_type_any_exists` can check if any object of a certain type_id is in the
result. This check is also being used to check if there are any
visible grease pencil objects as a precheck in `DRW_render_check_grease_pencil`.

Reviewed By: brecht, fclem, antoniov

Maniphest Tasks: T65191

Differential Revision: https://developer.blender.org/D4962
2019-05-29 14:48:59 +02:00
56176bd19e Keymap: Fix missing start/end shortcuts in Sequencer
Set these in the shared animation editor keymap instead
2019-05-29 14:07:51 +02:00
Stefan Werner
29550f8748 Fix T63383: macOS: Right-clicking the file name on the title bar
doesn't work as expected when the path includes a whitespace character

File path didn't need to be escaped.
2019-05-29 13:17:15 +02:00
b0278b2486 Depsgraph: Fix IDs being remapped in original compositor
Happens with files from T65223.

Caused by CoW scene still pointing to the original compositor.
Happens when scene was referenced for parameters only.
2019-05-29 12:50:04 +02:00
d6b340b999 Cleanup: Group depsgraph building nodes 2019-05-29 12:50:04 +02:00
c592ebaeca Markers: fix error in previous commit 2019-05-29 12:30:59 +02:00
e15bba38d5 Fix: Hair Length was using wrong unit 2019-05-29 12:12:52 +02:00
fdd2917144 Cleanup: Remove unused marker operator wrappers
The wrappers do nothing anymore, because keymaps can
have poll functions now.
2019-05-29 11:50:34 +02:00
f8f43184e2 Sequencer: Fix box select using incorrect rectangles for sequences
Reviewer: ISS

Differential Revision: https://developer.blender.org/D4968
2019-05-29 11:19:57 +02:00
2f7711962a Fix T58251: Cycles ignores linked meshes when rendering
The idea is to share a mesh data-block as a result across all objects
which are sharing same original mesh and have no effective modifiers.
This mesh is owned by an original copy-on-written version of object data.

Tricky part is to make sure it is only initialized once, and currently a
silly mutex lock is used. In practice it only locks if the mesh is not
already there.

As an extra bonus, even viewport memory is also lower after this change.

Reviewers: brecht, mont29

Reviewed By: brecht, mont29

Differential Revision: https://developer.blender.org/D4954
2019-05-29 10:44:11 +02:00
da7e5e861f Keymap: Add back support for Set/Add/Subtract for box selecting in the Sequencer. 2019-05-29 10:34:48 +02:00
07d453dd9e UI: use matching distance checks & define for dragging 2019-05-29 18:13:33 +10:00
8949dfb7a6 Correct error in last commit 2019-05-29 16:59:24 +10:00
e9d07aa4a0 Correct error in last commit 2019-05-29 16:51:56 +10:00
63a7ac8930 Keymap: add drag-only generic gizmo keymap
Allows gizmos clicks to fall through for gizmos which only drag,
currently unused.
2019-05-29 14:30:25 +10:00
2d8584c15f Fix T65027: Snap 3D cursor on hidden faces doesn't work in Edit Mode.
I'm not very fond of adding new types of bvhtrees.
But this is probably the most efficient solution.
2019-05-29 01:02:04 -03:00
d97c841eb8 Fix T65005: Missing "LINES_ADJ" and "TRIS_ADJ" in the GPU Python API. 2019-05-29 00:28:14 -03:00
e087951702 Possible fix for T63685: macOS edit mode selection not working on second display
The idea is to force `glReadPixel` to run in the offscreen context.
And don't rely on any rendering context.
2019-05-29 00:28:13 -03:00
2f06a0b14b Cleanup: move gizmo keymap access into funcitons
Existing functions were written to match the setup_keymap callback.
Add versions that can be called with the window manager for convenience.
2019-05-29 13:01:38 +10:00
2610845250 Cleanup: remove redundant sequencer under cursor check 2019-05-29 11:33:34 +10:00
eaa730ce8c Cleanup: correct private function naming
Use term 'glyph' instead of 'icon' since we already have event icons.
2019-05-29 11:16:11 +10:00
501dd9e231 Cleanup: Remove Dead Code 2019-05-28 21:11:56 -04:00
9bae9b634e Fix T65244: emission node not available for world shader nodes 2019-05-28 23:07:08 +02:00
db0568329e Fix T65175: nodetree animation stays linked after duplicating a lamp
Reviewers: mont29, brecht

Maniphest Tasks: T65175

Differential Revision: https://developer.blender.org/D4956
2019-05-28 21:02:40 +02:00
574e790340 Fix T64123 Eevee: Reflections Not Visible On Alpha Clip Materials 2019-05-28 20:33:19 +02:00
2783945b1b Eevee: Fix assert when displaying transparent film checker 2019-05-28 20:20:09 +02:00
b76ccc7f80 Eevee: Change default shadowmap near clipping distance
And also fix some RNA props defaults and ranges.

Fix T64452 Shadows not appearing in eevee
2019-05-28 20:06:22 +02:00
40207d656b Eevee: Render alpha blended objects when rendering probes
This fix T64553 EEVEE: Emission material not lighting
other objects when blend mode set to alpha blend
2019-05-28 20:06:22 +02:00
08005802cc Tests: make grease pencil tests part of OpenGL render tests
Otherwise tests fail on machines without OpenGL.
2019-05-28 18:05:31 +02:00
4df66dabb8 Fix T65212: Cycles SSS failing on 32 bit 2019-05-28 18:05:31 +02:00
8e125f278c Sequencer: Drag outside of sequence to initiate box select 2019-05-28 17:47:33 +02:00
c4e4b6872a DRW: Fix issue introduce in removal of DRW_STATE_POINT
Fix issue raised by mano-wii in rB97d22e12b521

Fix T65050 knife tool snapping indicator not visible
2019-05-28 17:19:42 +02:00
9e85d4052f Cleanup: DRW: Codestyle 2019-05-28 17:19:42 +02:00
2100dba34b Cleanup: GPU: Move program point size to GPU_state 2019-05-28 17:19:42 +02:00
fbe7c848c2 Fix T64005: GPencil clamping pixels do not always work 2019-05-28 17:11:13 +02:00
e256bc2250 Depsgraph: Add query for whether graph is up to date
Depsgraph: Only invoke callbacks when there are changes

Only affects when an evaluated dependency graph is requested via
context.

Makes it cheap to call when there are no changes made to the graph

Transform: Ensure depsgraph is evaluated when needed

Fix based on D4455 from Campbell, utilizes some recently
introduced functions and allows to not have any extra checks
in the transform code.

Fixes T61904
Fixes T62135

Reviewers: brecht

Maniphest Tasks: T62135, T61904

Differential Revision: https://developer.blender.org/D4967
2019-05-28 17:06:41 +02:00
b683e965ab Depsgraph: Only invoke callbacks when there are changes
Only affects when an evaluated dependency graph is requested via
context.

Makes it cheap to call when there are no changes made to the graph
2019-05-28 17:06:41 +02:00
0cf0cc9873 Depsgraph: Add query for whether graph is up to date 2019-05-28 17:06:41 +02:00
d6643b57bc Cleanup: use doxy comments for wmOperatoType.flag 2019-05-29 01:05:22 +10:00
916c2d0e7f Cleanup: use WM_ prefix for cursor enum 2019-05-29 01:05:22 +10:00
e4ac8ab212 WM: support X/Y axis cursor wrapping
Operator flags to wrap on a single axis.

D4865 by @Gvgeo with updates.

Resolves T64585
2019-05-29 00:52:43 +10:00
a7ebb4b7d9 Cleanup: clang-format 2019-05-29 00:24:16 +10:00
24b2fe50f3 Fix T64829: Active point of Curve objects is not displayed correctly
three issues here:
- when curves had multiple nurbs, the active vert is per nurb
[curve_create_edit_data_and_handles() wasnt taking that into account]
- code could go wrong when points where hidden
- upon selection, tag curve ID_RECALC_COPY_ON_WRITE for batch cache
update

Reviewers: brecht, fclem, sergey

Maniphest Tasks: T64829

Differential Revision: https://developer.blender.org/D4943
2019-05-28 16:08:34 +02:00
f139caa632 Fix T65187: Overlay blend increase wrongly the opacity
The calculation of the mix color was not using the bottom color when the alpha was lower than 1.0.

Also added clamp code to avoid values outside valid ranges.
2019-05-28 15:55:31 +02:00
5778e616e5 GPencil: Minor cleanup 2019-05-28 15:55:31 +02:00
13a90d646a Codestyle: Remove trailing spaces 2019-05-28 15:12:29 +02:00
dee5c1aa40 MeshAnalysis: Disable when XRay is turned on
When XRay is turned on the mesh analysis did not draw correct. This
change won't draw the mesh analysis overlay when xray is turned on.

In terms of giving the user a visual feedback of this limitation we
render the overlay options inactive.

Reviewed By: brecht, fclem

Maniphest Tasks: T65225

Differential Revision: https://developer.blender.org/D4965
2019-05-28 15:09:57 +02:00
94370e23e9 Fix T64536 Eevee: Reflection texco no longer works 2019-05-28 15:00:56 +02:00
433c2d1dea Fix T65226 Crash on entering in Edit mode with ASAN build 2019-05-28 14:37:40 +02:00
e0c1116ce3 Cleanup: DRW: Rename DRW_STATE_BLEND_* for API clarity 2019-05-28 14:22:22 +02:00
2e211d099f Fix T65141 Bevel did not curve.
The previous fix to the spike bug T64582 was not really right.
This fixes that one properly and restores the desired curving
profile in the bug's example.
2019-05-28 07:56:56 -04:00
b2b1aa2f8e Fix T57090: selected node group input sockets circles not drawing in
sidebar UIList

nodesockets were actually drawn, but immediately drawn over by widgets
from the widget draw batch cache.

solution here is to "widgify" nodesocket drawing as well.

Reviewers: brecht

Maniphest Tasks: T57090

Differential Revision: https://developer.blender.org/D4963
2019-05-28 12:22:48 +02:00
fc8547b889 Fix T57483: Driver on grease pencil modifier does not update 2019-05-28 11:11:09 +02:00
1cf27668b9 Fix T65212: Cycles_render_layer test grease pencil crashes.
Theme colors should not be accessed for rendering.

Also some minor cleanups.

Thanks @brecht for catching the bug.
2019-05-28 10:24:51 +02:00
1008d9c735 Cleanup: unused args/vars 2019-05-28 16:37:29 +10:00
7bf8d8b3c8 Cleanup: use time scrub instead of scrubbing
Renaming was only done to ED_time_scrub_ui.h, function names
and struct members used term 'scrubbing' which is ambiguous.
2019-05-28 16:17:15 +10:00
8d81a3da37 Cleanup: clang format 2019-05-28 16:11:49 +10:00
671eb29d43 Cleanup: rename gizmo keymaps
Don't use plural because single/multiple isn't relevant
for keymap definitions and reads badly for specific gizmo types
that only use a single gizmo.
2019-05-28 15:26:18 +10:00
1e51839f1d Cleanup: remove unused modal gizmo keymap
An operator can only have one modal keymap,
there is no use in defining multiple.
2019-05-28 15:18:25 +10:00
13f292d10d Gizmo: only highlight when held modifier keys are used
Check the current events modifiers against the gizmo keymap,
only highlighting when keymap items match.

Needed to resolve T63996
2019-05-28 14:40:12 +10:00
2e22cfd08a Gizmo: changes to internal drag logic
Minor changes to recent gizmo click/drag logic 08dff7b40b

Changing the gizmos highlighted part in the invoke_prepare
callback is too error prone since it needs to run
before it's known which operator will execute.

Add back 'drag_part', since it simplifies click-drag use.
While this isn't essential with custom keymaps per gizmo
it avoids having to define a keymap in the case a drag
event needs a different action.
2019-05-28 13:36:43 +10:00
219e6a98c6 Fix show face-dot check
Match edit-mesh drawing.
2019-05-28 11:46:26 +10:00
c716005322 Docs: correct descriptions 2019-05-28 11:39:49 +10:00
89207df722 cmake: Fix building with clang on windows. 2019-05-27 13:48:40 -06:00
55814cd31f Cleanup: Fix const warning in makesrna
rna_function_string was not const correct leading to
different 'const' qualifiers (C4090) warnings in MSVC.
2019-05-27 11:34:04 -06:00
3a8f543b61 Fix T65190: GPencil stroke not correctly initializated using python API
The value of new gradient fields was wrong.
2019-05-27 19:30:41 +02:00
4778dfa568 Cleanup: Fix warnings in bf_physics
MSVC did not detect the usage of i in the openmp loops
and emitted a unused variable warning.
2019-05-27 11:29:24 -06:00
8a484aca22 Cleanup: Fix build warning in bf_editor_interface
widget_draw_text_ime_underline was not const correct
leading to warnings with MSVC
2019-05-27 10:46:50 -06:00
08dff7b40b Gizmo: add per gizmo keymaps
Remove click-drag support for tweak gizmo,
rely on keymap events instead.

This is needed for some gizmos to use modifiers keys
without having all gizmos use all modifier keys (see: T63996).
2019-05-28 02:41:59 +10:00
d83d376c02 cleanup: Collada exporter renamed 'transrotloc' to 'decomposed'
The collada exporter allows to export transforms either as Matrix
or as a decomposition of Translation, Rotation aand Scale.
The decomposition option was falsely named "TransRotLoc".
I renamed it to the much more descriptive word "Decomposed".
The tooltip already contains sufficient information, so there
is no need to change that.
2019-05-27 18:39:06 +02:00
dee7edffcf Fix tweak/drag event use with gizmos
It was possible to use a drag event for a gizmo
that dragged away from the gizmo, changing the active gizmo.

Now use gizmo located at the location that was clicked on.
2019-05-28 01:36:31 +10:00
58ce4061a8 Cleanup: Fix warnings in bf_intern_elbeem
Truncating a pointer to long gave warnings with MSVC on x64
2019-05-27 09:28:50 -06:00
e472646282 Fix T65080: handle case when View2D has 0 scale 2019-05-27 17:15:29 +02:00
Adam Nydahl
7353e0563e Eevee: Fix Aliasing in Light Probes
Differential Revision: https://developer.blender.org/D4869
2019-05-27 17:13:09 +02:00
7a308e65ef Cleanup: Fix warning in bf_editor_mesh
Declaration and implementation of EDBM_select_id_context_create got
out of sync leading to warning with msvc.
2019-05-27 09:12:11 -06:00
7f1513efc5 Cleanup: Fix warning in blenlib with MSVC
Some versions of the Windows SDK headers have a dbghelp.h that will emit
C4091 warnings, repress them just this once, since the warn can be helpful
in other places.
2019-05-27 08:57:39 -06:00
29a29699f7 Fix T65145: Draw curve draw tool settings in column 2019-05-27 16:55:53 +02:00
635510bc6b Cleanup: Fix warnings in bf_dna
Passing a const char** to MEM_recallocN lead to

C4090	'function': different 'const' qualifiers

warnings with MSVC
2019-05-27 08:49:34 -06:00
392e58afb3 Fix (unreported) invalid handling of IDs usercount in BKE_mesh_new_from_object_to_bmain().
Would have broken usercount of mesh used as texco reference e.g.
2019-05-27 16:48:56 +02:00
270faa4e9c Cleanup: Fix warning in makesdna
passing a const pointer to BLI_ghash_insert causes warning

C4090	'function': different 'const' qualifiers

with MSVC
2019-05-27 08:44:37 -06:00
Dalai Felinto
4ed6b891d5 Fix T63173: Dragging hidden collection inside a visible one unhides it
Same for holdout, indirect only and exclude.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4945
2019-05-27 11:39:32 -03:00
40bde2a95d Fix annotations not drawing correctly on Cycles rendered view 2019-05-27 16:34:21 +02:00
70bb61ba97 Cleanup: Fix warnings in gpu_batch
Passing a const pointer to MEM_freeN/MEM_recallocN lead to

C4090	'function': different 'const' qualifiers

warnings with MSVC
2019-05-27 08:30:53 -06:00
063ebd5836 Cleanup: Fix warnings in bf_gpu
Declaration and implementation got out of sync leading to warnings.
2019-05-27 08:22:38 -06:00
a74041c96c Eevee/GPencil: Fix depth reading after render 2019-05-27 16:14:58 +02:00
380f07d0ee draw_manager: fix warning with msvc.
32 bit shift stored in 64 bit field gave a warning with MSVC.
2019-05-27 08:11:12 -06:00
1885d234b0 Fix (unreported) API doc generation script after removal of some ObjectBase ietms from context. 2019-05-27 16:06:40 +02:00
bc055258d5 fix: collada transformtype must be identical for animation export and object export
When exporting an object we can choose the transformation type 'Matrix'
or 'trans/rot/scale' When exporting an animation we have the same choice
regarding the used transformation type.

However we must make sure that animations and objects use the same
transformation type within one colleda export. The user interface is
now reworked such that the correct settings are always guaranteed.

I also reworked the tool tips
2019-05-27 16:00:32 +02:00
4db3916b60 refactor collada: rename add_node_transform() to add_joint_transform() 2019-05-27 16:00:32 +02:00
b6a0027de3 Gizmo: add event argument to invoke_prepare callback 2019-05-27 23:59:36 +10:00
b1f0e3e4a7 blenloader: Fix warnings with MSVC
these macros are mostly used with size_t types, leading to msvc warning :

warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits
2019-05-27 07:54:56 -06:00
a096fbb32d Fix T65052: "Convert to mesh from curve" fail if the curve has a bevel
Use evaluated object as an input for mesh construction. This ensures
all dependencies are ready.

Reviewers: brecht, mont29

Reviewed By: brecht, mont29

Differential Revision: https://developer.blender.org/D4955
2019-05-27 14:40:06 +02:00
33e792da2f Cleanup: remove redundant assignment 2019-05-27 22:23:31 +10:00
f3fb7c5f22 Fix T65177: Camera frame visible in viewport render 2019-05-27 14:16:40 +02:00
4ad9d93fec Fix T65066 Armature and bone selection is broken on macOS 2019-05-27 13:38:06 +02:00
Mal Duffin
118ac491d2 Fix poor display of time codes in sequencer Info panel
Allow using : in labels inside buttons.

Differential Revision: https://developer.blender.org/D4944
2019-05-27 13:31:27 +02:00
af4feee61c Eevee: Fix render z-depth for orthographic camera
Fix last commit
2019-05-27 13:29:29 +02:00
24ac970624 Eevee: Fix render depth pass being negative 2019-05-27 13:18:47 +02:00
8cfd46a5b0 Wireframe: Make wireframe's Xray slider default to 0
This removes the dither patterns visible in wireframe mode.
This does decrease de depth perception but many users complained
about the visual noise it produces.
2019-05-27 12:58:14 +02:00
5241dd1daf EditMeshMode: Reduce unselected face alpha
Lowering it to 0.071 so that wireframe mode is not so much
distracting.
2019-05-27 12:58:14 +02:00
554af9c689 Cleanup: DRW: Make clipped shader use UBO clip planes 2019-05-27 12:58:14 +02:00
577d3498b4 Cleanup: DRW: Move WorldClipPlanes to builtin uniform 2019-05-27 12:58:14 +02:00
ba75e93c88 Cleanup: DRW: Remove DRW_STATE_OFFSET 2019-05-27 12:58:14 +02:00
f3fc872171 Cleanup: Paint Overlays: Remove DRW_STATE_OFFSET_* 2019-05-27 12:58:14 +02:00
01f5ef82af Cleanup: EditMesh: Remove DRW_STATE_OFFSET_* 2019-05-27 12:58:14 +02:00
5c371cd36a Depsgraph: Fix condition inverted by mistake
Fixes T65165: Weights are not displayed in "Weight Paint" with modifiers
2019-05-27 12:40:22 +02:00
244c39f1ab Revert "Keymap: Drag in empty area to box select in animation editors"
This reverts commit ebf924e0b7. This is causing
the transform tool to start immediately which leads to lots of accidental
changes. We can bring this back when that issue is fixed.
2019-05-27 12:35:23 +02:00
6ac20e9397 Fix T65181: image View as Render should not affect file saving 2019-05-27 11:56:13 +02:00
b40b9195e4 Fix T65160: missing updates when setting origin on a collection instance
Reviewers: sergey, brecht

Maniphest Tasks: T65160

Differential Revision: https://developer.blender.org/D4953
2019-05-27 11:50:21 +02:00
d4f12860aa Python API: Tag for update on object.update_from_editmode()
This call modifies geometry but does not inform anyone about
changes.

After this change it's possible to load edit mesh, then request
evaluated dependency graph and do some interesting things with
the updated object.

This is part of T63244: object.to_mesh ignores object.update_from_editmode
2019-05-27 11:29:22 +02:00
5dbda33462 Depsgraph API: Allow preserving custom data layers
This commit extends dependency graph API with an argument which
denotes that all custom data layers are to be preserved. This
forces modifier stack re-evaluation with more inclusive mask.

Far from ideal, since this might fail in certain configurations
with indirectly used objects which might be missing layers needed
for the current object evaluation. But this is how it worked for
a long time, so should be good enough for until more sophisticated
solution is found.

In order to use this new behavior two things are to be passed:

- Pass keep_all_data_layers=True
- Pass a valid dependency graph.

The dependency graph is only needed if keep_all_data_layers=True
and is NOT to be passed if keep_all_data_layers=False.

If keep_all_data_layers=True the dependency graph MUST be passed.

Reviewers: mont29, brecht

Reviewed By: mont29

Maniphest Tasks: T64994, T64794

Differential Revision: https://developer.blender.org/D4940
2019-05-27 11:00:42 +02:00
07d3d8c2fd Industry Compat keymap: Fix armature extrude
MMB wasn't working to extrude freely for Armature extrude

Also fix an issue with moving down the hierarchy in Pose Mode
2019-05-27 10:55:13 +02:00
27d5d3c2f8 Depsgraph: Use threading guard in context.evaluated_depsgraph_get
This is a part of T65174.
2019-05-27 10:42:30 +02:00
c25164e16d UI: use tool label instead of id-names for quick favorites 2019-05-27 16:30:23 +10:00
552f5da3c4 Mitigate T64346: Quick Favorites items cant be removed
For now don't show missing quick favorite menu items which are missing.

Once menu editing is supported they could be displayed.
2019-05-27 15:33:12 +10:00
ab0e839f9a Fix T65074: Crash on switching color
Make buttons to take active `Paint` from the context.

D4946 by @Gvgeo
2019-05-27 14:00:15 +10:00
d525c76003 Revert "UI: Edit Menu Operator Polling"
This reverts part of commit b7eba20236. Polling
is causing issues in scripts, and the minor usability improvements are not worth
the extra work this may cause at this point in the release cycle.

Fixes T65149
2019-05-27 00:34:24 +02:00
d595382288 cmake/msvc: Repress MSVC template warning C4661
Draco emits about 60 of these, consulted with brecht before
repressing them.
2019-05-26 16:13:31 -06:00
30f3ffce05 Fix building with ninja on windows
Broken by rB161908157d67ee8bcfa0c26917cccdc40e0c67ea
2019-05-26 09:25:17 -06:00
c53f2079b8 Fix T64989 Bevel hangs with Mark Sharp sometimes.
Code for extending sharp edges assumes ADJ pattern and this
example uses TRI_FAN pattern. This change doesn't fix TRI_FAN
mark sharp bug at least won't infinite loop any more.
2019-05-26 10:37:58 -04:00
66ec6c1f50 Fix misleading image color space and alpha tooltips 2019-05-26 12:43:47 +02:00
909b0ac16c Fix Cycles packed images not handling channel packed alpha correctly 2019-05-26 12:21:57 +02:00
f18373a9ab Fix: BLI_task_test deadlock on windows.
This patch makes BLI_task_scheduler_create wait for all worker threads to have started before
returning to caller. For very short workloads (BLI_taks_test) there is the chance that the
worker threads have not fully started yet, and the main thread is calling pthread_join at
the same time as pthread_setspecific is being called on the worker threads which causes a
deadlock on pthreads4w.

Differential Revision: https://developer.blender.org/D4936

Reviewed By: mont29, sergey, brecht
2019-05-25 17:18:17 -06:00
36ae49502b blenlib: Fix build warning with MSVC
The declaration and implementation of BLI_path_name_at_index were
out of sync leading to build warning

C4028: formal parameter 1/3/4 different from declaration
2019-05-25 13:22:25 -06:00
7d3de604c0 cycles_render: Fix unused variable build warning with MSVC 2019-05-25 13:05:59 -06:00
5c9cb98698 bf_intern_opencolorio: Fix unused variable build warning with MSVC. 2019-05-25 13:04:24 -06:00
24024f09c7 ghost/windows: Fix Build warnings with MSVC.
The order of the initializers did not follow the order they were
declared in the class definition leading to warning C5038
2019-05-25 12:58:14 -06:00
817a51f26f blenlib: Fix debug build warning with MSVC.
Wrong printf format specifier was used leading to warning C4477
2019-05-25 12:45:58 -06:00
10e152c590 imbuf/oiio: Resolve build warnings with MSVC.
math.h and oiio's missing_math.h where clashing over the
definitions of common math defines like M_PI.
2019-05-25 12:23:48 -06:00
161908157d CMake/MSVC: Mark headers in the libdir as system headers.
This marks the headers in the LIBDIR as system headers
and changes the warn to /W0 on msvc versions that support it.

This resolves some warnings we would had to completely
repress otherwise.
2019-05-25 12:13:06 -06:00
e1d1899e72 Fix T64582: bevel spikes sometimes
The code to move the profile plane needed to not do that in
a few more cases.
2019-05-25 09:41:29 -04:00
26c317b666 Fix T65106: Add missing Copy Keymap for GPencil Sculpt mode
The Ctrl+C keymap was missing in Sculpt mode
2019-05-25 10:49:46 +02:00
e12f42946f Fix T65092: error with gizmos using freed keymaps
Caused by 5adfc51a0f, sharing keymaps caused changing tools to
unregister gizmos and remove their keymaps.

Workaround for now by not removing the keymap.
2019-05-25 12:45:34 +10:00
8e812504b4 Cleanup: warnings building without ASAN 2019-05-25 11:24:13 +10:00
Dalai Felinto
caf52e3779 Update "Overriding Context" API example 2019-05-24 19:21:30 -03:00
Dalai Felinto
7d44184c85 Fix T65094: Sequencer crashes blender when scene strip has NULL scene
Bug introduced on 930765faa8.
2019-05-24 19:13:01 -03:00
Dalai Felinto
0cb2c20ada Sequencer: Fix UI when scene strip has a NULL scene
Issue introduced on 86eefefdc1.

There was a `if scene:` check in the original code, as it turned out
there was a reason for that. We gotta be careful with these assumptions.
2019-05-24 19:13:01 -03:00
Dalai Felinto
5df4c0a469 Outliner: Fix selecting collections in view layer selecting original objects
Part of T64438.
2019-05-24 17:49:13 -03:00
483ae407d9 Change exhisting studiolight
This removes the soft and warm studiolight.
This tweak the outdoor and studio presets for more contrast.
It also introduces a rim studiolight that add more variation.
2019-05-24 21:34:15 +02:00
6f8a34bde1 StudioLight: Add new centered studiolight setup
This is to have one studiolight that is symetrical and close to
the basic_1 matcap.
2019-05-24 21:34:15 +02:00
a629c74c9c Fix T65081: sculpting workspace no longer has matcap by default 2019-05-24 20:32:02 +02:00
Dalai Felinto
b60c43aabd Outliner: Set View Layer as the default mode for new outliners
This mode was supposed to be the new default since 2 years already.

But apparently, it was tackled only for doversion, but not for new
outliners (see 7f596d39df).
2019-05-24 15:31:34 -03:00
Julian Eisel
6d0a6e380e Fix failing assert on factory settings load
Loading factory preferences from the preferences window and triggering a
redraw then would cause the failing assert.
We shouldn't mess with window-manager data when loading preferences
only.
2019-05-24 19:56:08 +02:00
31333fc193 Viewport: Change default studiolight
Differential Revision: https://developer.blender.org/D4939
2019-05-24 20:26:21 +02:00
203f9a49e2 Edit Mesh: Change color behavior
- Make edges darker in vert & face select mode (making more
  contrast to not loose the topology). Downside is less select
  edges visibility in vertex mode. But I'm confident that it's not
  as painfull as it seems.

- Make select faces less saturated to have more color contrast
  between select faces and edges.

- Make unselected faces white to increase contrast with faces and
  edges. The brightening is negligeable for bright surfaces and
  help readability on darker surfaces. Reminder that if the faces
  overlays are too distracting (i.e: uv mapping, or texturing) they
  can be toggled off in the overlay panel.

Reviewers: billreynish, campbellbarton, brecht

Reviewed By: billreynish, campbellbarton, brecht

Subscribers: brecht

Differential Revision: https://developer.blender.org/D4941
2019-05-24 20:21:55 +02:00
76019139f6 Cleanup: remove unused macOS GHOST OpenGL code 2019-05-24 18:37:38 +02:00
04ad9eab6e Fix: Too many checks for the compositor
Check once as and then re-use
2019-05-24 17:11:53 +02:00
5986160dd0 EEVEE: Volumetrics
When viewport samples are set to 1 simple scenes with volumetrics crash.
EEVEE volumetrics needs to init the post processing buffers. With recent
changes the need for post processing buffers are known after the cache
init. But they are constructed before the cache init. This lead to null
pointers.

Reviewed By: fclem

Maniphest Tasks: T64922

Differential Revision: https://developer.blender.org/D4942
2019-05-24 16:33:59 +02:00
Dalai Felinto
d8f096406b Fix T65028: Eye icon not toggle-able from the outliner for linked objects 2019-05-24 11:02:24 -03:00
c935921091 Collada: Remove property with empty identifier
This is not a valid property.

Additionally, there is very much the same property with a valid
identifier defined few lines below.
2019-05-24 15:39:27 +02:00
Dalai Felinto
be03e678e3 Fix T65060: Outliner - Sort Alphabetically checkbox is not working
Bug introduced on 78f8679cfc. Basically a copy/paste error in my
original collection children implementation.
2019-05-24 10:21:33 -03:00
1b60b6edf1 Fix T65071: Crash when selecting joined tracks 2019-05-24 14:54:58 +02:00
05a9788b25 Fix T64101: Crash entering edit mode with particle system
Explicitly disable particles in edit for now.

Those were not rendered already, but were attempted to be converted
to Cycles structures (if UVs were not needed for hair nothing was
rendered, but if UVs are needed then crash happened).

Would be nice to bring hair in edit mode back, but this is a bit
more involved change, which will be done later.
2019-05-24 14:54:51 +02:00
Dalai Felinto
fae5896249 Fix T65059: Crash in empty scenes for context _bases functions
Bug introduced on 0910932e71.
2019-05-24 09:52:28 -03:00
a875e81674 UI: Tweaks to Compositor header
- Move Auto Render into Options panel in sidebar
  - Move Pin to the right and remove emboss
  - Move Background to the right and use greying out to avoid jumping UI elements

Also remove emboss from pin toggle in Image Editor for consistency
2019-05-24 14:46:37 +02:00
946217e503 UI: Sequencer panel names
Change names again, to be more descriptive

Data > Info
Info > Timecodes
2019-05-24 14:23:50 +02:00
75ac356095 Viewport: don't show transparent checkboard in lookdev shading mode
Keep it for render shading mode only.
2019-05-24 13:40:17 +02:00
dd4a268221 Viewport: add more contrast to default studio light, make it default again
It's closer to the default matcap now, but slightly less metallic and dark. The
reason to use studio lights as default is because the roughness and metallic
parameters of the material then have an effect, and because Texture color mode
does not work for matcaps.
2019-05-24 13:37:02 +02:00
419434a1ad Fix unnecessary decorators showing in compositor sidebar 2019-05-24 13:01:06 +02:00
1fdea49fcc Fix T65053: unhide curve does not refresh the viewport properly
Reviewers: sergey

Maniphest Tasks: T65053

Differential Revision: https://developer.blender.org/D4937
2019-05-24 12:12:00 +02:00
9da88c10b0 Fix T65057: Duplicate from context menu won't work
Wrong operator context was used here.
2019-05-24 12:01:15 +02:00
fa299e669c Fix T65062: Compositor doesn't work when using different scene
Need to preserve all view layers, even for indirectly linked scenes
since they might be used by render layer nodes.
2019-05-24 11:24:16 +02:00
ba58b9d2af Depsgraph: Fixes for render pipeline building
- Need to assign current scene in the builder: it is used to
  route relations for object's customdata.

- Tweak relation from scene to object for the customdaat: this
  didn't work before because the render pipeline scene has no
	view layer component.

Fixes T65044: Crash when Rendering (F12)
2019-05-24 10:58:09 +02:00
db8aa7b851 Depsgraph: Fix violation of evaluated domain
Evaluation must never go to original objects and query them:
this is a huge violation of the entire idea of separating
state across viewports and render engines.

Allowed this to only happen for active dependency graph, where
we at least know order of dependency graph update and user
input.
2019-05-24 10:48:19 +02:00
cd3f856eb8 Depsgraph: Fix render pipeline depsgraph pointing to freed data 2019-05-24 10:43:40 +02:00
d21b346f1c Industry Compat keymap: Properly support Transform tool
Now works consistently with move, rotate, scale tools
2019-05-24 10:09:45 +02:00
5adfc51a0f Keymap: use a generic gizmo keymap by default
While support for gizmo specific keymaps remains, this should only
be used if a gizmo-group is doing something that requires one.

There was also a hidden limitation that meant only the last registered
tweak keymap would ever be used.

For now leave this using the generic keymap since all
tweak modal keymaps were using the same template anyway.
2019-05-24 17:53:24 +10:00
7dd888c0cf Keymap: share 3D view transform keymaps
While internally these are separate gizmos,
there is no reason to have a keymaps for each.

Also prefix the gizmo with "3D View"
since there are other kinds of transform gizmos.
2019-05-24 15:48:08 +10:00
911116e1ba Cleanup: correct function name 2019-05-24 12:58:01 +10:00
16b15aed4e Cleanup: use "_update" suffix for RNA update callbacks 2019-05-24 12:56:14 +10:00
017d89adbb Cleanup: warnings 2019-05-24 12:46:28 +10:00
b3f96da2e6 fix unreported Collada exporter Regression: Added back minimal support for Maya bindpose 2019-05-23 22:37:26 +02:00
fd51d2f97c VSE: minimal cache invalidation 2019-05-23 11:52:28 -07:00
1fd7b380f4 VSE: remove lazy loading for strip crop and transform
Lazy loading prevented showing values in UI.
Now we just gray them out if not used.
2019-05-23 11:50:15 -07:00
a3bc869038 Industry Compat Keymap: Support Transform tool
Using the T key, which is after WER
2019-05-23 18:13:08 +02:00
d8746bf45e UI: Move Transform tool to be after Move, Rotate, Scale in the toolbar 2019-05-23 18:12:14 +02:00
ec664636e7 3D View: add back transform tool
Further changes are planned in T64928,
this is just the initial basic version.
2019-05-24 01:38:07 +10:00
faf48c0f64 Depsgraph: Ensure DOF object is always in the graph
Related in T60961.
Unfortunately, doesn't fix it yet. Needs deeper investigation.
2019-05-23 16:57:39 +02:00
08dd51a7bb Eevee: Ignore COW tag when deciding on auto-bake
This is too generic flag, and it might be used by anything, starting from
changes in transform ending with changes in ID properties.

The check here is to be as specific as possible. If that is not possible
the decision must be documented.

Related on T63111.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4923
2019-05-23 16:45:58 +02:00
ba4e6e59b2 Depsgraph: Don't tag original IDs for recalc
Tagging original ID introduces a conflict of interest when a separate
graph is created and is tagging objects to be re-evaluated with its
context.

This is part of the problem in T63111: tags within a temporary dependency
graph affects viewport and vice versa, which makes logic to wrongly
consider that something did change in the scene and that baking is to
be redone.

This effectively reverts db3bfd0, but this time everything seems to
be updating fine in the viewport.
2019-05-23 16:45:54 +02:00
fd3f75a02c Fix several issues with recent node selection changes.
Root of the issue (beside lack of control over operators evaluation in
keymaps, since tools always get tried first), is that wurrent WM code
only allows one modal op to start from a single event (returning
`PASSTHROUGH` in that case is useless, WM code still considers event as
consumed and does not try any further handling of it).

Solution is then to change trigger events of resize/link operators from
`LEFTMOUSE` to `EVT_TWEAK_L`, which makes more sense anyway, imho, for
drag operations...

Fix T64693: Can't resize selected node.
Fix T64933: "Dots" in node editor can no longer be selected by just clicking on them.
Fix T64660: no access to node connectors when a node is inside a layout frame.
2019-05-23 16:37:08 +02:00
5c0e282a73 Revert "Fix T64660: no access to node connectors when a node is inside a layout frame."
This reverts commit 59b7f3a164, which was
causing T64933.
2019-05-23 16:37:08 +02:00
7db03a6baa Cleanup: Nodes: make it clear that SOCK_IN/_OUT are bitflags. 2019-05-23 16:37:08 +02:00
28ad1e0b1f Fix T65035: Wokbench Material Alpha
When using texture drawing the material alpha was not set correctly, It
used the `shading.xray_alpha` as this was the default set in the forward
renderer.
2019-05-23 16:34:36 +02:00
b432209f63 Render: Use dependency graph for compositor/sequencer
This change makes it so a minimal dependency graph which only includes
compositor and sequencer is built for the render pipeline purposes.

Tricky part here is that it's only compositor itself and sequencer who
to use this dependency graph and IDs from it. Render engines are still
to be provided original IDs because:

- They will create dependency graph for the given scene, and currently
  it is not possible to create dependency graph from CoW scene.

- IDs from the compositor/sequencer dependency graph are "stripped",
  as in, they wouldn't have all view layers, collections or objects
	required for proper final render.

This creates annoying mess of mixing evaluated and original scene
access in various parts of the pipeline.

Fixes T63927: Compositing nodes - drivers don't really work

Reviewers: brecht

Maniphest Tasks: T63927

Differential Revision: https://developer.blender.org/D4911
2019-05-23 16:22:25 +02:00
0ec6fa782b Depsgraph: Allow building scene properties
This is used by driers and this is a first step towards support of
scenes used for only compositor or sequencer.

Fixes T61014: Assert adding a driver that uses a single property of a scene ID
2019-05-23 16:22:25 +02:00
b88f1d3491 Depsgraph: Allow having ID built checks be more granular 2019-05-23 16:22:25 +02:00
026c8ddd2a Fix addon preference registration setting preferences dirty
Setting the `bl_idname` on registration was setting dirty.
2019-05-24 00:01:39 +10:00
028bce8717 Depsgraph: Fix fake dependnecy cycle in proxies
Noticed when was looking into T64764, F7043663.

This is a weird case when proxy group is not a group, but is the
same as linked object.

Remove useless relation which was causing cycle, but had no functional
meaning.

Pair programming session with Brecht.

Reviewers: angavrilov, brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4928
2019-05-23 15:30:00 +02:00
George Vogiatzis
352474ced8 Fix T65002: after hiding edit mode object, clicking in wireframe mode crashes
Differential Revision: https://developer.blender.org/D4926
2019-05-23 15:27:31 +02:00
df7f69b873 Eevee: Fix SSS energy disapearing with alpha blended material 2019-05-23 15:32:05 +02:00
44f9a502e7 Depsgraph: Correct relations for proxy group
At some point when the transform evaluation was split into EVAL and FINAL
the b350edc was re-introduced by EVAL being run prior to proxy_group's
matrix is evaluated.
2019-05-23 14:30:37 +02:00
08690be3b5 Compositor: FileOutput
The File output node stores it settings locally, but the stereo settings
were not displayed, making users only able to use the default settings
of the node.

The cause of not displaying the buttons are was a NULL-pointer check in
`uiTemplateImageFormatViews`. The NULL pointer was used to check if
multiview was enabled. in case of the file output node this check was
performed by the node, so the nullpointer check could be ignored.

Reviewed By: brecht

Maniphest Tasks: T62767

Differential Revision: https://developer.blender.org/D4929
2019-05-23 14:17:14 +02:00
07c48c9112 Cleanup: Remove debug print 2019-05-23 14:14:36 +02:00
9f5ec31ac0 Fix T63176: Compositor stipes when scaling 2019-05-23 13:28:03 +02:00
6be9d19951 Collada exporter update
Added new feature: Collada: global axis rotation upon export (UI)

The new feature allows to specify the target rest coordinate system upon export.
This allows for example to export a character that is in Blender orientation (Y forward)
to match the Secondlife orientation where (-X forward)

- Refactor:Added new utility methods to collada_utils
           Made BCMatrix class more powerfull
           moved Blender related structures into new BlenderContext class
           added class wrapper to encapsulate ExportSettings structure
           Added blender context getters to ExportSettings
           added access methods to BlenderContext into ExportSettings class
           Moved class BCMatrix into BlenderContext
           moved utility functions from collada_util into BlenderContext
           replace own function for parenting by a call to ED_object_parent_set()

- Cleanup: removed obsolete parameters from methods
           renamed parameters for better understanding
           cleanup whitespace and indentation
           removed obsolete comments
2019-05-23 12:29:20 +02:00
e9cf9e0a39 Gpencil: Fix assert when rendering with Eevee 2019-05-23 12:58:50 +02:00
481e13a2dd Image space, view menu: Fix access uninitialized variable
Seems to be a copy-paste mistake in 7a2b203, causing menu to be
almost empty.
2019-05-23 11:41:13 +02:00
11e87510ef Fix too dense timeline grid spacing
The default spacing changed when this started using the user preferences,
this makes it work more similar to before that.
2019-05-23 11:27:27 +02:00
7c819b5964 Cleanup: unused import, pep8 2019-05-23 19:10:13 +10:00
37e72822c1 Cleanup: remove redundant separators 2019-05-23 19:10:13 +10:00
e88654c31b UI: change order of Live Unwrap in menu U key still goes to Unwrap first
Also makes it more clear it's related specifically to this type of unwrapping.
2019-05-23 11:04:54 +02:00
49593a2c38 Fix T64528: error in RenderEngine API docs example 2019-05-23 10:33:11 +02:00
8022bd7059 Depsgraph examples: don't assign to names of built-in Python objects
`object` is the superclass of all objects. Old-style code could still be
using `class SomeClass(object)` and assigning something else to `object`
could have unexpected results.

This is now also documented in the
[Python style guide](https://wiki.blender.org/wiki/Style_Guide/Python)
on the wiki.

Differential Revision: https://developer.blender.org/D4922

Reviewed by: sergey
2019-05-23 10:29:49 +02:00
58c4b10a70 Merge branch 'blender2.7'
Conflicts:
	source/blender/blenkernel/intern/library_remap.c
2019-05-23 10:23:11 +02:00
054dbb833e Fix (unreported) missing remapping of proxy_from pointer.
That would break proxy behavior after a library reload.

The usual super-annoying loop-back pointers... At least that one is
easily detectable and can be fixed in-place.

Found while investigating T64764.
2019-05-23 10:19:30 +02:00
8389cc7e67 Fix T65023: Tracking marker color is not updated when using Copy Color
Missing dependency graph update.

Ideally need to introduce more clear ID_RECALC flag, and maybe go over all
of the operators (some of them might not use dependency graph still).
2019-05-23 10:02:37 +02:00
fec9615ea0 Masks: Properly port to Copy-on-Write concept
Masks were not really covered by Copy-on-Write due to mistake
in the dependency graph. After correcting that mistake a lot
of tools became broken, so majority of the patch is related
on making it so access to evaluated/tessellated masks is done.

When accessing evaluated mask state make sure access to an
evaluated dependency graph is done. This solves possible
access to NULL data on redo.

Fixes T64899: Re-doing new point addition causes crash

Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T64899

Differential Revision: https://developer.blender.org/D4918
2019-05-23 09:47:13 +02:00
1d48fa2206 Correct last commit (gizmo order was reversed) 2019-05-23 17:21:11 +10:00
ad80dc1c89 Cleanup: replace the visible gizmo linked list with an array
Avoids an allocation per gizmo & simplifies limiting the lookup
past the first intersecting 2D gizmo found.
2019-05-23 16:33:21 +10:00
a521ad7568 Cleanup: allow BLI_Buffer to be used without it's header
Without this any functions declared that take BLI_Buffer
also needed to include the header.
2019-05-23 16:32:58 +10:00
f417a717b1 Gizmo: highlighted gizmo now handles all events first
Only mouse events were handled by the highlighted gizmo,
this allows more flexibility with event handling.
2019-05-23 14:27:28 +10:00
1fef2d2b8d Cleanup: split keymap handling into functions
Move keymap handler logic for keymap and gizmo handlers
into their own functions.

This makes it possible to refactor keymap handling
without large changes or duplicating code.
2019-05-23 14:08:28 +10:00
f16c1abc53 Cleanup: de-duplicate popover_group arguments 2019-05-23 12:29:28 +10:00
a1ad71304c Cleanup: modernize code of new BLE_main_id_refcount_recompute().
No functional change expected!
2019-05-22 23:50:39 +02:00
ceed34aac1 Merge branch 'blender2.7'
Conflicts:
	source/blender/blenkernel/intern/library.c
	source/blender/blenloader/intern/readfile.c
	source/blender/editors/screen/screen_edit.c
2019-05-22 23:36:02 +02:00
91aafd56e3 Fix (unreported) broken collections after undo/redo, or remapping (leading to crashes).
Those are two cases where keeping infamous backward `parents` pointers
of collections in sync is kind of impossible to do... So rebuilding
those relationships from scratch instead.

Fixes e.g. a crash when undoing, then reloading a library, and likely
many more weird ones like that.

Uncovered while investigating T64764.
2019-05-22 23:33:27 +02:00
d1f96f9b11 BKE Collection: Add new function to rebuild parent relationships.
It's not always possible to keep 'by hand' parent relationships valid in
collections hierarchy. Add functions to remake those
(re-using/factorizing code from `readfile.c` `lib_link_collection_data()`
function).

Can't stress again how painful it is to have those kind of backward
relationships in our data structures, those *always* end up being
serious issues to keep in sync... Should only be generated on the fly
when needed, period. :(
2019-05-22 23:33:27 +02:00
5a3c44937f Fix T64764: 'Reload' on linked libraries disconnects proxy armature datablocks.
Note that this only fixes the core issue reported (caused by own dummy
mistake in rBd0df7fb3b94ea), investigating that report uncovered at leat
two more issues, including a crasher (when reloading after an undo)...
2019-05-22 23:33:27 +02:00
b471e48c30 fix T64873 collada export crashes Blender on Mac 2019-05-22 21:34:43 +02:00
3a702ec028 Fix (unreported) usercount of linked IDs becoming garbage after undo/redo.
Not re-reading linked data-blocks in undo/redo case also means that we
do not touch to their usercounts. Even worse, lib_link process in
readfile will increase those (for cases where local data uses linked
one).

Whole data management code is now heavily relying on valid consistent
refcount of all IDs, so we cannot allow that anymore.

Simple solution here could have been to then not increase that one for
linked IDs in `newlibadr_us()`, but unfortunately that would not be
totally bullet-proof, as some local users of linked data may be added or
removed by an undo step...

So I cannot think of any other solution than the ugly brute force one,
i.e. going over the whole Main database and recompute linked IDs users
count... Should not be a big issue performance wise though, this is
fairly cheap process.
2019-05-22 21:10:36 +02:00
3600e94eba BKE Library handling: add function to recompute usercounts of IDs.
This will be needed in undo/redo case, since we do not re-read linked
IDs, their usercounts become total garbage (especially in 'used by local
ID' cases)...
2019-05-22 21:08:51 +02:00
8fdbd1377e Sequencer: ensure Strip is the default active panel 2019-05-22 19:52:41 +02:00
Dalai Felinto
6539cf3199 Visibility panel: Use "toggle" keyword
No functional nor visual change.
This is a partial revert of 0910932e71.

The toggle option was introduced on 6640bcca74.
This allow us to simplify the outliner draw code so it uses the icon as
defined in the RNA (as oppose to get the value there once again).
2019-05-22 16:22:02 +00:00
5397d8d268 UI: allow shrinking panel height to zero when open.
Currently if a panel becomes empty (draw simply returns), it stays
at the last non-empty height. This seems to be caused by some legacy
checks that may be completely obsolete, but the safest fix is to at
least allow resetting height when the panel is open.
2019-05-22 17:59:22 +03:00
8f2538f4fb Sequencer: Swap Data and Info panel names
Following feedback from Blender Studio animators
2019-05-22 16:42:27 +02:00
521b96fa69 Error in last commit 2019-05-23 00:38:29 +10:00
8ec3b5b7c6 Fix T64679: Missing dirty preferences tag
Use a default update function for user preferences that tags
dirty and redraws (if changed).

This avoids relying on button changes which fail in some cases.
2019-05-23 00:35:37 +10:00
8d20d6b2eb RNA: add fallback update function
Use so we can have a default update function,
that doesn't need to be set for every property.
2019-05-23 00:35:37 +10:00
f309c93f1f Cleanup: disambiguate rna_userdef_update_ui/ui_update 2019-05-23 00:35:37 +10:00
287f1da92a Cleanup: unused vars 2019-05-23 00:35:37 +10:00
04fa0511ca DrawEngines: Depth Of Field Units
The unit system is designed for displaying and editing and not for
rendering. Eevee, Workbench and GPencil used these settings to convert
the focal length and sensor size to world units. Making depth of field
render differently with Cycles.

For now we will remove the scale in the draw engines to match cycles,
until we implemented a camera parameters specific scale.

Reviewed By: brecht, fclem

Maniphest Tasks: T64988

Differential Revision: https://developer.blender.org/D4925
2019-05-22 16:16:20 +02:00
8b52619ff8 DRW/Eevee: Fix camera texture coordinates in renders
This patch fix the issue introduced by recent refactor and fixes
computation when using overscans.
2019-05-22 16:09:10 +02:00
d10bab7160 UI: Sequencer menus
Final small tweaks and fixes by Peter Fog:

  - Remove commented lines
  - Set 'Both' handle selection before Left and Right
  - Small tweaks to Strip and Context menus

Any further tweaks will be postponed for 2.81
2019-05-22 14:59:04 +02:00
083f932a25 Workbench: FXAA Artifacts
When using FXAA when rendering to an image the alpha channel was not
correct what lead to visual artifacts.

These artifacts come from the FXAA function that overwrites the alpha
channel with the original Luma of the texel. In the shader this can be
turned on or off. But at the end it always overwrites the alpha with the
luminance.

We didn't use this feature, but the alpha of the resulting pixel still
contained the luma value what lead to render artifacts.
By overwriting the alpha channel with the original alpha we remove these
artifacts.

Reviewed By: fclem

Maniphest Tasks: T64947

Differential Revision: https://developer.blender.org/D4924
2019-05-22 14:50:23 +02:00
53781d5771 RNA: fix missing depsgraph update tagging in FCurve methods.
Add tags in fcurve.update(), keyframe_point.insert/add/remove(),
fmodifier.control_points.add/remove().
2019-05-22 15:35:00 +03:00
31a73b3b92 RNA: allow 'TIME' on Actions and any IDs with AnimData in ID.update_tag. 2019-05-22 15:34:59 +03:00
12c9a9131f Fix: Auto Merge icon state were wrongly swapped 2019-05-22 14:21:31 +02:00
f05b9dba26 DRW: Only change VAO if geometry changes 2019-05-22 13:29:05 +02:00
60319e25f2 GPU: Refactor GPU_batch_draw_range_ex
Rename it to GPU_batch_draw_advanced and use base instance when possible.

Also add GPU_batch_bind to bind the vao independantly of drawing commands.
2019-05-22 13:29:05 +02:00
55780d9866 Fox drwview 2019-05-22 13:29:05 +02:00
7b3f64e12a Cleanup: DRW: Remove, rename stuffs 2019-05-22 13:29:05 +02:00
6914f7125b DRW: Do not update the view ubo for each pass
Only update if the view changes.
2019-05-22 13:29:05 +02:00
f7c9a33446 Fix T64806 Missing sss_blur pass in EEVEE crashing indirect light bake 2019-05-22 13:29:05 +02:00
9f3010e1c0 DRW: DRWView: Finish refactor 2019-05-22 13:29:05 +02:00
b3601a4687 Eevee: Make lookdev shader use common_view_lib 2019-05-22 13:29:05 +02:00
2d2ff27ce8 Eevee: Make lightprobes work with new DRWView system 2019-05-22 13:29:05 +02:00
800641a77f Eevee: Make Planar reflections work with the new DRWView system
Also get rid of clip_block which did the same as clipplanes inside
common_view_lib.glsl.
2019-05-22 13:29:05 +02:00
742848843d DRW: Add view param to DRW_culling_* functions 2019-05-22 13:29:05 +02:00
925b5823cc Eevee: Use DRW_view_* API instead of DRW_viewport_matrix_* 2019-05-22 13:29:05 +02:00
b944a66986 GPencil: Use DRW_view_* API instead of DRW_viewport_matrix_* 2019-05-22 13:29:04 +02:00
21dc2816d6 BLI_memblock: Refactor for faster iteration and allocation
Remove the clear allocation flag as it has little impact since there should
be very few allocation per redraw.

Make BLI_memblock_alloc and BLI_memblock_iterstep much more cache efficient
removing them almost entirely from performance profiles.
2019-05-22 13:29:04 +02:00
657165db94 Workbench: Fix TAA logic
Having both TAA and FXAA enabled at the same time resulted in conflicts.
The jitter_index was incremented twice before being used instead of once.
2019-05-22 13:29:04 +02:00
774022260a Workbench: Use DRWView instead of DRW_viewport_matrix_*
Continuing the transition to the new API
2019-05-22 13:29:04 +02:00
676e1e7b26 DRW: Remove some usage of DRW_viewport_matrix_get 2019-05-22 13:29:04 +02:00
e1153c6a1a DRW: Remove DRW_state_clip_planes_reset 2019-05-22 13:29:04 +02:00
551bbc87af DRW: Remove DRW_state_clip_planes_set_from_rv3d
This should be handled by DST.view_default
2019-05-22 13:29:04 +02:00
45c085a171 DRW: Add DRWView to improve different view handling
This will have multiple benefit.

TODO detail benefits (culling, more explicit, handling of clipping planes)

For now the view usage is wrapped to make changes needed more progressive.
2019-05-22 13:29:04 +02:00
88a725eff8 Eevee: Lookdev: Make winmat point to negative Z 2019-05-22 13:29:04 +02:00
2b1da51b2f Cleanup: DRW: Refactor code for better readability and simplification
- Remove DST.frontface and DST.backface.
- Separate uniform update into its own function draw_update_uniforms.
2019-05-22 13:29:04 +02:00
b82afb4b01 Templates: updated 2D animation template
From the grease pencil team.
2019-05-22 13:15:40 +02:00
aa0242170a BLI_memiter: unpoison memory before freeing it 2019-05-22 12:33:30 +02:00
c56133c846 Fix T64480: Tweak needed to Audaspace CMake options
The issue was that Audaspace options ended up in the cmake cache though
they should not be there.

Also reverting indentation change by @ideasman42.
Thanks to @mont29 for reporting and helping with the fix.
2019-05-22 12:14:51 +02:00
e59f705308 Fix T64981: background images do not come along with linked cameras 2019-05-22 10:44:02 +02:00
85322737ba Fix T64972: object convert to mesh not working after recent changes
This was the only remaining cases that used a string lookup, which didn't
work anymore now that it's no longer a real value in the context.
2019-05-22 10:33:02 +02:00
d9f4071ac6 Fix T64969: changing color space in image texture node loses changes
Don't allow changing it for painted images until they have been saved, similar
to sidebar panels. This could be solved better, for now the important thing is
not to lose changes.
2019-05-22 10:12:27 +02:00
2e350b4034 Fix T64965: crash using masks in texture paint mode 2019-05-22 10:00:33 +02:00
5bf429b0e4 Fix T64974: misisng multi-object edit for some curve operators, like smooth 2019-05-22 09:52:49 +02:00
c06bd2d184 Fix T64499: edit mode display glitch on Intel HD 4x00 and Windows 7/8
There may well be more vertex shaders that need this, but I couldn't find them
in my testing.

Differential Revision: https://developer.blender.org/D4921
2019-05-22 08:32:39 +02:00
ff3a20d1bc UI: tweak order of shading mode display
Order 'Matcaps' first instead of 'Flat'.
Order 'Material' first instead of 'Single'.

While we don't have to order defaults first, it's strange
to have obscure options first (in the case of 'Flat').
2019-05-22 15:22:02 +10:00
6ca172cdce UI: use term 'Factory Settings' for preference menu
It's not clear what 'Defaults' mean in this context because we have
the defaults the users has saved & factory defaults.
2019-05-22 14:36:16 +10:00
b79ff12e11 Preferences: add handler for loading factory preferences
Allows app-templates to define their own adjustments to preferences.
This matches `load_factory_startup_post`, use when loading preferences.
2019-05-22 14:28:10 +10:00
fc0312f538 WM: call wm_file_read_post after resetting preferences
Also avoid diverging code paths for loading startup & preferences.
2019-05-22 14:20:53 +10:00
ed9273b08b Fix T63852: Invalid keymaps written
Track-pad & NDOF events were using KM_NOTHING which wasn't included in
the RNA enum, causing the value to be an empty string in exported key-map
(which then failed to load back).

Add back 'Nothing' value, keep it last since it's not used often.
2019-05-22 13:29:06 +10:00
350825ed99 Fix WITH_PYTHON_MODULE linking
Also remove bf_blenfont since it's not used by creator directly.
2019-05-22 11:20:40 +10:00
0f98c05c8b Fix WITH_HEADLESS build 2019-05-22 10:34:55 +10:00
fa542237dd GPU_select_buffer_stride_realign: fix crash when one of the rect's dimensions is 0. 2019-05-21 20:57:03 -03:00
73f7ed7ffa dna_genfile: add SDNA struct/elem queries that use alias names
Allow versioning code to use checks which use run-time naming
instead of the old names which are only listed in dna_rename_defs.h.

Addresses T64791.
2019-05-22 09:19:05 +10:00
8accb5a46f Cleanup: minor corrections 2019-05-22 08:53:04 +10:00
Dalai Felinto
0910932e71 Remove "_base*" from context API
We are not exposing RNA_ObjectBase in the 2.80 API.

Thus we can't have operators relying on it (e.g, CTX_data_visible_bases,
CTX_data_active_base, ...). Otherwise users won't be able to override
context for these operators.

This commit keep the CTX_data_.*bases() functions around so we don't
need to change the operators and potentially break things that late into
2.80. However as far as the Python scripters are concerned there is no
base to be overriden, ever.

That also simplify the guessing game addon developers have to play when
trying to override an operatori context. They still need to find whether an
operator requires editables, visibles, selected, ... objects. But at
least they don't need to find out whether the operators need base or
object.
2019-05-21 19:24:04 -03:00
58a75d01a6 UI: Edit Mode Options panel cleanup
- Move Live Unwrap to UV menu
  - Move Auto Merge Threshold into a sub-section of Auto Merge to make the relationships clearer

Differential Revision: https://developer.blender.org/D4919

Reviewers: Brecht Van Lommel, Pablo Vazquez
2019-05-21 22:50:02 +02:00
1036ae2acd Fix T58492: Removes jitter when using adaptive smoke domains
This small fix in the GLSL shader seems do to the trick: now smoke won't jitter when using the adaptive domain.

The previous workaround rB3891ad8e0317 is still needed too, i.e. the bug that caused jitter this time was not related to the previous one.
2019-05-21 22:13:12 +02:00
d5ffa805b2 VSE: Don't store cfra in cache
Strips can move in time. Using cfra may give us erratic results.

Reviewed by: brecht

Differential Revision: https://developer.blender.org/D4898
2019-05-21 12:29:17 -07:00
Dalai Felinto
9be7c831f6 Fix: Reset to the default theme not auto-saved
T64679 mention a desire for a solution that is not in a per-case basis.
However until then we are still better off with this working then not.

Specially since changing individual theme elements works, while reset
theme was not working.
2019-05-21 15:33:38 -03:00
10260fc773 UI: Fix wrong naming and tooltips
Double Threshold -> Merge Threshold
This relates to Auto Merge

AutoMerge Editing -> Auto Merge
No need for redundant 'Editing' here
2019-05-21 20:03:43 +02:00
522320dadf Fix T64738: pick short path seam not doing live unwrap 2019-05-21 18:07:47 +02:00
0aa3f2acde Fix UV editor selection colors not matching 3D viewport 2019-05-21 17:59:20 +02:00
06099f391e Fix T64414: crash deleting collection used for particle group and use count 2019-05-21 17:47:04 +02:00
0977937286 Fix T64903: Freestyle line alpha not working for Eevee 2019-05-21 17:42:45 +02:00
6f893d6f05 GPU: double uniform names buffer size
Adding a constant yields quadratic time complexity which can
have quite a big impact on some scenes.

I used the file from T64901 for testing.
In the test file, the time it took to execute `wm_draw_update`
changed from `0.60s` to `0.51s`.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4916
2019-05-21 17:17:56 +02:00
03ad013c0a Cleanup: remove unused function 2019-05-21 17:06:04 +02:00
4ebb64697a Cleanup: pep8 2019-05-22 00:59:43 +10:00
dfb2db10a0 Cleanup: clang-format, sort structs 2019-05-22 00:59:43 +10:00
a459a590c2 Fix part of T64679: Missing dirty preferences tag
- Editing shortcuts.
- Editing walk mode navigation.
- Adding/removing paths.
2019-05-22 00:59:43 +10:00
Juan Gea
fbae1c9ed5 Particle: optimize threading for many particles and many cores
The maximum particles per task of 256 was outdated and lead to too much thread
contention. Instead define a low fixed number of tasks per thread.

On a i7-7700HQ, creating 4 million particles went down from 31s to 4s.

Thanks to Oscar Abad, Sav Martin, Zebus3d, Sebastián Barschkis and Martin Felke
for testing and advice.

Differential Revision: https://developer.blender.org/D4910
2019-05-21 16:56:34 +02:00
9e82e48937 Fix T64804 crash editing image paint fallof in edit mode 2019-05-21 16:50:37 +02:00
4f6d6f982f python templates: update operator_modal_view3d_raycast to 2.8
Reviewers: JacquesLucke, sergey

Differential Revision: https://developer.blender.org/D4914
2019-05-21 16:39:48 +02:00
a25b8f531a Fix T64936: Grease Pencil point pressure max value too low
The API had an old  limit of 1.0f.
2019-05-21 16:35:24 +02:00
030725a9e5 Viewport: MSAA support during ViewportRendering
When rendering viewport to an offscreen buffer the buffer was
constructed for non anti aliasing (0 samples). This made the objects
that are drawn by the `object_mode` including `wireframe` draw type
non-anti-aliased.

The offscreen buffers will be constructed based on the user setting for
viewport multisampling (`U.ogl_multisamples`). The same setting will
also be used when previewing scene strips in the sequencer. For now
this only improves wireframe drawing in the scene strips. To improve the
Anti aliasing in the scene strips we need to get finer control in the
draw manager. This will be part of a different patch I am preparing.

Please note that this patch also cleansup some unused code in the offscreen rendering (FSAA code was still existing, but never called)

Reviewed By: brecht

Maniphest Tasks: T64849

Differential Revision: https://developer.blender.org/D4907
2019-05-21 16:10:48 +02:00
e425e98475 OffscreenRendering: Fix Incorrect Window Coordinates
When doing offscreen rendering (Viewport Render or Sequencer Scene
strip) EEVEE and workbench used the wrong window coordinates. These
coordinates included the border that was not drawn.

Reviewed By: brecht

Maniphest Tasks: T64505

Differential Revision: https://developer.blender.org/D4864
2019-05-21 16:06:18 +02:00
7fe483b360 GPencil: Set samples to 10 for Soft brush 2019-05-21 15:59:36 +02:00
9ad08c0673 GPencil: Set default Fill brush size to 20 2019-05-21 15:58:26 +02:00
dc67e63acb Mask: Fix missing remap of active spline/point on copy 2019-05-21 15:45:51 +02:00
903e5d3972 python templates: update operator_modal_draw to 2.8
part of T56351

Reviewers: JacquesLucke

Differential Revision: https://developer.blender.org/D4912
2019-05-21 15:36:05 +02:00
91ce3087aa Fix T64842: crash rendering files with bevel curves
This is old logic that no longer makes sense in the new depsgraph, and causes
issues when multiple threads try to modify the same bevel object.

Differential Revision: https://developer.blender.org/D4913
2019-05-21 15:07:01 +02:00
0fc97dc73d CTest: Fix Bli_task_test failing on windows.
The task_scheduler was not being explicitly freed, leading to
unpredictable behavior when the process was exiting. The test
would pass, but would sometimes segfault at process shutdown.
2019-05-21 06:51:24 -06:00
fd7352e5a2 Cleanup: use term pad instead of padding
- Use min/max instead of bottom/top
  (in keeping with the rest of the BLI_rect API).
- Swap args (was passing in max, min).
2019-05-21 22:39:04 +10:00
24607a2940 Fix T64758: crash loading certain DDS textures 2019-05-21 13:00:43 +02:00
ad4dd3ebef Fix T64421: crash using redraw timer benchmark 2019-05-21 12:35:57 +02:00
b03ee4828b Graph Editor: view-selected takes scrubbing and marker region into account 2019-05-21 11:59:15 +02:00
dcec863b2f Keymap: Add additional scrubbing affordance (Alt-LMB)
This adds an additional way to scrub the playhead, by holding Alt and dragging with the left mouse button, in addition to Shift-RMB.

It's easier to do this, especially with pen input. The other method is still kept, in case you have Emulate 3 Button Mouse enabled, in which case Alt-LMB pans the view

And of course, you can still scrub simply by dragging the playhead, without holding any modifier keys.

Right click select is unaffected.
2019-05-21 11:28:46 +02:00
9add99f5ff Remove USE_EVAL_DATA operator flag from Python
After new dependency graph API this is no longer needed: all the access
to dependency graph is done explicitly.

Still leaving this flag for C, but that might also be gone in the future.
2019-05-21 11:05:08 +02:00
9877445ed7 Fix T64927: bad timeline number spacing with scaled UI 2019-05-21 10:57:11 +02:00
5a1c888834 UI: Hide Add Cube from toolbar.
This was still a proof of concept tool needing further development. Hiding this for now.

It can return in future releases with further development.

See https://developer.blender.org/T57210 for details.
2019-05-21 10:56:49 +02:00
52643bb9e7 Fix T64763: 'Make Proxy' creates Proxy within linked Collection.
`BKE_collection_object_add_from()` would not check wether collections
were local or not... Trivial to fix.

Note that here I assume we do not use that function in some special
cases where we would like to edit linked datablocks. Think that is
reasonable stance, though.
2019-05-21 10:31:39 +02:00
21d065af5d Cleanup: rename nr_* to *_len for DNA code 2019-05-21 18:01:33 +10:00
34d7ff76ee Cleanup: make DNA_struct_find_nr_ex function more compact 2019-05-21 17:54:32 +10:00
1f51584167 remove greasepencil userdef from image, node, clip and sequencer spaces
these are about greasepencil vertices and in these spaces we are not
editing greasepencil objects.

Fixes T64861

Reviewers: antoniov

Maniphest Tasks: T64861

Differential Revision: https://developer.blender.org/D4901
2019-05-21 09:38:31 +02:00
bfe7fdedfc Fix T64867: crash when changin image source to Movie
thx @Gvgeo for adding the python/RNA case as well.

Reviewers: brecht

Maniphest Tasks: T64867

Differential Revision: https://developer.blender.org/D4902
2019-05-21 09:34:00 +02:00
2cec669d34 Fix T64912: Crash right clicking on 'Add New Material'
D4904 by @Gvgeo
2019-05-21 16:58:34 +10:00
b2c74c0564 Keymap: Ctrl-Tab toggle pose-mode with 'use_pie_click_drag'
This just enables a default key-binding
even when pie menus are used on drag actions.
2019-05-21 16:13:46 +10:00
91a292ba40 UI: show symmetry popovers next to newly added mirror buttons
This moves symmetry panels to a small popover
next to the mirror axis buttons.
2019-05-21 15:49:36 +10:00
909c0bd043 UI: expose mirror/symmetry options int the tob-bar
D4895 by @billreynish with edits.
2019-05-21 15:18:17 +10:00
6640bcca74 UI: support drawing booleans with icons as check-boxes
Previously, if a boolean happened to use an icon there was no way
to make it display as a check-box from Python scripts.

The previous logic meant we ended up having to edit the RNA.
Since booleans with icons don't work well with the split-property layout
(now used for most of the interface).
Icons were being removed from RNA then added back using awkward Python
ternary expressions in the interface scripts.

The toggle argument now has an unset state (-1).

- toggle=True: no checkbox (emboss).
- toggle=False: always use a checkbox (no icon).
- toggle=(unset/-1): depends on the icon status, default as before.

Since toggle=False was default, this isn't used in existing UI logic.
2019-05-21 15:06:44 +10:00
87fda5bc60 Cleanup: const assignments to simplify code
Also avoids using uninitialized vars.
2019-05-21 12:30:07 +10:00
a08fb46700 UI: move edge-tag option from the scene into the operator
This was a very specific option to display in global tool settings.

Now this is exposed in the operator when edge-select mode is enabled.
2019-05-21 11:15:26 +10:00
e787700393 Fix memory leak in Normals from Faces operator 2019-05-21 08:03:29 +10:00
ee7093689f GPU: Use uint in GPU_batch_uniform_1ui. 2019-05-20 15:45:35 -03:00
12d28b3c4c UI: Outliner - Do not highlight icons of active lights
This removes the extra highlighting of lights that are active as this is not supported

Differential Revision: https://developer.blender.org/D4903

Reviewed by Brecht Van Lommel
2019-05-20 10:55:18 -07:00
907d5eb39b Normal UI: Make Alt-N shortcut to Normals Menu.
See T64324 for discussion of normals ui.
Consensus on blender.chat was to use Alt-N to pull up Normals Menu,
overwriting the old use of that key (Flip normals).
There are still shortcuts for Recalculate Outside and Recalculate Inside
which are likely the more common needs.
2019-05-20 13:38:33 -04:00
9efe117535 Normal UI: for all ops needing autosmooth on, enable it if needed.
Now Normal menu operations and rotate normals (r n) do not need
manual enabling of autosmooth first.
See T64324 for discussion of Normal UI changes.
2019-05-20 12:16:34 -04:00
02238d4d6b Clip editor: make tool/sidebar wider by default, right align movie clip info 2019-05-20 18:15:46 +02:00
d17cb3a3b3 Fix Python error in sequencer scene strip UI 2019-05-20 18:10:12 +02:00
5189bef654 Fix outliner drawing unselected active objects as if they are selected
Now we always draw a roundbox behind the active object icon, and only change
the text color if the active object is also selected. This matches the 3D
viewport better.
2019-05-20 18:10:12 +02:00
b5446f01fd Accidentally overrode changes in 40d5254741 2019-05-20 18:09:25 +02:00
5c9adc1614 UI: Sequencer menus
More updates to Sequencer menus from Peter Fog.

  - Rename Cut operators in the UI to be more clear
  - Re-organize the context menu to be nicer and more useful
  - Select menu is clearer
  - other assorted fixes and changes for clarity
2019-05-20 18:04:35 +02:00
40d5254741 Sequencer: Hide panels when there is no actual sequences
before this the python script would raise an exception due to
attempt to show properties of None data.
2019-05-20 17:51:05 +02:00
af93bb0a24 UI: right align info in image settings panel 2019-05-20 17:30:37 +02:00
64c821bd11 GPencil: Add new default Soft Brush 2019-05-20 17:23:36 +02:00
828efef151 UI: Top bar menu tweaks
* Use icon for Blender menu
* Move Startup/Factory settings to Defaults submenu under File
* Move Preferences under Edit
* Move Quit to File
2019-05-20 16:52:17 +02:00
3f4dd54ff7 GPencil: Fix presets error after changing parameter name
The old use_follow_draw was renamed to alignment_mode
2019-05-20 16:41:16 +02:00
49efb7bdbe Camera: change default f-stop from 5.6 to 2.8
This gives a more noticeable effect by default. Also fixes startup.blend not
having focus distance initialized correctly.
2019-05-20 16:35:34 +02:00
d2e139e44e Color Management: update configuration, remove legacy transforms
* Replace Log view transform with Filmic Log.
* Remove Rec.709, DCI-P3 displays that were incomplete and outdated.
* Remove outdated RRT and Film transforms, replaced by Filmic.
* Remove camera responsive curves that don't work with HDR colors.
* Rename Default view transform to Standard.

We're breaking compatibility now for 2.80, so that we can add future
improvements on a clean config.

Part of the code was contributed by George Vogiatzis in D4782.

Differential Revision: https://developer.blender.org/D4900
2019-05-20 16:35:34 +02:00
b9ce1fee42 Fix broken workbench tests after recent changes 2019-05-20 16:35:34 +02:00
d7ef7d8046 Edit Mesh Select: Fix OpenGL status to use GPU_point_size.
The problem has worsened in rB94db2c1f3243.
Maybe this has contributed to T64779.
2019-05-20 11:08:18 -03:00
9cc795e1df Revert "Fix T64876: Checking Animated checkbox does not do what is documented."
Bad understanding of intents behind that setting, my mistake.

This reverts commit 49f530c7da.
2019-05-20 16:02:30 +02:00
7a2b20349a UI: add entry to show/hide tool settings bar to the View menu 2019-05-20 15:37:04 +02:00
eec47f284a Fix T63443: tool 'builtin_brush.draw' not found for space 'IMAGE_EDITOR' 2019-05-20 15:33:16 +02:00
576e7c82da UI: keep grease pencil stroke placement / guides button always in main header 2019-05-20 15:30:45 +02:00
97047db16c Revert "Theme: match outliner/properties colors with modes in viewport."
While this consistency is useful, green selection in edit mode does not stand
out as much as orange. This can cause problems for some users, it seems to
depend on the person. Overall the risk of making the change at this point in
the release cycle is too high.

This reverts commit 5827a47280.
2019-05-20 15:21:21 +02:00
d5f644c672 Keymap: reinstate Alt-Wheel to scrub from 2.7x map
Animators found this useful, so keep it as a default.
2019-05-20 23:19:45 +10:00
3d4c4fd3a7 Viewport: change default 3D viewport lighting from Studio to Matcap 2019-05-20 15:14:40 +02:00
d00c54c855 Cleanup: reorder report argument for pointer assignment
Most code uses ReportList argument last (or at least not first)
when an optional report list can be passed in.
2019-05-20 23:11:57 +10:00
88d2d82031 Cleanup: unused variable 2019-05-20 23:11:49 +10:00
43500671dc Normal UI: Remove normals toolbar and add/muliply menu options.
See T64324 for discussion re improving normal editing ui.
As next step, remove the face_strength tool settings because
menu operator now includes that. Move face_strenth enum to
better place.
Remove normals toolbar panel because only thing left
(normal_vector) can stay hidden for copy/paste.
Remove add vector and multiply vector menu entries as
they are useless without ui method for specifying operand,
and they are very low utility operations anyway.
2019-05-20 08:51:53 -04:00
49f530c7da Fix T64876: Checking Animated checkbox does not do what is documented.
This property should not be animatable.
2019-05-20 14:51:18 +02:00
0b47d08ef6 UI: integrate Cycles ray visibility and culling in new Visibility panel 2019-05-20 13:47:42 +02:00
Dalai Felinto
785ff8e1d2 UI: add Visibility panel for objects
The outliner should not be the only way for users to change these settings.
The Python API was extended to keep these properties positive and keyframable.

Differential Revision: https://developer.blender.org/D4889
2019-05-20 13:47:37 +02:00
81320ce7f7 Fix T64766: use grid size from user preferences 2019-05-20 11:48:37 +02:00
11d5a1baff Fix T64776: Multiple close file dialogs 2019-05-20 11:41:09 +02:00
bb88485a16 Fix compiling: Forgot this file in last commit. 2019-05-20 10:52:08 +02:00
301fb14fbf Icons: Fix wrong icon names
Some file-related icon names were mixed up.

We have icons for cache, volume, 3rd party 3d files, hidden, backups, drives
2019-05-20 10:38:47 +02:00
f606f58845 Cleanup: add wm_utils.c for generic functions 2019-05-20 16:52:49 +10:00
3184460ff7 3D View: re-use select id buffer for circle select on cursor-motion
The new selection code was redrawing everything for each update.

Use the gestures wmGenericUserData to store the cache between
executions and ensure it's freed.
2019-05-20 16:34:23 +10:00
c09f461e04 WM: add wmGenericUserData utility struct
Useful to have a generic user data with an optional custom free function,
use for wmGesture.
2019-05-20 16:26:37 +10:00
8f73559355 Cleanup: rename buffer select var: bbsel to use_zbuf 2019-05-20 13:49:38 +10:00
d496236f4a Cleanup: move selection utilities into ED_select_buffer_utils 2019-05-20 13:19:24 +10:00
164b6c5b04 Cleanup: remove EDBM_backbuf API 2019-05-20 12:39:01 +10:00
fcee82d19a Cleanup: remove unused G_FLAG_BACKBUFSEL 2019-05-20 12:37:49 +10:00
0e1faba9d0 3D View: use new buffer selection API's for paint vert/face select
Removes EDBM_backbuf use.
2019-05-20 12:36:31 +10:00
c99838f40f Fix missing assignments in object mode select id drawing
The code currently doesn't run, needed for upgrading all selection
code to use the new API's.
2019-05-20 12:14:30 +10:00
eb2937282b Fix error mixing old/new buffer selection API's
Missed from 4f6e252805, the second pass often wont run,
so the error didn't show up on basic tests.
2019-05-20 12:09:29 +10:00
17c15be48f Fix invalid face offset in DRW_draw_select_id_object 2019-05-20 11:36:50 +10:00
d58631afc8 Fix error showing active tool side-bar in the image editor 2019-05-20 10:50:54 +10:00
b4dfae3df7 Industry Compat keymap: Fix deselecting rings
Issue was caused by a keymap conflict
2019-05-19 23:36:47 +02:00
bd41d573be Fix T64832: Industry keymap - Pressing F to View Selected in Node Editor not working via hotkey 2019-05-19 23:16:22 +02:00
7d620d2eec UI: Add back Sequencer sidebar toggles into the header
The properties inside are still hidden when the toggles are off, but we really should use greying out here instead.

That needs changes to DNA/RNA to work though.
2019-05-19 22:47:14 +02:00
8c113eb0c4 Render: Use GHash for storing render parts
Previously, render parts were stored in a linked list and every tile update
searched the entire list for the correct part. As a result, the overhead
of searching tiles increased quadratically w.r.t. the number of tiles.

By hashing the parts based on their location, this operation is much faster,
significantly reducing the tile update overhead for small tiles and/or large
renders.

For example, rendering an empty scene in 1080p at 1spp and 8x8 tiles goes
down from 9.22sec to 1.45sec on my laptop.

Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D4896
2019-05-19 22:37:45 +02:00
Dalai Felinto
301806a067 Fix build
Issue introduced on b7eba20236.

I'm surprised it compiled elsewhere, but in Linux at least this fix was
required.
2019-05-19 17:34:08 -03:00
b7eba20236 UI: Edit Menu Operator Polling
This patch updates the polling that enable/disables Edit Menu items. Slight Undo History menu changes

Differential Revision: https://developer.blender.org/D4846

Reviewed by Brecht Van Lommel
2019-05-19 13:12:15 -07:00
ec02bc299e Edit Mesh Select: Fix/update to new logic. 2019-05-19 16:03:29 -03:00
289825ee37 Fix T64720: Sequencer UI doesn't draw properly with some strip types
cleanup after rB86eefefdc1aae2a3ab4160770032671abf55aa30.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4891
2019-05-19 11:55:03 -07:00
58bea005c5 VSE: add movie strips on top of audio
- add movies to channel above free slot (no check for 2 free slots),
  add sound to the free slot
- don't override channel settings if `channel` property is set

This is just a hack. Propper implementation should be done along with T59540

Reviewed By: brecht

Differential Revision: https://developer.blender.org/T59540
2019-05-19 11:55:03 -07:00
eee704a83f Fix T64579: Failure to honor anamorphic display
Restore stretching of sequencer preview removed in rB005626b8c6b4

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4879
2019-05-19 11:55:03 -07:00
758c25d89d UI: Icons update
A few icons were missed in the last update.

  - Added dedicated icon for showing hidden objects in the Graph Editor
  - Added new, more descriptive icon for F-Curve snapshots
  - Tweaks for Toggle Full Screen and Collections icons

This should be the final set for 2.80.

Thanks to Andrzej Ambroż for contributing this icon set.
2019-05-19 20:23:58 +02:00
5adb3607dc UI: expand more image editor scope panels by default
Better to show all information about the image at once, there is enough space
since they are in their own category.
2019-05-19 19:55:21 +02:00
bb2d20c545 UI: don't ask for confirmation to save or revert to saved preferences 2019-05-19 19:02:21 +02:00
30935955d6 UI: minor tweaks to image editor panels 2019-05-19 18:56:17 +02:00
2da0d3db80 UI: Use "Viewport" instead of View in Subdivision Modifier.
Cosmetic change for consistency according to the naming guidelines in 2.80.

Also place Render first, Viewport later to match other areas in Blender
such as the sampling panel in EEVEE/Cycles.
2019-05-19 17:19:30 +02:00
36dbd141f0 UI: Align Render and Viewport samples properties for EEVEE.
Matches Cycles and other areas in Blender.
2019-05-19 17:10:02 +02:00
2ff393bb98 UI: use single column layout for image settings panels 2019-05-19 16:24:53 +02:00
7aaa7aa9dd Images: change alpha settings to support channel packing
This also replaces the Use Alpha setting. We now have these alpha modes:

* Straight: store RGB and alpha channels separately with alpha acting as a
  mask, also known as unassociated alpha.
* Premultiplied: transparent RGB pixels are multiplied by the alpha channel.
  The natural format for renders.
* Channel Packed: different images are packed in the RGB and alpha channels,
  and they should not influence each other. Channel packing is commonly used
  by game engines to save memory.
* None: ignore alpha channel from the file and make image fully opaque.

Cycles OSL does not correctly support Channel Packed and None yet, we are
missing fine control over the OpenImageIO texture cache to do that.

Fixes T53672
2019-05-19 14:36:42 +02:00
3b23b5c638 Images: don't (un)premultipy non-color data
The previous behavior here was wrong for some specific combinations of
settings, non-color RGB channels should never be affected by the alpha
channel.
2019-05-19 14:36:42 +02:00
7c78c20b6b Cleanup: refactor image texture node code for coming changes 2019-05-19 14:32:22 +02:00
bb8ed813f3 Cleanup: remove unused image buffer code 2019-05-19 14:16:36 +02:00
ec1c9e3258 Python API: add a Matrix.Diagonal constructor to mathutils.
For some reason there seems to be no way to do the very simple and
obvious task of converting a scale vector to a matrix via mathutils.
The Matrix.Scale constructor does something complicated instead.

Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D4893
2019-05-19 15:03:27 +03:00
d150c893f4 UI: don't use decorators for Eevee material quality settings 2019-05-19 13:22:11 +02:00
255615867c Fix inconsistent toolbar and sidebar sizes in default workspaces 2019-05-19 13:21:24 +02:00
24675eddcb Fix Cycles material settings appearing in the wrong tab in node editor 2019-05-19 13:10:09 +02:00
cf878a0f7c Keymap: Space-L sets "Lasso" with Space tool activation 2019-05-19 19:55:17 +10:00
434acfd904 UI: add Panel.bl_order property to control order of panels for add-ons
This fixes poor Cycles panel ordering, with Freestyle and Custom Properties
appearing at the top.

For most cases order of registration is still the easiest way to control
order and it's recommended to keep using that. This is mainly to solve a few
cases where we want a few built-in panels to appear below add-on panels.
2019-05-19 11:33:27 +02:00
c0352551d2 Fix T64822: curve widget point selection does not take into account DPI 2019-05-19 11:33:27 +02:00
f7b60f878b Cleanup: doxygen parameters 2019-05-19 19:21:45 +10:00
4cdc6d36fd Cleanup: spelling for ghost comments 2019-05-19 19:15:56 +10:00
f2eef45200 Cleanup: use wm prefix for GenericCallback
Without this it's not clear what kinds of data this deals with.
2019-05-19 14:56:49 +10:00
7decb9ad08 Cleanup: rename BLI_appdir_fonts_* -> font
Plural name doesn't fit with textures, sounds & other paths
that may be added.

Also quiet unused warning.
2019-05-19 14:50:02 +10:00
06c4139a68 UI: Remove Hover Highlight When Outliner Loses Focus
This patch removes the hover highlight that can sometimes remain after moving out of the Outliner space

Differential Revision: https://developer.blender.org/D4822

Reviewed by Brecht Van Lommel
2019-05-18 17:09:45 -07:00
5f2578f32f UI: Default Directory for Windows Fonts
This patch gives new Windows users a better default preference for fonts folder

Differential Revision: https://developer.blender.org/D4725

Reviewed by Campbell Barton and Brecht Van Lommel
2019-05-18 16:40:33 -07:00
1fce0460d5 Industry Compat keymap: Switch mode order to Vert, Edge, Face, Object
Due to popular demand, this switches the number key mode order, so that it goes:

 1: vert, 2: edge, 3: face, 4: object, 5: sculpt and so on

This has a number of downsides in practice, because it works less well for objects other than meshes, which now have a gap in the keymap between 1 and 4. I will try this change anyway, due to popular demand.

Also use V for viewport pie, which makes it easier to switch viewpoints on laptops especially.
2019-05-18 19:13:17 +02:00
db3f3d4d23 make.bat: Add option to only update sources from git.
SVN takes a long time to sync even if there are no updates,
the `code_update` parameter gives the option opt out of the
SVN updates.

This is a developer option, people just wanting to build
blender and not do any development are highly recommended
to keep using the `update` method.
2019-05-18 10:34:33 -06:00
94db2c1f32 Edit Mesh Selection Drawing: Make sure the state of point size is enabled. 2019-05-18 12:25:53 -03:00
4f6e252805 Fix T54686: objects don't occlude each other for edit-mesh select (part 2)
The previous fix 8a6414ed46, resolved selection picking but didn't
work for box/circle/lasso select.

- Add ED_select_buffer_utils.h for general select-buffer operations
  unrelated to edit-mesh.

- Circle select still needs to cache select-id's for each update.
2019-05-18 23:58:46 +10:00
eddda5194c Cleanup: remove unused argument 2019-05-18 23:55:58 +10:00
53f77ae722 macOS/Linux: use more standard button layout in quit dialog
Ref D3118. This matches macOS and GNOME.
2019-05-18 14:43:10 +02:00
95a42ccf1c Fix T64762: incorrect textures for non-color images with an alpha channel 2019-05-18 12:54:59 +02:00
8a5effe967 Fix T64791: light sun angle not saved
There is a deeper problem here with DNA_struct_elem_find and Lamp/Light name
aliasing, to be fixed separately.
2019-05-18 12:45:56 +02:00
79cfd5134d Fix image not being marked as modified on texture paint undo/redo 2019-05-18 12:42:22 +02:00
396558b36f Windows: use more standard button layout in quit dialog
macOS and Linux remain the same as before. Ref D3118.
2019-05-18 12:19:27 +02:00
7fd015bb70 Fix for Python error due to file missing from last commit 2019-05-18 11:53:30 +02:00
a82bc70512 Fix use of deprecated DoF distance property 2019-05-18 11:50:55 +02:00
07c67148e3 Mesh: remove Double Sided lighting option, it does nothing in the new viewport
This is legacy option from fixed-function graphics hardware, where per-vertex
lighting meant this had a significant performance impact.
2019-05-18 11:42:31 +02:00
d95ccc2175 Cleanup: remove unused GHOST quit dialog code 2019-05-18 10:35:06 +02:00
14f00e11fe macOS: always use the Blender quit dialog, like other platforms
The same was done for Windows, but some extra changes were needed to make it
work on macOS. This is required because the Blender quit dialog now contains
additional settings for image saving.
2019-05-18 10:31:10 +02:00
4718998578 UI: Sequencer menus
- Rename Frame menu to Navigation, and move to View menu
  - Add missing Zoom entry to View menu
  - Move the Snap/Offset items to the Transform menu
  - Remove Crossfade Sounds from the Strip menu, now that it is in the Transitions menu
  - Added more separators where it makes sense

Suggestions by Peter Fog (tintwotin)
2019-05-18 10:05:13 +02:00
03672e7783 Industry Compat keymap: Sequencer fixes
- Use consistent animation controls
  - Use consistent keys for Select More/Less & Select Linked
2019-05-18 01:36:34 +02:00
40a7ec8375 UI: Sequencer menus
Add missing menu entries:

  - Select Box
  - Sound Crossfade
  - Toggle Meta
  - Gap Remove

Also:
  - Rename menu entries to use Playhead rather than the ambiguous Frame
  - Use icons for the rest of the Add menu categories

Thanks to user tintwotin for pointing out the missing items
2019-05-18 01:11:45 +02:00
3b8ae2c08f Desktop Icons Update
Unify all desktop icons on Mac, Win and Linux to fit with the correct, updated brand guidelines here: https://www.blender.org/about/logo/

This is using :

PANTONE 716 C = #EA7600 (RGB 234 118 0)
PANTONE 647 C = #236192 (RGB 35 97 146)

Thanks to Yevgeny Makarov (jenkm) for compiling this icon update.

See T63623
2019-05-17 23:54:21 +02:00
8af1d1b199 UI: Icons update
New icons from Andrzej Ambroż / Jendrzych:

  - Bespoke icon for creating new Collections
  - Special icons for Rigid Body and Rigid Body Constraints (Physics Properties)
  - New icons for Holdout and Indirect Only toggles in the Outliner
  - New generic Cursor icon for cases that are not related to either Orientation or Pivot

Many other tweaks to existing icons, including:

  - Add & Remove Keyframe
  - Weight Paint & Collision Modifier
  - Tablet Pressure Sensitivity
  - Playback icons
2019-05-17 23:22:22 +02:00
572754f894 Fix T64775: crash loading Eevee files with DoF, after recent changes
Additional fix to ensure Cycles versioning is done after Eevee.
2019-05-17 22:56:29 +02:00
728d99f446 Fix T64775: crash loading Eevee files with DoF, after recent changes
Version after lib linking due to following ID pointers.
2019-05-17 22:51:08 +02:00
3022dd2b27 Images: changes to avoid losing new images that have not been saved
The basic idea is that such new images will be packed into the .blend file
when saving all modified images from the quit dialog. To make this workflow
nicer a number of changes were made to how this type of packed image is
handled.

* "Save Modified Images" now packs generated images into the .blend file.
* "Save As" for packed images now automatically unpacks the image, so that
  it's easy to save automatically packed images. "Save Copy" keeps it packed.
* "Save" for packed images now re-saves the image into the .blend file, so
  that it's effectively the equivalent of "Save" for non-packed images.
* Empty image filepaths are no longer remapped when saving the .blend file.
  Previously it would become e.g. "//../../" which makes no sense for generated
  images with no filepath yet.
* Hide unpack button and filepath for such packed images with no filepath.
  Unpacking does not work in a predictable way without a filepath, better
  to just "Save As".
2019-05-17 20:03:26 +02:00
60a4342557 Cleanup: Eevee: Use dummy texture for GTAO when not enabled 2019-05-17 19:25:01 +02:00
be5fd9c09f Fix T64300: Missing update of original data-block on redo
Dependency graph was not yet set as active when is used by
operator which is being redone.
2019-05-17 19:00:36 +02:00
0920cb650d UI: Small tweaks to the save dialog:
- Add back info icon at the top.
  - Remove icons from the buttons. None of the OS's we support use icons here
  - Remove button align. It doesn't work well with the active default highlighting
  - Center-align the text inside the buttons

To make this look even nicer, we should add more padding all around the edges, but that could be done separately.
2019-05-17 18:58:35 +02:00
Dalai Felinto
e3ea703b09 Outliner: Make restriction icons inactive based on hierarchy value
If the parent of a collection has a setting disabled, the children should have
that setting inactive.

In some cases a column may affect another one. For example, disabling a
collection to render should make holdout and and indirect only inactive.

In View Layer it works for both objects and collections.
For Scenes mode, it works only for collections.

Differential Revision: https://developer.blender.org/D4888
2019-05-17 13:49:45 -03:00
848967c21d Fix meshes.new_from_object() not preserving materials 2019-05-17 18:26:00 +02:00
0c4ce8e55e Eevee / Workbench: Fix hair normals
Hair normals were not behaving correctly. This corrects their looks and
fix the node shader geometry that was showing the flat normal.
2019-05-17 18:17:23 +02:00
ec3940ab0a Cleanup: Eevee: Use DRW_PASS_CREATE macro when possible 2019-05-17 18:17:23 +02:00
97d22e12b5 Cleanup: DRW: Remove uneeded DRWState values
This removes:
- DRW_STATE_TRANS_FEEDBACK
- DRW_STATE_WIRE
- DRW_STATE_POINT
2019-05-17 18:17:23 +02:00
02319549c3 Fix T64759: Pick select selects an incorrect face in edit mode.
Bug introduced in T64759.
2019-05-17 13:02:57 -03:00
2a31e0c812 Images: make it harder to accidentally undo image texture painting changes
Editing properties like generated X/Y size clears any changes to the image,
and it's not obvious that this is destructive. Now if the image has been
painted on or baked to, buttons to Save or Discard changes will appear and
editing the properties will be disabled until doing one of these.
2019-05-17 17:59:26 +02:00
e8238e1123 Images: make image save operator available outside image editor
This includes some refactoring of image operator poll functions.
2019-05-17 17:59:26 +02:00
b38853e89f Cleanup: remove unused image code 2019-05-17 17:59:26 +02:00
d12244cea0 Cleanup: move Image flags into DNA, for consistency with other types 2019-05-17 17:59:26 +02:00
bc3139d792 Cycles/Eevee: unify depth of field settings for cameras
There is now a checkbox to enable/disable depth of field per camera. For Eevee
this replace the scene level setting. For Cycles there is now only an F-Stop
value, no longer a Radius.

Existing files are converted based on Cycles or Eevee being set in the scene.

Differential Revision: https://developer.blender.org/D4882
2019-05-17 17:59:26 +02:00
043299ab69 UI: Use correct icon for saving in the close dialog. 2019-05-17 17:55:14 +02:00
5ce3f69da4 UI: File Close Dialog
This adds a new dialog that is shown whenever a file is closed.
So, either when a new file is opened, or when Blender quits.
The dialog allows to save unsaved changes. Furthermore it also
allows saving images that have been modified in Blender, but are
not saved yet.

Known limitations:
* Images that have no file path and have not been packed before,
  are not saved.
* On MacOS the old dialog is shown when Blender quits.

Reviewers: brecht, billreynish

Differential Revision: https://developer.blender.org/D4860
2019-05-17 17:43:36 +02:00
56cdb0cf15 Fix Blender menu not collapsing when Show Menus is disabled. 2019-05-17 16:34:11 +02:00
fa9ab7b5a9 Fix T64595: Mask does not update correctly when changing frames
Is caused by change which made all IDs to have parameters.

Solved by using more explicit relations.
2019-05-17 15:48:01 +02:00
cd78a08a19 Fix compilation error in release mode
Caused by recent fix.
For some reason compiled fine in debug mode, but not in release.
2019-05-17 15:35:57 +02:00
Dalai Felinto
0255cf8126 Set selection column restrict hidden by default
This was discussed in the past, the idea is to get the outliner even more compact.
Also to let users to use the viewport selection restriction further.

It would be nice to haven indication that an invisible column is set, but this is
no particular to the selection column.
2019-05-17 10:16:25 -03:00
fccb42c41f Fix T63981: Factory default memory cache limit is 4096 MB (32bit builds)
very straightforward: initialize default to the same hard limit as the
RNA properties.

Annoying part is that it's not trivial to make RNA to use same BLI functions,
so leaving that behind for now.
2019-05-17 15:02:12 +02:00
34d67601b7 Python: Raise an error even NO_MAIN data is assigned to object
The goal is to prevent assignment of temporary or evaluated meshes
to objects from the main database.

Majority of the change is actually related on passing reports around.

On a positive side there are more error prints which can become more
visible to scripters.

There are still possible further improvements in the related areas.
For example, disable user counting for evaluated ID datablocks when
assignment happens. But can also happen later on as a separate
improvement.

Reviewers: brecht, campbellbarton, mont29

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4884
2019-05-17 14:27:13 +02:00
8b5816e76b Theme: Use blue for Outliner selection highlight. 2019-05-17 13:54:14 +02:00
7778a6d17c UI: Use 'Blender' as label for app menu.
The Blender icon can be confusing with some window decorations.
2019-05-17 13:53:20 +02:00
2bb788d4cd Cleanup: Eevee: Remove custom volumetric matrix
This was the same as using the inverse obmat.
2019-05-17 13:38:42 +02:00
52669dda80 Eevee: Remove the Volumetric Render checkbox
This is to simplify the usage of Volumetrics.

Now it automatically detect if there is any Volumetric material in the
view and allocate the needed buffer if any.
2019-05-17 13:38:42 +02:00
b526221315 Eevee: Remove the Subsurface Render checkbox
This is to simplify the usage of SSS.

Now it automatically detect if there is any SSS material in the view and
allocate the needed buffer if any.
2019-05-17 13:38:42 +02:00
b23af112d2 DRW: Fix warning on MSVC 2019-05-17 13:38:42 +02:00
89673f0974 DRW: Make fullscreen vertex shader position and uv without attributes 2019-05-17 13:38:42 +02:00
26beaa2d90 Cleanup: Eevee: Use SET_FLAG_FROM_TEST 2019-05-17 13:38:42 +02:00
4856474b16 UI: Sequencer sidebar tweaks for the viewer
- Move the Channels setting to the View panel
  - Remove double separators in the View panel
  - Close the Scene panel by default - it only applies in rare cases
  - Move the Frame Overlay from the header to a sidebar panel
    Previously it used a strange ghost icon, and it make the other controls jump around
    Now uses clearer naming
2019-05-17 13:38:34 +02:00
cf433caa89 UI: Put Sequencer Proxy & Cache panels back into separate category
This works better, because some things are global for the scene and others are per strip
2019-05-17 13:27:21 +02:00
77f92b8cb7 Update for Depsgraph API changes
Reviewers: sergey

Differential Revision: https://developer.blender.org/D4881
2019-05-17 12:38:05 +02:00
39a29d843e Fix: Add back last Sequencer panel that went missing in 86eefefdc1 2019-05-17 12:01:45 +02:00
9c83061b8d Fix: Sequencer Cache panel was accidentally removed in 86eefefdc1
Also fixed one last panel missing a category
2019-05-17 11:31:49 +02:00
dfbbc5067e Fix T64733: Error baking action
scene.update() needs to be replaced with view_layer.update() after
rBe693918d4074

note: will go over other occurances of scene.update() in a different
commit
2019-05-17 10:45:30 +02:00
6864d0b6f1 API Docs: fix mistake in example code 2019-05-17 10:43:31 +02:00
f50cef95ef Report an error when trying to remove non-in-main datablock
After recent dependency graph API changes it became easy to violate
ownership design (since its changed) and request removal of out-of-main
temporary mesh. This confuses Blender and can cause crashes/locks.

Fixes T64731: Blender freezes after assigning result of object.to_mesh()
2019-05-17 10:38:16 +02:00
32b5f24c2a API Docs: add example use cases for mesh functions, fix wrong description 2019-05-17 10:34:20 +02:00
5186cfbea4 Depsgraph: State behavior details more explicitly 2019-05-17 10:24:45 +02:00
e02f68c577 Fix T64713: Link to Collection Textfield does not become active
automatically
2019-05-17 10:01:19 +02:00
d7628d4b7f Mesh Select: use select context instead of static structs
This patch does not bring any functional change, but it does expose
some utilities that can be very useful to correct occlusion and
performance problems of Circle Select and similar.
Creating a selection context still makes it easier to track issues.
2019-05-17 15:02:19 +10:00
1f22a20d5f Fix face mask edge select drawing
All edges were drawing black.
2019-05-17 14:11:22 +10:00
42cd07c28c 3D View: Support texture paint mask clipping 2019-05-17 14:04:59 +10:00
7baddbf818 UI: add tool panel for node editor, use tabs
This follows the 3D view, adding an "Options" tab.
2019-05-17 12:48:51 +10:00
2a9214eaaf makesdna: Fix build error on win32.
Win32 has some special struct alignment rules that makesdna
is not warning about. See

https://developer.blender.org/T63164#652815

for details.
2019-05-16 18:03:20 -06:00
387c1f2e0d Tests: add more descriptive messages when idiff is not available
Based on patch contributed by Diana Picus in D4355.
2019-05-16 20:25:09 +02:00
c83f13d451 Preference: don't autosave preferences when running with --factory-startup
This case is likely intended to be temporary, for manual or automated tests.
2019-05-16 20:15:55 +02:00
d726d7e462 Theme: Update Blender Light to match viewport and default theme. 2019-05-16 20:01:41 +02:00
4c4ac1158b Images: more tweaks to save all modified images
Support showing warning messages before saving for cases that we can detect
in advance, to be used by quit dialog.
2019-05-16 19:58:52 +02:00
0c2add7ca3 Theme: Match new Outliner color settings with viewport. 2019-05-16 19:53:55 +02:00
3324753f15 Theme: stick bones too bright and vertex select too dark. 2019-05-16 19:53:55 +02:00
3076544c8c Fix T64725: light power property dragging uses too small increments 2019-05-16 19:17:32 +02:00
a7542b9e2b BLI_memarena: unpoison memory before freeing it 2019-05-16 18:19:14 +02:00
4878b29b49 Use edit evaluated mesh when creating mesh for object in edit mode
Makes the result of object.to_mesh() and bpy.meshes.new_from_object()
to be the same as what is visible in the viewport.

This makes Cycles to respect modifiers enabled in edit mode, and should
also easy some scripter's work. The final render still needs some work,
which, maybe, will be about forcing objects out of editing modes.
2019-05-16 18:11:47 +02:00
9f6670ca37 Cycles/Eeeve: unify film transparent setting
For existing files, it will use the setting from Cycles or Eevee depending on
the render engine in the scene.

Differential Revision: https://developer.blender.org/D4874
2019-05-16 17:40:13 +02:00
2ee762344f Cycles: Fix missing viewport updates after recent changes
We can not access ensured-to-be-evaluated dependency graph from the
render API: some of it is running from within evaluation which makes
it possible for engines to access list of evaluated IDs.

Solved by passing dependency graph to viewport functions, similar to
the final render functions.
2019-05-16 17:24:16 +02:00
aac95aa1e9 Images: move save modified images operator from Python to C
We will use this for saving images along with the .blend file.

Ref D4861
2019-05-16 16:57:38 +02:00
c1ec6f00f2 UI: Move Recover operators into own menu under File. 2019-05-16 16:56:03 +02:00
8d2c42c9bc UI: Blender and Help menu tweaks and organization.
Blender menu:
- Move Preferences to the top as it is used often.
- Introduce two new sub-menus
  - About - links from Help menu, plus link to license section in blender.org
  - Support Blender - dev fund, store, they used to be in Help menu.

Help menu:
- Add links to Tutorials and Support section in blender.org
- Add link to Developer Documentation (wiki)
- Always show Python API Reference link
2019-05-16 16:56:03 +02:00
32d5d127cb Tweak API to support adding evaluated meshes to main database
One of the usecases is to create mesh from an object is a manner similar to
how Apply Modifiers does it, and have it in the bmain so it can be referenced
by other objects.

This usecase is something what went unnoticed in the previous API changes, so
here is a followup.

Summary of changes:

* bpy.meshes.new_from_object() behaves almost the same as before this change.
  The difference now is that it now ensures all referenced data-blocks are
	original (for example, materials referenced by the mesh).

* object.to_mesh() now creates free-standing Mesh data-block which is outside
  of any bmain. The object owns it, which guarantees the memory never leaks.

  It is possible to force free memory by calling object.to_mesh_clear().

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4875
2019-05-16 16:42:16 +02:00
22a91bb0bd Cleanup: pep8 & remove odd empty string addition 2019-05-17 00:28:22 +10:00
d93a47b7bb EEVEE: Viewport Rendering TAA
EEVEE assumed that the OGL renderer did FSAA, as the FSAA was removed we
needed to revalidate this assumption. The temporal sampling only inited
the matrices during init phase. As now we need to update the matrices
for every sample rendered the code for updating the matrices was
isolated in a new function `EEVEE_temporal_sampling_update_matrices`.

Reviewed By: fclem

Maniphest Tasks: T64646

Differential Revision: https://developer.blender.org/D4871
2019-05-16 16:02:56 +02:00
3b51260387 Revert "Tests: speed up render tests by running multiple in the same process"
This makes finding the crashing tests harder, reverting until there is a
better solution.

This reverts commit 93901e7f0a.
2019-05-16 15:50:47 +02:00
bd0f26e2de Fix T64576: Duplicate option in the header
D4856 by @Gvgeo
2019-05-16 23:21:20 +10:00
9c1ec1d132 Fix: Some Sequencer panels were missing a category, causing warnings 2019-05-16 15:02:15 +02:00
deeb263463 Fix T64652: tool settings is gone from top-bar 2019-05-16 22:57:50 +10:00
db4a3f93cb Fix unintended fall-through in switch statement 2019-05-16 14:56:17 +02:00
8d8f731470 Depsgraph: Make depsgraph.update() safe for threading
This is same as view_layer.update() is doing.
2019-05-16 14:53:38 +02:00
cfac269d25 UI: tweak display of active, selected and edited items in the outliner
* Change circle to roundbox around active icons, so they don't overflow.
* Change text color to indicate selected and active state.

Differential Revision: https://developer.blender.org/D4650
2019-05-16 14:38:51 +02:00
960496f8d1 UI: Tweak naming in Sequencer View menu to match 3D View 2019-05-16 14:38:44 +02:00
e60890075b Cleanup: rename IDP_FreeProperty_ex to IDP_FreePropertyContent_ex
This was missing from rBdb5120603f.
2019-05-16 14:17:50 +02:00
a08a3d8bf0 UI: Match Sequencer Safe Areas with similar Camera Properties panel 2019-05-16 14:14:13 +02:00
db5120603f Refactor: Simplify ID Property freeing
This also makes `IDP_CopyProperty` the "opposite"
of `IDP_FreeProperty`, which is what I'd expect.

Two refactoring steps:
* rename IDP_FreeProperty to IDP_FreePropertyContent
* new IDP_FreeProperty function that actually frees the property

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4872
2019-05-16 14:11:11 +02:00
c0d743238d GPencil: New filter in Onion by keyframe type
This new filter allows to select only some type of keyframe (keyframe, breakdown, etc).

This was a request of artists that are used to work with other 2D softwares.

Also some cleanup to remove aninmatable option to some properties.
2019-05-16 14:01:48 +02:00
86eefefdc1 UI: Video Sequencer sidebar overhaul
- Use single column layout
  - Move the rather obscure Backdrop toggle into the View menu
  - Use correct units for Crop and Offset (pixels)
  - Re-organize the sidebar in 2 main groups: Adjust & Info

Adjust includes Compositing, Offset, Crop, Video, Color, Sound
Info includes strip name, path, start/end and other data

Original changes by tintwotin, with changes and adjustments on top by me
2019-05-16 13:58:04 +02:00
f4755ef695 Fix edit-mesh select crash when using face-dots
The GPUVertBuf was freed but not the GPUBatch.

Old bug exposed by new code from 8a6414ed46.
2019-05-16 21:45:24 +10:00
4cd191aa29 EEVEE: Intel Shader Compiler Bug
When using Intel GPU EEVEE did not display anything. This was due to an
internal shader compilation bug inside the intel drivers. We had fixed
this for other vertex shaders. The same change we have to apply to other
vert shaders that want to limit the need of Matrix multiplications.
2019-05-16 13:35:02 +02:00
b019d8b2fe Fix edit-mesh face-dot drawing check
Since 8a6414ed46 the old logic no longer applies.
2019-05-16 21:17:10 +10:00
469f2ec17a Cleanup: unused vars 2019-05-16 21:17:10 +10:00
a9b393c367 Fix T64678: wrong DDS normal map rendering after recent changes 2019-05-16 12:52:04 +02:00
f30921fc68 Fix T64687: Loop select work only with edges
Regression in recent commit 8a6414ed46
2019-05-16 20:29:05 +10:00
fced0f0437 Cycles: Don't advertise BVH8 being supported on 32bit platforms
The kernel does not use AVX2 vectorization, and trying to use BVH8 was
leading to an empty scenes.

Fixes T64624: Ctest : Win32 + AVX2 fails virtually all cycles tests
2019-05-16 11:51:25 +02:00
e693918d40 Dependency graph API changes
Main goal here is to make it obvious and predictable about
what is going on.

Summary of changes.

- Access to dependency graph is now only possible to a fully evaluated
  graph. This is now done via context.evaluated_depsgraph_get().

  The call will ensure both relations and datablocks are updated.

  This way we don't allow access to some known bad state of the graph,
  and also making explicit that getting update dependency graph is not
  cheap.

- Access to evaluated ID is now possible via id.evaluated_get().

  It was already possible to get evaluated ID via dependency graph,
  but that was a bit confusing why access to original is done via ID
  and to evaluated via depsgraph.

  If datablock is not covered by dependency graph it will be returned
  as-is.

- Similarly, request for original from an ID which is not evaluated
  will return ID as-is.

- Removed scene.update().

  This is very expensive to update all the view layers.

- Added depsgraph.update().

  Now when temporary changes to objects are to be done, this is to
  happen on original object and then dependency graph is to be
  updated.

- Changed object.to_mesh() to behave the following way:

   * When is used for original object modifiers are ignored.

     For meshes this acts similar to mesh-copy, not very useful but
     allows to keep code paths similar (i.e. for exporter which has
     Apply Modifiers option it's only matter choosing between original
     and evaluated object, the to_mesh() part can stay the same).

     For curves this gives a mesh which is constructed from displist
     without taking own modifiers and modifiers of bevel/taper objects
     into account.

     For metaballs this gives empty mesh.
     Polygonization of metaball is not possible from a single object.

   * When is used for evaluated object modifiers are always applied.

     In fact, no evaluation is happening, the mesh is either copied
     as-is, or constructed from current state of curve cache.

  Arguments to apply modifiers and calculate original coordinates (ORCO,
  aka undeformed coordinates) are removed. The ORCO is to be calculated
  as part of dependency graph evaluation.

File used to regression-test (a packed Python script into .blend):

{F7033464}

Patch to make addons tests to pass:

{F7033466}

NOTE: I've included changes to FBX exporter, and those are addressing
report T63689.

NOTE: All the enabled-by-default addons are to be ported still, but
first want to have agreement on this part of changes.

NOTE: Also need to work on documentation for Python API, but, again,
better be done after having agreement on this work.

Reviewers: brecht, campbellbarton, mont29

Differential Revision: https://developer.blender.org/D4834
2019-05-16 11:49:21 +02:00
b679887bd5 Depsgraph: Add queries whether ID is original/evaluated 2019-05-16 11:49:21 +02:00
f51521148f UI: use HIDE_HEADER for active tool in properties editor
Unfortunately this isn't yet compatible with category tabs,
define a duplicate panel only for the properties editor.
2019-05-16 19:46:07 +10:00
59b7f3a164 Fix T64660: no access to node connectors when a node is inside a layout frame.
Note that the same issue actually showed without a frame node, when
trying to click-drag on a socket on its 'inside node' part, you would get
same behavior.

Only solution I can see here is to prevent Node selection to go on when
user clicks on one of its sockets, there is no way afaik to make
drag-from-socket to start if we keep select-node operator running
modal, since both operators (NODE_OT_select and NODE_OT_link) use the
same shortcut, if select (which is checked first, being a Tool) returns
modal, then event is considered handled it seems, even though
Passthrough is also returned...
2019-05-16 11:13:09 +02:00
b05038fef7 RNA: new FCurve.is_empty property that exposes the new empty curve check. 2019-05-16 12:02:26 +03:00
c419f33dd2 GHOST: add header to display manager
Was relying on the header recently removed from GHOST_Rect.h,
for some reason only some systems give issues here.
2019-05-16 18:27:30 +10:00
da37b8c245 Minor change to last commit
Don't show a background for the toolbar.
2019-05-16 18:20:45 +10:00
0e667723d4 UI: Draw background for headerless panels with region-overlap
These were drawing without a backdrop.
2019-05-16 18:07:38 +10:00
6519982876 Fix T64681: evaluate curves with generative modifiers and no keys.
Introduce a new function and use it everywhere, including
automatic curve deletion checks to guarantee consistency.
2019-05-16 09:48:46 +03:00
e097845a6f Cleanup: redundant headers mixed in with code 2019-05-16 14:54:23 +10:00
62ac2fddf7 Fix T64642: Reset to default preferences glitch 2019-05-16 14:43:51 +10:00
74ddf3bd0d Cleanup: use doxy sections for object_add.c 2019-05-16 14:13:51 +10:00
4ba7d4ca9d Cleanup: remove unused identifiers 2019-05-16 13:54:32 +10:00
2896ce7bc7 Fix using non-euler cursor orientation
Missed in 06fe2a5e0c
2019-05-16 13:50:00 +10:00
c9c23a3e44 RNA: add 3D cursor matrix attribute
Avoids having to check rotation modes to get the orientation.
2019-05-16 13:50:00 +10:00
f2144cf298 Fix T64651, T64658: image texture not set to non-color properly
The version check was wrong, only working for older files.
2019-05-16 05:19:35 +02:00
4a766732e6 Fix unreported: Presselection cycle not working in multiple meshes editing. 2019-05-15 23:19:59 -03:00
68c12c80e5 Theme: add color difference for every other row
D4862 by @CandleComet with minor edits.
2019-05-16 12:05:17 +10:00
2384564149 Cleanup: remove 2.4x panel tabs
This makes the code confusing since we now have two other kinds of tabs
(navigation bar and panel categories).
2019-05-16 11:12:41 +10:00
870fc29068 Cleanup: panel layout logic
Workspace was being assigned in a loop, make some vars const.
2019-05-16 10:48:17 +10:00
02a7e57d9c Cleanup: sort DNA renaming defines 2019-05-16 09:47:00 +10:00
e8ed78c884 ClangFormat: remove FAKE_SELECT_MODE_BEGIN from ForEachMacros
This isn't used for looping.
2019-05-16 09:40:15 +10:00
8a6414ed46 Fix T54686: objects don't occlude each other for edit-mesh select 2019-05-16 09:36:15 +10:00
989d854385 Theme: Match edit mode in viewport and uv/image editor.
Also make the grid brighter as it can conflict with mesh wires in wireframe mode.
2019-05-15 23:16:16 +02:00
3b58bf3c7e Theme: Blender Light update
* Align category icons and color use with Default theme.
* Set colors for new properties and regions.
* Fix several issues.

Needs further testing to tackle all editors but this puts it at much more
usable level compared to how it was.
2019-05-15 23:08:31 +02:00
40a69b2ad7 Animation: treat F-Curves with no keys as if muted/not existing.
When normally editing curves, deleting the last keyframe also
deletes the curve. Thus if for some reason it didn't happen,
e.g. maybe due to removing keys directly via Python, skip the
bad curve instead of resetting the channel to zero.
2019-05-15 22:35:15 +03:00
198c00f4ed Armature Constraint: don't calculate the unneeded ct->matrix for solve.
This constraint requires full bone data to evaluate, so it can't
use the generic single target matrix system. Calculating it is
thus useless waste of CPU time.
2019-05-15 22:35:14 +03:00
f9784ea6af Py NodeShader wrapper helper: add support for new Alpha setting of Principled BSDF.
Now that we have real alpha in BSDF, it's much better option for
transparency, than previously used Transmission value.

Related to T64609.
2019-05-15 20:59:58 +02:00
9baf669493 Fix T64649: Deprecated Annotation editing causes a crash
The Edit option was removed from annotations and the buttons must not be in the panel.
2019-05-15 20:26:26 +02:00
fe8f0758c6 GPencil: Invert Fade Object slider
The Fade Objects and Fade Layers parameters had opposite meaning and this was not correct.

Now, both parameters work in the same direction.
2019-05-15 19:31:03 +02:00
1185031cfb Theme: don't use red as hue for shading icons.
It can be confused with an error or something wrong in the UI.
2019-05-15 19:12:27 +02:00
2b8fba0c26 Theme: Darker grid. 2019-05-15 19:12:27 +02:00
5827a47280 Theme: match outliner/properties colors with modes in viewport.
Helps to:
* Make a connection between what we see in Outliner, Viewport and Properties editor
  (clicking on the obdata icon takes us to Edit mode, which shares colors).
* Quickly tell which mode we are in.
* Armatures have now distinct color when in Object, Edit, and Pose modes.

Missing is Pose mode which is currently cyan in the viewport and obdata category in properties,
it would probably need its own special category though as it doesn't match the others.
2019-05-15 19:12:27 +02:00
06fe2a5e0c Objects: new 3D cursor alignment option when adding objects
The choices are now World, View and 3D Cursor.

This breaks Python API compatibility, add-ons that add objects with this
parameter will need to be updated.

Differential Revision: https://developer.blender.org/D4706
2019-05-15 18:10:58 +02:00
ddae9c9232 Fix T64634: Incorrect type casting in versioning code 2019-05-15 17:39:07 +02:00
9c5bec0292 space_file: fix build error with msvc.
Both windows.h and wm_types.h define HKEY, moving wm_types after windows.h
sidesteps the issue, since HKEY isn't used in fsmenu.c it doesn't cause
problems.
2019-05-15 09:13:07 -06:00
39403c1e71 Fix missing separator before Save System Info with Developer Extras on 2019-05-15 16:42:31 +02:00
6dceafbde3 Fix T63748: Long startups after network drives are disconnected.
We need to make those paths validation async, since some infamous OS is
unable to provide a quick way to check whether a path is valid or not...

Not much to say here, this is basic wmJob stuff really... We don’t even
need complex threaded coordination locks or atomics, given how simple
the changes are here.

Fake-tested with some `sleep()` calls to add atificial delay, seems to
work as expected.
2019-05-15 16:26:47 +02:00
e39737f166 UI: make sidebars in 3D view and other editors a little wider and consistent 2019-05-15 16:17:23 +02:00
4124aeee5c Lights: reduce default strength of sun light to 1.0 2019-05-15 16:09:50 +02:00
Tim Stullich
5ba1a6bee0 Lights: change sun light size to be specified as angle
This is the angular diameter as seen from earth, which is between 0.526° and
0.545° in reality. Sharing the size with other light types did not make much
sense and meant the unit was unclear.

Differential Revision: https://developer.blender.org/D4819
2019-05-15 16:07:50 +02:00
2497ee31ec Fix T64650: missing topbar update when changing brush in sculpt mode 2019-05-15 15:22:17 +02:00
630b08c960 UI: remove splash from help menu
Already accessible in the app-menu.
2019-05-15 21:52:58 +10:00
64acb70e7f Remove ability to delete data from the File Browser
This removes the ability to hit X or Del to delete data from inside the File Browser.

This was extremely dangerous because it didn't use the system trash/recycle bin. This made it a very dangerous operation with no way to get data back.

Later on, we should add support for the OS trash through native API's, but until then we will remove this feature from the keymaps.

This addresses T61412 and T64104
2019-05-15 13:46:24 +02:00
Dalai Felinto
70d67de5e5 Fix icon for outliner temporarily hide 2019-05-15 08:18:15 -03:00
Dalai Felinto
5c8df0a742 Fix default open outliner restrict columns
Regression introduced on 777a546c0c.
2019-05-15 08:18:15 -03:00
4965af1b7a UI: add 'App' menu besides the 'File' menu
This uses the Blender icon that previously activated the splash.

Menu items which apply to the application are located here:
startup file, app templates & preferences.
2019-05-15 21:16:28 +10:00
0819013eb4 Eevee: Add per material option to cull backfaces
This is in order to have more flexibility and to have an explicit option
for final renders.
2019-05-15 12:03:49 +02:00
cf1a945e5a Preferences: Default ViewportAA
Due to recent changes the default aa samples in the viewport was set to
16, but should have been 8. This is due to how the old viewport quality
setting was interpreted by the workbench engine. This patch will respect
the same way to version the viewport quality to viewport_aa as the
workbench used to do this.
2019-05-15 11:51:20 +02:00
6f9819e5fd UI: move preferences save options into submenu
Avoid clutter in the UI by moving save/revert options into submenu,
only show the save button when auto-save is disabled.
2019-05-15 18:41:45 +10:00
c2568394dd Fix T57203: Rotation overlaps scale gizmo handles 2019-05-15 16:33:29 +10:00
a9d8474fda Gizmo: add depth bias for 3D selection
This allows some gizmos priority over others even when they're behind.
2019-05-15 16:29:16 +10:00
5005210f40 GPU: Add a matrix unproject function that takes an inverted matrix
This is normally already calculated so add a version that takes the
inverted matrix.
2019-05-15 14:16:35 +10:00
d09289ff7a Cleanup: de-duplicate active tool panel 2019-05-15 12:20:13 +10:00
6eacb626e0 Fix top-bar showing paint popover panels
Regression from 6b082278d1 when panels were moved into the 3D view.
2019-05-15 11:42:47 +10:00
2564f2c1b3 Fix T64604: Changing keymap doesn't tag preferences as dirty 2019-05-15 10:44:43 +10:00
72e484e88f Fix preference dirty tagging for addons & keymaps 2019-05-15 09:47:07 +10:00
Dalai Felinto
a63be6c6c7 Fix T64467: Outliner Rename drawing overlapping restriction column + checkbox
For anyone interesting on polishing pixels, this is still one of the few
places in Blender where when renaming the name "jumps" a tiny bit when
editing. Most of the other places (id rename, UI list rename, ...) have
the text drawing in the exact same place while editing it and drawing.
2019-05-14 20:07:22 -03:00
4e46ed37fc Fix T64618: Cycles crash with point density texture on Windows
A better solution would be to not use the callback mechanism anymore for
cases like this where the dependency graph will free volume data, but
that would be a bigger refactor.
2019-05-15 00:59:31 +02:00
c29ed65f03 UI: adjust preferences save/revert button layout
Also add description for factory preferences.
2019-05-15 08:57:44 +10:00
7f8f362e01 Tool System: avoid redundant refresh
Workspaces refreshes tools multiple times when used by multiple windows.

Also improve comments.
2019-05-15 08:48:20 +10:00
ded8f5cc19 Cleanup: use doxy sections for workspace
Also move function in wrong category.
2019-05-15 08:48:20 +10:00
Dalai Felinto
32c7da1e37 Outliner Tooltips Cleanup: Retrict/Allow > Restrict ; set/unset > set 2019-05-14 19:36:55 -03:00
Dalai Felinto
41858a7311 T64020: Outliner - implement Shift + Click for objects as well 2019-05-14 19:36:55 -03:00
b20cefdab3 Fix T64623: Freestyle procedural noise not consistent across platforms
Use the Blender RNG instead of rand() to solve it.
2019-05-14 23:45:14 +02:00
Dalai Felinto
f4902fa268 Code style cleanup: make format 2019-05-14 18:11:54 -03:00
Dalai Felinto
777a546c0c Outliner Restriction: Naming sanitization and icon
No major API change here, only in the outliner restriction column
variables (e.g., show_restrict_column_selectable > show_restrict_column_select).

* Get rid of _INSTANCE (introduced on b1af682001).
* Differentiate (everywhere but the API) between HIDE (temporary) and VIEWPORT (global).
* Use the expected icon for restrict viewport (same as objects and modifiers).
* selectable > select
2019-05-14 18:10:25 -03:00
Dalai Felinto
903041e1c0 Outliner restriction filter: Unify order
The popup menu was a different order than the drawing in the outliner.
2019-05-14 17:51:08 -03:00
Dalai Felinto
9b80318a28 T64607: Outliner UI Tooltips
In the outliner we don't have yet a clear distinction for the users of when
to use each of the visibility settings.

This changes that by properly naming the property and their tooltips.
I'm also unifying the naming between the rna properties and the outliner
for collections and objects (e.g., so collection and object hide_select
have the same tooltips everywhere).

The API did not change.
2019-05-14 17:51:08 -03:00
913db2e8a4 Fix T64611: Bone Size property is not copied when a bone is copied 2019-05-14 22:44:55 +02:00
08a79fc88b Depsgraph: dependency on B-Bone start handle end roll when inheriting it.
Specifically the dependency is on any drivers that may be affecting
the RNA property of the handle bone, which currently link to segments.
2019-05-14 22:26:49 +03:00
26d2652d6d Armature: implement universal hash table lookup of Bone objects by name.
Since drivers on Bone properties are really supposed to be stored
in Armature data and access bones via its bones[] collection, this
lookup path should work efficiently.

Mass lookup of bones by name was already done through hashes,
but they were built temporarily every time that was needed. This
simply replaces it with a common hash table computed immediately
after file load, copy, or Edit to Object mode switch.
2019-05-14 21:56:57 +03:00
987c6da6c0 Eevee: Fix volumetric shaders compilation error 2019-05-14 19:59:07 +02:00
2f6c4e5bb4 Fix T64455 Texture extension mode 'clip' defaults to 'extend' 2019-05-14 19:59:07 +02:00
eefd68013c Cleanup: isolate image dirty flag access in functions 2019-05-14 18:00:06 +02:00
0ab7e78b85 Fix T64514: wrong grease pencil icon preview renders
This broken when the new Cycles/Eevee preview scene was added, make it work
the same as before for Grease Pencil now.
2019-05-14 18:00:06 +02:00
70f3ff808a GPencil: Rename property Follow Drawing Path to Alignment
The old name was not clear and with new options the new name is more easy to understand.
2019-05-14 17:28:42 +02:00
0d2e708ea4 Fix T60984: Can't perform viewport navigation with left mouse button and active manipulator
This was fixed for active tool gizmos but not viewport gizmos.

Note that this applies only to the Industry Compatible keymap, which is where this issue manifested itself.
2019-05-14 17:24:16 +02:00
e9b282617a Fix T64551 Crash on leaving local view on the shading tab
Was causing by garbage collection free the surf_per_mat_tris array.
The cache validate did not take care of ensuring the array was alloc again.
2019-05-14 17:15:48 +02:00
8437519d02 Fix Shader compilation error on MacOS & some other platform/driver
texture2D() is no longer supported by modern opengl, use texture() instead.
2019-05-14 16:43:37 +02:00
3db428406f Fix T64601 Error division by zero in GPUVertexFormat
The windows compiler use signed int by default for enums so that broke
the bit count I carefully did. Forcing uint fixes it.
2019-05-14 16:31:09 +02:00
af088c2640 Fix T63994: Node Editor: Move All Selected Nodes when dragging.
Left-click select broke that behavior, since it puts both action and
select buttons on the same physical mouse button...

To support this behavior again, we have to split selection process in
two steps, hence make it modal... While I remain rather skeptical about
that global design decision, and complexity it adds to many UI/UX areas,
this solution ends up being OK-ish I think.

Thanks to @brecht for some final tweaks on the patch.
2019-05-14 15:56:17 +02:00
c66a7822ce Interface: Free argument callback for popups
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4858
2019-05-14 15:39:51 +02:00
ffb7993690 UI: Improve naming for Collections Enable/Disable
- Fix 'ddisable' typo
  - Use clearer names for the operators in the Collections context menu

Instead of Set Exclude / Clear Exclude, we now use Enable in View Layer / Disable from View Layer
2019-05-14 15:13:10 +02:00
f0c8afcd5c Fix T64567: Rename Viewport to Viewport Render 2019-05-14 15:08:14 +02:00
b63ffa8919 Fix Cycles build error after recent changes
We need to do aligned alloc of the services instead of globals now since the
concurrent map moved there.
2019-05-14 15:06:23 +02:00
0dd5281ab2 GPU: Windows+Intel Selection Fix
On Windows 10 with a post Februari 2019 Intel driver, the box selection
is not working. It only detects the object centers, but not the drawn
triangles of the basic engine.

Reviewed By: fclem

Maniphest Tasks: T62947

Differential Revision: https://developer.blender.org/D4857
2019-05-14 14:55:12 +02:00
687385b963 UI: Confirm dialog when closing an unsaved file
The complexity in this patch comes from the fact
that the current operator system does not support
multi-step user interactions well.

More specifically, for this to work, we need to show
a confirm dialog and a file browser afterwards.
We decided that it is easier to keep everything in
a single operator, instead of creating separate
operators that invoke each other.

So, now the `WM_OT_open_mainfile` operator invokes
itself in different states. It implements a simple
finite state machine to manage the states.

The dialog itself is expected to be improved in
a future commit. See D4829 for more details.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4829
2019-05-14 14:21:17 +02:00
37f87ae81b Fix zfighting from edit mode face overlays 2019-05-14 14:13:00 +02:00
9bb42de828 Fix T64574 : Weird shadow mesh glitches in viewport
This is not the most clean but this is what is needed to make
point_object_to_ndc equivalent to
point_object_to_world + point_world_to_ndc
2019-05-14 14:07:08 +02:00
8950aa2615 Fix T64574 : Weird shadow mesh glitches in viewport
This is not the most clean but this is what is needed to make
point_object_to_ndc equivalent to
point_object_to_world + point_world_to_ndc
2019-05-14 13:57:41 +02:00
bf45a46f81 GPU: Fixup and add assert to GPU_VERT_ATTR_NAMES_BUF_LEN 2019-05-14 13:54:05 +02:00
6bb7eb1706 Eevee: Fix Auto Tangent not working if active UV layer is greater than 3 2019-05-14 12:39:18 +02:00
6c76975df5 Fix T64592: Assign Shortcut does not autosave preferences 2019-05-14 12:29:38 +02:00
b4909632b0 Fix T63542: Imported FBX doesn't show keyframes in Shape Key editor.
While shapekeys RNA path handling does support keyblocks (ShapeKeys)
with an `id_data` wrongly set to the geometry instead of the shapkey,
this is really not something to promote. ideally it should be removed at
some point. At least, let's not generate such RNA pointer if we can
avoid it.

Here it was breaking proper showing of animated shapekeys in the UI,
since this expects animated datablocks to have their own animation data
(and 'rooting' keyblocks to their mesh instead of their shapekey ended
up defining their animation in the mesh, not in the shapekey).
2019-05-14 12:28:17 +02:00
b50cf33d91 Fix T64515, T60434: crash in OSL and preview render after recent changes
The refactoring of texture handles did not take into account that render
services are shared between multiple render session. Now the texture
to handle map is also shared between render sessions.
2019-05-14 12:24:15 +02:00
9fecac32d9 Screen: replace show footer operator with property
This matches 'show header' internal logic.
2019-05-14 20:21:27 +10:00
4887b771f9 Cleanup: sort struct declarations 2019-05-14 20:21:22 +10:00
6a4c5b67ec Cleanup: quiet warning 2019-05-14 20:21:22 +10:00
254b1a4294 Fix T64441: GPencil textures weird rotation
New option to disable the follow drawing path. Before it had only a switch property, now there is a list of options.

Modes:

Path: Follows drawing stroke and rotate with object.
Object: Only follows object rotation.
None: Don't rotate.
2019-05-14 11:59:19 +02:00
21bfc469ab Cleanup: rename ED_scrubbing.h to ED_time_scrub_ui.h
Also renames the corresponding .c file.
2019-05-14 11:49:15 +02:00
1c106e189a RNA: fix the id_data pointer of PoseBone.bone to point at the Armature.
The owning ID reference of RNA pointers is supposed to point at the
ID container that owns the object, but for PoseBone.bone it wasn't
updated to point at the Armature data ID instead of Armature Object.

This caused issues, like pose_bone.bone.driver_add() adding the
driver to the Armature Object animation data, which violates the
intended design of the animation data structures.

Since RNA code generally assumes that all pointers that don't
refer directly to an ID remain within the current ID, a custom
getter is required to fix this.
2019-05-14 12:39:36 +03:00
02e3bf22ab Depsgraph: detect bbone_segments drivers from Object animation data. 2019-05-14 12:39:36 +03:00
be967c0b3c Fix T64578: Cycles clamps HDR colors for 16bit integer image with colorspace 2019-05-14 11:22:07 +02:00
20421ef952 Cleanup: DRW: Move ModelMatrix declaration to common_view_lib 2019-05-14 10:57:04 +02:00
016fc7f0c2 GPUVertexFormat: Reduce size of structs
With this patch, the size of GPUVertFormat goes from 1240 to 388.
2019-05-14 10:57:04 +02:00
72a5e3f61a Cleanup: DRW: Add and use DRW_shgroup_uniform_vec2_copy 2019-05-14 10:57:04 +02:00
92b4e96afe Cleanup: DRW: Remove unused Uniform types 2019-05-14 10:57:04 +02:00
be5192bbb9 Cleanup: DRW: Remove uneeded _add suffix from DRW_shgroup_call_add 2019-05-14 10:57:03 +02:00
8bc8a62c57 DRW: Refactor: Use DRWCall to accumulate per instance attributes
This is a big change that cleanup a lot of confusing code.
- The instancing/batching data buffer distribution in draw_instance_data.c.
- The selection & drawing code in draw_manager_exec.c
- Prety much every non-meshes object drawing (object_mode.c).

Most of the changes are just renaming but there still a chance a typo might
have sneek through.

The Batching/Instancing Shading groups are replace by DRWCallBuffers. This
is cleaner and conceptually more in line with what a DRWShadingGroup should
be.

There is still some little confusion in draw_common.c where some function
takes shgroup as input and some don't.
2019-05-14 10:57:03 +02:00
20d9cd3a1f GPU: Add GPU_vertbuf_discard and GPU_BATCH_UNUSED
GPU_vertbuf_discard to clear buffer containers in place.
GPU_BATCH_UNUSED to tag batch that are cleared and not immediatly usable.
2019-05-14 10:57:03 +02:00
e5349f14eb BLI_memblock: Add more options
- Use int instead of uint for safety and less conversions.
- Add free callback
- Add cleared alloc option
2019-05-14 10:57:03 +02:00
0e5da91f0a Cleanup: Remove DRWCallType
This simplify the rendering logic.
2019-05-14 10:57:03 +02:00
ed3f05aca9 DRW: Fix threading hazard when rendering and using auto depth 2019-05-14 10:57:03 +02:00
e0420097e3 Cleanup: DRW: Remove unused functions 2019-05-14 10:57:03 +02:00
754ecd61aa DRW: Change Procedural function to use a GPUBatch
This is in order to have VAO handled by thoses batches instead of using a
common VAO. Even if the VAO has no importance in these case using a batch
will help when transitioning to Vulkan.
2019-05-14 10:57:03 +02:00
8406fabc87 Eevee: Replace DRW_shgroup_empty_tri_batch_create by procedural calls 2019-05-14 10:57:03 +02:00
201ebc78e8 Mesh Batch Cache: Fix use of uninitialized variable 2019-05-14 10:57:03 +02:00
b27492d078 DRW: Make Instance count not a pointer
Goal is still to simplify the draw manager.
2019-05-14 10:57:03 +02:00
cf8109d2aa Cleanup: Eevee: Make planar downsampling not use instance drawing 2019-05-14 10:57:03 +02:00
ad0e95688d Cleanup: DRW: Remove pointers to materials 2019-05-14 10:57:03 +02:00
2d28df783a GPU: Move Material index to nodetree evaluation
This removes the need to pass the Material* all over the place in the draw
manager. Cleanup comming right after.
2019-05-14 10:57:03 +02:00
642c8010b2 DRW: Remove ModelViewMatrix and ModelViewMatrixInverse 2019-05-14 10:57:03 +02:00
b13e0568d3 GPU: Remove ModelViewMatrix and ModelViewMatrixInverse usage 2019-05-14 10:57:03 +02:00
49a7031caa Fix T64588: some new theme preferences not saving 2019-05-14 10:42:53 +02:00
153c144053 Fix T64339: Crash with UV sculpt after undo 2019-05-14 17:05:02 +10:00
1f891bbc2c Keymap: add option for tilde key preference
Since the view menu is redundant for people with a numpad,
add a preference for it to switch between gizmos instead.
2019-05-14 15:19:50 +10:00
9c9081d9ef Preferences: file menu item to temporarily load factory settings
It's common to load factory settings as a test without wanting to
overwrite your own settings on exit.
2019-05-14 12:37:07 +10:00
34da7f8fdd Preferences: set dirty flag when dragging 2019-05-14 11:15:38 +10:00
8fe5a28635 Fix property update setting dirty flag 2019-05-14 11:12:02 +10:00
a5b5bd2c24 Fix missing preference dirty tagging
Tagging dirty was failing for UI scale, line width, hinting & others.

Checking for an update function means all update functions
need to tag preferences as dirty.

Since this check was added to prevent the active section marking the
preferences as dirty, only exclude this property.
2019-05-14 10:25:55 +10:00
36a33b8c82 UI: grey out 'Revert' when preferences aren't dirty 2019-05-14 10:25:55 +10:00
f070bdd7c9 Fix T63802: textured lights not working with OSL 2019-05-14 00:40:25 +02:00
2ff7494e6d Fix T64561: wrong colorspace for Cycles displacement nodes 2019-05-13 23:40:45 +02:00
1428435a9a Fix compiler warning with OpenGL icon textures 2019-05-13 23:30:23 +02:00
1de990651f Fix T64292: world missing from outliner Scenes view 2019-05-13 22:37:45 +02:00
cac0e604e7 Fix T64297: edit light energy not working for Eevee, when nodes exist
Simplify code now that Cycles also has energy outside nodes.
2019-05-13 22:32:50 +02:00
e2fdbf7599 Fix T64407: crash adding workspace after appending datablock
The files operator property should not be remembered for next
operator executions, gives unexpected effects when using the
operator again.
2019-05-13 22:20:49 +02:00
164fafdcb0 make.bat: add option for enabling the OpenGL based tests. 2019-05-13 14:08:27 -06:00
27d097e92d Python API: expose conversion between tweaked NLA strip and scene time.
This is necessary to correctly do low-level keyframe manipulation
in tweak mode, and the logic is complex enough that re-implementing
it in Python is impractical.
2019-05-13 22:09:42 +03:00
c6f975e3e5 Better support for (mirrored) bbone scaling in pose mode
since own rB5d9d32fd1fa3 (mirror bbone scaling in editmode)
- bbone scaling in posemode was missing immediate updates
- bbone scaling in posemode could crash

This now properly supports mirroring in posemode as well.
note: for bbone scaling, I made both X-Axis-Mirror options (editmode
option as well as posemode option) valid.

Fixes T64091

Reviewers: brecht

Maniphest Tasks: T64091

Differential Revision: https://developer.blender.org/D4851
2019-05-13 20:04:32 +02:00
0264d8390f Apply Pose as Rest Pose: implement an Only Selected bones option.
The most difficult part is handling parent-child relations correctly:
when a parent is applied, the children should be moved accordingly,
and when applying a child, it should not include transformation from
unapplied parents. All this requires walking bones as a tree, instead
of a flat list.

Limitation: Applying bones with non-uniform scaling without also applying
children will distort non-rest posing on said children for reasons related
to T54159 (basically, non-uniform scale plus rotation creates shear, and
Blender matrix decomposition utilities don't have tools to deal with it).

Reviewers: campbellbarton, brecht, mont29

Differential Revision: https://developer.blender.org/D3775
2019-05-13 19:17:53 +03:00
93cabce3a1 I18n Disambiguation: "Shift".
Give WM context to the shortcut, since this is more specific meaning
than usual 'shifting' one...

Part of T43295.
2019-05-13 17:58:25 +02:00
17e172b6c1 I18n Disambiguation: One more case of 'Root' falloff without 'Curve' context.
Part of T43295.
2019-05-13 17:58:25 +02:00
6ec096facf I18n Disambiguation: "Add" in menu labels.
This one is usually a verb/action one in menus' labels,
hence we give it the Operator default context.

Part of T43295.
2019-05-13 17:58:25 +02:00
9ed8f8a968 Fix T63325: Drivers freezing input value
Not sure why driver would be affecting on the behavior, the actual
issue was caused by lack of proper relations built for lamps and
cameras.
2019-05-13 17:55:28 +02:00
1c1e3de015 Fix T64387: Crash with driver copy/paste
Was missing copy-on-write tag since lamp itself has no geometry or
transform.

Now tagging for animation, and taking care of special case in the
dependency graph.
2019-05-13 16:46:07 +02:00
8f71a84496 Cycles/Eevee: add Emission and Alpha inputs to Principled BSDF
This makes it easier to set up materials with emission and transparency.
Importers/exporters and add-ons are recommended to now use these rather than
creating separate transparent BSDF and emission nodes.
2019-05-13 15:56:11 +02:00
21854575a4 Cycles/Eevee: unify light strength and color
Cycles lights now use strength and color properties of the light outside
of the shading nodes, just like Eevee. The shading nodes then act as a
multiplier on this, and become optional unless textures, fallof or other
effects are desired.

Backwards compatibility is not exact, as we can't be sure which renderer
the .blend was designed for or even if it was designed for a single one.

If the render engine in the active scene is set to Cycles, lights are
converted to ensure overall light strength remains the same, and removing
unnecessary shader node setups that only included a single emission node.

If the engine is set to Eevee, we increase strength to remove the automatic
100x multiplier that was there to match Cycles.

Differential Revision: https://developer.blender.org/D4588
2019-05-13 15:56:10 +02:00
7ad802cf3a Cycles/Eevee: unified and improved texture image color space handling
Cycles now uses the color space on the image datablock, and uses OpenColorIO
to convert to scene linear as needed. Byte images do not take extra memory,
they are compressed in scene linear + sRGB transfer function which in common
cases is a no-op.

Eevee and workbench were changed to work similar. Float images are stored as
scene linear. Byte images are compressed as scene linear + sRGB and stored in
a GL_SRGB8_ALPHA8 texture. From the GLSL shader side this means they are read
as scene linear, simplifying the code and taking advantage of hardware support.

Further, OpenGL image textures are now all stored with premultiplied alpha.
Eevee texture sampling looks a little different now because interpolation
happens premultiplied and in scene linear space.

Overlays and grease pencil work in sRGB space so those now have an extra
conversion to sRGB after reading from image textures. This is not particularly
elegant but as long as engines use different conventions, one or the other
needs to do conversion.

This change breaks compatibility for cases where multiple image texture nodes
were using the same image with different color space node settings. However it
gives more predictable behavior for baking and texture painting if save, load
and image editing operations have a single color space to handle.

Differential Revision: https://developer.blender.org/D4807
2019-05-13 15:56:10 +02:00
e9d2ec46c4 Tests: disable DoF in Eevee tests for now, it adds blurring with default values 2019-05-13 15:56:10 +02:00
3ad962d069 Depsgraph: Use for_render flag for curves from depsgraph
Fixes issue with Eevee always using viewport curve resolution.
2019-05-13 15:24:43 +02:00
b03b8c3576 Curve: Remove duplicated and confusing argument
Curve function had two arguments:

- for_render, which was originally supposed to be used to control
  whether viewport or render visibility for modifiers is to be
  used.

- use_render_resolution, which sounds like it is supposed to control
  whether viewport or render resolution for curves is to be used.

What is totally confusing is that those arguments were used
interchangeably: sometimes use_render_resolution would control
modifiers visibility.

This commit makes it so there is one single argument for this.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4850
2019-05-13 15:06:50 +02:00
f49feccaa3 Preferences: set dirty when editing quick favourites menu 2019-05-13 22:28:43 +10:00
86650b01d8 UI: Don't display markers in driver editor 2019-05-13 11:55:53 +02:00
44fc8aa221 Fix T64403: crash sampling coloring in texture paint mode 2019-05-13 11:50:21 +02:00
5cd6ffad09 Fix T64041: Vertex Sharp not working.
Broken in rB0ac3d5f7db67 last year...
2019-05-13 11:49:58 +02:00
b5ae049013 UI: rename Load Preferences to Revert 2019-05-13 19:48:42 +10:00
76bf9b766c Fix T64120: Dynamic Paint Doesn't Recalculate Normals with Smooth Shading.
For wome reason, tag to mark normals as needing recompute was commented
out instead of updated to new system, during conversion of DynaPaint
code for 2.8 new evaluation stack... Trivial fix.
2019-05-13 11:38:35 +02:00
9361fea99f RNA: disable undo on OperatorProperties and its subclasses.
Since these are temporary properties, changing them shouldn't cause
undo pushes. There already is a flag to disable that, but since each
operator inherits its own properties from the base, RNA define code
also had to be changed to allow inheriting the flag.
2019-05-13 12:36:54 +03:00
8cdf76fad9 Fix unintended autosaving of preferences in a few cases
* Dirty flag was not cleared on load
* Navigating tabs should not cause save
* Background mode should not autosave (for e.g. render farms and tests)
2019-05-13 10:57:05 +02:00
d2efdaa26c Python API: expose preferences.is_dirty 2019-05-13 10:57:00 +02:00
8cb1de83fc cleanup: typo in comment 2019-05-13 10:14:41 +02:00
422be98c47 Fix T64427: WITH_HEADLESS build option 2019-05-13 17:42:21 +10:00
e61531cb0e Fix T64461: Sub-panels allow pinning 2019-05-13 16:53:40 +10:00
deb5884744 UI: disable decorators for workspace buttons 2019-05-13 16:45:30 +10:00
741f29d499 Preferences: auto-save on exit
Save modified preferences on exit by default,
with the option to disable this.
2019-05-13 16:29:35 +10:00
3d923f3eaf Preferences: tag as dirty for add-ons & loading factory startup 2019-05-13 15:51:49 +10:00
49550d9dd7 UI: add load preferences operators to header
Recent changes only included them in the side-bar.
2019-05-13 13:49:40 +10:00
a279bbbee5 Preferences: support loading factory preferences
Previously it was only possible to load factory startup & preferences.
2019-05-13 13:25:51 +10:00
ac94c219ae Prefernces: support loading last saved preferences 2019-05-13 12:46:15 +10:00
d7eed63b6d readfile: support preferences without loading data-blocks
Needed to support reading preferences without replacing blend file data.
2019-05-13 12:36:14 +10:00
05f1451d72 Fix T64371
Variable stripe_offs used without been initialized

Reviewed by: brecht

Differential Revision: https://developer.blender.org/D4845
2019-05-12 15:25:30 -07:00
eff273c0bc Fix T64463: Visual Artifacts with ColorRamp
This patch fixes an issue with the ColorRamp overflowing its drawing bounds

Differential Revision: https://developer.blender.org/D4843

Reviewed by Brecht Van Lommel
2019-05-12 15:21:43 -07:00
6d89693222 Industry Compat keymap: Fix gizmos overriding view manipulation
Previously, if the cursor was over a gizmo, you could not manipulate the view using Alt-key view manipulation

This addresses T60984 for this keymap
2019-05-12 22:50:44 +02:00
e2b60f858e UI: Reinstate icons in the Physics Properties
These were removed at a time when there were no modifier icons.
2019-05-12 19:57:56 +02:00
8c5585221d Industry Compat keymap: Add support for Grease Pencil Draw mode
- Fix Alt-key navigation (was conflicting with Alt-click to set straight lines)
  - Use consistent shortcuts for brush strength and size
  - Use direct shortcuts for switching tools
2019-05-12 19:22:11 +02:00
643d4b79d5 Industry Compat keymap: Fix midpoint snapping with the Knife tool
There was an issue blocking the the Add Cut step while holding Ctrl
2019-05-12 18:19:38 +02:00
ebc44aae98 Python API: expose more keyframing flags for use in keyframe_insert.
Expose REPLACE and CYCLE_AWARE, and add AVAILABLE for completeness.
These flags are generic and safe to use, and necessary to match
the behavior of certain UI options.
2019-05-11 21:20:21 +03:00
83d35c25d0 UI: Nudge Curve Editor Away from Scrollbar
This patch increases left and right padding of the Curve Editor to avoid scrollbars

Reviewed by Brecht Van Lommel
2019-05-11 11:05:40 -07:00
0e09075e39 Fix T59627: missing COW update tags when joining armatures.
Objects that had constraints or drivers referring to the
joined armatures weren't tagged, and thus evaluated copies
ended up with old bad pointers.
2019-05-11 17:57:08 +03:00
Dalai Felinto
5f84e2d732 Revert API change (hide_viewport > hide_instance)
The change was introduced on b1af682001.

We may still change the name functionality of this anyways -  we are
not really changing only the instancing visibility here at the moment.

So there is no reason to break the API in the meantime.
And in the future we can simply add a new API entry, leaving the old one
to be slowly deprecated.
2019-05-11 11:32:51 -03:00
741e8cc118 Fix (unreported) annoying UI assert for expanded enums.
All buttons will get their own block's `func` by default, this cannot be
considered an error, do not assert in that case either.

Fixes bunch of very annoying asserts e.g. when using FBX exporter...
2019-05-11 15:45:47 +02:00
f28b4c304c DRW: Fix previous commit
PS: I hate my life
2019-05-11 13:16:57 +02:00
3cac530ba6 Fix T64464 App crashes when navigating between UV Editor and Viewport 2019-05-11 13:10:43 +02:00
afe73631a4 Preferences: disable save-on exit until there is a revert button 2019-05-11 21:03:28 +10:00
1ee77eb7f8 Fix error in recent is_dirty preferences flag
Error in b95b6b7966 caused crash changing themes.

Resolves T64444
2019-05-11 19:22:26 +10:00
46f5005c0d GPencil: Apply FBO changes to AA macros
Apply same change done to fix the task T64373
2019-05-11 08:35:03 +02:00
Dalai Felinto
b1af682001 Outliner Visibility Update
See T61578 for discussions and mockups.

Visibility Options
==================
We are adding more granular control over restriction columns in the outliner,
exposing "indirect only" and "holdout" as options, and change the way
users enable/disable collections in a viewlayer.

We also rename the object viewport restriction to hide instance.

So the options we have are:

Collection
----------
* Render Visibility
* Instance Visibility
* Selectable

(View) Layer Collection
-----------------------
* Enable
* Holdout
* Indirect Only
* Viewport

Shortcuts
=========
Isolate Collection
------------------
* Ctr + click isolates the collection.
It turns all its parents and children "visible", and all the other
collections "invisible".

If ALL the collections were already properly set, we re-set the
collections to their default value.

Set Collection Inside Collections and Objects
---------------------------------------------
* Shift + click: Set/unset inside collections and objects.

We only set objects values as well when we are in View Layer mode and
(obviously) when the objects have a matching property.

Icons
=====
Little reminder that we will need better icons for holdout, indirect only, and
probably instanced (nothing wrong with the current, but it differs from
the proposal when it is turned off).

Also, we need to decide where do we want the modifier/bones/... icons to
be (in which column) and ideally make sure their icons match the ones we
use for collections/objects.

At the moment those are using the screen icon, which is not being used
by collections.

Reviewers: brecht, billrey
Subscribers: pablovazquez
Differential Revision: https://developer.blender.org/D4823
2019-05-10 19:48:33 -03:00
de9d846353 Fix T64137 Empty Images flickering graphics when "Auto Depth" is enabled
Also fix T64373 Grid intensity increases in Ortographic when use Circle
Select in GPencil Edit mode
2019-05-11 00:21:35 +02:00
93901e7f0a Tests: speed up render tests by running multiple in the same process
Blender startup time and shader compilation is a big factor when running
hundreds of tests, so now all renders in the same ctest run in the same
process. If a test crashes, the remaining tests in the same category will
be marked as skipped.

Benchmarked on a quad core with ctest -j8.

cycles: 118.1s -> 94.3s
eevee: 66.2s -> 29.2s
workbench: 31.7s -> 8.6s
2019-05-11 00:12:05 +02:00
79b9596c66 Tests: fix eevee and workbench using Cycles in a few tests 2019-05-10 23:45:51 +02:00
30887fc387 Cycles: add function to clear resumable chunk 2019-05-10 23:45:51 +02:00
8096f36796 Audaspace: porting changes from upstream.
- Silence now has an optional sample rate parameter.
- Fix: wrong length reported by modulator and superpose.
- Minor formatting, include and documentation fixes.
2019-05-10 23:01:04 +02:00
243fbf1c4b Tests: Be more explicit about the required location of the tests folder. 2019-05-10 14:19:29 -06:00
414ed446da Cleanup: Use const qualifier for curve utilities 2019-05-10 17:35:09 +02:00
df42994652 Cleanup: Remove unused functions 2019-05-10 17:30:33 +02:00
93aecd2b81 Cleanup: Remove old deprecated DerivedMesh functions
Were ifdef-ed for a long time.
2019-05-10 17:30:33 +02:00
7bf1eca495 Fix T64338: make snap menu in 2.7x keymap use regular instead of pie menu
Differential Revision: https://developer.blender.org/D4835
2019-05-10 17:25:05 +02:00
Alessio Monti di Sopra
e7e14934f8 UI: allow to cancel editing of vector widgets with escape and RMB
Differential Revision: https://developer.blender.org/D4838
2019-05-10 17:21:46 +02:00
George Vogiatzis
1813b26bbc Fix T64434: error with save system info after recent changes
Differential Revision: https://developer.blender.org/D4839
2019-05-10 17:16:29 +02:00
7a3833ed23 Fix T64399 Crash when trying to enter edit mode on instanced objects 2019-05-10 16:51:19 +02:00
1456b41306 Fix T64420 Weight Paint colours not visible 2019-05-10 15:03:18 +02:00
c0b8d071a7 Fix T64284 Mirrored Instances have flipped normals/face orientation
It was a missing invert matrix update and also setting the OB_NEG_SCALE.

This defeats the purpose of not computing it in the draw manager but this
is more local and is have not a dramatic impact on performance.
2019-05-10 14:48:33 +02:00
259ebdd017 Fix failing tests when Cycles is enabled
The --env-system-scripts hack does not work with it, it can't find the cycles
Python module then when importing add-ons.
2019-05-10 13:29:43 +02:00
632e0725d2 Overlays: Use common_view_lib.glsl
This removes ModelViewProjectionMatrix usage
2019-05-10 12:25:16 +02:00
6006f86e07 Workbench: Use common_view_lib.glsl
This removes ModelViewProjectionMatrix usage
2019-05-10 12:25:12 +02:00
7f87e6e18f GPencil: Use common_view_lib.glsl 2019-05-10 12:14:41 +02:00
0d8ab0eac6 DRW: Remove ModelViewMatrix Usage 2019-05-10 12:14:41 +02:00
a298dde5d7 Eevee: Update matrices operations to not use combined matrices 2019-05-10 12:14:41 +02:00
fdddea676d Cleanup: DRW: Renaming of glsl utility macros 2019-05-10 12:14:41 +02:00
196dbc0f31 Add ability to create a keyboard shortcut for more mode settings.
This adds the ability to assign shortcuts to boolean settings and enums
via the right click menu.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4808
2019-05-10 11:55:52 +02:00
4d6919bdda Cleanup: split setup_app_data into two functions
Allows for skipping either preferences or data-blocks.
Previously setup_app_data was used for both.
2019-05-10 18:46:13 +10:00
688e3fed4c Preferences: write preferences on exit
This avoids the issue where user added shortcuts or quick favourites
are lost on exit.
2019-05-10 18:29:58 +10:00
b95b6b7966 Preferences: add is_dirty member
Tag preferences as dirty when changed (prepare for adding auto-save).
2019-05-10 18:27:02 +10:00
b607d16292 Cleanup: move preference saving logic into blendfile.c 2019-05-10 18:27:02 +10:00
44ecea1ccb Fix T64304: Objects in appended scene from 2.79 file disappear after saving.
Versionning code generating collections from old 2.79 scene layers was
setting new collections' library from scene, but it also needs to
properly set the `LIB_TAG_INDIRECT` tag, otherwise localizing code does
not know what to do, and most of append process fails.
2019-05-10 10:09:23 +02:00
6b082278d1 UI: expose tool settings in the 3D view side-bar
Internally tool settings have been moved to the 3D view.
Added the ability for to draw panels from another space/region
so they can be mirrored in the properties editor.
2019-05-10 13:48:25 +10:00
a287153ee4 Cleanup: use more explicit check for buttons context 2019-05-10 12:51:04 +10:00
427c75e4c2 Cleanup: avoid some floating point divisions in drawing code 2019-05-09 19:55:10 +02:00
Harley Acheson
42b462ddd7 UI: improve timeline playhead scrubber drawing
Minimum width, always centered on the vertical frame line, antialiased.

Differential Revision: https://developer.blender.org/D4830
2019-05-09 19:55:10 +02:00
Harley Acheson
98b67d30ff Fix T64076: color ramp overlaps scrollbar
Differential Revision: https://developer.blender.org/D4831
2019-05-09 19:55:10 +02:00
60ca2fe338 UI: dim icons in inactive tabs, similar to text
This makes the properties editor navigation bar less saturated. Internally
the icon theme coloring was refactored a bit to move more towards the button
drawing code.
2019-05-09 19:55:10 +02:00
6148ed8cf9 Cleanup: reduce number of UI_icon_draw variations 2019-05-09 19:55:10 +02:00
5f7eebda23 Themes: add setting to draw border around icons, use for Blender Light
Monochrome colored icons don't work well on a dark background, so now we can
add a border around them. Note that most icons in the interface will remain
without a border, just the outliner and properties editor navigation have
colored icons and those will get a border. Other icons continue to be drawn
in the text colored without a border.

Differential Revision: https://developer.blender.org/D4787
2019-05-09 19:55:10 +02:00
9b924d73da Themes: add scene icon color category, for consistency in properties tab bar
The icons here still need to be dimmed when the tab is inactive.
2019-05-09 19:55:10 +02:00
930ae8e3c4 GPencil: Lock rotation of textures
By default the texture is locked and only the box is aligned when Follow Drawing Path is enabled.

Before, when the Follow was disabled, the texture was always aligned to top and it was not affected by object rotation. Now, the texture always is rotated with object rotation.
2019-05-09 19:53:25 +02:00
6ef48b1318 DrawManager/GreasePencil: Select Correct ViewLayer
The DrawManager assumed that the first render layer was the render layer
where GP needed to render on. In viewport this is always the case as we
only have a single view layer. When rendering this can be multiple when
multiple layers are rendered and composited in the compositor.

In stead of the assumption that the first render layer is the render
layer we need to draw on, we search for the render layer with the same
name as the viewlayer.

Reviewed By: fclem, brecht, antoniov

Maniphest Tasks: T63099

Differential Revision: https://developer.blender.org/D4818
2019-05-09 15:13:11 +02:00
0764cfe3de Workbench: Viewport AA Preferences
In recent changes the viewport_quality setting was not working what
users expected. This change will separate the anti-aliasing method that
is being used.

We now have three settings:

* scene.display.render_aa: Will be used during `Render Image`.
* scene.display.viewport_aa: Will be used during `Viewport Render Image`.
* userpref.viewport_aa: Will be used in the 3d view.

The viewport_quality setting has been replaced by the viewport_aa
setting as it was the only thing in currently controlled.

Reviewed By: brecht

Maniphest Tasks: T64132

Differential Revision: https://developer.blender.org/D4828
2019-05-09 14:45:45 +02:00
54ec0559c8 Fix T64384 : Crash when switching to wireframe on tree_creature blend
Was missing NULL pointer check
2019-05-09 14:37:01 +02:00
39f78413fc Tests: add tests/report.html that links to all HTML test reports
Currently this is for Cycles, Eevee and workbench tests.
2019-05-09 14:09:55 +02:00
3f37787c80 UI: rename Look Dev 'Ball' to 'Sphere'
D4813 by @Gvgeo
2019-05-09 21:37:20 +10:00
8342a124c4 DepsGraph: Multi ViewLayer Selection
When using multiple viewlayers and switching between them the selection
gets buggy. The reason for this is that the select_id is updated based
on the index in the viewlayer. This makes the select_id not unique as
objects might be shared or not shared at all.

This fix will update the select_id on all objects in main. This will be triggered in all the selection operators.

Reviewed By: sergey, brecht

Maniphest Tasks: T55617

Differential Revision: https://developer.blender.org/D4824
2019-05-09 13:27:23 +02:00
f877022956 Fix T64363 Eevee: Texture coordinates node turns material color to pink
Sorry for that :(
2019-05-09 12:46:29 +02:00
209c01a6ba Fix T64329 Crash when switching to Texture Paint 2019-05-09 12:22:12 +02:00
d2520511d2 3D Grid: Use View UBO & small cleanup 2019-05-09 12:22:12 +02:00
7c9e649015 I18n disambiguation: Drag (physics force vs. mouse action).
Part of T43295.
2019-05-09 11:38:54 +02:00
b2a8019f16 I18n disambiguation: setting particles' parent/children appart.
Looks like in some languages common generic parent/child relationship
does notn apply well to those.

Part of T43295.
2019-05-09 11:38:54 +02:00
1b753acd89 I18n disambiguation: Translation (of UI vs. moving something).
Part of T43295.
2019-05-09 11:38:54 +02:00
895c41ec5d Fix Crash with armature using custom shapes 2019-05-09 11:35:52 +02:00
5ab57f7ba4 Move out pose edit options into the pose data
Move pose edit mode booleans out of the armature data into the pose data

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4832
2019-05-09 11:21:34 +02:00
Lucas Veber
ffb3226d27 Fix T64308: bake animation not working after recent bendy bone changes
Differential Revision: https://developer.blender.org/D4820
2019-05-09 11:18:16 +02:00
c74e9273a9 Fix T64366 DRW: Crash opening Mr Elephant scene since recent commit 2019-05-09 11:16:54 +02:00
a951aa5f62 Fix T64296 Z-axis overlay vanishes at scene origin in 3D Viewport
Grid shader was still using deprecated eye vector.
2019-05-09 10:59:25 +02:00
dea8fb2bea Fix: Nav_bar context menu in preferences
Also merge the keymaps for header/footer/navbar.

D4736 by @Gvgeo with edits
2019-05-09 18:40:42 +10:00
f09aead64a UI: minor improvements to font menu
D4814 by @RedMser with edits
2019-05-09 17:19:54 +10:00
630e94791f Keymap: automate using OSKey for Ctrl on macos
Replace hard coded use of oskey with a function.

Add checks to avoid conflicting bindings with the OS.
2019-05-09 16:18:50 +10:00
6e33729462 Fix crash displaying UV's 2019-05-09 14:46:44 +10:00
be7031bee3 Fix bpy.utils.script_paths ignoring user_pref arg 2019-05-09 13:23:05 +10:00
33f495bd52 Cleanup: unused bpyml module
Was for declarative style UI definitions,
but never ended up being used.
2019-05-09 13:15:21 +10:00
7465a5db3b Cleanup: unused args/vars/imports in modules 2019-05-09 13:11:36 +10:00
fc37238b17 Cleanup: unused args/vars/imports in bl_operators 2019-05-09 12:42:05 +10:00
bc39fa947a Cleanup: redundant function call 2019-05-09 12:42:05 +10:00
8af8b1862f Cleanup: use __doc__ instead of bl_description
In keeping with other Python operators,
also assign object a variable.
2019-05-09 12:42:05 +10:00
8f1951f555 UI Particles: Move message about parting inside Parting panel.
Grayout parting settings if using virtual parents, and minor layout
adjustment: align min and max sliders together.
2019-05-09 01:54:07 +02:00
60aede44ba Cleanup: DRW: Remove DRW_pass_free 2019-05-09 01:08:17 +02:00
e2d04229c3 DRW: Remove support for NormalMatrix 2019-05-09 00:27:11 +02:00
1a99b6fc7e Fix T64158 Eevee: Mixed SSS shader becomes brighter and brighter
This change the logic a bit, when 2 bsdfs using SSS are mixed, we use the
one with the biggest radius (on a per pixel basis).

This change from previous behavior which was to select input 1 if radius
was greater than 0.
2019-05-09 00:10:29 +02:00
558017d6a6 Fix T64334: T-key error-message in Dopesheet source list
The Dopesheet doesn't have a toolbar, yet the source list region still had a keymap entry for it
2019-05-08 23:34:10 +02:00
c995eb1f9f Cleanup: GPUShader: Remove unused edge fancy shader 2019-05-08 23:28:07 +02:00
9489fea07b GPU: Refactor some shader for a bit more efficiency
Remove matrices multiplication and use more correct codestyle for variables
2019-05-08 23:28:07 +02:00
7ec7888ff3 Eevee: Fix Tangent vectors using NormalMatrix and make them world space
Making them world space by default remove a lot of legacy conversion from
viewspace.
2019-05-08 23:28:06 +02:00
c9537ee5c3 Overlay: Remove use of NormalMatrix 2019-05-08 23:28:06 +02:00
8204675689 UI messages: Rename 'Light' to 'Lite' for compression method.
While not exactly optimal, that's the only disambiguation solution I
found doable for translations (i18n). ID names tend to sneak
everywhere, including in places where we have no access to i18n context
currently (like menu labels e.g.).

Other alternative would have been to use 'Lightweight', but that is a
tad too long, we love short UI messages as much as possible.

The genius who decided that it was critical to rename ID lamp to light
in 2.8 is welcome to find a better solution...

Part of T43295.
2019-05-08 22:30:25 +02:00
1ac0254cfa I18n: Disambiguation for 'Cycles' used also by some anim modifier.
Part of T43295.
2019-05-08 22:30:25 +02:00
733811330c Workbench: Use common_view_lib and remove NormalMatrix usage
This is in order to lower the number of matrices to compute.
2019-05-08 22:08:20 +02:00
a8a11d3537 Mesh Batch Cache: Fix crash when comming from eevee to wireframe mode
And add check in debug build.
2019-05-08 22:01:34 +02:00
f2f62b184c DRW: Remove WorldNormalMatrix 2019-05-08 20:13:32 +02:00
bb41626ab3 Eevee: Remove uneeded normalization 2019-05-08 20:13:32 +02:00
7e380fd46a GPU: Remove GPU_INVERSE_NORMAL_MATRIX
The end goal for this is to lower the number of needed matrices.

This also cleanup some uneeded transformation.
2019-05-08 20:13:32 +02:00
24aeb479be Overlay Mode: Use common_view_lib
This is in order to centralize all matrices transformations.
2019-05-08 20:13:32 +02:00
c358da6b21 Defaults: change default settings in a few editors
* Timeline has summary collapsed to show only one row of keyframes.
* Cavity default is screen space curvature (faster).
* Scripting workspace text editor uses syntax highlight and line numbers.
* Marker lines enabled by default in all animation editors.
* Movie clip editor pivot point default to median.

Ref T63986.
2019-05-08 18:19:26 +02:00
275218b205 Theme: tweak source list background color for animation editors.
Helps to avoid blending with the timeline out-of-range area, match region
background and scrubbing area as well.
2019-05-08 18:10:07 +02:00
3d759e2b09 Cleanup: DRW/GPU: Remove eye vector uniform 2019-05-08 17:52:49 +02:00
901026c493 Cleanup: Remove BKE_MESH_BATCH_DIRTY_MAYBE_ALL 2019-05-08 17:52:49 +02:00
55173b1583 Cleanup: draw_common: Use switch instead of ifs 2019-05-08 17:52:49 +02:00
aec717cd61 Cleanup: Mesh Batch Cache: Remove unused BKE_MESH_BATCH_DIRTY_SCULPT_COORDS 2019-05-08 17:52:49 +02:00
cca941f614 Cleanup: GPUShader: Use switch instead of ifs 2019-05-08 17:52:48 +02:00
e053f6b1d8 DRW: Copy matrix in case of ModelMatrixInverse being used
ob->imat is garanteed to be valid by the depsgraph.
2019-05-08 17:52:48 +02:00
8c5c02932f Wireframe: Refactor vertex shader to use less matrices
This means less matrices needs to be prepared by the CPU.
2019-05-08 17:52:48 +02:00
8d3e2ffa07 DRW: Speedup: Only do batch cache request and validation once for duplis 2019-05-08 17:52:48 +02:00
bb4b6cddcb Mesh Batch Cache: Speedup: Only alloc gpu_attrs if needed and don't clear
No need to clear since GPU_material_vertex_attrs is overriding
2019-05-08 17:52:48 +02:00
7bfe70f2ba Mesh Batch Cache: Speedup: Use flags to early remove unecessary checks 2019-05-08 17:52:48 +02:00
0030e4da70 DRW: Make batch validation run first during iteration
This reduces the cost of querying the batches to the batch cache.
2019-05-08 17:52:48 +02:00
05b0f52aa7 DRW: Move all batch request functions to own header
This is in order to using BLI_INLINE for thoses functions and keep headers
cleany separated.
2019-05-08 17:52:48 +02:00
0b88cd5032 DRW: Change function orders to improve CPU cache efficiency
These changes seems to impact cache efficiency as it uses shgroup just
after creating a DRWCall before shgroup.
2019-05-08 17:52:48 +02:00
6df7946f73 Object Overlay: Add dupli fast path 2019-05-08 17:52:48 +02:00
9bfdc4826a Wireframe: Create dupli fast path using DRW_duplidata_get 2019-05-08 17:52:48 +02:00
b6b3a57c22 DRW: Add DRW_duplidata_get to create fast path for duplis
This is in order to create less shading group when using duplis.

Data for dupli objects keep in draw manager state until the source object
changes so retrieval is fast.

Note that this system could be extended to all meshes.
2019-05-08 17:52:48 +02:00
1ae2385106 GPUViewport: Fix possible hash colision with enabled engines
Also fix engine data validation that was not previously not working.
2019-05-08 17:49:28 +02:00
ac2e23c739 DRW: Remove uneeded calls to drw_viewport_engine_data_ensure when iterating
This remove a bit of overhead specially in scene with lots of objects.
2019-05-08 17:49:28 +02:00
820a64b9e5 DRW: Replace BLI_mempool by BLI_memblock
This remove a avoid the big overhead present in BLI_mempool when it is
cleared.
2019-05-08 17:49:28 +02:00
9fea65a93d DRW: Speedup: Don't call GPU_shader_uniform_vector if not needed
This seems to remove a bit of overhead of going into the function even if
the uniform is not needed.
2019-05-08 17:49:28 +02:00
45caba3733 BLI_memblock: New memory allocator
This is really close to BLI_mempool but uses an array to keep track of the
chunks of memory. There is no tagging necessary to clear the whole
structure so reuse is fast.

Naturally supports iteration but does not support freeing.
2019-05-08 17:49:27 +02:00
f273141556 Fix T64302: objects disappearing when disabling overlays
Only happened for Cycles, after recent changes.

Differential Revision: https://developer.blender.org/D4826
2019-05-08 16:55:43 +02:00
5aaa00ed55 Revert "UI: Dynamic region size for file browser options"
This breaks the user interface of exporters, so revert for now until there
is a solution for this.

This reverts commit ee0d8426ab.
2019-05-08 16:55:43 +02:00
58bfe93db6 Spline IK: fix a scaling hiccup as bones roll off the end of the curve. 2019-05-08 17:17:15 +03:00
44d4fdec7e Fix T64266: Incorrect modifier object target after making duplicates real for instanced collections.
Not sure why newid was set in evaluated object instead of orig one,
makes no sense to me, since we want to operate remapping of ID pointers
on orig data? Looks like that was something overseen when that code was
ported to new COW system.
2019-05-08 15:54:39 +02:00
3b9813fe50 UI: Move scrollbars to the right in animation editors
The text, that was in the scrollbars, stays on the left.

Reviewers: brecht, billreynish

Differential Revision: https://developer.blender.org/D4821
2019-05-08 15:16:05 +02:00
adea6146f6 UI: Make File Browser bookmarks panels unparented again
Also open Recents again by default
2019-05-08 15:07:07 +02:00
503ced78f3 Keymap: Make Clip Editor Graph view consistent with regular Graph Editor
Still missing a context menu here for now though
2019-05-08 14:54:05 +02:00
4a98e33785 Fix heap buffer overflow in tabs to spaces
Need to count string terminator.
2019-05-08 14:37:05 +02:00
c79fc710b3 Keymap: Special keymap for clip editor scrubbing area
Reviewers: sergey

Differential Revision: https://developer.blender.org/D4825
2019-05-08 14:10:09 +02:00
6950faa24e Normals Menu: fix Average to be able to specify type.
Also removed some rogue debugging printfs from normal selection code.
2019-05-08 07:44:15 -04:00
ebf924e0b7 Keymap: Drag in empty area to box select in animation editors
This is a patch for the default keymap in Blender.
It relates to the Dopesheet, Timeline, Graph Editor, NLA and Sequencer
Currently, in these editors, dragging outside of your selections does nothing.

This patch makes it so dragging outside the selection does a box select operation.
It is consistent with how the Node Editor works, as well as the 3D View, if you use the gizmo overlays.

Differential Revision: https://developer.blender.org/D4799

Reviewers: campbellbarton
2019-05-08 13:11:04 +02:00
0d43d0bcab CMake: Add support of Ninja's pools to ease building on limited amount of RAM.
Many modern computers support a lot of threads (parrallel building
jobs), but are somewhat restricted in memory, when some building jobs
can require several GB each.

Ninja builder has pools, which extend the usual `-j X` make
parallelizing option, by allowing to specify different numbers of
parallel jobs for different targets.

This commit defines three pools, one for linking, one for usual compile,
and one for compiling some 'heavy' cpp libs, when a single file can
require GB of RAM in full debug builds.

Simply enabling WITH_NINJA_POOL_JOBS will try to set default sensible
values for those three pools based on your machine specifications, you
can then tweak further the values of NINJA_MAX_NUM_PARALLEL_ settings,
if you like.

On my system (8 cores, 16GB RAM), it allows to build a full debug with
all ASAN options build with roughly 7GB of RAM used at most, pretty much
as quickly as without that option (which would require up to 11GB of
available RAM at some points).

Review task: D4780.
2019-05-08 11:54:17 +02:00
27b9a0cd67 Copy Scale: support raising the copied scale to an arbitrary power.
Since scale is multiplicative, the appropriate way to partially copy
it is to use power. However, the influence slider of constraints uses
linear interpolation. Thus, there is no way to correctly split scale
via constraints without adding this feature.

In addition, this allows inverting scale by using negative powers,
fulfilling the function of Copy Rotation's Invert checkboxes.
2019-05-08 12:17:00 +03:00
08012ebeec Disable Constraint and Keep Transform
A 'Disable and Keep Transform' button for constraints was added. This
allows animators to disable a constraint without moving the constrained
object/bone, making it easier to toggle constriants on and off without
any visual consequence. Typical usage would be a character picking up an
object (enable 'Copy Transform' constraint) and placing it somewhere
else (disable the constraint).

Note that there could still be movement when there are muliple
constraints active. For example, when using this constraint stack

- #1: Copy Transform from Empty.001
- #2: Copy Rotation from Empty.002

and disabling constraint #2, constraint #1 is still active and will
still modify the visual transform of the object. According to our
in-house animators, this is expected behaviour.

Reviewers: campbellbarton, dfelinto, sergey

Reviewed By: campbellbarton

Subscribers: brecht

Tags: #animation

Differential Revision: https://developer.blender.org/D4677
2019-05-08 10:57:17 +02:00
951396a9bd Fix T64274: Crash with more than 1 subdivision with the Multiresolution Modifier
Update more relevant fields in the sculpt session. Really becoming annoying, but
was also annoying in the old code as well.
2019-05-08 10:42:21 +02:00
8287f31876 Fix T64298: Overlapping scrubbing area in clip editors dopesheet 2019-05-08 10:29:17 +02:00
01555d29fa UI: Remove Filters toggle in the Clip Editor Graph view
This was trying to emulate the 2.79 Graph Editor.

The toggle took up more room that the filter toggle it revealed, and it made the header buttons jump around

Better to just have the filter toggles showing immediately.
2019-05-08 09:10:29 +02:00
370345573e Cleanup: tabs to spaces for generated theme
Update along with generation utility.
2019-05-08 17:06:35 +10:00
700c69ad08 Fix T64283: Gizmo doesn't update after click-extrude 2019-05-08 15:14:23 +10:00
f8def6db50 Cleanup: unused var, doxy syntax for math_matrix.c 2019-05-08 09:33:06 +10:00
3dc9da3a74 Fix: default keymap entry for Sequencer context menu
Own mistake in previous commit
2019-05-07 21:17:11 +02:00
d4ea2df603 UI: Add copy/paste icons to Sequencer context menu 2019-05-07 21:12:22 +02:00
bea5d9db84 UI: Add initial context menu to Sequencer
Add to both Blender and Industry Compat keymap
2019-05-07 21:07:52 +02:00
9b4a57f74c UI: Add copy/paste icons to Graph and Dopesheet editor context menus
Consistent with others
2019-05-07 20:52:41 +02:00
0c0254018c UI: Add initial context menu to NLA
Adding to both default and Industry Compat keymap
2019-05-07 20:49:53 +02:00
37eb109014 Spline IK: support using both original scaling and volume preservation.
Add a new option that makes the Spline IK solver apply volume
preservation on top of the original scaling, considering the
pre-IK scale of the bone as the goal volume to be preserved.

This basically works similar to the Stretch To constraint, and
allows easily rigging a stretchy chain that uniformly follows
its parent's scaling.

Since the Stretch To behavior is more familiar, the new option
is on by default for newly created Spline IK constraints.
2019-05-07 19:54:36 +03:00
b1a7711718 UI: Remove redundant titles in animation filter popover
It's clear what these do without and takes up much less space
2019-05-07 18:09:15 +02:00
50889ba6ef Implement Push/Relax from rest pose.
Perviously it was only possible to interpolate from the breakdown poses.
Now you can Push/Relax in regard to the rest pose as well.

For this only one keyframe is needed while the old modes needs two.
2019-05-07 17:37:05 +02:00
f08ee1fc40 Tests: add Cycles image texture colorspace tests 2019-05-07 17:26:27 +02:00
109ef278cc Fix deadlock in recent Cycles colorspace changes
This code is not used yet so didn't affect anyone.
2019-05-07 17:26:27 +02:00
0d29a4fa7a Fix compilation error 2019-05-07 17:23:50 +02:00
a488a21f4f Fix T64257: Scrubbing in the Clip Editor Graph Editor doesn't work
While intent of such action is not very clear, there is no real
reason to forbid it.
2019-05-07 17:08:06 +02:00
9c41ff4d46 Industry Compat keymap: Support for dragging markers in marker region
Now that there is a dedicated scrubbing area, the markers area can be used again for manipulating markers on drag.
2019-05-07 16:16:45 +02:00
2eb217b155 Keymap: Use right-click for context menus in the animation editors
- This only applies to left click select. Right click select and the legacy keymap are unaffected
  - You can still set the playhead from anywhere, using Shift-RMB, just like how you set the cursor in the 3D View
2019-05-07 16:12:17 +02:00
c04e4b1974 UI: Rename "Scrubbing Region" to "Scrubbing/Markers Region".
Share theme setting since they serve similar purposes by sitting on top/bottom
of the animation/vse editors.

Reviewers: billreynish
2019-05-07 16:00:10 +02:00
76c6f38ae4 UI: Use scrubbing theme setting for markers background.
The hard-coded transparency of just 16 made it hard to see the markers
when the background was busy with keyframes (or strips in VSE).

The rename of the setting is in the following commit.

Reviewers: billreynish
2019-05-07 15:59:57 +02:00
cbcc2c22d9 Fix Bevel T64107 - width/depth value wrong for vertex only.
Code fix from George Vogiatzis (Gvgeo), via D4811.
Needed to initalize vert_axis.
2019-05-07 09:28:34 -04:00
f2b7582b27 UI: Animation editor scrubbing area
The main reason for this change is to allow setting the
active frame with the left mouse button, while still being
able to select e.g. keyframes with the same mouse button.

The solution is to introduce a new scrubbing region with
a specialized keymap. There are a couple of related todos,
that will be handled in separate commits.
Those are listed in D4654.

This solves T63193.

Differential Revision: https://developer.blender.org/D4654

Reviewers: brecht, billreynish
2019-05-07 15:09:14 +02:00
e4669199bf Normals menu for face strength improved.
Now cascading menus in Mesh > Normals set and select face
strength with explicit choices of Weak / Medium / Strong.
2019-05-07 08:45:01 -04:00
c041e10c9a Depsgraph: provide more granularity to PoseBone property links.
Most properties aren't altered by the evaluation of the bone,
and can be read immediately from its input operation. B-Bone
properties can be evaluated at the last possible moment.

This provides more freedom in using drivers to connect bone
properties: for example, it is now possible to read raw local
transform values via drivers from a bone that depends on the
reader bone via constraints.
2019-05-07 15:00:38 +03:00
5968826562 Industry Compat Keymap: Allow panning and zooming while using the Knife tool
Previously you could only orbit.

Apparently the order of the keys in the modal keymap makes a big difference.

Thanks to users Znio.G and Oskar on Devtalk who provided this solution.
2019-05-07 13:52:31 +02:00
090545158a Fix T64223: missing volume panel for Eevee world 2019-05-07 11:57:55 +02:00
2b9965122e Sound: Revert all the recent changes to sound
This happened to be a bigger rabbit hole to hell than it originally seemed,
and there are higher priority design tasks to be handled (at this point high
priority design task is more important than high priority bug fix).

After talking to Brecht the decision was made to revert to the known isolated
issue, which will allow everyone in the studio work same as prior to last
Friday.

The remaining bits will be worked on after all the design tasks are out of
the way.

This commit reverts:

4cdb4b9532 Fix T64161: Crashing using undo and multiple windows
064273a4ae Sound: Port more cases to be a part of dependency graph
2e582f8ab5 Sound: Fix access wrong dependency graph
5fc49d9c91 Sound: add stubs to build without audaspace
c68c81a870 Sound: Make sure spin lock is initialized for new sound datablocks
c02534469a Sound: Delay creating sound scene handle for until is needed
9f681bea68 Fix T64144: Crash when displaying audio waveforms in VSE
2f79286453 Cleanup: unused vars
bed8ad6f95 Fix crash in background rendering after recent sound changes
773691310f Fix T64143: Crash when scrubbing in the graph editor
888852055c Sound: Fix for being unable to jump to a frame during playback with A/V sync
6ab7b38464 Sound: More fixes for access of original scene
35db119545 Sound: Fix access original scene during playback
211c4fd2e9 Depsgraph: Make comment about evaluation more obvious
c5fe16e121 Sound: Make sound handles only be in evaluated datablocks
b4e1e0946b Depsgraph: Preserve sound and audio pointers through copy-on-write
4eedf784b0 Depsgraph: Store original sequencer strip pointer
6990ef151c Sound: Move evaluation to dependency graph
d02da8de23 Sound: Delay opening handlers for until really needed
3369b82891 Depsgraph: Add scene audio component
e8f10d6475 Depsgraph: Tag sequencer for update on changes
6e4b7a6e4d Depsgraph: Initial work to cover sequencer
17447ac5a6 Depsgraph: Make sound ID part of the graph
2019-05-07 11:50:38 +02:00
90a9ff4408 Viewport: add better reflection checking matcaps
Contributed by Manny Hise.

Differential Revision: https://developer.blender.org/D4816
2019-05-07 11:39:42 +02:00
c6168ace64 Industry Compat keymap: Use Alt-Double-Click to select edge rings
You can also add Shift or Ctrl to add or subtract to selections

Based on user requests
2019-05-07 11:32:05 +02:00
d8e435a73a Fix T64210: crash using Live Unwrap without UVMap
Reviewers: brecht

Maniphest Tasks: T64210

Differential Revision: https://developer.blender.org/D4817
2019-05-07 11:23:17 +02:00
7ebe5b76dc Cleanup: Make comment more readable and avoid wrapping 2019-05-07 11:12:41 +02:00
fd90334751 Cleanup: Simplify access to read-only render settings
Will allow to avoid confusion about original/evaluated scene used
to access those in the nearest future.
2019-05-07 11:12:41 +02:00
7e5193e335 Cleanup: Use more const pointers in render pipeline 2019-05-07 11:12:41 +02:00
1a57c94c09 Cleanup: Make Render finalization function more generic
Allows to extend that code more easily.
2019-05-07 11:12:41 +02:00
1bb740f95c Cleanup: Remove remaining parts of frameserver 2019-05-07 11:12:40 +02:00
1bcec52991 Cleanup: More clear naming for rendering functions 2019-05-07 11:12:40 +02:00
036e95bb21 Fix T57767: Pivot point broken after scaling to 0 in a dimension
matrix inversion was changed in rB01c75c3765eb from own code to EIGEN
for performance reasons. EIGEN would return a zero matrix on failure
(resulting in the pivot always being at the object origin).
This brings back the "old" matrix inversion code (which has the benifit
of providing a partial solution which makes the local transform center
appear correct)

Reviewers: campbellbarton

Maniphest Tasks: T57767

Differential Revision: https://developer.blender.org/D4804
2019-05-07 10:47:19 +02:00
3f788eacee RNA: provide access to the vertex index array of the Hook modifier.
This allows creating hooks completely without the use of operators.
Also fix subtarget to actually recompute the inverse matrix.

In order to follow the vertex_indices_set function naming convention,
it is necessary to fix makesrna to avoid a naming conflict between
the function wrapper and the property accessor by adding a tag.

Differential Revision: https://developer.blender.org/D4798
2019-05-07 10:55:34 +03:00
86e14463d2 Fix T64232: crash on Weight from Bones redo 2019-05-07 09:49:51 +02:00
5ba6dbfb18 Fix graph editor selection tolerance ignoring DPI 2019-05-07 17:33:04 +10:00
4d78f5a4a7 DrawManager: External Engines + Overlays
Do not iterate over degsgraph when overlays are turned off and
rendering via an external engine. External engines sync data
from Blender differently. The external engine
draws the depth buffer, but that is only needed for overlays.

Reviewers: fclem, brecht

Differential Revision: https://developer.blender.org/D4791
2019-05-07 09:26:44 +02:00
3482aebf8d Theme: set dark grey for line number background
This color is also used for the right margin,
so use a color that contrasts with the background.

Also use 2x width line.
2019-05-07 17:18:18 +10:00
73e7c9d589 Fix T64230: Crash on weight paint gradient redo 2019-05-07 15:14:30 +10:00
0e2bafccf7 Cleanup: improve transform data sorting function
Replace comments on caller with more meaningful name.
2019-05-07 13:08:18 +10:00
fb26b6ac86 Fix T64130: Bezier curve vanishes on transform 2019-05-07 12:59:47 +10:00
fe5491898b Clanup: clang-format 2019-05-07 12:34:32 +10:00
bfef3bce1a Keymap: double click to close cut
Restore from 2.7x (lost when migrating to migrating keymap to Python).
2019-05-07 10:16:45 +10:00
619b9e9d81 Cleanup: typo, tweak proportional edit check 2019-05-07 10:06:00 +10:00
ddb71e8c20 DRW: Remove is_negative_m4 per draw call
This had some cost in perf and is not needed most of the time. If the
drawcall really needs it, it should use a correct ob pointer.
2019-05-06 22:33:05 +02:00
ff90589966 Cleanup: Eevee/Workbench: Remove non-needed matrix inversion
Theses are garanteed by the depsgraph now.
2019-05-06 22:33:05 +02:00
55bf2adbea DRW: Attempt to fix slowdown caused by gizmo drawing 2019-05-06 22:33:05 +02:00
bd340a0e1f Cleanup: GPUMaterial remove unused struct members 2019-05-06 22:33:05 +02:00
8b6afcb67b Cleanup: Eevee: Remove comment about vcol support in sculpt mode 2019-05-06 22:33:05 +02:00
50999f7fb0 Maintain Volume: introduce an option switching between modes.
After a lot of thinking about this, I decided that all operation modes
that I've tried over the past couple of years, including the original
2.79 one, have their uses after all. Thus the only reasonable solution
is to add yet another option.

The modes are:

- Strict: The current 2.80 mode, which overrides the original scaling
  of the non-free axes to strictly preserve the volume. This is the most
  obvious way one would expect a 'Maintain Volume' constraint to work.

- Uniform: The original 2.79 mode, which assumes that all axes have been
  scaled the same as the free one when computing the volume. This seems
  strange, but the net effect is that when simply scaling the object
  uniformly with S, the volume is preserved; however, scaling the non-
  free axes individually allows deviating from the locked volume.
  This was obviously intended as a more or less convenient UI tool.

- Single Axis: My own variant of the intent of the Uniform scale, which
  does volume-preserving if the object is scaled just on the Free axis,
  while passing the non-free axis scaling through. I.e. instead of
  uniform S scaling, the user has to scale the object just on its
  primary axis to achieve constant volume. This can allow reducing the
  number of animation curves when only constant volume scaling is needed,
  or be an easier to control tool inside a complex rig.
2019-05-06 21:55:20 +03:00
df1d990b68 UI: Offset checkbox in the Outliner filter popover
Aligned with the other checkboxes
2019-05-06 20:54:35 +02:00
0f064144f3 Node select: refactor, fix some inconsistent behaviors in socket selection.
Refactor a bit node selection code, mostly in the socket selection in
one place 'extend' logic usage was inverted, deselection of other
sockets/nodes was not working properly.

Also now make node active when selecting a socket, this makes more sense
and makes the NODE_OT_link_viewer macro much more useful (this is the
only user of the 'socket select' feature currently, afaics).
2019-05-06 20:37:12 +02:00
6da953ad1d GPencil: Verify Brush has GPencil data
This avoid errors in old files.
2019-05-06 20:34:24 +02:00
fb3e138cee Tests: add Eevee reference images, and add workbench tests
Being able to compare Eevee reference images is useful for refactoring I'm
working on so might as well add them now, even if we can still improve them.

Workbench tests are just rendering the same files as Cycles and Eevee. This
doesn't really tests many workbench settings until we add tests specifically
for them, but does cover how it it handles the different object types.
2019-05-06 20:10:08 +02:00
51f222f91d Fix: T64213 Properties Editor Icon Colors are wrong for Text and Light Probes 2019-05-06 19:44:33 +02:00
89724c03dc Fix T64111: add a NULL check to avoid crash with bad constraint subtarget. 2019-05-06 20:31:22 +03:00
c0432c2385 Fix T63046, T61413: crash reading paint slots from 32 bit .blend on 64 bit
Thanks to matc for helping to find this, it was writing the paint slots wrong.
2019-05-06 18:39:33 +02:00
1854cccad7 Drivers: add an Average Scale option to the Transform Channel driver vars.
Unlike location and rotation, there is a meaningful definition of
overall/average scaling via the total change in the volume. This
adds an option to retrieve that via a single driver variable,
instead of having to use three and an expression.

Using the determinant to compute the volume scaling also allows
detecting flipping due to negative scale - this is impossible
to do via the three variable approach.

The volume_scale functions are added purely for code readability:
'volume scale factor' is easier to understand than determinant.

Differential Revision: https://developer.blender.org/D4803
2019-05-06 19:03:26 +03:00
11d2c0b6f4 UI: Outliner Filter popover: Remove wrong use of icons
Missed this file from prior commit.
2019-05-06 17:33:04 +02:00
c07b9e23c8 UI: Add tooltips to the select tool modes
Especially needed now that they are just icons
2019-05-06 16:47:13 +02:00
4cdb4b9532 Fix T64161: Crashing using undo and multiple windows
It is possible that dependency graph was not yet initialized,
so need to do NULL pointer check.
2019-05-06 16:40:23 +02:00
958e00cebf UI: Use expanded icon row for Select tool modes 2019-05-06 15:59:34 +02:00
a23647e51b Industry Compat Keymap: Accept Knife tool with double-click
Suggested by users on Devtalk
2019-05-06 15:03:40 +02:00
6a0c31af8a improve tooltip of ViewLayer.use
thx @Zoot (Gavin Scott) for spotting and providing better wording

Fixes T64157
2019-05-06 14:24:33 +02:00
578ead77f9 remove unused T_LOCAL_MATRIX
- was introduced in rB844a17a3d9d2 but apparently never used
- spotted while looking into T57767

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4805
2019-05-06 13:48:07 +02:00
e9160eae95 Fix T64164: Resetting a curvemap could result in a mirrored curve
A template_curve_mapping with brush=True was always resetting the curve
to a positive slope (descending from left to right).
Behaviour is now changed so that specifying "use_negative_slope" is
taken into account as well.

Also use this for:
- paint "cavity_curve"
- gpencil "curve_sensitivity" / "curve_strength" / "curve_jitter" /
"interpolation_curve"

Reviewers: brecht

Maniphest Tasks: T64164

Differential Revision: https://developer.blender.org/D4809
2019-05-06 13:44:22 +02:00
d7ffb5cb0b UI: Remove wrong use of icon for Rename Active Item 2019-05-06 13:42:06 +02:00
0f3f78e2b9 UI: Outliner Filter popover layout
- Use checkboxes with aligned text
  - Use icons next to the checkboxes
  - Remove wrong use of icons
  - Better grouping
2019-05-06 13:40:51 +02:00
064273a4ae Sound: Port more cases to be a part of dependency graph
Mainly covers RNA callbacks which were still doing direct scene update,
which was causing crashes. Now corresponding ID_RECALC flags are used,
so all scenes can update accordingly.

Also tested animated volume/pitch on strips, which now works as well.

Fixes T64133: Assert after changing FPS
Fixes T64154: Immediate crash when changing the current frame on the timeline
Fixes T64185: Client Crashes when the frame position value is changed
Fixes T64190: Blender Crash using Timeline Editor
Fixes T64128: Click to close bug type on timeline
Fixes T64147: Crash when setting current frame from Python
Fixes T64152: Blender Auto-Close on timeline change
2019-05-06 12:54:16 +02:00
2c0da4a3db Color management: add functions to detect scene linear and sRGB color spaces
Same as the ones in Cycles, but intended for GPU textures.
2019-05-06 12:05:44 +02:00
8794779a2d Fix error running Eevee render tests 2019-05-06 12:04:08 +02:00
b6bf4bda27 UI: disable colored icons in menus for now
Only a few icons are colored, which caused some random icons to be colored and
others not. We can add it back for specific menus later (like add object or
modifiers).
2019-05-06 11:58:47 +02:00
defc901467 UI: File Browser bookmarks panels
- Group these together in sub-panels
  - Use much clearer naming
  - Close Volumes and Recents by default
2019-05-06 11:56:55 +02:00
de430dd1ec UI: Icons update
New icons from Andrzej Ambroż / jendrzych:

  - New icons for select tool modes
  - Brought back screen icon for viewport visibility toggles
  - Added new Instanced visibility toggle (unused currently - meant for forthcoming updates to the Outliner)
  - New Gizmo icon for the header
  - Many tweaks and alterations to existing icons. Full list on Devtalk
  - Use correct icon when Proportional Editing is disabled
2019-05-06 11:54:46 +02:00
2e582f8ab5 Sound: Fix access wrong dependency graph
Due to some fields in the context being NULL access was happening
to the default view layer, not the active one.

Simply re-arranged context initialization, so it happens before
accessing dependnecy graph.

Fixes T64183: Crash in BKE_sound_scene_playing due to Scene NULL
Fixes T64192: Crash opening a file with a non-default View Layer active
2019-05-06 11:32:01 +02:00
22e9365e8b Depsgraph: Fix wrong comment 2019-05-06 10:12:23 +02:00
09181540b5 Implement mirroring in pose mode (absolute and relative)
Added working X-mirroring in pose mode with an optional relative mirror
mode.

Reviewed By: Campbell Barton

Differential Revision: http://developer.blender.org/D4765
2019-05-06 09:47:45 +02:00
f999c40d77 Fix T64178: Invisible image 2D cursor
Own error in 928becec60, move cursor drawing to single location.
2019-05-06 12:55:54 +10:00
0ddec50944 Cleanup: clang-format 2019-05-06 11:59:03 +10:00
90f8f5cb06 UI: Tooltips
- Add missing tooltips to Quick Effects and Subdivide Edge Ring
  - Add proper tooltip to the Bevel operator
  - Clearer tooltips for the extrude operators

Plus a few other tweaks

Suggested by users on Devtalk.
2019-05-05 21:36:12 +02:00
1dd78a3f57 Industry Compat keymap: Remove ability to cancel knife with right click.
Was too easy to do by mistake while attempting to zoom.

Unfortunately it seems like it's not currently possible to add zooming to the Knife modal keymap, so this is still missing here.
2019-05-05 20:49:25 +02:00
c7ec6bb748 RNA: add an Object method to clear all shape keys for completeness.
This matches bpy.ops.object.shape_key_remove(all=True) in behavior.
2019-05-05 19:34:30 +03:00
2c92900a47 Industry Compat Keymap: Fix Select All operators in the Info Editor
Patch by Valentin (Poulpator)

Differential Revision: https://developer.blender.org/D4746
2019-05-05 17:42:18 +02:00
1c58604070 Depsgraph: fix Bone property drivers stored in Object animdata.
This can easily happen if adding drivers through Python via
pose.bones[...].bone.driver_add(), e.g. in Rigify code: the
bone field doesn't change id_data, so the driver is associated
with the object ID.

To handle this it's necessary to skip from Object to data in
RNA_Bone-specific code both for generic RNA and in the custom
code for drivers. The latter also had to be changed to use the
proper parsed RNA pointer instead of string matching on paths.
2019-05-05 10:44:41 +03:00
47df163b6c GPencil: Verify brush is valid for grease pencil
Usually the brush type is correct, but for some old files the brush could be a not valid type. In this case, returns the object active material.

This is related to T61413
2019-05-05 09:10:44 +02:00
ab9731ccea Cleanup: fallthrough attribute warning
Fall-through without label or default after it.
2019-05-05 12:34:24 +10:00
5fc49d9c91 Sound: add stubs to build without audaspace 2019-05-05 12:33:51 +10:00
d32a103d53 Fix T63789: Precision issues in glsl noise texture
There is a significant precision loss when converting large float values to int.
2019-05-04 16:46:02 -03:00
c68c81a870 Sound: Make sure spin lock is initialized for new sound datablocks
Should have been done as a part of 9f681bea68.
2019-05-04 20:34:56 +02:00
c02534469a Sound: Delay creating sound scene handle for until is needed
Solves crash loading volume Cycles regression files.
2019-05-04 19:20:41 +02:00
9f681bea68 Fix T64144: Crash when displaying audio waveforms in VSE 2019-05-04 19:15:15 +02:00
773691310f Fix T64143: Crash when scrubbing in the graph editor 2019-05-04 18:53:59 +02:00
7595c9ecda Cycles: Fix NULL instead of false
Not really noticeable for users, since the compiled code is the same,
but semantically this is incorrect.
2019-05-04 18:49:37 +02:00
Julian Eisel
94a064c0e9 Fix T64045: Crash activating fullscreen workspace
See d83a72ec10.
2019-05-04 15:33:02 +02:00
Julian Eisel
d83a72ec10 Fix crash activating a fullscreened screen
Steps to reproduce were:
* Duplicate some area into new window (shift-click corner triangle)
* Make it fullscreen
* Close the window again
* Activate the added screen from the menu (the one without the
  -nonnormal prefix)
-> Crash (you may have to press "Back to Previous" first though)

When activating a screen, code should check if there's a fullscreen
variant of it and activate that instead. From what I can tell that's
what the code tried to do, but incorrectly.

Same issue as T64045, but things are a bit different for 2.7.
2019-05-04 15:12:55 +02:00
aa8e3e6fbe UI: Add Split and Separate to the mesh editing context menus 2019-05-04 15:12:20 +02:00
e718b9712e UI: Add color and blending to paint mode context menus 2019-05-04 15:03:42 +02:00
8d8e8caa9d Industry Compat Keymap: Set Proportional Editing to B key
Same as popular DCC app.

This means having to change Bevel to Ctrl/Cmd-B

Also fix missing shortcut for Extrude in Curve Edit mode.
2019-05-04 14:35:40 +02:00
George Vogiatzis
b8d806caf7 UI: Add Look Developer Balls Size option
Note: Some adjustments were made compared to the diff mainly for code
readability and made the default ball size 150px.

Reviewed By: fclem

Differential Revision: http://developer.blender.org/D4793
2019-05-04 14:11:04 +02:00
e474549da5 Cleanup: GPU_buffers: Remove obsolete debug drawing 2019-05-04 14:11:04 +02:00
f302224e16 Cleanup: Eevee: Remove Flat normal shader variation
Was use by sculpt mode but that's not used anymore.
2019-05-04 14:11:04 +02:00
fb3b2ab709 Cleanup: Remove unused code in sculpt_mode, workbench and draw manager 2019-05-04 14:11:04 +02:00
b2f1a65874 Sculpt: Refactor draw manager sculpt drawing mechanism
Workbench/Eevee now displays multiple multi-materials correctly.

Iterate over pbvh nodes when doing object iteration. This makes the
rendering process more streamlined and allow for using different materials.

This change will make possible to:
- Add culling pass of each pbvh leaf node. (speedup if zoomed on a small
area)
- Reduce number of lead node iteration.
- Reduce code complexity
2019-05-04 14:11:04 +02:00
1d8ed6dcd7 GPUBuffers: Save / expose material index per buffers 2019-05-04 14:11:04 +02:00
80cd292381 Fix T64102: Can't add X-Mirror to quick favorites 2019-05-04 10:56:47 +10:00
2f79286453 Cleanup: unused vars 2019-05-04 10:56:47 +10:00
Julian Eisel
ee0d8426ab UI: Dynamic region size for file browser options
Makes the file browser operator property region (lower left) dynamically
sized to content. Previously, the default size would work really badly
for file browsers opened in small windows, e.g. to install Add-ons from
the preferences window. It would be mostly empty but use lots of space
then.
2019-05-03 23:09:47 +02:00
bed8ad6f95 Fix crash in background rendering after recent sound changes 2019-05-03 19:44:49 +02:00
3c07967ef2 Fix Cycles crash when trying to load image that does not exist
It was crashing due to array out of bounds access. This is not a great fix,
but brings back behavior the same as before now. Perhaps images that failed
to load should be stored separately somewhere.
2019-05-03 19:08:27 +02:00
d23869eefa GPencil: Add stroke color to Materials Popover
This makes more easy to manage the color, specially for advanced brushes with pinned materials.

Reviewers: @pepeland, @mendio
2019-05-03 18:43:11 +02:00
633c773fe4 UI: color icons in the properties editor tabs
Still can use more tweaks and icon reorganization, but this gets us closer
to the intended design so we can evaluate it. Ref T61561, T63521.
2019-05-03 18:33:23 +02:00
a5c89574a3 Fix Cycles assert on exit after recent changes 2019-05-03 18:04:47 +02:00
888852055c Sound: Fix for being unable to jump to a frame during playback with A/V sync 2019-05-03 17:50:43 +02:00
712fe561d5 UI: Fix crash when region becomes too thin 2019-05-03 17:42:45 +02:00
6ab7b38464 Sound: More fixes for access of original scene
Same as previous commit, just few lines to the bottom.
2019-05-03 17:27:13 +02:00
35db119545 Sound: Fix access original scene during playback
Was required to have AV-sync enabled. and then simply play playback
would have triggered an assert.

In release builds the sync would have happened to a wrong frame.
2019-05-03 17:19:24 +02:00
21f8e75ddb fix image_changed() doing unneccessary texture updates when texture wasnt
using an image

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4789
2019-05-03 15:53:19 +02:00
a460e97212 Cleanup: Selling in comment 2019-05-03 15:50:40 +02:00
211c4fd2e9 Depsgraph: Make comment about evaluation more obvious 2019-05-03 15:50:40 +02:00
c5fe16e121 Sound: Make sound handles only be in evaluated datablocks
Quite straightforward change, which makes it so audio handles are
only created inside of evaluated datablocks.

Exception is adding sound strip to the sequencer, which needs an
audio handle to query length and number of channels. This is done
by temporarily loading sound file into an original datablock, and
then tossing it away.

There is an assert in sound.c which verifies that audio system is
used from an evaluated domain, which should help porting all the
cases which are likely missed by this commit.

Some annoying parts:

- `BKE_sound_update_scene()` is iterating over all bases, and does
  special ID tags to see whether sound has been handled or not
  already. This can not be done the old fashion now.

  Ideally, this will be done as a speaker datablock evaluation,
  but seems that would require a lock since audio API is not safe
  for threading. So this is not a desired way i'd say.

  Possible solution here would be to iterate over ID datablocks
  using dependency graph query API.

- Frame jump needs to call `BKE_sound_seek_scene()` directly
  because there might be some flags assigned to the scene which
  could be clear after operator execution is over.

  Need to verify if that's the case though. This is a bit hairy
  code, so sticking to a safest and known to work approach for
  now.

- Removed check for format when opening new sound file.
  Maybe we can have some utility function which queries channel
  and duration information, leaving the caller's code clean and
  tidy.

Tested following cases:
- Adding/removing/moving sequencer's sound strips.
- Adding/moving speakers in viewport.
- Rendering audio.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4779
2019-05-03 15:50:40 +02:00
b4e1e0946b Depsgraph: Preserve sound and audio pointers through copy-on-write
This allows to have scene and speaker copy-on-write executed without
interrupting the playing sound.
2019-05-03 15:50:40 +02:00
4eedf784b0 Depsgraph: Store original sequencer strip pointer
Allows to identify where the strip came from.
2019-05-03 15:50:40 +02:00
6990ef151c Sound: Move evaluation to dependency graph
The sound handles are still in the original datablocks, so it's easier
to test since there should be no functional changes.
2019-05-03 15:50:40 +02:00
d02da8de23 Sound: Delay opening handlers for until really needed
Needs to be done in order to localize sound handlers to the evaluated
IDs only. This commit might not be fully optimal, since it does more
things on every scene update request, but that will be solved by the
upcoming change which will put those updates to a dependency graph.
2019-05-03 15:50:40 +02:00
3369b82891 Depsgraph: Add scene audio component
The idea is to make that responsible for dealing with
things like audio update on frame jump and such.
2019-05-03 15:50:40 +02:00
e8f10d6475 Depsgraph: Tag sequencer for update on changes
Currently only adding, removing and transforming strips. Most likely more
tags is needed.
2019-05-03 15:50:40 +02:00
6e4b7a6e4d Depsgraph: Initial work to cover sequencer
Just adds sequencer operation and links possible sound ID to it.

No functional changes, just moving towards sound system integration
into the dependency graph.
2019-05-03 15:50:40 +02:00
17447ac5a6 Depsgraph: Make sound ID part of the graph
Currently those IDs are not covered by copy-on-write mechanism since
that ruins the current design of BKE_sound, But this change allows to
move towards system where sound handlers are only valid for an evaluated
ID datablocks.
2019-05-03 15:50:40 +02:00
e6697d0127 Fix compiler warning/error after recent changes 2019-05-03 15:50:01 +02:00
e185a6afa3 Fix width of compact buttons with icons, e.g. layout.menu().
As mentioned in the comment, the icon width computation relies on
big enough margins; however in compact mode they aren't big enough
and the label gets truncated.
2019-05-03 16:49:30 +03:00
1006767678 Fix crash opening file saved in editmode with a brush image texture
started with recent UV Sculpt tool-system integration rB928becec60d1

Fixes T64094

Reviewers: brecht

Maniphest Tasks: T64094

Differential Revision: https://developer.blender.org/D4788
2019-05-03 15:44:53 +02:00
Nathan Craddock
f437b958c3 UI: remove bone only constraints from object constraint menu
This is better than showing an error after trying to add them. Ref T61560.

Differential Revision: https://developer.blender.org/D4767
2019-05-03 15:42:49 +02:00
68b15fc3ad Cycles: support loading images from arbitrary OpenColorIO color space
These are the internal changes to Cycles, for Blender integration there are no
functional changes in this commit.

Images are converted to scene linear color space on file load, and on reading
from the OpenImageIO texture cache. 8-bit images are compressed with the sRGB
transfer function to avoid precision loss while keeping memory usages low. This
also means that for common cases of 8-bit sRGB images no conversion happens at
all on image loading.

Initial patch by Lukas, completed by Brecht.

Differential Revision: https://developer.blender.org/D3491
2019-05-03 15:42:49 +02:00
dba4684f82 Cycles: add colorspace manager class and utilities based on OpenColorIO
This is the groundwork for supporting loading image textures with arbitrary
color spaces through OpenColorIO.

Initial patch by Lukas, completed by Brecht.

Differential Revision: https://developer.blender.org/D3491
2019-05-03 15:42:49 +02:00
fadb6f3466 Cleanup: refactor Cycles OSL texture handling
This adds our own OSL texture handle, that has info for OIIO textures or our
own custom texture types. A filename to handle hash map is used for lookups.
This is efficient because it happens at OSL compile time, because the optimizer
can figure out constant strings and replace them with texture handles.
2019-05-03 15:36:20 +02:00
08a44d2981 Cleanup: refactor passing of OSL kernel globals for upcoming changes 2019-05-03 15:36:20 +02:00
45ad6cd5a7 UI: Pass color id into view2d text drawing 2019-05-03 15:10:37 +02:00
938ceb1508 Industry Compat Keymap: Fix box selecting keys in the Graph Editor
It was not selecting the handles, causing a skewed offset when transforming
2019-05-03 14:35:44 +02:00
Harley Acheson
66a5df82b5 Fix missiong collection move line in outliner after recent changes
Differential Revision: https://developer.blender.org/D4781
2019-05-03 14:19:48 +02:00
d242ee4af6 ICK: Missed one line in last commit 2019-05-03 13:55:01 +02:00
0ed97e6fab Industry Compat Keymap: Fix Return key in the File Browser
Return was set to Rename in all editors. Now set it per editor and exclude File Browser
2019-05-03 13:53:41 +02:00
fa59346c13 Refactor: Support arbitrary y offset for channel list
At first you could think that this refactor would not be
necessary, because `ACHANNEL_FIRST` exists already.
It contained the small y offset that all channels had.

Unfortunately, a lot of code assumed that
`ACHANNEL_FIRST = -ACHANNEL_HEIGHT`, making the
define pretty much useless. This refactor fixes that
for the action and nla editor.

As a nice side effect, this patch fixes channel box select.
Before there was always have a half-channel offset.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4783
2019-05-03 13:05:03 +02:00
b5eb6548d1 Depsgraph: Remove filtering API
This was an attempt to speed up motion path calculation, which didn't
really work in real world animation files, where animators already
hide and disable all the heavy collections. Filtering approach also
doesn't allow to have multiple frames evaluated in multiple threads
easily.

Filtering also adds extra complexity on keeping the graph in a correct
and consistent state.

Fixes T64057: Blender crash when use motion paths
2019-05-03 12:42:05 +02:00
ec474291a7 Industry Compat Keymap: Set Tab to use Add Search in node editors
More useful than operator search here, and more like some other apps.
2019-05-03 12:08:01 +02:00
ab80244460 Industry Compat Keymap: Use Alt-key navigation in the Image Editor
Was missing this by mistake
2019-05-03 11:41:56 +02:00
4879ffb885 UI: Display panel tweaks
- Use Display As rather than Draw Type, following naming conventions
  - Rename Advanced subpanel to Stretching, since that more accurately describes what it's for
2019-05-03 10:26:24 +02:00
41a63556cf Revert "Cleanup: add semicolon after PyObject_VAR_HEAD"
This reverts commit a01bcfa636.

This causes MSVC2019 build to fail with error C2059

Unfortunately this means we have to put up with bad formatting
in Python structs.
2019-05-03 18:09:52 +10:00
688c7240be UI: Add Annotate tool to Sculpt and Paint mode toolbars
Users have requested to have the Annotate tool added to Sculpt Mode. It can be useful for annotating while sculpting.

  - Remove Measure tool from the tools_annotate group
  - Add Measure tool to object and edit mode toolbar
  - Add Annotate tools to Sculpt and Paint modes

Differential Revision: https://developer.blender.org/D4785
2019-05-03 09:41:34 +02:00
0d2e7f2106 Fix T59474: Crash assign shortcuts 2019-05-03 17:08:47 +10:00
fbd366713e Fix active tool side-bar redrawing on tool change 2019-05-03 14:15:38 +10:00
4a3a0e3ef5 Fix tool header message subscriber 2019-05-03 13:59:58 +10:00
70682d11b8 Cleanup: replace RGN_ALIGN_ENUM_MASK
This was only used once, other checks were masking out
RGN_SPLIT_PREV which isn't future proof (if other flags are added).

Add RGN_ALIGN_ENUM_FROM_MASK macro, use it everywhere we need to
check the alignment enum.
2019-05-03 13:04:37 +10:00
a01bcfa636 Cleanup: add semicolon after PyObject_VAR_HEAD
clang-format doesn't expand macros,
add semicolon to prevent misleading formatting.
2019-05-03 12:43:18 +10:00
b8226a3ae1 Cleanup: warnings
Quiet extra-semi-stmt & missing-variable-declarations
2019-05-03 12:43:02 +10:00
a677cdab56 Defaults: disable developer extras
Was enabled by accident when updating startup.blend.
2019-05-03 12:19:18 +10:00
2c0db07eed DNA: remove unused 'osa' member
Also correct unused flag comment, use doxy cross references.
2019-05-03 12:07:25 +10:00
b331515d2e Industry Compat Kerymap: Add Pick Shortest Path to keymap
Use Ctrl-Shift-Click for this.
2019-05-02 19:03:15 +02:00
cdf68af12e Fix T64072: DynamicPaint: Bake failed: Canvas mesh not updated
Baking is to happen form within an evaluated scene.
2019-05-02 17:46:54 +02:00
95e052f830 Fix T63997 Weird z-fight during weight paint
PBVH drawing was used even in weightpaint/vertexpaint because both uses
the sculpt session.
2019-05-02 16:51:45 +02:00
102daed1f2 Cleanup: Draw Manager: remove DRW_state_invert_facing 2019-05-02 16:51:45 +02:00
8ae6effa91 Industry Compat Keymap: Suppurt MMB for translating nodes
Consistent with 3D View and animation editors.
2019-05-02 16:28:13 +02:00
f8bed5ccdc GPencil: New API to remove grease pencil material settings
This is required for some add-ons

Example use:
ma = bpy.data.materials[0]
# create settings
bpy.data.materials.create_gpencil_data(ma)
# remove settings
bpy.data.materials.remove_gpencil_data(ma)

Related to T63707
2019-05-02 16:27:12 +02:00
b52a0c78af Workbench,EEVEE: Viewport Render Samples
- Add `render_aa` and `viewport_aa` sampling setting for workbench. 0
   samples means no AA, 1 sample uses FXAA and more samples will use
   TAA.
   The viewport `gpu_viewport_quality` can still limit viewport anti-aliasing
   method.
 - Use TAA when rendering images. (this used to be CPU based FSAA)
 - Removed `R_OSA` related settings.

Reviewers: fclem, brecht

Maniphest Tasks: T60847

Differential Revision: https://developer.blender.org/D4773
2019-05-02 16:19:12 +02:00
76193106d2 Industry Compat Keymap: Sequencer and NLA
Same changes as for Dopesheet and Graph editor:

  - Dragging in empty area starts a box selection
  - Hold Shift to expand or Ctrl to remove
  - LMB Dragging on keyframe moves key
  - MMB Dragging anywhere moves selection
2019-05-02 16:18:23 +02:00
ffaf91b5fc Pose slide / relax: fix various issues
* Fix operator adjust settings not working.
* Fix modal operator not working when invoked from search menu.
* Fix tagging to be correct for new depsgraph.
* Fix pose relax doing nothing when start and end frames match
  even if the current frame value is different.
* Remove odd 0.3..0.7 limit in adjust operator settings panel.
2019-05-02 16:03:39 +02:00
51347be24e Fix T64059: Crash in shader when using other object's texture space
Can not use evaluated datablock to localize since that could point to
another evaluated datablock, which can not become part of another
dependency graph.

The original code needed to have unkeyed changes preserved, but now
we do have a flush of animation to an active dependency graph, so this
code is not needed anymore.
2019-05-02 15:55:29 +02:00
ae21dfc236 Industry Compat Keymap: Tweak keymap for Graph Editor and Dopesheet
- Dragging in empty area starts a box selection
  - Hold Shift to expand or Ctrl to remove
  - LMB Dragging on keyframe moves key
  - MMB Dragging anywhere moves selection
2019-05-02 15:54:48 +02:00
2c5ee7418c Fix T63697: correct stuck R_NO_CAMERA_SWITCH in scene->r.mode.
This flag becomes stuck in certain situations, causing the marker
camera switch feature to not work.

To fix old files with the problem, clear the flag on file load.

Also, the line that is supposed to clear it has wrong bit math,
causing seq_render_scene_strip to effectively toggle the flag on or
off every time it's run, instead of restoring to original state.

The flag and code were added in 001789d733 by @campbellbarton.
2019-05-02 16:31:11 +03:00
5ec7987949 DrawManager: External Engine Depth Buffer
Only draw the depth buffer when overlays are enabled and scene
or view has changed.

When using Cycles in the viewport for every viewport draw call
the depth buffer was renewed. Draw calls happened when a sample
was finished or the status report was updated.

This could waist some CPU/GPU cycles. This change will check when
the depth buffer needs to be updated or when the last known depth
buffer could be reused.

Reviewers: brecht, fclem

Maniphest Tasks: T63525

Differential Revision: https://developer.blender.org/D4775
2019-05-02 15:10:43 +02:00
9fa0e58fea UI: Open 'Passes' panel by default in Cycles.
This panel is arguably the most important in the ViewLayer properties, so
the concept of "1 panel open per context" doesn't work. Especially since
the first panel (View Layer) contains only two settings.

This also registers the Passes panels before filter/override so it's sorted in the same way as EEVEE.
2019-05-02 14:37:43 +02:00
1d8531e3db UI: Open 'Passes' panel by default in EEVEE.
This panel is arguably the most important in the ViewLayer properties, so
the concept of "1 panel open per context" doesn't work. Especially since
the first panel (View Layer) contains only two settings.
2019-05-02 14:37:43 +02:00
7f366c048a Fix T63435 Incorrect fresnel and normals for hair strands on EEVEE 2019-05-02 14:32:41 +02:00
a914765221 UI: rename 'Remove Doubles' to 'Merge by Distance'
Also add into the "Merge" menu.
2019-05-02 21:57:24 +10:00
6047653ec0 Fix T63904: Remove Animation should remove empty actions from objects. 2019-05-02 14:56:25 +03:00
667af6cf41 Refactor grid and scale indicator text drawing
This affects the timeline, dopesheet, graph editor, sequencer,
clip editor and nla editor.

Removed structs and enums: `V2D_ARG_DUMMY`, `eView2D_Units`,
`eView2D_Clamp`, `eView2D_Gridlines`, `View2DGrid`.

A main goal of this refactor is to get rid of the very generic
`View2DGrid` struct. The drawing code became very complex
because there were many different combinations of settings.

This refactor implements a different approach.
Instead of one very generic API, there are many slighly
different functions that do exactly, what we need in the
different editors. Only very little code is duplicated,
because the API functions compose some shared low level code.

This structure makes the code much easier to debug and change,
because every function has much fewer responsibilities.

Additionally, this refactor fixes some long standing bugs.
E.g. when `Show Seconds` is enabled, you zoom in and pan the view.
Or that the step size between displayed frame numbers was
always `>= 2`, no matter how close you zoom in.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4776
2019-05-02 12:00:12 +02:00
5b14b56542 Cleanup: typos in comments 2019-05-02 18:25:36 +10:00
22c293f6d6 Cleanup: outdated comments, unused define 2019-05-02 18:25:36 +10:00
8c478bb915 GPencil: Add API property to check annotations
This new property allows to check if the current datablock is an annotation or is used in a grease pencil object.

This property is required for some Add-ons.
2019-05-02 10:08:59 +02:00
2b88ed30cc Cleanup: Comments
A spelling issues introduced in 5a43406e1b. From quick look the
sequencer seems to be the only special boy. But the change is a bit
too big to carefully re-read for exact spelling mistakes.
2019-05-02 09:53:11 +02:00
6fb51ece54 Workspace: remove global active tool
This was needed for a global top-bar to show a single tool,
no longer needed now the top-bar is per-space.
2019-05-02 17:02:05 +10:00
38e34a12ac Fix T57099: Parenting between armatures crashes
Multi-object selection allowed to parent edit-bones across armatures
(which isn't supported).
2019-05-02 13:46:57 +10:00
65f739a700 UI: expose vertex merge as menu
Avoids a pop-up after the first click.
2019-05-02 11:59:12 +10:00
c4962d9303 Cleanup: use WM_keymap_item_* prefix 2019-05-02 11:45:46 +10:00
1bea76dd6a Cleanup: style 2019-05-02 11:45:46 +10:00
a9835fdb3e Cleanup: use doxy sections in wm_keymap.c 2019-05-02 11:33:05 +10:00
db4804690b BLF: pass code-point to BLF_has_glyph
Avoid BLF having to be concerned with decoding the string
(which can fail).

Also remove redundant extra zero byte from strings.
2019-05-02 10:52:53 +10:00
e7ce9b9bb8 Cleanup: unused warning 2019-05-02 10:37:42 +10:00
a372e5e426 Fix T61619: Some VSE attributes with keyframes are not sensibly evaluated
when the scene is referenced as a strip from another VSE scene

Fix T49658: Evaluation / animation of f-curves does not correct
for a scene's position within another scene

Solution: Evaluate animdata before rendering scene seqbase.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4755
2019-05-01 09:58:35 -07:00
fc040335b7 Fix T63980: only copy selected curves in Copy Keyframes from Graph Editor.
Otherwise things can become confusing due to copying unwanted curves,
especially if "Only Selected Curve Keyframes" is enabled, and thus
selected keyframes from other curves may not be visible.

Now Copy Keyframes behaves exactly like Paste Keyframes.
2019-05-01 19:25:24 +03:00
a9e546f57d UI: add pixel units for some theme settings 2019-05-01 18:05:48 +02:00
George Vogiatzis
a8bdb357b4 UI: move object origin size preference to themes
Differential Revision: https://developer.blender.org/D4657
2019-05-01 18:05:48 +02:00
Harley Acheson
5b7806510f UI: remove outliner vertical separators
This removes the vertical bar separators between items and subitems (for closed
rows), and the vertical lines between the columns of restriction icons.

The vertical bars and lines don't really serve any useful purpose and add some
visual fuzziness and confusion. Best to concentrate the eye on the items of
content, not the separators between them.

Differential Revision: https://developer.blender.org/D4743
2019-05-01 18:05:48 +02:00
Harley Acheson
f597cb6d03 UI: remove outliner highlight selection gap
When rows were highlighted - for selection, hover, or search - the highlighted
bar would not take up the entire vertical space but instead leave a gap.

That gap generally looks like a separator between items, adding complexity and
fuzziness for no real benefit.

Differential Revision: https://developer.blender.org/D4742
2019-05-01 18:05:48 +02:00
Harley Acheson
3747282932 UI: use Mac key symbols in menus on macOS, instead of text like "Cmd"
On Windows "Cmd" is also replaced with "Win".

Differential Revision: https://developer.blender.org/D4689
2019-05-01 18:05:01 +02:00
Harley Acheson
0a80be40e3 UI: make outliner hierarchy line width take into account DPI
Differential Revision: https://developer.blender.org/D4744
2019-05-01 17:21:02 +02:00
George Vogiatzis
df712d74a2 UI: improve readability of Normals menu in edit mode
Also rename operators to match names in the menu.

Differential Revision: https://developer.blender.org/D4659
2019-05-01 17:17:22 +02:00
89826e0a0d Alembic: integrate cache file into the dependency graph
* The cache file datablock is now evaluated as part of the dependency graph,
  creating/freeing the Alembic file handle matching the current frame.
  Modifiers and constraints depend on this evaluation.
* Cache file handles and readers now only exist on COW datablocks, never the
  original ones.
* Object data paths are flushed back to the original for the user interface.
* The cache file keeps a list of all readers associated with its handle, and
  automatically frees them when the handle is freed. This kind of sharing of
  data across datablocks is weak but we have no better mechanism for it.

Fix T62720: Alembic sequences not working and crashing

Differential Revision: https://developer.blender.org/D4774
2019-05-01 16:02:27 +02:00
a72a831570 Eevee: Fix crash when rendering due to recent lookdev refactor 2019-05-01 15:45:54 +02:00
df8e5d66e3 Modifiers: support parallelism in Armature and Lattice Deform.
This partially mitigates the performance drop in Spring
02_055_A.anim caused by dependency changes in D4715.

Differential Revision: https://developer.blender.org/D4753
2019-05-01 16:34:54 +03:00
4d043b5c17 Fix crash on unlinking scene
Fix crash when unlinking scene and "Use Sequence" property is set.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4756
2019-05-01 05:16:55 -07:00
fa3da4d23d Use cache only in current scene
Disable cache use, when rendering another scene seqbase.
Now cache limit applies only to one scene, so it can be overshot.
Cache of other scenes can be filled manually still.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4757
2019-05-01 05:16:29 -07:00
bc597eb487 Fix T49589: 2.78 VSE no longer caching Node Editor scene strips
Sequencer cache was cleared when rendering compositor output.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4758
2019-05-01 05:16:01 -07:00
07b223a873 ClangFormat: enable ReflowComments 2019-05-01 21:44:48 +10:00
c47d669f24 Cleanup: comments (long lines) in cycles 2019-05-01 21:41:07 +10:00
177a0ca131 Cleanup: comments (long lines) in various intern/ libs 2019-05-01 21:00:56 +10:00
5bbf9029ce Cleanup: comments (long lines) in dualcon 2019-05-01 21:00:56 +10:00
c985876b19 Cleanup: comments (long lines) in rigidbody 2019-05-01 20:48:34 +10:00
649e5fb955 Cleanup: comments (long lines) in mikktspace 2019-05-01 20:41:33 +10:00
a91717d2ad Cleanup: comments (long lines) in atomic 2019-05-01 20:34:12 +10:00
8a10da1cf8 Cleanup: comments (long lines) in string 2019-05-01 20:32:38 +10:00
59fb13c2b1 Cleanup: comments (long lines) in utfconv 2019-05-01 20:32:38 +10:00
5b1fcf8833 Cleanup: comments (long lines) in ghost 2019-05-01 20:32:38 +10:00
1cb091ae7a Cleanup: correct arg wrapping from recent cleanup 2019-05-01 20:32:38 +10:00
928becec60 UV Sculpt: improve tool-system integration
In 2.7x UV sculpt was a kind of sub-mode
(a toggle with it's own key-map & drawing code).

Move this to an operator that uses the tool-system,
this simplifies internal logic, especially brush selection
which now matches sculpt and other paint modes.

- Remove toggle used to enable uv sculpt.
- Expose the brush, which was already used but there was no way to
  select different brushes.
- Make UV sculpt use paint paint tool slots
  (using brushes how all other paint mode currently do).
- Move UV Sculpt keymap to the tools keymap.
- Remove Q to toggle UV sculpt mode,
  S/P/G keys to switch tools.
2019-05-01 20:32:38 +10:00
5fd69f6bd8 UI: show UV sculpt panels in the image editor 2019-05-01 20:32:38 +10:00
7aeb94686f Fix line width for image sample size display 2019-05-01 20:32:38 +10:00
e66629c128 Eevee: Lookdev: Cleanup implementation & support for Bloom and TAA
Make Lookdev works with bloom and TAA by rendering it before TAA and fixing
the motion vectors of the lookdev balls.

Rework Lookdev to remove much of its complexity. Use simpler matrices with
more understandable setup code.
2019-05-01 12:09:18 +02:00
b581f19292 Eevee: Add support for alpha background in viewport
Viewport now displays alpha checkerboard pattern like Cycles does when
film alpha is set to "Transparent".

Some small workarounds were necessary for Depth of Field and correct TAA
support.
2019-05-01 12:09:18 +02:00
47717060af DRW: Draw checkerboard alpha pattern for Cycles
Add checkerboard alpha pattern like it was in 2.79
2019-05-01 12:09:18 +02:00
e6705fad33 DRW: Add DRW_STATE_BLEND_PREMUL_UNDER
Just basic alpha under operation with premultiplied source.
2019-05-01 12:09:18 +02:00
28ada66f38 Cleanup: long function call in interface_draw.c 2019-05-01 12:08:06 +02:00
60e71cba5b Industry Compat Keymap: Support recent feature to deselecting by clicking in empty areas
Same as default keymap
2019-05-01 11:24:48 +02:00
35214885c7 Cleanup: Redundant struct specifier 2019-05-01 10:51:19 +02:00
7191f66aa4 Cleanup: use BKE_pchan_mat3_to_rot / rot_to_mat3 utility functions 2019-05-01 13:55:50 +10:00
5915d1f453 BKE_pchan: add BKE_pchan_rot_to_mat3
Useful to get the un-scaled rotation from a pose channel.
2019-05-01 13:17:10 +10:00
340c564020 UI: move image paint panels into the image side-bar
- Move painting brush panels into the image side-bar.
- Add active tool panel to the image side-bar.
2019-05-01 12:35:00 +10:00
3ae872d9ab Fix T64049: Unset space type crashes 2019-05-01 11:48:39 +10:00
909665a0d4 ClangFormat: run with ReflowComments on source/
Prepare for enabling ReflowComments.
2019-05-01 11:13:14 +10:00
f70470b540 Cleanup: comments (long lines) in ikplugin 2019-05-01 11:01:20 +10:00
c7041403d0 Cleanup: comments (long lines) in compositor 2019-05-01 10:51:13 +10:00
63f0e150ed Cleanup: comments (long lines) in draw 2019-05-01 10:51:10 +10:00
480a09a92f Cleanup: redundant lookup 2019-05-01 08:49:35 +10:00
3482e136bf Fix error storing proportional editing for redo
Missed in recent changes to proportional edit mode.
2019-05-01 08:31:18 +10:00
Dalai Felinto
b7277aac72 Outliner: Fix "Unlink" not working for parented objects
How to reproduce it:
* Parent an object to another in the same collection.
* RMB the child object and try to "unlink" it.
2019-04-30 19:20:53 -03:00
910b886747 Cleanup: comments (long lines) in modifiers
Also remove duplicate comments in headers.
2019-05-01 08:04:52 +10:00
163fb251b9 Cleanup: comments (long lines) in compositor 2019-05-01 07:58:27 +10:00
1e8697cd80 Cleanup: comments (long lines) in freestyle 2019-05-01 07:58:27 +10:00
5ca8ac51d0 Cleanup: indentation from braces in '#if 0' 2019-05-01 07:58:27 +10:00
Dalai Felinto
ab33692bc2 UI: Collections Visibility panel tweaks
1. No need to repeat the title inside the panel (this was needed when we
had this as a popup menu).

2. No need to call it "Collections Visibility" since we are already
under the "View" category. It is "Collections" now, short and sweet.
2019-04-30 18:21:58 -03:00
20a8b07561 Fix broken build from recent rBae7db030dab0. 2019-04-30 22:17:32 +02:00
Dalai Felinto
d4126238b4 Cleanup/update comment on flag_legacy values 2019-04-30 16:48:07 -03:00
Dalai Felinto
1aa093ce9c Fix T63343: Duplicated object is hidden whereas it should not
We were mixing ob->flag and ob->base_flag.
We shouldn't be using ob->flag & SELECT in 2.8x.
2019-04-30 16:48:07 -03:00
Dalai Felinto
ae7db030da Stop using deprecated ob->flag & SELECT
We still have base->flag_legacy & BA_WAS_SEL for the few cases we really
need to have a per-object selection check (used in the transform code).
2019-04-30 16:48:07 -03:00
Dalai Felinto
2d32372c59 Remove BKE_scene_object_base_flag_sync_from_object
Note the fix for T62865 is still working fine.
2019-04-30 16:48:07 -03:00
Dalai Felinto
088d59c3d3 Refactor: Use object select API - ED_object_base_select
We had a mix of BKE_view_layer_base_select (harmless), and places where
we simply set the BASE_SELECTED flag with no regard to its selectable
state.
2019-04-30 16:48:07 -03:00
Dalai Felinto
c7452f14c5 Grease Pencil: Fix using wrong flag for selecting objects on convert
The correct fix should be to use ED_object_base_select() but I'm leaving
this to a separate pass.
2019-04-30 16:48:07 -03:00
Dalai Felinto
7388856318 Cleanup: Object base syncing already happening as part of ED_object_base_select
No functional change.
2019-04-30 16:48:07 -03:00
22cc69ace8 Industry Compat Keymap: Fix Knife tool
Was adding new cuts automatically.
2019-04-30 20:56:13 +02:00
2fd6e855a5 GPencil: Small tweak to Dot minimum thickness
This was changed in a previous commit to 1.0, but a value of 0.5 works better.
2019-04-30 17:49:28 +02:00
9a4fd6da0f Fix T63864 Duplicate Data options don't exist for Light Probe and Grease Pencil
See revision D4766
2019-04-30 17:37:16 +02:00
d48a2f4a37 Select: Add 'deselect on nothing' to NLA editor.
Should be last part of T63995.
2019-04-30 17:20:21 +02:00
26bc7414f7 Tweak to previous 'deselect on nothing' commit for Graph editor.
Better code, more in line with the one from action and NLA, and less
verbose.
2019-04-30 17:17:34 +02:00
a5df2a9b63 Fix (unreported) two memleaks in clic-select ops of Action and NLA editors. 2019-04-30 17:05:34 +02:00
b1f7647236 Select: Add 'deselect on nothing' to Action (dopesheet) editor.
Also removed annoying console error when clicking outside of valid range
of channels, that is no error at all. ;)

Part of T63995.
2019-04-30 16:51:44 +02:00
de38778535 Select: Add 'deselect on nothing' to Graph (fcurves) editor.
Part of T63995.
2019-04-30 16:26:31 +02:00
86ff61f853 Select: Add 'deselect on nothing' to UV editor.
As with mask, when this is enabled there is now a maximum click distance
from an item to actually select it.

Part of T63995.
2019-04-30 16:09:58 +02:00
40b66ac2a6 Fix proportional editing always enabled if the property exists in the
operator

Fixes T64010, T64011

Reviewers: brecht

Maniphest Tasks: T64010, T64011

Differential Revision: https://developer.blender.org/D4764
2019-04-30 15:29:31 +02:00
34944a2035 Refactor markers drawing
This will make it easier to move the markers area somewhere
else (to the top) in a separate step.

There should be no functional changes, only minor UI changes.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4745
2019-04-30 14:17:53 +02:00
7f0b122b66 Refactor: Separate scrollers from text drawing in API
This is a continuation of rB7fdffd735ff24, where I separated the
e.g. frame number drawing from scrollers internally.
This patch changes the API, so that space draw handlers
have to draw these numbers explicitely.

This greatly simplifies the scrollers API for all spaces
that just need scrollers without any frame numbers.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D4747
2019-04-30 14:10:53 +02:00
2445d5abc2 Fix T63393 Eevee: Specular Shader's Clear Coat does not function 2019-04-30 14:07:22 +02:00
d1f6ea2793 Sequencer: Scene Strip Performance
- Merged SEQ_OFSDRAW with V3D_OFSDRAW and define in the
       DNA_view3d_types: Due to this FSAA always kicked in making the
       rendering slow.
     - Removed `Texture Solid` and `DOF`.
     - Now when chosing Solid rendering the settings
       of the original scene is used.
     - Added a global override to use scene specific shading. In the
       Future we will need to enhanced this so user can change the
       settings.
     - Added support for LookDev. LookDev crashed as it needed the
       `evil_C` what was not set
     - LookDev mode will always show the scene + world lights.

Reviewed By: brecht, fclem

Maniphest Tasks: T62517

Differential Revision: https://developer.blender.org/D4738
2019-04-30 14:01:22 +02:00
3e780507bd Fix T63759 Vertex Bevel works for width and depth offset types.
From D4719 by George Vogiatzis (Gvgeo).
2019-04-30 07:13:22 -04:00
e15c8ee447 Fix T64003: cannot enter object dimensions above 10000
When this button was still RNA based it was FLT_MAX (that changed to
10000 in rB1b8c3774a86e)

Reviewers: brecht

Maniphest Tasks: T64003

Differential Revision: https://developer.blender.org/D4763
2019-04-30 12:58:35 +02:00
e8daa61570 DRW: Add debug utility for batch cache requests 2019-04-30 12:55:03 +02:00
782917648f Fix T64009 Normal Maps not working on EEVEE
Was missing a flag from recent refactor.
2019-04-30 12:55:03 +02:00
Harley Acheson
395fa5eb4c Fix T63912: don't collapse menu separators for pie menus
Differential Revision: https://developer.blender.org/D4748
2019-04-30 12:40:24 +02:00
80c3501d19 Fix T63865: Animated Influence slider of NLA Strip doesn't update
Add special case to construct PointerRNA from evaluated NLA strip
to an original one when flushing animation back to the original ID.

Reviewers: brecht

Maniphest Tasks: T63865

Differential Revision: https://developer.blender.org/D4762
2019-04-30 12:10:18 +02:00
73e8d1096a Depsgraph: Store pointer to original NLA strip
Similar to modifier data and particle systems.
2019-04-30 12:10:18 +02:00
56fd032393 T63854: Grease Pencil strokes appear too thick in the viewport when using texture mode
There was an arbitrary size limit of 4 pixels.
2019-04-30 11:59:48 +02:00
7a0b3f927c Select: Add 'deselect on nothing' behavior to tracking editor.
Part of T63995.
2019-04-30 11:34:22 +02:00
7f4836a0a7 Cleanup: typo in func name. 2019-04-30 11:34:22 +02:00
7f75017635 Cleanup: make 'deselect_all' properties PROP_SKIP_SAVE.
Forgot to do that for some in previous commits, that kind of props are
better with 'skip save' behavior (simpler to handle in keyconfigs).
2019-04-30 11:34:22 +02:00
080d72a257 Select: change Sequencer to match new behavior of 'deselect on nothing'.
Note that unlike some others, this is always enabled for sequencer,
since previous (2.7x) code was already deselecting everything when
clicking in an empty area...

Part of T63995.
2019-04-30 11:34:22 +02:00
e4b9836c53 Cleanup: Remove pre-2.5 ifdef'ed piece of code. 2019-04-30 11:34:22 +02:00
ab62a5db49 Select: add 'select on nothing' to Outliner.
Althought this has limited usability currently (only 'nothing' area in
Outliner are empty lines below last entries), better for consistency to
have it here too.

Part of T63995.
2019-04-30 11:34:22 +02:00
a17d1e4bc8 Cleanup: use bool literal for booleans. 2019-04-30 11:34:22 +02:00
3d0864200d Cleanup: make outliner_item_do_activate_from_cursor() static.
This function is only used in one place in one file, no point exposing
it in internal header currently...
2019-04-30 11:34:22 +02:00
3644fef07c Select: Add 'deselect on nothing' to nodes selection.
Part of T63995.
2019-04-30 11:34:22 +02:00
aa6a0409eb Select: proper handling of 'deselect on nothing' for GPencil edit mode.
Was unconditionnaly behaving that way, now use proper common setting to
control whether we should deselect everything when clicking on an empty
area.

Part of T57918.
2019-04-30 11:34:22 +02:00
9586c23d75 Select: support 'diselect on nothing' for masks.
Also moved that operator option from 3d-view op to generic
WM_operator_properties_mouse_select() helper, and renamed its label
(since 'Deselect' is already in use).

Part of T57918.
2019-04-30 11:34:22 +02:00
d7e2fe275d Depsgraph: build bbone operation if bone segments has animation
This is a part of T61296: Crash with animated b-bone segments.

Consider animated/driven bendy bones segments as something what requires
special bendy-bones operation and relation in the dependency graph.

This is because it is more beneficial from a performance point of view
to not build operations if they are not needed. But if the property is
animated it is not possible to make any reliable decision based on just
a property value.

Differential Revision: https://developer.blender.org/D4739
2019-04-30 11:32:02 +02:00
6bbb82cf79 Depsgraph: Use new animation cache for visibility check
Should be no functional changes, just switching code to use more
generic checks now.

One thing which goes a bit deeper than that is check for whether
base is a part of dependency graph. This is now done by explicitly
tagging corresponding ID node (of an object) rather than doing
animation check again.
2019-04-30 11:32:02 +02:00
c8f3377d03 Depsgraph: Add generic animated properties cache
Allows to speed up lookups like "is property FOO of data BAR animated".
Can be used to optimize object's visibility check, but also allows to
check animation on bones without too much of time penalty.

The cache is shared between both nodes and relations builder.

Currently is not used, just a boilerplate for an upcoming changes in
an actual logic.
2019-04-30 11:32:02 +02:00
587ee46d88 Depsgraph: Expose set type available
Is way easier to use than a GSet and less proone for errors.

If we really want GSet to always be used, should make some C++
wrapper.
2019-04-30 11:32:02 +02:00
4d889897ba Fix T63592 issue with control points.
This is a missing fix in previous commit of this task.
2019-04-30 11:27:33 +02:00
546e20f5a2 UI: show transform options in image header when topbar is hidden
Matches 3D view behavior.
2019-04-30 15:04:07 +10:00
e83d4d9637 UI: reorganize proportional editing options
- Move connected & projected into individual toggles.
- Top-level proportional editing button now only toggles.
- Use popover for proportional edit-mode falloff and options.

Note that it's no longer possible to toggle connected via key bindings,
although this could be supported again if it's needed.

Resolves T58081
2019-04-30 14:48:39 +10:00
95a9646c00 Cleanup: comments (long lines) in physics 2019-04-30 14:48:18 +10:00
5d7ee02b17 Cleanup: comments (long lines) in collada 2019-04-30 13:41:21 +10:00
d9fb06f876 Gizmo: display axis in camera view
User request to see axis even when in camera view,
it's also useful when the camera is locked to the view.
2019-04-30 10:51:14 +10:00
0470818411 Fix T59848: precisely represent the dependencies of Armature modifier.
When the modifier uses vertex groups, the set of the bones it actually
needs is precisely defined by the set of the group names. If envelopes
are enabled, this refinement is not available, because any bone can
potentially be used.

This can be used in the dependency graph construction to allow objects
deformed by a part of the armature to be used in constraints on other
bones, e.g. for placing cartoon-style face elements on top of the body
mesh via Shrinkwrap constraints.

Since the list of vertex group names is now used as an input by
the dependency graph, adding/removing/renaming groups should now
be triggering a graph rebuild.

Differential Revision: https://developer.blender.org/D4715
2019-04-29 20:52:11 +03:00
413ffd4606 DRW: Batch Cache: Add Loop normals calculation flag and cleanup style
Improve selection time since it bypass BM_loops_calc_normal_vcos when mesh
uses auto-smooth.
2019-04-29 18:51:07 +02:00
c7767f1bcf DRW: Improve edit mode selection time when using auto-smooth
Unfortunately it does not concern paint mode.

Related to T63946
2019-04-29 18:51:07 +02:00
88e20c663c DRW: Speedup: Improve time to validate batch cache
This is a small improvment but is does scale up with the number of objects.
This improvement *does not* speedup geometry update.
2019-04-29 18:51:07 +02:00
fa5dd59f98 Industry Compat Keymap: Small fixes
- Use W for Move in Sequencer
  - Use correct shortcut for sidebar in Sequencer
  - Remove inconsistent shortcut for adding nodes
2019-04-29 17:21:38 +02:00
a494be2f2e Fix T63979: GPencil control points hidden in orthographic mode 2019-04-29 17:20:54 +02:00
11b65b4ade GPencil: Improve Fill Tool speed (6 times faster) in complex files
There was a double loop when drawing the offscreen data for the fill tool. This loop did an exponential drawing, slowing a lot the process.

For example, one file was using 7.39 seconds and now use 1.20 or less to do the same process.

The fix is more noticeable with big files, reducing exponentially the time used by the tool. For very simple files the speed change can be unnoticeable.

Aso fixed a hidden bug with stroke opacity that it was unnoticeable due the double loop.
2019-04-29 16:24:41 +02:00
98a717eb20 UI: move properties panel into 'Item' category 2019-04-30 00:14:40 +10:00
7ae47e58cb Cleanup: Spelling in comment 2019-04-29 15:52:39 +02:00
a03e16224b Missed last commit (workspace template checks) 2019-04-29 23:48:39 +10:00
17a4decfea UI: top-bar reorganization
This hides the top-bar by default for everything
besides paint/sculpt workspaces.

- Use the top-bar mainly for active tool settings &
  popovers panel options.
  (transform / snap settings are an exception for this convention).
- Only show the top-bar (by default)
  in paint work-spaces (sculpt / texture-paint / grease-pencil).
- Add an active-tool panel to the sidebar.
- Split 3D view tabs into (Item / Tool / View).

D4721 with minor changes.

Further work is needed for the top-bar and image-editor.
2019-04-29 23:35:13 +10:00
1c4fa32db6 Fix: Dopesheet context menu was referencing easing_type
This only exists in Graph Editor.
2019-04-29 15:12:42 +02:00
e65216c622 Industry Compat Keymaop: Clear use of Tab in remaining editors
This makes it possible to use Tab for operator search everywhere.
2019-04-29 15:11:33 +02:00
d055b48e31 Fix T63592: Grease pencil - Guides still active in Fill mode
Enable guides only for Draw tool.
2019-04-29 13:20:25 +01:00
f9ee08610a Cleanup: comments (long lines) in misc libraries 2019-04-29 22:06:26 +10:00
bbbf166430 Cleanup: comments (long lines) in alembic 2019-04-29 22:06:26 +10:00
ee192a35e8 Cleanup: comments (long lines) in bmesh 2019-04-29 22:06:26 +10:00
d17e07274a Cleanup: comments (long lines) in nodes 2019-04-29 22:06:26 +10:00
a57fec986d Depsgraph: fix dependencies for drivers and animation on Bone properties.
The driver code was almost there, but didn't work because ID nodes
have no outlinks - and using links won't be safe anyway because of
ordering issues. Instead, just loop over all IDNodes.

Animation is fixed simply by referring to ARMATURE_EVAL instead of
BONE in construct_node_identifier - the bArmature ID doesn't have
BONE components in any case, so the old identifier can't work.
2019-04-29 13:32:11 +03:00
788bbac5bd Depsgraph: fix handling of driver variable dependencies with proxies.
During driver var evaluation, the code directly skips to the proxy
object if present, so the dependencies should reflect that, instead
of inventing extra relations to pretend as if the values were
first copied from the proxy - they actually aren't.

The invented dependencies can't work without cycles in complex but
meaningful cases, e.g. drivers on armature data that depend on pose.

This alters the changes from 72cbf966fb to be more correct.
2019-04-29 13:09:20 +03:00
778542fd8f Cleanup: comments (long lines) in python 2019-04-29 20:01:10 +10:00
c7f67d60fb Cleanup: comments (long lines) in editors 2019-04-29 19:29:41 +10:00
9bb47c512f Industry Compat Keymap: Use correct keys for transform in the Dopesheet
Support WER inside this editor.
2019-04-29 10:51:49 +02:00
ea940bcb53 New BLI_NOINLINE macro
This macro is handy in at least two occasions:
* When you want to check the optimized generated assembly for
some small function that would get inlined otherwise.
* The marked function will be visible in profiling results.

I can't test the implementations for other compilers now,
so I did not include them.

Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D4754
2019-04-29 10:46:04 +02:00
383fef9f10 Fix T63616: applying armature modifier with another modifier under it doesnt apply right.
Some deform modifiers (like armature) use passed Mesh parameter to
retrieve some extra data (vgroups in our case), and default to obdata
when it is not available.

This should be fine in theory in the 'apply modifier to obdata' case,
since this is always the first modifier, but here upper-level code
passes **evaluated** object, not orig one, so ob->data is not orig
anymore, and might miss some stuff...

Note that am quiet unsure whether the way evaluated data is passed
around in that apply modifier operator code is actually OK, but for now
it seems to work at least...
2019-04-29 10:08:16 +02:00
f54192e09a Cleanup: internal apply modifier code: make it clear we use eval modifier and object. 2019-04-29 10:03:58 +02:00
564ffc060b Fix T63963: Top-bar not showing for some files 2019-04-29 17:32:39 +10:00
94b7e1dcc6 Fix T63112: Gizmos fail to restore last cursor 2019-04-29 16:43:51 +10:00
c8bcddedff Fix T63977: UV select linked has no attribute 'extend'
Also enable undo + register for select linked.
2019-04-29 16:00:39 +10:00
90a06259ee Fix T63503: Set parent menu shown twice
When the 'type' property is set,
execute the operation instead of showing the menu.
2019-04-29 15:42:36 +10:00
d2859237fa Fix T63898: "Open on Mouse Over" causes inconsistent draw-style 2019-04-29 15:25:56 +10:00
14897fb653 Cleanup: spelling 2019-04-29 14:14:14 +10:00
8821757d0d Fix region action zone not working when hidden
Introduced in recent fix for T61554
2019-04-29 13:47:11 +10:00
dc2ce40c95 Docs: expand action-zone type comments 2019-04-29 13:45:49 +10:00
8b11b8b3cf Fix shift-click to select multiple reports
D4751 by @Poulpator
2019-04-29 12:56:45 +10:00
bdefce0b21 GTest: BLI_path_util tests
Unit tests for:

- BLI_path_extension_check
- BLI_path_frame_check_chars
- BLI_path_frame_range
- BLI_path_frame_get

D4749 by @zazizizou
2019-04-29 12:51:33 +10:00
f2acf3bab6 Cleanup: use 'use_' prefix for RNA booleans 2019-04-29 11:26:17 +10:00
337cac760b VSE: Cache rewrite
This patch implements new cache system.
Aim is to give user more control over cache, so it can be maximally
utilized. This is done through sequencer timeline side panel
in category proxy & cache.
Cached images are also visualized in timeline, controled by
sequencer timeline view->cache menu

Functional changes:
 - NOT use IMB_moviecache API
 - refactor names of cached image types
 - each scene owns 1 sequencer cache
 - merge preprocess cache into per-sequencer cache
 - cache links images rendered per frame in order as they are created
 - add cache content visualization tool
 - add RNA properties to control the cache

More info can be found in design notes in blenkernel/intern/seqcache.c
and in https://developer.blender.org/D4443

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4443
2019-04-28 14:50:48 -07:00
1b65ec0a9b GPencil: Cleanup - Rename annotation drawing function names
Actually, the static functions had the same name used for grease pencil.

Now, the annotation functions have a different prefix.
2019-04-28 20:14:20 +02:00
Tomoaki Kawada
9e3246ce6e Fix T63794: duplicating an armature clears B-Bones' custom handle references.
This patch fixes T63794 by updating duplicated bones' custom handle references
to point to the new armature's bones.

The problem occurs because B-Bones of a duplicated armature keep pointing to
the old armature's bones. The references are cleared upon entering Edit Mode
because there are no matching `EditBone` for such bones, and `find_ebone_link`
just returns `NULL` in such cases.

Reviewers: mont29, angavrilov

Maniphest Tasks: T63794

Differential Revision: https://developer.blender.org/D4726
2019-04-28 17:05:37 +03:00
91bb8da59f Cleanup: clangg-format for rB157cc54ed521 2019-04-28 11:48:55 +02:00
d2f1705b15 Fix T63936 GPUSelect: Read depth in the end
fix T63936 introduced  in 86914e7133.

Reviewers: fclem

Reviewed By: fclem

Tags: #bf_blender

Maniphest Tasks: T63936

Differential Revision: https://developer.blender.org/D4750
2019-04-27 20:37:29 +02:00
6cb90d180f Fix T63937: unconfirmed grease pencil strokes not visible in ortho suface
The value of the z-depth was too high. Now the value is valid for perspective and orthographic view.
2019-04-27 19:27:20 +02:00
19ebee657e GPencil: Cleanup derived frame code
This is a previous step to move away the derived frame logic to be used in edit modes.
2019-04-27 12:02:26 +02:00
aa42da0385 Cleanup: comments (long lines) in blenkernel 2019-04-27 12:07:07 +10:00
fd1dd1134b Cleanup: unused vars 2019-04-27 10:00:43 +10:00
157cc54ed5 Fix T63899: Can't get sound.factory on Windows 2019-04-27 00:13:43 +02:00
1fa7d51f34 Eevee: Noise Texture: try to fix floating point accuracy issue
Cycles check for infinity and return 0.0 otherwise.
2019-04-26 18:37:24 +02:00
941575b1f7 Fix T63853: BLI_current_working_dir did not return utf8 encoding on windows.
When running blender in paths with special characters this caused issues.
2019-04-26 09:53:55 -06:00
0fddc48fb2 Minor cleanup in data transfer code. 2019-04-26 17:21:10 +02:00
8973d1e769 Fix T63660: Data Transfer of normals No Longer Working.
Logic about computing of poly normals in final stage of modifier stack
evaluation was broken, giving also wrong loop normals.
2019-04-26 17:21:10 +02:00
8192bcd7c1 Fix T63886 Crash in UV Editing after faces display turn off / on
This patch also improve cache locality of the IBO filling. I did not benchmark if it made
any difference.
2019-04-26 17:03:25 +02:00
fe7605b710 Cleanup: Armature 2019-04-26 16:47:26 +02:00
7a48e25003 Armature: Speedup by removing unecessary check
drw_batch_cache_generate_requested() is only needed when the geom needs to be
created.

Went from 37fps to 47fps with artificial testcase (lots of bones with one custom shape). Baseline 2.79 is 24fps.

Also fix the drw_shgroup_bone_custom_wire.
2019-04-26 16:37:15 +02:00
d4827cfa81 Fix T58966 Sculpted changes dissapear visually when selecting a second object
Display sculpt mesh if there is a sculpt session.
2019-04-26 16:17:35 +02:00
86914e7133 GPUSelect: Don't read depth on every draw
If the draw uses the same id as the previous draw, there is no need to read the depth
buffer at this point, avoiding a CPU-GPU sync bubble.

Fixes T62511 Selection is significantly slower in production scenes.
With this patch glReadPixels is not the bottleneck. Regular drawing Is still very
slow so I would suggest fixing the regular drawing first before trying to
improve the selection algorithm.
2019-04-26 15:33:49 +02:00
50d75cd528 Fix T62880 Severe FPS drop with multiple bone shapes
Fix instancing batches not being reused by custom bone shapes.

Drawing thoses is now faster than 2.79 (40fps instead of  30fps)
2019-04-26 15:33:49 +02:00
03d482d212 Fix T63896: Removing Drivers in Python Leads to Crash
Adding and removing drivers must always tag relations for update.
2019-04-26 15:31:13 +02:00
7440f98f98 Fix T63897: GPencil Material Presets showing error
This error was introduced in a previous commit with the rename of the parameter.

Also added some missing values.
2019-04-26 10:14:50 +02:00
513b71c89a Keymap: Support shift-click to select multiple reports
Also support drag for box-select, matching the outliner.

D4660 by @Poulpator with edits.
2019-04-26 16:00:27 +10:00
20c5f677d7 Cleanup: clang-format 2019-04-26 13:04:23 +10:00
e10884323e Cleanup: unused variable warning 2019-04-26 13:02:44 +10:00
16639c6f1a Fix T63784 Eevee : Black Diffuse with Principled BSDF and Mix Shader
This was cause by the SSS energy being lost when using SSRefraction. Also the mix
shader did not merge the discarded SSS light into the radiance.
2019-04-26 00:14:28 +02:00
ce148c1374 Cleanup: Node shader texture image 2019-04-25 23:23:27 +02:00
e85eb51a28 AVI: Fix buffer overflow
That was causing crashes when loading uncompressed avi files created with blender 2.79.
2019-04-25 23:23:26 +02:00
56b0cd1db6 Fix T63605: Assert squeezing a template_curve_mapping in a panel to
almost zero horizontally

Reviewers: brecht

Maniphest Tasks: T63605

Differential Revision: https://developer.blender.org/D4690
2019-04-25 21:59:05 +02:00
Bruno Boaventura Scholl
b4c14faeaf Text editor: convert tabs to spaces on paste
If the Tabs as Spaces settings is enabled for the text block. This avoids
issues with inconsistent indentation when pasting Python code from another
source.

Differential Revision: https://developer.blender.org/D4512
2019-04-25 19:25:58 +02:00
George Vogiatzis
4d1128872e UI: keep timeline collapsed to header size when resizing window
This restores functionality lost with e8c9e85401.

Differential Revision: https://developer.blender.org/D4714
2019-04-25 18:19:54 +02:00
George Vogiatzis
7f45e79e1a Cleanup: remove unneeded screen_refresh_headersizes
screen_geom_vertices_scale already checks if areas are too small for header.
And header size will be set in region_rect_recursive from ED_area_initialize.

Differential Revision: https://developer.blender.org/D4711
2019-04-25 18:19:54 +02:00
Harley Acheson
5a10552745 Fix small outliner drawing performance regression
Differential Revision: https://developer.blender.org/D4712
2019-04-25 18:19:54 +02:00
Harley Acheson
b89cabb300 UI: hide redundant menu separators automatically
Differential Revision: https://developer.blender.org/D4682
2019-04-25 18:19:47 +02:00
905f2d84af DRW: Use culling when selecting
The culing still seems to be off but at least it is enabled now.
2019-04-25 17:27:21 +02:00
21aa4d73bf DRW: Cleanup: use iter_flag const for readability 2019-04-25 17:27:21 +02:00
c04dcde0ba Fix T63846: In Orthographic View, unconfirmed Grease Pencil strokes do not appear in front of Reference Images
In orthographic, the z-depth was wrong.
2019-04-25 17:11:58 +02:00
dedd3338d6 Cleanup: remove verbose debug print 2019-04-25 16:31:02 +02:00
4c14d820e3 Tracking Pie Menus for Blender 2.8
This patch adds 4 pie menus to space_clip.py, as discussed in T57912.

Differential Revision: https://developer.blender.org/D4284
2019-04-25 16:07:15 +02:00
7c6c5b40ca Sequencer: use Alpha Over blend mode by default
Reviewers: ISS, brecht

Differential Revision: https://developer.blender.org/D4737
2019-04-25 15:23:53 +02:00
2947888eae Industry Compat Keymap: Support box select for more tools with gizmos
-Extrude Region
-Spin & Spin Duplicates
-Shear

Again, MMB is used here to execute the tool outside the gizmo perpendicular to the view
2019-04-25 15:08:33 +02:00
b77c10b45c Merge branch 'blender2.7' 2019-04-25 14:31:45 +02:00
10c4bde792 Fix T63494: linked scenes missing from sequencer Add > Scene menu
Differential Revision: https://developer.blender.org/D4674
2019-04-25 14:29:26 +02:00
Harley Acheson
0d26bb7672 Fix inconsistent collection/object hide icon brightness in outliner
Differential Revision: https://developer.blender.org/D4679
2019-04-25 14:29:26 +02:00
eda7e84aac GHOST: remove OpenGL depth buffer, remove code for other unused buffers
Viewport drawing has moved to offscreen buffers, and we no longer need to have
depth, stencil, aa samples, sRGB buffers as part of the window. So all that
code is removed now. The depth buffer was the only one still being allocated,
its removal save a bit of memory.

Code by Germano and Brecht.

Differential Revision: https://developer.blender.org/D4708
2019-04-25 14:29:26 +02:00
9408023a81 Fix T63344: broken topology after sculpting with clay strips brush
Differential Revision: https://developer.blender.org/D4710
2019-04-25 14:29:26 +02:00
deb9d03fc9 Fix T63859: outdated info editor description
Contributed by EitanSomething.

Differential Revision: https://developer.blender.org/D4735
2019-04-25 14:29:26 +02:00
92f5e52af3 Industry Compat Keymap: Support box selecting while the transform tools are active
Similar to many apps:
  - Use left click and drag to box select
  - Hold modifiers like Ctrl and Shift to remove or expand selections
  - Use MMB-drag to use the tool outside of the gizmo area

In the future it would be nice if the transform tools would have this increased flexibility built-in so you could configure it more easily, but this setup seems to at least make it do the most commonly useful thing by default.
2019-04-25 14:12:17 +02:00
Alex Fuller
2adf4b401e Fix for Cycles UV adaptive subdivision after float2 changes.
Differential Revision: https://developer.blender.org/D4717
2019-04-25 14:05:33 +02:00
7e18aa4250 Fix T63524: crash selecting an object in texture coordinate node
Using mat4 in a uniform buffer object was not properly supported.
2019-04-25 12:13:26 +02:00
38a0896f15 Overlay: Mesh Analysis
Enabling the drawing of the mesh analysis overlay.
Currently the settings are part of the scene toolsettings. What makes sense,
for 3d printing, but does not fit well with the per viewport blender 2.80
overlays.

Reviewers: brecht, fclem

Differential Revision: https://developer.blender.org/D4707
2019-04-25 11:25:22 +02:00
486d9356ba Fix opening files from splash screen 2019-04-25 11:03:09 +02:00
6d09fa3577 DynamicPaint: Remove Previews
Modifier previews should be implemented by a more generic system.
The current system is already a hack and needed a lot of work
to get it working again in 2.80 and even so that would be replaced by
another system in the near future.

For Vertex Colors we have a work around in place by using Workbench
Vertex Colors. For Vertex Weights we loose the previewing. Not sure
targetting weight is working (even for 279).

Reviewed By: brecht

Maniphest Tasks: T63857

Differential Revision: https://developer.blender.org/D4734
2019-04-25 08:02:18 +02:00
Dalai Felinto
78f8679cfc Outliner parenting hierarchy: Sort for children when not a-z sorting
We always keep the children that are not in a collection listed in the
end of the children list due to design. This way we can visually draw
them with dashed vertical lines.

This was already working for alphabetical sorting, however whenever
sorting was disabled, we would end up with a list of children ordered
regardless of their state (whether the child itself is in the collection).
2019-04-25 01:47:24 -03:00
Dalai Felinto
edff789292 Fix T63869: Crash in new outliner show parenting hierarchy
As known as outliner parenting hierarchy take two.
Implemented suggestion by Brecht Van Lommel:

```
The problem is that it's iterating over te_parent->subtree,
while at the same time removing elements from it as tree_to_remove_objects_from.

Further there is a linear lookup to find tree elements corresponding to a child
object, which causes O(n^2) time complexity overall and so poor scaling for many
objects in a collection.

The more efficient solution that also fixes the crash could be:

* Build a map from Object* to a list of TreeElement* matching the object.
* For all objects in the tree lookup the parent in this map, and move or add
  tree elements as needed.
```

I removed the grouping of the children not in collection in the end of
the children list when sorting was not enabled. If we think we really
need it back it can be tackled separately.

That said, despite due to performance reasons, I can't see why would
someone not have the a-z sorting enabled. And if they do, it is not the
end of the world to have interleaved children that are in the collection
or not in the parent subtree.
2019-04-25 01:23:41 -03:00
fbb03f67ec Fix T63528: Alembic export always showing error on macOS, even on success
tellp() is not valid to check if the string stream is empty. Just get the
string directly as there is no obvious efficient method to check otherwise.
2019-04-25 03:46:11 +02:00
2fabbe3108 Cycles: tweak preferences text when no compatible GPUs are found
Try to make it more clear that this only affects Cycles, many users seem to
miss the panel title.
2019-04-25 03:46:11 +02:00
d966c2f0c2 Fix T63869: disable outliner show parent hierarchy temporarily
This is likely to cause crashes in many file, so disable this feature until
it is fixed.
2019-04-25 00:25:06 +02:00
78e3a7b353 Cleanup: fix compiler warning 2019-04-25 00:24:17 +02:00
5d9d32fd1f Fix T63841: armature with X-axis mirror does not mirror bbone scale
Reviewers: brecht

Maniphest Tasks: T63841

Differential Revision: https://developer.blender.org/D4733
2019-04-24 22:29:17 +02:00
a14735d11d Fix T61184 linked curves with curve modifiers arent drawn correctly
Force Displist to Mesh conversion if there is any modifier.

This is until we find a better way to store the batches per objects.

Also fix draw cache functions that were not returning final mesh edges.
2019-04-24 19:11:36 +02:00
c265e25bb1 Correct switched values in the previous commit. 2019-04-24 13:31:35 -03:00
fa4201f82d Fix T62701: Hair edit mode crashes on some old AMD Radeon drivers.
The crash is related to the format, but the real reason is unknown.
2019-04-24 13:19:02 -03:00
ca41548626 UI: Simple confirm dialog when loading new file
I also had to make the "New" operator a submenu in the
`File Context Menu`, so that you can still select the template.

This partially solves T61599. Currently the confirm dialog
is not shown when an already existing file is opened.
Implementing that requires a bit more work and will be
done in a separate patch.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4732
2019-04-24 17:45:34 +02:00
ea80264381 Refactor: allow event handlers to have a poll function
Previously only a fixed bounding box could be used.
This was not flexible enough.
T63193 will benefit from this refactor.

Reviewers: brecht, campbellbarton
2019-04-24 17:34:48 +02:00
7a92b8820b Cycles: remove hair minimum width support.
This never really worked as it was supposed to. The main goal of this is to
turn noise from sampling tiny hairs into multiple layers of transparency that
do not need to be sampled stochastically. However the implementation of this
worked by randomly discarding hair intersections in BVH traversal, which
defeats the purpose.

If it ever comes back, it's best implemented outside the kernel as a preprocess
that changes hair radius before BVH building. This would also make it work with
Embree, where it's not supported now. But it's not so clear anymore that with
many AA samples and GPU rendering this feature is as helpful as it once was for
CPU raytracers with few AA samples.

The benefit of removing this feature is improved hair ray tracing performance,
tested on NVIDIA Titan Xp:

bmw27: +0.37%
classroom: +0.26%
fishy_cat: -7.36%
koro: -12.98%
pabellon: -0.12%

Differential Revision: https://developer.blender.org/D4532
2019-04-24 14:39:47 +02:00
Dalai Felinto
5f888e65c3 Outliner: Show parenting hierarchy in view layer view
If the "Object Children" filter is enabled, we nest the object children inside
the object. If the child itself is not in the collection, it is grayed out,
connected by a dash line, and its restriction flags and contents are not shown.

If "Object Children" filter is disabled, it works as before.

Note: This is not super fast, but at least we traverse the tree only once to get the
children of an object. That said, there is a lot of loops going on here.

Task T63526.

Development notes:
I could use the GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR shader, but
that would mean I would need to iterate over the tree twice (once for
each shader) - or do some bigger refactor.

Also I could not get that shader to work. This shader expects float
vertices while the current one is using integers, so converting the code
would make the dash line drawing to diverge from the regular lines even
further.

Differential Revision: https://developer.blender.org/D4696
2019-04-24 11:42:55 +00:00
cc5a75d572 Cycles: move shader node versioning code to C
Shader nodes are now shared with Eevee, so makes more sense to have it in
the core and not be Cycles specific.

Fix T62415: issues with append/link of old Cycles settings.
2019-04-24 12:44:27 +02:00
d730e512ac Nodes: avoid slow and unecessary node group updates on file read
On file read we need to update group nodes in case the group they refer to
has changed its inputs and outputs. This had O(n^2) time complexity and was
updating all datablocks even if they did not change.
2019-04-24 12:44:27 +02:00
62421470ee Nodes: remove group node forward compatibility with version 2.66
Forward compatibility with that version is already long gone, and removing
it means we can avoid running some complicated code on every file read/write.
2019-04-24 12:44:27 +02:00
1978066e04 Nodes: better integrate node init and versioning in file reading
Node versioning code was added before there was a mechanism to do versioning
after lib linking. Now integrate with that system and make it less of a strange
exception. Node versioning is now skipped on undo, like other versioning code.
2019-04-24 12:44:27 +02:00
bde1561fc1 Fix T63566: Pop-up closes before mouse-over
Closely spaced buttons caused the curve clipping popup to close
before the cursor could mouse-over it.
2019-04-24 20:27:47 +10:00
cfe9c7b3bd Refactor: Separate template selection from read_homefile operator
This is a first step towards T61599.
This way the invoke function can be used for the confirm
dialog in a separate patch.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D4723
2019-04-24 11:59:22 +02:00
8955ec6776 Fix T55326: Massive slowdown when animating material in a highpoly mesh
This is a dependency graph part, which is the last required bit to get the
issue solved after all the rest of the work done by Clement.
2019-04-24 11:29:45 +02:00
8ba4c38643 GPencil: Disable Stroke Textures in Solid mode
When solid mode is enabled, but Texture mode is disabled, the color of the stroke must not use the texture.
2019-04-24 11:27:34 +02:00
75919c9223 GPencil: Add small offset to follow the drawing path for single points
The offset added allows to generate a vector to determine direction. This direction will be used when rotate the object to rotate texture.

The solution is not 100% perfect, but it's far better that having an unpredictable rotation.
2019-04-24 10:45:08 +02:00
d7672ad0f7 Fix tool settings showing in the top-bar
Each spaces top-bar wasn't showing it's own active tool,
Remove RNA access to the workspaces tool since using it is error prone.
Eventually this should be completely removed.
2019-04-24 16:11:16 +10:00
2753959ed7 Cleanup: sort CMake include paths 2019-04-24 14:41:12 +10:00
1b839e85e1 Haiku: build fix
D4693 by @miqlas
2019-04-24 12:30:35 +10:00
200ba76495 Cleanup: remove unused transform tool
D4695 by @kamran
2019-04-24 12:08:07 +10:00
4312b47e83 Fix T63822: Sidebar tabs active area dead-zone #2
Take the entire gutter used for panel tabs into account.

Introduced in recent fix for T61554
2019-04-24 12:05:21 +10:00
411b5f3b10 Fix T63822: Sidebar tabs active area dead-zone
Clip on one axis for aligned regions to avoid tabs being clipped out.

Introduced in recent fix for T61554
2019-04-24 06:57:36 +10:00
2ffc3dfc09 Fix action zones getting out of sync with panel size
Change to recent fix for T61554
2019-04-24 06:16:47 +10:00
211c5b4429 Cleanup: correct rst string literals 2019-04-24 05:45:21 +10:00
ec57ff2800 Fix building with asan option and OSL.
When OSL is enabled, Cycles disables RTTI in some of its modules, which
then breaks vptr sanitizer (part of the 'undefined' sanitizer).

thanks to @brecht for helping tracking down the issue.
2019-04-23 21:00:40 +02:00
148c0aa0fa Fix T63178 Eevee animation render crash
If image buffer is not loaded and blender attempts to reload it (during
`BKE_image_acquire_ibuf`) over and over for each frame rendered.
When attempting this reload, image_load_image_file is calling
`BKE_image_free_buffers` and tag the Image to the (GPU) image_free_queue
(because this run on the rendering thread).

If the main thread decide to redraw the UI and go through `GPU_free_unused_buffers` they all get deleted and if that happens before the rendering thread use them ... segfault.

If I replace the environment textures with correct ones (the file does not seems to contain them), there is no crash when rendering.

I used a list of GPUTexture from blender Image to increase and decrease the
reference counter correctly.

This add very little memory and computation overhead.
2019-04-23 20:35:02 +02:00
d10205c1a7 GPUBuffers: Fix wrong assert
For good this time...

forgot to commit it in the previous commit rBedde48f57844.
2019-04-23 20:35:02 +02:00
f32902e6da Fix T63813: crash saving images on Windows
The danger of void pointers...
2019-04-23 19:06:17 +02:00
fe08e51094 Merge branch 'blender2.7' 2019-04-23 18:55:15 +02:00
c07bce5bf2 Fix T63796: Cycles OSL shader with closure not working in final render. 2019-04-23 18:53:37 +02:00
Dalai Felinto
1ab1d987fa Outliner draw: Fix using wrong flag to tag object on visibility change
Note: This doesn't fix any bug we know of, but it is the correct flag to
tag in this case.
2019-04-23 12:56:04 -03:00
80b036afab Depsgraph: make the dependency cycle report more readable.
Since it is a continuous cycle, there's no need to repeat the
name of the previous bone. Also, dot is a common symbol in object
and bone names, so use '/' instead for node nesting.
2019-04-23 18:29:41 +03:00
40baa2e2b3 GPencil: Add support for gradient to Box strokes
Before this options was only available to Dots mode.
2019-04-23 17:26:01 +02:00
8e861725dc Space_node: Add draw backdrop callback.
Add a callback to allow custom node editors to draw their own
backdrop.

Differential Revision: https://developer.blender.org/D4709

Reviewed by: JacquesLucke
2019-04-23 09:15:45 -06:00
58a1eb9a00 Depsgraph: fix standard IK target dependencies.
Targeting a different object always requires its transform,
and normally dependencies should go to the solver node.

ITASC is quite broken so special case it until fixed.
2019-04-23 17:47:17 +03:00
5a144c797a Fix T63816: Crash opening file with multiple view layers
Dependency graph will not be crated for view layers which were never visible.
2019-04-23 14:31:21 +02:00
7625fad9e9 B-Bones: remove hard limits on curve/roll/scale/ease properties.
I don't see any reasons why soft limits wouldn't be enough here.
2019-04-23 13:45:04 +03:00
ae054af14f Cleanup: rename the curveInX etc bbone DNA fields to curve_in_x etc. 2019-04-23 13:45:04 +03:00
624e93bbef B-Bones: split the Scale In/Out properties into X and Y values.
As far as I can tell, there is no technical reason why the B-Bone
segment thickness scaling can't be separated into two axes. The
only downside is the increase in complexity of the B-Bone settings,
but this is inevitable due to the increase in flexibility.

Updating the file is somewhat complicated though, because F-Curves
and drivers have to be duplicated and updated to the new names.

Reviewers: campbellbarton

Subscribers: icappiello, jpbouza

Differential Revision: https://developer.blender.org/D4716
2019-04-23 13:45:03 +03:00
c043ab1cf3 Fix T63233: Set default blur kernel radius to 2.
Reviewers: jbakker

Differential Revision: https://developer.blender.org/D4722
2019-04-23 12:31:37 +02:00
32fe79b9ee Cleanup: Fix comment for ImBuf->encodedbuffer 2019-04-23 12:27:55 +02:00
ee701baff8 Workbench: Support Active Vertex Color
Currently it is not possible to view the vertex colors of an object. To
optimize the workflow, workbench will need to support Vertex Colors.

The Vertex Colors is a new option in `shading->color_type`. When objects
do not have vertex color, the objects will be rendered with the
`V3D_SHADING_OBJECT_COLOR`.

In order to support vertex colors in workbench the current texture/solid
shading structure is migrated to a primary shaders and fallback shaders.

Fix: T57000

Reviewers: brecht, fclem

Differential Revision: https://developer.blender.org/D4694
2019-04-23 12:05:33 +02:00
c9ed39925a Fix T63649: Action group expand setting for graph editor missing
I did not rename the other property to `show_expanded_dopesheet`
yet (as suggested in the report), because:
* Would break compatibility (haven't found any addon using it though).
* I'm not sure if this really only affects the dopesheet.
2019-04-23 11:24:55 +02:00
532f4366a5 Cleanup: minor changes to scrollbar checks
Remove some redundant comments & declare vars in for loops.
2019-04-23 17:16:18 +10:00
be3adb51de UI: ignore events in empty region overlap areas
- Resizable areas use 2D view bounds.
- Header uses the button bounds.
- A margin is added to avoid clicking between buttons.
- Region resize edges clamp to the 2D view bounds.

Resovles T61554
2019-04-23 16:51:00 +10:00
310f288bb0 UI: add ui_window_to_block_rctf, ui_window_to_region_rcti 2019-04-23 16:39:14 +10:00
4d5e83f608 UI: move auto_open clearing out of ui_region_contains_point_px
Prefer explicit call for menu buttons since it's confusing if only some
queries clear auto open.
Also queries shouldn't modify data.
2019-04-23 15:44:31 +10:00
3302fbaeb1 Cleanup: style, use braces for compositor 2019-04-23 11:22:25 +10:00
64b4b719eb Cleanup: style, use braces for imbuf 2019-04-23 11:22:22 +10:00
ac53291e1f Fix T63772: Movie clip toggle toolbar fails
D4718 by @Gvgeo
2019-04-23 10:00:48 +10:00
f2dc78f13f App Template: match screen names to workspaces
Doing this makes versioning workspace screens simpler.

This was already done for the default startup file.
2019-04-23 08:52:14 +10:00
36c2162660 Correct braces with ifdef's 2019-04-23 08:36:57 +10:00
Dalai Felinto
0e4e1d257c Rename: Separate: By loose parts > By Loose Parts 2019-04-22 10:10:19 -03:00
7d6a9b5517 Cleanup: style, use braces
Add braces for modules already using braces almost everywhere.
2019-04-22 19:48:17 +10:00
b102472551 Cleanup: style, use braces for nodes 2019-04-22 19:48:17 +10:00
735515a3f9 Cleanup: style, use braces for blenkernel 2019-04-22 19:48:17 +10:00
14a49950ff Cleanup: style, use braces for gpu 2019-04-22 19:48:17 +10:00
620b960d3d Cleanup: style, use braces for editors 2019-04-22 19:48:16 +10:00
bba60bb564 Cleanup: style, use braces for gpencil modifiers 2019-04-22 19:48:16 +10:00
775c8ce332 Cleanup: style, use braces for makesdna, makesrna 2019-04-22 19:48:16 +10:00
a25a7714c5 Cleanup: style, use braces for modifiers 2019-04-22 19:48:16 +10:00
6cc09d006a Cleanup: style, use braces for blenloader 2019-04-22 19:48:16 +10:00
6b3bf9e2a8 Cleanup: style, use braces for avi 2019-04-22 19:48:16 +10:00
67454a282d Cleanup: style, use braces for blenfont 2019-04-22 19:48:16 +10:00
f24bb62fc2 Cleanup: style, use braces for render 2019-04-22 19:48:13 +10:00
797539e76c Cleanup: comments (long lines) in render 2019-04-22 06:30:08 +10:00
380ce86a7f Cleanup: comments (long lines) in avi, blf & blt 2019-04-22 06:30:08 +10:00
c5862e0a06 Cleanup: comments (long lines) in gpu 2019-04-22 06:30:08 +10:00
024d40b504 Cleanup: comments (long lines) in makesrna 2019-04-22 06:30:08 +10:00
66c3a7c550 Cleanup: comments (long lines) in makesdna 2019-04-22 06:30:08 +10:00
e9a01c1d2f Cleanup: comments (long lines) in imbuf 2019-04-22 06:30:08 +10:00
faabf92a7e Cleanup: comments (long lines) in blenloader 2019-04-22 06:30:08 +10:00
cda4cd0705 Cleanup: comments (long lines) in blenlib 2019-04-22 06:30:08 +10:00
0ac990d088 Cleanup: comments (long lines) in editors 2019-04-22 06:30:04 +10:00
f8b2268f4f Fix error renaming Lamp to Light
Introduced in batch rename 3051e2f4ae.
2019-04-22 06:24:07 +10:00
c8fc23fdbe Fix T63698: Eevee crash after recent clang-format changes
Some GLSL compilers seem to not have problems with \ to break preprocessor
directives. I couldn't find other places with similar code, but fixing this
case by case is not ideal and the same issue may come up again.
2019-04-21 11:39:04 +02:00
93c19a5a2c Cleanup: comments (mainly long lines)
Comments after code can cause awkward line breaks.
2019-04-21 14:27:35 +10:00
9d72efe108 Merge branch 'blender2.7' 2019-04-21 03:08:58 +02:00
8982f0cfee Fix T62408: Cycles viewport adaptive subdivision hangs after updates
Backporting fix from the master branch.
2019-04-21 03:05:38 +02:00
1de3c81d26 Fix T63431: crash adding driver to a keyframed property with Ctrl+D 2019-04-21 02:35:50 +02:00
543614a17d Fix T63415: no Cycles displacement update when updating OSL code 2019-04-21 02:20:02 +02:00
a5d5f152dd Fix T63681: bad clipping of very long tooltips 2019-04-21 01:25:07 +02:00
92d93dd935 Fix T63686: missing data path for 3D cursor location and rotation. 2019-04-21 01:11:12 +02:00
b8bb0391d6 Fix T63764: error when using library.users_id() function
Fix suggested by Vilem Duha.
2019-04-21 01:03:29 +02:00
33df4b78d0 make.bat: remove --expand-tabs from "make format" on windows.
following the change on linux.
2019-04-20 13:10:30 -06:00
d37e530de5 Correct error in last commit 2019-04-21 04:58:52 +10:00
9a77fb553c UI: remove redundant row for header template
If it's members need to be aligned the template can handle it.
2019-04-21 04:50:47 +10:00
2fb9c8ef12 Cleanup: add missing macros to clang-format 2019-04-21 04:40:16 +10:00
6b9ce24338 GNUMakefile: disable tab expansion for 'make format'
This was only needed for initial migration.
2019-04-21 04:36:16 +10:00
d11d5403f0 UI Overlays: Align checkbox with slider for Wireframes, X-Ray, Shadows. 2019-04-20 19:01:46 +02:00
ae85eeda3e UI Overlays: One line layout for Mask opacity.
Saves one line of space and matches Wireframe, X-Ray, Shadows.
2019-04-20 19:01:03 +02:00
40d8a407d7 Fix invalid stack memory use with GPencil drawing 2019-04-20 15:13:40 +02:00
b24dfff9b7 Fix error in recent image preference change 2019-04-20 15:13:40 +02:00
f22397206f NLA: check that properties are animatable. 2019-04-20 14:59:52 +03:00
7cbb8f20a4 GPU: automatically draw images with GLSL shader depending on resolution
This adds a new "Automatic" image display method which uses GLSL shaders for
most images. It only does CPU side color management for higher res images
where sending big float buffers to the GPU is likely to be a bottleneck or
cause memory usage problem.

Automatic is the default now, previously it was 2D Texture.
2019-04-20 13:32:36 +02:00
ed0c9654dd Cleanup: remove unused OpenGL functions, rename some for clarity 2019-04-20 13:32:36 +02:00
3d26d1938a UI: correct accidental removal of TOPBAR_PT_name
Mistake in 9573bf432c
2019-04-20 13:28:16 +02:00
857b63f1d4 Cleanup: re-use test for ELEM & STR_ELEM
Avoid having same test running at the end of each macro.
2019-04-20 13:03:49 +02:00
83b0e975b9 Cleanup: quiet warning for NULL pointer use
Warning was false positive but avoid repeating the same check.
2019-04-20 12:32:47 +02:00
f2792e91f0 3D View: add opacity for sculpt mask display
This matches vertex/texture paint opacity options.

Useful because 0.75 is sometimes too dark to see the surface shading.

Resolves T63746
2019-04-20 12:03:57 +02:00
08f4cdebe4 Cleanup: de-duplicate flag setting macro 2019-04-20 11:39:25 +02:00
bbc5c1e36f Cleanup: quiet extra-semicolon warning 2019-04-20 11:30:19 +02:00
20bc30706b Fix T63732: GPencil Onion now working with multiwindows
If you had several windows or, after last changes in topbar, several areas, the swith of overlays or Onion Skin was not working by area, but as whole switch, so it was impossible to have different status by window.
2019-04-20 10:27:08 +02:00
e17e119a31 Cleanup: comment line length (tests) 2019-04-20 10:08:59 +02:00
e63eb6ed26 Cleanup: comment line length (windowmanager) 2019-04-20 10:02:28 +02:00
44ca116ca2 Cleanup: formatting, unused args 2019-04-20 09:15:06 +02:00
Dalai Felinto
2a39f2595b Outliner: Simplify logic for parent nesting 2019-04-19 22:27:44 -03:00
bc8b884e53 Edit Mode: Make edit edges black by default
This is in order to have better contrast now that
the edges are half transparent if not
in edge selection.
2019-04-19 19:39:44 +02:00
3368df4ab6 DRW: Expose VBO garbage collection timings
This adds user side options to tweak the behavior
of the vbo garbage collection.
2019-04-19 18:52:38 +02:00
7e4db169f2 T63644: Editing while parented is not rotating correctly
This commit tries to fix the rotation problem when the parent is at layer level.

The problem was the object location was not used, so all object not in origin got weird transformations.
2019-04-19 17:08:37 +02:00
8f4ba1c046 Fix T63669: Particle editing bypassing occlusion.
The problem occurs because status changes between BackBuffer and Offscreen.

Reviewers: fclem

Differential Revision: https://developer.blender.org/D4703
2019-04-19 11:49:17 -03:00
b6a9e88aff Fix T63648: Missing update when changing particle force fields
Force fields requires relations update in the dependency graph.
2019-04-19 15:41:32 +02:00
03c81a4fff Cleanup: Remove dead code
There is no more sorting happening, so the comment is out of date
by manu reasons. If something extra is needed there it would need
to be done differently anyway.
2019-04-19 15:41:31 +02:00
4c4adeaa65 Edit Mode: Reduce Selected face alpha
This is to be less intrusive when doing UV mapping. They remain enough visible
in every select mode
2019-04-19 15:19:43 +02:00
6c83c92862 Edit Mode: Change face mode edges display
This improve visibility in edit face select mode by using the face select color
instead of the edge select color (which is in default theme a bit more red). Also
makes the selected edges in this mode a bit more opaque (0.75 instead of  0.4).
Full opacity is still reserved for edge select mode.
2019-04-19 15:19:43 +02:00
223f7e79f9 DRW: Add batch garbage collection
This is only working for shading batches for the moment and only if some Custom data layer are not needed anymore.

The collection rate is hardcoded at 60 sec but could be exposed to the user.

This system can be extended and discard most unused batches in the future.

This commit is in prevision of removing BKE_MESH_BATCH_DIRTY_SHADING when changing shader parameters.
2019-04-19 15:19:43 +02:00
973e64cf9c DRW: Make shaded batch validation more correct
This is in order to support garbage collection of unused Custom data layer uploaded to the GPU.

Actual Garbage Collection is not added by this commit.
2019-04-19 15:19:43 +02:00
0ebf43b4d0 Cleanup: Remove image preview code
Was commented out for literally 10 years.
2019-04-19 15:16:33 +02:00
fd05d7bbcb Cleanup: Remove unneeded compositor update function
Similar to previous commit.

Compositing with animation on socket values and image sequences
still works fine.
2019-04-19 15:16:33 +02:00
81e0973dec Cleanup: Remove unneeded texture nodes update function
The function was calling update() on the time curve, but there
is no update callback on that node. So, effectively the function
was doing nothing.
2019-04-19 15:16:33 +02:00
d892f1037c Fix error in recently added STR_ELEM macro
Very bad oversight, using pointer comparison instead of strcmp
for all but the first item.
2019-04-19 14:52:58 +02:00
9ade9d247d CMake: fix Cycles linking with OpenCL 2019-04-19 14:00:16 +02:00
eb844fc1da CMake: fix building without smoke enabled
Was removed when removing sorted libs however it's needed for stubs.
2019-04-19 13:55:31 +02:00
60d733c563 Fix/workaround crash using ED_area_do_msg_notify_tag_redraw
Temporary workaround for crash when refreshing the active tool.

Currently ED_region_tag_redraw fails, use notifiers until
this is resolved.
2019-04-19 12:44:28 +02:00
98e2713e94 UI: minor layout tweaks to 3D viewport gizmo menu 2019-04-19 12:27:16 +02:00
a277804c25 UI: tweak header context menu, gray out items when they have no effect 2019-04-19 12:26:45 +02:00
d297927958 Keymap: add 'Adjust Last Operation' as F9
Adding this back was a frequent request.

Now the panel can be hidden - some users may prefer only to access this
via a shortcut.

Unfortunately this uses an F-Key we'd intended to keep free for users.

This still keeps the middle block of F-Keys (5..8) free.
2019-04-19 09:57:15 +02:00
65e21888b5 Keymap: add set start/end shortcuts to graph editor 2019-04-19 09:36:44 +02:00
f604e46780 Keymap: restore Ctrl-Tab in the dopesheet (removed by accident)
Mistake in 6aef124e7d
2019-04-19 09:35:53 +02:00
a1feea48be Correct cleanup marking keyword args unused 2019-04-19 08:29:38 +02:00
54d8faa93a Cleanup: remove redundant poll functions 2019-04-19 08:13:56 +02:00
ad4cbc5a58 Cleanup: logical checks in UI scripts 2019-04-19 08:10:39 +02:00
548fb81035 Cleanup: trailing commas 2019-04-19 08:07:46 +02:00
fb9fcaa507 Cleanup: unused vars 2019-04-19 07:52:53 +02:00
082d7e8d5f Cleanup: use staticmethod where appropriate 2019-04-19 07:51:14 +02:00
ba44602b23 Missing from last commit 2019-04-19 07:49:49 +02:00
3633a79789 Cleanup: correct misleading classmethod arg 2019-04-19 07:36:07 +02:00
5b0f0421ef Cleanup: mark unused arguments in UI scripts
Quiet's pylint W0613 warning, also remove some unused args.
2019-04-19 07:32:24 +02:00
9573bf432c UI: move top-bar into the spaces header
Currently this is only in the 3D viewport however all spaces
that use the tool-system will have this region added.

D4680 by @brecht with own updates.
2019-04-19 06:53:38 +02:00
638938e5a8 Armature: remove remains of the object-level deformation data cache.
Now that B-Bone shape data is kept in bPoseChannel_Runtime, the
armature level cache only holds one quaternion value per bone.
It can also be moved to runtime, and the structure removed.

This has an additional effect that, as far as I can tell, now
the Armature modifier can run as soon as all of the bones it
actually needs are done, thus making T59848 a purely depsgraph
level problem.
2019-04-18 23:19:44 +03:00
e8c9e85401 UI: Revert fix T37463: Y-clamp for header-only spaces
This reverts 91d8519c47 since I can't redo the reported error
which was in the old header-only info space.
2019-04-18 21:29:22 +02:00
bd7d39f0b9 PyTests: do not load addons in load_py_modules test.
It makes no sense to load add-ons here, we already do that (in a more
complete way) in load_addons test, this is only adding overhead and
doubling code to maintain).

Also do not try to load-as-modules add-ons that are not 2.8-ready, and
some other misc fix.

load_py_modules test should be passing again now.

Thanks to @sergey who did part of the work here as well.
2019-04-18 21:14:14 +02:00
7ec6bca92f Fix T63332: backup and restore bPoseChannel_Runtime data during COW. 2019-04-18 21:32:17 +03:00
64bcdd65bf Images: support packing edited images as OpenEXR or PNG.
This way float and multilayer images can now be packed without data loss. This
removes the as_png option and always uses the appropriate file format depending
on the image contents.
2019-04-18 20:07:55 +02:00
690ed63eb5 Cleanup: unused region init functions 2019-04-18 20:02:09 +02:00
da1b519d82 UI: collapse 3D view collections visibility panel by default. 2019-04-18 19:53:18 +02:00
8326d59dbb OpenEXR: add support for writing EXR files to memory. 2019-04-18 19:42:20 +02:00
624d010fe5 Cleanup: deduplicate single/multiview image packing code. 2019-04-18 19:42:20 +02:00
54f420ec46 Cleanup: move image saving code to blenkernel. 2019-04-18 19:42:20 +02:00
c2f75c7008 Cleanup: make image saving code reusable outside operator. 2019-04-18 19:42:19 +02:00
0a4cded91e Cleanup: deduplicate image user initialization, make consistent. 2019-04-18 19:42:19 +02:00
4dce18fb51 GPencil: Add option to mix color with texture
This was already supported in Fill, but not in Strokes. This adds more artistic options when use textured strokes.
2019-04-18 19:33:06 +02:00
4439e5d0ba Cleanup: add trailing commas to avoid right shift 2019-04-18 17:19:44 +02:00
098f75897e PyTests: do not try to load non-2.8-ready add-ons. 2019-04-18 17:14:51 +02:00
d6f9379149 GPencil: Fix Drawing Path follow error while drawing
The strokes was aligned to drawing path only when the stroke was completed. Now, the stroke is aligned while drawing too.
2019-04-18 16:59:18 +02:00
84d237ee97 GPencil: Initialize variable to remove console warning 2019-04-18 16:59:18 +02:00
364ec17fb3 Missing 2.7x keymap update from last commit 2019-04-18 16:42:02 +02:00
cfed33f738 UI: replace toggle header with a property 2019-04-18 16:39:46 +02:00
9954cce59f Alembic: catch weird exceptions from library instead of aborting Blender.
Similar to what is done e.g. in AbcMeshReader::read_mesh()...
2019-04-18 16:20:19 +02:00
7d78474941 AMD glitch: missing changes in f41ab375f3
It was committed an earlier version of the patch which missed these changes.

Differential Revision: https://developer.blender.org/D4700
2019-04-18 10:54:03 -03:00
4c11e57316 Cleanup: add 'if 0' comment why code is repeated
Avoid potentially adding back the problem in the future.
2019-04-18 15:19:47 +02:00
f41ab375f3 Fix T62792: AMD glitch when clipping region in edit mode.
The `AMD Radeon HD 7600M` compiler is usually buggy for Geometry Shaders.
In this case, indexing was causing problems in `gl_in[i].gl_ClipDistance[0]`.

Reviewers: fclem

Differential Revision: https://developer.blender.org/D4700
2019-04-18 10:09:34 -03:00
dc8dd24351 PyAPI: remove support for importing text blocks as modules
Allowing direct import of text blocks isn't especially useful,
instead add `text.as_module()` script authors can do this
explicitly if it's needed.

Now the text "Register" option executes
instead of loading as a module.

This removes the need to keep track of the current Main,
and C code to override Python's import & reload.
2019-04-18 15:00:43 +02:00
6f087be9f9 Fix T63590: Blender crashes when deleting particle hair keys 2019-04-18 14:43:45 +02:00
5cfeba72f1 Python API: allow passing integer to some BGL functions instead of bgl.Buffer
These parameters can be both pointers and offsets into a bound buffer, so we
need to support both even if it's possible to cause crashes this way.
2019-04-18 14:28:37 +02:00
Maruf Sarker
713f961727 Fix Embree link error after recent cmake changes
Differential Revision: https://developer.blender.org/D4704
2019-04-18 14:28:37 +02:00
8587679a25 UI: option to toggle 'Adjust Last Operation' 2019-04-18 14:02:08 +02:00
6154d07f40 Cleanup: comments, wrapping 2019-04-18 14:02:08 +02:00
2d171d873c UI: Expand Enum Items Over Multiple Rows
Expanding enum items in a small area would render the names with
dots, what is a bad solution. When you use expand directly on a
`grid_flow` or `column_flow`, it will render the items on multiple
lines, giving more control to the developer.

Reviewers: campbellbarton, brecht, mont29

Differential Revision: https://developer.blender.org/D4698
2019-04-18 13:35:14 +02:00
a05b6199fc Cleanup: correct comment 2019-04-18 12:52:50 +02:00
6aef124e7d UI: move region toggling to properties
Each space had separate operators, duplicating logic.

Use RNA properties instead so adding the ability to toggle other
region types (floating redo region for eg) doesn't need to have an
extra operator per space type.

It's also nicer to show a check-box for something which can be toggled.
2019-04-18 12:44:17 +02:00
d55a9cac2c CMake: correct bad change to ceres linking
Revert part of 45055199a2
2019-04-18 12:44:17 +02:00
96e10dc2a5 Fix T63513: Gpencil - Circle guide activation with shortcut "C" is not working properly
Only add missing events after first point is added.
2019-04-18 11:39:13 +01:00
e5c5b990c6 Disable clang-format for Libmv
This is an odd-ball: it's a library which has own style and
guidelines, and just happened to be developed by Blender developers
and also happened to rely on some functionality of intern/ for its
C-API.

Might consider using Google's clang-format in the future (this is
what the style is supposed to be in this library).
2019-04-18 12:33:04 +02:00
b92d777d16 Fix compilation error when using SDL dynamic loading 2019-04-18 12:10:08 +02:00
3bc73c1b61 Merge branch 'blender2.7' 2019-04-18 11:57:44 +02:00
cc9528d3c8 Buildbot: Attempt to fix wrong branch in buildinfo
For some reason the buildinfo header was not re-generated. The root
reason is not really clear to me, so simply remove the header similar
to the CMake cache.
2019-04-18 11:52:34 +02:00
a9e34f58bc Fix T63663: Object mode proportional editing affects objects which are disabled for selection
Objects which are not selectable are no longer affected by
proportional transformations.
2019-04-18 11:52:00 +02:00
90b2fceca2 Cleanup: remove last bits of WITH_LEGACY_DEPSGRAPH CMake option.
Legacy depsgraph has been removed from Blender since several months
already...
2019-04-18 11:35:39 +02:00
63bae864f4 Overlay Engine: Option to Disable AA Ortho Grid
When in Axis alligned orthographic view a grid was always displayed.
With this change the user can enable/disable this grid.

The Grid is always visible and editable, but only rendered active when user is in quad view, or axis aligned ortho view.

Reviewers: brecht, fclem

Maniphest Tasks: T63517

Differential Revision: https://developer.blender.org/D4699
2019-04-18 11:22:08 +02:00
f7a28f0e11 Fix mistake in recent commit.
Needed to remove footers and not headers
2019-04-18 08:11:11 +02:00
99510e8b09 clang-format: add statement macro
Disabled for now but corrects syntax when we switch to v8.
2019-04-18 08:04:03 +02:00
42513146d4 Cleanup: indentation from braces in '#if 0' 2019-04-18 07:59:30 +02:00
333cdbb410 Cleanup: comment blocks 2019-04-18 07:59:28 +02:00
93e876c4f8 UI: don't expand selection tool option enum
This was taking too much space.
2019-04-18 06:52:05 +02:00
74c34c065c Cleanup: move region manipulation to utility functions 2019-04-18 06:52:05 +02:00
dbf4a67af4 Cleanup: warnings 2019-04-18 06:52:05 +02:00
b46245470f cmake: Fix python linker issues on windows.
Recent cmake work made the debug build link both python37.dll and python37_d.dll
2019-04-17 13:26:02 -06:00
1a4b60c30d Edit Mode: Rework display to differentiate selection modes
This removes the large edges and instead use colors to hint in which
selection mode the user is.

The component in each individual selection mode is more prominent to add
more emphasis. The other components are less prominent and dimmed.

A minor default theme changes needed to be made to keep clarity in all
combinations.

Forcing old behavior (no selection mode hit) could be done quite easily
by just making the 2 booleans true (selectFaces and selectEdges).

Reviewers: campbellbarton, billreynish

Reviewed By: campbellbarton, billreynish

Subscribers: ThinkingPolygons

Maniphest Tasks: T1234

Differential Revision: https://developer.blender.org/D4526
2019-04-17 19:37:12 +02:00
106aea0c93 ClangFormat: disable for generated theme 2019-04-17 19:24:38 +02:00
3fe6eebf20 Cleanup: line wrapping caused by comments 2019-04-17 18:50:53 +02:00
81ce3801bf Animation: Refactor storage usage during fcurve modifier evaluation
Previously, when a fcurve modifier used storage,
many heap allocations were done.
This caused major slowdowns as described in T63656.

Furthermore, the storage usage was a special case only
used by the Cycles modifier. This refactor makes
storage usage the "normal" case.
That reduces the overall complexity.

The storage is stack allocated now.

The framerate on the provided test scene went up from ~5 fps to ~16 fps.

Reviewers: angavrilov

Differential Revision: https://developer.blender.org/D4701
2019-04-17 18:09:33 +02:00
5f5a22970b Tests: Fix Alembic regression test 2019-04-17 17:39:17 +02:00
035b455f6c Tests: Fix ID properties test
Simply adjust to Python API changes done in 2.8.
2019-04-17 17:32:36 +02:00
5461a68852 Avoid autosave name collisions
When the same .blend file was open in two instances of Blender,
the autosaved files would overwrite each other.

The solution is to put the pid into the filename.

The exact pattern is the result of a discussion with @pablovazquez.
2019-04-17 16:54:28 +02:00
12aa9b2108 Fix T63678 Link error of tests with MSVC.
Ideally OCIO removes their log2 implementation from the global namespace
but for now this linker tweak will have to do.
2019-04-17 07:58:48 -06:00
edde48f578 GPUBuffers: Remove wrong assert
The assert was not true if the pbvh node had no triangle.

Also update the comment to reflect that.
2019-04-17 14:32:18 +02:00
f3b7b7eb0c Fix T63673: Wrong api documentation for Quaternion.dot(other) 2019-04-17 13:49:30 +02:00
6770f76bd4 Fix T60982: don't allow editing group properties in linked actions. 2019-04-17 14:43:27 +03:00
nBurn
05b8b54018 Fix T63674: Incorrect poll methods in node category classes
Differential Revision: https://developer.blender.org/D4697
2019-04-17 13:38:31 +02:00
f73255c1be editorconfig: correct indent size 2019-04-17 13:34:46 +02:00
c3a11a5671 Fix T63247: edbm_rip_invoke__edge rips unselected verts on mesh borders
Ripping edges would in some cases rip verts on unselected edges. This is now fixed so that we only rip verts from the actually selected edges.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4646
2019-04-17 12:33:33 +02:00
43e84e3326 Fix Change when re-running clang-format 7.
This was the only broken case for me, hopefully we have nailed all of
those down now.
2019-04-17 11:32:21 +02:00
1cb9612d73 Disable clang-format for objective-C bits in GHOST.
Pre-8 versions of clang-format do not handle objective-C very well,
leading to unwanted changes when re-running the edits.
2019-04-17 11:23:22 +02:00
8afb13019d Cleanup: Silence compiler warning with release builds 2019-04-17 10:54:56 +02:00
1961c61d20 ClangFormat: re-run (#if 0 caused noise) 2019-04-17 09:34:15 +02:00
ac2317f980 ClangFormat: remove '#if 0' to fix bmo_inset.c indent 2019-04-17 09:28:06 +02:00
37c76a7ec6 Cleanup: replace comments with meaningful variable names 2019-04-17 09:17:55 +02:00
600f12002b ClangFormat: adjust '#if 0' to fix gpu_buffers.c indent 2019-04-17 08:58:35 +02:00
a54bdd76cb ClangFormat: format '#if 0' code
Previous cleanups didn't account for space after '#'.
2019-04-17 08:52:59 +02:00
223f931095 Cleanup: comment length in transform 2019-04-17 08:44:58 +02:00
6b26024ea4 Cleanup: comment length in interface 2019-04-17 08:44:38 +02:00
41d4a19865 ClangFormat: format '#if 0' code in source/ 2019-04-17 08:24:14 +02:00
108045faa0 ClangFormat: format '#if 0' code in intern/ 2019-04-17 08:17:13 +02:00
3076d95ba4 Cleanup: use 2 space indentation for CMake 2019-04-17 06:35:54 +02:00
91a9cd0a94 ClangFormat: manually format sobol.cpp
Disabled because it uses a lot of memory and is mostly data.
2019-04-17 06:35:07 +02:00
e12c08e8d1 ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.

For details on usage and instructions for migrating branches
without conflicts, see:

https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00
b3dabc200a editorconfig: update for new clang-format config 2019-04-17 06:12:55 +02:00
18e4a4c48a ClangFormat: add configuration files
Prepare for applying clang-format, see: T53211
2019-04-17 06:11:16 +02:00
53e3fcdce4 Cleanup: use 2 space indentation for shell scripts
Already used by install_deps.sh
2019-04-17 06:08:01 +02:00
ca245b2b40 ClangFormat: disable for most of sobol.cpp 2019-04-17 06:00:20 +02:00
5d8030b8f3 Industry Compat keymap: Fix loop selection
- Extending loops wasn't working correctly. This is now fixed.
- Also added ability to deselect loops by holding Ctrl and double-clicking
2019-04-16 22:13:25 +02:00
Dalai Felinto
d29bd6c6b7 Selecing a pose bone in outliner deselect others
This mimics what is now the behaviour for edit bones as well.
See e6151bc4c1.

And it also matches what we do in the viewport when selecting bones.
2019-04-16 16:10:04 -03:00
Dalai Felinto
e6151bc4c1 Fix T63066: Outliner crash when selecting object being in armature editmode
While fixing it, also reproducing multi-object selection logic we have
in the viewport. If you select one bone from an armature, it deselects all
bones from the other armatures currently in edit mode.

Inspired by proposed fix by Philipp Oeser (lichtwerk).

Code explanation
================

CTX_data_edit_object(C) may be NULL here. In the few cases where it is
not we use it for the notifier (in the other cases we call the notifier
with NULL, so no harm done).

This code is called during outliner drawing, and it is called, for
instance every time you mouse hover a bone.

If you have a mesh object in edit mode and mouse hover the bones of an armature
it is plain obvious we can't rely on CTX_data_edit_object() for anything
armature related. And that the original assert was asking for troubles.
2019-04-16 15:42:32 -03:00
e2e3a61310 Cleanup: avoid adjacent C-style comments
Causes clang-format to give different results on a second run.
2019-04-16 17:55:11 +02:00
58233e980e Cleanup: avoid adjacent C-style comments
Causes clang-format to give different results on a second run.
2019-04-16 17:50:17 +02:00
ad9275ed4e Spline IK: support changing individual bone length via Y scaling.
Previously Spline IK provided only two choices: either scale the
length of the bone chain to fit the length of the curve, or don't
scale the bone in the Y dimension at all (ignoring effects of
actually fitting to the curve due to curvature and curve object
scale).

This patch adds a new option to use the pre-IK Y scale of the
bones to adjust their length when fitted to the curve, allowing
individual posing control over the length of the segments.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4687
2019-04-16 18:41:57 +03:00
752edc0a15 Cleanup: simplify comments
clang-format reformatted when running a second time.
2019-04-16 17:37:04 +02:00
2a891842af Clang-format: Speed up detection of clang-format
Don't construct the full build environment, following
feedback from Ray.
2019-04-16 17:10:02 +02:00
49e4182b6c ClangFormat: add comments to ignore formatting 2019-04-16 17:03:11 +02:00
24edd49818 Fix T63312: Crash XRay + clipping
Outline shaders were only selected when no checker depth was available.

Reviewed By: fclem

Maniphest Tasks: T63312

Differential Revision: https://developer.blender.org/D4661
2019-04-16 17:02:07 +02:00
2986bc1d6e ClangFormat: add comments to ignore formatting 2019-04-16 16:57:47 +02:00
e0fe719997 Fix BLI_path test of BLI_path_frame_strip.
Ensure that returned string buffer is always properly initialized with
NULL char...
2019-04-16 16:52:20 +02:00
65aebd0c11 GNUmakefile: move clang format utility
Makes more sense to place in 'utils_maintenance'.
2019-04-16 16:49:32 +02:00
dbc058301b Cleanup: trailing commas 2019-04-16 16:40:47 +02:00
d217b23f73 Cleanup: use keyword only args to rna_idprop_ui_create 2019-04-16 16:00:24 +02:00
40dd91561d Python: add a utility function for creating custom properties.
Creating a fully functional custom property requires also setting up
its limits, description, default value and static override status.
It is complex enough to warrant providing an official utility.

Currently boolean properties are technically int, but the utility
pretends they are separate in case that eventually they are.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D4620
2019-04-16 16:49:00 +03:00
d5a76451c0 GNUmakefile: add 'make format'
Convenience access to clang_format_paths.py utility.
2019-04-16 15:43:42 +02:00
fc32f98bbc Initial support of make format for Windows
There are couple of caviats currently:

- The script requires system-wide Python 3 available in the current
  search PATH as python.exe.

  This will get addressed soon by distributing unpacked Python binary
  in our libraries.

- Since the libraries folder is to be known, this requires to have
  MSVC detected. Not too bad, since formatting is still way slower
  than detection, but still doesn't feel ideal.
2019-04-16 15:41:32 +02:00
f45b91a1c5 Fix tool system Python errors if there is no active object. 2019-04-16 15:33:20 +02:00
0ca9ce21ab Fix T63641: transform snap invert keymap item has an effect when disabled. 2019-04-16 15:33:20 +02:00
11175eb8a8 Fix T63617: Bone groups (de)select operators not immediately refreshing
was missing DEG updates

Reviewers: brecht

Maniphest Tasks: T63617

Differential Revision: https://developer.blender.org/D4691
2019-04-16 15:21:01 +02:00
Dalai Felinto
e017d89eae Fix T63204: Toggle collection visibility with shift
Shift was always turning the collection visible. It now toggles, similar
to what we had in 2.79.
2019-04-16 09:58:44 -03:00
157872922a CMake: fix building WITH_CYCLES_LOGGING=ON 2019-04-16 14:56:34 +02:00
a12bc43b26 UI: Move Collection Visibility popover from 3D View header into the Sidebar
It's more practical to use this from the Sidebar, and takes away one item from the crowded header.

See T63527
2019-04-16 14:52:44 +02:00
b53728b1d2 Fix broken build when using system Glew on linux. 2019-04-16 14:44:14 +02:00
7fdffd735f UI: Refactor View2D number drawing
This also fixes alignment issues in many editors.
E.g. the frame numbers were badly aligned to the grid lines
in the timeline.

Checkout the images in D4681 for more examples.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4681
2019-04-16 14:19:06 +02:00
45055199a2 CMake: fix building without libmv 2019-04-16 14:11:17 +02:00
8535f4d073 Fix T63619: Fill Tool is misaligned when 'Gradient' is enabled
Reviewers: brecht

Maniphest Tasks: T63619

Differential Revision: https://developer.blender.org/D4692
2019-04-16 14:03:08 +02:00
e7e05ba5fa CMake: fix linking with gtest & cycles enabled 2019-04-16 13:57:33 +02:00
423d9086e6 Fix T63429: Random deselect function lost
Add back the ability to choose the select operation for random select.
Now we allow the operator to specify if the select operation should be
visible in the GUI or not.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4665
2019-04-16 13:16:04 +02:00
2e3bc99590 GPencil: New Normalize All operator
This operator works similar to mesh operator but for Stroke and Points data.

Also minor cleanup in Normalize operator.
2019-04-16 13:10:10 +02:00
5494926ee5 GPencil: Add lock icon to Vertex Groups list
Also check this flag in operators.

Note: This is required for the development of the new Normalize All operator.
2019-04-16 13:10:04 +02:00
a8852ade8a GPencil: New Normalize Weights operator
This works similar to mesh operator, but using Stroke and Points data.
2019-04-16 13:09:58 +02:00
31c2e69d49 CMake: remove BLENDER_SORTED_LIBS
Use CMake's target_link_libraries instead of manually maintaining
library dependencies in a single list.

In practice adding new libraries often ended up being guess-work,
now each library lists the libraries it uses.

This was used for the game player executable so libraries
could optionally link to stubs.

If we need this functionality it can be done using target-properties
as described in T46725.
2019-04-16 12:36:44 +02:00
616597e7ea CMake: fix WIN32 linking without sorted libs 2019-04-16 12:35:57 +02:00
758bb8c70d Clenaup: odd use of ternary operators 2019-04-16 12:09:34 +02:00
f37a27b074 Cleanup: comment 2019-04-16 12:01:55 +02:00
c9b8db74dc Industry Compat Keymap: Use F-keys for viewpoints
Following user suggestion

  - Similar to some apps
  - Works better on laptops and desktops without numpads
  - Also fix some small inconsistencies with select more/less in Dopesheet
2019-04-16 11:01:23 +02:00
0d686ccc52 GPencil: Disable G/R/S transformations in Sculpt and Weight Paint mode
These transformations must be only available in Object and Edit mode.

Reviewed by: @mendio @pepeland
2019-04-16 10:04:20 +02:00
777446ed7d Fix T63492: CTRL+click on an image in a UV or Image Editor crashes
Blender

Crash was introduced in rB48e48653c297, rB90f4ff95ed3a

`image_sample_invoke` is used for both `IMAGE_OT_sample` and
`IMAGE_OT_curves_point_set`. IMAGE_OT_curves_point_set didnt have
property `size` defined...

Now defines `size` for `IMAGE_OT_curves_point_set` as well

Reviewers: brecht

Maniphest Tasks: T63492

Differential Revision: https://developer.blender.org/D4675
2019-04-16 09:38:01 +02:00
8a9b5e644e Fix T63642: Light Probe object.data defined as UNKNOWN 2019-04-16 09:15:39 +02:00
a948147977 Fix T63646: Box/Lasso select fails to de-select
Select 'New' wasn't de-selecting when there was nothing selected
in some cases.
2019-04-16 09:01:00 +02:00
edc1b01675 CMake: add libs needed for gtests 2019-04-16 08:07:01 +02:00
2f94b170e4 Cleanup: move motion paths into editors/animation
Having this in blenkernel caused bad level calls to bf_editors_anim,
causing tests that use 'blenkernel' to require almost all libraries.
(complicating gtest linking & causing large binaries).
2019-04-16 07:35:17 +02:00
5498e7f193 CMake: add library deps to CMakeLists.txt
Tested to work on Linux and macOS.

This will be enabled once all platforms are verified.

See D4684
2019-04-16 06:20:52 +02:00
813e470eac CMake: cleanup, arg rename, add definitions last 2019-04-16 06:15:18 +02:00
bb6b7dd4ad CMake: re-order openvdb/osl linking
Needed for building without sorted libs.
2019-04-16 06:10:00 +02:00
941206559e Fix DDS failure ignoring message argument 2019-04-16 05:51:25 +02:00
db80d5c560 Fix T62852: crash reading corrupt DDS file. 2019-04-16 03:41:17 +02:00
6a50a3d140 Fix T63346: Cycles OSL shader with closure not working in final render. 2019-04-16 03:03:24 +02:00
3d744dff58 Fix T63562: wrong viewport updates after editing group node sockets 2019-04-16 02:29:22 +02:00
fb0acb1947 Fix T63401: add Object (Without Inverse) to Set Parent menu
Previously it was bound to a shortcut.

Differential Revision: https://developer.blender.org/D4673
2019-04-16 02:16:54 +02:00
e760d37733 Fix T62913: datablock append removing unrelated rigid body objects. 2019-04-16 01:55:17 +02:00
6830adaaab Fix proxy remapping on make local failing for more than one object. 2019-04-16 01:51:32 +02:00
5ac7675f4c Fix T62849: crash entering particle edit mode with hair dynamics 2019-04-16 01:42:16 +02:00
d0cb98790e Fix T63189: missing double click for UV loop select and emulate MMB 2019-04-16 01:32:50 +02:00
9d06dc1496 Fix T63439: too many 3D viewport redraws due to fading scrollbars.
Only redraw the regions, not the entire editor.
2019-04-16 01:24:38 +02:00
e2102e9917 Spline IK: fix continuity issues with influence and curve end rolloff.
Mainly, scaling needs to be continuously faded out in these cases.
Plus, in the case of end roll-off, it seems better to integrate into
this general fading system, instead of ad-hoc interpolation of tail.
2019-04-15 21:53:35 +03:00
2f2ba04c60 Fix T63574: missing implicit parent bone dependency in proxies.
Although technically evaluating the proxy copy nodes doesn't require
the parent bone to be copied, other nodes that depend on the bones
sometimes expect the parent to be ready. To meet this expectation
it's necessary to add the dependency to the graph.
2019-04-15 19:54:03 +03:00
10bf1d9ac1 Fix T63284: Eevee: Crash when subsurface pass is enabled
Was caused by a NULL texture used as uniform.
2019-04-15 18:02:08 +02:00
ab1d82e41e GPencil: Hide UV factor for Dots and Boxes
This parameter is not used with these modes.
2019-04-15 16:08:16 +02:00
25efa970d6 UI: move gizmo popover next to the overlay buttons
In paint modes this was the only button in the middle.
2019-04-15 15:56:50 +02:00
bcefceb200 Fix T63598: "child of" constraint "set/clear inverse" ops not working
was missing DEG updates

Reviewers: sergey

Maniphest Tasks: T63598

Differential Revision: https://developer.blender.org/D4685
2019-04-15 15:23:35 +02:00
8d3af588a2 Fix T63377: "Principled Volume" node not working anymore in EEVEE
I'm not sur how it ever worked before. There was no texture bound to these
sampdensity and sampflame when no volume simulation was happening.

This fixes the issue using 1x1x1 dummy textures.
2019-04-15 15:22:27 +02:00
935417bee7 cleanup: typo in comment 2019-04-15 11:44:56 +02:00
d688ce9a62 Cleanup: Add missing comma 2019-04-15 11:04:08 +02:00
414566dbde Industry Compat Keymap: Tool shortcuts
- Use C for Cursor tool
- Use D for Annotate tool
- Use tool shortcuts in UV Editor (although it's weak here still - waiting for Move, Rotate & Scale tools here)
2019-04-15 10:58:52 +02:00
240940c58c GPencil: New Dots gradient
This commit adds support for drawing Dots strokes with a gradient factor to get artistic effects like watercolor.

Currently, the option is only supported by Dots materials, and in the future will be added to line strokes, but now there is a limitation on drawing engine and we will keep disabled on Line materials.

Also, added the option to align Dots and Boxes strokes textures aligned with the drawing path to get more fluid strokes.
2019-04-15 10:32:25 +02:00
7c79455297 Industry Compat Keymap: Panning consistency
- Allow orbiting while using Knife tool
- Use consistent panning keys in properties lists
- Also fix warning related to empty View 3D Generic keymap
2019-04-15 10:23:33 +02:00
efd319f543 Industry Compat Keymap: Remove Ctrl-click for context menu
This was conflicting with some tools such as the select tools which used it for deselecting.
2019-04-15 09:37:06 +02:00
3849e02369 CMake: fix WITH_PYTHON=OFF 2019-04-15 08:40:29 +02:00
bdeb6743e3 CMake: sort file list 2019-04-15 07:13:41 +02:00
0a90b8bbcf CMake: resolve issue building without sorted libs
Linking empty libs gave an error.
2019-04-15 06:42:24 +02:00
860a9f979d Fix copy & paste mistake in assert. 2019-04-14 22:18:00 +03:00
3731729b96 Depsgraph: fix hard CTD on dependency cycles through POSE_INIT.
As reported in T63582, it can cause chan_array to be not ready.
To reliably avoid crashing, the only easy way seems to be to
create the index during COW -- maybe @sergey has a better idea.
2019-04-14 21:55:30 +03:00
f5ea1fc4fb Render: new material preview
* EEVEE support through irradiance volume and light probe.
* New shader ball shape (designed by Robin Marin).
* New cloth and liquid shapes, removed monkey.
* Replace world sphere by toggle to use world for any shape.
* Slight bevel on cube.
* More subdivision for displacement preview.
* Fixed and improved UV mapping for all shapes.
* Material icon / asset preview now uses specified shape instead of always
  a sphere. So for example hair material can be displayed as hair.

Ref T57683
2019-04-14 20:09:02 +02:00
8b0102b443 Fix Alembic using wrong visible/selected flags, fix warnings. 2019-04-14 19:54:51 +02:00
91d611b7cb Cleanup: remove deprecated grease pencil object property. 2019-04-14 19:54:51 +02:00
427f4c2321 Cleanup: fix compiler warnings. 2019-04-14 19:54:51 +02:00
f73b3178f7 Fix T63599: fix the zero ease hack for the B-Bone end matrix.
Negate the second derivative, because it's effectively stepping back.
2019-04-14 20:30:33 +03:00
6a59e12364 Fix T59622: dependency problems with Spline IK.
The bug is caused by problems in the dependency graph. Unfortunately,
fixing is not just a matter of fixing the graph, because correct
dependencies would cause a cycle here and in other reasonable use
cases. The real fix thus requires refactoring Spline IK to require
curve data only in the actual evaluation phase, and not in POSE_INIT_IK.

In addition, this separates the normal bone evaluation loop from
Spline IK computations for two reasons:

- That still needs to be done even if spline IK can't evaluate
  due to missing curve data.

- It should reduce issues with induced shearing, as Spline IK now
  controls how parent-child relations are handled in the chain, and
  can take care to only carry over rotation and location.
2019-04-14 18:59:27 +03:00
3380fb3646 Complete the set of matrix multiplication functions.
Also, mul_m3_m3m4 was named incorrectly.
2019-04-14 18:14:06 +03:00
Miguel Porces
9abcae1fda Fix add_search node operator to show custom nodes
Differential Revision: https://developer.blender.org/D4667
2019-04-14 16:59:01 +02:00
Sharan Ranjit
6efac431a3 UI: Remember the last display mode in file browser
See also T57688.

Differential Revision: https://developer.blender.org/D4479
2019-04-14 16:33:59 +02:00
14e1a4e9cf UI: Do not show full action range
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4563
2019-04-14 16:18:48 +02:00
47adab4f99 CMake: prepare for BLENDER_SORTED_LIBS removal
No functional change, this adds LIB definition and args to cmake files.
Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS'
since there are many platforms/configurations that could break when
changing linking order.

Manually add and enable WITHOUT_SORTED_LIBS to try building
without sorted libs (currently fails since all variables are empty).
This check will eventually be removed.

See T46725.
2019-04-14 15:37:24 +02:00
eee5a880f1 Dopesheet: enable Show Keyframes and Interpolation by default.
Make the option enabled by default, and enable it in old files,
unless Show Extremes is enabled.

However, suppress it for the Timeline, because its View menu
doesn't include the option.

Reviewers: billreynish, brecht

Differential Revision: https://developer.blender.org/D4678
2019-04-14 16:34:06 +03:00
00b966b83a Explain the Local With Parent coordinate space better.
Just saying "parent transformation added" doesn't really explain
what this coordinate space does. Thus it seems almost nobody used
it and serious bugs like T61981 went unnoticed.
2019-04-14 16:26:47 +03:00
b42ae4b972 Fix T61981: Local With Parent broken as constraint own space.
Specifically, matrix multiplication order in Local With Parent
to Pose space conversion was wrong, compared with Pose to LWP.
2019-04-14 15:50:57 +03:00
1d70b9009b Missed version bump in recent commit 2019-04-14 13:29:06 +02:00
31096ba9b6 Keymap: toggle context gizmo instead of the tool gizmo
When a tool is activated in many cases the gizmo is needed so toggling
them isn't so useful.

Change behavior to use the active object instead so users who prefer
to enable gizmos in the popover can toggle them.

Also remove duplicate keymap item.
2019-04-14 13:25:17 +02:00
2120c5af03 Gizmo: individual toggles for 3D view gizmos
The popover for displaying gizmos now has options for
empty, light & camera gizmos.

Transform toggles are now checkboxes, which has the advantage that it's
more obvious they can be mixed however changing from one to another now
uses 3x clicks instead of a single click-drag action.
We might need a faster way to switch between transform types.
2019-04-14 13:17:55 +02:00
90e760270a Depsgraph: fix debug print crash on IK constraint without target. 2019-04-14 13:49:35 +03:00
fc416c3175 Cleanup: rename 'ObData' to 'Object Data' 2019-04-14 11:19:09 +02:00
61d71fdde5 Fix T63587: 3D View clipping region crashes 2019-04-14 11:04:34 +02:00
eff8cc9ccc Cleanup: doxy comments
Use doxy references to function and enums,
also correct some names which became out of sync.
2019-04-14 10:48:42 +02:00
b7e5433890 Cleanup: move operator constants out of DNA
Also use doxy struct member references.
2019-04-14 09:58:40 +02:00
14884cda1f Gizmo: move transform to a persistent option
Based on feedback from animators, this is useful to keep as a view
option (as in 2.7x).

Now the transform gizmos can be enabled from the popover,
the tools still work for location/scale/rotation.
The transform tool has been removed.

See T63518
2019-04-13 20:58:25 +02:00
6815efc3ff Keymap: warn when running poll on empty keymaps 2019-04-13 19:26:01 +02:00
3d8790faf1 Fix T62048: crash when turning off curve path animation with Spline IK.
Both fix missing depsgraph flag, and gracefully give up on missing data.
2019-04-13 17:36:57 +03:00
51c8a6f491 Fix T37500: implement Bendy bone segment deformation interpolation.
Previously B-Bone deformation mapped every vertex to just one
B-Bone segment. This results in abrupt transformation differences
between the sides of each threshold plane, reducing the quality
of B-Bone deformation and making the use of shape keys impractical.

This commit replaces this approach with a linear blend between
the two closest segment transformations, effectively representing
the B-Bone as two weight-blended plain bones for each vertex.

In order to distribute the interpolation more evenly along the
bone, segment matrices for deformation are now computed at points
between the segments and at the ends of the B-Bone. The computation
also uses the true tangents of the Bezier curve for the orientation.
The nodes at the end of the bone require some special handling to
deal with zero-length Bezier handles caused by a zero ease value.

The Copy Transforms constraint now also smoothly interpolates
rotation and scaling along the bone shape when enabled.

The initial version of the patch was submitted by @Sam200.

Differential Revision: https://developer.blender.org/D4635
2019-04-13 16:27:42 +03:00
f7e35d61f8 Cleanup: add View3D_Runtime struct
Also remove 'matcap_icon'
2019-04-13 15:24:28 +02:00
70cbd0a6bd readme: separate development links
Add development links and place under own heading.
2019-04-13 14:45:51 +02:00
f110daa2c9 Fix T63563: Grease pencil not visible when contained in a collection instanced in a foreign scene.
The check of DUPLI object was used, but as the original object was not in the scene, the VBO data was not available and the draw was empty.

Now, the function checks if the original data is in the scene, and set the object as not Dupli to generate the VBO data.
2019-04-13 13:03:37 +02:00
65b0312904 3D View: move gizmo draw options out of overlays
Gizmo's now have their own popover in preparation
for making transform gizmos accessible without having to use tools

See: T63518
2019-04-13 12:45:02 +02:00
cd60843aef Cleanup: add trailing commas to wrapped args 2019-04-13 12:45:02 +02:00
William Reynish
f98b6ace5d UI: remove popover button text in viewport header
Makes room in the header for other buttons to be added.
2019-04-13 12:19:56 +02:00
789d242fa7 GPencil: Implement Opacity transform
Add Shift+F to transform points opacity in Edit mode
2019-04-13 11:19:03 +02:00
a43b373c42 readme: initial minimal readme
Useful to link official resources when the repository is accessed via
3rd party hosting.
2019-04-13 10:53:56 +02:00
28fc919464 GPencil: Remove script console warning when object is None 2019-04-13 09:47:43 +02:00
73c7aaba22 Cleanup: style, use braces for the window manager 2019-04-13 09:15:15 +02:00
45b810e1f8 Fix T61935 Crash when importing Alembic from Meshroom
The Alembic importer can now deal with XForm-less objects. Apparently
MeshLab exports point clouds without parent transformation matrix (XForm in
Alembic-speak). We shouldn't warn about this, but handle it properly
instead.
2019-04-12 14:52:09 +02:00
2396d7faa5 Build system: disable Draco when not installing python.
Draco py binding needs to be installed somewhere, when not installing
Python itself it's breaking the installation (since it creates a fake
empty py install, which will crash when trying to start Blender).

We could fix that in some smarter way maybe, but for now it's simpler to
just not care about Draco when we are not installing Python.
2019-04-12 14:29:17 +02:00
f3fc8271b8 Fix T63504: Python Template 'ui_previews_dynamic_enum' error
thx @nacioss for the fix
2019-04-12 14:10:10 +02:00
a96d42b2e8 Rename Label instead of Name in Node editor using F2 key
Previously reverted change without RNA changes.
2019-04-12 13:50:33 +02:00
f3c313e779 Revert "Rename Label instead of Name in Node editor using F2 key"
This reverts commit 98b06c20a0.

RNA properties should give predictable results,
the desired behavior can be added only in operator logic.
2019-04-12 12:58:31 +02:00
684e76181e Cleanup: add back semicolons to DefNode
Causes extra-semicolon warning,
we'll need to disable clang-format for this file since it
won't format properly.

Reverts b389bb5ef8
2019-04-12 20:41:14 +10:00
59f87eb198 UI: Re-order Properties tabs to follow the data hierarchy
- Group tabs together based on the data-flow
- Puts Physics and Particles next to Modifiers, with which they interrelate

See D4612

Reviewers: pablovazquez
2019-04-12 12:04:59 +02:00
0ee23d0f5f Fix T63452: View Port/render artifacts while camera movement in
Patch provided by @matc
2019-04-12 09:09:37 +02:00
d1cda823e0 Fix T63341: Xray mode makes some shading popover options grayed out despite them working
Do not gray out shading items if the xray alpha value is 1.
They are rendered correctly in viewport so there is no reason to mark
them as disabled in the shading menu.
2019-04-11 19:43:06 +02:00
adaa7688ee Fix T63467: Edge/vertex selection isnt working properly with X-ray set to 1
Edit mode shows the mesh elements in X-ray mode even if alpha is set to
1. Now the code takes this into account so that you can still select
visible mesh elements in X-ray edit mode.

view3d_draw_legacy need to be updated with the new XRAY flag macros to
avoid crashes. Additional cleanup of the XRAY macro flags were done.
2019-04-11 18:28:20 +02:00
6b06440ed8 Fix 'static override' message showing in ID template tooltip.
We only want to show that when library overrides are enabled.
2019-04-11 17:47:38 +02:00
a0a08c643e Fix (unreported) potential infinite loop over collections' parents pointers.
It is crucial to properly tag as loopback that kind of pointers,
otherwise some users of libquery's foreach_ID might end up in infinite
loops.
2019-04-11 17:47:38 +02:00
986329b4c4 Cleanup: comments 2019-04-12 01:01:50 +10:00
8091e39d22 Cleanup: remove unused code
This variable was never used.
2019-04-12 01:01:50 +10:00
6478f90cc2 curve_fit_nd: fix assert caused by too small epsilon
Curve decimate would assert in some cases.
2019-04-12 01:01:49 +10:00
8e774b3ae4 Alembic export: free depsgraph after use 2019-04-11 16:22:55 +02:00
0576f4ca9b Fix T62664: Exporting Metaballs as Alembic crashes Blender
The `AbcMetaballWriter` now subclasses `AbcGenericMeshWriter` instead of
wrapping an `AbcMeshWriter`. `AbcGenericMeshWriter` was created for this
purpose (writing non-mesh objects as mesh to Alembic) and performs the work
in a cleaner and, more importantly, not crashing way.
2019-04-11 16:22:55 +02:00
7509d0bbf1 Alembic export: always consider metaballs animated
The metaball 'mesh' is animated whenever any of its components are animated.
However, it's not easily possible to visit all its components (AFAIK it
requires a full scan of all objects in the scene and comparing names), so
due to the blobby nature of the metaballs I now simply assume they'll be
animated.

This fixes an issue where a metaball was considered static when the base
ball was static. For example, MBall static but MBall.001 animated would
be considered 'not animated'.
2019-04-11 16:22:55 +02:00
73e06ef256 Fix: Build issue with draco on mac.
somehow missed mac in my last commit
2019-04-11 07:47:33 -06:00
f01c71e1d9 Fix: Build issue with draco.
DRACO_LIB_NAME was undefined, better use the proper cmake variable for it.
2019-04-11 07:20:14 -06:00
9cdc3483ca Fix: Build error with msvc2019. 2019-04-11 06:56:40 -06:00
98b06c20a0 Rename Label instead of Name in Node editor using F2 key
See D4631 for more details

Reviewers: @brecht @billreynish
2019-04-11 14:47:35 +02:00
6fed1525a1 3D View: Show the camera frame when Extra's is off 2019-04-11 14:01:18 +02:00
Harley Acheson
c642474704 Fix T63451: selected objects not highlighted in outliner scene view.
Differential Revision: https://developer.blender.org/D4668
2019-04-11 12:58:27 +02:00
Benjamin Schmithüsen
4bad4bfc6a glTF: add Draco shared library for mesh compression.
Draco is added as a library under extern/ and builds a shared library that is
installed into the Python site-packages. This is then loaded by the glTF add-on
to do mesh compression.

Differential Revision: https://developer.blender.org/D4501
2019-04-11 12:04:53 +02:00
a9d6356fee Cleanup: suppress some warnings in external libraries. 2019-04-11 12:04:53 +02:00
87f07af737 Fix T63464: Multi UV Maps limited to three with eevee
this was very similar to T60684 (and the UV case was actually reported
back then as well), so the fix goes hand in hand with rBbd8039399575

Reviewers: fclem

Maniphest Tasks: T63464

Differential Revision: https://developer.blender.org/D4672
2019-04-11 10:30:33 +02:00
a3b88c9172 Annotations: Make all 2D editors locked to View
Before, there was a hacky code for Image editor when the image was empty.

Now, all 2D editors are locked to view and when you Move or Zoom, the stroke moves.

This is a fix of T63402.

Still pending if we add more options to 2D editors, but at least now,  we have something consistent.
2019-04-10 17:33:01 +02:00
b9e6f9b9c5 Industry Compat Keymap: Add Sculpt Mode keys 2019-04-10 16:10:07 +02:00
William Reynish
b932635bfd Industry Compatible Keymap: initial keymap
This is the initial implementation.

It's fully functional for object and edit mode,
but requires more work in Sculpt and Paint modes.

See T54963
2019-04-10 12:52:57 +02:00
a1a8578d5c Fix T62449: Subsurf+hidden faces
When using subsurf (and other modifiers) the edit flags are not
propagated correctly. Currently we assume to read the edit flags
from the original object which is kind off hinding the real issue.

Modifiers use `mesh_new_nomain_from_template_ex` to create a copy
from an existing mesh. this method is only used by modifiers. So
by placing this we will make sure that editmesh is propagated.

Reviewed By: fclem, sergey

Maniphest Tasks: T62449

Differential Revision: https://developer.blender.org/D4666
2019-04-10 12:44:31 +02:00
1a12c9edab Keyframing: add operators that use keying-set ID's
Unfortunately we can't use insert/delete_keyframe operators in keymaps
because the enums aren't known at the time of keymap registration
and the keying sets are dynamic and use a poll function.

Add a version of insert/delete operators that takes a string
instead of an enum. Needed for D4626.

Also extract int to keying-set into a utility function.
2019-04-10 11:47:43 +02:00
99f1e3d57f Fix T63455: Legacy GPencil settings in Annotations 2019-04-10 11:31:37 +02:00
f9e0836147 Fix T63347: No longer supported disable-ffserver option in install_deps script.
FFMPEG removed ffserver and that option alltogether three years ago.
2019-04-10 10:19:25 +02:00
b7a09114f6 Fix T63441: Cycles applies modifiers twice
Was a mistake in df26f28835, which caused access uninitialized variable.
2019-04-10 10:06:16 +02:00
e8fc6f6946 Cleanup: rename old -> versioning
The term 'old' isn't very meaningful, follow naming for existing
code that updates data.
2019-04-10 10:00:38 +02:00
a358f6bb69 Cleanup: use STR_ELEM macro 2019-04-10 09:36:06 +02:00
54af7cbf4b BLI_string: Add STR_ELEM macro
A string comparison version of the ELEM macro,
add to avoid verbose & repetitive strcmp/STREQ usage.
2019-04-10 09:25:53 +02:00
55c152164f Cleanup: order simple check before function call 2019-04-10 09:05:39 +02:00
b9eac0bb44 Cleanup: spelling 2019-04-10 08:40:49 +02:00
0c3500e068 Cleanup: style, shadow warning 2019-04-10 08:34:24 +02:00
009dbc2bc9 Fix T63427: Annotations don'twork with 2.79 settings
The problem was the colors were not converted and the annotation flag was not enabled.

Note: For Scene data (View3D) there is a convert operator.
2019-04-09 20:12:21 +02:00
10f724cec5 Fix: Build error with msvc.
Unused label spawned a warn but bmesh builds with warns as errors.
2019-04-09 10:45:39 -06:00
59955a297e Cleanup: Use higher level function
This kind of abstracts OpenGL details, and this is what is used in
other areas as well.
2019-04-09 17:06:32 +02:00
b5d1e0ad1e Cleanup: spelling 2019-04-10 00:38:47 +10:00
e49da07184 Cleanup: style 2019-04-10 00:06:13 +10:00
32f3d47990 Image draw: Fix/workaround image corruption on draw
Was mainly visible with high-res image. Not entirely clear why it is
only happening on macOS. While the entire function should be re-written
to make float images displayed faster, still nice to fix the drawing.

Reviewers: fclem

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D4664
2019-04-09 12:54:20 +02:00
cc74020b5a Fix T62114: Wireframe mode selection: selects backside objects when clicking frontside object in 3d-window
Now the depth order of objects when trying to select them is only used when not in X-ray mode.
Before, this was only the case in wireframe mode regardless of X-ray settings.

I've also unified the usage of V3D_XRAY and XRAY_FLAG as they were basically copies of each other.

Reviewed By: Clément

Differential Revision: http://developer.blender.org/D4504
2019-04-09 12:29:02 +02:00
f55026d468 Cleanup: BKE_gpencil naming
- The ambiguous term 'handle' was used where 'ensure'
  is typically used (get or add when missing).
- Rename `current` to `active`, all `current` functions which were
  also ensuring.
- Clarify what is being operated on, using `BKE_gpencil_object_*` for
  objects, `BKE_gpencil_brush_*` for brushes.
2019-04-09 10:09:13 +02:00
eb9237eb20 Cleanup: style 2019-04-09 08:44:06 +02:00
86a44d2b07 Mistake in 1be2888bf0
String compare renderengines.
2019-04-09 08:37:00 +02:00
Arno Mayrhofer
2a79e34631 Fix T63326: absolute shape keys inserted from Python in wrong order. 2019-04-08 23:54:37 +02:00
George Vogiatzis
7655b32999 Fix T63386: text editor footer added multiple times.
Differential Revision: https://developer.blender.org/D4663
2019-04-08 22:51:30 +02:00
df26f28835 Fix T63399: Obj exporter does not respect "Apply Modifiers" settings 2019-04-08 21:21:09 +02:00
12417fcbf6 Fix T60821: highlighting issues in Dope Sheet
replaced check for (obsolete in 2.8) objects 'SELECT' flag with check for
bases 'BASE_SELECTED' flag

Reviewers: brecht

Maniphest Tasks: T60821

Differential Revision: https://developer.blender.org/D4606
2019-04-08 20:34:05 +02:00
1f1eedf8ad GPencil: Mark Object gpd field as Deprecated
This field is only used to read old files, but it's not used anymore, so it's better mark as deprecated to avoid wrong uses.
2019-04-08 16:24:30 +02:00
d6f02cd1d7 Fix T63340: Transform Snap Object: Simulate occlusion only when use_occlusion_test is true.
And cleanup.
2019-04-08 10:49:15 -03:00
b8a442b202 cleanup: typo in comment 2019-04-08 12:42:43 +02:00
e944835aa5 GPencil: Cleanup unused code 2019-04-08 11:28:53 +02:00
75f551faca GPencil: Fix wrong Brush texture for pinned materials
If the Brush had a pinned material with texture, but the material slot was in a different material, the texture was not working.

The material was not recovered from brush, but from object.
2019-04-07 17:02:13 +02:00
13eb2e9640 Quick Explode: update for recent eevee shadow refactor
see rBd6747f310f12 'transparent_shadow_method' -> 'shadow_method'
2019-04-07 12:46:49 +02:00
0d3195c811 Cleanup: add comments about dual quaternion scale handling.
Ref T63327
2019-04-07 11:30:03 +02:00
e031ace3d1 Merge branch 'blender2.7' 2019-04-07 11:24:28 +02:00
Robert-André Mauchin
d780409156 Fix for GCC9 new OpenMP data sharing
GCC 9 started implementing the OpenMP 4.0 and later behavior. When not using
default clause or when using default(shared), this makes no difference, but
if using default(none), previously the choice was not specify the const
qualified variables on the construct at all, or specify in firstprivate
clause. In GCC 9 as well as for OpenMP 4.0 compliance, those variables need
to be specified on constructs in which they are used, either in shared or
in firstprivate clause. Specifying them in firstprivate clause is one way to
achieve compatibility with both older GCC versions and GCC 9,
another option is to drop the default(none) clause.

This patch thus drops the default(none) clause.

See https://gcc.gnu.org/gcc-9/porting_to.html#ompdatasharing

Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
2019-04-07 11:20:50 +02:00
c536b61961 GPencil: Set layer channel custom color to all line in Dopesheet
See D4645 for more details
2019-04-07 09:37:35 +02:00
d2d84132dd Merge branch 'blender2.7' 2019-04-07 02:43:08 +02:00
44b54baf96 Fix build error with Visual Studio, appears to be a compiler bug
It's not clear that "if (0 &&" was introduced intentionally, but this test
only seems to have been an insignificant optimization anyway.

Fixes T63329
2019-04-07 02:41:46 +02:00
cc73d59ad5 Fix T59014: black/corrupted viewport with Intel HD on Windows 7/8.
Work around bug in the Intel driver:
https://software.intel.com/en-us/forums/graphics-driver-bug-reporting/topic/550740
2019-04-06 14:26:23 +02:00
4dfa134899 GHOST: tweak warning message about OpenGL 3.3. 2019-04-06 14:26:23 +02:00
f12040e088 DRW: Opti: Fix hotspot in DRW_mesh_batch_cache_get_surface_shaded
The hotspot was generated by mesh_cd_layers_type_overlap who was testing
way more data than it should have.

Here we reduce the whole CD layer mask to a 32bit bitflag that is easily
or'ed and tested.

Bonus point: We use atomic operation to merge the mask in order to allow
future multi-threading. (this was a TODO)

In the scene attached to T58188 this removes 5% of CPU time.
2019-04-06 01:55:21 +02:00
542725d3e9 GPU: Fix typo 2019-04-05 21:15:25 +02:00
fefc9c95e4 DRW: Opti: Replace bound tex/ubo tracking array by bitfields
release_texture_slots() and release_ubo_slots() were one hotspot when
drawing taking ~9% of total CPU counters for no reason.

This was because of the loops using GPU_max_textures that was overkill and
slow.

Replace those by a simple 64bit bitwise OR operation.
2019-04-05 21:15:25 +02:00
2219f28a68 Cleanup: Fix compiler warning 2019-04-05 18:50:13 +02:00
e559074c4e Fix T61035 Draw manager crash opening file with curves
Move free callback call to GPU_batch_discard to prevent the crash.

The issue was that clearing can happen after referencing to an instance
buffer and that's perfectly legal.
2019-04-05 17:48:56 +02:00
d140e597a6 Fix T63281: Drivers inside nodegroups inside nodegroups don't show up in Driver Editor
Recurse into node groups when looking for drivers.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4653
2019-04-05 16:31:19 +02:00
df99c54b5b EEVEE: Fix compilation
Introduced by f0d6879f5c
2019-04-05 15:03:43 +02:00
d220a87b47 Fix T63283: Second subdivision modifier does not ignore crease
This is something where there is no single correct behavior,
sometimes it's needed to ignore the crease to make mesh more
smooth. But sometimes crease is to be considered after first
subdivision surface: for example, when adding extra subdivisions
for render-time displacement.

Made it an option whether modifier needs to take crease into
account or not.

Existing files should be openable in the 2.7 compatible way,
to re-create an old behavior the options is to be manually
disabled in the modifier settings.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4652
2019-04-05 14:50:24 +02:00
6de0da70de GPU not able to allocate texture
In the case of the report a GL_PROXY_TEXTURE_2D_ARRAY of 2509x2509x1 failed to be allocated.
This is a work around as the GL_PROXY_TEXTURE_* is not reliable.

Reviewed By: brecht, fclem

Maniphest Tasks: T63223

Differential Revision: https://developer.blender.org/D4651
2019-04-05 14:40:54 +02:00
f0d6879f5c Fix T62892 EEVEE HDRI lightning glitch
Clamp the texture at sampling time. This is not the best way to do it but
this is the fastest/simplest. The cost is rather negligeable.
2019-04-05 14:38:27 +02:00
George Vogiatzis
a180b754eb Interface: New region type 'Footer', used by text editor
* It can be hidden by dragging it up/down.
* It can be at the top or bottom, independent of the header.
* It uses the color theme from the header.
* It does not change its color, when the area becomes active.

Currently, it is used in the text editor to display the file path.

Differential Revision: https://developer.blender.org/D4601
2019-04-05 13:48:26 +02:00
Simon
fce469a30c Cleanup: Replace deprecated finite with isfinite
Differential Revision: https://developer.blender.org/D4649
2019-04-05 13:41:28 +02:00
2bd8f2dfad Cleanup: Spelling 2019-04-05 12:53:12 +02:00
b3b335c398 Fix T60390: add Cycles texture node mapping settings to node editor sidebar
These were missing from the UI previously.
2019-04-05 12:50:12 +02:00
a6efbe95cf Fix T63292: Crash Workbench Texture Drawing 2019-04-05 11:28:04 +02:00
d40581a714 GPencil: Improve drawing feeling in big files
When drawing in big files, the first points of the stroke were not smooth because the system was doing a copy of the depsgraph datablock.

Now, the depsgraph is not updated at the beginning and the feeling is far better, especially for big files.

To avoid the copy, the original datablock is used while drawing, because it's faster the lookup of the original data, than a full datablock copy.

Also some cleanup of the code.
2019-04-05 11:26:04 +02:00
b2e2db94bd Fix T60379: Cycles viewport adaptive subdivision hangs after updates.
The camera world to raster computation was using wrong values. Also fixes
update when changing subdivision scene settings.
2019-04-04 21:22:31 +02:00
59d0582a75 Workbench: Support Transparency + Textures
When texture drawing was enabled the fallback materials were not transparent.
The reason was that the solid material was requested. This patch will requesting
in this case the material from the forward renderer.

Fix: T63077

Reviewed By: fclem

Maniphest Tasks: T63077

Differential Revision: https://developer.blender.org/D4641
2019-04-04 19:02:11 +02:00
b26164ded5 Fix T63108 Eevee: Wrong Reflection plane matrix if camera view is not centered
Invert X axis of the Window Matrix (AKA Projection matrix) instead of the
View matrix.
2019-04-04 18:08:42 +02:00
c2f3ba64ce Fix T63198 Eevee: Indirect lighting settings arent not updating in Lookdev
This was caused by a missing check for those option.
2019-04-04 17:59:57 +02:00
9fdc16e204 Fix T63278 Eevee: LookDev: Volumetric on even if Scene World is off 2019-04-04 17:59:57 +02:00
3b2ea26554 Fix segfault when audio system cannot be initialised
`PyInit_aud()` can return `NULL` for variour reasons. When that happens,
we shouldn't continue.
2019-04-04 17:59:46 +02:00
ceded86de3 Fix T61830: Remove option to add new keymap item in search mode
This was not working well, because the search text was removed
after pressing this button. Finding the item that was inserted
was not easy.

Removing the option seems to be the best solution for now.
2019-04-04 17:38:31 +02:00
01d0903f1e EEVEE+Workbench: Show partsys in final rendering
In final rendering mode the display type was tested for
visibility flag. This should only occus when doing viewport
rendering

Reviewed By: fclem

Maniphest Tasks: T63056

Differential Revision: https://developer.blender.org/D4643
2019-04-04 16:44:10 +02:00
df3c1dde04 Fix T63256: Make Dupli Face was broken since there are collections 2019-04-04 16:37:55 +02:00
3c7a538c9b Fix T60891: bgl docs still include deprecated opengl functions
In a separate step, all new functions should be added.
However, the best way to do this, is not clear yet.
A list of functions, that have to be added is available
in D4280.

Differential Revision: https://developer.blender.org/D4280
2019-04-04 16:14:59 +02:00
59f6371a85 Fix T63252: Bind in Mesh Deform Modifier fails
A regression since 64c8d72ef1.

The solution is to force modifier evaluation for an evaluated
object, and let it to copy binding data back to original when
is being evaluated for binding.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4642
2019-04-04 15:49:30 +02:00
c81eca3d98 Fix T63276: crash deleting object with alembic constraint. 2019-04-04 15:16:31 +02:00
3c6deb69f7 Fix ply import tests.
The function for clearing out objects in the startup file
needed updating for 2.8 collections api.
2019-04-04 08:50:17 -04:00
12fe0b79ce Fix part of T62720: crash loading alembic mesh that has no vertices. 2019-04-04 14:47:10 +02:00
af3f4f29e4 DRW: Fix hair count being limited by recent refactor
This was making Autumn being half naked.

Issue was introduced by rBe72dc667c4d3
2019-04-04 14:44:19 +02:00
3ab3f893a9 Eevee: Add property update for render settings
This was preventing the viewport update when the properties were changed
via scripting.
2019-04-04 14:44:19 +02:00
2bc3418884 Fix T63000: Don't use original file name for autosave
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4609
2019-04-04 14:38:18 +02:00
1ffa7462a2 Avoid flow to avoid the collection textfield from becoming too small
The collection instance field is currently using flow.column(), which makes the name of the collection instance unreadably small. {F6898084}
I get that we want to save vertical space to avoid scrolling, but in this case it generates a new problem, so I'd rather avoid flow here.

Patch by sebastian_k

Reviewed By: billreynish

Differential Revision: https://developer.blender.org/D4614
2019-04-04 14:01:57 +02:00
0298f1d634 Fix T62870: progress in taskbar not updated when cancelling render 2019-04-04 13:47:41 +02:00
Benjamin Meyer
c384b5ddbd Fix: Erratic collision response when using constraints on colliders
Missing dependency, which made collission to access object transform
prior it was evaluated.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4636
2019-04-04 11:05:52 +02:00
aa00019de0 Cleanup: remove B-Bone shape pointers from bPoseChanDeform.
They are pointless copies from pchan->runtime by now.
2019-04-04 11:25:21 +03:00
Harley Acheson
0e78e3038d Separation lines for Quad View
Reviewers: brecht, billreynish, fclem

Reviewed By: billreynish, fclem

Differential Revision: https://developer.blender.org/D4633
2019-04-04 01:27:42 +02:00
3464a53477 Fix T63255: Crash when circle select performs selection outside the viewport's bounds. 2019-04-03 20:05:59 -03:00
ef91df608a Fix T61870 Eevee: Object's go completely black if they have a normal map
The problem was that tangent layers (being computed on demand in the batch
cache generation) were generated but if MR_DATATYPE_LOOPTRI was not present
(in some cases) and the looptri_len was 0, leaving the CDATA layer cleared.
2019-04-04 00:51:03 +02:00
c6de149ee7 DRW: Mesh Batch Cache: Fix error in loop custom data layer checking 2019-04-03 23:51:00 +02:00
d0c418b10a Cleanup: redundant casts 2019-04-04 08:15:26 +11:00
22bc9fb4a9 Cleanup: style 2019-04-04 08:13:13 +11:00
Christopher Peerman
2933fd6c7c Fix T55589, T60967: Windows pen pressure issues at start/end of the stroke.
The new implementation uses WM_POINTERDOWN, WM_POINTERUP and WM_POINTERUPDATE
and the pointer API to process stylus events. This avoids the delays that comes
with the WM_MOUSE and WM_xBUTTON events. The implementation should work on
Windows 8, and Windows 10 with both legacy and new pen interaction.

It also changes how the pressure is reset when the Windows Ink implementation
is enabled. The previous version reset the pressure to full when the pen left
the screen, however for some hardware implementations this allowed a small
window where Blender may process the final move event and read the pressure
as full leaving a dot on the last event.

Differential Revision: https://developer.blender.org/D4314
2019-04-03 18:04:03 +02:00
6a9a2b5133 Windows: use Wintab by default if it's available and a device is detected.
Previously Automatic tablet API mode would handle both Windows Ink and
Wintab events. This is unpredictable and causes problems with the fix
coming in the next commit.

Instead assume that in most cases where Windows Ink is desired there
will be no Wintab. If that's not the case, it can be adjusted under
Preferences > Input > Tablet.
2019-04-03 18:01:03 +02:00
aa0bb47576 Fix T63257: Grease Pencil renders incorrectly when in edit-mode 2019-04-03 19:58:49 +02:00
322abc1428 Audaspace: merging modulator effect from upstream. 2019-04-03 19:56:25 +02:00
acc20b117d fix for freetype download link and llvm/clang header harvesting 2019-04-03 18:51:42 +02:00
c6d1ae2f8a Fix T62780 , T59802, T57648: fullscreen window issues on Windows.
This fixes popups and preferences appearing behind the main window, as
well as flickering artifacts when Blender is in fullscreen.

Patch contributed by phocomelus.

Differential Revision: https://developer.blender.org/D4634
2019-04-03 16:01:20 +02:00
Harley Acheson
27a239864f UI: remove close button from Windows console window.
This way you can't accidentally close Blender when toggling the console
window to be visible. When Blender is started from the command promt the
close button remains.

Differential Revision: https://developer.blender.org/D4627
2019-04-03 15:51:48 +02:00
4f26d2348c Multires: Make topology cache to work with copy-on-write
Allows to preserve topology cache even when copy-on-write is
fully re-copying the object. For example, toggling edit mode
in and out does no longer causes full topology to be re-created.
2019-04-03 16:14:02 +02:00
b2d68b53df Fix export_obj_cube test.
Verified that current export files for all_quads.blend are good,
then updated expected MD5 hash to match current files.
2019-04-03 10:05:47 -04:00
07b91c62cb Reset background alpha for probe rendering.
Possibly fixes T63005.

Reviewers: fclem

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D4637
2019-04-03 15:57:38 +02:00
b1995e6451 Fix T63217: Curve Modifier skipped in Cycles
Only mesh objects have all modifiers applied on the evaluated
object's data, other object types are to apply modifiers during
the conversion process.
2019-04-03 15:38:17 +02:00
Victor Seiji Hariki
2f8b7030d4 Fix T62939: Incorrect cursor position when exiting UI slider
Differential Revision: https://developer.blender.org/D4629
2019-04-03 15:14:57 +02:00
George Vogiatzis
822c67364e UI: Fix odd behavior in region sizing, simplify code
* When resizing sidebars, don't collapse when the region becomes too big but
  instead clamp the region size to the available space.
* Fix clicking the tab to expand sidebars no working if the sidebar is too
  wide to fit. Instead make it less wide so it does fit.
* Fix incorrect limit on tool properties region height, for example in the
  file browser.

Differential Revision: https://developer.blender.org/D4611
2019-04-03 15:01:05 +02:00
e2d5ccf598 deps_builder : copy llvm headers to lib folder.
Were not needed previously, but the functions branch needs them.
2019-04-03 06:57:16 -06:00
ba2a81bcf1 Fix T62817: Can't drive modifier property with another one
Random place in the modifier stack can not be referenced,
so it doesn't make sense to sue GEOMETRY component as a
FROM operation.

So now drivers on modifiers are driving GEOMETRY component,
but are using PARAMETERS as a source for variables.
2019-04-03 14:50:21 +02:00
382b2a9c66 GPencil: Implement custom channel color in Dopesheet
A new parameter in the layer adjustment panel allows to define the color of the channel in Dopesheet.

This is needed when there are a lot of layers.

See D4623 for more details.
2019-04-03 10:25:49 +02:00
a813e259d6 Fix T63220: Cannot make object single user after Duplicate Scene with Link Object Data.
Caused by own recent rB17c15798c35f33e (already a fix in that code).

We cannot erase immediately master_collection's childrn list, as it is
used in sub-code to check in how many scenes an object is instanciated.
Further more, we only want to do the remove old/add new children
collections in case we are actually duplicating them.

Makes me even more eager to nuke that whole piece of code and rethink
from scratch that kind of ID handling. Some day...
2019-04-02 21:53:20 +02:00
Damien Picard
cf7dc769af Python API: expose text object kerning.
Differential Revision: https://developer.blender.org/D4621
2019-04-02 19:15:42 +02:00
1d365374e8 Merge branch 'blender2.7' 2019-04-02 17:51:44 +02:00
4c2b79a1d5 Constraints: Use RNA update instead of block update
Allows to have more control over which tags are done for which
properties.

This is a part of T62960 which fixes the issue in the 2.7 series.
2019-04-02 17:44:18 +02:00
4e2667ddf6 Constraints: Mark proxy lcoal as not editable
This can not work reliably anyway.
2019-04-02 17:43:33 +02:00
e9aa0d1e48 Cleanup: Remove space at the end of description 2019-04-02 17:42:30 +02:00
96de11c2c6 Fix T62434: EEVEE not using correct World Output node
We were already getting the designated output node in
'ntreeGPUMaterialNodes()' but this wasnt used in 'ntreeExecGPUNodes()',
instead whatever node was tagged NODE_DO_OUTPUT was executed.

note: this is just the bare minimum to fix the bug, other improvements
previously done in D4482 might follow as a separate commit.

Reviewers: brecht, fclem

Maniphest Tasks: T62434

Differential Revision: https://developer.blender.org/D4630
2019-04-02 17:09:27 +02:00
aaae21245e Cleanup: Fix compiler warning 2019-04-02 17:02:10 +02:00
Robert Guetzkow
f54db0fa05 UI: Collapsed nodes have the same width as uncollapsed nodes
Fixes T63079.

Differential Revision: https://developer.blender.org/D4617
2019-04-02 16:39:48 +02:00
459daf1648 Fix Linux build error after recent changes. 2019-04-02 16:30:51 +02:00
95a9a3e6c0 Cleanup: Scene Copy: remove scene's camera remapping in core func.
This is useless at that point, since no object has been duplicated yet...
2019-04-02 16:21:55 +02:00
0554b2e177 Fix T62970: Scene Copy: remove 'linked objects/obdata', add 'linked collections'.
'Linked objects' option was not behaving correctly before, effectively
linking in collections, so this one has been renamed to just 'Linked Copy',
and gives a fully shallow copy of current scene.

'Linked Obdata' was not really useful, kind of confusing, and was
painful to maintain, so dropping it now.
2019-04-02 16:21:55 +02:00
d986b04bd3 Fix broken BLI_STATIC_ASSERT on Visual Studio.
The old trick seems to no longer work in newer VS version.
2019-04-02 16:00:52 +02:00
4f4cea727e Fix T63164: DNA size mismatches on 32bit, causing memory corruption and crashes.
Some alignment rules from Visual Studion on 32 bit are not taken into
account, this fixes the structs to confirm. We now have static asserts
to catch when such breakage happens in the future.
2019-04-02 16:00:52 +02:00
b0037cd0b4 Fix T63219: error in previous commit for makesdna mismatch detection 2019-04-02 13:38:51 +02:00
964b5f02ca DNA: add error for DNA computed struct sizes and member offsets mismatch.
Ref T63164, there was a hidden bug like this on Windows 32 bit.
2019-04-02 13:42:13 +02:00
1abd909a92 Cleanup: remove DNA_PRIVATE_WORKSPACE hacks.
This is just not practical to do for the code as a whole, and having it as an
exception for one specific data structure is not that helpful. This has only
been in the way for me when refactoring code.
2019-04-02 13:32:25 +02:00
60090384f5 Cleanup: Fix compiler warning 2019-04-02 13:13:23 +02:00
dbccbc51fb Fix T63120 Select random in particle edit mode is broken
Fix coding snafu where the variable keeping track of changes only took
the state of the last element into account.
2019-04-02 12:37:45 +02:00
62811c3ba1 Fix T63211: Can't move camera in viewport while realtime render mode on
The issue is that Eevee directly evaluates animation on a datablock which
is a part of active dependency graph.

This is a broken logic by design and requires a complete revamp to support
more real life cases when camera is parented to a camera rig, but it is
beyond of what i can do with a simple bugfix.
2019-04-02 11:38:55 +02:00
0a2e59a726 Fix T61598: Python error from connect rigid body feature
needed update to 2.8
2019-04-02 10:15:04 +02:00
0df17bc9c9 Fix T60199: Icon Viewer addon causes internal errors and slows text editor
this just removes unused icon definitions [for which no icons exist
anymore]

Reviewers: billreynish, brecht

Maniphest Tasks: T60199

Differential Revision: https://developer.blender.org/D4628
2019-04-02 10:01:58 +02:00
6470056a0d Cleanup: empty expression statement warning 2019-04-02 17:54:04 +11:00
17c15798c3 Fix T63101: Blender crashes on adding any object to collection duplicated with added scene.
Issue was that (deep) duplication code of scene ended up leaving
children collections of new master one without any parent.

Note that even though I think that fix is OK for now, we should really
make 'deep' duplication of IDs part of the generic ID management code.
Am less and less happy with current handling of this, done half from
/editors code, half from some semi-specialized helpers from /blenkernel,
with sometimes nearly the same logic replicated several times for
slightly different needs, etc. Unfortunately this would not be a small
refactor, so it will have to wait...
2019-04-01 21:15:43 +02:00
b5382c92cf Edit Mesh Selection: Clear out buffer that indicates out of bounds pixels.
This prevents the use of uninitialized buffer.
In addition, use `memset` instead of assigning in a loop.
2019-04-01 11:53:04 -03:00
fa6c2c7dba GPencil: Handle vertex groups weights correctly
In extrude operator when the point was added, the weight data pointer was wrongly connected to old pointer.

Now, when move the data, the pointer is moved, but when a new point is added, the memory is duplicated to keep separated copies of the pointer.

This is related T62872

Thanks to @sergey for his help fixing this bug.
2019-04-01 16:48:01 +02:00
af6df8416e Cleanup: Indentation
Got broken in the previous commit somehow.
2019-04-01 16:33:28 +02:00
9ddf0c9d38 Fix memory leak in armatures with no bones
The cleanup operation was never run for such armatures.
2019-04-01 16:09:26 +02:00
e8c3c92248 Cleanup: Spelling 2019-04-01 15:33:09 +02:00
46eb5a0b8a Tweak behavior of object.to_mesh()
- Passing original object with apply_modifiers=false will give a
  non-modified non-deformed mesh.
  The result mesh will point to datablocks from the original "domain". For
  example, materials will be original.

- Passing original object with apply_modifiers=true will give a mesh which
  has all modifiers applied.
  The result mesh will point to datablocks from the original "domain". For
  example, materials will be original.

- Passing evaluated object will ignore apply_modifiers argument, and the
  result always contains all modifiers applied.
  The result mesh will point to an evaluated datablocks. For example,
  materials will be an evaluated IDs from the dependency graph.

Fixes T62916: Applying boolean modifier does not set material properly

Differential Revision: https://developer.blender.org/D4604
2019-04-01 14:49:23 +02:00
4370d00b0b Modifiers: Proper fix for the Apply Modifier
It is up to the operator to pass valid object to the modifiers
evaluation.

Fixes T62916: Applying boolean modifier does not set materials properly
2019-04-01 14:43:45 +02:00
64c8d72ef1 Modifiers: Use object passed to evaluation
This was wrong and violating design to force modifiers to query
evaluated objects and IDs. It is up to the caller to make sure
the object is properly evaluatable.

Effectively, reverting changes from de491abf99 (and possibly
other related changes).
2019-04-01 14:43:45 +02:00
a2a571987c Fix T62960: Expanding/Closing Constraints/Modifiers causes re-render
Mark specific properties as no-dependency-graph tag.

This is needed to avoid a centralized Copy-on-Write tag from RNA
pointer update.
2019-04-01 14:30:42 +02:00
90638d850d Remove evaluated RNA pointer lookup in interface
Since there is a flush of evaluated values back to the original
for an active dependency graph we don't need this lookup anymore.

Not only it slows interface drawing down, but also is becoming
in a way of the upcoming fix.
2019-04-01 14:30:42 +02:00
61fa6165df Fix T63071: Bevel inconsistent results toggling harden_normals.
Some iterations in bevel were over a hash table, which leads
to possibly different results run-to-run, especially when
loop_slide is enabled. Changed those iters to go over all verts
of BMesh, which leads to consistent order run-to-run.
2019-04-01 07:58:34 -04:00
dd4108545a Fix T63169: 'Duplicate Current' entry in new workspace menu is not translated. 2019-04-01 11:31:34 +02:00
d3367f3ca2 GPencil: Redesign soft eraser logic
The old logic was working if the eraser was moved towards the end of the stroke, but got ugly results when the eraser was done towards the start of the stroke.
2019-04-01 11:24:17 +02:00
48b1ba02e5 GPencil: Remove low limit for soft eraser
The low limit was not needed in the loop.
2019-04-01 11:24:17 +02:00
b936d7b16c Fix T62996
Reviewers
    Brecht Van Lommel (brecht)
    Clément Foucault (fclem)

Differential revision: https://developer.blender.org/D4618
2019-03-31 14:52:47 -07:00
a41008964c Fix: Buffer overflow in StudioLight
sl->light_ambient is a float[3], copy_v4_fl4 overwrites sl->free_function with a bogus
pointer on 32 bit.
2019-03-31 13:45:26 -06:00
a4869df4c9 I18n messages extraction: add 'generic' handling of Tools. 2019-03-31 18:49:11 +02:00
79c178b015 18N for tools definitions: make them resilient to None context.
Dynamic callbacks generating lists of tools should accept None context,
not crash on it.

Similar to what we do with dynamic RNA enums, when NULL/None context is
given, assume we are in 'introspection' mode and return as many things
as possible.

This is currently essentially used by i18n messages extraction tool
(where getting all possible entries is kind of mandatory ;) ).

Also add some initial missing tranlations for complex cases that cannot
be automated, there'll likely be more of that kind...
2019-03-31 18:47:54 +02:00
54943e319a Fix/Cleanup bad usage of RNA_def_parameter_clear_flags() on RNA properties. 2019-03-31 16:52:23 +02:00
700346d377 Fix T63137: crash pressing enter to confirm menu, after recent changes. 2019-03-30 20:37:45 +01:00
2c5a919212 Cleanup: remove unused modifier methods. 2019-03-30 19:17:05 +01:00
03bd024c07 GPencil: Uses same random seed for render in Noise modifier
As the random seed was calculated in the copy data, the render could be a little different. Now, the data is saved in the original data.
2019-03-30 17:06:49 +01:00
Author Name
4b6a4b5bc2 GPencil: Fix segment fault when use F3 search menu.
Author of the patch: Robert Guetzkow (@rjg)
2019-03-30 16:06:45 +01:00
127ad4fa4a GPencil: Improve soft eraser for low pressure strokes
For very thin strokes with low pressure, the low limit value was too high.
2019-03-30 10:43:52 +01:00
de0dab66ff Fix T63086: Navigation problem with Background/Reference Images
The issue was the manipulated depth for images would be used when doing distance depth checks.
Now we will use the actual depth of the image object when doing such tests.

Reviewed By: Clément Foucault

Differential Revision: http://developer.blender.org/D4616
2019-03-30 08:22:43 +01:00
024d02256e Fix T63115 crash upon switching to textured/rendered mode 2019-03-30 04:20:35 +01:00
98f00a3eb5 UI: Icons update
New icons from Andrzej Ambroż / jendrzych:
-Adds separate icons for 3D Cursor orientation and pivot
Also, many dozens of tweaks and updates - too many to mention here.
Full list is on Devtalk
2019-03-30 01:02:15 +01:00
25ec4b437f Cleanup: style, use braces for the Python API 2019-03-30 07:14:28 +11:00
18d06e8d21 Cleanup: style 2019-03-30 07:14:28 +11:00
d6747f310f Eevee: Material: Decouple transparent shadows from blend mode
This makes it easier to exclude a surface from casting shadows and can be
used to manipulate the shadows even for opaque surfaces.

Versionning ensure that old behavior is transfered to new rendering logic.
2019-03-29 19:18:19 +01:00
f0a20ae1c9 Fix T61129 Eevee: alpha texture shadow bug
This was due to some shading resources not being bound for the shadow
shader. This commit completely remove the shading part when in a shadow
shader. Thus making it a bit more lightweight and removing the needed
sources.
2019-03-29 19:18:19 +01:00
21f35661c1 Fix cramped display of tool setting enums in workspace tab. 2019-03-29 17:56:42 +01:00
b9b3b4a957 Fix part of T63102: wrong Python API Reference link in Help menu. 2019-03-29 17:56:42 +01:00
5aca73e774 Fix header text for muted collapsed nodes not being greyed out. 2019-03-29 17:56:42 +01:00
dec9c7d87e Eevee: Implement Texture coordinate from object
First try to implement T57489. But unfortunately, there is a missing
dependency in the depsgraph that does not trigger the shader update.
2019-03-29 17:41:06 +01:00
c14e6ee9a4 Cleanup: Line wrapping 2019-03-29 15:41:13 +01:00
fb86d09195 GPencil: Improve soft eraser for last stroke points
Now, the last point is managed separately in order to get smoother transition.
2019-03-29 15:39:47 +01:00
a942d8859c Cleanup: Spelling in comment 2019-03-29 15:33:44 +01:00
d66ed7d540 Fix T63042: Grease pencil and armature will sometimes copy successfully because of the put in Collection order, sometimes fail.
Remove remapping to new IDs from `BKE_object_duplicate()` itself, doing
it here will break later remapping done after all desired objects have
been duplicated, preventing complete remap of ID pointers used in obdata
and other sub-data of duplicated objects.

Checked, the only two usages of this function were already doing
separated later step for this anyway.
2019-03-29 14:57:32 +01:00
d9829efb0a Cleanup: BKE_object_duplicate.
Comments, code consistency, remove disabled code...
2019-03-29 14:57:32 +01:00
2182ae5c0f Cleanup: Fix comment. 2019-03-29 14:57:32 +01:00
0cd36ccfaf Fix T63075: edit mode crash with deforming modifiers, after recent changes. 2019-03-29 14:53:56 +01:00
800aeaba72 GPencil: Cleanup code
Reduce double function calling.
2019-03-29 12:51:46 +01:00
7fc7e325ef Fix T63082: Outliner allows assign grease pencil materials to mesh
The grease pencil materials only can be assigned to objects of grease pencil type.
2019-03-29 11:58:28 +01:00
1def03d797 Fix T62938: Rigid body crash with surface effector
Missing dependency graph relation from geometry to simulation,
which made simulation to use evaluated mesh while it is being
evaluated.
2019-03-29 10:27:57 +01:00
9f55beb971 Cleanup: Make it obvious which relations are used
Relation in dependency graph is something else. So make it clear
that those are the effector ones.
2019-03-29 10:21:36 +01:00
d724363a39 Fix T62908: Missing update when inserting keyframe from dopesheet 2019-03-29 10:01:55 +01:00
99d4321fef Fix T63063: solidify modifier crash after recent changes.
It should not assume there to be an origindex layer. Checked other modifiers
and they all seem to explicitly create it or verify if it's NULl.
2019-03-29 01:43:30 +01:00
6d4d7c7ca3 Cycles: reduce number of synchronizing object prints.
Do it only for meshes/curves since those are potentially slow and need user
feedback to see things are not stuck. For object instances and lights assume
it's fast enough.

Printing too much can have a performance impact on slow Windows command
prompt or when logging complex scene renders.
2019-03-29 01:42:38 +01:00
cefc058dd8 Build environment: update comment about required packages. 2019-03-29 00:39:19 +01:00
7cbd1b0c98 Eevee: Render: Reduce debug print amount to not decrease perf
This is to fix the slowdown issue experienced on windows when rendering
from command line.

Fix T59649 Eevee in command-line batch mode is slow with particles/duplis
2019-03-28 23:24:25 +01:00
4d71b655ec GPU: Fix color difference when rendering to gpu_py_offscreen
Now we do the color management inside the Draw manager and output CM byte
buffer.
2019-03-28 22:38:55 +01:00
42dd888b98 Fix T62178 Eevee: Texture Box mapping not matching Cycles if object is scaled
The wrong transformation was used. Add a new matrix specially for this case.

This also fix the Node texture coordinate that was suffering the same issue.
2019-03-28 22:08:54 +01:00
d027df3add Fix T58387 Voronoi(Cells) does not work on eevee (amd + windows)
Thanks to Gabor Fekete for helping finding the issue.

Was caused by uninitialized variable. Also took the oportunity to use comp
swizzling instead of multiple assignment.
2019-03-28 22:08:54 +01:00
a89780abb5 DRW: Fix Memory leak introduced by previous commit 2019-03-28 22:08:54 +01:00
ec0eeb918b DRW/Eevee: Add correct support for Orco
Until now, Orcos were computed by the gpu (GLSL) and were not taking into
account the modifier stack (breaking orco for deformed mesh).

Now Orco is now computed on CPU but only if a modifier stack is present.

Tagging that an ORCO layer is present is done via a 4th component, which is
a waste of memory/bandwidth. Best would be to do the same as auto attrib
color space and save a bool uniform somewhere but for now it's too
disruptive.
2019-03-28 22:08:54 +01:00
Nathan Craddock
1ef59026e4 UI: tweak display of report messages in the status bar.
Remove fading away the color, share theme colors with info editor.

Differential Revision: https://developer.blender.org/D4197
2019-03-28 20:02:59 +01:00
Robert Guetzkow
56428a46b9 Fix T60719: muted nodes are not clearly visible.
Now the entire node gets greyed out, instead of using a red header that is
hard to distinguish from other nodes with similar header colors.

Differential Revision: https://developer.blender.org/D4597
2019-03-28 20:02:59 +01:00
a016ad2ea8 Fix part of T60735: invalid CD_ORIGINDEX data in some modifier stack evaluations.
BKE_mesh_new_nomain automatically added a CD_ORIGINDEX layer initialized to 0,
which was never filled in correctly. In 2.7 the equivalent function used to
modify the source derivedmesh and add valid original indices to it, but this
is no longer possible in the new design and was quite unpredictable anyway.

Now instead rely on mesh_calc_modifiers and the depsgraph to determine when
CD_ORIGINDEX should be added.
2019-03-28 20:02:59 +01:00
0680525147 Fix T60735: Cycles render hangs with vertex instancing.
This should not use the original index as a unique instance index, with for
example an array modifier the same original index may be used multiple times.
2019-03-28 20:02:59 +01:00
7b95d64d2f Cleanup: better naming, comments, variable scoping in mesh_calc_modifiers. 2019-03-28 20:02:59 +01:00
c39d82daf4 Cleanup: remove unused derivedmesh code. 2019-03-28 20:02:59 +01:00
fbfa5890bf Fix build errors
From rBd5cb425b8745
2019-03-28 16:00:37 -03:00
7b62c61d6e UI: Theme: Make selected text stand out
Previous selected text color was almost invisible against the dark background.
Use same selected/highlight color as in other places in the default theme.

Issue reported on Devtalk by user Symstract
2019-03-28 19:59:46 +01:00
d5cb425b87 Possible fix for T62999: Crash when select in edit mode.
Apparently some drivers don't allow `glReadPixel` read out pixels of texture boundaries.
Intersect `rect` to avoid such cases.
2019-03-28 14:19:21 -03:00
dfa470ec33 GPencil: Fix error in previous commit 2019-03-28 17:17:04 +01:00
eeefea86cd Fix T63054: Crash on "Grease Pencil Unlink"
This operator was used only by annotations and it was part of the old legacy code.

Now, the operator is limited to annotations and cannot be used with grease pencil objects.

Also changed the tooltip to clarify it's only for annotations.
2019-03-28 17:07:49 +01:00
1dddb47e48 Fix T63052: Crash on "Grease Pencil Fill" without Grease Pencil Object
Changed poll function to verify if the context is valid.

Also cleanup return values.
2019-03-28 16:48:32 +01:00
1be2888bf0 Fix T62717: Switching Shading Modes During Sculpting
Switching shader modes to material or render during a sculpting session
showed the model when the sculptsession was started. The user needed
to click that forced an update of the sculptsession.

In `sculpt_flush_update` the eevee drawing mesh is not updated when
workbench engine is used.
2019-03-28 16:10:15 +01:00
87ac695106 Fix T63032: Increase camera properties precision in UI
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4610
2019-03-28 15:56:53 +01:00
e2995b29a9 Fix T63015: Crash when using circle select tool in lattice edit mode
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4608
2019-03-28 15:04:09 +01:00
aa0c864d48 Fix T62874: Crash Texture shading+Transparency
When texure shading is enabled, the transparency accum shaders were not set/updated.
This resulted into a crash when transparent objects were rendered when shading mode
was set to texture.

This patch will add the V3D_SHADING_TEXTURE_COLOR to the modes for OIT so the
shaders are set.

Reviewed By: fclem

Maniphest Tasks: T62874

Differential Revision: https://developer.blender.org/D4592
2019-03-28 14:59:00 +01:00
fe9c9a313f Fix T63040: Resizing node has offset
This broke in rB6500b31728d870506207d9d70837b171cbef32ea.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4607
2019-03-28 14:56:55 +01:00
deb3b8301a DrawManager: Add Edge Detection To DisplayLists
Objects that internally uses DispList do not cast shadow in the workbench.
Their outline is also not visible in object mode. The reason for this is
that edge detection was not implemented for Display Lists. This patch will
implement the edge detection.

Reviewed By: fclem

Maniphest Tasks: T62479

Differential Revision: https://developer.blender.org/D4605
2019-03-28 14:52:25 +01:00
f916b43256 Fix T60421: Bone heads are hidden when non-connected parent is hidden
The root point of a bone is now always drawn unless it is connected to an other bone.

Reviewed By: Clément Foucault

Differential Revision: http://developer.blender.org/D4194
2019-03-28 13:09:16 +01:00
0403a2f785 Fix T53997: island_margin in bpy.ops.uv.smart_project seems to have no effect
Now island margin acts as a percentage instead of being the actual distance.
So the margin distance will always be the same regardless of the actual size of the geometry.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4514
2019-03-28 12:55:47 +01:00
5a8dcdd24e Fix T62944: Memory leak in animation playback
Missing memory free in the early output of particles distribute
initialization.

Seems it was always there.
2019-03-28 12:07:58 +01:00
9d1cab2eba Fix T63030: Edge crease is not applied for boundary edges
Caused by missing vertex sharpness comparison in the topology
comparator.
2019-03-28 11:49:08 +01:00
33b43dd933 Fix T63031: Keyframing Annotations doesn't work
By design the annotation parameters must not be animatable.

Annotations are designed to take notes, not to create animations, so any animatable parameters have been flagged as non-animatable.

Note: As some properties are shared with grease pencil, I had to duplicate one property (adviced by @mont29) to keep grease pencil animatable but annotations don't.
2019-03-28 11:43:32 +01:00
5bcca7ae92 Depsgraph: Fix dependency cycle when adding rigid body
Was a mistake in the recent change.

The idea here is: manual should invalidate point cache, but
rigid body simulation should only happen after point cache
was ensured to be in the correct state.
2019-03-28 11:04:00 +01:00
fdf92b923a Fix T63037: Accelerator keys fail when another key is highlighted 2019-03-28 16:44:27 +11:00
02ff600620 Cleanup: add doxy sections to view3d_draw,header 2019-03-28 15:20:39 +11:00
cd92f8ea46 Fix bpy.msgbus.subscribe_rna argument parsing
Also enforce all arguments are keywords and update docstring.
2019-03-28 11:40:17 +11:00
a58a4f48be Edit Mesh Selection: Clear buffer before using in glReadPixel.
Areas out of bound are not written.
2019-03-27 20:34:05 -03:00
c11a317ee1 Cleanup: style, use braces for makesdna, datatoc 2019-03-28 10:11:54 +11:00
e80527ec4d DRW manager: Always assume that the GL_DITHER and GL_SCISSOR_TEST should be disabled if not used.
This may fix a glitch detected when you perform edited mesh selection.
See comment in rB00bdb5cdf08f
2019-03-27 19:36:12 -03:00
c263ccf250 Fix T63023: wrong Eevee window coordinates for background. 2019-03-27 22:32:13 +01:00
f589b28f80 Fix part of T63023: wrong Cycles window coordinates for background. 2019-03-27 22:21:23 +01:00
780219f868 Eevee: Fix reflection plane weird behavior when comming from lookdev mode
The reflection was set to use the 1x1px texture as rendering target and was
considered valid reflection texture.
2019-03-27 22:02:31 +01:00
37e3b89506 Fix T63017: selection via lasso does not work properly in X-ray.
Probably missed in rB40f8ddf8297a.
2019-03-27 16:48:49 -03:00
52d5d53b5e Fix T55956: Transfer Weights: Source Layers can't be set to Active Layer.
Behavior of source/destination options was rather flaky in reversed
mode...

Note that even though this mode is a bit annoying and cumbersome, the
only alternative (defining a specific transfer weight operator) would be
much more verbose, so think that for now we'd rather keep what we have
here.
2019-03-27 20:47:56 +01:00
05201c75e3 Cleanup: minor comments fixes. 2019-03-27 20:47:56 +01:00
f9a69a481e Fix T62566 Eevee: Cubemap doesn't bake from current frame of animation
This was technically a feature request but it was quite simple to implement
so I did it quickly. Also it is much more consistent now.
2019-03-27 20:47:15 +01:00
afaa832a85 Fix T62680 Mirrored objects have flipped binormal vectors in LookDev
Pass binormal sign via object info.
2019-03-27 20:21:10 +01:00
2add370096 Eevee: Modify tooltip about transparent shadow
Mention that this option is only for shadow mapping and not contact shadow.
2019-03-27 19:41:35 +01:00
96d200775a Fix T62997 Eevee: visual artifacts during irradiance volume baking
Seems to be a problem with Nvidia drivers. glFlush does not work but
glFinish does ensure correct multithreading.
2019-03-27 19:15:32 +01:00
6d1921dd81 Fix T62862 Eevee: Glitchy reflections in ortographic view
This was caused by sign(cubevec.xy) returning 0.0 when one component was 0.
Thus making the resulting component component 0.0 instead of 0.0.
2019-03-27 19:15:32 +01:00
021333ae3a UI: Add missing separator in object context menu 2019-03-27 17:04:47 +01:00
99c98aa306 Python API: tweak RenderEngine example to be a bit more efficient.
Suggested by Germano Cavalcante.
2019-03-27 16:25:19 +01:00
532536bf52 Fix T61559: show object constraints also when in pose mode, remove warning.
This was originally added in 6feddb8b61, but the warning is quite clumsy
and we also don't limit editing object transforms that way. The add constraint
button at the top now also indicates if it's for objects or bones, which was
not the case before and probably was part of the confusion.

If it does still cause issues we can always change back or hide the tab.
2019-03-27 15:41:06 +01:00
00bdb5cdf0 Edit Mesh Selection: make sure that GL_SCISSOR_TEST is disabled.
Possible solution for T62999.
2019-03-27 11:35:32 -03:00
9624df5d1e Fix T63004: Make Links operator would still allow collection instancing
for objects other than Empties

In 2.8 support for dupli-group instancing for non-empty objects was
removed (rB2eca054e14b1), so better prevent operators from setting
this...

Reviewers: brecht

Maniphest Tasks: T63004

Differential Revision: https://developer.blender.org/D4599
2019-03-27 15:27:49 +01:00
73b55a5508 Cleanup: style, use braces for draw 2019-03-28 01:14:03 +11:00
56b06ee83a Fix T62901: Bad handling of missing addon category 2019-03-27 15:13:14 +01:00
34c2185af4 Fix debug error on recent commit. 2019-03-27 11:06:15 -03:00
5a1a633d04 UI: minor change to active-default logic
Don't attempt to activate default button if it's already active.

Also expand on the flags comment.
2019-03-28 00:59:50 +11:00
57de9581e8 UI: use active-default button flag for operator confirmation 2019-03-28 00:54:55 +11:00
27b73f0c5b GPencil: Remove legacy ED_gpencil_draw_view3d code.
Differential Revision: https://developer.blender.org/D4598
2019-03-27 10:53:15 -03:00
c87e467e39 Fix T62935: Missing tag when copying constraints 2019-03-27 14:50:09 +01:00
a8c1b792da UI: use active-default button flag for the file selector 2019-03-28 00:46:13 +11:00
2d34420648 UI: support an 'active default' button for pop-ups
Use this for the save confirmation dialog so it has a default action
when pressing enter which draws with a highlight so it's clear what the
default action is (the dialog was just closing before).

Resolves T57686
2019-03-28 00:26:00 +11:00
e3b83e2921 Cleanup: remove unused menu bl_spacetype 2019-03-28 00:26:00 +11:00
b4d19c2ec1 Fix T62978: grease pencil 3D view header layout broken after recent changes. 2019-03-27 13:59:54 +01:00
db4a522249 Revert "RNA: error on register when classes use invalid identifiers"
This reverts commit b24a255ca6.

The warning wasn't being printed, so many add-ons weren't yet updated.

Re-enable now warnings are printed to allow addon developers to update.
2019-03-27 23:29:53 +11:00
6387fdda74 Fix T62926: allow using shift click drag to extend selection in file browser.
Standard behavior on most operating systems.
2019-03-27 13:13:05 +01:00
8d7005d715 Cleanup: style, use braces for bmesh 2019-03-27 17:14:36 +11:00
e26b67fa1e Fix popovers from enums failing on drag-release 2019-03-27 15:35:49 +11:00
69a77a1b83 Fix class registration ignoring info/warnings
Only errors were displayed in the console.
2019-03-27 14:03:40 +11:00
9f2665b526 PyAPI: utility function to print reports 2019-03-27 14:03:40 +11:00
fb7f157ff8 Cleanup: unused variables 2019-03-27 13:19:02 +11:00
9ba948a485 Cleanup: style, use braces for blenlib 2019-03-27 13:17:30 +11:00
337eb8c1de Python API: add more detailed example for RenderEngine. 2019-03-26 19:57:51 +01:00
85915ae1aa Python API: allow passing None to some BGL functions instead of bgl.Buffer
Many OpenGL functions take NULL pointers, passing those was quite complicated
with some addons even using ctypes to manipulate internal bgl.Buffer pointers.
2019-03-26 19:56:43 +01:00
c515ea2e93 Fix vertex array leak in Cycles viewport drawing. 2019-03-26 19:56:43 +01:00
6e3331990f DRW manager: Use existing viewport instead of creating a viewport in DRW_draw_depth_loop. 2019-03-26 12:29:12 -03:00
d67122e027 Fix T62952: remove lamp as camera using the lamp clip start/end.
Eevee and Cycles don't use these clipping distances the same as Blender
Internal did, or at all in most cases. Just remove this since it makes no
sense anymore.
2019-03-26 16:11:48 +01:00
9b39a71793 Fix T62958: Improve exponential easing formula
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4596
2019-03-26 15:43:51 +01:00
16a04dccd5 Fix T62955: Missing panels in workbench engine
Afaik all the panels in the scene settings are render
engine independent. So it does not make sense to have
this extra complexity in every panel class.

Reviewers: brecht, billreynish

Differential Revision: https://developer.blender.org/D4594
2019-03-26 15:43:12 +01:00
8e0eb4125d Fix T62626: Python errors when pinning particle settings. 2019-03-26 15:41:43 +01:00
32c9b3a0ff Merge branch 'blender2.7' 2019-03-26 15:30:52 +01:00
7574f90a71 Fix Cycles standalone build, needs OpenJPEG libraries with OIIO now. 2019-03-26 15:29:01 +01:00
52aa35ec1e Fix T62189: Wires Occluded When Edit Mesh Faces Disabled
Reviewed By: fclem
Maniphest Tasks: T62189
Differential Revision: https://developer.blender.org/D4593
2019-03-26 15:19:47 +01:00
51f8e51d78 Edit Mesh: Fix interpolation of gradient on edit edges
This fix some issue with the AA on edit mesh edges.
2019-03-26 15:11:31 +01:00
3aeb44cd79 Fix T62260 edges display bug on big geometries when looked up close 2019-03-26 15:11:31 +01:00
33a759a39c Revert "DRW Manager: create and use new DRW_framebuffer_depth_read utility."
This reverts commit 40f8f445a3.

There are many paths that lead to uninitialized depth buffer where the
depth read would fail.

Fix T62965
2019-03-26 15:07:05 +01:00
fb96dcd713 UI: Avoid double separators in some circumstances in the object context menu
Also make placement of Rename more consistent between object and bones.
2019-03-26 14:48:35 +01:00
a29446da52 Cycles: sync various master changes to blender2.7.
Many of these were left out accidentally. We will only do important bugfixes
in blender2.7 for Cycles from this point on.
2019-03-26 14:42:26 +01:00
5d455a7a90 Fix (unreported) crash when making object single user in some cases.
Issue would happen in case affected object is linked to collections that
are shared between different scenes' ViewLayers. When switching back to
another scene after making single user, you'd get immediate crash.
2019-03-26 14:41:37 +01:00
6f7392312c Fix T62929: Linked To Scene Object cannot be made single user.
Code was still 2.7x one here, Object's IDtemplate in properties editor
is now based on current view layer's collection of objects, not scene's
one anymore.
2019-03-26 14:41:37 +01:00
8754ad4dc1 UI: Make naming clearer for the motion paths commands in the pose context menu 2019-03-26 14:37:10 +01:00
982a80e6d8 UI: Add rename to object and bone context menus 2019-03-26 14:36:15 +01:00
b2656a6ee4 Fix T62887: When searching for fonts, thumbnail display mode will crash Blender
We do not support special color fonts (like colored emoji fonts), so
don't crash when trying to create a preview for unsupported fonts.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4590
2019-03-26 14:11:35 +01:00
c2c6083c14 Fix T62957: Camera frame returns zeros 2019-03-26 22:53:42 +11:00
f786861820 Fix T62756, T62131: moving stencil texture fails after moving stencil mask 2019-03-26 12:36:47 +01:00
b33005c1f4 Fix T62925: shift+F1 append shortcut not working in Blender 2.7 keymap. 2019-03-26 12:13:14 +01:00
67516b93d8 Fix T62515: crash when rendering finishes with mouse over progress bar.
Tooltip should be copied entirely, not just the the argument because then the
function and argument don't always match.
2019-03-26 12:04:14 +01:00
ce3b78c73a Cleanup: style, use braces for editor/spaces 2019-03-26 21:16:47 +11:00
5279d118c2 Cleanup: style, use braces for editor/metaball 2019-03-26 21:16:26 +11:00
1bde690e91 Cleanup: style, use braces for editor/interface 2019-03-26 21:16:13 +11:00
fe7812f7c2 Cleanup: style, use braces for editor/curve 2019-03-26 21:15:47 +11:00
14e013758d Depsgraph: Standardize parameters nodes
Makes it possible to handle them the same from drivers
relations builder.

Solves missing operations errors printed when opening
autumn character.
2019-03-26 11:05:18 +01:00
40f8ddf829 3D View: move deselect all logic into an option
This removes `VIEW3D_OT_select_or_deselect_all`, adding a
deselect_all option to the `VIEW3D_OT_select` operator.

- Add utility functions to simplify de-selecting all.

- Return true from selection functions when they change the selection
  to avoid redundant updates.

- Use arrays of bases when passing objects between selection utility
  functions since some users require bases.

- Fix logical error in box selection that updated all objects after
  the first hit.
2019-03-26 20:25:25 +11:00
30fbf905ef Fix T62774: Respect Show Overlays
Some draw code did not respect Show Overlays option. These were:

 * All mode based drawing engines (edit mode)
 * Wireframe drawing

This change make them respect the Show Overlays Option.

Reviewed By: fclem, billreynish

Maniphest Tasks: T62774

Differential Revision: https://developer.blender.org/D4572
2019-03-26 07:58:54 +01:00
2bbfaa1c94 Fix use of uninitialized variable in grease pencil materials. 2019-03-26 04:26:47 +01:00
6944228027 Fix T62946: function abs() not working in driver expressions. 2019-03-26 04:11:34 +01:00
6618a19fa9 Fix T62946: missing warning when Python driver expression execution is disabled. 2019-03-26 04:11:34 +01:00
da4dc6847b Cleanup: remove unused function 2019-03-26 12:51:52 +11:00
adfdae3fc2 Cleanup: style 2019-03-26 10:15:46 +11:00
a750dea74e Cleanup: warnings, correct assert 2019-03-26 10:15:36 +11:00
82de58b318 Fix T62927: Assert when opening default 2.79 startup file in 2.80.
Not sure why that was asserted on instead of handling the flag properly,
if base is not selectable, then just do not select it...

Have the feeling this code handling sync of flags between bases and
objects could use some cleanup, but that will be for another day.
2019-03-25 21:10:02 +01:00
e59a2fcc35 Fix T62856 Toon BSDF and viewport/UI oddities
This was caused by the material not tagged to use Diffuse lighting data.
2019-03-25 20:36:31 +01:00
c602ec74fd GPU: State: Replace GL_BLEND by GPU_blend 2019-03-25 20:26:52 +01:00
c41e8b8f6f GPencil: Remove unused var 2019-03-25 20:24:02 +01:00
420f30efe7 Fix T62930 Eevee: Wireframe input node not working with certain compiler 2019-03-25 19:44:44 +01:00
7021bd5273 GPencil: Only brushes with pinned materials have materials
Using GP_BRUSH_MATERIAL_PINNED to switch between active material and brush material, instead of updating all brushes on active material changes. This will allow brushes to have no material and therefore to not inflate the user count.

This fix T62465.

Patch contributed by @matc
Reviewers: @brecht @antoniov @billreynish @mendio
2019-03-25 17:06:07 +01:00
84240ebb3e Fix T62776: Face maps are initialized incorrectly
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4586
2019-03-25 16:32:01 +01:00
9cd970734b Fix T62536: incorrect context when selecting particles
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4566
2019-03-25 15:54:48 +01:00
1638204ad4 Fix T62865: Make Single User after Objects to Scene must be done twice.
Selected status was not properly moved from new object to new created base.
This prevented next steps (making obdata, materials etc. local) to ever
happen.
2019-03-25 15:23:56 +01:00
0195aad6da Fix T61577: collapse nodes hide arrow hit zone overlaps with node sockets.
Patch by EitanSomething.

Differential Revision: https://developer.blender.org/D4423
2019-03-25 14:28:29 +01:00
489c015e70 Fix T62891: particle even distribution is not even.
CD_ORCO coordinates are stored normalized by convention, this code path did
not store them correctly.
2019-03-25 14:28:29 +01:00
a6f9e0d644 UI: Add Copy/Paste to top level Outliner context menus 2019-03-25 13:40:55 +01:00
c97e291580 Keymap: Add support for the Cmd key on macOS for copy/paste in the Outliner.
Consistent with other areas.
2019-03-25 13:30:21 +01:00
a74b571dde Merge branch 'blender2.7' 2019-03-25 11:23:00 +01:00
0f9792507d Cleanup: Spelling in comment 2019-03-25 11:19:50 +01:00
Stephen Hassard
ede1ca0b3f Change remaining FTP server URIs to HTTP(s)
Most of the source tarballs are retrieved via http, but a few remain
that are still downloaded via ftp. This causes some pain with corporate
firewalls, so moving the last two URIs to http helps ease the build process.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4192
2019-03-25 11:19:14 +01:00
13839860d4 Merge branch 'blender2.7' 2019-03-25 11:05:03 +01:00
d46cb486ed Include blosc, embree and opencollada into BUILD_NOTES.txt file.
For custom path selected during 'install_deps.sh' using '--source'/'--install', paths for blosc, embree and opencollada are not printed/inclued into BUILD_NOTES.txt file.
As '/opt/lib/<package>' paths are hardcoded into CMakes's Find* modules, this error is not noticeable, but for custom paths it is.
This patch includes those fixes/prints for those packages.

Reviewers: mont29

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D4574
2019-03-25 11:04:26 +01:00
ccf7630a6d Fix T62912: Blender 2.7 keymap missing ctrl+tab select mode switching. 2019-03-25 10:47:52 +01:00
5aaf67c196 Merge branch 'blender2.7' 2019-03-25 10:46:20 +01:00
cfe044b4ef Fix T62175: Crash on Undo.
Again nodetree broken code... as usual...
2019-03-25 10:34:56 +01:00
a3e9b61a2f RNA: add UILayout.prop_with_menu function
Matches prop_with_popover, supporting menu types,
useful if we want to control behavior of enum switching.
2019-03-25 20:34:47 +11:00
d8d06120e4 RNA: rename prop_popover_enum to prop_with_popover
A version for menu's is going to be added next and we already have
UILayout.prop_menu_enum.

This name indicates the popover is added behavior instead of a
different kind of widget.
2019-03-25 20:34:30 +11:00
14b60c3a1c Cleanup: UI messages of copy/paste in 3DView.
Remove references to buffer or temp file, some other minor edits.
2019-03-25 10:19:56 +01:00
94388d69bb Add copy/paste of any IDs in Outliner.
This adds entries to copy/paste (selected) IDs in the Outliner, as well
as usual ctrl-C/ctrl-V shortcuts.

Note that the clipboard is shared with other IDs copying (currently, the
one for objects in 3DView).

Reviewers: brecht, dfelinto, billreynish, pablovazquez

Differential Revision: https://developer.blender.org/D4568
2019-03-25 10:09:57 +01:00
c1f8b9753a Copy/Paste: refactor to be able to paste any kind of IDs, by type.
This commit does not add anything new from user perspective, but make it
possible to paste any kind of IDs, not only objects/collections.

Will be used by new copy/paste in the outliner in next commit.
2019-03-25 10:09:03 +01:00
6d8a945f06 UI: replace popovers with prop_popover_enum 2019-03-25 19:30:59 +11:00
a5bbfd9fca UI: add icon_only option to prop_popover_enum 2019-03-25 19:21:55 +11:00
2fa0a9a329 Error in last commit 2019-03-25 19:08:02 +11:00
e583642312 UI: add UILayout.prop_popover_enum function
Support for RNA enum buttons that activate popovers when clicked.

This means we get useful tooltips, shortcuts and Ctrl-Wheel cycling
over enum items.

It also avoids inconvenient & slow access of enum values currently done
via RNA type lookups on the type to get the name & icon to use for a
regular popover button.

Resolves T57738
2019-03-25 19:05:13 +11:00
ca0cc0518f Cleanup: simplify toggle button logic 2019-03-25 16:21:13 +11:00
dec9e34361 Gizmo: use fill select for scale/transform center
Resolves T58072
2019-03-25 15:41:24 +11:00
b67c3a0db9 Gizmo: add option to move & dial gizmos to select as filled
Draw as an outline while using solid selection.
2019-03-25 15:40:43 +11:00
f3cff06087 UI: Material slot selector for the shader editor
D4583 by @HooglyBoogly
2019-03-25 14:49:44 +11:00
b24a255ca6 RNA: error on register when classes use invalid identifiers
Ensure conventions are met since we're in beta and all instances should
be updated before release.
2019-03-25 14:48:28 +11:00
2ed3fbf106 Fix T62859: UV circle select options don't work 2019-03-25 14:13:09 +11:00
Alex Strand
7bfd3130fb Fix T62866: 3D text not filled by default
Regression in bc5b0f7a09

See D4581
2019-03-25 13:33:13 +11:00
6dbe96757b Cleanup: return argument naming 2019-03-25 12:19:55 +11:00
07f6be87a9 Cleanup: style (render module) 2019-03-25 11:55:36 +11:00
abd18f6ec0 Cleanup: style 2019-03-25 11:42:28 +11:00
e86e0aad55 Cleanup: use braces for interface code 2019-03-25 11:16:46 +11:00
72ede30d0f Cleanup: pass const image data to IMB_ibImageFromMemory 2019-03-25 09:08:29 +11:00
a38313c3bd Cleanup: style, array wrapping
Add trailing comma for clang-format.
2019-03-25 09:02:04 +11:00
ff8c32fa6b Fix uninitialized variable use for right aligned checkbox 2019-03-25 07:34:06 +11:00
2691dd28e7 Fix T49979: HSV/HSL 'Far' interpolation in colorbands when both stops have same hue.
When two stops had the exact same color, 'Far' interpolation would
behave like the three others and generate constant colors, instead of
generating expected 'full turn' in Hue space.

Note that this will break the 'constant' color between two stops with
same value in the 'Far' interpolation mode, but think that change is
OK/expected.

This fix also exposed that 'early out' case when we are after last stop
was not working properly, still triggering actual interpolation
computation in all cases, thus the refactor in `BKE_colorband_evaluate()`
itself. We also now avoid computing factors in constant case, and get
out early in all interpolation cases but the 'spline' ones (where color
ramping can start before first stop, and end after last one).

Work initiated by patch from Charlie Jolly (@charlie) in T49979, thanks.

Reviewers: brecht, sergey

Subscribers: charlie

Differential Revision: https://developer.blender.org/D4556
2019-03-24 18:20:25 +01:00
b48e6799f1 Fix missing version patching from lamp/light and subsurface changes. 2019-03-24 14:49:49 +01:00
16694ed408 Cleanup: redundant use of string formatting functions 2019-03-24 16:09:46 +11:00
79f67acccb Cleanup: redundant NULL initialization 2019-03-24 11:06:18 +11:00
106551b9ad Cleanup: use shader config for worldspace clipping lib 2019-03-24 11:01:28 +11:00
809101e69e UI: support Ctrl-C copy for popover buttons
Match menu logic that sets the Python expression to call the popover.
2019-03-24 10:52:23 +11:00
72c323d50c GPU: State: Replace GL_LINE_SMOOTH by GPU_line_smooth 2019-03-23 23:54:01 +01:00
53cd37d510 GPU: State: Disable polygon smooth and line smooth when running --debug-gpu
This might prove usefull when debugging some driver perf issues.
2019-03-23 23:47:12 +01:00
ed9af18c76 GPU: Replace glEnable/glDisable but GPU_state calls 2019-03-23 23:43:26 +01:00
ee5e7a006e GPU: Remove unused and deprecated GPU_line_stipple() 2019-03-23 23:42:30 +01:00
0f8da4f014 Fix T62884 Missing control point in unselected mask handles
The fix is a bit dirty. Force alpha 1.0 for these colors by using
immUniformThemeColorShadeAlpha with 255 as alpha_offset.
2019-03-23 22:46:15 +01:00
e77dc3e7ff Fix T62869 Transparent background not working in Xray Mode / Wireframe
This was due to the forward part of the engine not supporting rendered
alpha channel.
2019-03-23 22:13:57 +01:00
13832988ad Fix T62873 GPUShader: compile error (when clipping in viewport)
Props to @matc for the fix
2019-03-23 19:31:20 +01:00
16087eb911 Fix T62097 Bone transparancy not enabled when Xray enabled
This forces bone transparency / wireframe display when Xray is enabled.
This makes sense as the bone transparency is a kind of Xray and should
be linked to the Xray display.
2019-03-23 19:28:13 +01:00
839fe4e01c Eevee: Opti: Don't consider lights that have no power
This may be usefull if power is animated ans is to be activated at one
particular point in time.
2019-03-23 19:18:51 +01:00
b40aa83910 Cleanup: Remove printf 2019-03-23 19:16:55 +01:00
0a89c3954f Fix T62845 VSE preview crash when setting rendered (EEVEE/Workbench) 2019-03-23 19:09:25 +01:00
d057dea7ae Edit Mesh: Rework "in front" + "hidden wire" drawing
Instead of doing some fancy stencil buffer tricks, just clear the depth
buffer before the "in front" meshes.

Fix T58841 Hidden Wire when in Edit Mode disables In Front Option
2019-03-23 18:46:45 +01:00
7454fa927b Fix workbench object outline ignoring clipping
Workbench forward engine wasn't recompiling shaders when clipping
changed, use GPUShaderConfigData when creating shaders.
2019-03-23 14:30:38 +11:00
0093ad643a Cleanp: remove redundant clipping uniform
workbench_material_shgroup_uniform handles this.
2019-03-23 14:26:33 +11:00
045a615f9a UI: show camera sensor 'Width' as 'Size' for 'Auto' fit 2019-03-23 12:29:49 +11:00
f7ec9a5d3a Fix auto sensor size for camera gizmo 2019-03-23 12:29:03 +11:00
23a76491eb Cleanup: style, use const args where possible 2019-03-23 12:16:38 +11:00
ce658d2485 Cleanup: add doxy sections to interface_ops.c 2019-03-23 12:10:23 +11:00
4dc6259cfe Cleanup: doxy sections & function name 2019-03-23 12:10:23 +11:00
Dalai Felinto
faecac0b5e Fix T62815: Camera frame shift issue + stereo frame working
While I broke the non-stereo camera frame in rBf1fef41863b I came to
realize after further tests that the stereo camera frame was NEVER
correct.

It is now, regardless of the camera shift, the camera pivot, if you are
looking through the left, right or stereo eyes.

In the end all that was missing was to multiply the shift we needed to
offset the frame, by the frame width.

I also took the opportunity to perform some cleanup/refactor regarding
names. It was too confusing even for me.

Note: Non-uniformally scaled cameras still draw slightly wrong.
2019-03-22 18:47:24 -03:00
Dalai Felinto
4015d162df Viewport Refactor: Move camera tracking reconstruction in own function
I'm going through my own messy stereo code, and came to realized that
this should be out in its own function a long time ago (as we have in 2.7x).
2019-03-22 17:31:50 -03:00
967364dc3e Cleanup: fix compiler warning. 2019-03-22 20:36:30 +01:00
ac643aa881 Fix COLLADA build after recent changes. 2019-03-22 20:36:29 +01:00
Dalai Felinto
820be185bc Silence false positive uninitialized warning
Techically we would never get to the part where we would use the
uninitialized value due to an assert.
2019-03-22 16:31:23 -03:00
c2b2f9baa8 Merge branch 'blender2.7'
Conflicts:
	CMakeLists.txt
2019-03-22 16:23:23 -03:00
edcb5415a2 MSVC: add C4115 and C4189 warnings.
This matches the warnings of the other compilers commonly used in Blender.
2019-03-22 16:15:46 -03:00
Dalai Felinto
243a9254ea Fix warning for uninitialized icon_only
Warning/issue introduced on rBcaa357dae70322e.
2019-03-22 16:03:38 -03:00
Dalai Felinto
74b47e4181 Fix: VSE preview not showing stereo drawing (unreported)
SpaceSeq main stereo drawing is for ar->regiontype RGN_TYPE_PREVIEW, but
the drawing code was assuming RGN_TYPE_WINDOW was the only one to be
considered for all the regions.

SpaceSeq still needs stereo drawing in RGN_TYPE_WINDOW but only when
backdrop is enabled.

Bug introduced on rBe01cadd657c76267.
2019-03-22 15:55:32 -03:00
dcbc46dacb Fix T60969 Eevee: Volumetrics broken with dupli objects
The volumeObjectMatrix uniform was referencing memory from the temp dupli
object. Create temp storage to store the matrix.
2019-03-22 19:43:08 +01:00
3a516f7555 GPU: Cleanup: Code Style 2019-03-22 19:43:08 +01:00
7b3e114975 Fix T57617 Volumetrics doesn't work on the Orthographic Camera
common_data.view_vecs were not updated before use.
2019-03-22 19:43:08 +01:00
6c0bd89047 Fix T58392 Texture limit size not working
It was removed by inadvertence.
2019-03-22 19:43:08 +01:00
8b4e0eb88e Fix T59962, T60130: error adding image sequence with node wrangler.
The region should be restored correctly, there is already a similar test for
areas to be preserved.
2019-03-22 18:59:40 +01:00
9c5c91cc7c Merge branch 'blender2.7' 2019-03-22 18:18:37 +01:00
9e3e92a908 Revert "Cleanup: remove legacy mesh save support"
Fixes T62793. Leave this in the blender2.7 branch for those that still rely
on it, but it will remain removed in master.
2019-03-22 18:16:46 +01:00
Ish Bosamiya
da5b6ed75b Modifiers: add minimum number of vertices to triangulate modifier.
This lets you only triangulate n-gons when setting the number to 5 or more.

Differential Revision: https://developer.blender.org/D4367
2019-03-22 18:11:14 +01:00
8e6f765964 Fix T62844: Cycles crash with bevel and degenerate geometry. 2019-03-22 17:30:36 +01:00
c89dcc89e6 UI: move stereo panel above output.
Otherwise clicking the stereo panel moves it.
2019-03-22 17:30:00 +01:00
Dalai Felinto
5f45cbb26e Fix T58517: Multi-view issues with OpenGL render + scene settings
Patch by Shinsuke Irie.

* * *

Note from reviewer/committer (dfelinto):

OpenGL render from the VSE preview window is working, while the VSE
preview window itself does not show stereo.

That said the patch is ok, and I was able to test that the VSE preview
OpenGL still works. I will tackle VSE preview itself separately myself.
2019-03-22 13:20:54 -03:00
Dalai Felinto
193b708a48 Silence warnings 2019-03-22 13:20:54 -03:00
be8eac840a Fix overlay being ignored in functions that read the depth buffer.
This corresponds to the behavior of blender 2.79.
2019-03-22 13:08:03 -03:00
40f8f445a3 DRW Manager: create and use new DRW_framebuffer_depth_read utility. 2019-03-22 13:08:03 -03:00
e061cb4437 GPU: Create and use new GPU_texture_read_rect utility. 2019-03-22 13:08:02 -03:00
a96ccf20b6 NodeEditor: Connect Viewer To Socket Selection
Request from the Spring team. When compositing the CTRL-Shift Click on a
node cycles the viewnode with an output socket. When you have many
render layers you spend time cycling to the desired socket. This patch
allows the user to CTRL-Shift Click on a socket to connect directly to
that socket.

Reviewed By: brecht

Maniphest Tasks: T62785

Differential Revision: https://developer.blender.org/D4564
2019-03-22 17:03:28 +01:00
Adrian Newton
530e7cc799 UI: Rename editor "Compositing" to "Compositor"
Reviewers: brecht, billreynish

Differential Revision: https://developer.blender.org/D4480
2019-03-22 16:47:53 +01:00
Dalai Felinto
9a49a26eb3 Fix T62348: Cycles - Viewport rendering not update on switching viewlayer
It updates only the main window you edit and the non-main window
children of this main one.

Reviewers: sergey, brecht

Differential Revision: https://developer.blender.org/D4528
2019-03-22 12:46:39 -03:00
043dd64c26 DRW: minor optimization accessing the loop between a face and edge 2019-03-23 02:45:55 +11:00
Dalai Felinto
a17df6d91e Fix T62841: Hidden collection shortcut should be work in edit mode
This is a full revert of b6c61945ae.

But ammended to include the object.hide_collection() operator to the
pose keymap as well.

While trying to expose the shortcuts to pose mode, I ended up exposing
them for all the modes. It is now only available for object and mode
modes.
2019-03-22 12:03:42 -03:00
fcff2a5751 Fix T61816: Crash No Face Index Array Modifier
Differential Revision: https://developer.blender.org/D4576
2019-03-22 15:23:53 +01:00
4f9451c044 Camera: change how the minimum near clip depth is set
do_clip wasn't working for its intended purpose,
replace with a simpler method.
2019-03-23 01:16:06 +11:00
33d322873e RNA: Camera.view_frame no longer uses near clip for the camera frame
Use the same values used for drawing.
2019-03-23 01:16:06 +11:00
6c4b9dd963 Style: describe code using comments instead of preprocessing directives. 2019-03-22 10:35:17 -03:00
f6a6770f06 Fix T62839 object scale changes normal map output in eevee
Was using the wrong vector length.
2019-03-22 14:30:43 +01:00
b0c40de5ee Fix/workaround some types of black dots in denoising with bright speculars.
This is not a real solution and colored dots still remain, just rejecting some
pixels that seem clearly wrong.
2019-03-22 14:25:28 +01:00
0b98b7ed57 EEVEE: Memleak Volumetrics Rendering
Volumetric textures were not freed when doing final rendering.

Maniphest Tasks: T62356

Differential Revision: https://developer.blender.org/D4573
2019-03-22 14:23:25 +01:00
be750e2aee Cleanup: minor UI code changes
- Rename ui_but_find_active_in_region -> ui_region_find_active_but
- Remove ui_but_is_active (use ui_region_find_active_but instead)
- Re-order ui_but_* functions take the button as their first arg.
2019-03-23 00:18:16 +11:00
8f3ecd08e1 Fix checkboxes being right aligned when property split is disabled 2019-03-23 00:03:48 +11:00
caa357dae7 Cleanup: typo in variable name 2019-03-23 00:01:00 +11:00
2d60618746 UI: refactor queries into interface_query.c
interface_handlers.c is quite large (over 10k lines),
move general button utility functions into a separate file.
2019-03-22 23:38:24 +11:00
c2584c1fad Fix incorrect hard limits on motion blur shutter time. 2019-03-22 12:09:02 +01:00
1e70639ed5 UI: Move Adjust Strength for Spacing next to the stroke Spacing control
These items are related.
2019-03-22 11:27:56 +01:00
3f852e00f9 Fix T62835: Color picker template value slider does not scale correctly with UI scale
Missing multiplication with UI_DPI_FAC.
2019-03-22 10:59:12 +01:00
177623dd40 Implement Stencil Mask Drawing for Texture Painting
Stencil mask drawing was not implemented yet. This commit will implement this for texture painting.
It brings the state back to how it was for B279.

Reviewed By: fclem

Maniphest Tasks: T58727

Differential Revision: https://developer.blender.org/D4570
2019-03-22 08:21:12 +01:00
5cd3e1b5d1 Cleanup: move widget enum into source file 2019-03-22 17:56:58 +11:00
6e7e6832e8 Fix T62814: Camera frame invisible with large near-clip value 2019-03-22 17:28:53 +11:00
813694e07b UI: use checkbox text for property split layout
Use right aligned checkboxes when 'use_property_split' is enabled
instead of a separate label.
2019-03-22 15:43:23 +11:00
bd2299aae5 UI: support for showing checkboxes after text
Needed so the new layouts that show right aligned checkboxes can have
clickable text (as left aligned checkboxes do already).
2019-03-22 15:43:23 +11:00
27da43ba86 UI: refactor color picker flags out of buttons
These are specialized color picker options which don't need to be
stored in the button (frees of flags for buttons too).
2019-03-22 15:43:23 +11:00
00f7dcd5be DRW: show clipping border for solid mode
Solid + xray is still not supported.
2019-03-22 15:43:23 +11:00
78ce2063d3 Cleanup: use 'use' as prefix for booleans 2019-03-22 15:43:23 +11:00
c0f96855e4 Fix T57580: Update windows installer package to have the GPL3 as EULA. 2019-03-21 21:25:20 -06:00
c49a70bcd1 Eevee: Add small optimisation for Curve Mapping nodes
This remove the RGB texture lookups if the curve is only used for "Luma"
correction and does not affect individual RGB channels.
2019-03-22 03:53:21 +01:00
875b50f94f UI: Fix curve extention filling on curve widgets 2019-03-22 03:53:21 +01:00
6a65bb4955 GPU Matrix: Increase precision of GPU_matrix_unproject. 2019-03-21 22:23:50 -03:00
2b42b8b779 BLI Math: Add and use new projmat_dimensions utility. 2019-03-21 22:23:49 -03:00
1ae6aaad43 Eevee: Cleanup
Remove unneeded normalization.
2019-03-22 00:13:18 +01:00
8b00712b55 Eevee: Fix tangent vector not normalized before interpolation. 2019-03-22 00:13:18 +01:00
27109fd209 Eevee: Normalize Tangents after transform to world space
Fix T62621 without breaking everything else.
2019-03-22 00:13:18 +01:00
cc1b193ddf Revert "Fix T62621 object scale changes tangent node output in Eevee"
This reverts commit 86646dab7c.
2019-03-22 00:13:18 +01:00
1f1e90a013 Fix T59890: regression of the precision when projecting the cursor.
Basically the framebuffer size was different from the glViewport size.
This made the depth read in glReadPixel not corresponding to the center of the pixel.

Another thing that reduced precision compared to blender 2.79 is the `GPU_matrix_unproject` that now computes using `float`s instead of `double`s.
But this may be for another commit.
2019-03-21 17:04:35 -03:00
c1da8d8986 UI: Use better flow layout
Flow layout needs columns defined to work properly
2019-03-21 18:25:01 +01:00
b6ad98729b UI: Spelling: fix wrong apostrophe 2019-03-21 16:36:29 +01:00
ad8566db9b UI: Fix wrong spelling
Effect vs Affect
2019-03-21 16:31:46 +01:00
a3b9f20b1b UI: make UI label clearer for Affect Rotation 2019-03-21 16:30:55 +01:00
82507ecf5a UI: align header to the left
Since it's a header, this makes the hierarchy clearer
2019-03-21 16:30:09 +01:00
56c940988f Fix flow layout for camera data Viewport Display panel.
Flow layout needs sub-layouts to properly identify 'cells' of its grid.
2019-03-21 16:24:02 +01:00
196e3920f7 Use 'show_' prefix convention for composition guides 2019-03-21 16:05:32 +01:00
6f38d2782a UI: Correct tooltips for composition guides 2019-03-21 15:09:11 +01:00
a0c9095620 UI: Put camera composition guides in standard sub-panel
Before we were using a very inconsistent toggle-menu for this. Just use standard UI here instead.
2019-03-21 15:01:07 +01:00
e4694c057b UI: replace button open event with activate on init
No user visible change.
2019-03-22 00:55:24 +11:00
2b21e7ab9a Fix T62768: Softbody cache still not updated correctly
There was missing flush from transform update to the point cache
reset. Caused by the fact that when update happens in the "middle"
of component all the component operations will be tagged for update
(since the intermediate state is not stored), but that will not
flush updates to other operations since that would cause too much
of updates.

This now we tag point cache for reset after evaluation operation
but before final transform and before rigid body world.
2019-03-21 14:41:41 +01:00
b832f6f915 Fix T62810: AA reversed in workbench
Due to recent changes the AA was not rendered in the viewport when not
interacting. When interacting it was. This was due to incorrect
detemination to perform TAA.
2019-03-21 14:35:28 +01:00
9a09246dc0 WM: enable activate on init for wmOperatorType.prop
This enables popups to edit text when displayed,
use for new collection popup.
2019-03-22 00:32:01 +11:00
19dc7f7fdf Install_deps: add clang-format packages.
Even though that one is not really useful just to build Blender, we can
as well explicitely include it here, since all 'default' Blender builds
will include full clang/llvm stack anyway (for Cycles and deps)...
2019-03-21 14:12:30 +01:00
dd1132416e Docs: update examples for 2.8x
Use fields for properties
2019-03-22 00:07:06 +11:00
bd1299f6a4 Keymap: Use F4 for file context menu
- Replace Window context menu with File menu.

  This was recently removed however artists in the studio use
  link/append often.

- Add preferences to this menu so `F4, PKey` can still be used as a
  quick way to access preferences.
2019-03-21 23:03:17 +11:00
75b14db6a9 Fix T62808: Hair shape cut crash
Reviewers: sergey

Differential Revision: https://developer.blender.org/D4565
2019-03-21 12:38:07 +01:00
fbceac9708 Cleanup: Outliner: remove warning about no undo of ID deletion.
ID deletion is undoable nowadays...
2019-03-21 11:17:21 +01:00
8314c3188c Fix clipboard copying collections when copying objects from 3DView.
This was inherited from 2.7x behavior with groups, but in 2.8
collections are also used as 2.7x layers, which turns to be a problem
when pasting back clipboard content, since it would instantiate
collections instead of objects, quickly leading to tens of new
collections in the viewlayer...

Instead, we only copy selected objects from the 3DView now. On paste
time, those will be added to the active collection.

Last part of fixes related to T61670.
2019-03-21 09:47:50 +01:00
b346a7c0df Fix T62802: Layer order inverted in Outliner 2019-03-21 09:29:16 +01:00
b98fe9e707 Cleanup: move functions into doxy sections
Also use const args for queries.
2019-03-21 14:19:45 +11:00
9b3818762a Cleanup: use doxy sections for interface_handlers 2019-03-21 13:53:27 +11:00
0bbff8a711 Cleanup: move scroll step into own function 2019-03-21 11:58:03 +11:00
06585e0b13 UI: popovers scroll now changes offset directly
Mouse wheel on menus changes the selected item item which doesn't work
well for popovers since buttons aren't always stacked vertically.

Resolves T62777
2019-03-21 11:37:44 +11:00
83753d1d29 Cleanup: split menu scrolling function
The same function scrolled to a location and button (depending on args).
2019-03-21 11:36:51 +11:00
9105e1d084 Fix T62782: Edge slide crashes with mirror enabled 2019-03-21 09:53:57 +11:00
f71e8617e0 Viewport: Draw loose edges in edit mesh mode if there is a modifier stack 2019-03-20 22:43:30 +01:00
c2f0bd6aed Fix DEG warning from T52873: Proximity WeightVG modifier can use empty as target too.
Only create DEG_OB_COMP_GEOMETRY relation to target object when it has
some, and we use it.
2019-03-20 21:12:34 +01:00
1cf592e62e Fix T58748 Mirror modifier: edges/verts invisible unless face is present
It was due to the mapped mesh not being used if no face was present in the
cage mesh.
2019-03-20 20:07:22 +01:00
da1350acdc Fix T60815: drag & drop crash when search menu is opened immediately after.
Patch by matc, some further refactoring by me.

Differential Revision: https://developer.blender.org/D4250
2019-03-20 19:50:21 +01:00
6500b31728 Fix T62788: drop image into node editor puts node at wrong location.
It should be under the mouse cursor but was wrong for high DPI. Also put the
cursor in the header now so it's easy to reposition.
2019-03-20 19:18:51 +01:00
e0d95b7f79 Merge branch 'blender2.7' 2019-03-20 18:40:10 +01:00
eb94a0db4f Fix assert after recent changes.
Mark as localized immediately, so that functions that edit the node tree can
verify they are being used under the correct conditions.
2019-03-20 18:39:56 +01:00
d7cecc2ba3 Fix cycles.merge_images not merging correctly for some channel layouts. 2019-03-20 18:39:26 +01:00
b6d1946c2e Merge branch 'blender2.7' 2019-03-20 17:33:54 +01:00
b06d32e4be Cycles: make cycles.merge_images work with incomplete layers and passes.
If layers and passes are not exactly the same in all files, we make a best
effort to merge them instead of failing.
2019-03-20 17:26:25 +01:00
c4908c8e8c Fix T62758: hair curves with UV mapped textures renders wrong.
Differential Revision: https://developer.blender.org/D4562
2019-03-20 17:26:21 +01:00
bff472d2ff Fix T61326 "In Front" option not working on edit curves
Create a new pass for them and draw them separately.

Beware of the double multisample resolve when multi-editing a mix of curves
with and without the "in front" option enabled.
2019-03-20 17:26:14 +01:00
15d6521de9 Fix assert on vertex parent
The evaluation was done on an original object, which is not allowed.
2019-03-20 17:20:10 +01:00
afd9e87f8d UI: Make paint context menus more contextual
- Only show Radius for tools with radius
 - Add more sliders here depending on active tool
2019-03-20 17:04:57 +01:00
2f4bd63239 Fix T56778: Alembic Override Frame does not update on playback 2019-03-20 16:48:35 +01:00
980b61a22c Fix error in UI of empty image due to last commit 2019-03-20 16:48:00 +01:00
f06dc36c35 Select Similar: use kdtree de-duplication
Avoids redundant tree traversal when finding nearest.
2019-03-21 02:42:31 +11:00
3602071e47 BLI_kdtree: add deduplicate function
Function to remove exact duplicates from the tree before balancing.
2019-03-21 02:42:24 +11:00
dce5695f8e Fix missing free in recent kdtree changes 2019-03-21 02:40:10 +11:00
099a410478 Depsgraph: Fix cycle with rigid body and Weight Proximity
The issue is a feedback loop with point cache reset operation.

Solved by introducing extra node which ensures object's transformation
is ready for simulator input. Allows to route relations without causing
a fake dependency cycle now.
2019-03-20 16:37:15 +01:00
c5fc861172 Fix T58550 Dragged in images dont overlap properly
This patch adds a new "Use Alpha" option on image empties to avoid ordering
issue of reference images.

If ordering is not important, "Use Alpha" can be enabled to provide
transparency and alpha blending support.
2019-03-20 16:33:49 +01:00
3508ffc34c Fix T59449: Particle system creates error in rigid body
Is a dependency cycle problem. Fix is similar to what is done in 024f5ba2bd.
2019-03-20 15:18:47 +01:00
f08910e7b2 UI: relocate rename menu item
This was in between operator adjust/search.

Also remove line accidentally added in last commit.
2019-03-21 01:06:08 +11:00
4e0b5a0baf Cleanup: style 2019-03-21 01:01:27 +11:00
08efcefb47 Fix T61759: Dynamic paint smudge crash
The issue was caused by mesh needed for dynamic paint brush being
stored in the modifier. That make it to be freed and set to NULL
when running copy-on-write.

Solved by moving the mesh to be stored in modifier's runtime data.
2019-03-20 14:57:31 +01:00
1f97f6c531 UI: Accumulate name was being overridden in Sculpt Mode 2019-03-20 14:56:48 +01:00
72ff1ff305 Modifiers: Never copy runtime data pointer 2019-03-20 14:53:06 +01:00
f391362f8c Fix T60190 Z-fighting with (Culled) Backface
Create a separate pass for backface culled objects.
2019-03-20 14:51:06 +01:00
6d60207537 Fix renaming the pose bone
The name from the pose bone needs to be changed in pose mode.
2019-03-21 00:34:19 +11:00
91914320ca Fix T62711: Incorrect motion path update
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4560
2019-03-20 14:21:25 +01:00
52e344a770 Fix T62770: Changing Constraint.mute does not update pose
Missing dependency graph tag. Is only happening for scripts, since
the interface is handling this from do_constraint_panels().

Fix is suggested by Edmund Kapusniak (@edmundmk), thanks!
2019-03-20 14:19:30 +01:00
f39a4a4a4e Cleanup: More C++ like nature for word split test
While it looks more longer, but also contains more comments
about what's going on.

Surely, this function almost never breaks and investing time
into maintaining its tests is not that important, but we should
have a good, clean, understandable tests so they act as a nice
example of how they are to be written. Especially important to
show correct language usage, without old school macros magic.

Doing this at a lunch breaks, so will be series of some updates
in the area.
2019-03-20 14:14:56 +01:00
de535fdd52 UI: Change name Airbrush back to Accumulate
'Airbrush' didn't make sense for Sculpt mode.
2019-03-20 14:14:06 +01:00
e4320e2ce0 UI: Consistent naming and ordering of paint Symmetry and Options panels 2019-03-20 14:09:55 +01:00
daa4d4dd25 Fix T62248: Infinite Hotspot Size Crop Node
When the area of the crop node is zero the hotspot margin becomes infinite.
This makes the gizmo by default think the translate mode hotspot is everywhere.

This fix will return a state if the INFINITY is detected so we can
return the hotspot drawing.

The cage2d gizmo is still not usable for sizes of 0 by 0 as now it won't
draw anything. the issues of the gizmo should be re-designed so we can
mitigate these limitations. But that is out of scope for this fix.

Reviewed By: campbellbarton

Maniphest Tasks: T62248

Differential Revision: https://developer.blender.org/D4516
2019-03-20 14:00:18 +01:00
d3ee995eaf Cleanup: return early in BLI_path_frame_get
Instead of making the entire body of the function conditional, it now
returns early, unindenting the entire function and preventing the reader
from searching for a non-existent `else` clause.

No semantic changes.
2019-03-20 13:45:14 +01:00
0333cf00ba Fix BLI_path_frame_strip
The `BLI_path_frame_strip` function was completely broken, unless the
number of digits in the sequence number was the same as the length of
the extension. In other words, it would work fine for `file.0001.abc` (4
digit `0001` and 4 char `.abc`), but other combinations would truncate
to the shortest (`file.001.abc` would become `file.###.ab` and
`file.00001.a` would become `file.##.a`). The dependency between the
sequence number and the file extension is now removed.

The behaviour has changed a little bit in the case where there are no
numbers in the filename. Previously, `path="filename.abc"` would result
in `path="filename.abc"` and `ext=""`, but now it results in
`path="filename"` and `ext=".abc"`. This way `ext` always contains the
extension, and the behaviour is consistent regardless of whether there
were any numbers found.

Furthermore, I've removed the `bool set_frame_char` parameter, because
it was unclear, probably also buggy, and most importantly, never used.

I've also added a unit test for the `BLI_path_frame_strip` function.
2019-03-20 13:42:45 +01:00
8b9b3422eb UI: popup panel for renaming the active item
In 2.79 there was an "Item" panel with only to give access to rename
from the 3D view.

Add this functionality for context sensitive renaming.
Currently this works for objects/bones/sequence strips & nodes.

This uses F2 for a window level shortcut, replacing the file-io menu.

See: T61480
2019-03-20 23:39:50 +11:00
1b1b604596 Fix T62678: better glyph clipping test
Reviewers: billreynish, brecht

Differential Revision: https://developer.blender.org/D4550
2019-03-20 13:33:52 +01:00
d6bf6744fc Fix T60211: MemLeak Convert Curve To Mesh
Ownership flag was not set, but was it was meanted to be. So the set
runtime data to NULL disconnected the Mesh with no ownership.
2019-03-20 13:30:41 +01:00
a1addc5c63 UI: support for popups starting with buttons activated
While this could already be done from C,
this is now exposed to Python
2019-03-20 23:10:34 +11:00
Stefan Werner
69fb859909 Merge branch 'blender2.7' of git.blender.org:blender 2019-03-20 12:51:32 +01:00
Stefan Werner
63cb789551 Cycles: Made Embree ignore curve intersections with SSS. 2019-03-20 12:30:33 +01:00
Stefan Werner
5eb38df4af Cycles: Performance optimization for Embree, resizing arrays once instead of per object. 2019-03-20 12:30:33 +01:00
ef09aff61c Preferences: add threshold for cursor motion
A hard coded threshold was used to ignore cursor motion,
make this a preference since tablet users may want to increase it
since a pen hovering isn't as easy to keep still as a mouse.

Resolves T56278
2019-03-20 22:19:16 +11:00
454b90483d Fix missing refresh when subdividing hair strand
This is a part of T62730.i
2019-03-20 12:03:15 +01:00
1d5c85ffd9 Fix T62750: Deleted Keyframe Still Affects Scene
Missing ID recalc tag.
2019-03-20 11:49:07 +01:00
Dalai Felinto
0c44b7e177 Fix T61670: Copy -> Paste - Pasted elements are not selected
The first part of this patch is just a way to improve performance a bit
by not calling BKE_scene_object_base_flag_sync_from_base() twice.

The second is the proper fix for the reported issue.

That said, the report can be re-opened since there is still discussion
about whether or not to bring the collections with the objects.

Reviewers: mont29

Subscribers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D4558
2019-03-20 07:45:24 -03:00
3e790e7607 UI: Add context menus to Metaball Edit, Lattice Edit and Text Edit modes 2019-03-20 10:51:37 +01:00
21cd575e88 Fix (unreported) Copy/Paste: orig object being instantiated in active collection on pasting.
When copy/pasting an object in same .blend file, orig object would be
instantiated into the active collection when pasting, along with the
content of the paste. Was missing a clear of LIB_TAG_DOIT on objects...

Found while investigating T61670.
2019-03-20 10:30:50 +01:00
a23197655c Cleanup: spacing in space_view3d 2019-03-20 10:17:55 +01:00
1d42b27fac UI: Add mirror consistently to to contextual menus
After recent changes, the mirror operators are now much nicer to execute from menus.
2019-03-20 10:17:10 +01:00
9138c761e4 Cleanup: un-indent NDOF operator body
This was needed for C89 compatibility,
avoid having most of the operator logic in an else block.
2019-03-20 18:42:10 +11:00
7c2ac7950a Cleanup: Use doxy groups for NDOF operators 2019-03-20 18:41:46 +11:00
4fa904e91c Cleanup: use lowercase for dimensions in function names
Most API's already use this convention.
2019-03-20 18:25:27 +11:00
db5a82302c Error in last commit 2019-03-20 18:13:11 +11:00
18b98fdd6f Fix T62682: Inconsistent NDOF camera auto-key
Some view operations auto-keyed when locking the camera to view
but some NDOF operators didn't yet support it.

Auto key during animation playback for recording camera motion.
2019-03-20 18:09:28 +11:00
f889050aea Fix T62757: Mirror operator fails for non-modal execution
Unlike most transform operators that use an orientation and values,
Mirror uses the constraint axes to define which axes are mirrored.

Now constraint axes are shown in this case.

Other changes:

- Use 'EXEC_DEFAULT' for mirror menu items.
- Show mirror on local axis when not in edit-mode since this is useful
  in object mode too.
- Remove mirror vertex groups since this is in the vertex group menu and
  this menu isn't currently used for general symmetry operators which
  are currently in other menus.
2019-03-20 16:50:48 +11:00
dc800154b6 3D View: snap cursor to world origin now resets rotation 2019-03-20 15:45:10 +11:00
fe7c7d2820 Fix T62736: Inconsistent behavior bpy.utils.user_resource()
If a subfolder was specified which didn't exist, logic would fallback
to get_path_user (instead of get_path_environment).

Now always use the from the environment variable if it's set and exists.
2019-03-20 15:38:23 +11:00
4e2aea5efe DRW: minor optimization for edit-mesh conversion
Finding visible connected elements is often a direct lookup
when they're not connected to hidden geometry.

Add inline wrappers that avoid a function call,
gives minor speedup creating GPU edit-mesh data.
2019-03-20 15:05:25 +11:00
47ba487e05 UI: center floating popovers
Tweak placement so useful items are more likely to be nearby,
centering horizontally and align vertically to the first button.
2019-03-20 12:34:22 +11:00
53f4fc7da9 Cleanup: style 2019-03-20 10:44:13 +11:00
310a1f728c Cleanup: unused vars 2019-03-20 10:44:01 +11:00
603a37fa89 Fix T59719 Bake Indirect Lighting doesn't update env map reflection 2019-03-19 23:55:26 +01:00
2eead48688 UI: Remove UI name overrides for Reveal Hidden.
Makes the consistent operator names shine through into the UI.
2019-03-19 22:25:25 +01:00
953c8b0548 UI: Use 'Render Image' for image rendering in the viewport
This is more consistent with the main Render menu, and more descriptive
2019-03-19 21:41:12 +01:00
edf029d4b9 Fix: Inconsistent spacing in Python file after recent changes 2019-03-19 21:34:20 +01:00
Dalai Felinto
540f50a4da Unify "Hide Selected / Reveal Hidden" operator names
All edit mode related operators are now "Hide Selected / Reveal Hidden".
Before we had different variatons of them:

Hide Selection:
* MESH_OT_hide
* GPENCIL_OT_selection_opacity_toggle

Hide Selected Bones:
* ARMATURE_OT_hide

Hide:
* MBALL_OT_hide_metaelems

Hide Selected:
* CURVE_OT_hide
* PARTICLE_OT_hide
* POSE_OT_hide
* UV_OT_hide

Reveal Bones:
* ARMATURE_OT_reveal

Reveal:
* MBALL_OT_reveal_metaelems

Operators not renamed:
* Hide Curves (GRAPH_OT_hide)
* Hide (OUTLINER_OT_hide)

Note we can do a step further and mass rename them to match their UI
names. Where Reveal Hidden is Show Hidden. But for now at least they are
all unified.
2019-03-19 17:26:09 -03:00
Dalai Felinto
7cf1b81b3c Fix T62735: hiding curves doesnt hide in viewport
Copying what we do for mesh objects.
2019-03-19 17:26:09 -03:00
21f3c95f22 Fix T62749: random mesh selection crashes.
This was an off-by-one error in the initialization of tbuf, but refactored the
code a bit more to be less obscure.
2019-03-19 20:04:46 +01:00
f0770b8578 Fix: Make sure color panels only appear in modes where they are supported 2019-03-19 19:42:17 +01:00
b525ecfcfb UI: Rename GPencil Brush 'Appearance' panel to 'Display'
Makes it consistent with other paint modes
2019-03-19 19:32:57 +01:00
770b1188e9 Fix: Color Picker and Color Palette panels were appearing for non-color tools in Vertex Paint mode
Use correct poll method for both modes
2019-03-19 19:31:36 +01:00
d555c92e3c Cleanup: fix debug warnign due to tooltip ending in dot. 2019-03-19 19:16:39 +01:00
bdf7843571 UI: Make Brush Display panel consistent between Image Editor and 3D View texture painting
-Slightly simplify in both places too
2019-03-19 19:03:51 +01:00
fa59c6a3e7 Merge branch 'blender2.7' 2019-03-19 18:54:17 +01:00
e7f535cd4c UI: Remove redundant separator 2019-03-19 18:41:33 +01:00
bd017dae28 UI: Make Stroke panel consistent between Image Editor and 3D View texture painting
This should probably become de-duplicated, but at least they look consistent now
2019-03-19 18:39:08 +01:00
b4a0dd1296 Fix: own wrong path to image paint tool settings in recent commit 2019-03-19 18:37:51 +01:00
83de13f75a Cycles: add cycles.merge_images operator for combing EXR renders.
This is only available through the API, mainly intended for render farms to
combine rendered multilayer EXR Files with different samples. The images are
currently expected to have the exact same render layers and passes, just with
different samples.

Variance passes are still simply a weighted average, ideally these should be
merged more intelligently.

Differential Revision: https://developer.blender.org/D4554
2019-03-19 18:23:19 +01:00
83fc8342d8 UI: Re-organize Brush Properties
- Consolidate each brush section (Color, Palette, Gradient) and make them distinct
 - Remove the lock icons and move these items into an Options sub-panel, together with other toggles
  - They now have more descriptive names
  - Use an enum for view vs scene brush unit
 - Use Property Split layout and sub-panels in line with the rest of 2.8
 - Rename Curve panel to Falloff

Reviewed by: campbellbarton, pablovazquez

Maniphest Tasks: D4529

Differential Revision: https://developer.blender.org/D4529
2019-03-19 18:17:50 +01:00
c590e80466 Units: Use PROP_PIXEL for grad_spacing 2019-03-19 18:10:00 +01:00
5b7b7101c8 Cycles: Implement function to format and parse human readable time
Gives value in seconds for a string which is encoded in format HH:MM:SS.hh.
2019-03-19 17:38:43 +01:00
matc
2cc303700b Fix: Add poll methods for quick effects operators
Differential Revision: https://developer.blender.org/D4259
2019-03-19 17:21:30 +01:00
3b04a867b9 Cleanup: correct comment 2019-03-20 03:14:50 +11:00
5739506104 UI: scale cursor motion threshold by DPI
This was using hard coded values of 2-3px.

Move both drag and motion thresholds to defines.
2019-03-20 02:52:55 +11:00
bd80393995 Fix T60684 Fourth and subsequent vertex color / UV layers displayed black 2019-03-19 16:25:59 +01:00
899fc0331c BLI_kdtree: use 1d tree for select similar 2019-03-20 02:06:07 +11:00
7a937436ab BLI_kdtree: add 1d kdtree support
Some users only use the tree to store a single value.
2019-03-20 02:06:07 +11:00
08fe29e52f Fix T62715: Grease Pencil Apply Armature Modifier Issue
@sergey wrote: "The reason it was failing is because md points to an original armature, which doesn't have runtime data needed for deformation. That data is to come from evaluated armature."

Thanks to @sergey for his help.
2019-03-19 16:04:03 +01:00
85685c7bdc Fix T62622: Animating vertex does not update viewport
Missing dependency graph update due to wrong relation.
2019-03-19 16:00:58 +01:00
e226460dd3 Workbench: World Clipping For Specular Transparent
When Specular Transparent materials are used the world clipping
did not work on the transparent materials. The reason was that the
accum shaders did not vary on the existance of the clipping planes

This patch will variate the accum shaders when clipping planes are
active.

Reviewed By: fclem

Maniphest Tasks: T61023
2019-03-19 15:43:49 +01:00
9b8eef9d9c Fix T62558: Certain IES file causes crash
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4551
2019-03-19 15:33:28 +01:00
1cb325fc22 Cleanup: name 3D/4D trees in similar selection code
Do this so trees have matching & logical names.
2019-03-20 01:16:04 +11:00
e7b4bbd294 UV: Use BLI_kdtree_2d for 2D data 2019-03-20 01:07:28 +11:00
d1b9b838be BLI_kdtree: add 2D kdtree support
Some users of the 3D versions were storing 2D data in it.

Using a 3D tree for 2D data adds a spatially redundant branch
every 3rd level, as well as some extra memory use, best avoid this.
2019-03-20 01:07:07 +11:00
84fe4cdcb3 Workbench: Support Odd Number Of AA Samples
Workbench render engine did not work when an odd number of AA samples
were used. A user could enter these values by disabling AA or set the
number of AA samples in the Render/Film panel to an odd number.

This commit will not perform TAA passes when AA is disabled.
For supporting the setting of 5 or 11 samples the bitmask was replaced
by an if statement as this was making the odd number not render
correctly.

As extra introduce the jitter samples of 5 and 11 so the images will
be more clean. a jitter sample of 11 used to read outside the allocated
space of the jitter samples.

Fix T60820

Reviewed By: fclem

Maniphest Tasks: T60820

Differential Revision: https://developer.blender.org/D4546
2019-03-19 14:57:55 +01:00
109cbdf2e1 Cleanup: use BLI_kdtree_3d prefix
Use prefix now there isn't only the 3d version.
2019-03-20 00:48:51 +11:00
e8777a7290 Fix T62732: Bpy/Python is letting create inputs at the node level for node groups that make blend file unsaveable.
Group nodes should not allow to add IO sockets to themselves directly,
in that case we actually want to add IO sockets to their underlying
node tree. Fairly straioght forward to support actually.
2019-03-19 14:45:05 +01:00
3b9b324bf6 Fix T62595: Select co-planar faces fails 2019-03-20 00:34:40 +11:00
0719d5fa0c BLI_kdtree: refactor to support different numbers of dimensions
This moves logic into kdtree_impl.h which is included in a source
file that defines the number of dimensions - so we can easily support
different numbers of dimensions as needed
(currently 3D and 4D are supported).

Macro use isn't so nice but avoids a lot of duplicate code.
2019-03-20 00:30:45 +11:00
e72dc667c4 Fix T61475 Particle edit does not render children if path step > 7
Gives 2 more bits to the segment count. Also subtract 1 because segment
count cannot be negative.
2019-03-19 14:26:30 +01:00
58e27cca97 GPencil: Include gpencil objects in BKE_object_minmax
Also remove redundant check for meshes.
2019-03-20 00:12:16 +11:00
8a125e3b55 Cleanup: remove unused for gpencil bounds calculation 2019-03-19 23:55:04 +11:00
c001a9c3b6 Fix T62743: GPencil dimensions are large when no geometry exists
Use fallback when no data exists
matching bound-box for other kinds of geometry.
2019-03-19 23:52:35 +11:00
0aca8b0174 EEVEE/LookDev: Fix Cache In Quad View
When using LookDev in Quad view the cache was only updated for the first
Q-view. The evaluation data of the last cache was not stored with the
lightprobe textures. As the evaluation data was reused between the
Q-views only the lightprobe textures of the first view was updated.

With this patch the evaluated data is stored amongside the actual
lightprobe textures.

Fix T59046

Reviewed By: fclem

Maniphest Tasks: T59046
2019-03-19 13:29:51 +01:00
b0c6c9f11d Fix view selected ignoring all non-grease pencil objects
When the grease pencil was active no other objects were taken into
account. There is no need for a special case here since objects
bounding boxes are used.
2019-03-19 23:15:44 +11:00
12716e6b9f UI: Make UV Editor contextual menu more consistent with 3D View
-Use same ordering of Add, Modify, Remove
-Add back Remove Doubles here
2019-03-19 13:14:35 +01:00
142096a2ed UI: Make EV Editor UV menu more consistent with 3D VIew
-Transform, Mirror, Snap at the top
-Remove redundant Proportional Editing entry from this menu - we already have it in the header
2019-03-19 13:13:32 +01:00
f4b57b0190 Fix T62713: Paste Normal Vectors - needed better selection handling.
Existing code was not really handling well cases were only edges or
faces were selected (with match select modes).

In those cases, we can assume user want to only affect loop normals of
selected faces/edges, not all lnors of all (indirectly) selected verts.

Also refactored the code a bit to move whole 'loop to edit' selection
process into its own single function.
2019-03-19 12:31:50 +01:00
d29dd5916f Minor cleanup/refactor of EditMesh custom normals copy code.
Do not compute temp helper data when we do not need it (even though in
that case it was totally cheap to compute).
2019-03-19 12:31:50 +01:00
a73afc7eeb readfile: add off64_t typedef for __APPLE__ 2019-03-19 21:59:26 +11:00
8f790720b0 GPencil: Rename annotation functions
The annotation drawing functions were using gpencil prefix and it's better to keep all annotation code separated to avoid confusion.
2019-03-19 11:03:55 +01:00
8aeb1dbb27 GPencil: Cleanup unused code 2019-03-19 11:03:55 +01:00
da373c1f0d GPencil: Rename functions to annotation prefix
This code was used only in annotations.
2019-03-19 11:03:55 +01:00
34d6c04003 Fix T62734: Crash when annotations are rendered from the VSE .view menu.
The render was using the old grease pencil code and not the new annotation code for render.
2019-03-19 11:03:55 +01:00
40ecb2ded8 Windows: use int64_t instead of off_t
Avoids 2gb file size limit.
2019-03-19 20:29:45 +11:00
7ba82f3f0a Fix T62707: opening blend files over 2gb on win32 fails
Regression in 358e07f447 for ms-windows since off_t is an int32_t
even on 64bit systems causing files over 2gb not to load.

Poison off_t so this doesn't happen again.
2019-03-19 20:18:03 +11:00
4db7842a72 BLI_math: use fallback for compatible quaternion calculation
Copy the new value when the compatible quaternion isn't usable.
2019-03-19 17:43:35 +11:00
40e85a603c Fix pose slide interpolation
- Quaternions weren't normalized before interpolating
  causing incorrect results & assert.

- Make the newly calculated quaternion compatible with the previous
  to avoid axis-flipping & setting values with large changes compared
  to existing key-frames.
2019-03-19 17:23:10 +11:00
e2ec045cc9 BLI_math: add utility to calculate compatible quaternions 2019-03-19 16:54:37 +11:00
e7fd6c8f30 Cleanup: comment blocks 2019-03-19 15:17:46 +11:00
5ef4b0438c Cleanup: trailing space 2019-03-19 15:08:16 +11:00
7e6263095d Docs: group debug/disable args in --help output 2019-03-19 14:32:15 +11:00
e2abb1bf5c Fix T61872: Sculpt key shortcut assignment fails 2019-03-19 13:50:32 +11:00
ce066f9da7 Fix assigning keys to paint operators
Comparing context mode with object flag (decade old bug from 2.5x).
2019-03-19 13:48:33 +11:00
48ad55a03d Cleanup: use enum for CTX_data_mode_enum
Exposes errors in some cases when compared against incompatible values.
2019-03-19 13:46:32 +11:00
d731ee4960 Fix T61368: Brush texture preview ignores rotation 2019-03-19 13:07:48 +11:00
d47f827019 Cleanup: unused warning 2019-03-19 08:39:48 +11:00
ce09b93955 Fix T61104 Compositing two scenes with different output scales crashes
Was due to incorrect output size. Use engine->resolution_x/y instead of
computing the size on the fly from the scene specific settings (which are
not overwritten by the rendering scene).
2019-03-18 21:40:04 +01:00
fd63be0610 UI: Use 'Display' instead of 'Draw' for show_particles 2019-03-18 21:33:01 +01:00
a764a3cd1c Units: Use PROP_DISTANCE for emitter_distance 2019-03-18 21:32:02 +01:00
52e38fae42 UI: Particle Edit Mode Tool Properties
-Use property split
-Use sub-panels for Options panel
-Slightly re-organize Options panel
-Remove redundant Deflect Emitter from Options panel (it was already in the tool settings for the Comb tool)
2019-03-18 21:30:56 +01:00
9249e53f92 Scale waveforms & show clipping
Scale waveforms in sound strips by volume.
If any drawn line exceeds value 1 or -1 it is drawn by red color so user can see point, where clipping occurs.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4515
2019-03-18 13:11:33 -07:00
3d1138840c Fix strip text hiding behind scrollers
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4506
2019-03-18 13:11:33 -07:00
a761a93d41 Fix VSE color picker
Fix VSE color picker mouse coords calculation

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4396
2019-03-18 13:11:33 -07:00
9c99292a16 Fix T54117 Movie clip undistorted - proxy not working
Add movieclip fallback render option, for case, when proxies are not enabled or built

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4219
2019-03-18 13:11:32 -07:00
b0752cd7a0 Fix T57590: assert with zero length array buttons. 2019-03-18 19:56:14 +01:00
10d1edbffb Fix T56183: flip matcap not working for workbench as render engine. 2019-03-18 19:26:01 +01:00
a29186efb4 Merge branch 'blender2.7' 2019-03-18 19:06:21 +01:00
01df4818a6 Fix Cycles curve UVs wrong after recent changes. 2019-03-18 19:02:59 +01:00
d76fb8ec67 Fix T62712: Cycles world light path node not working. 2019-03-18 18:46:14 +01:00
b29790a953 Fix T62587: Particle instances Use Count not saved correctly
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4544
2019-03-18 17:53:14 +01:00
8e54ef69c6 Fix T62700: Disconnect hair bug
Need to use evaluated mesh from evaluated modifier data.
2019-03-18 17:50:29 +01:00
ad3d925682 Fix T62636: Overlapping scrollbar in driver editor
Instead of only `ymin` and `ymax`, `ANIM_channel_draw_widgets`
has a rectangle as input now.
This allows the caller to set a custom width for the channel.

Some space types need the extra space for the scrollbar
(drivers, graph), but the other don't have a scrollbar.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4543
2019-03-18 17:28:52 +01:00
8fb0b9aebb Subdiv: Enable topology cache in edit mode
The general idea of this change is to have a runtime data pointer
in the ModifierData, so it can be preserved through copy-on-write
updates by the dependency graph.

This is where subdivision surface modifier can store its topology
cache, so it is not getting trashed on every copy-on-write which
is happening when moving a vertex.

Similar mechanism should be used by multiresolution, dynamic paint
and some other modifiers which cache evaluated data.

This fixes T61746.

Thing to keep in mind, that there are more reports about slow
subdivision surface in the tracker, but that boils down to the
fact that those have a lot of extraordinary vertices, and hence
a lot slower to evaluated topology.
Other thing is, this speeds up oeprations which doesn't change
topology (i.e. moving vertices).

Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T61746

Differential Revision: https://developer.blender.org/D4541
2019-03-18 17:11:43 +01:00
91ffd39e77 Fix T62706: Orphan Data : I have now to save a file, close and reopen it, only then I can purge previous deleted meshes.
libquery code has some specific handling for IDs tagged as 'no_main',
among which to never consider them as refcounted/refcounting other IDs.

This is fine, but it also means we have to be careful when moving an ID
from main to out-of-main status, to do all id remapping we need
//before// we tag it as no_main.

That was a bit tedious to track down, we'll have to be careful that all
the corner cases we have to take care of, do not end up in a giant soup
of expections to exceptions, where nobody can find its way anymore...
2019-03-18 16:51:48 +01:00
dff88a92a4 Fix AMD OpenCL build error after recent changes.
Always use native function since this was already the case due to
__CL_USE_NATIVE__ not being defined in time, and seems to have caused no
known issues.
2019-03-18 16:39:57 +01:00
d1f04658d8 Fix: Cycles Subdivisions panel was showing, even when using Eevee 2019-03-18 15:56:54 +01:00
6490626077 Depsgraph: Store original modifier pointer
Currently not needed that much, but will ease some further
development which is related on preserving runtime modifier
data.
2019-03-18 15:53:18 +01:00
01c5335422 Cleanup: Comments 2019-03-18 15:53:18 +01:00
c5fe6ed96b Fix T62633: Model normals not updating in a modifier stack after a deform modifier.
A deform-only modifier that needs access to normals need a copy of
evaluated mesh with those normals updated, when it is not the first one
in the stack.

That issue had been partially fixed in Object mode a long time ago
(see T23673), but it was still broken for deform-only stacks cases.

And it was also completely missing from the Edit mode code
(`editbmesh_calc_modifiers()` function).
2019-03-18 15:50:12 +01:00
Dalai Felinto
b7255d33da Silence sorted function declaration/const warnings 2019-03-18 14:40:29 +00:00
8162a6c51d Cleanup: fix compiler warnings. 2019-03-18 14:56:08 +01:00
94f55d14c3 Fix (unreported) broken Py API doc after adding gpencil to buttons_context... 2019-03-18 14:42:44 +01:00
29039e5c74 Cleanup: remove compare_len_squared utility
There isn't any advantage to this over comparing the squared length.
2019-03-19 00:37:58 +11:00
606f3c74d3 Fix T62643: ID user decrement error, likely related to custom material PointerProperty.
We are in a totally out-of-main context here, so no refcounting of any ID...

Note that this whole 'render preview' area could use some refactor with
modern ID management API, but that would go way beyond a mere bugfix,
and it is not the time to do such things.
2019-03-18 13:57:07 +01:00
2b79f274e3 Fix T61226: Make hair editing (more?) thread safe
This replaces the global `PEData->dist` with a thread local variable
that is passed into the callback functions separately.

There are two new function types which have `Hit` in the name.
Those take the distance to the mouse as an additional parameter.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4538
2019-03-18 13:31:54 +01:00
4d2672ca7f Cleanup: C++ style of structure definition 2019-03-18 12:47:18 +01:00
4070bb242d Merge branch 'blender2.7' 2019-03-18 12:03:22 +01:00
7c5be750a3 Cycles: Cleanup strict compiler warnings 2019-03-18 12:02:41 +01:00
6d99b2c021 Cleanup: we now have a way to tag 'from' ID pointers in libquery code.
So no need to have custom verbose own detection cases for those guys...
2019-03-18 11:47:54 +01:00
07355ff74b Fix mistake in previous commit. 2019-03-18 11:42:35 +01:00
Miguel Porces
1b06e3378a Fix T62670: insert_link() method not working for ShaderNodeCustomGroup.
Allow Python to override this method.

Differential Revision: https://developer.blender.org/D4537
2019-03-18 11:37:31 +01:00
d0e28721b0 Cleanup: Main id looping: add FOREACH_MAIN_LISTBASE macro.
We don't want to use flow control like `break` statement into the basic
`FOREACH_MAIN_ID` macro, as this is a nested loop.

When refined behavior is needed (like breaking whole iteration, or just
skipping to next ID type), FOREACH_MAIN_LISTBASE and
FOREACH_MAIN_LISTBASE_ID macros should be used instead.

Based on D4382 by @campbellbarton
(Other potential solution, using flow control macros: D4384).
2019-03-18 11:36:50 +01:00
66932a2c81 Add-ons: disable 3ds add-on in all existing preferences.
Silences warning when running with --debug. If/when this add-on is ported,
users that need it can enable it again.
2019-03-18 11:10:28 +01:00
76277e7402 Cleanup: fix compiler warning. 2019-03-18 10:42:56 +01:00
8ecc4d4f16 Fix noisy console messages about unported add-ons by default.
* Make those single-line warning, there is really no reason to raise
exception (i.e. error) for that.
* Only show them when `--debug` option is set.
2019-03-18 10:38:12 +01:00
3a8099c45c Cleanup: unused vars in last commit 2019-03-18 20:30:05 +11:00
794aef3f25 Fix T58763: Sample color fails with mirror modifier 2019-03-18 20:16:21 +11:00
1d1e06b376 Cleanup: rename color band to color ramp 2019-03-18 18:26:14 +11:00
b749e43cd3 Fix color ramp eyedropper menu item
This couldn't be accessed because the poll function was checking the
active button.

Add a "color_ramp" context pointer which is set by the menu.

Alternative fix to D3984
2019-03-18 17:50:18 +11:00
8f5ba8e1a1 Cleanup: spaces around operators in DNA headers 2019-03-18 14:23:34 +11:00
317cb1dd65 Cleanup: style, duplicate include 2019-03-18 14:13:06 +11:00
6c0240e84a UI: clarify "Remap Relative" tooltip
Resolves T62612
2019-03-18 13:58:01 +11:00
c7a50d84b6 Fix T62684: Crash transforming w/ snap enabled 2019-03-18 13:42:53 +11:00
e1364b21fa Fix T62685: Rename 'Align' to 'Only Origins'
The RNA name didn't match the name used in the UI,
making the quick favourites menu show this as 'Align'.
2019-03-18 13:30:16 +11:00
9099305771 Cleanup: rename BLI_kdtree vars & args for clarity 2019-03-18 10:25:15 +11:00
4b3aafd44f BLI_kdtree: refactor boids specific logic into callback
Logic to for boids to avoid head-on collisions was in BLI_kdtree.

Move this into a callback which is now defined in boids.c
so the kdtree code can be kept generic.
2019-03-18 09:40:38 +11:00
df96455c55 UI: add light/world settings in shader node editor.
Material was already there. Implementation was changed so it's just a
single line of code to adapt a panel to the node editor.
2019-03-17 21:53:13 +01:00
f79ad42808 GPencil: Cleanup extra lines 2019-03-17 20:04:09 +01:00
6577618d5b GPencil: Changes in Fill and new 3D Cursor View Plane
This commit groups several options that were tested in grease pencil branch:

- Changes to fill algorithms and improves, specially in small areas and stroke corners.
  New options has been added in order to define how the fill is working and internally there are optimizations in detect the small areas in the extremes.

  Kudos to @charlie for coding this fill improvements.

- New 3D cursor view plane option.

  Now it's possible to lock the drawing plane to the 3D cursor and use the 3D cursor orientation. This allows more flexibility when you are drawing and reduce the need to create geometry to draw over surfaces.

- Canvas Grid now can be locked to 3D cursor.
- New option to reproject stroke using 3D cursor.
- Small tweaks and fixes.

Changes reviewed by @pepeland and @mendio
2019-03-17 19:47:56 +01:00
887d052e56 Fix T62570: Append Particles System not working properly.
T62570 and T61796 show that we need two slightly different behaviors in
post-linking collection process:
* For linking, we never want to instantiate indirectly-linked
collections or objects.
* For appending however, since all collections and objects will become
local and hence need instantiation, we want to 'link to scene' all
collections first, better than instantiating the objects in the master
collection opf current scene.
2019-03-17 18:07:13 +01:00
94507a7fa7 Fix T62589: Particle system Instance Collection option fails to set a user for a linked collection.
Forgot to tag properly RNA property in rB439437fa3a44.
2019-03-17 16:02:00 +01:00
0a25cea2cf Fix T62240: Bleed artifacts with degenerate triangles
This makes degenerate triangles be ignored, as they cause artifacts and
don't contribute to the result anyway. There is an extra cost for
all triangles, to check if they are degenerate. Though not ideal, this
seems to be the safest solution at the moment (see code comments).

This commit also changes the clamp value for the bleed len_fact from 5
to 10, to give good corner results with some sharper angles, considering
they will be rounded later.

A lot of the texture paint initialization code could be optimized
by caching the results throughout the session, instead of rerunning it
for each stroke. Stroke initialization is way too expensive at the
moment, and does many redundant computations.
2019-03-17 15:44:41 +01:00
cfd909f184 Fix T62678: Wrong text clipping
There are two issues at play here.
First, BLF_width computed a width that was not wide
enough to actually hold the text.
Second, blf_glyph_calc_rect_test computed an incorrect
rect->xmax when the glyph was moved to the left a bit.
We ignore the overlap on the left, but the right side
should still be adjusted accordingly.
2019-03-17 14:15:26 +01:00
b28bd7c5a4 Cocoa: Fix missing key window after closing "About"
The cause of this issue goes deeper inside of the custom nature of
the event loop. In short, when not using [NSApp run] closing "About"
window does not make previous key window a key again.

The solution is quite similar to other projects, but we only force
key window from handler when closing one appears to be "About" window.
In all other cases we leave it up to Blender's window manager to make
decision and do not interfere with it.

Test plan:
- Open Blender application
- Go to Blender -> About Blender menu item
- Close About window
- Note that Blender's window does not become active again.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4534
2019-03-17 13:24:38 +01:00
e691929686 Merge branch 'blender2.7' 2019-03-17 12:54:19 +01:00
0af22625c9 Fix bl_pyapi_idprop unit test.
Scenes can now have a 'cycles' key when starting, so account for that.
2019-03-17 07:36:26 -04:00
ef66aa2005 GPencil: Cancel all transformations in Draw mode
Actually, when you press G/R/S in Draw mode, the transformations can be done, but this is annoying in draw mode and must be captured an cancel.

This patch capture the transformation and cancel it.

Reviewed by @brecht
2019-03-17 12:20:34 +01:00
9d2397c710 Cleanup: remove unused buildbot code. 2019-03-17 12:01:19 +01:00
0676badb80 Fix Windows 32bit buildbot trying to use CUDA, should be disabled. 2019-03-17 12:01:19 +01:00
7778a1a0a1 Cycles: optimization for constant background colors.
Skip shader evaluation then, as we already do for lights. Less than
1% faster in my tests, but might as well be consistent for both.
2019-03-17 12:01:19 +01:00
9c7517fb63 Fix Cycles OpenCL compile waiting unnecessarily for background shader.
Makes preview kernel appear quicker when background color is fixed.
2019-03-17 12:01:19 +01:00
9873005ecd Cleanup: simplify kernel features definition.
No functional changes, logic here got too complex after many changes over
the years.
2019-03-17 12:01:19 +01:00
2d8aa2e6ad Cleanup: remove unused code. 2019-03-17 11:39:17 +01:00
5ad2302413 Fix Cycles not doing versioning for some files saved in 2.80. 2019-03-17 11:39:17 +01:00
e04d5a8106 Fix string size passed into name prefix function 2019-03-17 21:14:43 +11:00
69bf4e5e36 Cleanup: unused variables 2019-03-17 21:14:43 +11:00
ad9addbf46 Cleanup: unused imports 2019-03-17 21:00:56 +11:00
a19e78aa2d Cleanup: redundant layer access 2019-03-17 21:00:56 +11:00
8214712b19 Cleanup: use braces for BLI_kdtree 2019-03-17 21:00:56 +11:00
6cbd2e5c4d Cleanup: remove redundant check 2019-03-17 21:00:56 +11:00
d23452897b Remove 3DS add-on from factory startup. 2019-03-17 09:43:32 +01:00
37358114e2 GPencil: Fix missing guide topbar menu
This bug was introduced in previous commit
2019-03-17 09:33:23 +01:00
e17f7af0ce Cleanup: remove Cycles advanced shading features toggle.
It's effectively always enabled, only not on some unsupported OpenCL devices.
For testing those it's not useful to disable these features. This is replaced
by the more fine grained feature toggles that we have now.
2019-03-17 01:58:39 +01:00
cc5bdf0293 Cleanup: rename DEPRECATED to UNUSED
While the flags have been deprecated they're currently unused.
Rename for clarity.
2019-03-17 10:34:59 +11:00
cf5097d71f Cleanup: improve comments. 2019-03-16 18:20:57 -03:00
8b62f203d9 ED View3d: Fix possible bug when subtracting unsigned ints.
Related to rB681661dbed12.
2019-03-16 18:10:44 -03:00
Miguel Porces
9e152f919f Python API: add Python-defined node groups for shaders and compositing.
This was already supported for Cycles shader nodes, but now also works for
Eevee and compositing nodes. Instead of a generic NodeCustomGroup, now
there is ShaderNodeCustomGroup and CompositorNodeCustomGroup that can be
subclassed and registered.

Differential Revision: https://developer.blender.org/D4370
2019-03-16 20:36:35 +01:00
Miguel Porces
5797a5fc65 Fix ID user counting issues with NodeCustomGroup.
User counting now happens before init() and after free() methods, so that
the ID users are in a valid state when Python might modify them. ID user
counting was moved into node.c and simplified.

Patch by Miguel with further refactoring by Brecht. Ref D4370.
2019-03-16 20:21:16 +01:00
b9af4efe41 Cleanup: fix compiler warnings. 2019-03-16 20:21:16 +01:00
ad390f514b GPencil: Fix compiler warning
The fill flag was wrong and it was checking the color, not a flag.
2019-03-16 20:05:15 +01:00
2d3fbadfe3 GPencil: Fix layers topbar panel
After a previous commit to fix the pin panels, this line was not working as expected. As this variable is not used, the line can be removed.
2019-03-16 19:21:19 +01:00
9a4192277b GPencil: Disable Pressure for Block brush 2019-03-16 18:56:07 +01:00
e5e6c3b52c Fix T62576: The remaining two unported official add-ons: X3D and 3DS.
X3D has been (basically) ported in rBAe8da70ab73d2dd5ff46, and 3DS has
been downgraded to 'community' support, so we can get rid of that ugly
'slience warning' hack.
2019-03-16 13:02:34 +01:00
03ee447dd2 UI: Remove redundant 'settings' from GPencil Tool Properties panel titles 2019-03-16 12:54:08 +01:00
cabb53effa Correct error in 6aebb5a4d5 2019-03-16 21:49:33 +11:00
37af7ce779 DRW: support clipping for armature bone axes
Also minor changes to make empty axis match armature axis.
2019-03-16 18:43:36 +11:00
c55fb58e8a DRW: support clipping for envelope armature draw type 2019-03-16 18:26:16 +11:00
6aebb5a4d5 DRW: support clipping for relationship lines 2019-03-16 17:37:08 +11:00
dbfbd6b904 Fix T62555 Viewport borders flicker when splitting said viewport 2019-03-16 03:58:00 +01:00
0c10374faf CMake: disable jemalloc when building as a Python module 2019-03-16 13:06:47 +11:00
d438120fe3 Fix T61526 hair doesn't render in workbench but does with openGL 2019-03-16 02:48:19 +01:00
bd1d80d0cf Cleanup: use return args last 2019-03-16 11:45:22 +11:00
3600bb79d0 Fix T60803 Artifacts with SSR + Reflection Plane + 0 roughness
Tweaked the tracing parameters again to avoid rays terminated before first
iteration.
2019-03-16 00:51:38 +01:00
44301175bb Fix __func__ being passed as an output string, also warnings 2019-03-16 10:12:47 +11:00
795bddf2bd Fix T55620 Artifacts with SSR and planar reflection
Was caused by 0 pixel extent rays which did not trace at all. Bumping the
threshold for degenerate rays fixes it.
2019-03-15 23:31:41 +01:00
86646dab7c Fix T62621 object scale changes tangent node output in Eevee
Normal Matrices were not normalized, leading to non-normalized vector
rotations results.
2019-03-15 22:33:03 +01:00
1d6009d7aa Eevee: Fix tangent being renormalized after interpolation 2019-03-15 22:33:02 +01:00
66225e84cf Eevee: DOF: Optimization: Move some operations out of the shader 2019-03-15 22:33:02 +01:00
fe40e184a6 Fix T61857 Eevee DOF not working if the camera is in orthographic mode
It was just a bad mapping of the ogl depth to scene linear depth.
2019-03-15 22:33:02 +01:00
efdde88dfc Particle: Remove Billboard Particle code
The billboard particles were only used by Blender Internal. So until it is
supported by Cycles of Eevee there is no reason to keep it in the code and
UI.

Fix T61695 Billboard particles not displaying in Eevee viewport, render
2019-03-15 22:33:02 +01:00
Dalai Felinto
aaa35d1092 Silence warning from recent GPU simplify commit
Said commit introduced warnings and build problens. Let's be more
careful in the future. Warnings are not to be treated lightly either.
2019-03-15 18:15:31 -03:00
ddd28bad90 Fix compiling after last commit 2019-03-15 22:07:09 +01:00
681661dbed GPU: Simplify select shaders.
The shaders are: `GPU_SHADER_3D_FLAT_SELECT_ID` and `GPU_SHADER_3D_UNIFORM_SELECT_ID`.
This commit allows the drawing of the mesh select ids to be done on a 32UI format texture.
This simplifies the shader that previously acted on the backbuffer and had to do an uint to rgba conversion.

Differential Revision: https://developer.blender.org/D4350
2019-03-15 17:02:48 -03:00
Dalai Felinto
4510f88d00 Remove object hide_* operators from outliner keymap
We already have dedicated outliner visibility operators that not only
take precedent over those ones, but also unhide collections as well.

No change for the end user. That said, since I added the outliner
hide/unhide operators I assumed that newly visible objects are to be
selected. That can change in a separate commit, but it should be done
by changing OUTLINER_OT_unhide_all.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4527
2019-03-15 16:19:37 -03:00
Dalai Felinto
b7d942446f Fix T62438: Unhide all doesn't set newly visible objects to selected
The select option in the operator was never working because we were
trying to select an object considered unselectable (since it was hidden).

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4527
2019-03-15 16:14:21 -03:00
Dalai Felinto
713010bd77 Fix T62313 - No way to remove object from master collection in 3d view
This introduces a new iterator, FOREACH_COLLECTION, that unlike the
FOREACH_SCENE_COLLECTION it iterates over all the Blender file
collections, including the scene master collection, as well the database
ones (bmain).

Reviewers: brecht
2019-03-15 16:09:32 -03:00
Dalai Felinto
fcffbe1d1b Fix T62320: Outliner collection disable not propagating to other view layers
The moment you switched to another view layer the visibility was still
outdated.
2019-03-15 15:36:42 -03:00
fb4bb61155 Fix T62608: many tools in the toolbar not working.
The keymap names still use the label, so use that again for looking up the
keymap so things work again after recent changes.
2019-03-15 19:31:43 +01:00
99fe774298 Fix T59943 Color banding present in Workbench render but not in viewport
I don't really like forcing RGBA16F for Albedo render but that's ok since
the texture is shared with the effect_fb.
2019-03-15 19:28:10 +01:00
52a7636c29 Tests: remove unnecessary _test postfix on test names. 2019-03-15 19:11:33 +01:00
9ad9d38786 Fix T62601: parenting to curve (follow path) causes offset
Similar to T60623 / rB2894e75121d7.
Issue (when parenting with 'Follow Curve') is that the curves
CU_FOLLOW flag is set on the original, but not the
evaluated curve (yet), leading to misbehaviour in 'ob_parcurve()'.
Setting this on both now.

Reviewers: sergey

Maniphest Tasks: T62601

Differential Revision: https://developer.blender.org/D4524
2019-03-15 18:49:13 +01:00
bc8bd87dff Merge branch 'blender2.7' 2019-03-15 18:31:48 +01:00
65d95879f7 Cycles: upgrade to CUDA 10.1 as the one officially supported version.
This version fixes various bugs, and there is no need anymore to use both
9.1 and 10.0 for different cards.

There is a bug related to WITH_CYCLES_CUBIN_COMPILER and bump mapping in the
regression tests, so that remains disabled same as it was for CUDA 10.0.

Fix T59286: CUDA bake failing on some cards.
Fix T56858: CUDA 9.2 and 10 issues.
2019-03-15 16:52:28 +01:00
56a8c2a320 Fix cycles preferences.get_devices() not returning all devices as before.
It only returned those for the active device type. For backwards compatibility
return them all again, but still avoid enumerating them from our own code on
startup or opening preferences.
2019-03-15 16:52:28 +01:00
5051e580e4 Merge branch 'blender2.7' 2019-03-15 16:28:33 +01:00
2f6257fd7f Cycles/OpenCL: Compile Kernels During Scene Update
The main goals of this change is faster starting when using foreground
rendering.

This patch will build kernels in parallel to the update process of
the scene. When these optimized kernels are not available (yet) an AO
kernel will be used.

These AO kernels are fast to compile (3-7 seconds) and can be
reused by all scenes. When the final kernels become available we
will switch to these kernels.

In background mode the AO kernels will not be used.
Some kernels are being used during Scene update (displace, background
light). When these kernels are being used the process can halt until
these become available.

Reviewed By: brecht, #cycles

Maniphest Tasks: T61752

Differential Revision: https://developer.blender.org/D4428
2019-03-15 16:18:21 +01:00
86ea76254d Fix T62614: Copy eevee settings when scene is copied
Reviewers: brecht, fclem

Differential Revision: https://developer.blender.org/D4520
2019-03-15 16:06:30 +01:00
ac147872cc Fix T62594: Truncated text in UI
Reviewers: brecht, billreynish

Differential Revision: https://developer.blender.org/D4518
2019-03-15 15:12:42 +01:00
Dalai Felinto
2e043c266b Fix: "Jump To Target" showing up in workspace context menu
Issue introduced on d227c58e3e.

This was affecting WorkSpaces as well as background scene and probably
other places. We use the operator poll to decide whether to show it.

Reviewers: brecht, mont29

Differential Revision: https://developer.blender.org/D4488
2019-03-15 10:53:35 -03:00
d5d518b96c Fix T62592: GPencil layer activation from outliner needed two clicks
For some reason, the code was commented and we missed to enable it again.
2019-03-15 14:38:48 +01:00
e583e86a9a Fix T62284: apply a retroactive fix for T57366 to old files. 2019-03-15 14:58:16 +03:00
9a499636df UI: rename object Boundary back to Bounds, it's not the same thing. 2019-03-15 12:16:35 +01:00
e775ad6c1b Correct tool name (missed in recent update) 2019-03-15 20:35:30 +11:00
98af74b936 Fix T62297: Grease Pencil dots drawing crashes Blender
Fix again this bug. Maybe it was introduced when change how wireframe mode by object works.
2019-03-15 10:07:18 +01:00
41b289be30 Cleanup: unused imports 2019-03-15 19:45:21 +11:00
6237743111 Cycles/OpenCL: Added missing opencl programs
The functions that determine the program name + filename of kernels
were missing some base kernels like denoising and base. For completeness
I added those kernels so the function returns the correct results.
2019-03-15 08:11:28 +01:00
f29b80ff79 Tool System: add tool registration API
This mimics RNA style class registration,
keeping the same internal data types.

Currently there is a template which shows an example of adding a tool
group with a keymap.

Icon generation still needs to be exposed for general use.
2019-03-15 17:05:18 +11:00
d4156b46d7 Tool System: use categories for tool identifiers
Tools that come with Blender use 'builtin' or 'builtin_brush' prefix.
2019-03-15 16:48:01 +11:00
3400fe3ece Tool System: split UI label from tool identifiers
Prepare for exposing tool registration to the Python API.

- Generated tools can use their own prefix so naming collisions
  won't happen between hard coded & generated tools.
- Add-on authors can use the add-on name as a prefix.

Currently the names match, renaming will happen next.
2019-03-15 14:53:08 +11:00
388ff003e2 UI: rename brush "Overlay" to "Display"
Brush cursor display options are more closely related to other
data-block display options than per-3D viewport overlay.

Rename to avoid confusion.
2019-03-15 11:41:14 +11:00
ee3d8cafdd Fix T59155: Can't select light in-front of other objects
Enable depth picking by default.

This adds new 'gpu_flag' since it's not so relevant to add GPU drawing
options into uiflag & uiflag2.

This resets the recently added smooth edge flag.
2019-03-15 11:22:42 +11:00
18e0c5ea5b Cleanup: deprecated flags to named DNA flags 2019-03-15 10:42:39 +11:00
35b78d9807 Cleanup: indentation, wrapping
Mostly functions wrapping args, not confirming to our style guide.
2019-03-15 09:54:30 +11:00
395a0acdb8 Cleanup: style, use doxygen for comments 2019-03-15 09:50:02 +11:00
23272ee099 GPencil: Invert Texture for Line Strokes
Invert the texture of the stroke if the random UV is activated. Before, this parameter only affected to dot mode, but not to line strokes.

The texture is inverted vertically.
2019-03-14 19:54:07 +01:00
81a03e17f7 Merge branch 'blender2.7' 2019-03-14 19:00:10 +01:00
9d4fd25735 Fix T62460: undo doesn't work in files that have a paint curve. 2019-03-14 18:59:11 +01:00
f3a3d74bcf Fix T62425: topbar showing wrong buttons at some UI scales. 2019-03-14 18:59:11 +01:00
57b5852bc8 Fix T62120: number button editing outside of soft max range jumps. 2019-03-14 18:29:42 +01:00
55e79d8f36 Tests: BLI_heap_simple test fix build error with MSVC.
BLI_heap_simple.h uses types from BLI_sys_types.h causing a build error on windows.
2019-03-14 11:14:44 -06:00
7b38ad7286 Fix T57138: Cycles CMJ failing with viewport samples set to 0.
Can't use INT_MAX, CMJ runs into precision/overflow issues before that.
2019-03-14 17:39:00 +01:00
3ab879ed5a Fix T58793: Volumetric Clouds in Eevee not working | MacOs
Fix missing attribute in vertex shader. Theses are optimized out if using
volumetric shader but on MacOS they seems to be needed.
2019-03-14 17:18:32 +01:00
f7d415ab42 Fix T58610: EEVEE: camera motion blur renders only one viewport sample
This fix saves the camera matrices in order to not call
BKE_animsys_evaluate_animdata during each draw loop. This function tags
the view as dirty even if the camera does not move.
This effectivly, avoids the constant reset of TAA.
2019-03-14 16:53:05 +01:00
81531d452c Fix T58694 Eevee: Wrong result when using normal map and face is flipped 2019-03-14 16:53:05 +01:00
bf8a414237 Fix T62551: Limited Hair editing (no grab, scale, rotate)
This is actually re-introduced T59963 which got broken by 6752022310.
Use less obscure recalc flag now.
2019-03-14 15:55:41 +01:00
7bfdf35711 Fix T61300: First letter truncated
The main problem was that the character `J` has "negative kerning".
It was cut off because it started outside of the clipping rectangle.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4513
2019-03-14 15:45:21 +01:00
96db46d17c Fix T62321: Crash on motion tracking when dopesheet open and deleting track
Need to ensure all dopesheet are properly tagged for update.

The tricky part here is that due to the animation we need to keep
movie clips covered by copy-on-write, but the interface uses an
original clip to draw dopesheet.

Use same idea of an active dependency graph as is done in other
similar cases.
2019-03-14 15:18:43 +01:00
c65be83df0 GPencil: Change Brush defaults for Block and Marker
Still pending the change in default 2D template.

Changes reviewed by @pepeland and @mendio
2019-03-14 14:03:04 +01:00
5e0069e09a Fix some unreported issues with image sequence updates, clean code.
Lamp and world nodes were missing, nested node trees were updated twice,
remove some legacy code.
2019-03-14 12:40:15 +01:00
c6ca842e23 Fix T61937: image sequences not updating in workbench display mode.
Need to pass the image user along to get the frame number.
2019-03-14 12:37:51 +01:00
Stefan Werner
d8f1b18d9b Merge branch 'blender2.7' of git.blender.org:blender 2019-03-14 11:47:27 +01:00
Stefan Werner
47da8dcbca Cycles: Improved thread order for better CUDA performance.
This patch puts threads that render the same pixel closer together,
as opposed to threads that render the same sample. Thus threads
within a warp are more coherent in memory access and control flow,
leading to performance improvements.

Example benchmarks on a Quadro RTX4000 (WDDM) on Windows 10:
Koro:                 4:23 ->  3:46
BMW:                  1:18 ->  1:25
Barbershop Interior: 17:52 -> 14:55
Classroom:            4:37 ->  3:45

Performance differences on OpenCL/AMD were hit and miss, some scenes
became faster, others lost significantly. Therefore, this is kept as
CUDA only change for now.
2019-03-14 11:45:58 +01:00
bcc66136c2 Fix T62528: data transfer modifier error.
Stupid mistake in previous 'fixing' commit, I put the call computing
extra required source cddata masks into the callback used to get
destination (current object) cddata masks...
2019-03-14 09:48:35 +01:00
687e4b42d5 Merge branch 'blender2.7' 2019-03-14 09:31:20 +01:00
4887baf7d6 Fix T62145: Geometry.Backface Node Renders Black
The NODE_GROUP_LEVEL of the Geometry node should be bumped to 1
when Backface is connected. Backface uses `NODE_LIGHT_PATH` that
is part of NODE_GROUP_LEVEL1, the rest of the geometry ndoe is
NODE_GROUP_LEVEL_0.
2019-03-14 09:20:11 +01:00
05fbb0d50e Fix separators use within tool groups 2019-03-14 17:27:55 +11:00
3b3eac3d4b Keymap: tweak keymap loading type checks
For full keymaps, ensure keymap items are lists to allow predictable
manipulation at runtime.

When calling `keymap_init_from_data` directly, allow any sequence type
to allow tools to define their keymaps as tuples.
2019-03-14 15:53:48 +11:00
0bd45a2d51 Cleanup: unused imports 2019-03-14 15:34:14 +11:00
c567dd5ad9 Keymap: remove select linked deselect
This didn't do anything useful (always de-selected all).
2019-03-14 15:34:13 +11:00
5c2cef2c91 Cleanup: match WorkSpace and WorkSpaceTool capitalization 2019-03-14 14:38:38 +11:00
ff752f6dbc Cleanup: remove redundant UV select linked options 2019-03-14 14:09:24 +11:00
8b1dcd3b25 Cleanup: doxy sections 2019-03-14 13:36:48 +11:00
87aca8bd02 UI: disallow splitting of temporary screens
D4510 by @harley
2019-03-14 11:12:52 +11:00
3ddd7e9704 Cleanup: style 2019-03-14 11:08:48 +11:00
a38205fbd8 Fix "Follow Active Quad" poll function
Since this uses the active face this only makes sense in edit-mode.
2019-03-14 10:56:25 +11:00
e63642f9cd Fix T60172: UV smart project fails for unselected active object
Support multi-object edit-mode too.
2019-03-14 10:53:09 +11:00
3a58e97aed Fix T62526: Can't scroll redo panel 2019-03-14 09:59:03 +11:00
daaabd076d Comments: correct ARegion.sizex/y comment
Also remove unused 'fsize'
2019-03-14 09:53:07 +11:00
7fb7d20c19 Eevee: Fix black mesh when tangent is not present
In this case, the generic vertex attribute is {0,0,0,1}. So we look for
this case.

This fixes black text objects with a normal map applied. Also this could
help porting sculpt mode drawing to Eevee without supporting normal
mapping.

Note that will just fix black meshes due to T61870 but objects will not
show their normal map. So it's not a fix for this issue.
2019-03-13 23:15:11 +01:00
d0fb0d0a9d Fix T60170: Eevee: smoke color does not apply permanently
This was because color is not present in the density texture if there is
only one constant color. Adding it as a uniform.
2019-03-13 23:15:11 +01:00
bbc3ee09e4 Fix T59445: top bar hides everything when there isn't enough space.
Left and right aligned regions get hidden when there is not enough space,
and the main center region was empty. Now remove the left region and put
its contents in the center region, so that it always remains.
2019-03-13 20:14:49 +01:00
2d4a4fa0c1 Merge branch 'blender2.7' 2019-03-13 18:37:09 +01:00
18a9e0776c Fix T62156: Hair particle only shows up in final render when visible in viewport
Draw manager was checking for particles being enabled in viewport, but
actual evaluation was happening for render. Now the check in draw manager
properly follows current evaluation mode.

Additionally, de-duplicated some check, by moving everything needed to
a single place.

Annoying part is the const-cast, that could be cleaned up later by
modifying some underlying functions.
2019-03-13 18:35:32 +01:00
6eeac735f2 Build environment: require Alsa/OSS/PulseAudio backends for OpenAL on Linux.
Otherwise we can silently build an OpenAL that can't actually playback audio.
2019-03-13 18:33:26 +01:00
1be16466e7 Fix T60434: crash with OSL and viewport + preview render at the same time.
Don't free LLVM JIT memory until process exit, there might be multiple OSL
instances using it.
2019-03-13 18:31:12 +01:00
6a8d87db18 Build environment: backport master changes to blender2.7.
We can keep these in sync for now.
2019-03-13 18:31:12 +01:00
1c9e898e8f GPencil: Cleanup code 2019-03-13 17:42:41 +01:00
4e17197597 Fix T62521: Fake dependency cycle with spline IK
The core was hooking up relation to a wrong operation, in an
attempt to cause proper full update of the pose (since there
is no intermediate state stored anywhere). This is now done
as a part of flush_handle_component_node(), so can properly
route more granular relation.

This fixes the crash which was caused by an access of partially
evaluated data by solving the fake cycle. However, if there
is a real cycle involved the code will still not survive, but
this is more generic issue (which also includes modifiers
for meshes and curves).

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4509
2019-03-13 17:26:17 +01:00
f990a1a6cc T62446: Mouse cursor disappears on Grease Pencil stroke
Before the cursor was only visible after the cursor moves over side areas, but not in viewport area.

Now, as soon the drawing is completed, the cursor is reset in order to get again the icon in the viewport.
2019-03-13 17:13:53 +01:00
107c94c338 UI: New option to display factors as percentages
The option can be changed in the Preferences
in `Interface -> Editors -> Factor Display Type`.

Reviewers: campbellbarton, brecht, billreynish

Differential Revision: https://developer.blender.org/D4462
2019-03-13 16:58:00 +01:00
17e0565cc5 Fix T58668: Misaligned text when editing multiple values
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4503
2019-03-13 16:26:34 +01:00
3952fd199a Fix T59448: Eevee broken Area Light shadows for square and rectange shape 2019-03-13 16:06:34 +01:00
0e9ea707b5 Fix T58721: Keyframing one transform option reset other transforms
Use dedicated flag to tag animation just for copy-on-write synchronization,
which makes it so copies of the original data blocks gets in sync with the
original ID. This will not flush the animation update to all objects which
depend on that animation.

If such flush is required, use ID_RECALC_ANIMATION.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4508
2019-03-13 15:51:44 +01:00
Alex Strand
bc5b0f7a09 Curves: change default fill mode to full, increase bevel resolution.
Ref D4438.
2019-03-13 15:24:58 +01:00
Jose C. Rubio
76437b903d Fix T60185: Crash on adding Inverse Kinematics
When having loops in a kinematic chain and also a IK constrain,
the solve_cycle function removes graph relations necessary to ensure
the cleanup operation was running at the very end.

Due to his Blender was crashing when some operations (the bone
constraints) accessed a pointer that was already freed.

Solved by adding more relations between crucial nodes.
2019-03-13 15:16:28 +01:00
Adrian Newton
eb1580961a UI: put Armature constraint in alphabetical order in the menu.
Differential Revision: https://developer.blender.org/D4492
2019-03-13 14:47:18 +01:00
ffa29194bb Fix use of uninitialized variable in undo system. 2019-03-13 13:50:41 +01:00
d555f6a4ab WM: pre-fill bug-reports
D4507 by @LazyDodo w/ edits & moved into own module.
2019-03-13 23:20:48 +11:00
1f39b8b228 Build environment: require Alsa/OSS/PulseAudio backends for OpenAL on Linux.
Otherwise we can silently build an OpenAL that can't actually playback audio.
2019-03-13 13:00:03 +01:00
3afc77655e Fix T57305: NDOF frozen w/ lock view to camera
This effectively reverts 030297209f and 785e8a636a,
which caused this issue.
2019-03-13 22:21:23 +11:00
52d31b4894 BMesh: make edge winding from face optional
Broke uv-sphere creation, further it might be a problem
for script authors expecting matching edge order for duplicated content.

Now only apply this when duplicating via the operator.
2019-03-13 19:57:52 +11:00
9984c6494a Fix Cycles interface after 3017d88aec 2019-03-13 09:53:07 +01:00
432750f7cf Fix T62487: Flipped normals extruding edge loop 2019-03-13 19:21:10 +11:00
ef04513925 BMesh: utility function to swap edge verts
Needed so we can control the winding of extruded faces.
2019-03-13 19:12:26 +11:00
e6371019e5 Fix T62484: Mesh undo ignores selection mode 2019-03-13 17:37:43 +11:00
2bc6858021 Fix T62524: Popover w/ keep-open moves on cursor motion 2019-03-13 16:41:46 +11:00
1abd120e70 Cleanup: rename uiBlock.mx,my to bounds_offset
Use a name that related to block bounds calculation
(mx/my are typically used for mouse x,y).
2019-03-13 16:41:35 +11:00
f1a65f5750 Cleanup: use unpacking & generators to build classes
No reason to make a classes tuple then manipulate it when
everything can be declared inline.
2019-03-13 13:32:10 +11:00
fac39dc160 UI: avoid sub-classing mix-ins for user-prefs
Also remove redundant staticmethod use.
2019-03-13 13:32:10 +11:00
100854c17c UI: rename PresetMenu to PresetPanel, move to bl_ui.utils
Confusing to call a menu a panel when subclasses need to define
panel specific variables.

Avoid having bl_ui depend on bl_operator module too.
Since this isn't an operator, add utils modules for shared types.
2019-03-13 13:32:10 +11:00
88fe48b56a UI: tweak check for sequence length
Slightly less work to check if it's None
(no need to inspect the listbase).
2019-03-13 13:32:10 +11:00
a4b6ef30dc Cleanup: redundant staticmethod use
staticmethod shouldn't be used unless it's necessary,
in that case a comment should be included especially when
subclassing non-staticmethods from RNA.
2019-03-13 13:32:10 +11:00
d6e6a0f906 Cleanup: redundant bpy.context access 2019-03-13 13:32:10 +11:00
de6f047389 Cleanup: remove unused menu 2019-03-13 13:32:10 +11:00
16b6b03969 Cleanup: pass context to draw method instead of accessing from bpy
Allows for context overrides/mocking.
2019-03-13 13:32:10 +11:00
e24de17b8d Fix typo in grease pencil UI 2019-03-13 13:32:10 +11:00
bf9904ec80 Fix T59501: Eevee doesn't use integer node sockets
This is a hacky fix. We just convert the int as a float and use it as such.

This works ok for small int but will not be correct for numbers greater
than 4194303.

Correct support would require deeper change for UBO creation and socket
conversion.
2019-03-13 01:20:51 +01:00
af0ab15e1d Fix T62436: New added Torus won't appear in Local View
Add Object.local_view_get/set

Alternate fix which supports removing from local view & checking
if an object is in local view.
Also avoids redundant refresh.

Matches 2.7x Object.layer_local_view capabilities more closely,
without exposing the flag directly.
2019-03-13 10:52:25 +11:00
3ea7a5d869 Revert "Fix T62436: New added Torus won't appear in Local View"
This reverts commit 9054b39b27.

Using the region data to find the screen & space-data doesn't make sense
since local-view is space-data there is no reason to pass in a region
argument, then lookup the space-data.

There was no way to remove an object or check it's local view state
as there was in 2.7x.

This can be made closer to 2.7x API and simplified.
2019-03-13 10:52:25 +11:00
3146a07e3e Fix T60005: Eevee: Volume material doen't write alpha 2019-03-12 23:16:17 +01:00
31fba57677 Fix T60802 Eevee: No diffuse when using Clearcoat + Add shader 2019-03-12 23:16:01 +01:00
7187ae5ee1 Fix T62510: Crash resetting space type to default 2019-03-13 09:11:50 +11:00
07b8be9514 RNA: support enum defaults which don't exist in the item array
Allow dynamic defines to have defaults which don't exist in the
static array, this is an exception that's only allowed when the item
array is set to DummyRNA_NULL_items.
2019-03-13 09:10:34 +11:00
df179e5e78 GPencil: Fix merge duplicate 2019-03-12 23:09:05 +01:00
c3174f5924 GPencil: Fix compiler warning 2019-03-12 23:02:19 +01:00
e0dd4f464f Fix T62491: Wrong tooltip for lock/unlock strips 2019-03-13 08:54:04 +11:00
ebcea5b9f5 Cleanup: warning 2019-03-13 08:54:04 +11:00
Dalai Felinto
868a6797e0 Fix T62377: Crash hiding Armature in edit mode and switching to pose
The poll function accepts hidden objects, so they are not stuck in pose
mode, but the operator itself expects a valid base, which we don't have.

When called from OBJECT_OT_mode_set() it will fallback to object mode.

It is the same that happens when in Edit Mesh mode with a hidden active
object and trying to change to Vertex Painting mode.
2019-03-12 18:47:59 -03:00
41cb565880 Fix T60902 Eevee: Environment texture partially visible on transp. render
This was due to environement not being rendered with alpha blending. So
color was still written and contributed to the final render color. Now
we multiply by background alpha so that it removes any background pixels
intensity.

For this reason this made the (incorrect) final premult unecessary.
2019-03-12 22:02:39 +01:00
f16bdf1075 Fix T61380 Geometry normal node incorrect for backfacing faces in Eevee 2019-03-12 22:02:39 +01:00
Dalai Felinto
e37e105fed Fix Hook to New Object won't appear in Local View
Reported as part of T62436 (although the bug was a different one).
2019-03-12 17:44:06 -03:00
Dalai Felinto
9054b39b27 Fix T62436: New added Torus won't appear in Local View
I had to add a region3d.local_view_add(ob) for the API.
2019-03-12 17:28:45 -03:00
Dalai Felinto
db5ca11d80 Silence warning in greasepencil code 2019-03-12 16:49:12 -03:00
2e1e250676 Fix T62508: Annotations Placement default value is not the same as factory default 2019-03-12 20:29:33 +01:00
480ee612de GPencil: Restrict new data operator to object mode
The operator was only accessible from search menu, and this was wrong. The operator must be only used in object mode.
2019-03-12 19:58:43 +01:00
6eaaa9c3d3 Fix T62507: Removing Annotation layers removes layers option
Now, when the layer is removed, the Annotation title is removed too to get the same situation when you start using annotations.
2019-03-12 19:49:46 +01:00
649001e439 Fix T62506: Erasing blank annotation layer activates Move operator
If you try to erase empty annotations, the operator is canceled.

The message is necessary to avoid the keymap is captured by the next keymap in the stack.
2019-03-12 19:36:24 +01:00
cae89a6889 Python/ViewLayers: add object.hide_get/set(), and optional view layer parameters.
These new functions control the per view layer object hiding state, similar to
the selection state. All these object state checking functions now also optionally
take a view layer to use instead of the active view layer.

Fixes T62062.
2019-03-12 18:52:56 +01:00
4572354fe5 Windows: Add convenience logging batch files.
To make triaging a little easier these batchfiles generate the
debug log and sysinfo files and instruct the user how to attach
them to their bug report

Differential Revision: https://developer.blender.org/D4505

Reviewers: brecht, zeddb
2019-03-12 11:36:57 -06:00
75424b296d Cleanup: comment on GPU_pass_compile. 2019-03-12 14:29:50 -03:00
c427590c4e Fix T62388: object.visible_get() not affected by object.hide_viewport.
After recent changes BASE_VISIBLE was not always disabled properly when the
object is hidden. This refactors the code a bit to hopefully be more clear.
2019-03-12 18:28:49 +01:00
834d3962b9 Use the same string for DNA enum and CLI argument for EXR image format setting
The `--render-format` CLI option takes `EXR` and `MULTILAYER`, whereas
the DNA image format render setting uses `OPEN_EXR` and
`OPEN_EXR_MULTILAYER`. This commit adds the DNA values to the CLI
argument, so that it is possible to take the selected value from DNA and
pass it as-is to the CLI. This is used in Flamenco, for example.

The `OPEN_EXR` and `OPEN_EXR_MULTILAYER` are now aliases, so both the
existing and the new options keep working.

Reviewers: campbellbarton, brecht

Reviewed By: brecht

Subscribers: fsiddi

Tags: #bf_blender_2.8

Differential Revision: https://developer.blender.org/D4502
2019-03-12 16:17:59 +01:00
e28f0f179d Fix T62279: Rendering simple geometry corrupts with greasepencil layer
This was caused by a missing state reset. Also adding safety state reset
before and after drawing (might not be necessary).
2019-03-12 16:01:23 +01:00
aaeca5d872 Eevee: Planar Ref.: Invert view matrix to remove triangle front face flip
This was the cause of some issue with normal mapping. This way is cleaner
since it does not modify the state of the drawcalls and other ad-hoc
solutions to fix the problems down the road. Unfortunately, it does require
to fix every sampling coordinate for this texture.

Fix T62215: flipped normals in reflection plane
2019-03-12 16:01:23 +01:00
ccb4484ea3 DRW: Fix missing state reset before draw pass
This is needed before any drawcall. If not, undefined behavior can happen.
2019-03-12 16:01:23 +01:00
4b5570533d Fix (unreported) Outliner could add (link...) a collection to a linked scene/collection.
Think that's the last case... At least for now.
2019-03-12 15:48:24 +01:00
9778b0a5bc Fix T62488: Can delete collection from indirect linked library.
Same issue as with previous commits for other Collection Outlier's
operations, checks are always different though...
2019-03-12 15:48:24 +01:00
07c8b829b5 Fix (unreported) Outliner's New Collection adding local collection to linked IDs.
Similar issue to the one about Duplicate operation...
2019-03-12 15:48:24 +01:00
d5576d3b0f Cleanup: Outliner's Collection duplicate: don't check for visualization type in exec function.
This has already been ensured by poll callback...
2019-03-12 15:48:24 +01:00
33dd01fc69 Fix (unreported) duplicated collection from linked scene would be parented to that scene.
In other words, Duplicate Collection could link local ID into a linked
one... Nasty. ;)

Add checks that found parent is not a linked data-block (and try to
find a fall-back one if this is the case).
2019-03-12 15:48:24 +01:00
913b1fd29a BKE Collections: add helper to find the scene of a master collection. 2019-03-12 15:48:24 +01:00
c10d011cc5 Fix T62457: Crash with rigid body and disabled objects
Need to always ensure objects form rigid body wortld are part
of dependency graph.
2019-03-12 15:27:43 +01:00
936014ea8c Fix missing metadata for multilayer exr sequences 2019-03-12 14:53:03 +01:00
645cc3e871 Merge branch 'blender2.7' 2019-03-12 14:22:53 +01:00
8ba1c3072c API Doc: Gotcha: add section about 'exceptions to the rules' known crashing cases.
As exposed in T62406, we can have some rare cases of crashes due to
memory re-allocation happening outside of expected scenarii.

Ideally this should be re-designed, but at least keep track of those
known exceptions to general rules...
2019-03-12 14:12:46 +01:00
e3b1ae9a81 Fix T62481: Cycles crash rendering with UV pass after recent changes. 2019-03-12 14:11:36 +01:00
298dabc79b Cycles/OpenCL: Reduce How Often Kernel Recompilations Are Needed
This patch will reduce the number of times that we need to
recompile kernels. It does this by (en/dis)abling features
by default. So when the user needs them that the kernels are
already available.

Other features are enabled by default for background and foreground
rendering. When in background rendering the user wants the best
render performance. When in foreground rendering the user wants
the least amount of recompilations.

Enabling volumetrics or subdivision evaluation will still trigger
a recompilation during foreground rendering.

Reviewed By: #cycles, brecht

Differential Revision: https://developer.blender.org/D4485
2019-03-12 14:06:45 +01:00
d9c5436cf4 Fix T62485: wrong tooltip text 2019-03-12 13:45:28 +01:00
ca06b84900 Fix T62470: instanced object does not preserve bounds display type.
Inheriting the display type from the instancer should only happen if it's
a simpler one.
2019-03-12 13:40:31 +01:00
84ac6b72c0 UI: Adjustments to Texture Paint Projection Paint panel 2019-03-12 11:07:43 +01:00
0bb57c5acc Make B-Bone deformation code more robust with bad cached segment data.
Various dependency graph problems can cause obsolete data to reach the
armature modifier, so add checks to reduce the chance of crashing.
2019-03-12 12:38:31 +03:00
5582452567 GPencil: Set wire mode when object is set to wire
When the object view is set to Wireframe, the display must be set as wireframe view with x-ray on.

Now the x-ray switch is handled by object.
2019-03-12 10:23:33 +01:00
784f7cb6ca Cleanup: use doxygen sections for BLI_utildefines 2019-03-12 17:45:25 +11:00
873f8b13ec Cleanup: BLI_utildefines struct macros
Use the term "AFTER" instead of "OFS" since it wasn't obvious these
macros operate on everything after the struct member passed.

Avoid casting to non-const types when only reading.
2019-03-12 17:44:35 +11:00
d8daeeb930 UI: Avoid redundant text argument to UnifiedPaintPanel methods
Now when the text argument is omitted, use the default name
matching how regular properties work.

Avoids passing in the same name which RNA has,
matches UILayout.prop behavior.

Also use keyword only for optional arguments.
2019-03-12 16:31:02 +11:00
5234ced102 RNA: support None text argument to UI functions
Without this there isn't a convenient way to write wrapper UI functions
that forward a text argument that optionally uses the default text.
2019-03-12 16:31:02 +11:00
819c00483d Cleanup: use UnifiedPaintPanel for context menu 2019-03-12 15:32:20 +11:00
ee01b660eb Fix use of uninitialized stack memory
The matrix multiply uses x,y values so both must be initialized.
2019-03-12 15:31:54 +11:00
022ad41670 DRW: use object color from instancer
Otherwise it's impossible to set the color of instanced library objects.

Follows convention of instancer controlling draw options.
2019-03-12 12:28:01 +11:00
6b39dc7672 Fix T61531: can't select same material in multi edit mode
D4441 by @zazizizou w/ edits.
2019-03-12 12:08:24 +11:00
3017d88aec Cleanup: rename specials -> context_menu
In keeping with convention to match code & UI naming.

- No user visible changes.
- Include 'menu' in the name since context is an overloaded term.
- While a few of these are panels, from a user perspective they are
  still context menus.
2019-03-12 11:05:28 +11:00
e6eb7b9cce Tools: Only show cursor tool in wpaint mode when a pose object exists 2019-03-12 10:54:39 +11:00
bf1a3fee7c UI: Restore orient/pivot UI for wpaint & pose mode
This was removed since 2.7x (by accident?)
2019-03-12 10:46:31 +11:00
2ba35ea7c2 GPU: Avoid access violation while reading the pass->shader. 2019-03-11 20:32:31 -03:00
6ad91be5d7 Fix overlay pose panel context check
Displayed pose options when weight-paint armature wasn't in pose mode.
2019-03-12 10:28:38 +11:00
a71891085d Context: add pose_object
Needed for UI scripts to detect mixed weight paint + pose mode.
2019-03-12 10:22:53 +11:00
26216332b8 UI: Remove Sculpt Direction from context menu
It didn't work well in here - the menu would close and re-spawn as you hovered over this control.
2019-03-11 23:47:24 +01:00
5ae8b1da02 Fix wrong memory handling in own rB93633efe69ca.
`BLO_library_read_struct()` actually takes care for us of nearly
everything, makes things much simpler...
2019-03-11 23:37:54 +01:00
cb14138b5a UI: Remove incorrect usage of ellipses in menus
We only use ellipses when a popup appears, not for regular submenus.
2019-03-11 23:33:13 +01:00
0f20696846 Icons: Add Links Cut icon to Node Editor, plus other tweaks
- Tweaks to Paint Mode Fill and Sample tool icons
- Tweaks to GP Add Primitive icons
2019-03-11 23:22:41 +01:00
34781e06b7 UI: correct context menu edge selection check 2019-03-12 08:22:38 +11:00
fd76b8d825 Cleanup: style 2019-03-12 08:21:13 +11:00
815a9df70c Cleanup: trailing space 2019-03-12 08:16:55 +11:00
8add03c3b9 UI: correct typo
Also odd parenthesis.
2019-03-12 08:08:48 +11:00
d7e7e9af02 Add WorkSpace to list of ID types that are not supported by standard copy mechanism for now.
Am not sure whether we want to support that at some point, but at least
if we don’t, make it safe and get out of copy code early, previously
trying to duplicate workspace through BKE_id_copy() would have given a
very bad a broken result...
2019-03-11 20:45:24 +01:00
057117de78 GPencil: Add support to display the material name in selected strokes
2D artists have requested a way to see in viewport the name of the material assigned to a stroke. This is a special request for 2D animation and required to manage complex drawings with multiple materials on it. We don't need add a separate option for this in the panel.

Now, when enable Name option in the Viewport Display panel, when you select a stroke in edit mode, the name of the material is displayed near the first point selected.

Design reviewed by @mendio and @pepeland
2019-03-11 17:42:45 +01:00
84cb5f3b5c GPencil: Add visual feedback for darwing in Bound mode
As the final stroke is not visible in Bound mode, at least display the current stroke while drawing to get a visual hint of what are you doing.
2019-03-11 17:27:14 +01:00
c49f407f7b UI: Add back frame operators to GPencil Draw and Sculpt mode contextual menus
Maniphest Task: T62130
2019-03-11 17:25:10 +01:00
958f34dd03 GPencil: Add support for Bound Box
The bound box was not calculated for grease pencil objects.
2019-03-11 17:13:51 +01:00
93633efe69 Fix (unreported) broken ID previews reading.
Recent changes to blendfile reading adding deferred reading of actual
data broke it, we cannot use the nifty `bhead + 1` to access data
anymore, since there is no guaranty that that block hass been fully
read.

Note that there is still one case in `read_file_thumbnail()`, however
loading of blendfile preview itself seems to be working fine... Maybe
@campbellbarton can double check that point (or knows of hands whether
it is OK there)?
2019-03-11 17:08:30 +01:00
1bc8ddbc6c Fix T62310: Batch generate data-block previews broken.
Some uninitialized colormanagement data was breaking RNA acces for them,
exposed in batch preview management when generating previews for scenes
because we have to backup/restore scene and all its settings
before/after rendering it...
2019-03-11 17:08:30 +01:00
19af5bd57e Fix: Remove unnecessary check in previous commit 2019-03-11 16:51:04 +01:00
01dec326ed Fix T62366: Grease pencil material color keying
Do proper tagging for material changes, and avoid grease-pencil hack
in the relations builder.

The dependency graph code was forcing animation to be run for any
copy-on-write change of material. However, animation is not supposed
to be run on copy-on-write changes.
2019-03-11 16:49:52 +01:00
4879d8001c Add missing Add Face and Fill commands to Edit Mode Edge contextual menu 2019-03-11 16:48:39 +01:00
3c81572e3d UI: Move UV Editor Cursor Position to sidebar
Consistent with the 3D View
2019-03-11 16:37:57 +01:00
Pablo Vazquez
17f4fe05fc UI: Use 'None' instead of 'No' for cache compression method. 2019-03-11 16:35:58 +01:00
251c3e9a81 Sculpt: Fix undo when shape keys are used
Can not use undo node's total vertices count, it only contains
single PBVH node vertex count. Need to pass an entire key block
number of vertices.
2019-03-11 16:31:01 +01:00
005084ef62 GPU: Make the creation of opengl shaders more stable.
This commit possibly fixes the T58938.
The crash happens when a shader that is created in a rendering context is deleted and another shader with the same name/program of the deleted one is created in the same context and used in another context.
2019-03-11 12:23:04 -03:00
2703c405a4 UI: Add missing transform operators to Transform menu
- Consistent with other editors and modes
- Allows users to discover G R S keys

Maniphest task: T61556
2019-03-11 16:18:34 +01:00
81d5f15a2a Fix T61253: Wrong syntax highlighting when @ is used as multiplication
This is obviously not a perfect solution. However, to do proper
highlighting a more advanced Python parser would be necessary.
I think this patch implements a good heuristic to differentiate
between the cases when `@` is used for a decorator vs for
multiplication.

When `@` is directly followed by an identifier, it is interpreted
as decorated. Otherwise not.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4495
2019-03-11 16:15:46 +01:00
a65b068f6e UI: Add missing All Transform to Object > Apply menu
Reported on Devtalk
2019-03-11 16:12:29 +01:00
836f3494d7 Fix T62059: Driver not updating in Color Ramp
Reviewers: sergey

Differential Revision: https://developer.blender.org/D4497
2019-03-11 16:10:22 +01:00
89840b5917 Fix T62423: Wrong sculpting with shape keys and modifiers
Need to use original mesh to get virtual modifiers list, otherwise
key datablocks will not be properly taken into account (since evaluated
mesh doesn't have key datablock).
2019-03-11 16:09:34 +01:00
cd32acefec UI: Add brush controls to contextual menu for GPencil Draw and Sculpt modes
Maniphest task: T62130
2019-03-11 15:51:54 +01:00
1f8738a398 Fix T59928: 'Radius' option does nothing when adding light probe 2019-03-11 15:36:25 +01:00
422d4541f4 Depsgraph: Add missing parameters for node trees
This allows to have drivers on node trees.

Probably now it will be better to simply add parameters for any
ID node, to avoid such amount of manual work.

Initial idea was to not have nodes if it's not needed to avoid
any possible overhead. Having more robust system is probably more
valuable. We can always optimize overhead in one way or another.
2019-03-11 15:33:57 +01:00
2ed0f08106 UI: Add brush controls to contextual menus for Texture Paint, Vertex Paint, Sculpt Mode
Maniphest task: T62130
2019-03-11 15:01:07 +01:00
4302342287 Fix T62359: Flip colors for Fill Tool missing
Reviewers: brecht

Maniphest Tasks: T62359

Differential Revision: https://developer.blender.org/D4486
2019-03-11 14:36:22 +01:00
f608964549 Merge branch 'blender2.7' 2019-03-11 14:34:17 +01:00
403ae48063 UV editor: automatically show image assigned to active face.
When manually selecting a different image, this image will become pinned and
continue to show. The material node is not automatically modified as it was in
old Blender versions, only the image displayed in the UV editor.

Fixes T61239: confusing behavior when unwrapping non-square images. By showing
the relevant image by default it's more clear why it does aspect correction.
2019-03-11 14:34:13 +01:00
b5349d967f Fix T60855: workspace duplicate does not preserve addons filters. 2019-03-11 14:34:13 +01:00
57777b9542 Fix T61906: crash rendering softbody with Cycles and timeline visible.
Make sure we don't reallocate arrays in the pointcache when not needed, the
size of a memory allocation can be slightly bigger than the requested size.

Also, use consistent check for shared cached in copy and free functions.
2019-03-11 14:34:13 +01:00
2cb181d478 Cleanup: fix warning about unused parameter. 2019-03-11 14:34:13 +01:00
cbc8ffa601 UI: Add brush controls to contextual menu in Weight Paint mode
Maniphest task: T62130
2019-03-11 14:34:07 +01:00
2c8bd1d8cb Fix T61053: crash baking to float image after file save.
This is the wrong flag to check, no other code actually reads it.
2019-03-11 14:31:59 +01:00
56a633fd2c Fix T61103: Cycles bevel wrong on objects with negative scale. 2019-03-11 14:26:06 +01:00
6503b4f90f Fix T61831: Denoising Clean pass not scaled correctly with samples. 2019-03-11 14:26:06 +01:00
9f4ec02bb4 View3D: Fix object without bounds displaying bounding boxes 2019-03-11 14:16:51 +01:00
0142c825b5 View3D: Fix Empties displaying bounding boxes 2019-03-11 14:03:31 +01:00
729a1ab6a0 Despgraph: Make dupli objects inherit the parent's display type
Fix T61152 Instanced Collections Don't Honor Viewport Display Setting
2019-03-11 14:03:31 +01:00
d5a024c72d Tools: Add Selection tools to Texture Paint toolbar when Face Selection is enabled.
Consistent with the other paint modes.
2019-03-11 13:45:15 +01:00
a808b58e07 Eevee: Update LTC code
Main change are:
- the fresnel LUT is separated from the main GGX LUT.
- LUTs use sqrt(1.0 - NV) as roughness remapping. Improving precision and
  removes needs for acos().
- LTC LUT is normalized by matrix middle component. Improving precision.
2019-03-11 13:12:48 +01:00
881782213d Merge branch 'blender2.7' 2019-03-11 11:31:17 +01:00
0152bf2edf Color management: Fix/workaround broken getDefaultDisplay()
This is something what is caused by OCIO library. The patch
has been submitted there:

  https://github.com/imageworks/OpenColorIO/pull/638

For until it is refined and checked we do workaround from
our side.
2019-03-11 11:27:04 +01:00
c603a755bd Color management: Query default view from display
Solves weird situation when default display name is queried
from OCIO, but Default view being assumed to be set for it.

Now view is initialized to a default view of that display.
2019-03-11 11:26:51 +01:00
a4958aa8cc GPencil: Fix unreported problem with input samples
The parameter was not working because it ws testing for guides only.
2019-03-11 11:12:32 +01:00
5be35ad7c9 GPencil: Cleanup comment text 2019-03-11 10:44:56 +01:00
0889fea790 GPencil: Fix unreported UV error when use subdivide modifier
When the subdivide modifier was used, the UV was not recalculated and the texture of the stroke was wrong.
2019-03-11 10:42:39 +01:00
6fd11a21f5 Fix T62255: Blender defaults to "OpenAL Soft" in sound settings, regardless of saved preferences
- Default device (index 0) was hard coded.
- Also fixing crash with invalid device passed to blender via -setaudio.
2019-03-10 23:28:51 +01:00
1cc8f9d463 Fix T62393: Materials made from 'Make Single User' have linked animation.
`id_single_user()` was still code from older ID management, now we can
use modern code to handle animdata duplication for us (which allows to
keep handling of nasty sub-data ID horrors like nodtrees in a single
place, much safer and simpler).
2019-03-10 15:23:59 +01:00
81a7f6c848 Fix T62125: snapping not working if invisible object is between you and the target
If we were not in x-ray/wireframe mode, the snapping would treat all
objects like they were in solid mode. This were not desirable if you
had objects that were in wire or bounding box display mode.

Now objects that are in bounding box mode is ignored (unless the object
is in edit mode) and objects with wire display mode is treated as if
they were in x-ray mode.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4493
2019-03-10 12:06:55 +01:00
81958a1393 GPencil: Fix user count for autocreated materials
The user count was 2 when the value must be 1.
2019-03-10 11:18:52 +01:00
b7bcc30329 GPencil: Set brush material after copying a material
This change updates the brush material in the topbar when a new material is created using copy button.

Related to task T62384

Thanks to @matc for suggesting the fix.

Still pending a problem whith user number.
2019-03-10 08:55:38 +01:00
9ad156374f Fix T60171: Hair Particles Not Displaying in Viewport
This patch fixes T60171 by adding a dummy read from the `dummy` vertex attribute to `hair_get_pos_tan_binor_time` in `common_hair_lib.glsl`. Confirmed to work on my machine (macOS 10.14.4 Beta, Radeon R​9 M295X).

According to my experiments regarding this issue, the problem is triggered when all of the following conditions are met: (a) the shader has no vertex reads; (b) the index buffer is ≥ 256KiB. I can't really give an explanation of this misbehavior because of the video driver's closed-source nature.

Reviewers: fclem

Reviewed By: fclem

Subscribers: zeddb

Maniphest Tasks: T60171

Differential Revision: https://developer.blender.org/D4490
2019-03-10 03:57:27 +01:00
d77b7b097d Fix T58890: Sculpt Mode not updating in LookDev or Rendered
This fix is a hack and will slow down update performance. But at least,
all shading features are supported. This is only in "normal" sculpt mode
(no dyntopo, no multires).
2019-03-10 03:35:53 +01:00
Julian Eisel
4041249943 Merge branch 'blender2.7'
Conflicts:
	intern/cycles/blender/addon/properties.py
	intern/cycles/device/opencl/opencl_split.cpp
2019-03-09 17:19:52 +01:00
Julian Eisel
0a28bb1422 Fix stashed full-screens returning to wrong layout
Steps to reproduce were:
* Maximize area (Shift+Spacebar in 2.7, Ctrl+Spacebar in 2.8)
* Open temp file browser (Ctrl+O)
* Cancel file browser (Esc) - should return to previous full-screen
* Press "Return to Previous" button
The previously maximized area would turn into a file-browser.

Note that the issue will still happen when opening old files saved while
in maximized area full-screen.
2019-03-09 16:58:13 +01:00
ba4d07cc5c GPencil: Material panel is hidden after adding new material
This bug was introduced by previous Pin fix commit. Maybe it's not the best solution, but this bug is critical and need a quick fix.

This commit fix the problem, but not totally sure this is working fine with pin.

@dfelinto Could you review and adapt if required.
2019-03-09 16:50:10 +01:00
9c43520010 GPU Extension: Add OS defines
This makes possible to have os specific workaround inside the shaders.
2019-03-09 16:43:05 +01:00
Julian Eisel
7e5d1a9560 Fix T57655: Crash opening 2.79 file saved with maximized area
During screen to workspace/workspace-layout conversion, the first layout
of each workspace would be activated. For temporary full-screens, this
used to be the full-screen layout (IIRC), apparently it's now the
the layout to return to on "Back to Previous". So the 'previous' layout
would be activated, not the full-screen one.
When actually pressing "Back to Previous" now, the operator would first
free the active layout (which it assumes to be the temp full-screen -
wrongly in this case) and then try to activate the non-full-screen one,
causing use-after-free.
2019-03-09 13:11:00 +01:00
36cd31060b Fix T62104: VertexGroup.add() doesn't push depsgraph update for the mesh.
When adding and removing weights from the python api, no depsgraph
updates were triggered.  This would cause the mesh geometry to be out of
sync in the viewport if there were any modifiers that used the vertex
groups in question.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4439
2019-03-09 11:45:31 +01:00
fede272d2c Fix T61737: Gizmo refresh issue
When using a transform.select_orientation keyboard shortcut, the
orientation change would not update the viewport.
So if you had the move gizmo visible, it would not change transform
orientation.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4386
2019-03-09 11:41:04 +01:00
9fdbffb4b2 Fix T62162: Bones set to unselectable can be fully selected through the viewport in edit mode.
Bone selectability in edit mode now matches the behavior of pose mode
(can no longer be selected).

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4469
2019-03-09 11:35:13 +01:00
Dalai Felinto
a0f2923fd8 Fix active workspace changes when deleting workspace
Tested for multi-window as well, which failed with the previous code even
before we introduced ordered workspaces.
2019-03-08 18:52:32 -03:00
Dalai Felinto
aa49444c29 Fix crash when deleting workspaces too fast
Delete workspaces via the menu was not refreshing the workspace tabs
drawing. This way if you deleted the non-active workspace  with the "e" shortcut
from the workspace tab context menu and clicked on the workspace tabs again, it
would crash.

A few notes:
* Deleting a non-active workspace is changing which workspace is then active,
  which is really strange.

* Even when deleting the active workspace which workspace then becomes active
  seems random.

* Using notifiers (ND_WORKSPACE_DELETE) to delete the workspace seems rather
abusing notifiers in my humble opinion.

This is not an important bugfix anyways, people probably would rarely
run into this. I just ran into it while investigating another bug.
2019-03-08 18:52:32 -03:00
Dalai Felinto
2ada9c5bc8 Final fix for greasepencil materials assign/select/deselect in edit mode 2019-03-08 16:48:19 -03:00
Dalai Felinto
4ccaf56814 Fix T62349: Grease Pencil top material list not working
This is a fixup for my own: 92d185faeb.
I'm also fixing the poll of the EEVEE_MATERIAL_PT_context_material
which would fail when we had no context.material available.
2019-03-08 15:36:31 -03:00
cee7c36cbd Depsgraph: Fix missing relation when driving image offset
Related on T61937.
2019-03-08 18:13:26 +01:00
457ecc6825 Partially revert "Collection duplication from Outliner: add a 'duplicate hierarchy' operation."
This partially reverts commit a77feabb51,
removing the shallow 'duplicate hierarchy' option from outliner.

Core changes from that commit in BKE_collections are kept.
2019-03-08 17:53:31 +01:00
13978f7ff6 Followup to T62318: Fix on-the-fly that kind of .blend file cddata corruption.
Remove cddata layers which are not supposed to be written in .blend file,
when reading it.

This is a cheap and simple check, which also gives us forward compatibility
in case we decide some day to make a currently un-written layer type
to be written in .blend files.
2019-03-08 17:53:31 +01:00
18d470e5e4 Fix T62318: Blender crash whith 'corrupt' customdata (CD_BWEIGHT).
Mistake in rBab0bc65c24bd, in conversion of static 'common' sets of
masks, BWEIGHT slipped in CD_MASK_MESH (probably from copy/paste from
CD_MASK BAREMESH).

Note that having it in CD_MASK_BAREMESH but not CD_MASK_MESH looks rather
counter-intuitive, but this is not the time for that kind of cleanup.

Went over whole conversion again, and found two other mistakes, should
really have recheck that before committing...
2019-03-08 17:53:31 +01:00
8730984c70 Fix (unreported) datatransfer code could still modify source mesh in some cases.
Source (i.e. other) mesh should not be modified in any case in modifier
evaluation case (this is forbidden by design and can lead to all kind of
threaded locks and crashes), and doing so even in operator case was
never a good idea either.

Now that we can specifically request needed data (poly and/or loop
normals) from evaluation code, we can finally get rid of those
computations inside data transfer/mesh remapping area.

This is hopefully the last remaining bit of this 'bad crashing code' in
datatransfer area.
2019-03-08 17:53:31 +01:00
cdba2bc0fc BKE mesh remap: add utils to add needed cddata mask for source mesh.
In some cases (currently, only when using avanced mapping of loops),
code needs access to some cddata of the source mesh (CD_NORMAL...).

We need a way to inform calling code about that (actual issue requiring
this change is fixed in next commit).
2019-03-08 17:53:31 +01:00
2a40c6ee2b Modifier eval: add support for request poly normals layer.
Ensure we do get poly normals if they are requested in given cddata mask.
2019-03-08 17:53:31 +01:00
a8acf31181 Fix potential bad behavior, and cleanup/refactor a bit BKE_mesh_ensure_normals_for_display().
This is merely making behaviors of this function a bit more explicit,
and avoid re-adding another CD_NORMAL layer to polys in the (unlikely)
case it would already have one.

It also handles CD_MASK_NORMAL in cd_dirty_poly, but this is more like
future-proof thing, this is not used anywhere currently afaik.
2019-03-08 17:53:31 +01:00
83ca280d15 Fix T59407: remove outdated right click select info in readme, other updates. 2019-03-08 17:37:32 +01:00
bfebb494f6 Fix T61961; Smooth brush distorts multires
The issue was caused by lack of proper accumulation for
averaging. Doing it incrementally introduced a bias.
2019-03-08 17:02:22 +01:00
aac7d53d58 GPencil: Add basic edit support for Hook and Array modifier
These modifiers were not included in previous commit.
2019-03-08 16:36:11 +01:00
02a7e875d7 Cycles OpenCL: Remove single program
Part of the cleanup of the OpenCL codebase.
Single program is not effective when using OpenCL, it is slower
to compile and slower during rendering (when used in for example
`barbershop` or `victor`).

Reviewers: brecht, #cycles

Maniphest Tasks: T62267

Differential Revision: https://developer.blender.org/D4481
2019-03-08 16:31:35 +01:00
e64f6e0e4c Cleanup: Spelling in comment 2019-03-08 16:21:04 +01:00
7d3979884c GPencil: Make visible Armature modifier in edit mode
This change displays the stroke in the deformed position, but the edition is done in rest position.

This is no the final solution, but at least we have some visual feedback in edit mode.

The real solution is to create a full system to manage derived strokes in Edit mode, but this needs a lot of work and we haven't resources now to do it.
2019-03-08 16:09:20 +01:00
Pablo Vazquez
5c630f8256 UI: Rename 'Use Lib Path' to 'Use Library Path' in particle settings.
Also align items in the column since they work together.
2019-03-08 15:50:43 +01:00
50a8a95ce3 Fix T60086: missing update when removing fcurves from Python API. 2019-03-08 15:41:03 +01:00
Pablo Vazquez
4831dd5f38 UI: Naming and tooltip for the new high-resolution smoke simplify setting.
* Rename "Use Smoke Highres" to "Use High-resolution Smoke"
* Use 'Display' instead of 'Draw', following the naming conventions in 2.8
* Drop the 'Use' prefix in the UI, a "High-resolution Smoke' checkbox sufficiently communicates what it does.
2019-03-08 15:30:51 +01:00
fee0593f35 cmake/windows: Set LLVM_INCLUDE_DIRS variable. 2019-03-08 07:19:48 -07:00
cfd23f014a build_environment/Windows: Copy llvm debug headers.
llvm generates some header files at build time that differ between
debug/release causing linker errors when you used the release headers
for a debug build.
2019-03-08 07:19:48 -07:00
12a32d1bf1 Codestyle: comments 2019-03-08 07:19:48 -07:00
7ecbf9b409 cmake/windows: Set LLVM_INCLUDE_DIRS variable. 2019-03-08 07:18:17 -07:00
285577a378 build_environment/Windows: Copy llvm debug headers.
llvm generates some header files at build time that differ between
debug/release causing linker errors when you used the release headers
for a debug build.
2019-03-08 07:18:17 -07:00
35e33b7451 Cleanup: remove debug prints. 2019-03-08 15:16:08 +01:00
89fa6a7a06 Fix T60900, T61111, T61963: node values stuck after clearing keyframes.
This removes special dependency graph code that was intended to avoid GPU
shader recompiles by preserving the node tree and GPU material in specific
cases. This is no longer needed now that we have a general shader pass
cache that compares the generated shader code. The GPU material is already
being freed in material and world eval as well, so there's no point.

Note also that GPU materials are now safe to free from threads, actual
OpenGL buffer freeing happens delayed.
2019-03-08 15:16:08 +01:00
6cab5abbc3 Tools: Re-order Weight Paint toolbar
-Group gradient with the other paint tools
-Nest the two Sample tools together
-Keep painting tools first, secondary tools after
-Make sure toolbar doesn't jump when selection is enabled
2019-03-08 15:07:18 +01:00
6752022310 Fix T62327: Multires with Particles: Undo not working
Modifier stack was forced to be re-evaluated when it was not
supposed to. Should also improve sculpt performance.
2019-03-08 14:38:28 +01:00
a749d7d8fa Fix T59304: boolean modifier does not preserve UV textures.
In the old derivedmesh function it was merging customdata layers, added
that back for mesh conversion too.
2019-03-08 14:19:45 +01:00
da73f56917 Fix T62355: Running blender 2.80 headless broken in recent builds 2019-03-08 14:32:04 +01:00
a3ae53b99e Bevel: revert idea of always starting in offset mode.
Commit 208fafb to fix bevel tool units included a change to always
start modal in offset mode. This was may or may not be right but
broke a way in which users could set percent mode and then subsequently
start a modal that bevels in that mode. So going back to old way.
2019-03-08 07:47:25 -05:00
af53c3b135 Fix crash reloading images used in compositor node
Similar to what Brecht committed in
38f0d5f75a.
2019-03-08 13:43:12 +01:00
0d395ebb6c Icons: Desktop icons update for Mac
Previous desktop icon was clipped on one side, and file icon used cropped icon.
2019-03-08 13:23:59 +01:00
f4d2144960 Icons: Add GPencil Extrude and Radius icons (take 2)
Also, revision of icons for paint modes, based on suggestions by Aslam Cader.

Previous commit accidentally included an extra file.
2019-03-08 13:11:23 +01:00
1b31859243 Revert "Icons: Add GPencil Extrude and Radius icons"
This reverts commit a44d75a964.
2019-03-08 13:07:20 +01:00
a44d75a964 Icons: Add GPencil Extrude and Radius icons
Also, revision of icons for paint modes, based on suggestions by Aslam Cader.
2019-03-08 13:02:46 +01:00
49b9b159e4 Fix T62317: missing Cycles viewport update when changing active camera. 2019-03-08 12:11:42 +01:00
cf09a2443c Fix T60978: crash toggling window fullscreen on macOS.
GHOST event handling does not need a window in the context, and restoring
it to the previous value is problematic if the window was deleted in the
meantime.
2019-03-08 10:24:59 +01:00
1caa5b14bf Cleanup: remove unused test break code for handling cancels. 2019-03-08 10:24:59 +01:00
76442e676e Codestyle: comments 2019-03-08 08:56:16 +01:00
252e0d35ee GPencil: Fix field type error in initialization 2019-03-08 08:49:25 +01:00
eb8e656b2b Cleanup: spelling 2019-03-08 17:48:49 +11:00
4185b3e36d Cleanup: style 2019-03-08 17:16:30 +11:00
a9f0f48f7b Cleanup: use doxy sections for node select API 2019-03-08 17:03:49 +11:00
87b3ea1cbc Cleanup: use doxy sections for mask select API 2019-03-08 16:22:38 +11:00
2a1e3db3c9 Cleanup: use doxy sections for object select API 2019-03-08 15:56:55 +11:00
6db49261cc Cleanup: make modal event double click handling more straightforward 2019-03-08 14:19:27 +11:00
96af595f63 WM: fix double click handling in modal keymaps
Model keymaps wasn't matching double-click events with press
as is done in regular keymap handling.
2019-03-08 13:35:48 +11:00
0ba143a1d6 Fix T62095: OpenGL render camera image alignment 2019-03-08 12:37:22 +11:00
a3906edcaf Fix: Info window select all toggle broken
D4477 by @Poulpator
2019-03-08 11:55:52 +11:00
e9373495a9 Cleanup: use macro for listbase collection begin functions 2019-03-08 11:40:37 +11:00
5af85d904e RNA: rename bpy.data.grease_pencil to grease_pencils
All other sequences are plural here.
2019-03-08 09:55:40 +11:00
8f817de0cb Cleanup: use plural names for Main lists
Convention was not to but after discussion on 918941483f we agree its
best to change the convention.

Names now mostly follow RNA.

Some exceptions:

- Use 'nodetrees' instead of 'nodegroups'
  since the struct is called NodeTree.
- Use 'gpencils' instead of 'grease_pencil'
  since 'gpencil' is a common abbreviation in the C code.

Other exceptions:

- Leave 'wm' as it's a list of one.
- Leave 'ipo' as is for versioning.
2019-03-08 09:50:00 +11:00
e68ac2827d fix D4476 collada exporter: in Blender 2.80 we no longer have a specular color.
Specularity is not a color but a factor.
I have replaced the original export code with
a correct export of the Specularity factor.
2019-03-07 23:26:10 +01:00
Dalai Felinto
92d185faeb Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.

Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.

This would lead to all sort of pinning problems:

* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.

* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.

* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.

I also sanitized the name of the panels, their inheritance and poll
functions.

Reviewers: antoniov, brecht

Subscribers: billrey

Differential Revision: https://developer.blender.org/D4470
2019-03-07 20:28:25 +00:00
81a09628c2 GPencil: Update stroke when UV factor is changed
The stroke was updated only after doing a refresh operation.
2019-03-07 20:04:14 +01:00
8ef460ddab Fix T62319: changing keyframe properties does not trigger update
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4473
2019-03-07 19:57:08 +01:00
a261d6f2d3 Fix T62328, T62209: revert recent fix for texture slots updates (T60366).
This causes other issues, revert for now until a better fix is found.
Reverts commit da1323d1c9.
2019-03-07 19:41:05 +01:00
8ca43a0c7b Cleanup: remove unused parameter. 2019-03-07 19:41:02 +01:00
99ac2dea35 Cleanup: fix compiler warnings. 2019-03-07 19:41:02 +01:00
b38b0cdb0d Fix T62305: Unconnected group vector inputs are mapped incorrectly
The issue was that `bNodeSocketValueVector` and `bNodeSocketValueRGBA`
don't store the value at the same location in the struct.

I kept the cases for `SOCK_VECTOR` and `SOCK_RGBA` completely separate
for now, because they only share code by coincidence and not because
they are actually the same. Eventually there could be a "Vector Input"
node similar to the "RGB" node.

Reviewers: fclem

Differential Revision: https://developer.blender.org/D4472
2019-03-07 18:03:58 +01:00
1eea4b2634 Fix T62316: Grease Pencil objects display in front of the grid lines
The fix was move the grease pencil engine before overlays

This also fix the origin not visible bug T62100

There is a limitation of this fix, but we cannot fix both problems. If you have object behind a transparent graese pencil objects, this objects will not be visible.

Thanks @fclem for his advices to fix this bug.
2019-03-07 17:53:25 +01:00
65f15e972e Cleanup: remove redundant check 2019-03-08 02:47:00 +11:00
3a813622e1 Cleanp: use static sets 2019-03-08 02:43:33 +11:00
cf38b08f52 Fix gizmos not responding to theme color updates
Re-create gizmos when changing theme colors, since
theme colors don't change often this allows gizmos to setup their
colors on initialization.
2019-03-08 02:39:40 +11:00
605749ffaa Modifiers Evaluation: generate loop normals when requested.
This also fixes T62228.

However, datatransfer code is still doing bad things with its source,
still working on proper changes here.
2019-03-07 16:25:25 +01:00
75dad2a04b Multires: Fix crash on exit when sculpting with modifiers
The SubdivCCG structure was re-allocated, but the cached one in
the sculpt session was still pointing to an original one.

This is rather a workaround, but is least evil from what i can
currently think. Remember something similar was also required in
2.7 as well.

Definitely need to revision this change.
2019-03-07 16:09:15 +01:00
9e1d113570 Sculpt; Fix memory leak on redraw normals update 2019-03-07 16:09:15 +01:00
967d82d9b9 Fix T62271: Particles with multires crash on sculpt
In fact, any modifier on top of multires would lead to crash.
Was missing pointer update.

Basically, bring the control flow closer to 2.7.
2019-03-07 16:09:15 +01:00
594f2b8016 Fix T61671: Too strong too dark text shadow in Blender Light theme
Reviewers: pablovazquez

Differential Revision: https://developer.blender.org/D4468
2019-03-07 15:55:59 +01:00
b3d638087d Fix T61761: Randomize Transform is an object mode operator
Reviewers: brecht, billreynish

Differential Revision: https://developer.blender.org/D4467
2019-03-07 15:55:59 +01:00
ed24315c63 UI: Change UI name of Draw Labels to Include Labels
For compliance with recent naming conventions.
2019-03-07 15:07:16 +01:00
6837474ae8 UI: Use sub-panels inside Grease Pencil Onion Skinning panel
Reviewers: Antonio Vazquez (antoniov)

Differential Revision: D4465
2019-03-07 14:57:21 +01:00
90f4ff95ed Image: use sample size instead of radius
It wasn't possible to sample a 2x2 region.
2019-03-08 00:43:20 +11:00
1b49c7fdd1 Cleanup: redundant select flush 2019-03-08 00:17:52 +11:00
1901595898 Tool System: use set/add/subtract for all lasso select operators 2019-03-07 23:45:58 +11:00
a280867ac2 Fix T62289: crash with texture paint slots and missing node group datablock. 2019-03-07 12:23:52 +01:00
af50099b83 Multires: Fiux memory leak
The work data for materials flags was never freed.
2019-03-07 12:16:50 +01:00
d617466d87 Refactor building the draw string for floats and ints
Differential Revision: https://developer.blender.org/D4466
2019-03-07 12:02:27 +01:00
e25cdac24b Fix T62280: driver functions added in load_post broken after recent changes.
Evaluate the dependency graph a bit later still. This kind of worked before
because it was using the drive namespace from the previously loaded .blend
file but that's of course wrong.
2019-03-07 11:55:48 +01:00
f3c6b0bf4f I18n: Enable Thai language. 2019-03-07 11:45:48 +01:00
ab0bc65c24 Refactor CDData masks, to have one mask per mesh elem type.
We already have different storages for cddata of verts, edges etc.,
'simply' do the same for the mask flags we use all around Blender code
to request some data, or limit some operation to some layers, etc.

Reason we need this is that some cddata types (like Normals) are
actually shared between verts/polys/loops, and we don’t want to generate
clnors everytime we request vnors!

As a side note, this also does final fix to T59338, which was the
trigger for this patch (need to request computed loop normals for
another mesh than evaluated one).

Reviewers: brecht, campbellbarton, sergey

Differential Revision: https://developer.blender.org/D4407
2019-03-07 11:29:50 +01:00
cee53160d2 Tools: Add Radius tool to Grease Pencil toolbar
Icon pending.
2019-03-07 11:12:30 +01:00
aef3eff5aa Cleanup: de-duplicate selection keymap templates 2019-03-07 20:53:53 +11:00
219e2f976d Tool System: use set/add/subtract for all box select operators 2019-03-07 20:34:10 +11:00
e52e0c83d7 UI: Re-order toolbar in Curve Edit mode
Makes it more consistent with Mesh Edit mode, and uses same logic for grouping.
2019-03-07 09:58:56 +01:00
48e48653c2 Tool System: add radius option to the image sample tool 2019-03-07 18:03:40 +11:00
5669e95447 Cleanup: use macros to avoid repetition 2019-03-07 14:18:13 +11:00
254f2e7390 Tool System: add annotation tool to image editor
Also add place-holder measure tool.
2019-03-07 14:09:28 +11:00
e866fb7b77 Fix crash transforming image cursor outside of edit-mode 2019-03-07 14:09:28 +11:00
97b1739cf1 Fix T62066: Seg Fault Baking Light Cache with "--background" Flag 2019-03-07 03:51:00 +01:00
dabf593163 Fix T59877: EEVEE: Object Info node random value does not work with Duplis 2019-03-07 03:33:24 +01:00
fbfdfcb947 DRW: Fix hair OSX workaround having a cap limit
This is still is a dirty workaround.

Note that we are drawing the whole sets of point multiple times. While this
is ineficient, the main bottleneck is CPU transformation.
2019-03-07 03:22:57 +01:00
6d33308a8d Cleanup: use API to reset cursor rotation 2019-03-07 12:58:11 +11:00
a9241c41e1 Cleanup: class name 2019-03-07 12:53:45 +11:00
f383537280 UI: rename "Camera Lock" to "View Lock"
Only 1 of the options in this panel apply to cameras.
2019-03-07 12:46:17 +11:00
d43ce78114 3D View: view selected/all use empty object center
Empty object skipping now only skips the bounds, since you can select
the empty by it's center point and want to navigate to it.

Also share object skipping check between view all/selected.
2019-03-07 12:40:43 +11:00
a6f7d64ce6 Fix "View All" potential min/max use when all objects were skipped 2019-03-07 12:32:22 +11:00
951c8e53f4 Fix 3D "View Selected" skip camera option 2019-03-07 12:22:56 +11:00
d21809dd72 3D View: skip hidden image empties when viewing all
D4463 by @pablodp606
2019-03-07 11:41:33 +11:00
a3d647558e DRW: show image empty frame when the 'side' is hidden
This behavior matches back-face culled mesh objects,
where the wire outline doesn't depend on the viewing angle.

Applying this before empty visibility check for view framing,
since it's strange if viewing all gives different results
depending on back-face culling.
2019-03-07 11:41:33 +11:00
e1a62fa1a6 Fix T62259: RGB Curves behave differently in Cycles and Eevee
This was due to curve being not extrapolated correctly. Also curvemap range
was not taken into account.
2019-03-07 01:38:06 +01:00
a070815d12 UI: correct label 2019-03-07 10:12:13 +11:00
de0f4ec315 Cleanup: pylint warnings 2019-03-07 10:02:25 +11:00
bc8d1feb4d Units: Fix unreported. Audio volume is not a percentage 2019-03-06 23:19:48 +01:00
b39985eddb GPencil: Fix unreported segment fault drawing with dots 2019-03-06 19:31:01 +01:00
59f30e9390 GPencil: Improve quality to stroke encaps for textured materials
Before, the caps were not generated for texture materials, now, the endcaps are generated and  adapt the texture.
2019-03-06 17:57:12 +01:00
Dalai Felinto
8eca5c3f7a Minor UI fix: Disable stereo volume alpha when stereo volume is disabled 2019-03-06 13:54:57 -03:00
Dalai Felinto
c2ff8735f5 Fix build for Linux systems
Error introduced on rBff8a2df829fcce8780d26a18f3070ab8e850b2e6.
The folders with binary icons were deleted.
2019-03-06 13:52:08 -03:00
Dalai Felinto
b94ec178a2 Fix stereoscopy convergence plane placement
Note this was broken even in 2.7x.

We had a different logic for the plane wire, as for the plane itself.
And they were both wrong when changing the camera shift or the stereo
pivot.

Both of their logic is now unified and correct.

Also I had to create a new gpu batch for the quad wires, since there is
no state that allows me to filter out the geometry, and the square gpu
batch is quite different than the quad one (2d x 3d and orientation).
2019-03-06 13:33:09 -03:00
Dalai Felinto
0ec98863e2 Fix stereo plane pass and state
This was introduced on the MSAA fix for transparent passes (61039bf713).
2019-03-06 13:33:09 -03:00
35a2edf761 Linux/X11: update icon in taskbar to match new icons.
Adds a few different resolutions for better quality when scaling up/down.
2019-03-06 17:12:11 +01:00
ff8a2df829 Linux/freedesktop: update Blender app icon based on new guidelines.
* Use only scalable SVG icon.
* Add symbolic variant for accessibility.
* Remove shadow, this is added automatically.

For more information see:
https://gitlab.gnome.org/GNOME/Initiatives/issues/2
https://developer.gnome.org/hig/stable/icon-design.html.en
2019-03-06 17:12:11 +01:00
ee099d5624 UI: Name changes
In accordance with T56648.
- Render Border -> Render Region
- Clipping Border -> Clipping Region
- Instancing 'Scale' -> 'Scale to Face Size'
- Instancing 'Rotation' -> 'Align to Vertex Normal'

Python API is left as-is, for now.

DIfferential revision: D4435
2019-03-06 16:43:37 +01:00
9d3eec785b Fix T62220: Solid shading mode - Shadow glitch
The degenerate triangle threshold was too big. Making it an equal test can
introduce problems in other cases but I could not make it fail.
2019-03-06 16:15:26 +01:00
61039bf713 Fix T62262: Light "Show Cone" & stereoscopy volumes broken by MSAA
Volume itself was working, but buggy. The issue was that transparent shapes
does not write to depth buffer. But the custom MSAA resolve shader discard
pixels that did not write to depth making them transparent.

Transparent passes should not be inside the MSAA passes, this is also
a matter of performance.
2019-03-06 15:48:35 +01:00
a77feabb51 Collection duplication from Outliner: add a 'duplicate hierarchy' operation.
Point is, you may want to duplicate your set of collections, but not
duplicate all their objects.

Some notes:
* Am rather skeptical about the practice of using operator name to
define behavior of some common exec code. Imho, that should be a single
operator with an enum to refine its behavior (@cambpellbarton may also
have an opinion here?). Left it as-is for now, because this seems to be
used by other operators too in that code. :/
* @dfelinto, @pablovazquez, @billreynish am not so happy with current
names, but cannot find really good short ones either... Also, shouldn't
we move those into a dedicated `Duplicate` sub-menu?
2019-03-06 15:19:29 +01:00
8462f0e85e Fix (unreported) broken usercount of collections after duplication.
Was missing proper flag in library_query code, collections are also
id-users of their children collections.
2019-03-06 15:19:29 +01:00
702e7bfd5c Cleanup: remove no-op BKE_collection_copy_full().
That one was an empty place-holder, BKE_collection_duplicate() is now
doing that. And its call from full scene copying is not needed
currently, 'deep copy' in that case is handled in editor's
`ED_scene_add()`.

Note that at some point, we might want to move that logic into BKE, but
for now let's keep thing as they are - working.
2019-03-06 15:19:29 +01:00
4dbf5e3a81 Fix T62613: In duplicated collections objects loses patrenting.
We need to remap duplicated IDs' ID pointers to new ones if they exist.
2019-03-06 15:19:29 +01:00
a997c9b9bc Cleanup: remove useless extra-processing after BKE_id_new_name_validate() call.
This function already handles sorting of ID in its listbase.
2019-03-06 15:19:29 +01:00
ac40cf76e5 Cleanup: use default ID type's name instead of generic 'Untitled' for new IDs. 2019-03-06 15:19:29 +01:00
173c023197 Cleanup: rename BKE_library's new_id() to BKE_id_new_name_validate().
The former was probably one of the worst function names in our whole
code base, totally misleading, and quiet often used as a variable name too.
2019-03-06 15:19:29 +01:00
208fafb285 Fix T61773 Bevel and Inset mouse sensitivity, and bevel tool units.
The mouse movement scale needed adjusting according to object scale,
since the amount is on the unscaled model but the viewport shows the
scaled one.
Also fixed proper units for amounts in bevel tool, as was already
done for modifier.  Percent should be comfortably adjustable by mouse.
2019-03-06 09:05:12 -05:00
Dalai Felinto
3fc7d51ed3 Viewport: Fix stereoscopy volume "wires" not showing
This is unreported. When using volume opacity 0.0, the wires were not visible
(nor were they in other cases, but this was the most obvious one).

The volume itself is still glitchy, and slightly worse than 2.79. I
still don't know how to fix this though. It seems a common problem
(see T62262).
2019-03-06 10:59:32 -03:00
Dalai Felinto
f1fef41863 Fix T62118: Stereo drawing options visible from camera view
Note 1: Volume drawing still draws differently than 2.7x.
Note 2: Camera lens widget still ignores stereo.
2019-03-06 10:59:32 -03:00
8f7e24710e Fix: Proportional editing menu disappears after deleting object
Differential Revision: D4460
2019-03-06 14:59:09 +01:00
872412284c Fix grease pencil sculpt circle keymap
Missed when updating circle select operators.
2019-03-07 00:35:53 +11:00
38673621a4 Missed last commit 2019-03-07 00:17:54 +11:00
92094c76a9 DNA: remove none particle brush & deprecated flags
The none brush doesn't make sense to have anymore with the tool system.

Also remove deprecated flags & types for object, armature & text.
2019-03-07 00:10:04 +11:00
ebcea3029d Merge branch 'blender2.7' 2019-03-06 13:45:21 +01:00
f08191a459 Fix Cycles build error on non-x86 processors. 2019-03-06 13:37:06 +01:00
c80415627e Fix T62223: Particle brushes disable select tools 2019-03-06 21:48:22 +11:00
37fa8b0cf9 Fix T62223: Particle select tools also show brush settings 2019-03-06 21:28:41 +11:00
ce8d6afb63 Fix T62230: Annotations corrupts GPencil brushes
Use annotations inside grease pencil drawing mode is something incompatible by design. Actually, the annotations are disabled in overlay panel for 2D template and the tool icon is not in the toolbar.

The unique way to get annotations was using D key, but this is wrong.

If you are inside drawing mode, all the events are captured by paint operator and to capture annotations, the operator must be canceled and the mode changed, but this change breaks several things.

It's not logic add annotation inside darwing mode, because you can simply add a new layer and write the text you want.

This change checks the mode and cancel the annotations if the mode is not thje right one.
2019-03-06 10:54:38 +01:00
3b1e2a4f56 Fix T62241: Repeat last translate, wrong direction
Only use orientation value when the operator uses orientation axis.

Own error in 03da3b6593
2019-03-06 18:11:26 +11:00
0294e1d27f Fix T62236: Crash texture painting
Caused by 10d9a2494f which removed 5x length clamping.
2019-03-06 16:54:07 +11:00
dd61787b25 Cleanup: unused function warning 2019-03-06 16:21:24 +11:00
ecd086ac32 Fix T62210: endless loop in kd tree lookup
Reset nodes after the first balance call.
2019-03-06 14:53:06 +11:00
f79930989d Revert "Fix T62210: endless loop in kd tree lookup"
This reverts commit 301bcf771d.

Caused crash entering particle edit mode.
2019-03-06 14:52:38 +11:00
b2889c7cf1 Fix T61917: Metaball family inherits wrong resolution by deleted object
Synchronizing values between object data is error prone (not updated on
creation or renaming), add an update to have them working as they did
in 2.79.
2019-03-06 13:40:44 +11:00
af72fc7555 DRW: Fix State tracking being off when calling GPU_framebuffer_clear
State tracking works in pretty much all cases but calling the clear command
does change the write mask outside the draw manager. For now we just reset
the write mask before each pass.

Fix T62203 The selected bone is not highlighted inside the other bone.
2019-03-06 03:38:56 +01:00
18e5540a48 Cleanup: remove redundant file argument 2019-03-06 11:18:17 +11:00
a111204ca9 WM: match select all behavior for the info space
Adds select invert to the operator.

D4454 by @Poulpator
2019-03-06 11:12:27 +11:00
85b667716a Cleanup: style 2019-03-06 10:51:11 +11:00
104d9b475d Cleanup: Use GPU_depth_test instead of glEnable/glDisable 2019-03-05 22:02:50 +01:00
6867821c4a DRW: Fix GL state issues due to state not being reset after drawing
Callbacks were drawing with the wrong blend equation and that made some
tools drawing fail.
2019-03-05 22:02:50 +01:00
dbdd79fabe UV/VCol layers creation: add option to not init those new data.
`ED_mesh_uv_texture_add()`/`ED_mesh_color_add()` would always either
copy data from current active one, or (for UVs), generate default
'valid' UVs for every face.

This commit adds an option to not do that, just keeping default values
from raw CDLayer creation. It is only used/exposed from RNA API
currently.

This is especially useful for importer add-ons, since some formats
support multiple layers of those kind, as well as 'partial' dataset not
explicitely defining values for all mesh items.

Preliminary step to fix T62224.
2019-03-05 21:34:48 +01:00
4326f8af08 File Editor: Refactor 'new dir' / renaming code.
We really do not need two 256 chars variables to hanlde renaming, a mere
pair of flags can handle the situation just as well.

Also, scroll to newly renamed item, will help when one want to find
again the directory they just added and rename.

At some point we'll probably want to refactor scrolling further (to make
it fully out of rename code/context e.g.), but for now think this will do.
2019-03-05 21:05:02 +01:00
8858311463 Fix T58715: File Browser: Creating "New Folder" issues with too many existing folders in display.
Smotthscroll to edited entry was broken since filelisting was
rewritten to become async...
2019-03-05 21:05:02 +01:00
d31b2f8549 Fix T61063, T62195: Python scripts should run before depsgraph evaluation.
This was changed (accidentally?) in d192d72312, now go back to behavior more
similar to 2.7. Python scripts should be able to set up drivers or do other
changes that will then be taken into account when evaluating the scene for the
first time.

The more tricky thing is that Python scripts now run before ED_editors_init,
but given what happens in there it seems safe.
2019-03-05 19:20:08 +01:00
3428ec5984 Merge branch 'blender2.7' 2019-03-05 19:14:00 +01:00
5e8e3c00f2 Fix T62112: wrong curve face count
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4452
2019-03-05 19:06:59 +01:00
e290a0b056 Cleanup: add asserts to catch cases where wrong attribute type is used. 2019-03-05 19:05:24 +01:00
c94db5d1c7 Fix T61778: Crash when adding material slot to object
For some reason the mat_nr can be superior to the number of material slots
present on an object. Just cap this number to the max available slot.
2019-03-05 18:58:22 +01:00
25c935e65f Fix Cycles bug rendering with multiple UV maps after recent changes. 2019-03-05 18:39:55 +01:00
d1a744173e GPUMaterial: Make Shader Output nodes inside nodegroups work
Works as expected and mimics Cycles behavior.

The patch is a bit hacky: In order to not touch the lower level function,
we search for the active output inside groups (recursively) and the first
valid one is then copied (or extracted if you want) in the previous parent
nodetree. So we recursively extract the output node back to the main
nodetree while preserving the links through the nodegroups interfaces.

This way everything works as expected in gpu tree evaluation and bsdf
tagging.

Fix T61869 Material Output Node Inside Node Group Renders Pink in Eevee
2019-03-05 17:24:39 +01:00
81283b1c81 DRW: Fix rasterizer discard messing with clear commands
Fixes T62179 Viewport Ghosting on rigs
2019-03-05 17:24:39 +01:00
4bc97db121 BLI_memiter: use ASAN memory poison
Detects invalid memory use when WITH_COMPILER_ASAN is enabled.
2019-03-06 03:17:51 +11:00
Pablo Vazquez
b05d3c2797 UI: Nicer report when trying to edit external libraries
Rename 'libdata' to 'library data'.
2019-03-05 17:06:11 +01:00
b8bb2bb960 Cleanup: warning in release builds 2019-03-06 02:49:30 +11:00
55cd481bf2 Fix T62208: constant detail picker not taking object scale into account 2019-03-05 16:44:47 +01:00
a4540116ba DRW: use memiter for on screen text allocation
Avoid allocation for each string,
improves redraw speed for text heavy views.

A contrived test showed FPS ~18.5% speedup but this doesn't represent
typical usage.
2019-03-06 02:42:53 +11:00
301bcf771d Fix T62210: endless loop in kd tree lookup
The problem was that `balance` expected that all node children
are set to `KD_NODE_UNSET` by default.
However, this might not be the case when `balance` is called
more than once.

The balance function might change the order of nodes even
when no new point has been inserted.
2019-03-05 16:23:58 +01:00
8887988b15 RNA: remove Screen.layout_name
This is no longer used.
2019-03-06 01:48:43 +11:00
Stefan Werner
304a89eccf Cycles: Changed standalone XML parser to read UV as float2 2019-03-05 15:29:50 +01:00
6fd0d810b4 DRW: support clipping for bone verts 2019-03-06 01:26:30 +11:00
68a0d35036 Tool System: add select tools to particle edit 2019-03-06 01:26:30 +11:00
7a6b46aac5 Fix T62163: Duplicating particle system results in crash
There were two problems:
1. `mesh_get_eval_final` has to be called with the evaluated object.
2. Particle systems have to have unique names within an object.
The depsgraph seems to use the particle system name as identifier.
This issue is actually independent of duplication.
The old code used a small hack to create unique names.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4451
2019-03-05 15:24:54 +01:00
302bba1665 GPencil: Disable proportional for Duplicate
When duplicates a stroke using Shift+D, the proportional must be disabled.
2019-03-05 15:12:18 +01:00
Stefan Werner
c891fb2fbe Merge branch 'blender2.7' 2019-03-05 15:06:09 +01:00
db7f9a70b0 Cycles: Added Float2 attribute type.
Float2 are now a new type for attributes in Cycles. Before, the choices
for attribute storage were float and float3, the latter padded to
float4. This meant that UV maps were inflated to twice the size
necessary.

Reviewers: brecht, sergey

Reviewed By: brecht

Subscribers: #cycles

Tags: #cycles

Differential Revision: https://developer.blender.org/D4409
2019-03-05 14:55:21 +01:00
cb7e66737d Fix T62216: order of items flipped in some menus like object mode. 2019-03-05 14:51:48 +01:00
683e64247f Fix T61796: Linking a collection with instances inside will place the instanced object in the scene.
Do not force to link indirectly linked collections into current scene,
that is usually not desired. Note that user can always add this link
manually if they want.

All this 'implicit instantiation' post-linking process is rather hairy
to get it correct, hope this time it's not breaking something else...
2019-03-05 14:41:46 +01:00
6d110a03b7 Merge branch 'blender2.7' 2019-03-05 14:26:28 +01:00
a325bc6bf3 Fix T58953: Lamp data not always set
The Lamp data was not always set. When using CUDA or CPU it was, but when using OpenCL
without `OBJECT_MOTION` `sd->lamp` not updated to the actual lamp. This made the
TextureCoordinate output the wrong normal when used in a light shader.

As the normal was incorrect it made the IES node render incorrectly.
(what is the default for the IES node).

By setting the lamp data when no `__OBJECT_MOTION__` compile directive is present makes
sure that the normal is correctly calculated.

Fix D4450

Reviewed By: Brecht van Lommel
2019-03-05 14:22:54 +01:00
8b10e1b457 Fix T61780: Crash when trying to access screen areas through the outliner.
ScreenArea->type is NULL-ified on read, and need to be initialized
(usually by `ED_area_initialize()`), but RNA can also access it before
it happens, so need to do it itself...
2019-03-05 14:09:18 +01:00
6e95d8484c Fix upside down tool menus
Regression from 4dd575e5ab
2019-03-05 23:51:57 +11:00
2a811e6955 Tool System: add node circle select tool 2019-03-05 23:29:49 +11:00
5e999c249c Fix T62202: circle select does not work on hair points 2019-03-05 23:16:30 +11:00
2894e75121 Fix parenting objects to bones/vertices causes offset
This reverts part of rBbc5482337669.
Problem with above commit is that the evaluated object seems to not have
partype, par1, par2, par3 copied from the original (yet). Using original
object instead now.
Second issue (when parenting to 'Bone Relative') is that the bones
BONE_RELATIVE_PARENTING flag is set on the original, but not the
evaluated bone (yet), setting this on both now.

Fixes T60623 (and part of T59352)

Reviewers: brecht, sergey

Maniphest Tasks: T60623

Differential Revision: https://developer.blender.org/D4309
2019-03-05 13:10:10 +01:00
76608f5ec5 Fix T60585: threadripper CPU only using 16 threads for e.g. sculpting.
This reverts the changes from ce927e1 to put the main and job threads on
node 0. The problem is that all threads created as children from these
threads will inherit the NUMA node and so will end up on the same node.
This can be fixed case-by-case by assigning the NUMA node for every child
thread, however this is difficult for external libraries and OpenMP, and
out of our control for plugins like external renderers.
2019-03-05 12:46:05 +01:00
8d8d113b73 Tool System: use set/add/subtract for all circle select operators
This applies changes from the 3D view circle select to other operators.
2019-03-05 22:26:45 +11:00
0ae6747300 GPencil: Cleanup compiler warnings 2019-03-05 12:10:34 +01:00
9f7f4c1a6a Fix T62194: Blender crash after makingnew file after using Grease Pencil.
The crash was detected in draw_manager, but the real problem was a wrong pointer that corrupted the struct, so the free function failed.

Redesign this area to keep pointer correct all the time.
2019-03-05 12:06:55 +01:00
6c513dc3e4 Fix T62190: Image editor pixel values are hidden by header at the bottom
since header regions can possibly overlap, accommodate by getting main
regions visible rect first.

Reviewers: sergey, brecht

Maniphest Tasks: T62190

Differential Revision: https://developer.blender.org/D4449
2019-03-05 11:19:39 +01:00
3e4cf413ea GPencil: Don't create framebuffers for selection
The selction use it's own frambuffers.
2019-03-05 10:52:52 +01:00
f5f0b97564 Fix T61763: Crash on selecting "Background Scene"
Memory optimization in dependency graph was using wrong view layer
for the scene which came via set.
2019-03-05 10:22:14 +01:00
caacedd861 GP: move select all into a utility function 2019-03-05 18:39:56 +11:00
b8ef725497 Cemara tracking: move select all into a utility function 2019-03-05 18:39:02 +11:00
e83854e759 Nodes: move select all into a utility function 2019-03-05 18:38:37 +11:00
08e1218d5d Cleanup: move keymap circle select items to template 2019-03-05 15:47:56 +11:00
34daf527f3 Cleanup: rename RENDER_OVERRIDE -> HIDE_OVERLAYS
Match the UI naming (changed since 2.7x).
2019-03-05 15:09:25 +11:00
9d82a38d0a Fix T62159: Poly build crashes w/o overlays 2019-03-05 15:05:00 +11:00
21e379b733 3D View: move pre-select mesh element access into gizmo API 2019-03-05 14:40:33 +11:00
51e743c7fa Fix T62199: Incorrect bpy.data.screens behavior
The screen identifier was set to the "layout_name" which isn't
guaranteed to be unique or even exist.

This meant `bpy.data.screens.keys()` could have duplicate keys,
even when not duplicated, these keys couldn't be used for
`bpy.data.screen[key]` access because internally ID's use names for
collection look-ups.

Make screens match other ID's, using the ID.name as the identifier.

Note: this change was from the initial workspace commit 7f564d74f9
Since then the layout selector has been removed so this isn't needed.
2019-03-05 12:59:46 +11:00
1df6a98b17 Cleanup: minor adjustment to gizmo extrude setup
No need to access both edit & active object.
2019-03-05 11:32:46 +11:00
90afe39181 GPencil: Fix error in 3D Location mode
In previous commit introduced this bug. The flag was inverted and the mode was not working.
2019-03-04 20:56:54 +01:00
ad0489ded8 Annotations: Reduce smooth factor to 0.5
The previous value was too high and deform too much if write text.
2019-03-04 20:40:07 +01:00
8df5e0eb66 GPencil: New extrude operator
Keymap: E   - Extrude Gizmo supported.

If the extrude points are the first or last of the stroke, the stroke is extended.

If the extrude points are in the middle of the stroke, a new stroke is created because the grease pencil strokes can be only with 2 extremes and fold the stroke to get a new point gets very bad results.

Still pending define a new icon. Also, it could be good to set by default XYZ axis in the gizmo.

Note: There is a change in the transform_gizmo_extrude_3d.c gizmo for OB_MODE_EDIT_GPENCIL. This change must be undo when the mode will be integrated into OB_MODE_EDIT, but while we have both modes, we need to keep this code in order to keep running the gizmo.
2019-03-04 19:40:50 +01:00
937e9b4318 Preferences: Remove "requires restart" from multisample tooltips
It does not make sense now that we uses FBOs for that.
2019-03-04 19:18:12 +01:00
89db684d82 Preferences: Add option to disable edit-mode wire Antialiasing
Requested by some users who prefer old wireframe precision.

Smooth wires are still enabled by defaults as they don't have a noticeable
perf impact.

Application restart is needed for changes to take effects.
2019-03-04 19:18:12 +01:00
81ae7773e7 Fix T59140 : Loose edges of final mesh does not display in edit mode 2019-03-04 19:18:12 +01:00
e5ab2b9c62 DNA: optimize data reconstruction
Cache the result of DNA_elem_array_size which was being called
for each element when reconstructing each struct.

Also skip padding members during reconstruction.

Gives ~18% overall speedup loading 10_010_A.anim.blend (r3154)
from the spring project.# Please enter the commit message for your changes. Lines starting

Note, this was reverted recently because it caused T62181
Changes to DNA_sdna_patch_struct_member_nr were needed which
caused issues loading old 2.8x files.
2019-03-05 03:10:43 +11:00
3730d16347 GPencil: Cleanup value to enum name 2019-03-04 17:09:20 +01:00
f6bafef1e1 GPencil: Move Object Depth Order to Object
There was a conflict between Object "In Front" and how the strokes were managed in Stroke panel for grease pencil datablock.

In order to keep consistency, the order of the object has been moved to Object level and now it's using the standard "In Front" flag. As all it is 3D, the option "Back" has been removed.

This also fixes the problem with task T62137.

Also related to commit 54ffc4e19d and D4405
2019-03-04 17:06:03 +01:00
b27ada979c Merge branch 'blender2.7' 2019-03-04 16:54:19 +01:00
Dalai Felinto
69c8248a1c Fixup for fix for OSX build using a build folder name with spaces
Bug introduced on: 1f22e3f311.
This was making regular Mac builds to fail, where they were not failing before.

Tested by William Reynish.
2019-03-04 16:53:56 +01:00
f9ffa18171 Fix T62175: Crash on Undo.
Again nodetree broken code... as usual...
2019-03-04 16:44:33 +01:00
c2f7d4efc3 Fix T62134: duplicating a material won't update node group's node tree user count anymore.
Yet again we have to twist and curl like insane worms to cope with
IDs-not-in-main infamous issue... :(
2019-03-04 16:18:50 +01:00
eb888d05e9 Merge branch 'blender2.7' 2019-03-04 16:08:09 +01:00
708eb55018 UI: make text editor Text menu consistent with menus for .blend and images. 2019-03-04 16:08:04 +01:00
3c5113221d Fix missing image editor redraw when reloading image through API. 2019-03-04 16:06:57 +01:00
e53db8342a Fix Cycles animation denoising giving black pixels for some outliers.
The denoising code expects the output buffer to be filled with the noisy
image, which was not the case for standalone denoising.
2019-03-04 16:06:56 +01:00
10d9a2494f Texture Paint: round corners of dilated UV seams
This fixes the issue of long spikes on sharp corners by rounding them,
guaranteeing that the bleed will never exceed the bleed distance
set by the user in any part of the mesh.

See: D4437
2019-03-05 01:57:49 +11:00
871248a77d Fix texture paint UV dilation algorithm
Two aspects are addressed:

- Correct computation of dilation distance,
  so that dilated boundaries remain parallel to the original boundaries
  (and with the actual distance specified as bleed distance).

- Dilate with regard to adjacent seams
  instead of adjacent triangle edges, for a more correct result.
  This is especially important in the case of concave shapes,
  where spikes could overlap with actual geometry.

See: D4436
2019-03-05 01:36:22 +11:00
f4677547d4 Fix early output check in movie clip prefetch
Was preventing prefetching when clip is offset to a
higher scene frame number than a duration of the clip.
2019-03-04 15:25:09 +01:00
f96fffe0db Fix/workaround T62167: Random crash when displaying wireframes.
Some old AMD drivers crash when a vbo with stride 1 is used a few times.
I have not found a real solution to this problem. So the solution was to use a vbo with stride 4 (which in theory is less efficient and takes up more memory space).
2019-03-04 10:27:41 -03:00
46f1c1b15d Revert "DNA: optimize data reconstruction"
This reverts commit 657205530c.

This caused an T62181, looking into fix but revert for now.
2019-03-05 00:21:48 +11:00
ae74f89585 Fix T62140: GPencil line segment disappears
Remove code for when edge count is 2.
2019-03-04 12:13:35 +00:00
baee9b014a Outliner: better support for paintcurves ('Blender File' view)
- paintcurves were hitting an assert in outliner_add_element()
- missing outliner update when adding a paintcurve
- paintcurves were not showing an icon [they dont have a dedicated icon,
took the one used elsewhere]

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4445
2019-03-04 13:04:41 +01:00
a53dccb2a9 Cleanup: indentation, style 2019-03-04 22:13:58 +11:00
270fd28496 Cleanup: use single quotes for enums 2019-03-04 22:11:06 +11:00
2644e4f8f4 Merge branch 'blender2.7' 2019-03-04 12:00:02 +01:00
d3306f0272 Fix bad level calls 2019-03-04 11:58:37 +01:00
ba55cbf5b5 Fix T62009: ԥ abkhazian letter shows as a square in Blender.
Added all 'Extended Cyrillic' chars I found in DejaVuSans (unfortunately
that one does not have the complete set).

Note: At some point we might want to switch to some more modern solution
than our Frankenstein font (thinking about noto one)...
2019-03-04 11:56:04 +01:00
b526a38ba2 Cycles: Store various render stages timings
Includes time spent on synchronization and time spent on just
path tracing/denoising.
2019-03-04 11:52:49 +01:00
e90a2807bf Show metadata for rendered images
Previously metadata was only shown for images which are saved
to disk.

This change makes it so that it's possible to see metadata right
after pressing F12.
2019-03-04 11:32:30 +01:00
2150a68a80 Cleanup: Indentation 2019-03-04 11:32:30 +01:00
4b17d34ad3 Add Thai language entry (hidden for until we get some translation). 2019-03-04 10:46:46 +01:00
1a06751c1a Fix T62113: Color Management Curves CRGB buttons missing
Template was missing a type="COLOR" definition.
2019-03-04 10:46:27 +01:00
e49d7b9363 UI: Add descriptive tooltip to Curve Radius tool
Was previously just using generic transform tooltip.
2019-03-04 10:26:27 +01:00
a7c64cdcca UI: Rename Shrink/Fatten in curve contextual menu to fit with recent tool name change 2019-03-04 10:19:36 +01:00
ff10f123ba Cleanup: typo in comment
spotted by @miclack, thx!
2019-03-04 10:16:07 +01:00
c5dbcc019d Fix unreported: Shrink/Fatten in Curve Transform menu fails because it was calling the mesh edit mode operator 2019-03-04 10:15:40 +01:00
b3a324bec9 UI: Move paint context menus to panels
See proposal: T62130
2019-03-04 20:13:07 +11:00
fd3ef61bc1 Tools: Rename Curve Shrink/Fatten to Radius
This is fundamentally different from Shrink/Fatten for meshes, because the control points are not moved, only the radius.
Issue raised by Ronan Ducluzeau, name suggested by Campbell Barton
2019-03-04 09:50:59 +01:00
39b210db94 Icons: only use macOS override if blender not found
Otherwise `make icons_geom BLENDER_BIN=...` doesn't work as documented.
2019-03-04 19:37:46 +11:00
798d2cadc3 DRW: Remove unecessary state changes
The TODO is old and the issue does not seems to appear anymore.

If bugs emerge from this commit it's most likely to be a bad usage of the
API.
2019-03-04 01:30:02 +01:00
10afa74e82 DRW: Fix matflag not being updated after first drawcall
This Fixes T61823: Flickering material problem with eevee
2019-03-04 01:30:02 +01:00
c7cf8282a6 Fix T62076: Delete Active Scene Freezes Blender.
Not sure where that piece of code originates from, but trying to remap
usages of deleted scene to newly active scene in *whole* bmain is
really, really not the thing to do! Just use generic ID deletion code
here, no reason it could not handle the task properly. ;)
2019-03-03 21:59:28 +01:00
d0df7fb3b9 Fix (unreported) missing handling of 'never self' ID pointers in library_query and library_remap codes.
Looks like something forgotten at some point, define in callback flags
was there, just not used at all.

Added most obvious cases now (we are probably still missing some), and
proper handling for it in remapping code (when we hit such case, we
'convert' new_id to NULL and go on with it).

Related (as in, exposed by) T62076, but not the actual cause of that bug.
2019-03-03 21:56:38 +01:00
419ee7bdc6 Fix T62064: Linked object made by Make Links isn't showed in the scene you linked to.
Usual missing DEG relations rebuild tagging...
2019-03-03 21:14:52 +01:00
31ad063ba4 Tweaks to icons for curve shrink/fatten & tilt 2019-03-03 20:38:22 +01:00
a6c30dd91c Tools: Add Randomize to Curve Edit toolbar 2019-03-03 20:37:47 +01:00
40052708e6 Annotations: Make strokes smoother
When move the mouse/pen very fast, the events were not enough to create smooth strokes.

I have used a simplified version of the same logic used with grease pencil objects to smooth annotations.
2019-03-03 19:56:03 +01:00
932d0ec676 Icons: Make blender_icons_geom_update.py support macOS 2019-03-03 19:02:14 +01:00
657205530c DNA: optimize data reconstruction
Cache the result of DNA_elem_array_size which was being called
for each element when reconstructing each struct.

Also skip padding members during reconstruction.

Gives ~18% overall speedup loading 10_010_A.anim.blend (r3154)
from the spring project.
2019-03-04 03:00:33 +11:00
647c26c5ce DNA: rename BezTriple alfa to tilt 2019-03-04 01:18:06 +11:00
216ddcc09b Cleanup: rename FileData.listbase -> bhead_list
Having the name matching the type isn't so meaningful.
2019-03-04 01:01:52 +11:00
2d468fc072 UI: subtle outline for negative 3D view gizmo axes
Without this they can blend in visually with the backdrop of the gizmo.
2019-03-04 00:51:03 +11:00
301494f94a UI: use grey for 3D view axis gizmo highlight
Using white with low alpha made it hard to use on a white background.
Since the axes themselves highlight to white.
2019-03-04 00:13:25 +11:00
a7f5de75f8 Tools: Remove parenthesis from Spin Duplicates tool name 2019-03-03 13:57:01 +01:00
65a3fe46b5 Tools: Add Shrink/Fatten to Curve Edit Toolbar 2019-03-03 12:37:18 +01:00
16406eb6a8 UI: Add Shrink/Fatten to curve contextual menus 2019-03-03 10:58:51 +01:00
bd1ba2f7a9 UI: increase 3D view icon contrast over light colors
- Avoid using white with low alpha to make grey.
  Note that this is the second time we've run into this problem: T59626.

- Use a light backdrop when the icons are dark
  so they're visible over a black background.
2019-03-03 12:15:03 +11:00
6801 changed files with 1640452 additions and 1458635 deletions

261
.clang-format Normal file
View File

@@ -0,0 +1,261 @@
# Configuration of clang-format
# =============================
#
# Tested to work with versions: 6 to 8.
# This causes parameters on continuations to align to the opening brace.
#
# like_this_long_name(parameter_one,
# parameter_two,
# parameter_three);
#
AlignAfterOpenBracket: 'Align'
# Disallow short functions on one line; break them up.
AllowShortBlocksOnASingleLine: false
# These two settings trigger stacking of parameters in most cases; this is
# easier to read and also makes diffs easier to read (since an added or removed
# parameter is obvious). For example, function calls will look like this:
#
# like_this_long_name(parameter_one,
# parameter_two,
# parameter_three,
# parameter_four,
# parameter_five,
# parameter_six);
#
# Instead of:
#
# like_this_long_name(parameter_one, parameter_two, parameter_three, parameter_four,
# parameter_five, parameter_six);
#
BinPackArguments: false
BinPackParameters: false
# Line width (don't exceed 100).
ColumnLimit: 99
# Cause initializer lists to have one member initialized per line, in the case
# that all initializers can't fit on a single line.
ConstructorInitializerAllOnOneLineOrOnePerLine: true
# Indent the : after a constructor. For example:
#
# explicit foo_class ()
# : member1_(5)
# {
# }
#
ConstructorInitializerIndentWidth: 4
# Make access modifier slightly more visible.
AccessModifierOffset: -1
# This will unfortunately use spaces in some cases where it's not desired (like
# function calls) but the overall result is better since it will allow
# alignment to work properly with different tab width settings.
ContinuationIndentWidth: 4
# This tries to match Blender's style as much as possible. One
BreakBeforeBraces: Custom
BraceWrapping: {
AfterClass: 'false'
AfterControlStatement: 'false'
AfterEnum : 'false'
AfterFunction : 'true'
AfterNamespace : 'false'
AfterStruct : 'false'
AfterUnion : 'false'
BeforeCatch : 'true'
BeforeElse : 'true'
IndentBraces : 'false'
AfterObjCDeclaration: 'true'
}
# For switch statements, indent the cases.
IndentCaseLabels: true
# Indent after the hash inside preprocessor directives
IndentPPDirectives: AfterHash
BreakBeforeTernaryOperators: false
SpaceAfterTemplateKeyword: false
# Handy comment at the end of each C++ name space.
FixNamespaceComments: true
# Use "if (...)" instead of "if(...)", but have function calls like foo().
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
# Use two spaces before trailing comments, for example
#
# foo = bar; // comment
#
# Note that this doesn't work for C-style comments.
SpacesBeforeTrailingComments: 2
# Reflow comments, developers must disable formatting as with code to override this.
ReflowComments: true
# Never use tabs for indentation.
# Note: TabWidth and IndentWidth must be the same, or strange things happen.
UseTab: Never
TabWidth: 2
IndentWidth: 2
# Add a big penalty on breaking after the return type of functions. For example,
#
# static void foo(...)
#
# Instead of:
#
# static void
# foo(very long content here that maybe could be stacked)
#
PenaltyReturnTypeOnItsOwnLine: 10000
# Avoid having function calls broken onto a new line:
#
# int a = foo(
# long, list, of, many, params);
#
# Instead of:
#
# int a =
# foo(long, list, of, many, params);
#
PenaltyBreakAssignment: 100
AllowShortFunctionsOnASingleLine: None
# Disable for now since it complicates initial migration tests,
# TODO: look into enabling this in the future.
SortIncludes: false
# Don't right align escaped newlines to the right because we have a wide default
AlignEscapedNewlines: DontAlign
# Always break:
#
# const char *foo =
# "multi"
# "line";
#
# Instead of:
#
# const char *foo = "multi"
# "line";
#
AlwaysBreakBeforeMultilineStrings: true
# We don't want literal strings to break,
# however clang-format seems to ignore this (sigh).
PenaltyBreakString: 1000000
# There are macros in Blender for custom for loops; tell Clang to treat them
# like loops rather than an expression, and so put the { on the same line.
#
# To find these use multi-line regex search:
# "^\s+[A-Z][A-Z0-9_]+\s*\([^\n]*\)\n\s*\{"
ForEachMacros:
- BEGIN_ANIMFILTER_SUBCHANNELS
- BLI_FOREACH_SPARSE_RANGE
- BLI_SMALLSTACK_ITER_BEGIN
- BMO_ITER
- BMO_ITER_INDEX
- BMW_ITER
- BM_FACES_OF_VERT_ITER_BEGIN
- BM_ITER_BPY_BM_SEQ
- BM_ITER_ELEM
- BM_ITER_ELEM_INDEX
- BM_ITER_MESH
- BM_ITER_MESH_INDEX
- BM_ITER_MESH_MUTABLE
- BM_LOOPS_OF_VERT_ITER_BEGIN
- BOOST_FOREACH
- CTX_DATA_BEGIN
- CTX_DATA_BEGIN_WITH_ID
- DEG_OBJECT_ITER_BEGIN
- DEG_OBJECT_ITER_FOR_RENDER_ENGINE_BEGIN
- DRIVER_TARGETS_LOOPER_BEGIN
- DRIVER_TARGETS_USED_LOOPER_BEGIN
- FOREACH_BASE_IN_EDIT_MODE_BEGIN
- FOREACH_BASE_IN_MODE_BEGIN
- FOREACH_BEGIN
- FOREACH_COLLECTION_BEGIN
- FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN
- FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN
- FOREACH_EDIT_OBJECT_BEGIN
- FOREACH_MAIN_ID_BEGIN
- FOREACH_MAIN_LISTBASE_BEGIN
- FOREACH_MAIN_LISTBASE_ID_BEGIN
- FOREACH_NODETREE_BEGIN
- FOREACH_OBJECT_BEGIN
- FOREACH_OBJECT_FLAG_BEGIN
- FOREACH_OBJECT_IN_EDIT_MODE_BEGIN
- FOREACH_OBJECT_IN_MODE_BEGIN
- FOREACH_OBJECT_RENDERABLE_BEGIN
- FOREACH_PCHAN_SELECTED_IN_OBJECT_BEGIN
- FOREACH_PCHAN_VISIBLE_IN_OBJECT_BEGIN
- FOREACH_SCENE_COLLECTION_BEGIN
- FOREACH_SCENE_OBJECT_BEGIN
- FOREACH_SELECTED_BASE_BEGIN
- FOREACH_SELECTED_EDITABLE_OBJECT_BEGIN
- FOREACH_SELECTED_OBJECT_BEGIN
- FOREACH_TRANS_DATA_CONTAINER
- FOREACH_VIEW_LAYER_TO_RENDER_BEGIN
- FOREACH_VISIBLE_BASE_BEGIN
- FOREACH_VISIBLE_OBJECT_BEGIN
- GHASH_FOREACH_BEGIN
- GHASH_ITER
- GHASH_ITER_INDEX
- GPU_SELECT_LOAD_IF_PICKSEL_LIST
- GP_EDITABLE_STROKES_BEGIN
- GSET_FOREACH_BEGIN
- GSET_ITER
- GSET_ITER_INDEX
- ITER_BEGIN
- ITER_PIXELS
- ITER_SLOTS
- ITER_SLOTS_BEGIN
- LOOP_EDITED_POINTS
- LOOP_KEYS
- LOOP_POINTS
- LOOP_SELECTED_KEYS
- LOOP_SELECTED_POINTS
- LOOP_TAGGED_KEYS
- LOOP_TAGGED_POINTS
- LOOP_UNSELECTED_POINTS
- LOOP_VISIBLE_KEYS
- LOOP_VISIBLE_POINTS
- LISTBASE_CIRCULAR_BACKWARD_BEGIN
- LISTBASE_CIRCULAR_FORWARD_BEGIN
- LISTBASE_FOREACH
- LISTBASE_FOREACH_BACKWARD
- LISTBASE_FOREACH_MUTABLE
- LISTBASE_FOREACH_BACKWARD_MUTABLE
- MAN2D_ITER_AXES_BEGIN
- MAN_ITER_AXES_BEGIN
- NODE_INSTANCE_HASH_ITER
- NODE_SOCKET_TYPES_BEGIN
- NODE_TREE_TYPES_BEGIN
- NODE_TYPES_BEGIN
- PIXEL_LOOPER_BEGIN
- PIXEL_LOOPER_BEGIN_CHANNELS
- RNA_BEGIN
- RNA_PROP_BEGIN
- RNA_STRUCT_BEGIN
- RNA_STRUCT_BEGIN_SKIP_RNA_TYPE
- SEQP_BEGIN
- SEQ_BEGIN
- foreach
# Use once we bump the minimum version to version 8.
# # Without this string literals that in-line 'STRINGIFY' behave strangely (a bug?).
# StatementMacros:
# - PyObject_VAR_HEAD
# - STRINGIFY

View File

@@ -3,18 +3,18 @@
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = 4
max_line_length = 120
indent_style = space
indent_size = 2
max_line_length = 99
# CMake & Text
[*.{cmake,txt}]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = 4
max_line_length = 120
indent_style = space
indent_size = 2
max_line_length = 99
# Python
[*.py]
@@ -30,9 +30,9 @@ max_line_length = 120
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = 4
max_line_length = 120
indent_style = space
indent_size = 2
max_line_length = 99
# reStructuredText
[*.rst]

3
.gitignore vendored
View File

@@ -40,3 +40,6 @@ Desktop.ini
# in-source lib downloads
/build_files/build_environment/downloads
# in-source buildbot signing configuration
/build_files/buildbot/codesign/config_server.py

File diff suppressed because it is too large Load Diff

View File

@@ -37,14 +37,16 @@ Convenience Targets
* bpy: Build as a python module which can be loaded from python directly.
* deps: Build library dependencies (intended only for platform maintainers).
* developer: Enable faster builds, error checking and tests, recommended for developers.
* config: Run cmake configuration tool to set build options.
* ninja: Use ninja build tool for faster builds.
Note: passing the argument 'BUILD_DIR=path' when calling make will override the default build dir.
Note: passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments.
Project Files
Generate poject files for development environments.
Generate project files for development environments.
* project_qtcreator: QtCreator Project Files.
* project_netbeans: NetBeans Project Files.
@@ -60,8 +62,7 @@ Testing Targets
Not associated with building Blender.
* test:
Run ctest, currently tests import/export,
operator execution and that python modules load
Run automated tests with ctest.
* test_cmake:
Runs our own cmake file checker
which detects errors in the cmake file list definitions
@@ -117,12 +118,17 @@ Utilities
Example
make icons_geom BLENDER_BIN=/path/to/blender
* tgz:
* source_archive:
Create a compressed archive of the source code.
* update:
updates git and all submodules
* format
Format source code using clang (uses PATHS if passed in). For example::
make format PATHS="source/blender/blenlib source/blender/blenkernel"
Environment Variables
* BUILD_CMAKE_ARGS: Arguments passed to CMake.
@@ -186,6 +192,16 @@ ifndef PYTHON
PYTHON:=python3
endif
# For macOS python3 is not installed by default, so fallback to python binary
# in libraries, or python 2 for running make update to get it.
ifeq ($(OS_NCASE),darwin)
ifeq (, $(shell command -v $(PYTHON)))
PYTHON:=../lib/darwin/python/bin/python3.7m
ifeq (, $(shell command -v $(PYTHON)))
PYTHON:=python
endif
endif
endif
# -----------------------------------------------------------------------------
# additional targets for the build configuration
@@ -216,6 +232,30 @@ ifneq "$(findstring bpy, $(MAKECMDGOALS))" ""
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake"
endif
ifneq "$(findstring developer, $(MAKECMDGOALS))" ""
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_developer.cmake"
endif
# -----------------------------------------------------------------------------
# build tool
ifneq "$(findstring ninja, $(MAKECMDGOALS))" ""
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -G Ninja
BUILD_COMMAND:=ninja
DEPS_BUILD_COMMAND:=ninja
else
ifneq ("$(wildcard $(BUILD_DIR)/build.ninja)","")
BUILD_COMMAND:=ninja
else
BUILD_COMMAND:=make -s
endif
ifneq ("$(wildcard $(DEPS_BUILD_DIR)/build.ninja)","")
DEPS_BUILD_COMMAND:=ninja
else
DEPS_BUILD_COMMAND:=make -s
endif
endif
# -----------------------------------------------------------------------------
# Blender binary path
@@ -223,7 +263,7 @@ endif
# Allow passing in own BLENDER_BIN so developers who don't
# use the default build path can still use utility helpers.
ifeq ($(OS), Darwin)
BLENDER_BIN?="$(BUILD_DIR)/bin/blender.app/Contents/MacOS/blender"
BLENDER_BIN?="$(BUILD_DIR)/bin/Blender.app/Contents/MacOS/Blender"
else
BLENDER_BIN?="$(BUILD_DIR)/bin/blender"
endif
@@ -236,7 +276,10 @@ ifndef NPROCS
ifeq ($(OS), Linux)
NPROCS:=$(shell nproc)
endif
ifneq (,$(filter $(OS),Darwin FreeBSD NetBSD))
ifeq ($(OS), NetBSD)
NPROCS:=$(shell getconf NPROCESSORS_ONLN)
endif
ifneq (,$(filter $(OS),Darwin FreeBSD))
NPROCS:=$(shell sysctl -n hw.ncpu)
endif
endif
@@ -277,7 +320,7 @@ all: .FORCE
@echo
@echo Building Blender ...
$(MAKE) -C "$(BUILD_DIR)" -s -j $(NPROCS) install
$(BUILD_COMMAND) -C "$(BUILD_DIR)" -j $(NPROCS) install
@echo
@echo edit build configuration with: "$(BUILD_DIR)/CMakeCache.txt" run make again to rebuild.
@echo Blender successfully built, run from: $(BLENDER_BIN)
@@ -289,6 +332,8 @@ lite: all
cycles: all
headless: all
bpy: all
developer: all
ninja: all
# -----------------------------------------------------------------------------
# Build dependencies
@@ -307,7 +352,7 @@ deps: .FORCE
@echo
@echo Building dependencies ...
$(MAKE) -C "$(DEPS_BUILD_DIR)" -s -j $(NPROCS) $(DEPS_TARGET)
$(DEPS_BUILD_COMMAND) -C "$(DEPS_BUILD_DIR)" -j $(NPROCS) $(DEPS_TARGET)
@echo
@echo Dependencies successfully built and installed to $(DEPS_INSTALL_DIR).
@echo
@@ -342,7 +387,7 @@ package_archive: .FORCE
# Tests
#
test: .FORCE
cd $(BUILD_DIR) ; ctest . --output-on-failure
$(PYTHON) ./build_files/utils/make_test.py "$(BUILD_DIR)"
# run pep8 check check on scripts we distribute.
test_pep8: .FORCE
@@ -403,7 +448,7 @@ test_style_osl_qtc: .FORCE
#
project_qtcreator: .FORCE
$(PYTHON) build_files/cmake/cmake_qtcreator_project.py "$(BUILD_DIR)"
$(PYTHON) build_files/cmake/cmake_qtcreator_project.py --build-dir "$(BUILD_DIR)"
project_netbeans: .FORCE
$(PYTHON) build_files/cmake/cmake_netbeans_project.py "$(BUILD_DIR)"
@@ -483,8 +528,8 @@ check_descriptions: .FORCE
# Utilities
#
tgz: .FORCE
./build_files/utils/build_tgz.sh
source_archive: .FORCE
./build_files/utils/make_source_archive.sh
INKSCAPE_BIN?="inkscape"
icons: .FORCE
@@ -498,17 +543,11 @@ icons_geom: .FORCE
"$(BLENDER_DIR)/release/datafiles/blender_icons_geom_update.py"
update: .FORCE
if [ "$(OS_NCASE)" = "darwin" ] && [ ! -d "../lib/$(OS_NCASE)" ]; then \
svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/$(OS_NCASE) ../lib/$(OS_NCASE) ; \
fi
if [ -d "../lib" ]; then \
svn cleanup ../lib/* ; \
svn update ../lib/* ; \
fi
git pull --rebase
git submodule update --init --recursive
git submodule foreach git checkout master
git submodule foreach git pull --rebase origin master
$(PYTHON) ./build_files/utils/make_update.py
format: .FORCE
PATH="../lib/${OS_NCASE}/llvm/bin/:$(PATH)" \
$(PYTHON) source/tools/utils_maintenance/clang_format_paths.py $(PATHS)
# -----------------------------------------------------------------------------
@@ -539,7 +578,7 @@ help_features: .FORCE
@$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_print_build_options.py" $(BLENDER_DIR)"/CMakeLists.txt"
clean: .FORCE
$(MAKE) -C "$(BUILD_DIR)" clean
$(BUILD_COMMAND) -C "$(BUILD_DIR)" clean
.PHONY: all

View File

@@ -25,16 +25,16 @@
# Windows and macOS, and install_deps.sh on Linux.
#
# WINDOWS USAGE:
# Don't call this cmake file your self, use build_deps.cmd
# Don't call this cmake file yourself, use build_deps.cmd
# build_deps 2013 x64 / build_deps 2013 x86
# build_deps 2015 x64 / build_deps 2015 x86
#
# MAC OS X USAGE:
# Install with homebrew: brew install autoconf automake libtool yasm nasm
# Install with homebrew: brew install cmake autoconf automake libtool yasm nasm
# Run "make deps" from main Blender directory
#
# LINUX USAGE:
# Install compiler, cmake, autoconf, automake, libtool, yasm
# Install compiler cmake autoconf automake libtool yasm nasm tcl
# Run "make deps" from main Blender directory
#
####################################################################################################
@@ -43,21 +43,21 @@ project("BlenderDependencies")
cmake_minimum_required(VERSION 3.5)
include(ExternalProject)
include(cmake/check_software.cmake)
include(cmake/options.cmake)
include(cmake/versions.cmake)
if(ENABLE_MINGW64)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
include(cmake/setup_mingw64.cmake)
else()
include(cmake/setup_mingw32.cmake)
endif()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
include(cmake/setup_mingw64.cmake)
else()
include(cmake/setup_mingw32.cmake)
endif()
else()
set(mingw_LIBDIR ${LIBDIR})
set(mingw_LIBDIR ${LIBDIR})
endif()
include(cmake/zlib.cmake)
include(cmake/blendthumb.cmake)
include(cmake/openal.cmake)
include(cmake/png.cmake)
include(cmake/jpeg.cmake)
@@ -90,65 +90,77 @@ include(cmake/tbb.cmake)
include(cmake/openvdb.cmake)
include(cmake/python.cmake)
include(cmake/python_site_packages.cmake)
include(cmake/package_python.cmake)
include(cmake/numpy.cmake)
include(cmake/pugixml.cmake)
if(UNIX AND NOT APPLE)
# Rely on PugiXML compiled with OpenImageIO
else()
include(cmake/pugixml.cmake)
endif()
include(cmake/openimagedenoise.cmake)
if(WITH_WEBP)
include(cmake/webp.cmake)
include(cmake/webp.cmake)
endif()
if(WITH_EMBREE)
include(cmake/embree.cmake)
include(cmake/embree.cmake)
endif()
if(WIN32)
# HMD branch deps
include(cmake/hidapi.cmake)
# OCIO deps
include(cmake/tinyxml.cmake)
include(cmake/yamlcpp.cmake)
# LCMS is an OCIO dep, but only if you build the apps, leaving it here for convenience
#include(cmake/lcms.cmake)
# HMD branch deps
include(cmake/hidapi.cmake)
# OCIO deps
include(cmake/tinyxml.cmake)
include(cmake/yamlcpp.cmake)
# LCMS is an OCIO dep, but only if you build the apps, leaving it here for convenience
# include(cmake/lcms.cmake)
endif()
if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/openjpeg.cmake)
if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
if(WIN32)
include(cmake/zlib_mingw.cmake)
endif()
include(cmake/lame.cmake)
include(cmake/ogg.cmake)
include(cmake/vorbis.cmake)
include(cmake/theora.cmake)
include(cmake/vpx.cmake)
include(cmake/x264.cmake)
include(cmake/xvidcore.cmake)
include(cmake/faad.cmake)
include(cmake/ffmpeg.cmake)
include(cmake/fftw.cmake)
include(cmake/sndfile.cmake)
if(WIN32)
include(cmake/iconv.cmake)
endif()
if(UNIX)
include(cmake/flac.cmake)
include(cmake/xml2.cmake)
if(NOT APPLE)
include(cmake/spnav.cmake)
include(cmake/jemalloc.cmake)
endif()
endif()
endif()
include(cmake/openjpeg.cmake)
if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
if(WIN32)
include(cmake/zlib_mingw.cmake)
endif()
include(cmake/lame.cmake)
include(cmake/ogg.cmake)
include(cmake/vorbis.cmake)
include(cmake/theora.cmake)
include(cmake/opus.cmake)
include(cmake/vpx.cmake)
include(cmake/x264.cmake)
include(cmake/xvidcore.cmake)
include(cmake/faad.cmake)
include(cmake/ffmpeg.cmake)
include(cmake/fftw.cmake)
include(cmake/sndfile.cmake)
if(WIN32)
include(cmake/iconv.cmake)
endif()
if(UNIX)
include(cmake/flac.cmake)
include(cmake/xml2.cmake)
if(NOT APPLE)
include(cmake/spnav.cmake)
include(cmake/jemalloc.cmake)
endif()
endif()
endif()
endif()
if(UNIX)
include(cmake/bzip2.cmake)
include(cmake/ffi.cmake)
include(cmake/lzma.cmake)
include(cmake/ssl.cmake)
include(cmake/sqlite.cmake)
include(cmake/bzip2.cmake)
include(cmake/ffi.cmake)
include(cmake/lzma.cmake)
include(cmake/ssl.cmake)
include(cmake/sqlite.cmake)
endif()
if(UNIX AND NOT APPLE)
include(cmake/libglu.cmake)
include(cmake/mesa.cmake)
endif()
include(cmake/harvest.cmake)

View File

@@ -17,89 +17,89 @@
# ***** END GPL LICENSE BLOCK *****
if(ALEMBIC_HDF5)
set(ALEMBIC_HDF5_HL)
# in debug mode we do not build HDF5_hdf5_hl_LIBRARY which makes cmake really
# unhappy, stub it with the debug mode lib. it's not linking it in at this
# point in time anyhow
if(BUILD_MODE STREQUAL Debug)
set(ALEMBIC_HDF5_HL -DHDF5_hdf5_hl_LIBRARY=${LIBDIR}/hdf5/lib/libhdf5_hl_D.${LIBEXT})
endif()
set(ALEMBIC_HDF5_HL)
# in debug mode we do not build HDF5_hdf5_hl_LIBRARY which makes cmake really
# unhappy, stub it with the debug mode lib. it's not linking it in at this
# point in time anyhow
if(BUILD_MODE STREQUAL Debug)
set(ALEMBIC_HDF5_HL -DHDF5_hdf5_hl_LIBRARY=${LIBDIR}/hdf5/lib/libhdf5_hl_D.${LIBEXT})
endif()
endif()
if(WIN32)
set(ALEMBIC_ILMBASE ${LIBDIR}/openexr)
set(ALEMBIC_ILMBASE ${LIBDIR}/openexr)
else()
set(ALEMBIC_ILMBASE ${LIBDIR}/ilmbase)
set(ALEMBIC_ILMBASE ${LIBDIR}/ilmbase)
endif()
set(ALEMBIC_EXTRA_ARGS
-DBUILDSTATIC=ON
-DLINKSTATIC=ON
-DALEMBIC_LIB_USES_BOOST=ON
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DUSE_STATIC_BOOST=On
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBoost_DEBUG=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DILMBASE_ROOT=${ALEMBIC_ILMBASE}
-DALEMBIC_ILMBASE_INCLUDE_DIRECTORY=${ALEMBIC_ILMBASE}/include/OpenEXR
-DALEMBIC_ILMBASE_HALF_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IMATH_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_ILMTHREAD_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IEX_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IEXMATH_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}IexMath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DUSE_PYILMBASE=0
-DUSE_PYALEMBIC=0
-DUSE_ARNOLD=0
-DUSE_MAYA=0
-DUSE_PRMAN=0
-DUSE_HDF5=Off
-DUSE_STATIC_HDF5=Off
-DHDF5_ROOT=${LIBDIR}/hdf5
-DUSE_TESTS=Off
-DALEMBIC_NO_OPENGL=1
-DUSE_BINARIES=ON
-DALEMBIC_ILMBASE_LINK_STATIC=On
-DALEMBIC_SHARED_LIBS=OFF
-DGLUT_INCLUDE_DIR=""
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
${ALEMBIC_HDF5_HL}
-DBUILDSTATIC=ON
-DLINKSTATIC=ON
-DALEMBIC_LIB_USES_BOOST=ON
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DUSE_STATIC_BOOST=On
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBoost_DEBUG=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DILMBASE_ROOT=${ALEMBIC_ILMBASE}
-DALEMBIC_ILMBASE_INCLUDE_DIRECTORY=${ALEMBIC_ILMBASE}/include/OpenEXR
-DALEMBIC_ILMBASE_HALF_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IMATH_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_ILMTHREAD_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IEX_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IEXMATH_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}IexMath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DUSE_PYILMBASE=0
-DUSE_PYALEMBIC=0
-DUSE_ARNOLD=0
-DUSE_MAYA=0
-DUSE_PRMAN=0
-DUSE_HDF5=Off
-DUSE_STATIC_HDF5=Off
-DHDF5_ROOT=${LIBDIR}/hdf5
-DUSE_TESTS=Off
-DALEMBIC_NO_OPENGL=1
-DUSE_BINARIES=ON
-DALEMBIC_ILMBASE_LINK_STATIC=On
-DALEMBIC_SHARED_LIBS=OFF
-DGLUT_INCLUDE_DIR=""
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
${ALEMBIC_HDF5_HL}
)
ExternalProject_Add(external_alembic
URL ${ALEMBIC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ALEMBIC_MD5}
PREFIX ${BUILD_DIR}/alembic
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/alembic -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${ALEMBIC_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/alembic
URL ${ALEMBIC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ALEMBIC_MD5}
PREFIX ${BUILD_DIR}/alembic
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/alembic -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${ALEMBIC_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/alembic
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_alembic after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/alembic ${HARVEST_TARGET}/alembic
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_alembic after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/alembic/lib/alembic.lib ${HARVEST_TARGET}/alembic/lib/alembic_d.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_alembic after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/alembic ${HARVEST_TARGET}/alembic
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_alembic after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/alembic/lib/alembic.lib ${HARVEST_TARGET}/alembic/lib/alembic_d.lib
DEPENDEES install
)
endif()
endif()
add_dependencies(
external_alembic
external_boost
external_zlib
external_ilmbase
external_openexr
external_alembic
external_boost
external_zlib
external_ilmbase
external_openexr
)

View File

@@ -1,67 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Release)
if(WIN32)
set(THUMB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../release/windows/blendthumb)
ExternalProject_Add(external_zlib_32
URL ${ZLIB_URI}
CMAKE_GENERATOR ${GENERATOR_32}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib32
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib32 ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/zlib32
)
ExternalProject_Add(external_zlib_64
URL ${ZLIB_URI}
CMAKE_GENERATOR ${GENERATOR_64}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib64
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib64 ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/zlib64
)
ExternalProject_Add(external_blendthumb_32
CMAKE_GENERATOR ${GENERATOR_32}
SOURCE_DIR ${THUMB_DIR}
PREFIX ${BUILD_DIR}/blendthumb32
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb32 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib32/include -DZLIB_LIBS=${LIBDIR}/zlib32/lib/zlibstatic.lib
INSTALL_DIR ${LIBDIR}/blendthumb32
)
add_dependencies(
external_blendthumb_32
external_zlib_32
)
ExternalProject_Add(external_blendthumb_64
CMAKE_GENERATOR ${GENERATOR_64}
SOURCE_DIR ${THUMB_DIR}
PREFIX ${BUILD_DIR}/blendthumb64
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb64 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib64/include -DZLIB_LIBS=${LIBDIR}/zlib64/lib/zlibstatic.lib
INSTALL_DIR ${LIBDIR}/blendthumb64
)
add_dependencies(
external_blendthumb_64
external_zlib_64
)
endif()
endif()

View File

@@ -17,59 +17,59 @@
# ***** END GPL LICENSE BLOCK *****
set(BLOSC_EXTRA_ARGS
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DBUILD_TESTS=OFF
-DBUILD_BENCHMARKS=OFF
-DCMAKE_DEBUG_POSTFIX=_d
-DThreads_FOUND=1
-DPTHREAD_LIBS=${LIBDIR}/pthreads/lib/pthreadVC3.lib
-DPTHREAD_INCLUDE_DIR=${LIBDIR}/pthreads/inc
-DDEACTIVATE_SNAPPY=ON
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DBUILD_TESTS=OFF
-DBUILD_BENCHMARKS=OFF
-DCMAKE_DEBUG_POSTFIX=_d
-DThreads_FOUND=1
-DPTHREAD_LIBS=${LIBDIR}/pthreads/lib/pthreadVC3.lib
-DPTHREAD_INCLUDE_DIR=${LIBDIR}/pthreads/inc
-DDEACTIVATE_SNAPPY=ON
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
)
if(WIN32)
#prevent blosc from including it's own local copy of zlib in the object file
#and cause linker errors with everybody else
set(BLOSC_EXTRA_ARGS ${BLOSC_EXTRA_ARGS}
-DPREFER_EXTERNAL_ZLIB=ON
)
# Prevent blosc from including it's own local copy of zlib in the object file
# and cause linker errors with everybody else.
set(BLOSC_EXTRA_ARGS ${BLOSC_EXTRA_ARGS}
-DPREFER_EXTERNAL_ZLIB=ON
)
endif()
ExternalProject_Add(external_blosc
URL ${BLOSC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${BLOSC_HASH}
PREFIX ${BUILD_DIR}/blosc
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/blosc/src/external_blosc < ${PATCH_DIR}/blosc.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blosc ${DEFAULT_CMAKE_FLAGS} ${BLOSC_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/blosc
URL ${BLOSC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${BLOSC_HASH}
PREFIX ${BUILD_DIR}/blosc
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/blosc/src/external_blosc < ${PATCH_DIR}/blosc.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blosc ${DEFAULT_CMAKE_FLAGS} ${BLOSC_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/blosc
)
add_dependencies(
external_blosc
external_zlib
external_blosc
external_zlib
)
if(WIN32)
add_dependencies(
external_blosc
external_pthreads
)
add_dependencies(
external_blosc
external_pthreads
)
endif()
if (WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_blosc after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc.lib ${HARVEST_TARGET}/blosc/lib/libblosc.lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/blosc/include/ ${HARVEST_TARGET}/blosc/include/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_blosc after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc_d.lib ${HARVEST_TARGET}/blosc/lib/libblosc_d.lib
DEPENDEES install
)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_blosc after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc.lib ${HARVEST_TARGET}/blosc/lib/libblosc.lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/blosc/include/ ${HARVEST_TARGET}/blosc/include/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_blosc after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc_d.lib ${HARVEST_TARGET}/blosc/lib/libblosc_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -19,91 +19,73 @@
set(BOOST_ADDRESS_MODEL 64)
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PYTHON_ARCH x64)
set(PYTHON_ARCH2 win-AMD64)
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/amd64/)
else()
set(PYTHON_ARCH x86)
set(PYTHON_ARCH2 win32)
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/win32/)
set(BOOST_ADDRESS_MODEL 32)
endif()
if(MSVC14)
set(BOOST_TOOLSET toolset=msvc-14.0)
set(BOOST_COMPILER_STRING -vc140)
endif()
set(JAM_FILE ${BUILD_DIR}/boost/src/external_boost/user-config.jam)
set(semi_path "${PATCH_DIR}/semi.txt")
FILE(TO_NATIVE_PATH ${semi_path} semi_path)
set(BOOST_CONFIGURE_COMMAND bootstrap.bat &&
echo using python : ${PYTHON_OUTPUTDIR}\\python.exe > "${JAM_FILE}" &&
echo. : ${BUILD_DIR}/python/src/external_python/include ${BUILD_DIR}/python/src/external_python/pc >> "${JAM_FILE}" &&
echo. : ${BUILD_DIR}/python/src/external_python/pcbuild >> "${JAM_FILE}" &&
type ${semi_path} >> "${JAM_FILE}"
)
set(BOOST_BUILD_COMMAND bjam)
#--user-config=user-config.jam
set(BOOST_BUILD_OPTIONS runtime-link=static )
#set(BOOST_WITH_PYTHON --with-python)
set(BOOST_HARVEST_CMD ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/ )
if(BUILD_MODE STREQUAL Release)
set(BOOST_HARVEST_CMD ${BOOST_HARVEST_CMD} && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/include/boost-1_68/ ${HARVEST_TARGET}/boost/include/)
endif()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PYTHON_ARCH x64)
set(PYTHON_ARCH2 win-AMD64)
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/amd64/)
else()
set(PYTHON_ARCH x86)
set(PYTHON_ARCH2 win32)
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/win32/)
set(BOOST_ADDRESS_MODEL 32)
endif()
if(MSVC14)
set(BOOST_TOOLSET toolset=msvc-14.0)
set(BOOST_COMPILER_STRING -vc140)
endif()
set(BOOST_CONFIGURE_COMMAND bootstrap.bat)
set(BOOST_BUILD_COMMAND bjam)
set(BOOST_BUILD_OPTIONS runtime-link=static )
set(BOOST_HARVEST_CMD ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/ )
if(BUILD_MODE STREQUAL Release)
set(BOOST_HARVEST_CMD ${BOOST_HARVEST_CMD} && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/include/boost-1_68/ ${HARVEST_TARGET}/boost/include/)
endif()
elseif(APPLE)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./b2)
set(BOOST_BUILD_OPTIONS toolset=darwin cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} --disable-icu boost.locale.icu=off)
set(BOOST_HARVEST_CMD echo .)
set(BOOST_PATCH_COMMAND echo .)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./b2)
set(BOOST_BUILD_OPTIONS toolset=darwin cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} --disable-icu boost.locale.icu=off)
set(BOOST_HARVEST_CMD echo .)
set(BOOST_PATCH_COMMAND echo .)
else()
set(BOOST_HARVEST_CMD echo .)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./b2)
set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
set(BOOST_PATCH_COMMAND echo .)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(BOOST_ADDRESS_MODEL 64)
else()
set(BOOST_ADDRESS_MODEL 32)
endif()
set(BOOST_HARVEST_CMD echo .)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./b2)
set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
set(BOOST_PATCH_COMMAND echo .)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(BOOST_ADDRESS_MODEL 64)
else()
set(BOOST_ADDRESS_MODEL 32)
endif()
endif()
set(BOOST_OPTIONS
--with-filesystem
--with-locale
--with-thread
--with-regex
--with-system
--with-date_time
--with-wave
--with-atomic
--with-serialization
--with-program_options
--with-iostreams
${BOOST_WITH_PYTHON}
${BOOST_TOOLSET}
--with-filesystem
--with-locale
--with-thread
--with-regex
--with-system
--with-date_time
--with-wave
--with-atomic
--with-serialization
--with-program_options
--with-iostreams
${BOOST_TOOLSET}
)
string(TOLOWER ${BUILD_MODE} BOOST_BUILD_TYPE)
ExternalProject_Add(external_boost
URL ${BOOST_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${BOOST_HASH}
PREFIX ${BUILD_DIR}/boost
UPDATE_COMMAND ""
PATCH_COMMAND ${BOOST_PATCH_COMMAND}
CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=x86 address-model=${BOOST_ADDRESS_MODEL} link=static threading=multi ${BOOST_OPTIONS} --prefix=${LIBDIR}/boost install
BUILD_IN_SOURCE 1
INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
URL ${BOOST_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${BOOST_HASH}
PREFIX ${BUILD_DIR}/boost
UPDATE_COMMAND ""
PATCH_COMMAND ${BOOST_PATCH_COMMAND}
CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=x86 address-model=${BOOST_ADDRESS_MODEL} link=static threading=multi ${BOOST_OPTIONS} --prefix=${LIBDIR}/boost install
BUILD_IN_SOURCE 1
INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
)
if(WIN32)
add_dependencies(
external_boost
Make_Python_Environment
)
endif()

View File

@@ -21,19 +21,19 @@ set(BZIP2_CONFIGURE_ENV echo .)
set(BZIP2_CONFIGURATION_ARGS)
if(UNIX AND NOT APPLE)
set(BZIP2_LDFLAGS "-Wl,--as-needed")
set(BZIP2_CFLAGS "-fPIC -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64")
set(BZIP2_CONFIGURE_ENV ${BZIP2_CONFIGURE_ENV} && export LDFLAGS=${BZIP2_LDFLAGS} && export CFLAGS=${BZIP2_CFLAGS}
&& export PREFIX=${BZIP2_PREFIX})
set(BZIP2_LDFLAGS "-Wl,--as-needed")
set(BZIP2_CFLAGS "-fPIC -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64")
set(BZIP2_CONFIGURE_ENV ${BZIP2_CONFIGURE_ENV} && export LDFLAGS=${BZIP2_LDFLAGS} && export CFLAGS=${BZIP2_CFLAGS}
&& export PREFIX=${BZIP2_PREFIX})
endif()
ExternalProject_Add(external_bzip2
URL ${BZIP2_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${BZIP2_HASH}
PREFIX ${BUILD_DIR}/bzip2
CONFIGURE_COMMAND echo .
BUILD_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} -j${MAKE_THREADS}
INSTALL_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} PREFIX=${BZIP2_PREFIX} install
INSTALL_DIR ${LIBDIR}/bzip2
URL ${BZIP2_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${BZIP2_HASH}
PREFIX ${BUILD_DIR}/bzip2
CONFIGURE_COMMAND echo .
BUILD_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} -j${MAKE_THREADS}
INSTALL_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} PREFIX=${BZIP2_PREFIX} install
INSTALL_DIR ${LIBDIR}/bzip2
)

View File

@@ -0,0 +1,59 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(UNIX)
if(APPLE)
set(_libtoolize_name glibtoolize)
else()
set(_libtoolize_name libtoolize)
endif()
set(_required_software
autoconf
automake
${_libtoolize_name}
nasm
yasm
tclsh
)
foreach(_software ${_required_software})
find_program(_software_find NAMES ${_software})
if(NOT _software_find)
set(_software_missing "${_software_missing}${_software} ")
endif()
unset(_software_find CACHE)
endforeach()
if(_software_missing)
message(
"\n"
"Missing software for building Blender dependencies:\n"
" ${_software_missing}\n"
"\n"
"On Debian and Ubuntu:\n"
" apt install autoconf automake libtool yasm nasm tcl\n"
"\n"
"On macOS (with homebrew):\n"
" brew install cmake autoconf automake libtool yasm nasm\n"
"\n"
"Other platforms:\n"
" Install equivalent packages.\n")
message(FATAL_ERROR "Install missing software before continuing")
endif()
endif()

View File

@@ -17,47 +17,47 @@
# ***** END GPL LICENSE BLOCK *****
set(CLANG_EXTRA_ARGS
-DCLANG_PATH_TO_LLVM_SOURCE=${BUILD_DIR}/ll/src/ll
-DCLANG_PATH_TO_LLVM_BUILD=${LIBDIR}/llvm
-DLLVM_USE_CRT_RELEASE=MT
-DLLVM_USE_CRT_DEBUG=MTd
-DLLVM_CONFIG=${LIBDIR}/llvm/bin/llvm-config
-DCLANG_PATH_TO_LLVM_SOURCE=${BUILD_DIR}/ll/src/ll
-DCLANG_PATH_TO_LLVM_BUILD=${LIBDIR}/llvm
-DLLVM_USE_CRT_RELEASE=MT
-DLLVM_USE_CRT_DEBUG=MTd
-DLLVM_CONFIG=${LIBDIR}/llvm/bin/llvm-config
)
if(WIN32)
set(CLANG_GENERATOR "Ninja")
set(CLANG_GENERATOR "Ninja")
else()
set(CLANG_GENERATOR "Unix Makefiles")
set(CLANG_GENERATOR "Unix Makefiles")
endif()
ExternalProject_Add(external_clang
URL ${CLANG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CLANG_HASH}
PREFIX ${BUILD_DIR}/clang
CMAKE_GENERATOR ${CLANG_GENERATOR}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clang ${DEFAULT_CMAKE_FLAGS} ${CLANG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/clang
URL ${CLANG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CLANG_HASH}
PREFIX ${BUILD_DIR}/clang
CMAKE_GENERATOR ${CLANG_GENERATOR}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clang ${DEFAULT_CMAKE_FLAGS} ${CLANG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/clang
)
if(MSVC)
if(BUILD_MODE STREQUAL Release)
set(CLANG_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/ ${HARVEST_TARGET}/llvm/)
else()
set(CLANG_HARVEST_COMMAND
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/bin/ ${HARVEST_TARGET}/llvm/debug/bin/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/include/ ${HARVEST_TARGET}/llvm/debug/include/
)
endif()
ExternalProject_Add_Step(external_clang after_install
COMMAND ${CLANG_HARVEST_COMMAND}
DEPENDEES mkdir update patch download configure build install
)
if(BUILD_MODE STREQUAL Release)
set(CLANG_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/ ${HARVEST_TARGET}/llvm/)
else()
set(CLANG_HARVEST_COMMAND
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/bin/ ${HARVEST_TARGET}/llvm/debug/bin/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/include/ ${HARVEST_TARGET}/llvm/debug/include/
)
endif()
ExternalProject_Add_Step(external_clang after_install
COMMAND ${CLANG_HARVEST_COMMAND}
DEPENDEES mkdir update patch download configure build install
)
endif()
add_dependencies(
external_clang
ll
external_clang
ll
)

View File

@@ -19,10 +19,10 @@
set(CLEW_EXTRA_ARGS)
ExternalProject_Add(external_clew
URL ${CLEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CLEW_HASH}
PREFIX ${BUILD_DIR}/clew
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CLEW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/clew
URL ${CLEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CLEW_HASH}
PREFIX ${BUILD_DIR}/clew
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CLEW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/clew
)

View File

@@ -19,11 +19,11 @@
set(CUEW_EXTRA_ARGS)
ExternalProject_Add(external_cuew
URL ${CUEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CUEW_HASH}
PREFIX ${BUILD_DIR}/cuew
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/cuew/src/external_cuew < ${PATCH_DIR}/cuew.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/cuew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CUEW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/cuew
URL ${CUEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CUEW_HASH}
PREFIX ${BUILD_DIR}/cuew
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/cuew/src/external_cuew < ${PATCH_DIR}/cuew.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/cuew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CUEW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/cuew
)

View File

@@ -20,50 +20,50 @@
# library itself does not depend on them, so should give no problems.
set(EMBREE_EXTRA_ARGS
-DEMBREE_ISPC_SUPPORT=OFF
-DEMBREE_TUTORIALS=OFF
-DEMBREE_STATIC_LIB=ON
-DEMBREE_RAY_MASK=ON
-DEMBREE_FILTER_FUNCTION=ON
-DEMBREE_BACKFACE_CULLING=OFF
-DEMBREE_TASKING_SYSTEM=INTERNAL
-DEMBREE_MAX_ISA=AVX2
-DEMBREE_ISPC_SUPPORT=OFF
-DEMBREE_TUTORIALS=OFF
-DEMBREE_STATIC_LIB=ON
-DEMBREE_RAY_MASK=ON
-DEMBREE_FILTER_FUNCTION=ON
-DEMBREE_BACKFACE_CULLING=OFF
-DEMBREE_TASKING_SYSTEM=INTERNAL
-DEMBREE_MAX_ISA=AVX2
)
if(WIN32)
set(EMBREE_BUILD_DIR ${BUILD_MODE}/)
set(EMBREE_BUILD_DIR ${BUILD_MODE}/)
else()
set(EMBREE_BUILD_DIR)
set(EMBREE_BUILD_DIR)
endif()
ExternalProject_Add(external_embree
URL ${EMBREE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${EMBREE_HASH}
PREFIX ${BUILD_DIR}/embree
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/embree
URL ${EMBREE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${EMBREE_HASH}
PREFIX ${BUILD_DIR}/embree
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/embree
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_embree after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/embree ${HARVEST_TARGET}/embree
DEPENDEES install
)
else()
ExternalProject_Add_Step(external_embree after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree3.lib ${HARVEST_TARGET}/embree/lib/embree3_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx.lib ${HARVEST_TARGET}/embree/lib/embree_avx_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx2.lib ${HARVEST_TARGET}/embree/lib/embree_avx2_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_sse42.lib ${HARVEST_TARGET}/embree/lib/embree_sse42_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/lexers.lib ${HARVEST_TARGET}/embree/lib/lexers_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/math.lib ${HARVEST_TARGET}/embree/lib/math_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/simd.lib ${HARVEST_TARGET}/embree/lib/simd_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/sys.lib ${HARVEST_TARGET}/embree/lib/sys_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/tasking.lib ${HARVEST_TARGET}/embree/lib/tasking_d.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_embree after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/embree ${HARVEST_TARGET}/embree
DEPENDEES install
)
else()
ExternalProject_Add_Step(external_embree after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree3.lib ${HARVEST_TARGET}/embree/lib/embree3_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx.lib ${HARVEST_TARGET}/embree/lib/embree_avx_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx2.lib ${HARVEST_TARGET}/embree/lib/embree_avx2_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_sse42.lib ${HARVEST_TARGET}/embree/lib/embree_sse42_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/lexers.lib ${HARVEST_TARGET}/embree/lib/lexers_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/math.lib ${HARVEST_TARGET}/embree/lib/math_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/simd.lib ${HARVEST_TARGET}/embree/lib/simd_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/sys.lib ${HARVEST_TARGET}/embree/lib/sys_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/tasking.lib ${HARVEST_TARGET}/embree/lib/tasking_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -18,23 +18,23 @@
set(FAAD_EXTRA_ARGS)
if (WIN32)
set(FAAD_EXTRA_CONFIGURE "utils\\win32\\ac2ver.exe" "faad2" "configure.ac" > libfaad\\win32_ver.h)
if(WIN32)
set(FAAD_EXTRA_CONFIGURE "utils\\win32\\ac2ver.exe" "faad2" "configure.ac" > libfaad\\win32_ver.h)
else()
set(FAAD_EXTRA_CONFIGURE echo .)
set(FAAD_EXTRA_CONFIGURE echo .)
endif()
ExternalProject_Add(external_faad
URL ${FAAD_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FAAD_HASH}
PREFIX ${BUILD_DIR}/faad
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && ${FAAD_EXTRA_CONFIGURE} && ${CONFIGURE_COMMAND} --disable-shared --enable-static --prefix=${LIBDIR}/faad
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make install
INSTALL_DIR ${LIBDIR}/faad
URL ${FAAD_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FAAD_HASH}
PREFIX ${BUILD_DIR}/faad
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && ${FAAD_EXTRA_CONFIGURE} && ${CONFIGURE_COMMAND} --disable-shared --enable-static --prefix=${LIBDIR}/faad
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make install
INSTALL_DIR ${LIBDIR}/faad
)
if(MSVC)
set_target_properties(external_faad PROPERTIES FOLDER Mingw)
set_target_properties(external_faad PROPERTIES FOLDER Mingw)
endif()

View File

@@ -17,24 +17,24 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_ffi
URL ${FFI_URI}
URL_HASH SHA256=${FFI_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/ffi
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ffi
--enable-shared=no
--enable-static=yes
--with-pic
--libdir=${LIBDIR}/ffi/lib/
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make install
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/ffi/src/external_ffi < ${PATCH_DIR}/ffi.diff
INSTALL_DIR ${LIBDIR}/ffi
URL ${FFI_URI}
URL_HASH SHA256=${FFI_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/ffi
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ffi
--enable-shared=no
--enable-static=yes
--with-pic
--libdir=${LIBDIR}/ffi/lib/
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make install
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/ffi/src/external_ffi < ${PATCH_DIR}/ffi.diff
INSTALL_DIR ${LIBDIR}/ffi
)
if (UNIX AND NOT APPLE)
ExternalProject_Add_Step(external_ffi after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/ffi/lib/libffi.a ${LIBDIR}/ffi/lib/libffi_pic.a
DEPENDEES install
)
if(UNIX AND NOT APPLE)
ExternalProject_Add_Step(external_ffi after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/ffi/lib/libffi.a ${LIBDIR}/ffi/lib/libffi_pic.a
DEPENDEES install
)
endif()

View File

@@ -16,137 +16,139 @@
#
# ***** END GPL LICENSE BLOCK *****
set(FFMPEG_CFLAGS "-I${mingw_LIBDIR}/lame/include -I${mingw_LIBDIR}/openjpeg/include/ -I${mingw_LIBDIR}/ogg/include -I${mingw_LIBDIR}/vorbis/include -I${mingw_LIBDIR}/theora/include -I${mingw_LIBDIR}/vpx/include -I${mingw_LIBDIR}/x264/include -I${mingw_LIBDIR}/xvidcore/include -I${mingw_LIBDIR}/zlib/include")
set(FFMPEG_LDFLAGS "-L${mingw_LIBDIR}/lame/lib -L${mingw_LIBDIR}/openjpeg/lib -L${mingw_LIBDIR}/ogg/lib -L${mingw_LIBDIR}/vorbis/lib -L${mingw_LIBDIR}/theora/lib -L${mingw_LIBDIR}/vpx/lib -L${mingw_LIBDIR}/x264/lib -L${mingw_LIBDIR}/xvidcore/lib -L${mingw_LIBDIR}/zlib/lib")
set(FFMPEG_CFLAGS "-I${mingw_LIBDIR}/lame/include -I${mingw_LIBDIR}/openjpeg/include/ -I${mingw_LIBDIR}/ogg/include -I${mingw_LIBDIR}/vorbis/include -I${mingw_LIBDIR}/theora/include -I${mingw_LIBDIR}/opus/include -I${mingw_LIBDIR}/vpx/include -I${mingw_LIBDIR}/x264/include -I${mingw_LIBDIR}/xvidcore/include -I${mingw_LIBDIR}/zlib/include")
set(FFMPEG_LDFLAGS "-L${mingw_LIBDIR}/lame/lib -L${mingw_LIBDIR}/openjpeg/lib -L${mingw_LIBDIR}/ogg/lib -L${mingw_LIBDIR}/vorbis/lib -L${mingw_LIBDIR}/theora/lib -L${mingw_LIBDIR}/opus/lib -L${mingw_LIBDIR}/vpx/lib -L${mingw_LIBDIR}/x264/lib -L${mingw_LIBDIR}/xvidcore/lib -L${mingw_LIBDIR}/zlib/lib")
set(FFMPEG_EXTRA_FLAGS --pkg-config-flags=--static --extra-cflags=${FFMPEG_CFLAGS} --extra-ldflags=${FFMPEG_LDFLAGS})
set(FFMPEG_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/x264/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR})
set(FFMPEG_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/x264/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR}:${mingw_LIBDIR}/vpx/lib/pkgconfig:${mingw_LIBDIR}/theora/lib/pkgconfig:${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/opus/lib/pkgconfig:)
if(WIN32)
set(FFMPEG_ENV set ${FFMPEG_ENV} &&)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--disable-static
--enable-shared
--enable-w32threads
--disable-pthreads
--enable-libopenjpeg
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--x86asmexe=yasm
)
endif()
set(FFMPEG_ENV set ${FFMPEG_ENV} &&)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--disable-static
--enable-shared
--enable-w32threads
--disable-pthreads
--enable-libopenjpeg
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--x86asmexe=yasm
)
endif()
else()
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--enable-static
--disable-shared
--enable-libopenjpeg
)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--enable-static
--disable-shared
--enable-libopenjpeg
)
endif()
if(APPLE)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--target-os=darwin
)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--target-os=darwin
)
endif()
ExternalProject_Add(external_ffmpeg
URL ${FFMPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FFMPEG_HASH}
# OpenJpeg is compiled with pthread support on Linux, which is all fine and is what we
# want for maximum runtime performance, but due to static nature of that library we
# need to force ffmpeg to link against pthread, otherwise test program used by autoconf
# will fail. This patch does that in a way that is compatible with multiple distributions.
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${PATCH_DIR}/ffmpeg.diff
PREFIX ${BUILD_DIR}/ffmpeg
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} &&
cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ &&
${FFMPEG_ENV} ${CONFIGURE_COMMAND_NO_TARGET} ${FFMPEG_EXTRA_FLAGS}
--disable-lzma
--disable-avfilter
--disable-vdpau
--disable-bzlib
--disable-libgsm
--disable-libspeex
--enable-libvpx
--prefix=${LIBDIR}/ffmpeg
--enable-libtheora
--enable-libvorbis
--enable-zlib
--enable-stripping
--enable-runtime-cpudetect
--disable-vaapi
--disable-nonfree
--enable-gpl
--disable-postproc
--enable-libmp3lame
--disable-librtmp
--enable-libx264
--enable-libxvid
--disable-libopencore-amrnb
--disable-libopencore-amrwb
--disable-libdc1394
--disable-version3
--disable-debug
--enable-optimizations
--disable-sse
--disable-ssse3
--enable-ffplay
--disable-openssl
--disable-securetransport
--disable-indev=avfoundation
--disable-indev=qtkit
--disable-sdl2
--disable-gnutls
--disable-videotoolbox
--disable-libxcb
--disable-xlib
--disable-audiotoolbox
--disable-cuvid
--disable-nvenc
--disable-indev=jack
--disable-indev=alsa
--disable-outdev=alsa
--disable-crystalhd
--disable-sndio
BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make install
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ffmpeg ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/ffmpeg
URL ${FFMPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FFMPEG_HASH}
# OpenJpeg is compiled with pthread support on Linux, which is all fine and is what we
# want for maximum runtime performance, but due to static nature of that library we
# need to force ffmpeg to link against pthread, otherwise test program used by autoconf
# will fail. This patch does that in a way that is compatible with multiple distributions.
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${PATCH_DIR}/ffmpeg.diff
PREFIX ${BUILD_DIR}/ffmpeg
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} &&
cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ &&
${FFMPEG_ENV} ${CONFIGURE_COMMAND_NO_TARGET} ${FFMPEG_EXTRA_FLAGS}
--disable-lzma
--disable-avfilter
--disable-vdpau
--disable-bzlib
--disable-libgsm
--disable-libspeex
--enable-libvpx
--enable-libopus
--prefix=${LIBDIR}/ffmpeg
--enable-libtheora
--enable-libvorbis
--enable-zlib
--enable-stripping
--enable-runtime-cpudetect
--disable-vaapi
--disable-nonfree
--enable-gpl
--disable-postproc
--enable-libmp3lame
--disable-librtmp
--enable-libx264
--enable-libxvid
--disable-libopencore-amrnb
--disable-libopencore-amrwb
--disable-libdc1394
--disable-version3
--disable-debug
--enable-optimizations
--disable-sse
--disable-ssse3
--enable-ffplay
--disable-openssl
--disable-securetransport
--disable-indev=avfoundation
--disable-indev=qtkit
--disable-sdl2
--disable-gnutls
--disable-videotoolbox
--disable-libxcb
--disable-xlib
--disable-audiotoolbox
--disable-cuvid
--disable-nvenc
--disable-indev=jack
--disable-indev=alsa
--disable-outdev=alsa
--disable-crystalhd
--disable-sndio
BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make install
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ffmpeg ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/ffmpeg
)
if(MSVC)
set_target_properties(external_ffmpeg PROPERTIES FOLDER Mingw)
set_target_properties(external_ffmpeg PROPERTIES FOLDER Mingw)
endif()
add_dependencies(
external_ffmpeg
external_zlib
external_faad
external_openjpeg
external_xvidcore
external_x264
external_vpx
external_theora
external_vorbis
external_ogg
external_lame
external_ffmpeg
external_zlib
external_faad
external_openjpeg
external_xvidcore
external_x264
external_opus
external_vpx
external_theora
external_vorbis
external_ogg
external_lame
)
if(WIN32)
add_dependencies(
external_ffmpeg
external_zlib_mingw
)
add_dependencies(
external_ffmpeg
external_zlib_mingw
)
endif()
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_ffmpeg after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/include ${HARVEST_TARGET}/ffmpeg/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/bin ${HARVEST_TARGET}/ffmpeg/lib
DEPENDEES install
)
ExternalProject_Add_Step(external_ffmpeg after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/include ${HARVEST_TARGET}/ffmpeg/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/bin ${HARVEST_TARGET}/ffmpeg/lib
DEPENDEES install
)
endif()

View File

@@ -19,29 +19,29 @@
set(FFTW_EXTRA_ARGS)
if(WIN32)
set(FFTW3_ENV set CFLAGS=-fno-stack-check -fno-stack-protector -mno-stack-arg-probe -fno-lto &&)
set(FFTW3_PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/fftw3/src/external_fftw3 < ${PATCH_DIR}/fftw3.diff)
set(FFTW3_ENV set CFLAGS=-fno-stack-check -fno-stack-protector -mno-stack-arg-probe -fno-lto &&)
set(FFTW3_PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/fftw3/src/external_fftw3 < ${PATCH_DIR}/fftw3.diff)
endif()
ExternalProject_Add(external_fftw3
URL ${FFTW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FFTW_HASH}
PREFIX ${BUILD_DIR}/fftw3
CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${FFTW3_ENV} cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/fftw3
PATCH_COMMAND ${FFTW3_PATCH_COMMAND}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make install
INSTALL_DIR ${LIBDIR}/fftw3
URL ${FFTW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FFTW_HASH}
PREFIX ${BUILD_DIR}/fftw3
CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${FFTW3_ENV} cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/fftw3
PATCH_COMMAND ${FFTW3_PATCH_COMMAND}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make install
INSTALL_DIR ${LIBDIR}/fftw3
)
if(MSVC)
set_target_properties(external_fftw3 PROPERTIES FOLDER Mingw)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_fftw3 after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.a ${HARVEST_TARGET}/fftw3/lib/libfftw.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/include/fftw3.h ${HARVEST_TARGET}/fftw3/include/fftw3.h
DEPENDEES install
)
endif()
set_target_properties(external_fftw3 PROPERTIES FOLDER Mingw)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_fftw3 after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.a ${HARVEST_TARGET}/fftw3/lib/libfftw.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/include/fftw3.h ${HARVEST_TARGET}/fftw3/include/fftw3.h
DEPENDEES install
)
endif()
endif()

View File

@@ -17,16 +17,16 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_flac
URL ${FLAC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${FLAC_HASH}
PREFIX ${BUILD_DIR}/flac
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/flac --disable-shared --enable-static
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make install
INSTALL_DIR ${LIBDIR}/flac
URL ${FLAC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${FLAC_HASH}
PREFIX ${BUILD_DIR}/flac
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/flac --disable-shared --enable-static
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make install
INSTALL_DIR ${LIBDIR}/flac
)
if(MSVC)
set_target_properties(external_flac PROPERTIES FOLDER Mingw)
set_target_properties(external_flac PROPERTIES FOLDER Mingw)
endif()

View File

@@ -19,13 +19,13 @@
set(FLEXBISON_EXTRA_ARGS)
ExternalProject_Add(external_flexbison
URL ${FLEXBISON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FLEXBISON_HASH}
PREFIX ${BUILD_DIR}/flexbison
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/flexbison ${DEFAULT_CMAKE_FLAGS} ${FLEXBISON_EXTRA_ARGS}
CONFIGURE_COMMAND echo .
BUILD_COMMAND echo .
INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/flexbison/src/external_flexbison/ ${LIBDIR}/flexbison/
INSTALL_DIR ${LIBDIR}/flexbison
URL ${FLEXBISON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FLEXBISON_HASH}
PREFIX ${BUILD_DIR}/flexbison
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/flexbison ${DEFAULT_CMAKE_FLAGS} ${FLEXBISON_EXTRA_ARGS}
CONFIGURE_COMMAND echo .
BUILD_COMMAND echo .
INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/flexbison/src/external_flexbison/ ${LIBDIR}/flexbison/
INSTALL_DIR ${LIBDIR}/flexbison
)

View File

@@ -17,19 +17,19 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
if(BUILD_MODE STREQUAL Release)
set(FREEGLUT_EXTRA_ARGS
-DFREEGLUT_BUILD_SHARED_LIBS=Off
-DFREEGLUT_BUILD_STATIC_LIBS=On
)
if(BUILD_MODE STREQUAL Release)
set(FREEGLUT_EXTRA_ARGS
-DFREEGLUT_BUILD_SHARED_LIBS=Off
-DFREEGLUT_BUILD_STATIC_LIBS=On
)
ExternalProject_Add(external_freeglut
URL ${FREEGLUT_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FREEGLUT_HASH}
PREFIX ${BUILD_DIR}/freeglut
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freeglut ${DEFAULT_C_FLAGS} ${DEFAULT_CXX_FLAGS} ${FREEGLUT_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/freeglut
)
endif()
ExternalProject_Add(external_freeglut
URL ${FREEGLUT_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FREEGLUT_HASH}
PREFIX ${BUILD_DIR}/freeglut
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freeglut ${DEFAULT_C_FLAGS} ${DEFAULT_CXX_FLAGS} ${FREEGLUT_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/freeglut
)
endif()
endif()

View File

@@ -17,28 +17,28 @@
# ***** END GPL LICENSE BLOCK *****
set(FREETYPE_EXTRA_ARGS
-DCMAKE_RELEASE_POSTFIX:STRING=2ST
-DCMAKE_DEBUG_POSTFIX:STRING=2ST_d
-DWITH_BZip2=OFF
-DWITH_HarfBuzz=OFF
-DFT_WITH_HARFBUZZ=OFF
-DFT_WITH_BZIP2=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE)
-DCMAKE_RELEASE_POSTFIX:STRING=2ST
-DCMAKE_DEBUG_POSTFIX:STRING=2ST_d
-DWITH_BZip2=OFF
-DWITH_HarfBuzz=OFF
-DFT_WITH_HARFBUZZ=OFF
-DFT_WITH_BZIP2=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE)
ExternalProject_Add(external_freetype
URL ${FREETYPE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FREETYPE_HASH}
PREFIX ${BUILD_DIR}/freetype
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freetype ${DEFAULT_CMAKE_FLAGS} ${FREETYPE_EXTRA_ARGS}
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/freetype/src/external_freetype < ${PATCH_DIR}/freetype.diff
INSTALL_DIR ${LIBDIR}/freetype
URL ${FREETYPE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FREETYPE_HASH}
PREFIX ${BUILD_DIR}/freetype
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freetype ${DEFAULT_CMAKE_FLAGS} ${FREETYPE_EXTRA_ARGS}
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/freetype/src/external_freetype < ${PATCH_DIR}/freetype.diff
INSTALL_DIR ${LIBDIR}/freetype
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_freetype after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype
DEPENDEES install
)
ExternalProject_Add_Step(external_freetype after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype
DEPENDEES install
)
endif()

View File

@@ -17,16 +17,16 @@
# ***** END GPL LICENSE BLOCK *****
set(GLEW_EXTRA_ARGS
-DBUILD_UTILS=Off
-DBUILD_SHARED_LIBS=Off
-DBUILD_UTILS=Off
-DBUILD_SHARED_LIBS=Off
)
ExternalProject_Add(external_glew
URL ${GLEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${GLEW_HASH}
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_glew.txt ${BUILD_DIR}/glew/src/external_glew/CMakeLists.txt
PREFIX ${BUILD_DIR}/glew
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glew ${DEFAULT_CMAKE_FLAGS} ${GLEW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/glew
URL ${GLEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${GLEW_HASH}
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_glew.txt ${BUILD_DIR}/glew/src/external_glew/CMakeLists.txt
PREFIX ${BUILD_DIR}/glew
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glew ${DEFAULT_CMAKE_FLAGS} ${GLEW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/glew
)

View File

@@ -19,10 +19,10 @@
set(GLFW_EXTRA_ARGS)
ExternalProject_Add(external_glfw
URL ${GLFW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${GLFW_HASH}
PREFIX ${BUILD_DIR}/glfw
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glfw -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${GLFW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/glfw
URL ${GLFW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${GLFW_HASH}
PREFIX ${BUILD_DIR}/glfw
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glfw -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${GLFW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/glfw
)

View File

@@ -21,90 +21,87 @@
########################################################################
if(NOT DEFINED HARVEST_TARGET)
set(HARVEST_TARGET ${CMAKE_CURRENT_SOURCE_DIR}/Harvest)
set(HARVEST_TARGET ${CMAKE_CURRENT_SOURCE_DIR}/Harvest)
endif()
message("HARVEST_TARGET = ${HARVEST_TARGET}")
if(WIN32)
if(BUILD_MODE STREQUAL Release)
add_custom_target(Harvest_Release_Results
COMMAND # jpeg rename libfile + copy include
${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
# OpenImageIO
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/include ${HARVEST_TARGET}/OpenImageIO/include &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/lib ${HARVEST_TARGET}/OpenImageIO/lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/idiff.exe ${HARVEST_TARGET}/OpenImageIO/bin/idiff.exe &&
# png
${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_static.lib ${HARVEST_TARGET}/png/lib/libpng.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ ${HARVEST_TARGET}/png/include/ &&
# freeglut-> opengl
${CMAKE_COMMAND} -E copy ${LIBDIR}/freeglut/lib/freeglut_static.lib ${HARVEST_TARGET}/opengl/lib/freeglut_static.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freeglut/include/ ${HARVEST_TARGET}/opengl/include/ &&
# glew-> opengl
${CMAKE_COMMAND} -E copy ${LIBDIR}/glew/lib/libglew32.lib ${HARVEST_TARGET}/opengl/lib/glew.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/glew/include/ ${HARVEST_TARGET}/opengl/include/ &&
# sndfile
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/lib/libsndfile.dll.a ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h &&
# tiff
${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiff.lib ${HARVEST_TARGET}/tiff/lib/libtiff.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tiff/include/ ${HARVEST_TARGET}/tiff/include/ &&
# BlendThumb
${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb64/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb64.dll &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb32/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb.dll &&
# hidapi
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hidapi/ ${HARVEST_TARGET}/hidapi/ &&
# webp, straight up copy
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/webp ${HARVEST_TARGET}/webp &&
DEPENDS
)
add_custom_target(Harvest_Release_Results
COMMAND # jpeg rename libfile + copy include
${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
# OpenImageIO
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/include ${HARVEST_TARGET}/OpenImageIO/include &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/lib ${HARVEST_TARGET}/OpenImageIO/lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/idiff.exe ${HARVEST_TARGET}/OpenImageIO/bin/idiff.exe &&
# png
${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_static.lib ${HARVEST_TARGET}/png/lib/libpng.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ ${HARVEST_TARGET}/png/include/ &&
# freeglut-> opengl
${CMAKE_COMMAND} -E copy ${LIBDIR}/freeglut/lib/freeglut_static.lib ${HARVEST_TARGET}/opengl/lib/freeglut_static.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freeglut/include/ ${HARVEST_TARGET}/opengl/include/ &&
# glew-> opengl
${CMAKE_COMMAND} -E copy ${LIBDIR}/glew/lib/libglew32.lib ${HARVEST_TARGET}/opengl/lib/glew.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/glew/include/ ${HARVEST_TARGET}/opengl/include/ &&
# sndfile
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/lib/libsndfile.dll.a ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h &&
# tiff
${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiff.lib ${HARVEST_TARGET}/tiff/lib/libtiff.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tiff/include/ ${HARVEST_TARGET}/tiff/include/ &&
# hidapi
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hidapi/ ${HARVEST_TARGET}/hidapi/ &&
# webp, straight up copy
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/webp ${HARVEST_TARGET}/webp &&
DEPENDS
)
endif()
if(BUILD_MODE STREQUAL Debug)
add_custom_target(Harvest_Debug_Results
# OpenImageIO
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_Util.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_Util_d.lib &&
# python
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/ &&
# hdf5
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hdf5/lib ${HARVEST_TARGET}/hdf5/lib &&
# numpy
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}d.tar.gz &&
# python
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz
DEPENDS Package_Python
)
add_custom_target(Harvest_Debug_Results
# OpenImageIO
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_Util.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_Util_d.lib &&
# python
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/ &&
# hdf5
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hdf5/lib ${HARVEST_TARGET}/hdf5/lib &&
# numpy
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}d.tar.gz &&
# python
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz
DEPENDS Package_Python
)
endif()
else(WIN32)
function(harvest from to)
set(pattern "")
foreach(f ${ARGN})
set(pattern ${f})
endforeach()
set(pattern "")
foreach(f ${ARGN})
set(pattern ${f})
endforeach()
if(pattern STREQUAL "")
get_filename_component(dirpath ${to} DIRECTORY)
get_filename_component(filename ${to} NAME)
install(
FILES ${LIBDIR}/${from}
DESTINATION ${HARVEST_TARGET}/${dirpath}
RENAME ${filename})
else()
install(
DIRECTORY ${LIBDIR}/${from}/
DESTINATION ${HARVEST_TARGET}/${to}
USE_SOURCE_PERMISSIONS
FILES_MATCHING PATTERN ${pattern}
PATTERN "pkgconfig" EXCLUDE
PATTERN "cmake" EXCLUDE
PATTERN "__pycache__" EXCLUDE
PATTERN "tests" EXCLUDE)
endif()
if(pattern STREQUAL "")
get_filename_component(dirpath ${to} DIRECTORY)
get_filename_component(filename ${to} NAME)
install(
FILES ${LIBDIR}/${from}
DESTINATION ${HARVEST_TARGET}/${dirpath}
RENAME ${filename})
else()
install(
DIRECTORY ${LIBDIR}/${from}/
DESTINATION ${HARVEST_TARGET}/${to}
USE_SOURCE_PERMISSIONS
FILES_MATCHING PATTERN ${pattern}
PATTERN "pkgconfig" EXCLUDE
PATTERN "cmake" EXCLUDE
PATTERN "__pycache__" EXCLUDE
PATTERN "tests" EXCLUDE)
endif()
endfunction()
harvest(alembic/include alembic/include "*.h")
@@ -129,28 +126,30 @@ harvest(jpg/include jpeg/include "*.h")
harvest(jpg/lib jpeg/lib "libjpeg.a")
harvest(lame/lib ffmpeg/lib "*.a")
harvest(clang/bin llvm/bin "clang-format")
harvest(clang/include llvm/include "*")
harvest(llvm/include llvm/include "*")
harvest(llvm/bin llvm/bin "llvm-config")
harvest(llvm/lib llvm/lib "libLLVM*.a")
if(APPLE)
harvest(openmp/lib openmp/lib "*")
harvest(openmp/include openmp/include "*.h")
harvest(openmp/lib openmp/lib "*")
harvest(openmp/include openmp/include "*.h")
endif()
harvest(ogg/lib ffmpeg/lib "*.a")
harvest(openal/include openal/include "*.h")
if(UNIX AND NOT APPLE)
harvest(openal/lib openal/lib "*.a")
harvest(openal/lib openal/lib "*.a")
harvest(blosc/include blosc/include "*.h")
harvest(blosc/lib blosc/lib "*.a")
harvest(blosc/include blosc/include "*.h")
harvest(blosc/lib blosc/lib "*.a")
harvest(zlib/include zlib/include "*.h")
harvest(zlib/lib zlib/lib "*.a")
harvest(zlib/include zlib/include "*.h")
harvest(zlib/lib zlib/lib "*.a")
harvest(xml2/include xml2/include "*.h")
harvest(xml2/lib xml2/lib "*.a")
harvest(xml2/include xml2/include "*.h")
harvest(xml2/lib xml2/lib "*.a")
else()
harvest(blosc/lib openvdb/lib "*.a")
harvest(xml2/lib opencollada/lib "*.a")
harvest(blosc/lib openvdb/lib "*.a")
harvest(xml2/lib opencollada/lib "*.a")
endif()
harvest(opencollada/include/opencollada opencollada/include "*.h")
harvest(opencollada/lib/opencollada opencollada/lib "*.a")
@@ -164,6 +163,8 @@ harvest(openimageio/bin openimageio/bin "maketx")
harvest(openimageio/bin openimageio/bin "oiiotool")
harvest(openimageio/include openimageio/include "*")
harvest(openimageio/lib openimageio/lib "*.a")
harvest(openimagedenoise/include openimagedenoise/include "*")
harvest(openimagedenoise/lib openimagedenoise/lib "*.a")
harvest(openjpeg/include/openjpeg-2.3 openjpeg/include "*.h")
harvest(openjpeg/lib openjpeg/lib "*.a")
harvest(opensubdiv/include opensubdiv/include "*.h")
@@ -191,6 +192,7 @@ harvest(theora/lib ffmpeg/lib "*.a")
harvest(tiff/include tiff/include "*.h")
harvest(tiff/lib tiff/lib "*.a")
harvest(vorbis/lib ffmpeg/lib "*.a")
harvest(opus/lib ffmpeg/lib "*.a")
harvest(vpx/lib ffmpeg/lib "*.a")
harvest(webp/lib ffmpeg/lib "*.a")
harvest(x264/lib ffmpeg/lib "*.a")
@@ -198,4 +200,9 @@ harvest(xvidcore/lib ffmpeg/lib "*.a")
harvest(embree/include embree/include "*.h")
harvest(embree/lib embree/lib "*.a")
if(UNIX AND NOT APPLE)
harvest(libglu/lib mesa/lib "*.so*")
harvest(mesa/lib mesa/lib "*.so*")
endif()
endif()

View File

@@ -17,26 +17,26 @@
# ***** END GPL LICENSE BLOCK *****
set(HDF5_EXTRA_ARGS
-DHDF5_ENABLE_THREADSAFE=Off
-DHDF5_BUILD_CPP_LIB=Off
-DBUILD_TESTING=Off
-DHDF5_BUILD_TOOLS=Off
-DHDF5_BUILD_EXAMPLES=Off
-DHDF5_BUILD_HL_LIB=On
-DBUILD_STATIC_CRT_LIBS=On
-DBUILD_SHARED_LIBS=On
-DHDF5_ENABLE_THREADSAFE=Off
-DHDF5_BUILD_CPP_LIB=Off
-DBUILD_TESTING=Off
-DHDF5_BUILD_TOOLS=Off
-DHDF5_BUILD_EXAMPLES=Off
-DHDF5_BUILD_HL_LIB=On
-DBUILD_STATIC_CRT_LIBS=On
-DBUILD_SHARED_LIBS=On
)
if(WIN32)
set(HDF5_PATCH ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/hdf5/src/external_hdf5 < ${PATCH_DIR}/hdf5.diff)
set(HDF5_PATCH ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/hdf5/src/external_hdf5 < ${PATCH_DIR}/hdf5.diff)
endif()
ExternalProject_Add(external_hdf5
URL ${HDF5_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${HDF5_HASH}
PREFIX ${BUILD_DIR}/hdf5
PATCH_COMMAND ${HDF5_PATCH}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hdf5 ${HDF5_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/hdf5
URL ${HDF5_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${HDF5_HASH}
PREFIX ${BUILD_DIR}/hdf5
PATCH_COMMAND ${HDF5_PATCH}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hdf5 ${HDF5_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/hdf5
)

View File

@@ -19,11 +19,11 @@
set(HIDAPI_EXTRA_ARGS)
ExternalProject_Add(external_hidapi
URL ${HIDAPI_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${HIDAPI_HASH}
PREFIX ${BUILD_DIR}/hidapi
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_hidapi.txt ${BUILD_DIR}/hidapi/src/external_hidapi/cmakelists.txt && ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/hidapi/src/external_hidapi < ${PATCH_DIR}/hidapi.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hidapi -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${HIDAPI_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/hidapi
URL ${HIDAPI_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${HIDAPI_HASH}
PREFIX ${BUILD_DIR}/hidapi
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_hidapi.txt ${BUILD_DIR}/hidapi/src/external_hidapi/cmakelists.txt && ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/hidapi/src/external_hidapi < ${PATCH_DIR}/hidapi.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hidapi -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${HIDAPI_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/hidapi
)

View File

@@ -19,23 +19,23 @@
set(ICONV_EXTRA_ARGS)
ExternalProject_Add(external_iconv
URL ${ICONV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ICONV_HASH}
PREFIX ${BUILD_DIR}/iconv
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/iconv
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make install
INSTALL_DIR ${LIBDIR}/iconv
URL ${ICONV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ICONV_HASH}
PREFIX ${BUILD_DIR}/iconv
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/iconv
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make install
INSTALL_DIR ${LIBDIR}/iconv
)
if(MSVC)
set_target_properties(external_iconv PROPERTIES FOLDER Mingw)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_iconv after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/lib/libiconv.a ${HARVEST_TARGET}/iconv/lib/iconv.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/include/iconv.h ${HARVEST_TARGET}/iconv/include/iconv.h
DEPENDEES install
)
endif()
set_target_properties(external_iconv PROPERTIES FOLDER Mingw)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_iconv after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/lib/libiconv.a ${HARVEST_TARGET}/iconv/lib/iconv.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/include/iconv.h ${HARVEST_TARGET}/iconv/include/iconv.h
DEPENDEES install
)
endif()
endif()

View File

@@ -17,42 +17,42 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(ILMBASE_EXTRA_ARGS
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_CXX_STANDARD_LIBRARIES=${ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES}
)
set(ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(ILMBASE_EXTRA_ARGS
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_CXX_STANDARD_LIBRARIES=${ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES}
)
ExternalProject_Add(external_ilmbase
URL ${ILMBASE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ILMBASE_HASH}
PREFIX ${BUILD_DIR}/ilmbase
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ilmbase ${DEFAULT_CMAKE_FLAGS} ${ILMBASE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openexr
)
ExternalProject_Add(external_ilmbase
URL ${ILMBASE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ILMBASE_HASH}
PREFIX ${BUILD_DIR}/ilmbase
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ilmbase ${DEFAULT_CMAKE_FLAGS} ${ILMBASE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openexr
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_ilmbase after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ilmbase ${HARVEST_TARGET}/openexr
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_ilmbase after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ilmbase ${HARVEST_TARGET}/openexr
DEPENDEES install
)
endif()
else()
set(ILMBASE_EXTRA_ARGS
--enable-static
--disable-shared
--enable-cxxstd=11
)
ExternalProject_Add(external_ilmbase
URL ${ILMBASE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ILMBASE_HASH}
PREFIX ${BUILD_DIR}/ilmbase
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ilmbase ${ILMBASE_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && make install
INSTALL_DIR ${LIBDIR}/openexr
)
set(ILMBASE_EXTRA_ARGS
--enable-static
--disable-shared
--enable-cxxstd=11
)
ExternalProject_Add(external_ilmbase
URL ${ILMBASE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ILMBASE_HASH}
PREFIX ${BUILD_DIR}/ilmbase
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ilmbase ${ILMBASE_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && make install
INSTALL_DIR ${LIBDIR}/openexr
)
endif()

View File

@@ -17,12 +17,12 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_jemalloc
URL ${JEMALLOC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JEMALLOC_HASH}
PREFIX ${BUILD_DIR}/jemalloc
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jemalloc --disable-shared --enable-static --with-pic
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make install
INSTALL_DIR ${LIBDIR}/jemalloc
URL ${JEMALLOC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JEMALLOC_HASH}
PREFIX ${BUILD_DIR}/jemalloc
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jemalloc --disable-shared --enable-static --with-pic
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make install
INSTALL_DIR ${LIBDIR}/jemalloc
)

View File

@@ -17,49 +17,49 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
# cmake for windows
set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d)
# cmake for windows
set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d)
ExternalProject_Add(external_jpeg
URL ${JPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JPEG_HASH}
PREFIX ${BUILD_DIR}/jpg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpg
)
ExternalProject_Add(external_jpeg
URL ${JPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JPEG_HASH}
PREFIX ${BUILD_DIR}/jpg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpg
)
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_jpeg after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpegd${LIBEXT} ${LIBDIR}/jpg/lib/jpeg${LIBEXT}
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_jpeg after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpegd${LIBEXT} ${LIBDIR}/jpg/lib/jpeg${LIBEXT}
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Release)
set(JPEG_LIBRARY jpeg-static${LIBEXT})
else()
set(JPEG_LIBRARY jpeg-staticd${LIBEXT})
endif()
if(BUILD_MODE STREQUAL Release)
set(JPEG_LIBRARY jpeg-static${LIBEXT})
else()
set(JPEG_LIBRARY jpeg-staticd${LIBEXT})
endif()
else(WIN32)
# autoconf for unix
if(APPLE)
set(JPEG_EXTRA_ARGS --host x86_64-apple-darwin --with-jpeg8)
else()
set(JPEG_EXTRA_ARGS --with-jpeg8)
endif()
# autoconf for unix
if(APPLE)
set(JPEG_EXTRA_ARGS --host x86_64-apple-darwin --with-jpeg8)
else()
set(JPEG_EXTRA_ARGS --with-jpeg8)
endif()
ExternalProject_Add(external_jpeg
URL ${JPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JPEG_HASH}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && autoreconf -fiv && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jpg NASM=yasm ${JPEG_EXTRA_ARGS}
BUILD_IN_SOURCE 1
BUILD_COMMAND ${CONFIGURE_ENV} && make install
PREFIX ${BUILD_DIR}/jpg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpg
)
ExternalProject_Add(external_jpeg
URL ${JPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JPEG_HASH}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && autoreconf -fiv && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jpg NASM=yasm ${JPEG_EXTRA_ARGS}
BUILD_IN_SOURCE 1
BUILD_COMMAND ${CONFIGURE_ENV} && make install
PREFIX ${BUILD_DIR}/jpg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpg
)
set(JPEG_LIBRARY libjpeg${LIBEXT})
set(JPEG_LIBRARY libjpeg${LIBEXT})
endif(WIN32)

View File

@@ -18,30 +18,30 @@
set(LAME_EXTRA_ARGS)
if(MSVC)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(LAME_EXTRA_ARGS CFLAGS=-msse)
endif()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(LAME_EXTRA_ARGS CFLAGS=-msse)
endif()
endif()
ExternalProject_Add(external_lame
URL ${LAME_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LAME_HASH}
PREFIX ${BUILD_DIR}/lame
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lame --disable-shared --enable-static ${LAME_EXTRA_ARGS}
--enable-export=full
--with-fileio=sndfile
--without-vorbis
--with-pic
--disable-mp3x
--disable-mp3rtp
--disable-gtktest
--disable-frontend
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make install
INSTALL_DIR ${LIBDIR}/lame
URL ${LAME_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LAME_HASH}
PREFIX ${BUILD_DIR}/lame
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lame --disable-shared --enable-static ${LAME_EXTRA_ARGS}
--enable-export=full
--with-fileio=sndfile
--without-vorbis
--with-pic
--disable-mp3x
--disable-mp3rtp
--disable-gtktest
--disable-frontend
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make install
INSTALL_DIR ${LIBDIR}/lame
)
if(MSVC)
set_target_properties(external_lame PROPERTIES FOLDER Mingw)
set_target_properties(external_lame PROPERTIES FOLDER Mingw)
endif()

View File

@@ -20,12 +20,12 @@ set(LCMS_EXTRA_ARGS
)
ExternalProject_Add(external_lcms
URL ${LCMS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LCMS_HASH}
PREFIX ${BUILD_DIR}/lcms
#patch taken from ocio
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_lcms.txt ${BUILD_DIR}/lcms/src/external_lcms/CMakeLists.txt
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/lcms ${DEFAULT_CMAKE_FLAGS} ${LCMS_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/lcms
URL ${LCMS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LCMS_HASH}
PREFIX ${BUILD_DIR}/lcms
# Patch taken from ocio.
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_lcms.txt ${BUILD_DIR}/lcms/src/external_lcms/CMakeLists.txt
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/lcms ${DEFAULT_CMAKE_FLAGS} ${LCMS_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/lcms
)

View File

@@ -0,0 +1,40 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(LIBGLU_CFLAGS "-static-libgcc")
set(LIBGLU_CXXFLAGS "-static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -l:libstdc++.a")
set(LIBGLU_LDFLAGS "-pthread -static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -l:libstdc++.a")
set(LIBGLU_EXTRA_FLAGS
CFLAGS=${LIBGLU_CFLAGS}
CXXFLAGS=${LIBGLU_CXXFLAGS}
LDFLAGS=${LIBGLU_LDFLAGS}
)
ExternalProject_Add(external_libglu
URL ${LIBGLU_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LIBGLU_HASH}
PREFIX ${BUILD_DIR}/libglu
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/libglu/src/external_libglu/ &&
${CONFIGURE_COMMAND_NO_TARGET} --prefix=${LIBDIR}/libglu ${LIBGLU_EXTRA_FLAGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/libglu/src/external_libglu/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/libglu/src/external_libglu/ && make install
INSTALL_DIR ${LIBDIR}/libglu
)

View File

@@ -17,41 +17,42 @@
# ***** END GPL LICENSE BLOCK *****
set(LLVM_EXTRA_ARGS
-DLLVM_USE_CRT_RELEASE=MT
-DLLVM_USE_CRT_DEBUG=MTd
-DLLVM_INCLUDE_TESTS=OFF
-DLLVM_TARGETS_TO_BUILD=X86
-DLLVM_INCLUDE_EXAMPLES=OFF
-DLLVM_ENABLE_TERMINFO=OFF
-DLLVM_USE_CRT_RELEASE=MT
-DLLVM_USE_CRT_DEBUG=MTd
-DLLVM_INCLUDE_TESTS=OFF
-DLLVM_TARGETS_TO_BUILD=X86
-DLLVM_INCLUDE_EXAMPLES=OFF
-DLLVM_ENABLE_TERMINFO=OFF
)
if(WIN32)
set(LLVM_GENERATOR "Ninja")
set(LLVM_GENERATOR "Ninja")
else()
set(LLVM_GENERATOR "Unix Makefiles")
set(LLVM_GENERATOR "Unix Makefiles")
endif()
# short project name due to long filename issues on windows
ExternalProject_Add(ll
URL ${LLVM_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LLVM_HASH}
CMAKE_GENERATOR ${LLVM_GENERATOR}
PREFIX ${BUILD_DIR}/ll
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${DEFAULT_CMAKE_FLAGS} ${LLVM_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/llvm
URL ${LLVM_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LLVM_HASH}
CMAKE_GENERATOR ${LLVM_GENERATOR}
PREFIX ${BUILD_DIR}/ll
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${DEFAULT_CMAKE_FLAGS} ${LLVM_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/llvm
)
if(MSVC)
if(BUILD_MODE STREQUAL Release)
set(LLVM_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/ ${HARVEST_TARGET}/llvm/ )
else()
set(LLVM_HARVEST_COMMAND
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib/ ${HARVEST_TARGET}/llvm/debug/lib/
)
endif()
ExternalProject_Add_Step(ll after_install
COMMAND ${LLVM_HARVEST_COMMAND}
DEPENDEES mkdir update patch download configure build install
)
if(BUILD_MODE STREQUAL Release)
set(LLVM_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/ ${HARVEST_TARGET}/llvm/ )
else()
set(LLVM_HARVEST_COMMAND
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/include/ ${HARVEST_TARGET}/llvm/debug/include/
)
endif()
ExternalProject_Add_Step(ll after_install
COMMAND ${LLVM_HARVEST_COMMAND}
DEPENDEES mkdir update patch download configure build install
)
endif()

View File

@@ -19,14 +19,14 @@
set(LZMA_PATCH_CMD echo .)
ExternalProject_Add(external_lzma
URL ${LZMA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${LZMA_HASH}
PREFIX ${BUILD_DIR}/lzma
PATCH_COMMAND ${LZMA_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lzma
--disable-shared
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && make install
INSTALL_DIR ${LIBDIR}/lzma
URL ${LZMA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${LZMA_HASH}
PREFIX ${BUILD_DIR}/lzma
PATCH_COMMAND ${LZMA_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lzma
--disable-shared
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && make install
INSTALL_DIR ${LIBDIR}/lzma
)

View File

@@ -0,0 +1,54 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(MESA_CFLAGS "-static-libgcc")
set(MESA_CXXFLAGS "-static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -l:libstdc++.a")
set(MESA_LDFLAGS "-L${LIBDIR}/zlib/lib -pthread -static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -l:libstdc++.a -l:libz_pic.a")
set(MESA_EXTRA_FLAGS
CFLAGS=${MESA_CFLAGS}
CXXFLAGS=${MESA_CXXFLAGS}
LDFLAGS=${MESA_LDFLAGS}
--enable-glx=gallium-xlib
--with-gallium-drivers=swrast
--disable-dri
--disable-gbm
--disable-egl
--disable-gles1
--disable-gles2
--disable-llvm-shared-libs
--with-llvm-prefix=${LIBDIR}/llvm
)
ExternalProject_Add(external_mesa
URL ${MESA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${MESA_HASH}
PREFIX ${BUILD_DIR}/mesa
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/mesa/src/external_mesa/ &&
${CONFIGURE_COMMAND_NO_TARGET} --prefix=${LIBDIR}/mesa ${MESA_EXTRA_FLAGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/mesa/src/external_mesa/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/mesa/src/external_mesa/ && make install
INSTALL_DIR ${LIBDIR}/mesa
)
add_dependencies(
external_mesa
ll
)

View File

@@ -17,50 +17,33 @@
# ***** END GPL LICENSE BLOCK *****
if(MSVC)
if(BUILD_MODE STREQUAL Debug)
set(NUMPY_DIR_POSTFIX -pydebug)
set(NUMPY_ARCHIVE_POSTFIX d)
set(NUMPY_BUILD_OPTION --debug)
else()
set(NUMPY_DIR_POSTFIX)
set(NUMPY_ARCHIVE_POSTFIX)
set(NUMPY_BUILD_OPTION)
endif()
message("BIN >${PYTHON_BINARY}<")
if(BUILD_MODE STREQUAL Debug)
set(NUMPY_DIR_POSTFIX -pydebug)
set(NUMPY_ARCHIVE_POSTFIX d)
set(NUMPY_BUILD_OPTION --debug)
else()
set(NUMPY_DIR_POSTFIX)
set(NUMPY_ARCHIVE_POSTFIX)
set(NUMPY_BUILD_OPTION)
endif()
endif()
set(NUMPY_POSTFIX)
if(WIN32)
set(NUMPY_INSTALL
${CMAKE_COMMAND} -E copy_directory "${BUILD_DIR}/python/src/external_python/run/lib/site-packages/numpy/core/include/numpy" "${LIBDIR}/python/include/python${PYTHON_SHORT_VERSION}/numpy" &&
${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/numpy/src/external_numpy/build/lib.${PYTHON_ARCH2}-${PYTHON_SHORT_VERSION}${NUMPY_DIR_POSTFIX}"
${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz" "."
)
else()
set(NUMPY_INSTALL echo .)
set(NUMPY_PATCH echo .)
endif()
ExternalProject_Add(external_numpy
URL ${NUMPY_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${NUMPY_HASH}
PREFIX ${BUILD_DIR}/numpy
PATCH_COMMAND ${NUMPY_PATCH}
CONFIGURE_COMMAND ""
LOG_BUILD 1
BUILD_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py build ${NUMPY_BUILD_OPTION} install --old-and-unmanageable
INSTALL_COMMAND ${NUMPY_INSTALL}
URL ${NUMPY_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${NUMPY_HASH}
PREFIX ${BUILD_DIR}/numpy
PATCH_COMMAND ${NUMPY_PATCH}
CONFIGURE_COMMAND ""
LOG_BUILD 1
BUILD_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py build ${NUMPY_BUILD_OPTION} install --old-and-unmanageable
INSTALL_COMMAND ""
)
if(WIN32)
ExternalProject_Add_Step(external_numpy after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz
DEPENDEES install
)
endif()
add_dependencies(
external_numpy
Make_Python_Environment
external_numpy
external_python
)

View File

@@ -17,16 +17,16 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_ogg
URL ${OGG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OGG_HASH}
PREFIX ${BUILD_DIR}/ogg
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ogg --disable-shared --enable-static
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make install
INSTALL_DIR ${LIBDIR}/ogg
URL ${OGG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OGG_HASH}
PREFIX ${BUILD_DIR}/ogg
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ogg --disable-shared --enable-static
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make install
INSTALL_DIR ${LIBDIR}/ogg
)
if(MSVC)
set_target_properties(external_ogg PROPERTIES FOLDER Mingw)
set_target_properties(external_ogg PROPERTIES FOLDER Mingw)
endif()

View File

@@ -17,38 +17,51 @@
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Release)
set(OPENAL_EXTRA_ARGS
-DALSOFT_UTILS=Off
-DALSOFT_NO_CONFIG_UTIL=On
-DALSOFT_EXAMPLES=Off
-DALSOFT_TESTS=Off
-DALSOFT_CONFIG=Off
-DALSOFT_HRTF_DEFS=Off
-DALSOFT_INSTALL=On
-DALSOFT_BACKEND_SNDIO=Off
)
set(OPENAL_EXTRA_ARGS
-DALSOFT_UTILS=OFF
-DALSOFT_NO_CONFIG_UTIL=ON
-DALSOFT_EXAMPLES=OFF
-DALSOFT_TESTS=OFF
-DALSOFT_CONFIG=OFF
-DALSOFT_HRTF_DEFS=OFF
-DALSOFT_INSTALL=ON
-DALSOFT_BACKEND_SNDIO=OFF
)
if(UNIX)
set(OPENAL_EXTRA_ARGS ${OPENAL_EXTRA_ARGS} -DLIBTYPE=STATIC)
endif()
if(UNIX)
set(OPENAL_EXTRA_ARGS
${OPENAL_EXTRA_ARGS}
-DLIBTYPE=STATIC
)
endif()
ExternalProject_Add(external_openal
URL ${OPENAL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENAL_HASH}
PREFIX ${BUILD_DIR}/openal
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openal ${DEFAULT_CMAKE_FLAGS} ${OPENAL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openal
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openal/src/external_openal < ${PATCH_DIR}/openal.diff
)
if(UNIX AND NOT APPLE)
# Ensure we have backends for playback.
set(OPENAL_EXTRA_ARGS
${OPENAL_EXTRA_ARGS}
-DALSOFT_REQUIRE_ALSA=ON
-DALSOFT_REQUIRE_OSS=ON
-DALSOFT_REQUIRE_PULSEAUDIO=ON
)
endif()
if(WIN32)
ExternalProject_Add_Step(external_openal after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/lib/openal32.lib ${HARVEST_TARGET}/openal/lib/openal32.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/bin/openal32.dll ${HARVEST_TARGET}/openal/lib/openal32.dll
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openal/include/ ${HARVEST_TARGET}/openal/include/
DEPENDEES install
)
endif()
ExternalProject_Add(external_openal
URL ${OPENAL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENAL_HASH}
PREFIX ${BUILD_DIR}/openal
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openal ${DEFAULT_CMAKE_FLAGS} ${OPENAL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openal
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openal/src/external_openal < ${PATCH_DIR}/openal.diff
)
if(WIN32)
ExternalProject_Add_Step(external_openal after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/lib/openal32.lib ${HARVEST_TARGET}/openal/lib/openal32.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/bin/openal32.dll ${HARVEST_TARGET}/openal/lib/openal32.dll
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openal/include/ ${HARVEST_TARGET}/openal/include/
DEPENDEES install
)
endif()
endif()

View File

@@ -17,49 +17,49 @@
# ***** END GPL LICENSE BLOCK *****
if(UNIX)
set(OPENCOLLADA_EXTRA_ARGS
-DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
-DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2.a)
set(OPENCOLLADA_EXTRA_ARGS
-DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
-DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2.a)
endif()
ExternalProject_Add(external_opencollada
URL ${OPENCOLLADA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENCOLLADA_HASH}
PREFIX ${BUILD_DIR}/opencollada
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencollada/src/external_opencollada < ${PATCH_DIR}/opencollada.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencollada ${DEFAULT_CMAKE_FLAGS} ${OPENCOLLADA_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opencollada
URL ${OPENCOLLADA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENCOLLADA_HASH}
PREFIX ${BUILD_DIR}/opencollada
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencollada/src/external_opencollada < ${PATCH_DIR}/opencollada.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencollada ${DEFAULT_CMAKE_FLAGS} ${OPENCOLLADA_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opencollada
)
if(UNIX)
add_dependencies(
external_opencollada
external_xml2
)
add_dependencies(
external_opencollada
external_xml2
)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opencollada after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencollada/ ${HARVEST_TARGET}/opencollada/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opencollada after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/buffer.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/buffer_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/ftoa.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/ftoa_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/GeneratedSaxParser.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/GeneratedSaxParser_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/MathMLSolver.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/MathMLSolver_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADABaseUtils.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADABaseUtils_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAFramework.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAFramework_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/pcre.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/pcre_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/UTF.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/UTF_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/xml.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/xml_d.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opencollada after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencollada/ ${HARVEST_TARGET}/opencollada/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opencollada after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/buffer.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/buffer_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/ftoa.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/ftoa_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/GeneratedSaxParser.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/GeneratedSaxParser_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/MathMLSolver.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/MathMLSolver_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADABaseUtils.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADABaseUtils_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAFramework.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAFramework_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/pcre.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/pcre_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/UTF.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/UTF_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/xml.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/xml_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -17,96 +17,96 @@
# ***** END GPL LICENSE BLOCK *****
set(OPENCOLORIO_EXTRA_ARGS
-DOCIO_BUILD_APPS=OFF
-DOCIO_BUILD_PYGLUE=OFF
-DOCIO_BUILD_NUKE=OFF
-DOCIO_USE_BOOST_PTR=OFF
-DOCIO_BUILD_STATIC=ON
-DOCIO_BUILD_SHARED=OFF
-DOCIO_BUILD_TRUELIGHT=OFF
-DOCIO_BUILD_DOCS=OFF
-DOCIO_BUILD_PYGLUE=OFF
-DOCIO_BUILD_JNIGLUE=OFF
-DOCIO_STATIC_JNIGLUE=OFF
-DOCIO_BUILD_APPS=OFF
-DOCIO_BUILD_PYGLUE=OFF
-DOCIO_BUILD_NUKE=OFF
-DOCIO_USE_BOOST_PTR=OFF
-DOCIO_BUILD_STATIC=ON
-DOCIO_BUILD_SHARED=OFF
-DOCIO_BUILD_TRUELIGHT=OFF
-DOCIO_BUILD_DOCS=OFF
-DOCIO_BUILD_PYGLUE=OFF
-DOCIO_BUILD_JNIGLUE=OFF
-DOCIO_STATIC_JNIGLUE=OFF
)
if(WIN32)
set(OCIO_PATCH opencolorio_win.diff)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
-DOCIO_BUILD_TESTS=OFF
-DOCIO_USE_SSE=ON
-DOCIO_INLINES_HIDDEN=OFF
-DOCIO_PYGLUE_LINK=OFF
-DOCIO_PYGLUE_RESPECT_ABI=OFF
-DOCIO_PYGLUE_SONAME=OFF
-DOCIO_PYGLUE_LIB_PREFIX=OFF
-DUSE_EXTERNAL_TINYXML=ON
-DTINYXML_INCLUDE_DIR=${LIBDIR}/tinyxml/include
-DTINYXML_LIBRARY=${LIBDIR}/tinyxml/lib/tinyxml${libext}
-DUSE_EXTERNAL_YAML=ON
-DYAML_CPP_FOUND=ON
-DYAML_CPP_VERSION=${YAMLCPP_VERSION}
-DUSE_EXTERNAL_LCMS=ON
-DINC_1=${LIBDIR}/tinyxml/include
-DINC_2=${LIBDIR}/yamlcpp/include
#lie because ocio cmake is demanding boost even though it is not needed
-DYAML_CPP_VERSION=0.5.0
)
set(OCIO_PATCH opencolorio_win.diff)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
-DOCIO_BUILD_TESTS=OFF
-DOCIO_USE_SSE=ON
-DOCIO_INLINES_HIDDEN=OFF
-DOCIO_PYGLUE_LINK=OFF
-DOCIO_PYGLUE_RESPECT_ABI=OFF
-DOCIO_PYGLUE_SONAME=OFF
-DOCIO_PYGLUE_LIB_PREFIX=OFF
-DUSE_EXTERNAL_TINYXML=ON
-DTINYXML_INCLUDE_DIR=${LIBDIR}/tinyxml/include
-DTINYXML_LIBRARY=${LIBDIR}/tinyxml/lib/tinyxml${libext}
-DUSE_EXTERNAL_YAML=ON
-DYAML_CPP_FOUND=ON
-DYAML_CPP_VERSION=${YAMLCPP_VERSION}
-DUSE_EXTERNAL_LCMS=ON
-DINC_1=${LIBDIR}/tinyxml/include
-DINC_2=${LIBDIR}/yamlcpp/include
# Lie because ocio cmake is demanding boost even though it is not needed.
-DYAML_CPP_VERSION=0.5.0
)
else()
set(OCIO_PATCH opencolorio.diff)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
)
set(OCIO_PATCH opencolorio.diff)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
)
endif()
ExternalProject_Add(external_opencolorio
URL ${OPENCOLORIO_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENCOLORIO_HASH}
PREFIX ${BUILD_DIR}/opencolorio
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencolorio/src/external_opencolorio < ${PATCH_DIR}/${OCIO_PATCH}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencolorio ${DEFAULT_CMAKE_FLAGS} ${OPENCOLORIO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opencolorio
URL ${OPENCOLORIO_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENCOLORIO_HASH}
PREFIX ${BUILD_DIR}/opencolorio
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencolorio/src/external_opencolorio < ${PATCH_DIR}/${OCIO_PATCH}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencolorio ${DEFAULT_CMAKE_FLAGS} ${OPENCOLORIO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opencolorio
)
if(NOT WIN32)
add_custom_command(
OUTPUT ${LIBDIR}/opencolorio/lib/libtinyxml.a
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libtinyxml.a ${LIBDIR}/opencolorio/lib/libtinyxml.a
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libyaml-cpp.a ${LIBDIR}/opencolorio/lib/libyaml-cpp.a
)
add_custom_target(external_opencolorio_extra ALL DEPENDS external_opencolorio ${LIBDIR}/opencolorio/lib/libtinyxml.a)
add_custom_command(
OUTPUT ${LIBDIR}/opencolorio/lib/libtinyxml.a
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libtinyxml.a ${LIBDIR}/opencolorio/lib/libtinyxml.a
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libyaml-cpp.a ${LIBDIR}/opencolorio/lib/libyaml-cpp.a
)
add_custom_target(external_opencolorio_extra ALL DEPENDS external_opencolorio ${LIBDIR}/opencolorio/lib/libtinyxml.a)
endif()
add_dependencies(
external_opencolorio
external_boost
external_opencolorio
external_boost
)
if(WIN32)
add_dependencies(
external_opencolorio
external_tinyxml
external_yamlcpp
add_dependencies(
external_opencolorio
external_tinyxml
external_yamlcpp
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/include ${HARVEST_TARGET}/opencolorio/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/lib/static ${HARVEST_TARGET}/opencolorio/lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmt.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencolorio/lib/static/Opencolorio.lib ${HARVEST_TARGET}/opencolorio/lib/OpencolorIO_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmtd.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml_d.lib
DEPENDEES install
)
endif()
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/include ${HARVEST_TARGET}/opencolorio/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/lib/static ${HARVEST_TARGET}/opencolorio/lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmt.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencolorio/lib/static/Opencolorio.lib ${HARVEST_TARGET}/opencolorio/lib/OpencolorIO_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmtd.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -17,62 +17,62 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(OPENEXR_EXTRA_ARGS
-DCMAKE_CXX_STANDARD_LIBRARIES=${OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES}
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase
-DOPENEXR_BUILD_ILMBASE=On
-DOPENEXR_BUILD_OPENEXR=On
-DOPENEXR_BUILD_PYTHON_LIBS=Off
-DOPENEXR_BUILD_STATIC=On
-DOPENEXR_BUILD_SHARED=Off
-DOPENEXR_BUILD_TESTS=Off
-DOPENEXR_BUILD_VIEWERS=Off
-DOPENEXR_BUILD_UTILS=Off
-DOPENEXR_NAMESPACE_VERSIONING=Off
)
ExternalProject_Add(external_openexr
URL ${OPENEXR_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENEXR_HASH}
PREFIX ${BUILD_DIR}/openexr
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openexr ${DEFAULT_CMAKE_FLAGS} ${OPENEXR_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openexr
)
set(OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(OPENEXR_EXTRA_ARGS
-DCMAKE_CXX_STANDARD_LIBRARIES=${OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES}
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase
-DOPENEXR_BUILD_ILMBASE=On
-DOPENEXR_BUILD_OPENEXR=On
-DOPENEXR_BUILD_PYTHON_LIBS=Off
-DOPENEXR_BUILD_STATIC=On
-DOPENEXR_BUILD_SHARED=Off
-DOPENEXR_BUILD_TESTS=Off
-DOPENEXR_BUILD_VIEWERS=Off
-DOPENEXR_BUILD_UTILS=Off
-DOPENEXR_NAMESPACE_VERSIONING=Off
)
ExternalProject_Add(external_openexr
URL ${OPENEXR_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENEXR_HASH}
PREFIX ${BUILD_DIR}/openexr
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openexr ${DEFAULT_CMAKE_FLAGS} ${OPENEXR_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openexr
)
ExternalProject_Add_Step(external_openexr after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${HARVEST_TARGET}/openexr/lib
#libs have moved between versions, just duplicate it for now.
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${LIBDIR}/ilmbase/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/include ${HARVEST_TARGET}/openexr/include
DEPENDEES install
)
ExternalProject_Add_Step(external_openexr after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${HARVEST_TARGET}/openexr/lib
# Libs have moved between versions, just duplicate it for now.
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${LIBDIR}/ilmbase/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/include ${HARVEST_TARGET}/openexr/include
DEPENDEES install
)
else()
set(OPENEXR_PKG_CONFIG_PATH ${LIBDIR}/zlib/share/pkgconfig)
set(OPENEXR_EXTRA_ARGS
--enable-static
--disable-shared
--enable-cxxstd=11
--with-ilmbase-prefix=${LIBDIR}/ilmbase
)
set(OPENEXR_PKG_CONFIG_PATH ${LIBDIR}/zlib/share/pkgconfig)
set(OPENEXR_EXTRA_ARGS
--enable-static
--disable-shared
--enable-cxxstd=11
--with-ilmbase-prefix=${LIBDIR}/ilmbase
)
ExternalProject_Add(external_openexr
URL ${OPENEXR_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENEXR_HASH}
PREFIX ${BUILD_DIR}/openexr
CONFIGURE_COMMAND ${CONFIGURE_ENV} && export PKG_CONFIG_PATH=${OPENEXR_PKG_CONFIG_PATH} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/openexr ${OPENEXR_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && make install
INSTALL_DIR ${LIBDIR}/openexr
)
ExternalProject_Add(external_openexr
URL ${OPENEXR_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENEXR_HASH}
PREFIX ${BUILD_DIR}/openexr
CONFIGURE_COMMAND ${CONFIGURE_ENV} && export PKG_CONFIG_PATH=${OPENEXR_PKG_CONFIG_PATH} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/openexr ${OPENEXR_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && make install
INSTALL_DIR ${LIBDIR}/openexr
)
endif()
add_dependencies(
external_openexr
external_zlib
external_ilmbase
external_openexr
external_zlib
external_ilmbase
)

View File

@@ -0,0 +1,61 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(OIDN_EXTRA_ARGS
-DWITH_EXAMPLE=OFF
-DWITH_TEST=OFF
-DTBB_ROOT=${LIBDIR}/tbb
-DTBB_STATIC_LIB=ON
-DOIDN_STATIC_LIB=ON
)
ExternalProject_Add(external_openimagedenoise
URL ${OIDN_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OIDN_HASH}
PREFIX ${BUILD_DIR}/openimagedenoise
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimagedenoise ${DEFAULT_CMAKE_FLAGS} ${OIDN_EXTRA_ARGS}
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/openimagedenoise/src/external_openimagedenoise < ${PATCH_DIR}/openimagedenoise.diff
INSTALL_DIR ${LIBDIR}/openimagedenoise
)
add_dependencies(
external_openimagedenoise
external_tbb
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_openimagedenoise after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openimagedenoise/include ${HARVEST_TARGET}/openimagedenoise/include
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/openimagedenoise.lib ${HARVEST_TARGET}/openimagedenoise/lib/openimagedenoise.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/common.lib ${HARVEST_TARGET}/openimagedenoise/lib/common.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/mkldnn.lib ${HARVEST_TARGET}/openimagedenoise/lib/mkldnn.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_openimagedenoise after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/openimagedenoise.lib ${HARVEST_TARGET}/openimagedenoise/lib/openimagedenoise_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/common.lib ${HARVEST_TARGET}/openimagedenoise/lib/common_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/mkldnn.lib ${HARVEST_TARGET}/openimagedenoise/lib/mkldnn_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -17,136 +17,136 @@
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Release)
set(OIIO_TOOLS ON)
set(OIIO_TOOLS ON)
else()
set(OIIO_TOOLS OFF)
set(OIIO_TOOLS OFF)
endif()
if(UNIX AND NOT APPLE)
# This causes linking to static pthread libraries which gives link errors.
# Since we manually specify library paths it should static link other libs.
set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=OFF)
# This causes linking to static pthread libraries which gives link errors.
# Since we manually specify library paths it should static link other libs.
set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=OFF)
else()
set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=ON)
set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=ON)
endif()
if(WIN32)
set(PNG_LIBNAME libpng16_static${LIBEXT})
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2 -DOPJ_STATIC=1)
set(OPENJPEG_POSTFIX _msvc)
set(PNG_LIBNAME libpng16_static${LIBEXT})
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2 -DOPJ_STATIC=1)
set(OPENJPEG_POSTFIX _msvc)
else()
set(PNG_LIBNAME libpng${LIBEXT})
set(OIIO_SIMD_FLAGS)
set(PNG_LIBNAME libpng${LIBEXT})
set(OIIO_SIMD_FLAGS)
endif()
if(WITH_WEBP)
set(WEBP_ARGS
-DWEBP_INCLUDE_DIR=${LIBDIR}/webp/include
-DWEBP_LIBRARY=${LIBDIR}/webp/lib/${LIBPREFIX}webp${LIBEXT}
)
set(WEBP_DEP external_webp)
set(WEBP_ARGS
-DWEBP_INCLUDE_DIR=${LIBDIR}/webp/include
-DWEBP_LIBRARY=${LIBDIR}/webp/lib/${LIBPREFIX}webp${LIBEXT}
)
set(WEBP_DEP external_webp)
endif()
if(MSVC)
set(OPENJPEG_FLAGS
-DOPENJPEG_HOME=${LIBDIR}/openjpeg_msvc
-DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg_msvc/include/openjpeg-${OPENJPEG_SHORT_VERSION}
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg_msvc/lib/openjp2${LIBEXT}
-DOPENJPEG_LIBRARY_DEBUG=${LIBDIR}/openjpeg_msvc/lib/openjp2${LIBEXT}
)
set(OPENJPEG_FLAGS
-DOPENJPEG_HOME=${LIBDIR}/openjpeg_msvc
-DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg_msvc/include/openjpeg-${OPENJPEG_SHORT_VERSION}
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg_msvc/lib/openjp2${LIBEXT}
-DOPENJPEG_LIBRARY_DEBUG=${LIBDIR}/openjpeg_msvc/lib/openjp2${LIBEXT}
)
else()
set(OPENJPEG_FLAGS
-DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg/include/openjpeg-${OPENJPEG_SHORT_VERSION}
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg/lib/${OPENJPEG_LIBRARY}
)
set(OPENJPEG_FLAGS
-DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg/include/openjpeg-${OPENJPEG_SHORT_VERSION}
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg/lib/${OPENJPEG_LIBRARY}
)
endif()
set(OPENIMAGEIO_EXTRA_ARGS
-DBUILDSTATIC=ON
${OPENIMAGEIO_LINKSTATIC}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/openexr/
-DOPENEXR_ILMIMF_LIBRARIES=${LIBDIR}/openexr/lib/IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-OIIO_BUILD_CPP11=ON
-DUSE_OPENGL=OFF
-DUSE_TBB=OFF
-DUSE_FIELD3D=OFF
-DUSE_QT=OFF
-DUSE_PYTHON=OFF
-DUSE_GIF=OFF
-DUSE_OPENCV=OFF
-DUSE_OPENSSL=OFF
-DUSE_OPENJPEG=ON
-DUSE_FFMPEG=OFF
-DUSE_PTEX=OFF
-DUSE_FREETYPE=OFF
-DUSE_LIBRAW=OFF
-DUSE_PYTHON=OFF
-DUSE_PYTHON3=OFF
-DUSE_OCIO=OFF
-DUSE_WEBP=${WITH_WEBP}
-DOIIO_BUILD_TOOLS=${OIIO_TOOLS}
-DOIIO_BUILD_TESTS=OFF
-DBUILD_TESTING=OFF
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
-DPNG_LIBRARY=${LIBDIR}/png/lib/${PNG_LIBNAME}
-DPNG_PNG_INCLUDE_DIR=${LIBDIR}/png/include
-DTIFF_LIBRARY=${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT}
-DTIFF_INCLUDE_DIR=${LIBDIR}/tiff/include
-DJPEG_LIBRARY=${LIBDIR}/jpg/lib/${JPEG_LIBRARY}
-DJPEG_INCLUDE_DIR=${LIBDIR}/jpg/include
${OPENJPEG_FLAGS}
-DOCIO_PATH=${LIBDIR}/opencolorio/
-DOpenEXR_USE_STATIC_LIBS=On
-DOPENEXR_HOME=${LIBDIR}/openexr/
-DILMBASE_INCLUDE_PATH=${LIBDIR}/ilmbase/
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DSTOP_ON_WARNING=OFF
${WEBP_FLAGS}
${OIIO_SIMD_FLAGS}
-DBUILDSTATIC=ON
${OPENIMAGEIO_LINKSTATIC}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/openexr/
-DOPENEXR_ILMIMF_LIBRARIES=${LIBDIR}/openexr/lib/IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-OIIO_BUILD_CPP11=ON
-DUSE_OPENGL=OFF
-DUSE_TBB=OFF
-DUSE_FIELD3D=OFF
-DUSE_QT=OFF
-DUSE_PYTHON=OFF
-DUSE_GIF=OFF
-DUSE_OPENCV=OFF
-DUSE_OPENSSL=OFF
-DUSE_OPENJPEG=ON
-DUSE_FFMPEG=OFF
-DUSE_PTEX=OFF
-DUSE_FREETYPE=OFF
-DUSE_LIBRAW=OFF
-DUSE_PYTHON=OFF
-DUSE_PYTHON3=OFF
-DUSE_OCIO=OFF
-DUSE_WEBP=${WITH_WEBP}
-DOIIO_BUILD_TOOLS=${OIIO_TOOLS}
-DOIIO_BUILD_TESTS=OFF
-DBUILD_TESTING=OFF
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
-DPNG_LIBRARY=${LIBDIR}/png/lib/${PNG_LIBNAME}
-DPNG_PNG_INCLUDE_DIR=${LIBDIR}/png/include
-DTIFF_LIBRARY=${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT}
-DTIFF_INCLUDE_DIR=${LIBDIR}/tiff/include
-DJPEG_LIBRARY=${LIBDIR}/jpg/lib/${JPEG_LIBRARY}
-DJPEG_INCLUDE_DIR=${LIBDIR}/jpg/include
${OPENJPEG_FLAGS}
-DOCIO_PATH=${LIBDIR}/opencolorio/
-DOpenEXR_USE_STATIC_LIBS=On
-DOPENEXR_HOME=${LIBDIR}/openexr/
-DILMBASE_INCLUDE_PATH=${LIBDIR}/ilmbase/
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DSTOP_ON_WARNING=OFF
${WEBP_FLAGS}
${OIIO_SIMD_FLAGS}
)
ExternalProject_Add(external_openimageio
URL ${OPENIMAGEIO_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENIMAGEIO_HASH}
PREFIX ${BUILD_DIR}/openimageio
PATCH_COMMAND
${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/src/include < ${PATCH_DIR}/openimageio_gdi.diff &&
${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio_static_libs.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimageio ${DEFAULT_CMAKE_FLAGS} ${OPENIMAGEIO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openimageio
URL ${OPENIMAGEIO_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENIMAGEIO_HASH}
PREFIX ${BUILD_DIR}/openimageio
PATCH_COMMAND
${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/src/include < ${PATCH_DIR}/openimageio_gdi.diff &&
${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio_static_libs.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimageio ${DEFAULT_CMAKE_FLAGS} ${OPENIMAGEIO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openimageio
)
add_dependencies(
external_openimageio
external_png external_zlib
external_ilmbase
external_openexr
external_jpeg
external_boost
external_tiff
external_opencolorio
external_openjpeg${OPENJPEG_POSTFIX}
${WEBP_DEP}
external_openimageio
external_png external_zlib
external_ilmbase
external_openexr
external_jpeg
external_boost
external_tiff
external_opencolorio
external_openjpeg${OPENJPEG_POSTFIX}
${WEBP_DEP}
)
if(NOT WIN32)
add_dependencies(
external_openimageio
external_opencolorio_extra
)
add_dependencies(
external_openimageio
external_opencolorio_extra
)
endif()

View File

@@ -22,43 +22,43 @@
set(OPENJPEG_EXTRA_ARGS -DBUILD_SHARED_LIBS=OFF)
if(WIN32)
set(OPENJPEG_EXTRA_ARGS -G "MSYS Makefiles" -DBUILD_PKGCONFIG_FILES=On)
set(OPENJPEG_EXTRA_ARGS -G "MSYS Makefiles" -DBUILD_PKGCONFIG_FILES=On)
else()
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
endif()
ExternalProject_Add(external_openjpeg
URL ${OPENJPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OPENJPEG_HASH}
PREFIX ${BUILD_DIR}/openjpeg
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build && ${CMAKE_COMMAND} ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF ${BUILD_DIR}/openjpeg/src/external_openjpeg
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make install
INSTALL_DIR ${LIBDIR}/openjpeg
URL ${OPENJPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OPENJPEG_HASH}
PREFIX ${BUILD_DIR}/openjpeg
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build && ${CMAKE_COMMAND} ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF ${BUILD_DIR}/openjpeg/src/external_openjpeg
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make install
INSTALL_DIR ${LIBDIR}/openjpeg
)
#on windows ffmpeg wants a mingw build, while oiio needs a msvc build
# On windows ffmpeg wants a mingw build, while oiio needs a msvc build.
if(MSVC)
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
ExternalProject_Add(external_openjpeg_msvc
URL ${OPENJPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OPENJPEG_HASH}
PREFIX ${BUILD_DIR}/openjpeg_msvc
CMAKE_ARGS ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg_msvc -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF
INSTALL_DIR ${LIBDIR}/openjpeg_msvc
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_openjpeg_msvc after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/lib ${HARVEST_TARGET}/openjpeg/lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/include ${HARVEST_TARGET}/openjpeg/include
DEPENDEES install
)
endif()
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
ExternalProject_Add(external_openjpeg_msvc
URL ${OPENJPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OPENJPEG_HASH}
PREFIX ${BUILD_DIR}/openjpeg_msvc
CMAKE_ARGS ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg_msvc -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF
INSTALL_DIR ${LIBDIR}/openjpeg_msvc
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_openjpeg_msvc after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/lib ${HARVEST_TARGET}/openjpeg/lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/include ${HARVEST_TARGET}/openjpeg/include
DEPENDEES install
)
endif()
endif()
set(OPENJPEG_LIBRARY libopenjp2${LIBEXT})
if(MSVC)
set_target_properties(external_openjpeg PROPERTIES FOLDER Mingw)
set_target_properties(external_openjpeg PROPERTIES FOLDER Mingw)
endif()

View File

@@ -18,16 +18,16 @@
ExternalProject_Add(external_openmp
URL ${OPENMP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENMP_HASH}
PREFIX ${BUILD_DIR}/openmp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openmp ${DEFAULT_CMAKE_FLAGS}
INSTALL_COMMAND cd ${BUILD_DIR}/openmp/src/external_openmp-build && install_name_tool -id @executable_path/../Resources/lib/libomp.dylib runtime/src/libomp.dylib && make install
INSTALL_DIR ${LIBDIR}/openmp
URL ${OPENMP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENMP_HASH}
PREFIX ${BUILD_DIR}/openmp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openmp ${DEFAULT_CMAKE_FLAGS}
INSTALL_COMMAND cd ${BUILD_DIR}/openmp/src/external_openmp-build && install_name_tool -id @executable_path/../Resources/lib/libomp.dylib runtime/src/libomp.dylib && make install
INSTALL_DIR ${LIBDIR}/openmp
)
add_dependencies(
external_openmp
external_clang
external_openmp
external_clang
)

View File

@@ -17,86 +17,85 @@
# ***** END GPL LICENSE BLOCK *****
set(OPENSUBDIV_EXTRA_ARGS
-DNO_EXAMPLES=ON
-DNO_REGRESSION=ON
-DNO_PYTHON=ON
-DNO_MAYA=ON
-DNO_PTEX=ON
-DNO_DOC=ON
-DNO_CLEW=OFF
-DNO_OPENCL=OFF
-DNO_TUTORIALS=ON
-DGLEW_INCLUDE_DIR=${LIBDIR}/glew/include
-DGLEW_LIBRARY=${LIBDIR}/glew/lib/libGLEW${LIBEXT}
-DGLFW_INCLUDE_DIR=${LIBDIR}/glfw/include
-DGLFW_LIBRARIES=${LIBDIR}/glfw/lib/glfw3${LIBEXT}
-DNO_EXAMPLES=ON
-DNO_REGRESSION=ON
-DNO_PYTHON=ON
-DNO_MAYA=ON
-DNO_PTEX=ON
-DNO_DOC=ON
-DNO_CLEW=OFF
-DNO_OPENCL=OFF
-DNO_TUTORIALS=ON
-DGLEW_INCLUDE_DIR=${LIBDIR}/glew/include
-DGLEW_LIBRARY=${LIBDIR}/glew/lib/libGLEW${LIBEXT}
-DGLFW_INCLUDE_DIR=${LIBDIR}/glfw/include
-DGLFW_LIBRARIES=${LIBDIR}/glfw/lib/glfw3${LIBEXT}
)
if(WIN32)
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb_static.lib
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT}
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
-DCUEW_LIBRARY=${LIBDIR}/cuew/lib/cuew${LIBEXT}
-DCMAKE_EXE_LINKER_FLAGS_RELEASE=libcmt.lib
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=OFF
)
else()
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=ON
)
endif()
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb_static.lib
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT}
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
-DCUEW_LIBRARY=${LIBDIR}/cuew/lib/cuew${LIBEXT}
-DCMAKE_EXE_LINKER_FLAGS_RELEASE=libcmt.lib
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=OFF
)
else()
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=ON
)
endif()
else()
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=ON
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/static/${LIBPREFIX}clew${LIBEXT}
)
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=ON
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/static/${LIBPREFIX}clew${LIBEXT}
)
endif()
ExternalProject_Add(external_opensubdiv
URL ${OPENSUBDIV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENSUBDIV_Hash}
PREFIX ${BUILD_DIR}/opensubdiv
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/opensubdiv/src/external_opensubdiv < ${PATCH_DIR}/opensubdiv.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opensubdiv -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${OPENSUBDIV_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opensubdiv
URL ${OPENSUBDIV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENSUBDIV_Hash}
PREFIX ${BUILD_DIR}/opensubdiv
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opensubdiv -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${OPENSUBDIV_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opensubdiv
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opensubdiv after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/lib ${HARVEST_TARGET}/opensubdiv/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/include ${HARVEST_TARGET}/opensubdiv/include
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opensubdiv after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdCPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdCPU_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdGPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdGPU_d.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opensubdiv after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/lib ${HARVEST_TARGET}/opensubdiv/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/include ${HARVEST_TARGET}/opensubdiv/include
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opensubdiv after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdCPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdCPU_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdGPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdGPU_d.lib
DEPENDEES install
)
endif()
endif()
add_dependencies(
external_opensubdiv
external_glew
external_glfw
external_clew
external_cuew
external_tbb
external_opensubdiv
external_glew
external_glfw
external_clew
external_cuew
external_tbb
)

View File

@@ -17,86 +17,86 @@
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Debug)
set(BLOSC_POST _d)
set(BLOSC_POST _d)
endif()
set(OPENVDB_EXTRA_ARGS
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DBLOSC_INCLUDE_DIR=${LIBDIR}/blosc/include/
-DBLOSC_blosc_LIBRARY=${LIBDIR}/blosc/lib/libblosc${BLOSC_POST}${LIBEXT}
-DOPENVDB_ENABLE_3_ABI_COMPATIBLE=OFF
-DOPENVDB_BUILD_UNITTESTS=Off
-DOPENVDB_BUILD_PYTHON_MODULE=Off
-DGLEW_LOCATION=${LIBDIR}/glew/
-DBLOSC_LOCATION=${LIBDIR}/blosc/
-DTBB_LOCATION=${LIBDIR}/tbb/
-DTBB_ROOT=${LIBDIR}/tbb/
-DOPENEXR_LOCATION=${LIBDIR}/openexr
-DILMBASE_LOCATION=${LIBDIR}/ilmbase
-DIlmbase_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DIlmbase_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DIlmbase_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOpenexr_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DTBB_LIBRARYDIR=${LIBDIR}/tbb/lib
-DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
-DTBB_LIBRARY_PATH=${LIBDIR}/tbb/lib
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DBLOSC_INCLUDE_DIR=${LIBDIR}/blosc/include/
-DBLOSC_blosc_LIBRARY=${LIBDIR}/blosc/lib/libblosc${BLOSC_POST}${LIBEXT}
-DOPENVDB_ENABLE_3_ABI_COMPATIBLE=OFF
-DOPENVDB_BUILD_UNITTESTS=Off
-DOPENVDB_BUILD_PYTHON_MODULE=Off
-DGLEW_LOCATION=${LIBDIR}/glew/
-DBLOSC_LOCATION=${LIBDIR}/blosc/
-DTBB_LOCATION=${LIBDIR}/tbb/
-DTBB_ROOT=${LIBDIR}/tbb/
-DOPENEXR_LOCATION=${LIBDIR}/openexr
-DILMBASE_LOCATION=${LIBDIR}/ilmbase
-DIlmbase_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DIlmbase_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DIlmbase_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOpenexr_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DTBB_LIBRARYDIR=${LIBDIR}/tbb/lib
-DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
-DTBB_LIBRARY_PATH=${LIBDIR}/tbb/lib
)
if(WIN32)
# Namespaces seem to be buggy and cause linker errors due to things not
# being in the correct namespace
# needs to link pthreads due to it being a blosc dependency
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
-DOPENEXR_NAMESPACE_VERSIONING=OFF
-DEXTRA_LIBS:FILEPATH=${LIBDIR}/pthreads/lib/pthreadVC3.lib
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
-DCMAKE_SHARED_LINKER_FLAGS="/safeseh:no"
-DCMAKE_EXE_LINKER_FLAGS="/safeseh:no"
)
endif()
# Namespaces seem to be buggy and cause linker errors due to things not
# being in the correct namespace
# needs to link pthreads due to it being a blosc dependency
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
-DOPENEXR_NAMESPACE_VERSIONING=OFF
-DEXTRA_LIBS:FILEPATH=${LIBDIR}/pthreads/lib/pthreadVC3.lib
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
-DCMAKE_SHARED_LINKER_FLAGS="/safeseh:no"
-DCMAKE_EXE_LINKER_FLAGS="/safeseh:no"
)
endif()
endif()
ExternalProject_Add(openvdb
URL ${OPENVDB_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENVDB_HASH}
PREFIX ${BUILD_DIR}/openvdb
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/openvdb.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openvdb ${DEFAULT_CMAKE_FLAGS} ${OPENVDB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openvdb
URL ${OPENVDB_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENVDB_HASH}
PREFIX ${BUILD_DIR}/openvdb
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/openvdb.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openvdb ${DEFAULT_CMAKE_FLAGS} ${OPENVDB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openvdb
)
add_dependencies(
openvdb
external_tbb
external_boost
external_ilmbase
external_openexr
external_zlib
external_blosc
openvdb
external_tbb
external_boost
external_ilmbase
external_openexr
external_zlib
external_blosc
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openvdb/include ${HARVEST_TARGET}/openvdb/include
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openvdb/include ${HARVEST_TARGET}/openvdb/include
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -17,22 +17,22 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/lapack/fftw3 by installing mingw64" ON)
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/lapack/fftw3 by installing mingw64" ON)
endif()
option(WITH_WEBP "Enable building of oiio with webp support" OFF)
option(WITH_EMBREE "Enable building of Embree" OFF)
set(MAKE_THREADS 1 CACHE STRING "Number of threads to run make with")
if(NOT BUILD_MODE)
set(BUILD_MODE "Release")
message(STATUS "Build type not specified: defaulting to a release build.")
set(BUILD_MODE "Release")
message(STATUS "Build type not specified: defaulting to a release build.")
endif()
message("BuildMode = ${BUILD_MODE}")
if(BUILD_MODE STREQUAL "Debug")
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Debug)
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Debug)
else(BUILD_MODE STREQUAL "Debug")
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Release)
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Release)
endif()
option(DOWNLOAD_DIR "Path for downloaded files" ${CMAKE_CURRENT_SOURCE_DIR}/downloads)
@@ -46,173 +46,173 @@ message("PATCH_DIR = ${PATCH_DIR}")
message("BUILD_DIR = ${BUILD_DIR}")
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/patch.exe)
else()
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/patch.exe)
endif()
set(LIBEXT ".lib")
set(LIBPREFIX "")
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/patch.exe)
else()
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/patch.exe)
endif()
set(LIBEXT ".lib")
set(LIBPREFIX "")
# For OIIO and OSL
set(COMMON_DEFINES /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS)
# For OIIO and OSL
set(COMMON_DEFINES /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS)
if(MSVC_VERSION GREATER 1909)
set(COMMON_MSVC_FLAGS "/Wv:18") #some deps with warnings as error aren't quite ready for dealing with the new 2017 warnings.
endif()
set(COMMON_MSVC_FLAGS "${COMMON_MSVC_FLAGS} /bigobj")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MT ${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
if(MSVC_VERSION GREATER 1909)
set(COMMON_MSVC_FLAGS "/Wv:18") #some deps with warnings as error aren't quite ready for dealing with the new 2017 warnings.
endif()
set(COMMON_MSVC_FLAGS "${COMMON_MSVC_FLAGS} /bigobj")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MT ${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MT /${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MT /${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(PLATFORM_FLAGS)
set(PLATFORM_CXX_FLAGS)
set(PLATFORM_CMAKE_FLAGS)
set(PLATFORM_FLAGS)
set(PLATFORM_CXX_FLAGS)
set(PLATFORM_CMAKE_FLAGS)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw64)
set(MINGW_SHELL ming64sh.cmd)
set(PERL_SHELL ${DOWNLOAD_DIR}/perl/portableshell.bat)
set(MINGW_HOST x86_64-w64-mingw32)
else()
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw32)
set(MINGW_SHELL ming32sh.cmd)
set(PERL_SHELL ${DOWNLOAD_DIR}/perl32/portableshell.bat)
set(MINGW_HOST i686-w64-mingw32)
endif()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw64)
set(MINGW_SHELL ming64sh.cmd)
set(PERL_SHELL ${DOWNLOAD_DIR}/perl/portableshell.bat)
set(MINGW_HOST x86_64-w64-mingw32)
else()
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw32)
set(MINGW_SHELL ming32sh.cmd)
set(PERL_SHELL ${DOWNLOAD_DIR}/perl32/portableshell.bat)
set(MINGW_HOST i686-w64-mingw32)
endif()
set(CONFIGURE_ENV
cd ${MINGW_PATH} &&
call ${MINGW_SHELL} &&
call ${PERL_SHELL} &&
set path &&
set CFLAGS=-g &&
set LDFLAGS=-Wl,--as-needed -static-libgcc
)
set(CONFIGURE_ENV
cd ${MINGW_PATH} &&
call ${MINGW_SHELL} &&
call ${PERL_SHELL} &&
set path &&
set CFLAGS=-g &&
set LDFLAGS=-Wl,--as-needed -static-libgcc
)
set(CONFIGURE_ENV_NO_PERL
cd ${MINGW_PATH} &&
call ${MINGW_SHELL} &&
set path &&
set CFLAGS=-g &&
set LDFLAGS=-Wl,--as-needed -static-libgcc
)
set(CONFIGURE_ENV_NO_PERL
cd ${MINGW_PATH} &&
call ${MINGW_SHELL} &&
set path &&
set CFLAGS=-g &&
set LDFLAGS=-Wl,--as-needed -static-libgcc
)
set(CONFIGURE_COMMAND sh ./configure)
set(CONFIGURE_COMMAND_NO_TARGET ${CONFIGURE_COMMAND})
set(CONFIGURE_COMMAND sh ./configure)
set(CONFIGURE_COMMAND_NO_TARGET ${CONFIGURE_COMMAND})
else()
set(PATCH_CMD patch)
set(LIBEXT ".a")
set(LIBPREFIX "lib")
set(PATCH_CMD patch)
set(LIBEXT ".a")
set(LIBPREFIX "lib")
if(APPLE)
# Let's get the current Xcode dir, to support xcode-select
execute_process(
COMMAND xcode-select --print-path
OUTPUT_VARIABLE XCODE_DEV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(OSX_ARCHITECTURES x86_64)
set(OSX_DEPLOYMENT_TARGET 10.9)
set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk)
if(APPLE)
# Let's get the current Xcode dir, to support xcode-select
execute_process(
COMMAND xcode-select --print-path
OUTPUT_VARIABLE XCODE_DEV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(OSX_ARCHITECTURES x86_64)
set(OSX_DEPLOYMENT_TARGET 10.11)
set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk)
set(PLATFORM_CFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
set(PLATFORM_CXXFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++")
set(PLATFORM_LDFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin13.0.0) # OS X 10.9
set(PLATFORM_CMAKE_FLAGS
-DCMAKE_OSX_ARCHITECTURES:STRING=${OSX_ARCHITECTURES}
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_DEPLOYMENT_TARGET}
-DCMAKE_OSX_SYSROOT:PATH=${OSX_SYSROOT}
)
else()
set(PLATFORM_CFLAGS "-fPIC")
set(PLATFORM_CXXFLAGS "-std=c++11 -fPIC")
set(PLATFORM_LDFLAGS)
set(PLATFORM_BUILD_TARGET)
set(PLATFORM_CMAKE_FLAGS -DCMAKE_INSTALL_LIBDIR=lib)
endif()
set(PLATFORM_CFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
set(PLATFORM_CXXFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++")
set(PLATFORM_LDFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin15.0.0) # OS X 10.11
set(PLATFORM_CMAKE_FLAGS
-DCMAKE_OSX_ARCHITECTURES:STRING=${OSX_ARCHITECTURES}
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_DEPLOYMENT_TARGET}
-DCMAKE_OSX_SYSROOT:PATH=${OSX_SYSROOT}
)
else()
set(PLATFORM_CFLAGS "-fPIC")
set(PLATFORM_CXXFLAGS "-std=c++11 -fPIC")
set(PLATFORM_LDFLAGS)
set(PLATFORM_BUILD_TARGET)
set(PLATFORM_CMAKE_FLAGS -DCMAKE_INSTALL_LIBDIR=lib)
endif()
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CFLAGS}")
else()
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-g ${PLATFORM_CFLAGS}")
endif()
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CFLAGS}")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CFLAGS}")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CFLAGS}")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CFLAGS}")
else()
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-g ${PLATFORM_CFLAGS}")
endif()
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CFLAGS}")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CFLAGS}")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CFLAGS}")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
else()
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-g ${PLATFORM_CXXFLAGS}")
endif()
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
else()
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-g ${PLATFORM_CXXFLAGS}")
endif()
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(CONFIGURE_ENV
export MACOSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET} &&
export CFLAGS=${PLATFORM_CFLAGS} &&
export CXXFLAGS=${PLATFORM_CXXFLAGS} &&
export LDFLAGS=${PLATFORM_LDFLAGS}
)
set(CONFIGURE_ENV_NO_PERL ${CONFIGURE_ENV})
set(CONFIGURE_COMMAND ./configure ${PLATFORM_BUILD_TARGET})
set(CONFIGURE_COMMAND_NO_TARGET ./configure)
set(CONFIGURE_ENV
export MACOSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET} &&
export CFLAGS=${PLATFORM_CFLAGS} &&
export CXXFLAGS=${PLATFORM_CXXFLAGS} &&
export LDFLAGS=${PLATFORM_LDFLAGS}
)
set(CONFIGURE_ENV_NO_PERL ${CONFIGURE_ENV})
set(CONFIGURE_COMMAND ./configure ${PLATFORM_BUILD_TARGET})
set(CONFIGURE_COMMAND_NO_TARGET ./configure)
endif()
set(DEFAULT_CMAKE_FLAGS
-DCMAKE_BUILD_TYPE=${BUILD_MODE}
-DCMAKE_C_FLAGS_DEBUG=${BLENDER_CMAKE_C_FLAGS_DEBUG}
-DCMAKE_C_FLAGS_MINSIZEREL=${BLENDER_CMAKE_C_FLAGS_MINSIZEREL}
-DCMAKE_C_FLAGS_RELEASE=${BLENDER_CMAKE_C_FLAGS_RELEASE}
-DCMAKE_C_FLAGS_RELWITHDEBINFO=${BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO}
-DCMAKE_CXX_FLAGS_DEBUG=${BLENDER_CMAKE_CXX_FLAGS_DEBUG}
-DCMAKE_CXX_FLAGS_MINSIZEREL=${BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL}
-DCMAKE_CXX_FLAGS_RELEASE=${BLENDER_CMAKE_CXX_FLAGS_RELEASE}
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
${PLATFORM_CMAKE_FLAGS}
-DCMAKE_BUILD_TYPE=${BUILD_MODE}
-DCMAKE_C_FLAGS_DEBUG=${BLENDER_CMAKE_C_FLAGS_DEBUG}
-DCMAKE_C_FLAGS_MINSIZEREL=${BLENDER_CMAKE_C_FLAGS_MINSIZEREL}
-DCMAKE_C_FLAGS_RELEASE=${BLENDER_CMAKE_C_FLAGS_RELEASE}
-DCMAKE_C_FLAGS_RELWITHDEBINFO=${BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO}
-DCMAKE_CXX_FLAGS_DEBUG=${BLENDER_CMAKE_CXX_FLAGS_DEBUG}
-DCMAKE_CXX_FLAGS_MINSIZEREL=${BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL}
-DCMAKE_CXX_FLAGS_RELEASE=${BLENDER_CMAKE_CXX_FLAGS_RELEASE}
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
${PLATFORM_CMAKE_FLAGS}
)
if(WIN32)
#we need both flavors to build the thumbnail dlls
if(MSVC12)
set(GENERATOR_32 "Visual Studio 12 2013")
set(GENERATOR_64 "Visual Studio 12 2013 Win64")
elseif(MSVC14)
set(GENERATOR_32 "Visual Studio 14 2015")
set(GENERATOR_64 "Visual Studio 14 2015 Win64")
endif()
# We need both flavors to build the thumbnail dlls
if(MSVC12)
set(GENERATOR_32 "Visual Studio 12 2013")
set(GENERATOR_64 "Visual Studio 12 2013 Win64")
elseif(MSVC14)
set(GENERATOR_32 "Visual Studio 14 2015")
set(GENERATOR_64 "Visual Studio 14 2015 Win64")
endif()
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Debug)
set(ZLIB_LIBRARY zlibstaticd${LIBEXT})
else()
set(ZLIB_LIBRARY zlibstatic${LIBEXT})
endif()
if(BUILD_MODE STREQUAL Debug)
set(ZLIB_LIBRARY zlibstaticd${LIBEXT})
else()
set(ZLIB_LIBRARY zlibstatic${LIBEXT})
endif()
else()
set(ZLIB_LIBRARY libz${LIBEXT})
set(ZLIB_LIBRARY libz${LIBEXT})
endif()
if(MSVC)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif()
set(CMAKE_INSTALL_MESSAGE LAZY)

View File

@@ -0,0 +1,35 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_opus
URL ${OPUS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OPUS_HASH}
PREFIX ${BUILD_DIR}/opus
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/opus/src/external_opus/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/opus
--disable-shared
--enable-static
--with-pic
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/opus/src/external_opus/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/opus/src/external_opus/ && make install
INSTALL_DIR ${LIBDIR}/opus
)
if(MSVC)
set_target_properties(external_opus PROPERTIES FOLDER Mingw)
endif()

View File

@@ -17,116 +17,125 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(OSL_FLEX_BISON -DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe -DFLEX_EXTRA_OPTIONS="--wincompat" -DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe)
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/libpng16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=0)
else()
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=sse2)
endif()
SET(OSL_PLATFORM_FLAGS -DLINKSTATIC=ON)
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(OSL_FLEX_BISON -DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe -DFLEX_EXTRA_OPTIONS="--wincompat" -DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe)
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/libpng16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=0)
else()
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=sse2)
endif()
SET(OSL_PLATFORM_FLAGS -DLINKSTATIC=ON)
else()
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES)
set(OSL_FLEX_BISON)
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/${LIBPREFIX}png16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
SET(OSL_PLATFORM_FLAGS)
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES)
set(OSL_FLEX_BISON)
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/${LIBPREFIX}png16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
SET(OSL_PLATFORM_FLAGS)
endif()
set(OSL_ILMBASE_CUSTOM_LIBRARIES "${LIBDIR}/ilmbase/lib/Imath${ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/Half{ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/IlmThread${ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/Iex${ILMBASE_VERSION_POSTFIX}.lib")
set(OSL_LLVM_LIBRARY "${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAnalysis${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAsmParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMBitReader${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMBitWriter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMCodeGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMCore${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMDebugInfo${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMExecutionEngine${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInstCombine${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInstrumentation${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInterpreter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMJIT${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMLinker${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMC${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCDisassembler${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCJIT${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMObject${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMRuntimeDyld${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMScalarOpts${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMSelectionDAG${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMSupport${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTableGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTarget${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTransformUtils${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMVectorize${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86AsmParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86AsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86CodeGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Desc${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Disassembler${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Info${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Utils${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMipa${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMipo${LIBEXT}")
set(OSL_EXTRA_ARGS
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-DLLVM_DIRECTORY=${LIBDIR}/llvm
-DLLVM_INCLUDES=${LIBDIR}/llvm/include
-DLLVM_LIB_DIR=${LIBDIR}/llvm/lib
-DLLVM_VERSION=3.4
-DLLVM_LIBRARY=${OSL_LLVM_LIBRARY}
-DOPENEXR_HOME=${LIBDIR}/openexr/
-DILMBASE_HOME=${LIBDIR}/ilmbase/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOSL_BUILD_TESTS=OFF
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DOPENIMAGEIOHOME=${LIBDIR}/openimageio/
-DOPENIMAGEIO_LIBRARY=${OSL_OPENIMAGEIO_LIBRARY}
-DOPENIMAGEIO_INCLUDES=${LIBDIR}/openimageio/include
${OSL_FLEX_BISON}
-DCMAKE_CXX_STANDARD_LIBRARIES=${OSL_CMAKE_CXX_STANDARD_LIBRARIES}
-DBUILDSTATIC=ON
${OSL_PLATFORM_FLAGS}
-DOSL_BUILD_PLUGINS=Off
-DSTOP_ON_WARNING=OFF
-DUSE_LLVM_BITCODE=OFF
-DUSE_PARTIO=OFF
${OSL_SIMD_FLAGS}
-DPARTIO_LIBRARIES=
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-DLLVM_DIRECTORY=${LIBDIR}/llvm
-DLLVM_INCLUDES=${LIBDIR}/llvm/include
-DLLVM_LIB_DIR=${LIBDIR}/llvm/lib
-DLLVM_VERSION=3.4
-DLLVM_LIBRARY=${OSL_LLVM_LIBRARY}
-DOPENEXR_HOME=${LIBDIR}/openexr/
-DILMBASE_HOME=${LIBDIR}/ilmbase/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOSL_BUILD_TESTS=OFF
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DOPENIMAGEIOHOME=${LIBDIR}/openimageio/
-DOPENIMAGEIO_LIBRARY=${OSL_OPENIMAGEIO_LIBRARY}
-DOPENIMAGEIO_INCLUDES=${LIBDIR}/openimageio/include
${OSL_FLEX_BISON}
-DCMAKE_CXX_STANDARD_LIBRARIES=${OSL_CMAKE_CXX_STANDARD_LIBRARIES}
-DBUILDSTATIC=ON
${OSL_PLATFORM_FLAGS}
-DOSL_BUILD_PLUGINS=Off
-DSTOP_ON_WARNING=OFF
-DUSE_LLVM_BITCODE=OFF
-DUSE_PARTIO=OFF
${OSL_SIMD_FLAGS}
-DPARTIO_LIBRARIES=
)
if(WIN32)
set(OSL_EXTRA_ARGS
${OSL_EXTRA_ARGS}
-DPUGIXML_HOME=${LIBDIR}/pugixml
)
set(OSL_EXTRA_ARGS
${OSL_EXTRA_ARGS}
-DPUGIXML_HOME=${LIBDIR}/pugixml
)
elseif(APPLE)
# Make symbol hiding consistent with OIIO which defaults to OFF,
# avoids linker warnings on macOS
set(OSL_EXTRA_ARGS
${OSL_EXTRA_ARGS}
-DHIDE_SYMBOLS=OFF
)
# Make symbol hiding consistent with OIIO which defaults to OFF,
# avoids linker warnings on macOS
set(OSL_EXTRA_ARGS
${OSL_EXTRA_ARGS}
-DHIDE_SYMBOLS=OFF
-DPUGIXML_HOME=${LIBDIR}/pugixml
)
endif()
ExternalProject_Add(external_osl
URL ${OSL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
LIST_SEPARATOR ^^
URL_HASH MD5=${OSL_HASH}
PREFIX ${BUILD_DIR}/osl
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/osl -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${DEFAULT_CMAKE_FLAGS} ${OSL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/osl
URL ${OSL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
LIST_SEPARATOR ^^
URL_HASH MD5=${OSL_HASH}
PREFIX ${BUILD_DIR}/osl
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/osl -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${DEFAULT_CMAKE_FLAGS} ${OSL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/osl
)
add_dependencies(
external_osl
external_boost
ll
external_clang
external_ilmbase
external_openexr
external_zlib
external_flexbison
external_openimageio
external_pugixml
external_osl
external_boost
ll
external_clang
external_ilmbase
external_openexr
external_zlib
external_flexbison
external_openimageio
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_osl after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/osl/ ${HARVEST_TARGET}/osl
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_osl after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslcomp.lib ${HARVEST_TARGET}/osl/lib/oslcomp_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslexec.lib ${HARVEST_TARGET}/osl/lib/oslexec_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslquery.lib ${HARVEST_TARGET}/osl/lib/oslquery_d.lib
DEPENDEES install
)
endif()
if(UNIX AND NOT APPLE)
# Rely on PugiXML compiled with OpenImageIO
else()
add_dependencies(
external_osl
external_pugixml
)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_osl after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/osl/ ${HARVEST_TARGET}/osl
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_osl after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslcomp.lib ${HARVEST_TARGET}/osl/lib/oslcomp_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslexec.lib ${HARVEST_TARGET}/osl/lib/oslexec_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslquery.lib ${HARVEST_TARGET}/osl/lib/oslquery_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -0,0 +1,58 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(MSVC)
set(PYTARGET ${HARVEST_TARGET}/python/${PYTHON_SHORT_VERSION_NO_DOTS})
set(PYSRC ${LIBDIR}/python/)
if(BUILD_MODE STREQUAL Release)
add_custom_command(
OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND echo packaging python
COMMAND echo this should ouput at ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTARGET}/libs
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python.exe ${PYTARGET}/bin/python.exe
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_SHORT_VERSION_NO_DOTS}.dll ${PYTARGET}/bin/python${PYTHON_SHORT_VERSION_NO_DOTS}.dll
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_SHORT_VERSION_NO_DOTS}.pdb ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.pdb
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/include/ ${PYTARGET}/include/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/lib/ ${PYTARGET}/lib/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/DLLs/ ${PYTARGET}/DLLs/
COMMAND cd ${PYTARGET}/lib/ && for /d /r . %%d in (__pycache__) do @if exist "%%d" echo "%%d" && rd /s/q "%%d"
)
add_custom_target(Package_Python ALL DEPENDS external_python external_numpy external_python_site_packages OUTPUT ${HARVEST_TARGET}/python/${PYTHON_SHORT_VERSION_NO_DOTS}/bin/python${PYTHON_POSTFIX}.exe)
endif()
if(BUILD_MODE STREQUAL Debug)
add_custom_command(
OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND echo packaging python
COMMAND echo this should ouput at ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTARGET}/libs
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_POSTFIX}.exe ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll ${PYTARGET}/bin/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/include/ ${PYTARGET}/include/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/lib/ ${PYTARGET}/lib/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/DLLs/ ${PYTARGET}/DLLs/
COMMAND cd ${PYTARGET}/lib/ && for /d /r . %%d in (__pycache__) do @if exist "%%d" echo "%%d" && rd /s/q "%%d"
)
add_custom_target(Package_Python ALL DEPENDS external_python external_numpy external_python_site_packages OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe)
endif()
endif()

View File

@@ -17,28 +17,28 @@
# ***** END GPL LICENSE BLOCK *****
set(PNG_EXTRA_ARGS
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DPNG_STATIC=ON
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DPNG_STATIC=ON
)
ExternalProject_Add(external_png
URL ${PNG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PNG_HASH}
PREFIX ${BUILD_DIR}/png
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/png ${DEFAULT_CMAKE_FLAGS} ${PNG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/png
URL ${PNG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PNG_HASH}
PREFIX ${BUILD_DIR}/png
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/png ${DEFAULT_CMAKE_FLAGS} ${PNG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/png
)
add_dependencies(
external_png
external_zlib
external_png
external_zlib
)
if(WIN32 AND BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_png after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_staticd${LIBEXT} ${LIBDIR}/png/lib/libpng16${LIBEXT}
DEPENDEES install
)
ExternalProject_Add_Step(external_png after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_staticd${LIBEXT} ${LIBDIR}/png/lib/libpng16${LIBEXT}
DEPENDEES install
)
endif()

View File

@@ -18,36 +18,36 @@
if(WIN32)
if(MSVC14) # vs2015 has timespec
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H /D_TIMESPEC_DEFINED ")
else() # everything before doesn't
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H ")
endif()
if(MSVC14) # vs2015 has timespec
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H /D_TIMESPEC_DEFINED ")
else() # everything before doesn't
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H ")
endif()
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS} /e XLIBS=/NODEFAULTLIB:msvcr)
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS} /e XLIBS=/NODEFAULTLIB:msvcr)
ExternalProject_Add(external_pthreads
URL ${PTHREADS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PTHREADS_HASH}
PREFIX ${BUILD_DIR}/pthreads
CONFIGURE_COMMAND echo .
BUILD_COMMAND ${PTHREADS_BUILD}
INSTALL_COMMAND COMMAND
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/libpthreadVC3${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC3${LIBEXT} &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthread.h ${LIBDIR}/pthreads/inc/pthread.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/sched.h ${LIBDIR}/pthreads/inc/sched.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/semaphore.h ${LIBDIR}/pthreads/inc/semaphore.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/_ptw32.h ${LIBDIR}/pthreads/inc/_ptw32.h
INSTALL_DIR ${LIBDIR}/pthreads
)
ExternalProject_Add(external_pthreads
URL ${PTHREADS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PTHREADS_HASH}
PREFIX ${BUILD_DIR}/pthreads
CONFIGURE_COMMAND echo .
BUILD_COMMAND ${PTHREADS_BUILD}
INSTALL_COMMAND COMMAND
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/libpthreadVC3${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC3${LIBEXT} &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthread.h ${LIBDIR}/pthreads/inc/pthread.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/sched.h ${LIBDIR}/pthreads/inc/sched.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/semaphore.h ${LIBDIR}/pthreads/inc/semaphore.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/_ptw32.h ${LIBDIR}/pthreads/inc/_ptw32.h
INSTALL_DIR ${LIBDIR}/pthreads
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_pthreads after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/inc/ ${HARVEST_TARGET}/pthreads/include/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/lib/ ${HARVEST_TARGET}/pthreads/lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_pthreads after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/inc/ ${HARVEST_TARGET}/pthreads/include/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/lib/ ${HARVEST_TARGET}/pthreads/lib
DEPENDEES install
)
endif()
endif()

View File

@@ -20,24 +20,24 @@ set(PUGIXML_EXTRA_ARGS
)
ExternalProject_Add(external_pugixml
URL ${PUGIXML_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PUGIXML_HASH}
PREFIX ${BUILD_DIR}/pugixml
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/pugixml ${DEFAULT_CMAKE_FLAGS} ${PUGIXML_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/pugixml
URL ${PUGIXML_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PUGIXML_HASH}
PREFIX ${BUILD_DIR}/pugixml
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/pugixml ${DEFAULT_CMAKE_FLAGS} ${PUGIXML_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/pugixml
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_pugixml after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_pugixml after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml_d.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_pugixml after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_pugixml after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -18,164 +18,86 @@
set(PYTHON_POSTFIX)
if(BUILD_MODE STREQUAL Debug)
set(PYTHON_POSTFIX _d)
set(PYTHON_POSTFIX _d)
set(PYTHON_EXTRA_INSTLAL_FLAGS -d)
endif()
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(SSL_POSTFIX -x64)
else()
set(SSL_POSTFIX)
endif()
set(PYTHON_BINARY_INTERNAL ${BUILD_DIR}/python/src/external_python/PCBuild/amd64/python${PYTHON_POSTFIX}.exe)
set(PYTHON_BINARY ${LIBDIR}/python/python${PYTHON_POSTFIX}.exe)
set(PYTHON_SRC ${BUILD_DIR}/python/src/external_python/)
macro(cmake_to_dos_path MsysPath ResultingPath)
string(REPLACE "/" "\\" ${ResultingPath} "${MsysPath}")
endmacro()
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe)
set(PYTHON_EXTERNALS_FOLDER ${BUILD_DIR}/python/src/external_python/externals)
set(DOWNLOADS_EXTERNALS_FOLDER ${DOWNLOAD_DIR}/externals)
macro(cmake_to_dos_path MsysPath ResultingPath)
string(REPLACE "/" "\\" ${ResultingPath} "${MsysPath}")
endmacro()
cmake_to_dos_path(${PYTHON_EXTERNALS_FOLDER} PYTHON_EXTERNALS_FOLDER_DOS)
cmake_to_dos_path(${DOWNLOADS_EXTERNALS_FOLDER} DOWNLOADS_EXTERNALS_FOLDER_DOS)
set(PYTHON_EXTERNALS_FOLDER ${BUILD_DIR}/python/src/external_python/externals)
set(DOWNLOADS_EXTERNALS_FOLDER ${DOWNLOAD_DIR}/externals)
ExternalProject_Add(external_python
URL ${PYTHON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PYTHON_HASH}
PREFIX ${BUILD_DIR}/python
CONFIGURE_COMMAND ""
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p ${PYTHON_ARCH} -c ${BUILD_MODE}
INSTALL_COMMAND ${PYTHON_BINARY_INTERNAL} ${PYTHON_SRC}/PC/layout/main.py -b ${PYTHON_SRC}/PCbuild/amd64 -s ${PYTHON_SRC} -t ${PYTHON_SRC}/tmp/ --include-underpth --include-stable --include-pip --include-dev --include-launchers --include-symbols ${PYTHON_EXTRA_INSTLAL_FLAGS} --copy ${LIBDIR}/python
)
cmake_to_dos_path(${PYTHON_EXTERNALS_FOLDER} PYTHON_EXTERNALS_FOLDER_DOS)
cmake_to_dos_path(${DOWNLOADS_EXTERNALS_FOLDER} DOWNLOADS_EXTERNALS_FOLDER_DOS)
message("Python externals = ${PYTHON_EXTERNALS_FOLDER}")
message("Python externals_dos = ${PYTHON_EXTERNALS_FOLDER_DOS}")
message("Python DOWNLOADS_EXTERNALS_FOLDER = ${DOWNLOADS_EXTERNALS_FOLDER}")
message("Python DOWNLOADS_EXTERNALS_FOLDER_DOS = ${DOWNLOADS_EXTERNALS_FOLDER_DOS}")
ExternalProject_Add(external_python
URL ${PYTHON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PYTHON_HASH}
PREFIX ${BUILD_DIR}/python
PATCH_COMMAND
echo mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}" &&
mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}"
CONFIGURE_COMMAND ""
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p ${PYTHON_ARCH} -c ${BUILD_MODE}
INSTALL_COMMAND COMMAND
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION} &&
${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION}/pyconfig.h
)
message("PythinRedist = ${BUILD_DIR}/python/src/external_python/redist")
message("POutput = ${PYTHON_OUTPUTDIR}")
else()
if(APPLE)
# disable functions that can be in 10.13 sdk but aren't available on 10.9 target
set(PYTHON_FUNC_CONFIGS
export ac_cv_func_futimens=no &&
export ac_cv_func_utimensat=no &&
export ac_cv_func_basename_r=no &&
export ac_cv_func_clock_getres=no &&
export ac_cv_func_clock_gettime=no &&
export ac_cv_func_clock_settime=no &&
export ac_cv_func_dirname_r=no &&
export ac_cv_func_getentropy=no &&
export ac_cv_func_mkostemp=no &&
export ac_cv_func_mkostemps=no &&
export ac_cv_func_timingsafe_bcmp=no)
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && ${PYTHON_FUNC_CONFIGS})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python.exe)
else()
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python)
endif()
if(APPLE)
# disable functions that can be in 10.13 sdk but aren't available on 10.9 target
set(PYTHON_FUNC_CONFIGS
export ac_cv_func_futimens=no &&
export ac_cv_func_utimensat=no &&
export ac_cv_func_basename_r=no &&
export ac_cv_func_clock_getres=no &&
export ac_cv_func_clock_gettime=no &&
export ac_cv_func_clock_settime=no &&
export ac_cv_func_dirname_r=no &&
export ac_cv_func_getentropy=no &&
export ac_cv_func_mkostemp=no &&
export ac_cv_func_mkostemps=no &&
export ac_cv_func_timingsafe_bcmp=no)
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && ${PYTHON_FUNC_CONFIGS})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python.exe)
else()
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python)
endif()
set(PYTHON_CONFIGURE_EXTRA_ARGS "--with-openssl=${LIBDIR}/ssl")
set(PYTHON_CFLAGS "-I${LIBDIR}/sqlite/include -I${LIBDIR}/bzip2/include -I${LIBDIR}/lzma/include -I${LIBDIR}/zlib/include")
set(PYTHON_LDFLAGS "-L${LIBDIR}/ffi/lib -L${LIBDIR}/sqlite/lib -L${LIBDIR}/bzip2/lib -L${LIBDIR}/lzma/lib -L${LIBDIR}/zlib/lib")
set(PYTHON_CONFIGURE_EXTRA_ENV
export CFLAGS=${PYTHON_CFLAGS} &&
export CPPFLAGS=${PYTHON_CFLAGS} &&
export LDFLAGS=${PYTHON_LDFLAGS} &&
export PKG_CONFIG_PATH=${LIBDIR}/ffi/lib/pkgconfig)
set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_linux.diff)
set(PYTHON_CONFIGURE_EXTRA_ARGS "--with-openssl=${LIBDIR}/ssl")
set(PYTHON_CFLAGS "-I${LIBDIR}/sqlite/include -I${LIBDIR}/bzip2/include -I${LIBDIR}/lzma/include -I${LIBDIR}/zlib/include")
set(PYTHON_LDFLAGS "-L${LIBDIR}/ffi/lib -L${LIBDIR}/sqlite/lib -L${LIBDIR}/bzip2/lib -L${LIBDIR}/lzma/lib -L${LIBDIR}/zlib/lib")
set(PYTHON_CONFIGURE_EXTRA_ENV
export CFLAGS=${PYTHON_CFLAGS} &&
export CPPFLAGS=${PYTHON_CFLAGS} &&
export LDFLAGS=${PYTHON_LDFLAGS} &&
export PKG_CONFIG_PATH=${LIBDIR}/ffi/lib/pkgconfig)
set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_linux.diff)
ExternalProject_Add(external_python
URL ${PYTHON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PYTHON_HASH}
PREFIX ${BUILD_DIR}/python
PATCH_COMMAND ${PYTHON_PATCH}
CONFIGURE_COMMAND ${PYTHON_CONFIGURE_ENV} && ${PYTHON_CONFIGURE_EXTRA_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/python ${PYTHON_CONFIGURE_EXTRA_ARGS}
BUILD_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make install
INSTALL_DIR ${LIBDIR}/python)
add_custom_target(Make_Python_Environment ALL DEPENDS external_python)
endif()
if(MSVC)
add_custom_command(
OUTPUT ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz
OUTPUT ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/lib ${BUILD_DIR}/python/src/external_python/redist/lib
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_asyncio${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_asyncio${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_bz2${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_bz2${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_contextvars${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_contextvars${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes_test${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes_test${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_decimal${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_decimal${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_distutils_findvs${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_distutils_findvs${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_elementtree${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_elementtree${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_hashlib${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_hashlib${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_lzma${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_lzma${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_msi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_msi${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_multiprocessing${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_multiprocessing${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_overlapped${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_overlapped${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_queue${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_queue${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_socket${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_socket${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_sqlite3${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_sqlite3${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ssl${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ssl${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testbuffer${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testbuffer${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testcapi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testcapi${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testimportmultiple${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testimportmultiple${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testmultiphase${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testmultiphase${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/pyexpat${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/pyexpat${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_POSTFIX}.exe" ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/select${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/select${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/unicodedata${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/unicodedata${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/winsound${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/winsound${PYTHON_POSTFIX}.pyd
#xxlimited is an example extension module, we don't need to ship it and debug doesn't build it
#leaving it commented out, so I won't get confused again with the next update.
#COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/xxlimited${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/xxlimited${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/libssl-1_1${SSL_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/libssl-1_1${SSL_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/libcrypto-1_1${SSL_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/libcrypto-1_1${SSL_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/sqlite3${PYTHON_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/sqlite3${PYTHON_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/python/src/external_python/redist" ${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz" "."
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz
)
add_custom_target(Package_Python ALL DEPENDS external_python ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe)
add_custom_command(OUTPUT ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/redist ${BUILD_DIR}/python/src/external_python/run
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${BUILD_DIR}/python/src/external_python/run/include
COMMAND ${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${BUILD_DIR}/python/src/external_python/run/include/pyconfig.h
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib" ${BUILD_DIR}/python/src/external_python/run/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib #missing postfix on purpose, distutils is not expecting it
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib" ${BUILD_DIR}/python/src/external_python/run/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib #other things like numpy still want it though.
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_POSTFIX}.exe" ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe
COMMAND ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe -m ensurepip --upgrade
)
add_custom_target(Make_Python_Environment ALL DEPENDS ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe Package_Python)
ExternalProject_Add(external_python
URL ${PYTHON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PYTHON_HASH}
PREFIX ${BUILD_DIR}/python
PATCH_COMMAND ${PYTHON_PATCH}
CONFIGURE_COMMAND ${PYTHON_CONFIGURE_ENV} && ${PYTHON_CONFIGURE_EXTRA_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/python ${PYTHON_CONFIGURE_EXTRA_ARGS}
BUILD_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make install
INSTALL_DIR ${LIBDIR}/python)
endif()
if(UNIX)
add_dependencies(
external_python
external_bzip2
external_ffi
external_lzma
external_ssl
external_sqlite
external_zlib
)
add_dependencies(
external_python
external_bzip2
external_ffi
external_lzma
external_ssl
external_sqlite
external_zlib
)
endif()

View File

@@ -15,27 +15,16 @@
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(HARVEST_CMD cmd /C FOR /d /r ${BUILD_DIR}/python/src/external_python/run/lib/site-packages %d IN (__pycache__) DO @IF EXIST "%d" rd /s /q "%d" &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/idna ${HARVEST_TARGET}/Release/site-packages/idna &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/chardet ${HARVEST_TARGET}/Release/site-packages/chardet &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/urllib3 ${HARVEST_TARGET}/Release/site-packages/urllib3 &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/certifi ${HARVEST_TARGET}/Release/site-packages/certifi &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/requests ${HARVEST_TARGET}/Release/site-packages/requests
)
else()
set(HARVEST_CMD echo .)
endif()
ExternalProject_Add(external_python_site_packages
DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
PREFIX ${BUILD_DIR}/site_packages
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all: && ${HARVEST_CMD}
DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
PREFIX ${BUILD_DIR}/site_packages
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all:
)
add_dependencies(
external_python_site_packages
Make_Python_Environment
external_python_site_packages
external_python
)

View File

@@ -17,33 +17,33 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(SDL_EXTRA_ARGS
-DSDL_STATIC=Off
)
set(SDL_EXTRA_ARGS
-DSDL_STATIC=Off
)
else()
set(SDL_EXTRA_ARGS
-DSDL_STATIC=ON
-DSDL_SHARED=OFF
-DSDL_VIDEO=OFF
-DSNDIO=OFF
)
set(SDL_EXTRA_ARGS
-DSDL_STATIC=ON
-DSDL_SHARED=OFF
-DSDL_VIDEO=OFF
-DSNDIO=OFF
)
endif()
ExternalProject_Add(external_sdl
URL ${SDL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${SDL_HASH}
PREFIX ${BUILD_DIR}/sdl
PATCH_COMMAND ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/sdl/src/external_sdl < ${PATCH_DIR}/sdl.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/sdl ${DEFAULT_CMAKE_FLAGS} ${SDL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/sdl
URL ${SDL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${SDL_HASH}
PREFIX ${BUILD_DIR}/sdl
PATCH_COMMAND ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/sdl/src/external_sdl < ${PATCH_DIR}/sdl.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/sdl ${DEFAULT_CMAKE_FLAGS} ${SDL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/sdl
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_sdl after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/include/sdl2 ${HARVEST_TARGET}/sdl/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/lib ${HARVEST_TARGET}/sdl/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/bin ${HARVEST_TARGET}/sdl/lib
DEPENDEES install
)
ExternalProject_Add_Step(external_sdl after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/include/sdl2 ${HARVEST_TARGET}/sdl/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/lib ${HARVEST_TARGET}/sdl/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/bin ${HARVEST_TARGET}/sdl/lib
DEPENDEES install
)
endif()

View File

@@ -24,11 +24,11 @@
message("LIBDIR = ${LIBDIR}")
macro(cmake_to_msys_path MsysPath ResultingPath)
string(REPLACE ":" "" TmpPath "${MsysPath}")
string(SUBSTRING ${TmpPath} 0 1 Drive)
string(SUBSTRING ${TmpPath} 1 255 PathPart)
string(TOLOWER ${Drive} LowerDrive)
string(CONCAT ${ResultingPath} "/" ${LowerDrive} ${PathPart})
string(REPLACE ":" "" TmpPath "${MsysPath}")
string(SUBSTRING ${TmpPath} 0 1 Drive)
string(SUBSTRING ${TmpPath} 1 255 PathPart)
string(TOLOWER ${Drive} LowerDrive)
string(CONCAT ${ResultingPath} "/" ${LowerDrive} ${PathPart})
endmacro()
cmake_to_msys_path(${LIBDIR} mingw_LIBDIR)
message("mingw_LIBDIR = ${mingw_LIBDIR}")
@@ -36,192 +36,192 @@ message("mingw_LIBDIR = ${mingw_LIBDIR}")
message("Checking for mingw32")
# download mingw32
if(NOT EXISTS "${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z")
message("Downloading mingw32")
file(DOWNLOAD "https://astuteinternet.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.4/threads-win32/sjlj/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z" "${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z")
message("Downloading mingw32")
file(DOWNLOAD "https://astuteinternet.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.4/threads-win32/sjlj/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z" "${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z")
endif()
# make mingw root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/mingw
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/mingw
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract mingw32
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd") AND (EXISTS "${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z"))
message("Extracting mingw32")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw
)
message("Extracting mingw32")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw
)
endif()
message("Checking for pkg-config")
if(NOT EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
message("Downloading pkg-config")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip" "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
message("Downloading pkg-config")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip" "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
endif()
# extract pkgconfig
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/pkg-config.exe") AND (EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"))
message("Extracting pkg-config")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
message("Extracting pkg-config")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1/bin/pkg-config.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/pkg-config.exe"
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1/bin/pkg-config.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/pkg-config.exe"
)
endif()
message("Checking for nasm")
if(NOT EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip")
message("Downloading nasm")
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/win32/nasm-2.13.02-win32.zip" "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip")
message("Downloading nasm")
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/win32/nasm-2.13.02-win32.zip" "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip")
endif()
# extract nasm
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe") AND (EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip"))
message("Extracting nasm")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.13.02/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe"
)
message("Extracting nasm")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.13.02/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe"
)
endif()
SET(NASM_PATH ${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe)
message("Checking for mingwGet")
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
message("Downloading mingw-get")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
message("Downloading mingw-get")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
endif()
# extract mingw_get
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"))
message("Extracting mingw-get")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/
)
message("Extracting mingw-get")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/make.exe"))
message("Installing MSYS")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get install msys msys-patch
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/bin/
)
message("Installing MSYS")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get install msys msys-patch
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/bin/
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/mktemp.exe"))
message("Installing mktemp")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get install msys msys-mktemp
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/bin/
)
message("Installing mktemp")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get install msys msys-mktemp
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/bin/
)
endif()
message("Checking for CoreUtils")
# download old core_utils for pr.exe (ffmpeg needs it to build)
if(NOT EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
message("Downloading CoreUtils 5.97")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/MSYS/Base/msys-core/_obsolete/coreutils-5.97-MSYS-1.0.11-2/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2" "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
message("Downloading CoreUtils 5.97")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/MSYS/Base/msys-core/_obsolete/coreutils-5.97-MSYS-1.0.11-2/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2" "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
endif()
if((EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/pr.exe"))
message("Installing pr from CoreUtils 5.97")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/tmp_coreutils
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
message("Installing pr from CoreUtils 5.97")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/tmp_coreutils
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${DOWNLOAD_DIR}/tmp_coreutils/coreutils-5.97/bin/pr.exe "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/pr.exe"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${DOWNLOAD_DIR}/tmp_coreutils/coreutils-5.97/bin/pr.exe "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/pr.exe"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
endif()
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd")
message("Installing ming32sh.cmd")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/ming32sh.cmd ${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd
)
message("Installing ming32sh.cmd")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/ming32sh.cmd ${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd
)
endif()
message("Checking for perl")
# download perl for libvpx
if(NOT EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip")
message("Downloading perl")
file(DOWNLOAD "http://strawberryperl.com/download/5.22.1.3/strawberry-perl-5.22.1.3-32bit-portable.zip" "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip")
message("Downloading perl")
file(DOWNLOAD "http://strawberryperl.com/download/5.22.1.3/strawberry-perl-5.22.1.3-32bit-portable.zip" "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip")
endif()
# make perl root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/perl32")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/perl32
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/perl32
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract perl
if((NOT EXISTS "${DOWNLOAD_DIR}/perl32/portable.perl") AND (EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip"))
message("Extracting perl")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip
WORKING_DIRECTORY ${DOWNLOAD_DIR}/perl32
)
message("Extracting perl")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip
WORKING_DIRECTORY ${DOWNLOAD_DIR}/perl32
)
endif()
# get yasm for vpx
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/yasm.exe")
message("Downloading yasm")
file(DOWNLOAD "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win32.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/yasm.exe")
message("Downloading yasm")
file(DOWNLOAD "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win32.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/yasm.exe")
endif()
message("checking i686-w64-mingw32-strings")
# copy strings.exe to i686-w64-mingw32-strings for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strings.exe")
message("fixing i686-w64-mingw32-strings.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/strings.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strings.exe"
)
message("fixing i686-w64-mingw32-strings.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/strings.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strings.exe"
)
endif()
message("checking i686-w64-mingw32-ar.exe")
# copy ar.exe to i686-w64-mingw32-ar.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ar.exe")
message("fixing i686-w64-mingw32-ar.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ar.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ar.exe"
)
message("fixing i686-w64-mingw32-ar.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ar.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ar.exe"
)
endif()
message("checking i686-w64-mingw32-strip.exe")
# copy strip.exe to i686-w64-mingw32-strip.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strip.exe")
message("fixing i686-w64-mingw32-strip.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/strip.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strip.exe"
)
message("fixing i686-w64-mingw32-strip.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/strip.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strip.exe"
)
endif()
message("checking i686-w64-mingw32-ranlib.exe")
# copy ranlib.exe to i686-w64-mingw32-ranlib.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe")
message("fixing i686-w64-mingw32-ranlib.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe"
)
message("fixing i686-w64-mingw32-ranlib.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe"
)
endif()

View File

@@ -24,11 +24,11 @@
message("LIBDIR = ${LIBDIR}")
macro(cmake_to_msys_path MsysPath ResultingPath)
string(REPLACE ":" "" TmpPath "${MsysPath}")
string(SUBSTRING ${TmpPath} 0 1 Drive)
string(SUBSTRING ${TmpPath} 1 255 PathPart)
string(TOLOWER ${Drive} LowerDrive)
string(CONCAT ${ResultingPath} "/" ${LowerDrive} ${PathPart})
string(REPLACE ":" "" TmpPath "${MsysPath}")
string(SUBSTRING ${TmpPath} 0 1 Drive)
string(SUBSTRING ${TmpPath} 1 255 PathPart)
string(TOLOWER ${Drive} LowerDrive)
string(CONCAT ${ResultingPath} "/" ${LowerDrive} ${PathPart})
endmacro()
cmake_to_msys_path(${LIBDIR} mingw_LIBDIR)
message("mingw_LIBDIR = ${mingw_LIBDIR}")
@@ -36,192 +36,192 @@ message("mingw_LIBDIR = ${mingw_LIBDIR}")
message("Checking for mingw64")
# download ming64
if(NOT EXISTS "${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z")
message("Downloading mingw64")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.4/threads-win32/seh/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z" "${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z")
message("Downloading mingw64")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.4/threads-win32/seh/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z" "${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z")
endif()
# make mingw root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/mingw
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/mingw
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract mingw64
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd") AND (EXISTS "${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z"))
message("Extracting mingw64")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw
)
message("Extracting mingw64")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw
)
endif()
message("Checking for pkg-config")
if(NOT EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
message("Downloading pkg-config")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip" "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
message("Downloading pkg-config")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip" "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
endif()
# extract pkgconfig
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/pkg-config.exe") AND (EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"))
message("Extracting pkg-config")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
message("Extracting pkg-config")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1/bin/pkg-config.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/pkg-config.exe"
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1/bin/pkg-config.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/pkg-config.exe"
)
endif()
message("Checking for nasm")
if(NOT EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip")
message("Downloading nasm")
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/win64/nasm-2.13.02-win64.zip" "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip")
message("Downloading nasm")
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/win64/nasm-2.13.02-win64.zip" "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip")
endif()
# extract nasm
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe") AND (EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip"))
message("Extracting nasm")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.13.02/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe"
)
message("Extracting nasm")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.13.02/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe"
)
endif()
SET(NASM_PATH ${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe)
message("Checking for mingwGet")
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
message("Downloading mingw-get")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
message("Downloading mingw-get")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
endif()
# extract mingw_get
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"))
message("Extracting mingw-get")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/
)
message("Extracting mingw-get")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/make.exe"))
message("Installing MSYS")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get install msys msys-patch
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/bin/
)
message("Installing MSYS")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get install msys msys-patch
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/bin/
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/mktemp.exe"))
message("Installing mktemp")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get install msys msys-mktemp
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/bin/
)
message("Installing mktemp")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get install msys msys-mktemp
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/bin/
)
endif()
message("Checking for CoreUtils")
# download old core_utils for pr.exe (ffmpeg needs it to build)
if(NOT EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
message("Downloading CoreUtils 5.97")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/MSYS/Base/msys-core/_obsolete/coreutils-5.97-MSYS-1.0.11-2/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2" "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
message("Downloading CoreUtils 5.97")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/MSYS/Base/msys-core/_obsolete/coreutils-5.97-MSYS-1.0.11-2/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2" "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
endif()
if((EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/pr.exe"))
message("Installing pr from CoreUtils 5.97")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/tmp_coreutils
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
message("Installing pr from CoreUtils 5.97")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/tmp_coreutils
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${DOWNLOAD_DIR}/tmp_coreutils/coreutils-5.97/bin/pr.exe "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/pr.exe"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${DOWNLOAD_DIR}/tmp_coreutils/coreutils-5.97/bin/pr.exe "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/pr.exe"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
endif()
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd")
message("Installing ming64sh.cmd")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/ming64sh.cmd ${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd
)
message("Installing ming64sh.cmd")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/ming64sh.cmd ${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd
)
endif()
message("Checking for perl")
# download perl for libvpx
if(NOT EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip")
message("Downloading perl")
file(DOWNLOAD "http://strawberryperl.com/download/5.22.1.3/strawberry-perl-5.22.1.3-64bit-portable.zip" "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip")
message("Downloading perl")
file(DOWNLOAD "http://strawberryperl.com/download/5.22.1.3/strawberry-perl-5.22.1.3-64bit-portable.zip" "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip")
endif()
# make perl root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/perl")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/perl
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/perl
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract perl
if((NOT EXISTS "${DOWNLOAD_DIR}/perl/portable.perl") AND (EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip"))
message("Extracting perl")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip
WORKING_DIRECTORY ${DOWNLOAD_DIR}/perl
)
message("Extracting perl")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip
WORKING_DIRECTORY ${DOWNLOAD_DIR}/perl
)
endif()
# get yasm for vpx
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/yasm.exe")
message("Downloading yasm")
file(DOWNLOAD "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win64.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/yasm.exe")
message("Downloading yasm")
file(DOWNLOAD "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win64.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/yasm.exe")
endif()
message("checking x86_64-w64-mingw32-strings.exe")
# copy strings.exe to x86_64-w64-mingw32-strings.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strings.exe")
message("fixing x86_64-w64-mingw32-strings.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/strings.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strings.exe"
)
message("fixing x86_64-w64-mingw32-strings.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/strings.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strings.exe"
)
endif()
message("checking x86_64-w64-mingw32-ar.exe")
# copy ar.exe to x86_64-w64-mingw32-ar.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ar.exe")
message("fixing x86_64-w64-mingw32-ar.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ar.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ar.exe"
)
message("fixing x86_64-w64-mingw32-ar.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ar.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ar.exe"
)
endif()
message("checking x86_64-w64-mingw32-strip.exe")
# copy strip.exe to x86_64-w64-mingw32-strip.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strip.exe")
message("fixing x86_64-w64-mingw32-strip.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/strip.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strip.exe"
)
message("fixing x86_64-w64-mingw32-strip.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/strip.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strip.exe"
)
endif()
message("checking x86_64-w64-mingw32-ranlib.exe")
# copy ranlib.exe to x86_64-w64-mingw32-ranlib.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe")
message("fixing x86_64-w64-mingw32-ranlib.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe"
)
message("fixing x86_64-w64-mingw32-ranlib.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe"
)
endif()

View File

@@ -20,43 +20,43 @@ set(SNDFILE_EXTRA_ARGS)
set(SNDFILE_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/flac/lib/pkgconfig:${mingw_LIBDIR})
if(WIN32)
set(SNDFILE_ENV set ${SNDFILE_ENV} &&)
#shared for windows because static libs will drag in a libgcc dependency.
set(SNDFILE_OPTIONS --disable-static --enable-shared )
set(SNDFILE_ENV set ${SNDFILE_ENV} &&)
# Shared for windows because static libs will drag in a libgcc dependency.
set(SNDFILE_OPTIONS --disable-static --enable-shared )
else()
set(SNDFILE_OPTIONS --enable-static --disable-shared )
set(SNDFILE_OPTIONS --enable-static --disable-shared )
endif()
if(UNIX)
set(SNDFILE_PATCH_CMD ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/sndfile/src/external_sndfile < ${PATCH_DIR}/sndfile.diff)
set(SNDFILE_PATCH_CMD ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/sndfile/src/external_sndfile < ${PATCH_DIR}/sndfile.diff)
else()
set(SNDFILE_PATCH_CMD)
set(SNDFILE_PATCH_CMD)
endif()
ExternalProject_Add(external_sndfile
URL ${SNDFILE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${SNDFILE_HASH}
PREFIX ${BUILD_DIR}/sndfile
PATCH_COMMAND ${SNDFILE_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && ${SNDFILE_ENV} ${CONFIGURE_COMMAND} ${SNDFILE_OPTIONS} --prefix=${mingw_LIBDIR}/sndfile
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && make install
INSTALL_DIR ${LIBDIR}/sndfile
URL ${SNDFILE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${SNDFILE_HASH}
PREFIX ${BUILD_DIR}/sndfile
PATCH_COMMAND ${SNDFILE_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && ${SNDFILE_ENV} ${CONFIGURE_COMMAND} ${SNDFILE_OPTIONS} --prefix=${mingw_LIBDIR}/sndfile
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && make install
INSTALL_DIR ${LIBDIR}/sndfile
)
if(MSVC)
set_target_properties(external_sndfile PROPERTIES FOLDER Mingw)
set_target_properties(external_sndfile PROPERTIES FOLDER Mingw)
endif()
add_dependencies(
external_sndfile
external_ogg
external_vorbis
external_sndfile
external_ogg
external_vorbis
)
if(UNIX)
add_dependencies(
external_sndfile
external_flac
)
add_dependencies(
external_sndfile
external_flac
)
endif()

View File

@@ -17,12 +17,12 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_spnav
URL ${SPNAV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${SPNAV_HASH}
PREFIX ${BUILD_DIR}/spnav
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/spnav --disable-shared --enable-static --with-pic
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make install
INSTALL_DIR ${LIBDIR}/spnav
URL ${SPNAV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${SPNAV_HASH}
PREFIX ${BUILD_DIR}/spnav
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/spnav --disable-shared --enable-static --with-pic
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make install
INSTALL_DIR ${LIBDIR}/spnav
)

View File

@@ -20,38 +20,38 @@ set(SQLITE_CONFIGURE_ENV echo .)
set(SQLITE_CONFIGURATION_ARGS)
if(UNIX AND NOT APPLE)
set(SQLITE_LDFLAGS -Wl,--as-needed)
set(SQLITE_CFLAGS
"-DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_COLUMN_METADATA \
-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS \
-DSQLITE_ENABLE_RTREE=1 -DSQLITE_SOUNDEX=1 \
-DSQLITE_ENABLE_UNLOCK_NOTIFY \
-DSQLITE_OMIT_LOOKASIDE=1 -DSQLITE_ENABLE_DBSTAT_VTAB \
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 \
-DSQLITE_ENABLE_LOAD_EXTENSION \
-DSQLITE_ENABLE_JSON1 \
-DSQLITE_LIKE_DOESNT_MATCH_BLOBS \
-DSQLITE_THREADSAFE=1 \
-DSQLITE_ENABLE_FTS3_TOKENIZER=1 \
-DSQLITE_MAX_SCHEMA_RETRY=25 \
-DSQLITE_ENABLE_PREUPDATE_HOOK \
-DSQLITE_ENABLE_SESSION \
-DSQLITE_ENABLE_STMTVTAB \
-DSQLITE_MAX_VARIABLE_NUMBER=250000 \
-fPIC")
set(SQLITE_CONFIGURE_ENV ${SQLITE_CONFIGURE_ENV} && export LDFLAGS=${SQLITE_LDFLAGS} && export CFLAGS=${SQLITE_CFLAGS})
set(SQLITE_CONFIGURATION_ARGS ${SQLITE_CONFIGURATION_ARGS} --enable-threadsafe --enable-load-extension --enable-json1 --enable-fts4 --enable-fts5
--enable-shared=no)
set(SQLITE_LDFLAGS -Wl,--as-needed)
set(SQLITE_CFLAGS
"-DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_COLUMN_METADATA \
-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS \
-DSQLITE_ENABLE_RTREE=1 -DSQLITE_SOUNDEX=1 \
-DSQLITE_ENABLE_UNLOCK_NOTIFY \
-DSQLITE_OMIT_LOOKASIDE=1 -DSQLITE_ENABLE_DBSTAT_VTAB \
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 \
-DSQLITE_ENABLE_LOAD_EXTENSION \
-DSQLITE_ENABLE_JSON1 \
-DSQLITE_LIKE_DOESNT_MATCH_BLOBS \
-DSQLITE_THREADSAFE=1 \
-DSQLITE_ENABLE_FTS3_TOKENIZER=1 \
-DSQLITE_MAX_SCHEMA_RETRY=25 \
-DSQLITE_ENABLE_PREUPDATE_HOOK \
-DSQLITE_ENABLE_SESSION \
-DSQLITE_ENABLE_STMTVTAB \
-DSQLITE_MAX_VARIABLE_NUMBER=250000 \
-fPIC")
set(SQLITE_CONFIGURE_ENV ${SQLITE_CONFIGURE_ENV} && export LDFLAGS=${SQLITE_LDFLAGS} && export CFLAGS=${SQLITE_CFLAGS})
set(SQLITE_CONFIGURATION_ARGS ${SQLITE_CONFIGURATION_ARGS} --enable-threadsafe --enable-load-extension --enable-json1 --enable-fts4 --enable-fts5
--enable-shared=no)
endif()
ExternalProject_Add(external_sqlite
URL ${SQLITE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA1=${SQLITE_HASH}
PREFIX ${BUILD_DIR}/sqlite
PATCH_COMMAND ${SQLITE_PATCH_CMD}
CONFIGURE_COMMAND ${SQLITE_CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/sqlite ${SQLITE_CONFIGURATION_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make install
INSTALL_DIR ${LIBDIR}/sqlite
URL ${SQLITE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA1=${SQLITE_HASH}
PREFIX ${BUILD_DIR}/sqlite
PATCH_COMMAND ${SQLITE_PATCH_CMD}
CONFIGURE_COMMAND ${SQLITE_CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/sqlite ${SQLITE_CONFIGURATION_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make install
INSTALL_DIR ${LIBDIR}/sqlite
)

View File

@@ -19,30 +19,30 @@
set(SSL_CONFIGURE_COMMAND ./Configure)
set(SSL_PATCH_CMD echo .)
if (APPLE)
set(SSL_OS_COMPILER "blender-darwin-x86_64")
if(APPLE)
set(SSL_OS_COMPILER "blender-darwin-x86_64")
else()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(SSL_EXTRA_ARGS enable-ec_nistp_64_gcc_128)
set(SSL_OS_COMPILER "blender-linux-x86_64")
else()
set(SSL_OS_COMPILER "blender-linux-x86")
endif()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(SSL_EXTRA_ARGS enable-ec_nistp_64_gcc_128)
set(SSL_OS_COMPILER "blender-linux-x86_64")
else()
set(SSL_OS_COMPILER "blender-linux-x86")
endif()
endif()
ExternalProject_Add(external_ssl
URL ${SSL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${SSL_HASH}
PREFIX ${BUILD_DIR}/ssl
PATCH_COMMAND ${SSL_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && ${SSL_CONFIGURE_COMMAND} --prefix=${LIBDIR}/ssl
--openssldir=${LIBDIR}/ssl
no-shared
no-idea no-mdc2 no-rc5 no-zlib no-ssl3 enable-unit-test no-ssl3-method enable-rfc3779 enable-cms
--config=${CMAKE_CURRENT_SOURCE_DIR}/cmake/ssl.conf
${SSL_OS_COMPILER}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make install
INSTALL_DIR ${LIBDIR}/ssl
URL ${SSL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${SSL_HASH}
PREFIX ${BUILD_DIR}/ssl
PATCH_COMMAND ${SSL_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && ${SSL_CONFIGURE_COMMAND} --prefix=${LIBDIR}/ssl
--openssldir=${LIBDIR}/ssl
no-shared
no-idea no-mdc2 no-rc5 no-zlib no-ssl3 enable-unit-test no-ssl3-method enable-rfc3779 enable-cms
--config=${CMAKE_CURRENT_SOURCE_DIR}/cmake/ssl.conf
${SSL_OS_COMPILER}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make install
INSTALL_DIR ${LIBDIR}/ssl
)

View File

@@ -17,36 +17,36 @@
# ***** END GPL LICENSE BLOCK *****
set(TBB_EXTRA_ARGS
-DTBB_BUILD_SHARED=Off
-DTBB_BUILD_TBBMALLOC=Off
-DTBB_BUILD_TBBMALLOC_PROXY=Off
-DTBB_BUILD_STATIC=On
-DTBB_BUILD_SHARED=Off
-DTBB_BUILD_TBBMALLOC=On
-DTBB_BUILD_TBBMALLOC_PROXY=Off
-DTBB_BUILD_STATIC=On
)
# CMake script for TBB from https://github.com/wjakob/tbb/blob/master/CMakeLists.txt
ExternalProject_Add(external_tbb
URL ${TBB_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${TBB_HASH}
PREFIX ${BUILD_DIR}/tbb
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_tbb.txt ${BUILD_DIR}/tbb/src/external_tbb/CMakeLists.txt &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/tbb/src/external_tbb/build/vs2013/version_string.ver ${BUILD_DIR}/tbb/src/external_tbb/src/tbb/version_string.ver
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tbb ${DEFAULT_CMAKE_FLAGS} ${TBB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tbb
URL ${TBB_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${TBB_HASH}
PREFIX ${BUILD_DIR}/tbb
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_tbb.txt ${BUILD_DIR}/tbb/src/external_tbb/CMakeLists.txt &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/tbb/src/external_tbb/build/vs2013/version_string.ver ${BUILD_DIR}/tbb/src/external_tbb/src/tbb/version_string.ver
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tbb ${DEFAULT_CMAKE_FLAGS} ${TBB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tbb
)
if (WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_tbb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tbb/include/ ${HARVEST_TARGET}/tbb/include/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_tbb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
DEPENDEES install
)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_tbb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tbb/include/ ${HARVEST_TARGET}/tbb/include/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_tbb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -16,29 +16,35 @@
#
# ***** END GPL LICENSE BLOCK *****
if(UNIX)
set(THEORA_CONFIGURE_ENV ${CONFIGURE_ENV} && export HAVE_PDFLATEX=no)
else()
set(THEORA_CONFIGURE_ENV ${CONFIGURE_ENV})
endif()
ExternalProject_Add(external_theora
URL ${THEORA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${THEORA_HASH}
PREFIX ${BUILD_DIR}/theora
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/theora
--disable-shared
--enable-static
--with-pic
--with-ogg=${LIBDIR}/ogg
--with-vorbis=${LIBDIR}/vorbis
--disable-examples
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make install
INSTALL_DIR ${LIBDIR}/theora
URL ${THEORA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${THEORA_HASH}
PREFIX ${BUILD_DIR}/theora
CONFIGURE_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/theora
--disable-shared
--enable-static
--with-pic
--with-ogg=${LIBDIR}/ogg
--with-vorbis=${LIBDIR}/vorbis
--disable-examples
BUILD_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make install
INSTALL_DIR ${LIBDIR}/theora
)
add_dependencies(
external_theora
external_vorbis
external_ogg
external_theora
external_vorbis
external_ogg
)
if(MSVC)
set_target_properties(external_theora PROPERTIES FOLDER Mingw)
set_target_properties(external_theora PROPERTIES FOLDER Mingw)
endif()

View File

@@ -17,31 +17,31 @@
# ***** END GPL LICENSE BLOCK *****
set(TIFF_EXTRA_ARGS
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
-DPNG_STATIC=ON
-DBUILD_SHARED_LIBS=OFF
-Dlzma=OFF
-Djbig=OFF
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
-DPNG_STATIC=ON
-DBUILD_SHARED_LIBS=OFF
-Dlzma=OFF
-Djbig=OFF
)
ExternalProject_Add(external_tiff
URL ${TIFF_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${TIFF_HASH}
PREFIX ${BUILD_DIR}/tiff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tiff ${DEFAULT_CMAKE_FLAGS} ${TIFF_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tiff
URL ${TIFF_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${TIFF_HASH}
PREFIX ${BUILD_DIR}/tiff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tiff ${DEFAULT_CMAKE_FLAGS} ${TIFF_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tiff
)
add_dependencies(
external_tiff
external_zlib
external_tiff
external_zlib
)
if(WIN32 AND BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_tiff after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiffd${LIBEXT} ${LIBDIR}/tiff/lib/tiff${LIBEXT}
DEPENDEES install
)
ExternalProject_Add_Step(external_tiff after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiffd${LIBEXT} ${LIBDIR}/tiff/lib/tiff${LIBEXT}
DEPENDEES install
)
endif()

View File

@@ -20,12 +20,12 @@ set(TINYXML_EXTRA_ARGS
)
ExternalProject_Add(external_tinyxml
URL ${TINYXML_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${TINYXML_HASH}
PREFIX ${BUILD_DIR}/tinyxml
#patch taken from ocio
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/tinyxml/src/external_tinyxml < ${PATCH_DIR}/tinyxml.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tinyxml ${DEFAULT_CMAKE_FLAGS} ${TINYXML_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tinyxml
URL ${TINYXML_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${TINYXML_HASH}
PREFIX ${BUILD_DIR}/tinyxml
# patch taken from ocio
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/tinyxml/src/external_tinyxml < ${PATCH_DIR}/tinyxml.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tinyxml ${DEFAULT_CMAKE_FLAGS} ${TINYXML_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tinyxml
)

View File

@@ -46,32 +46,32 @@ set(PTHREADS_URI http://sourceforge.mirrorservice.org/p/pt/pthreads4w/pthreads4w
set(PTHREADS_HASH f3bf81bb395840b3446197bcf4ecd653)
set(ILMBASE_VERSION 2.3.0)
if (WIN32)
if(BUILD_MODE STREQUAL Release)
set(ILMBASE_VERSION_POSTFIX _s)
set(OPENEXR_VERSION_POSTFIX _s)
else()
set(ILMBASE_VERSION_POSTFIX _s_d)
set(OPENEXR_VERSION_POSTFIX _s_d)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
set(ILMBASE_VERSION_POSTFIX _s)
set(OPENEXR_VERSION_POSTFIX _s)
else()
set(ILMBASE_VERSION_POSTFIX _s_d)
set(OPENEXR_VERSION_POSTFIX _s_d)
endif()
else()
set(ILMBASE_VERSION_POSTFIX)
set(ILMBASE_VERSION_POSTFIX)
endif()
set(ILMBASE_URI https://github.com/openexr/openexr/releases/download/v${ILMBASE_VERSION}/ilmbase-${ILMBASE_VERSION}.tar.gz)
set(ILMBASE_HASH 354bf86de3b930ab87ac63619d60c860)
set(OPENEXR_VERSION 2.3.0)
if (WIN32) #release 2.3.0 tarball has broken cmake support
set(OPENEXR_URI https://github.com/openexr/openexr/archive/0ac2ea34c8f3134148a5df4052e40f155b76f6fb.tar.gz)
set(OPENEXR_HASH ed159435d508240712fbaaa21d94bafb)
if(WIN32) # release 2.3.0 tarball has broken cmake support
set(OPENEXR_URI https://github.com/openexr/openexr/archive/0ac2ea34c8f3134148a5df4052e40f155b76f6fb.tar.gz)
set(OPENEXR_HASH ed159435d508240712fbaaa21d94bafb)
else()
set(OPENEXR_VERSION_POSTFIX)
set(OPENEXR_URI https://github.com/openexr/openexr/releases/download/v${OPENEXR_VERSION}/openexr-${OPENEXR_VERSION}.tar.gz)
set(OPENEXR_HASH a157e8a46596bc185f2472a5a4682174)
set(OPENEXR_VERSION_POSTFIX)
set(OPENEXR_URI https://github.com/openexr/openexr/releases/download/v${OPENEXR_VERSION}/openexr-${OPENEXR_VERSION}.tar.gz)
set(OPENEXR_HASH a157e8a46596bc185f2472a5a4682174)
endif()
set(FREETYPE_VERSION 2.9.1)
set(FREETYPE_URI http://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz)
set(FREETYPE_URI http://prdownloads.sourceforge.net/freetype/freetype-${FREETYPE_VERSION}.tar.gz)
set(FREETYPE_HASH 3adb0e35d3c100c456357345ccfa8056)
set(GLEW_VERSION 1.13.0)
@@ -90,23 +90,23 @@ set(ALEMBIC_VERSION 1.7.8)
set(ALEMBIC_URI https://github.com/alembic/alembic/archive/${ALEMBIC_VERSION}.tar.gz)
set(ALEMBIC_MD5 d095c2feb5e183b824904db7b63c1d30)
## hash is for 3.1.2
# hash is for 3.1.2
set(GLFW_GIT_UID 30306e54705c3adae9fe082c816a3be71963485c)
set(GLFW_URI https://github.com/glfw/glfw/archive/${GLFW_GIT_UID}.zip)
set(GLFW_HASH 20cacb1613da7eeb092f3ac4f6b2b3d0)
#latest uid in git as of 2016-04-01
# latest uid in git as of 2016-04-01
set(CLEW_GIT_UID 277db43f6cafe8b27c6f1055f69dc67da4aeb299)
set(CLEW_URI https://github.com/OpenCLWrangler/clew/archive/${CLEW_GIT_UID}.zip)
set(CLEW_HASH 2c699d10ed78362e71f56fae2a4c5f98)
#latest uid in git as of 2016-04-01
# latest uid in git as of 2016-04-01
set(CUEW_GIT_UID 1744972026de9cf27c8a7dc39cf39cd83d5f922f)
set(CUEW_URI https://github.com/CudaWrangler/cuew/archive/${CUEW_GIT_UID}.zip)
set(CUEW_HASH 86760d62978ebfd96cd93f5aa1abaf4a)
set(OPENSUBDIV_VERSION v3_3_3)
set(OPENSUBDIV_Hash 29c79dc01ef616aab02670bed5544ddd)
set(OPENSUBDIV_VERSION v3_4_0_RC2)
set(OPENSUBDIV_Hash f6a10ba9efaa82fde86fe65aad346319)
set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.tar.gz)
set(SDL_VERSION 2.0.8)
@@ -143,11 +143,11 @@ set(OSL_VERSION 1.9.9)
set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.tar.gz)
set(OSL_HASH 44ad511e424965a10fce051a053b0605)
set(PYTHON_VERSION 3.7.0)
set(PYTHON_VERSION 3.7.4)
set(PYTHON_SHORT_VERSION 3.7)
set(PYTHON_SHORT_VERSION_NO_DOTS 37)
set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
set(PYTHON_HASH eb8c2a6b1447d50813c02714af4681f3)
set(PYTHON_HASH d33e4aae66097051c2eca45ee3604803)
set(TBB_VERSION 2018_U5)
set(TBB_URI https://github.com/01org/tbb/archive/${TBB_VERSION}.tar.gz)
@@ -157,16 +157,16 @@ set(OPENVDB_VERSION 5.1.0)
set(OPENVDB_URI https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
set(OPENVDB_HASH 5310101f874dcfd2165f9cee68c22624)
set(IDNA_VERSION 2.7)
set(IDNA_VERSION 2.8)
set(CHARDET_VERSION 3.0.4)
set(URLLIB3_VERSION 1.23)
set(CERTIFI_VERSION 2018.8.13)
set(REQUESTS_VERSION 2.19.1)
set(URLLIB3_VERSION 1.25.3)
set(CERTIFI_VERSION 2019.6.16)
set(REQUESTS_VERSION 2.22.0)
set(NUMPY_VERSION v1.15.0)
set(NUMPY_SHORT_VERSION 1.15)
set(NUMPY_URI https://files.pythonhosted.org/packages/3a/20/c81632328b1a4e1db65f45c0a1350a9c5341fd4bbb8ea66cdd98da56fe2e/numpy-1.15.0.zip)
set(NUMPY_HASH 20e13185089011116a98e11c9bf8aa07)
set(NUMPY_VERSION v1.17.0)
set(NUMPY_SHORT_VERSION 1.17)
set(NUMPY_URI https://files.pythonhosted.org/packages/da/32/1b8f2bb5fb50e4db68543eb85ce37b9fa6660cd05b58bddfafafa7ed62da/numpy-1.17.0.zip)
set(NUMPY_HASH aed49b31bcb44ec73b8155be78566135)
set(LAME_VERSION 3.100)
set(LAME_URI http://downloads.sourceforge.net/project/lame/lame/3.100/lame-${LAME_VERSION}.tar.gz)
@@ -192,6 +192,10 @@ set(VPX_VERSION 1.7.0)
set(VPX_URI https://github.com/webmproject/libvpx/archive/v${VPX_VERSION}/libvpx-v${VPX_VERSION}.tar.gz)
set(VPX_HASH 1fec931eb5c94279ad219a5b6e0202358e94a93a90cfb1603578c326abfc1238)
set(OPUS_VERSION 1.3.1)
set(OPUS_URI https://archive.mozilla.org/pub/opus/opus-${OPUS_VERSION}.tar.gz)
set(OPUS_HASH 65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d)
set(X264_URI http://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20180811-2245-stable.tar.bz2)
set(X264_HASH ae8a868a0e236a348b35d79f3ee80294b169d1195408b689f9851383661ed7aa)
@@ -199,7 +203,7 @@ set(XVIDCORE_VERSION 1.3.5)
set(XVIDCORE_URI http://downloads.xvid.org/downloads/xvidcore-${XVIDCORE_VERSION}.tar.gz)
set(XVIDCORE_HASH 165ba6a2a447a8375f7b06db5a3c91810181f2898166e7c8137401d7fc894cf0)
#this has to be in sync with the version in blenders /extern folder
# This has to be in sync with the version in blenders /extern folder.
set(OPENJPEG_VERSION 2.3.0)
set(OPENJPEG_SHORT_VERSION 2.3)
# Use slightly newer commit after release which includes a cmake fix
@@ -230,9 +234,9 @@ set(SNDFILE_VERSION 1.0.28)
set(SNDFILE_URI http://www.mega-nerd.com/libsndfile/files/libsndfile-${SNDFILE_VERSION}.tar.gz)
set(SNDFILE_HASH 646b5f98ce89ac60cdb060fcd398247c)
#set(HIDAPI_VERSION 0.8.0-rc1)
#set(HIDAPI_URI https://github.com/signal11/hidapi/archive/hidapi-${HIDAPI_VERSION}.tar.gz)
#set(HIDAPI_HASH 069f9dd746edc37b6b6d0e3656f47199)
# set(HIDAPI_VERSION 0.8.0-rc1)
# set(HIDAPI_URI https://github.com/signal11/hidapi/archive/hidapi-${HIDAPI_VERSION}.tar.gz)
# set(HIDAPI_HASH 069f9dd746edc37b6b6d0e3656f47199)
set(HIDAPI_UID 89a6c75dc6f45ecabd4ddfbd2bf5ba6ad8ba38b5)
set(HIDAPI_URI https://github.com/TheOnlyJoey/hidapi/archive/${HIDAPI_UID}.zip)
@@ -251,7 +255,7 @@ set(JEMALLOC_URI https://github.com/jemalloc/jemalloc/releases/download/${JEMALL
set(JEMALLOC_HASH 507f7b6b882d868730d644510491d18f)
set(XML2_VERSION 2.9.4)
set(XML2_URI ftp://xmlsoft.org/libxml2/libxml2-${XML2_VERSION}.tar.gz)
set(XML2_URI http://xmlsoft.org/sources/libxml2-${XML2_VERSION}.tar.gz)
set(XML2_HASH ae249165c173b1ff386ee8ad676815f5)
set(TINYXML_VERSION 2_6_2)
@@ -284,7 +288,7 @@ set(BZIP2_URI http://http.debian.net/debian/pool/main/b/bzip2/bzip2_${BZIP2_VERS
set(BZIP2_HASH d70a9ccd8bdf47e302d96c69fecd54925f45d9c7b966bb4ef5f56b770960afa7)
set(FFI_VERSION 3.2.1)
set(FFI_URI ftp://sourceware.org/pub/libffi/libffi-${FFI_VERSION}.tar.gz)
set(FFI_URI https://sourceware.org/pub/libffi/libffi-${FFI_VERSION}.tar.gz)
set(FFI_HASH d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37)
set(LZMA_VERSION 5.2.4)
@@ -302,3 +306,15 @@ set(SQLITE_HASH fb558c49ee21a837713c4f1e7e413309aabdd9c7)
set(EMBREE_VERSION 3.2.4)
set(EMBREE_URI https://github.com/embree/embree/archive/v${EMBREE_VERSION}.zip)
set(EMBREE_HASH 3d4a1147002ff43939d45140aa9d6fb8)
set(OIDN_VERSION 1.0.0)
set(OIDN_URI https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.src.zip)
set(OIDN_HASH 19fe67b0164e8f020ac8a4f520defe60)
set(LIBGLU_VERSION 9.0.1)
set(LIBGLU_URI ftp://ftp.freedesktop.org/pub/mesa/glu/glu-${LIBGLU_VERSION}.tar.xz)
set(LIBGLU_HASH 151aef599b8259efe9acd599c96ea2a3)
set(MESA_VERSION 18.3.1)
set(MESA_URI ftp://ftp.freedesktop.org/pub/mesa//mesa-${MESA_VERSION}.tar.xz)
set(MESA_HASH d60828056d77bfdbae0970f9b15fb1be)

View File

@@ -17,25 +17,25 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_vorbis
URL ${VORBIS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${VORBIS_HASH}
PREFIX ${BUILD_DIR}/vorbis
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/vorbis
--disable-shared
--enable-static
--with-pic
--with-ogg=${LIBDIR}/ogg
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make install
INSTALL_DIR ${LIBDIR}/vorbis
URL ${VORBIS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${VORBIS_HASH}
PREFIX ${BUILD_DIR}/vorbis
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/vorbis
--disable-shared
--enable-static
--with-pic
--with-ogg=${LIBDIR}/ogg
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make install
INSTALL_DIR ${LIBDIR}/vorbis
)
add_dependencies(
external_vorbis
external_ogg
external_vorbis
external_ogg
)
if(MSVC)
set_target_properties(external_vorbis PROPERTIES FOLDER Mingw)
set_target_properties(external_vorbis PROPERTIES FOLDER Mingw)
endif()

View File

@@ -17,44 +17,46 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(VPX_EXTRA_FLAGS --target=x86_64-win64-gcc --disable-multithread)
else()
set(VPX_EXTRA_FLAGS --target=x86-win32-gcc --disable-multithread)
endif()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(VPX_EXTRA_FLAGS --target=x86_64-win64-gcc --disable-multithread)
else()
set(VPX_EXTRA_FLAGS --target=x86-win32-gcc --disable-multithread)
endif()
else()
if(APPLE)
set(VPX_EXTRA_FLAGS --target=x86_64-darwin13-gcc)
else()
set(VPX_EXTRA_FLAGS --target=generic-gnu)
endif()
if(APPLE)
set(VPX_EXTRA_FLAGS --target=x86_64-darwin13-gcc)
else()
set(VPX_EXTRA_FLAGS --target=generic-gnu)
endif()
endif()
ExternalProject_Add(external_vpx
URL ${VPX_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${VPX_HASH}
PREFIX ${BUILD_DIR}/vpx
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/vpx/src/external_vpx/ &&
${CONFIGURE_COMMAND_NO_TARGET} --prefix=${LIBDIR}/vpx
--disable-shared
--enable-static
--disable-install-bins
--disable-install-srcs
--disable-sse4_1
--disable-sse3
--disable-ssse3
--disable-avx
--disable-avx2
--disable-unit-tests
--disable-examples
${VPX_EXTRA_FLAGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make install
INSTALL_DIR ${LIBDIR}/vpx
URL ${VPX_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${VPX_HASH}
PREFIX ${BUILD_DIR}/vpx
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/vpx/src/external_vpx/ &&
${CONFIGURE_COMMAND_NO_TARGET} --prefix=${LIBDIR}/vpx
--disable-shared
--enable-static
--disable-install-bins
--disable-install-srcs
--disable-sse4_1
--disable-sse3
--disable-ssse3
--disable-avx
--disable-avx2
--disable-unit-tests
--disable-examples
--enable-vp8
--enable-vp9
${VPX_EXTRA_FLAGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make install
INSTALL_DIR ${LIBDIR}/vpx
)
if(MSVC)
set_target_properties(external_vpx PROPERTIES FOLDER Mingw)
set_target_properties(external_vpx PROPERTIES FOLDER Mingw)
endif()

View File

@@ -20,22 +20,22 @@
# library itself does not depend on them, so should give no problems.
set(WEBP_EXTRA_ARGS
-DWEBP_HAVE_SSE2=ON
-DWEBP_HAVE_SSE41=OFF
-DWEBP_HAVE_AVX2=OFF
-DWEBP_HAVE_SSE2=ON
-DWEBP_HAVE_SSE41=OFF
-DWEBP_HAVE_AVX2=OFF
)
if(WIN32)
set(WEBP_BUILD_DIR ${BUILD_MODE}/)
set(WEBP_BUILD_DIR ${BUILD_MODE}/)
else()
set(WEBP_BUILD_DIR)
set(WEBP_BUILD_DIR)
endif()
ExternalProject_Add(external_webp
URL ${WEBP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${WEBP_HASH}
PREFIX ${BUILD_DIR}/webp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/webp -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${WEBP_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/webp
URL ${WEBP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${WEBP_HASH}
PREFIX ${BUILD_DIR}/webp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/webp -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${WEBP_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/webp
)

View File

@@ -17,29 +17,29 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(X264_EXTRA_ARGS --enable-win32thread --cross-prefix=${MINGW_HOST}- --host=${MINGW_HOST})
set(X264_PATCH_CMD ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/x264/src/external_x264 < ${PATCH_DIR}/x264.diff)
set(X264_EXTRA_ARGS --enable-win32thread --cross-prefix=${MINGW_HOST}- --host=${MINGW_HOST})
set(X264_PATCH_CMD ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/x264/src/external_x264 < ${PATCH_DIR}/x264.diff)
else()
set(X264_PATCH_CMD echo .)
set(X264_PATCH_CMD echo .)
endif()
ExternalProject_Add(external_x264
URL ${X264_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${X264_HASH}
PREFIX ${BUILD_DIR}/x264
PATCH_COMMAND ${X264_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
--enable-static
--enable-pic
--disable-lavf
${X264_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make install
INSTALL_DIR ${LIBDIR}/x264
URL ${X264_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${X264_HASH}
PREFIX ${BUILD_DIR}/x264
PATCH_COMMAND ${X264_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
--enable-static
--enable-pic
--disable-lavf
${X264_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make install
INSTALL_DIR ${LIBDIR}/x264
)
if(MSVC)
set_target_properties(external_x264 PROPERTIES FOLDER Mingw)
set_target_properties(external_x264 PROPERTIES FOLDER Mingw)
endif()

View File

@@ -17,20 +17,20 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_xml2
URL ${XML2_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${XML2_HASH}
PREFIX ${BUILD_DIR}/xml2
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && ${CONFIGURE_COMMAND}
--prefix=${LIBDIR}/xml2
--disable-shared
--enable-static
--with-pic
--with-python=no
--with-lzma=no
--with-zlib=no
--with-iconv=no
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && make install
INSTALL_DIR ${LIBDIR}/xml2
URL ${XML2_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${XML2_HASH}
PREFIX ${BUILD_DIR}/xml2
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && ${CONFIGURE_COMMAND}
--prefix=${LIBDIR}/xml2
--disable-shared
--enable-static
--with-pic
--with-python=no
--with-lzma=no
--with-zlib=no
--with-iconv=no
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && make install
INSTALL_DIR ${LIBDIR}/xml2
)

View File

@@ -17,28 +17,28 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(XVIDCORE_EXTRA_ARGS --host=${MINGW_HOST})
set(XVIDCORE_EXTRA_ARGS --host=${MINGW_HOST})
endif()
ExternalProject_Add(external_xvidcore
URL ${XVIDCORE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${XVIDCORE_HASH}
PREFIX ${BUILD_DIR}/xvidcore
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/xvidcore ${XVIDCORE_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} &&
${CMAKE_COMMAND} -E remove ${LIBDIR}/xvidcore/lib/* && # clean because re-installing fails otherwise
cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make install
INSTALL_DIR ${LIBDIR}/xvidcore
URL ${XVIDCORE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${XVIDCORE_HASH}
PREFIX ${BUILD_DIR}/xvidcore
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/xvidcore ${XVIDCORE_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} &&
${CMAKE_COMMAND} -E remove ${LIBDIR}/xvidcore/lib/* && # clean because re-installing fails otherwise
cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make install
INSTALL_DIR ${LIBDIR}/xvidcore
)
ExternalProject_Add_Step(external_xvidcore after_install
COMMAND ${CMAKE_COMMAND} -E rename ${LIBDIR}/xvidcore/lib/xvidcore.a ${LIBDIR}/xvidcore/lib/libxvidcore.a || true
COMMAND ${CMAKE_COMMAND} -E remove ${LIBDIR}/xvidcore/lib/xvidcore.dll.a
DEPENDEES install
COMMAND ${CMAKE_COMMAND} -E rename ${LIBDIR}/xvidcore/lib/xvidcore.a ${LIBDIR}/xvidcore/lib/libxvidcore.a || true
COMMAND ${CMAKE_COMMAND} -E remove ${LIBDIR}/xvidcore/lib/xvidcore.dll.a
DEPENDEES install
)
if(MSVC)
set_target_properties(external_xvidcore PROPERTIES FOLDER Mingw)
set_target_properties(external_xvidcore PROPERTIES FOLDER Mingw)
endif()

View File

@@ -17,18 +17,18 @@
# ***** END GPL LICENSE BLOCK *****
set(YAMLCPP_EXTRA_ARGS
-DBUILD_GMOCK=OFF
-DYAML_CPP_BUILD_TESTS=OFF
-DYAML_CPP_BUILD_TOOLS=OFF
-DYAML_CPP_BUILD_CONTRIB=OFF
-DMSVC_SHARED_RT=OFF
-DBUILD_GMOCK=OFF
-DYAML_CPP_BUILD_TESTS=OFF
-DYAML_CPP_BUILD_TOOLS=OFF
-DYAML_CPP_BUILD_CONTRIB=OFF
-DMSVC_SHARED_RT=OFF
)
ExternalProject_Add(external_yamlcpp
URL ${YAMLCPP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${YAMLCPP_HASH}
PREFIX ${BUILD_DIR}/yamlcpp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/yamlcpp ${DEFAULT_CMAKE_FLAGS} ${YAMLCPP_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/yamlcpp
URL ${YAMLCPP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${YAMLCPP_HASH}
PREFIX ${BUILD_DIR}/yamlcpp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/yamlcpp ${DEFAULT_CMAKE_FLAGS} ${YAMLCPP_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/yamlcpp
)

View File

@@ -17,31 +17,31 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_zlib
URL ${ZLIB_URI}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/zlib
URL ${ZLIB_URI}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/zlib
)
if (WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstatic${LIBEXT} ${HARVEST_TARGET}/zlib/lib/libz_st${LIBEXT}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zlib/include/ ${HARVEST_TARGET}/zlib/include/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstaticd${LIBEXT} ${HARVEST_TARGET}/zlib/lib/libz_st_d${LIBEXT}
DEPENDEES install
)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstatic${LIBEXT} ${HARVEST_TARGET}/zlib/lib/libz_st${LIBEXT}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zlib/include/ ${HARVEST_TARGET}/zlib/include/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstaticd${LIBEXT} ${HARVEST_TARGET}/zlib/lib/libz_st_d${LIBEXT}
DEPENDEES install
)
endif()
else()
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/libz.a ${LIBDIR}/zlib/lib/libz_pic.a
DEPENDEES install
)
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/libz.a ${LIBDIR}/zlib/lib/libz_pic.a
DEPENDEES install
)
endif()

View File

@@ -17,23 +17,23 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_zlib_mingw
URL ${ZLIB_URI}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib_mingw
CONFIGURE_COMMAND echo .
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/zlib_mingw/src/external_zlib_mingw/ && make -f win32/makefile.gcc -j${MAKE_THREADS}
INSTALL_COMMAND echo .
INSTALL_DIR ${LIBDIR}/zlib_mingw
URL ${ZLIB_URI}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib_mingw
CONFIGURE_COMMAND echo .
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/zlib_mingw/src/external_zlib_mingw/ && make -f win32/makefile.gcc -j${MAKE_THREADS}
INSTALL_COMMAND echo .
INSTALL_DIR ${LIBDIR}/zlib_mingw
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_zlib_mingw after_install
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/zlib_mingw/src/external_zlib_mingw/libz.a ${LIBDIR}/zlib/lib/z.lib
DEPENDEES install
)
ExternalProject_Add_Step(external_zlib_mingw after_install
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/zlib_mingw/src/external_zlib_mingw/libz.a ${LIBDIR}/zlib/lib/z.lib
DEPENDEES install
)
endif()
if(MSVC)
set_target_properties(external_zlib_mingw PROPERTIES FOLDER Mingw)
set_target_properties(external_zlib_mingw PROPERTIES FOLDER Mingw)
endif()

View File

@@ -26,17 +26,17 @@ ARGS=$( \
getopt \
-o s:i:t:h \
--long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,\
with-all,with-opencollada,with-jack,with-embree,\
with-all,with-opencollada,with-jack,with-embree,with-oidn,\
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,\
force-all,force-python,force-numpy,force-boost,\
force-ocio,force-openexr,force-oiio,force-llvm,force-osl,force-osd,force-openvdb,\
force-ffmpeg,force-opencollada,force-alembic,force-embree,\
force-ffmpeg,force-opencollada,force-alembic,force-embree,force-oidn,\
build-all,build-python,build-numpy,build-boost,\
build-ocio,build-openexr,build-oiio,build-llvm,build-osl,build-osd,build-openvdb,\
build-ffmpeg,build-opencollada,build-alembic,build-embree,\
build-ffmpeg,build-opencollada,build-alembic,build-embree,build-oidn,\
skip-python,skip-numpy,skip-boost,\
skip-ocio,skip-openexr,skip-oiio,skip-llvm,skip-osl,skip-osd,skip-openvdb,\
skip-ffmpeg,skip-opencollada,skip-alembic,skip-embree \
skip-ffmpeg,skip-opencollada,skip-alembic,skip-embree,skip-oidn \
-- "$@" \
)
@@ -57,6 +57,7 @@ WITH_ALL=false
# Do not yet enable opencollada or embree, use --with-opencollada/--with-embree (or --with-all) option to try it.
WITH_OPENCOLLADA=false
WITH_EMBREE=false
WITH_OIDN=false
THREADS=$(nproc)
@@ -69,6 +70,7 @@ Number of threads for building: \$THREADS (automatically detected, use --threads
Full install: \$WITH_ALL (use --with-all option to enable it).
Building OpenCOLLADA: \$WITH_OPENCOLLADA (use --with-opencollada option to enable it).
Building Embree: \$WITH_EMBREE (use --with-embree option to enable it).
Building OpenImageDenoise: \$WITH_OIDN (use --with-oidn option to enable it).
Example:
Full install without OpenCOLLADA: --with-all --skip-opencollada
@@ -118,6 +120,9 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
--with-embree
Build and install the Embree libraries.
--with-oidn
Build and install the OpenImageDenoise libraries.
--with-jack
Install the jack libraries.
@@ -185,6 +190,9 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
--build-embree
Force the build of Embree.
--build-oidn
Force the build of OpenImageDenoise.
--build-ffmpeg
Force the build of FFMpeg.
@@ -240,6 +248,9 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
--force-embree
Force the rebuild of Embree.
--force-oidn
Force the rebuild of OpenImageDenoise.
--force-ffmpeg
Force the rebuild of FFMpeg.
@@ -288,6 +299,9 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
--skip-Embree
Unconditionally skip Embree installation/building.
--skip-oidn
Unconditionally skip OpenImageDenoise installation/building.
--skip-ffmpeg
Unconditionally skip FFMpeg installation/building.\""
@@ -301,13 +315,15 @@ NO_BUILD=false
NO_CONFIRM=false
USE_CXX11=true
PYTHON_VERSION="3.7.0"
CLANG_FORMAT_VERSION_MIN="6.0"
PYTHON_VERSION="3.7.4"
PYTHON_VERSION_MIN="3.7"
PYTHON_FORCE_BUILD=false
PYTHON_FORCE_REBUILD=false
PYTHON_SKIP=false
NUMPY_VERSION="1.15.0"
NUMPY_VERSION="1.17.0"
NUMPY_VERSION_MIN="1.8"
NUMPY_FORCE_BUILD=false
NUMPY_FORCE_REBUILD=false
@@ -356,7 +372,7 @@ OSL_FORCE_REBUILD=false
OSL_SKIP=false
# OpenSubdiv needs to be compiled for now
OSD_VERSION="3.3.3"
OSD_VERSION="3.4.0_RC2"
OSD_VERSION_MIN=$OSD_VERSION
OSD_FORCE_BUILD=false
OSD_FORCE_REBUILD=false
@@ -383,12 +399,16 @@ OPENCOLLADA_FORCE_BUILD=false
OPENCOLLADA_FORCE_REBUILD=false
OPENCOLLADA_SKIP=false
EMBREE_VERSION="3.2.4"
EMBREE_FORCE_BUILD=false
EMBREE_FORCE_REBUILD=false
EMBREE_SKIP=false
OIDN_VERSION="1.0.0"
OIDN_FORCE_BUILD=false
OIDN_FORCE_REBUILD=false
OIDN_SKIP=false
FFMPEG_VERSION="4.0.2"
FFMPEG_VERSION_MIN="2.8.4"
FFMPEG_FORCE_BUILD=false
@@ -411,6 +431,9 @@ X264_VERSION_MIN=0.118
VPX_USE=false
VPX_VERSION_MIN=0.9.7
VPX_DEV=""
OPUS_USE=false
OPUS_VERSION_MIN=1.1.1
OPUS_DEV=""
MP3LAME_USE=false
MP3LAME_DEV=""
OPENJPEG_USE=false
@@ -525,6 +548,9 @@ while true; do
--with-embree)
WITH_EMBREE=true; shift; continue
;;
--with-oidn)
WITH_OIDN=true; shift; continue
;;
--with-jack)
WITH_JACK=true; shift; continue;
;;
@@ -571,6 +597,7 @@ while true; do
OPENVDB_FORCE_BUILD=true
OPENCOLLADA_FORCE_BUILD=true
EMBREE_FORCE_BUILD=true
OIDN_FORCE_BUILD=true
FFMPEG_FORCE_BUILD=true
ALEMBIC_FORCE_BUILD=true
shift; continue
@@ -615,6 +642,9 @@ while true; do
--build-embree)
EMBREE_FORCE_BUILD=true; shift; continue
;;
--build-oidn)
OIDN_FORCE_BUILD=true; shift; continue
;;
--build-ffmpeg)
FFMPEG_FORCE_BUILD=true; shift; continue
;;
@@ -634,6 +664,7 @@ while true; do
OPENVDB_FORCE_REBUILD=true
OPENCOLLADA_FORCE_REBUILD=true
EMBREE_FORCE_REBUILD=true
OIDN_FORCE_REBUILD=true
FFMPEG_FORCE_REBUILD=true
ALEMBIC_FORCE_REBUILD=true
shift; continue
@@ -676,6 +707,9 @@ while true; do
--force-embree)
EMBREE_FORCE_REBUILD=true; shift; continue
;;
--force-oidn)
OIDN_FORCE_REBUILD=true; shift; continue
;;
--force-ffmpeg)
FFMPEG_FORCE_REBUILD=true; shift; continue
;;
@@ -718,6 +752,9 @@ while true; do
--skip-embree)
EMBREE_SKIP=true; shift; continue
;;
--skip-oidn)
OIDN_SKIP=true; shift; continue
;;
--skip-ffmpeg)
FFMPEG_SKIP=true; shift; continue
;;
@@ -745,6 +782,9 @@ fi
if [ "$WITH_ALL" = true -a "$EMBREE_SKIP" = false ]; then
WITH_EMBREE=true
fi
if [ "$WITH_ALL" = true -a "$OIDN_SKIP" = false ]; then
WITH_OIDN=true
fi
if [ "$WITH_ALL" = true ]; then
WITH_JACK=true
fi
@@ -839,6 +879,11 @@ EMBREE_SOURCE=( "https://github.com/embree/embree/archive/v${EMBREE_VERSION}.tar
#~ EMBREE_REPO_UID="4a12bfed63c90e85b6eab98b8cdd8dd2a3ba5809"
#~ EMBREE_REPO_BRANCH="master"
OIDN_USE_REPO=false
OIDN_SOURCE=( "https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.src.tar.gz" )
#~ OIDN_SOURCE_REPO=( "https://github.com/OpenImageDenoise/oidn.git" )
#~ OIDN_REPO_UID="dabfd9c80101edae9d25a710160d12d6d963c591"
#~ OIDN_REPO_BRANCH="master"
FFMPEG_SOURCE=( "http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2" )
@@ -881,6 +926,7 @@ You may also want to build them yourself (optional ones are [between brackets]):
* [OpenVDB $OPENVDB_VERSION_MIN] (from $OPENVDB_SOURCE), [Blosc $OPENVDB_BLOSC_VERSION] (from $OPENVDB_BLOSC_SOURCE).
* [OpenCollada $OPENCOLLADA_VERSION] (from $OPENCOLLADA_SOURCE).
* [Embree $EMBREE_VERSION] (from $EMBREE_SOURCE).
* [OpenImageDenoise $OIDN_VERSION] (from $OIDN_SOURCE).
* [Alembic $ALEMBIC_VERSION] (from $ALEMBIC_SOURCE).\""
if [ "$DO_SHOW_DEPS" = true ]; then
@@ -1064,13 +1110,14 @@ _create_inst_shortcut() {
# ldconfig
run_ldconfig() {
_lib_path="$INST/$1/lib"
_lib64_path="$INST/$1/lib64"
_ldconf_path="/etc/ld.so.conf.d/$1.conf"
PRINT ""
if [ ! $SUDO ]; then
WARNING "--no-sudo enabled, impossible to run ldconfig for $1, you'll have to do it yourself..."
else
INFO "Running ldconfig for $1..."
$SUDO sh -c "echo \"$_lib_path\" > $_ldconf_path"
$SUDO sh -c "/bin/echo -e \"$_lib_path\n$_lib64_path\" > $_ldconf_path"
$SUDO /sbin/ldconfig # XXX OpenSuse does not include sbin in command path with sudo!!!
fi
PRINT ""
@@ -1931,7 +1978,8 @@ compile_OSL() {
cmake_d="$cmake_d -D OSL_BUILD_PLUGINS=OFF"
cmake_d="$cmake_d -D OSL_BUILD_TESTS=OFF"
cmake_d="$cmake_d -D USE_SIMD=sse2"
cmake_d="$cmake_d -D OSL_BUILD_CPP11=1"
cmake_d="$cmake_d -D USE_LLVM_BITCODE=OFF"
cmake_d="$cmake_d -D USE_PARTIO=OFF"
#~ cmake_d="$cmake_d -D ILMBASE_VERSION=$ILMBASE_VERSION"
@@ -2551,6 +2599,98 @@ compile_Embree() {
fi
}
#### Build OpenImageDenoise ####
_init_oidn() {
_src=$SRC/oidn-$OIDN_VERSION
_git=true
_inst=$INST/oidn-$OIDN_VERSION
_inst_shortcut=$INST/oidn
}
clean_oidn() {
_init_oidn
_clean
}
compile_OIDN() {
if [ "$NO_BUILD" = true ]; then
WARNING "--no-build enabled, OpenImageDenoise will not be compiled!"
return
fi
# To be changed each time we make edits that would modify the compiled results!
oidn_magic=9
_init_oidn
# Clean install if needed!
magic_compile_check oidn-$OIDN_VERSION $oidn_magic
if [ $? -eq 1 -o "$OIDN_FORCE_REBUILD" = true ]; then
clean_oidn
fi
if [ ! -d $_inst ]; then
INFO "Building OpenImageDenoise-$OIDN_VERSION"
prepare_opt
if [ ! -d $_src ]; then
mkdir -p $SRC
if [ "OIDN_USE_REPO" = true ]; then
git clone $OIDN_SOURCE_REPO $_src
else
download OIDN_SOURCE[@] "$_src.tar.gz"
INFO "Unpacking OpenImageDenoise-$OIDN_VERSION"
tar -C $SRC -xf $_src.tar.gz
fi
fi
cd $_src
if [ "$OIDN_USE_REPO" = true ]; then
git pull origin $OIDN_REPO_BRANCH
# Stick to same rev as windows' libs...
git checkout $OIDN_REPO_UID
git reset --hard
fi
# Always refresh the whole build!
if [ -d build ]; then
rm -rf build
fi
mkdir build
cd build
cmake_d="-D CMAKE_BUILD_TYPE=Release"
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
cmake_d="$cmake_d -D WITH_EXAMPLE=OFF"
cmake_d="$cmake_d -D WITH_TEST=OFF"
cmake_d="$cmake_d -D OIDN_STATIC_LIB=ON"
cmake $cmake_d ../
make -j$THREADS && make install
make clean
if [ -d $_inst ]; then
_create_inst_shortcut
else
ERROR "OpenImageDenoise-$OIDN_VERSION failed to compile, exiting"
exit 1
fi
magic_compile_set oidn-$OIDN_VERSION $oidn_magic
cd $CWD
INFO "Done compiling OpenImageDenoise-$OIDN_VERSION!"
else
INFO "Own OpenImageDenoise-$OIDN_VERSION is up to date, nothing to do!"
INFO "If you want to force rebuild of this lib, use the --force-oidn option."
fi
run_ldconfig "oidn"
}
#### Build FFMPEG ####
_init_ffmpeg() {
_src=$SRC/ffmpeg-$FFMPEG_VERSION
@@ -2617,6 +2757,10 @@ compile_FFmpeg() {
extra="$extra --enable-libvpx"
fi
if [ "$OPUS_USE" = true ]; then
extra="$extra --enable-libopus"
fi
if [ "$MP3LAME_USE" = true ]; then
extra="$extra --enable-libmp3lame"
fi
@@ -2628,7 +2772,7 @@ compile_FFmpeg() {
./configure --cc="gcc -Wl,--as-needed" \
--extra-ldflags="-pthread -static-libgcc" \
--prefix=$_inst --enable-static \
--disable-ffplay --disable-ffserver --disable-doc \
--disable-ffplay --disable-doc \
--enable-gray \
--enable-avfilter --disable-vdpau \
--disable-bzlib --disable-libgsm --disable-libspeex \
@@ -2788,6 +2932,17 @@ install_DEB() {
PRINT ""
fi
PRINT ""
CLANG_FORMAT="clang-format"
check_package_version_ge_DEB $CLANG_FORMAT $CLANG_FORMAT_VERSION_MIN
if [ $? -eq 0 ]; then
_packages="$_packages $CLANG_FORMAT"
else
PRINT ""
WARNING "clang-format $CLANG_FORMAT_VERSION_MIN or higher not found, this is NOT needed to get Blender compiling..."
PRINT ""
fi
if [ "$WITH_JACK" = true ]; then
_packages="$_packages libspnav-dev"
# Only install jack if jack2 is not already installed!
@@ -2843,6 +2998,14 @@ install_DEB() {
install_packages_DEB $VPX_DEV
VPX_USE=true
fi
PRINT ""
OPUS_DEV="libopus-dev"
check_package_version_ge_DEB $OPUS_DEV $OPUS_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_DEB $OPUS_DEV
OPUS_USE=true
fi
fi
# Check cmake/glew versions and disable features for older distros.
@@ -3136,6 +3299,24 @@ install_DEB() {
fi
fi
if [ "$WITH_OIDN" = true ]; then
_do_compile_oidn=false
PRINT ""
if [ "$OIDN_SKIP" = true ]; then
WARNING "Skipping OpenImgeDenoise installation, as requested..."
elif [ "$OIDN_FORCE_BUILD" = true ]; then
INFO "Forced OpenImageDenoise building, as requested..."
_do_compile_oidn=true
else
# No package currently!
_do_compile_oidn=true
fi
if [ "$_do_compile_oidn" = true ]; then
compile_OIDN
fi
fi
PRINT ""
if [ "$FFMPEG_SKIP" = true ]; then
WARNING "Skipping FFMpeg installation, as requested..."
@@ -3288,7 +3469,7 @@ install_RPM() {
$SUDO dnf -y update
elif [ "$RPM" = "RHEL" ]; then
if [ "`grep '6\.' /etc/redhat-release`" ]; then
if [ "`grep '[^.]6\.' /etc/redhat-release`" ]; then
ERROR "Building with GCC 4.4 is not supported!"
exit 1
else
@@ -3435,10 +3616,29 @@ install_RPM() {
install_packages_RPM $VPX_DEV
VPX_USE=true
fi
PRINT ""
install_packages_RPM libspnav-devel
PRINT ""
OPUS_DEV="libopus-devel"
check_package_version_ge_RPM $OPUS_DEV $OPUS_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_RPM $OPUS_DEV
OPUS_USE=true
fi
fi
PRINT ""
CLANG_FORMAT="clang" # Yeah, on fedora/suse clang-format is part of main clang package...
check_package_version_ge_RPM $CLANG_FORMAT $CLANG_FORMAT_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_RPM $CLANG_FORMAT
else
PRINT ""
WARNING "clang-format $CLANG_FORMAT_VERSION_MIN or higher not found, this is NOT needed to get Blender compiling..."
PRINT ""
fi
PRINT ""
_do_compile_python=false
@@ -3700,6 +3900,24 @@ install_RPM() {
fi
fi
if [ "$WITH_OIDN" = true ]; then
_do_compile_oidn=false
PRINT ""
if [ "$OIDN_SKIP" = true ]; then
WARNING "Skipping OpenImgeDenoise installation, as requested..."
elif [ "$OIDN_FORCE_BUILD" = true ]; then
INFO "Forced OpenImageDenoise building, as requested..."
_do_compile_oidn=true
else
# No package currently!
_do_compile_oidn=true
fi
if [ "$_do_compile_oidn" = true ]; then
compile_OIDN
fi
fi
PRINT ""
if [ "$FFMPEG_SKIP" = true ]; then
WARNING "Skipping FFMpeg installation, as requested..."
@@ -3883,6 +4101,26 @@ install_ARCH() {
install_packages_ARCH $VPX_DEV
VPX_USE=true
fi
PRINT ""
OPUS_DEV="opus"
check_package_version_ge_ARCH $OPUS_DEV $OPUS_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_ARCH $OPUS_DEV
OPUS_USE=true
fi
fi
PRINT ""
CLANG_FORMAT="clang" # Yeah, on arch clang-format is part of main clang package...
check_package_version_ge_ARCH $CLANG_FORMAT $CLANG_FORMAT_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_ARCH $CLANG_FORMAT
else
PRINT ""
WARNING "clang-format $CLANG_FORMAT_VERSION_MIN or higher not found, this is NOT needed to get Blender compiling..."
PRINT ""
fi
@@ -4152,6 +4390,24 @@ install_ARCH() {
fi
fi
if [ "$WITH_OIDN" = true ]; then
_do_compile_oidn=false
PRINT ""
if [ "$OIDN_SKIP" = true ]; then
WARNING "Skipping OpenImgeDenoise installation, as requested..."
elif [ "$OIDN_FORCE_BUILD" = true ]; then
INFO "Forced OpenImageDenoise building, as requested..."
_do_compile_oidn=true
else
# No package currently!
_do_compile_oidn=true
fi
if [ "$_do_compile_oidn" = true ]; then
compile_OIDN
fi
fi
PRINT ""
if [ "$FFMPEG_SKIP" = true ]; then
WARNING "Skipping FFMpeg installation, as requested..."
@@ -4338,6 +4594,24 @@ install_OTHER() {
fi
fi
if [ "$WITH_OIDN" = true ]; then
_do_compile_oidn=false
PRINT ""
if [ "$OIDN_SKIP" = true ]; then
WARNING "Skipping OpenImgeDenoise installation, as requested..."
elif [ "$OIDN_FORCE_BUILD" = true ]; then
INFO "Forced OpenImageDenoise building, as requested..."
_do_compile_oidn=true
else
# No package currently!
_do_compile_oidn=true
fi
if [ "$_do_compile_oidn" = true ]; then
compile_OIDN
fi
fi
PRINT ""
if [ "$FFMPEG_SKIP" = true ]; then
WARNING "Skipping FFMpeg installation, as requested..."
@@ -4391,6 +4665,10 @@ print_info_ffmpeglink() {
_packages="$_packages $VPX_DEV"
fi
if [ "$OPUS_USE" = true ]; then
_packages="$_packages $OPUS_DEV"
fi
if [ "$MP3LAME_USE" = true ]; then
_packages="$_packages $MP3LAME_DEV"
fi
@@ -4524,18 +4802,44 @@ print_info() {
PRINT " $_1"
_buildargs="$_buildargs $_1"
fi
if [ -d $INST/blosc ]; then
_1="-D BLOSC_ROOT_DIR=$INST/blosc"
PRINT " $_1"
_buildargs="$_buildargs $_1"
fi
fi
if [ "$WITH_OPENCOLLADA" = true ]; then
_1="-D WITH_OPENCOLLADA=ON"
PRINT " $_1"
_buildargs="$_buildargs $_1"
if [ -d $INST/opencollada ]; then
_1="-D OPENCOLLADA_ROOT_DIR=$INST/opencollada"
PRINT " $_1"
_buildargs="$_buildargs $_1"
fi
fi
if [ "$WITH_EMBREE" = true ]; then
_1="-D WITH_CYCLES_EMBREE=ON"
PRINT " $_1"
_buildargs="$_buildargs $_1"
if [ -d $INST/embree ]; then
_1="-D EMBREE_ROOT_DIR=$INST/embree"
PRINT " $_1"
_buildargs="$_buildargs $_1"
fi
fi
if [ "$WITH_OIDN" = true ]; then
_1="-D WITH_OPENIMAGEDENOISE=ON"
PRINT " $_1"
_buildargs="$_buildargs $_1"
if [ -d $INST/oidn ]; then
_1="-D OPENIMAGEDENOISE_ROOT_DIR=$INST/oidn"
PRINT " $_1"
_buildargs="$_buildargs $_1"
fi
fi
if [ "$WITH_JACK" = true ]; then

View File

@@ -192,11 +192,11 @@ if(ILMBASE_CUSTOM)
set(IlmBase_Libraries ${ILMBASE_CUSTOM_LIBRARIES})
separate_arguments(IlmBase_Libraries)
else()
#elseif(${ILMBASE_VERSION} VERSION_LESS "2.1")
# elseif(${ILMBASE_VERSION} VERSION_LESS "2.1")
set(IlmBase_Libraries Half Iex Imath IlmThread)
#else()
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _ilmbase_libs_ver ${ILMBASE_VERSION})
# set(IlmBase_Libraries Half Iex-${_ilmbase_libs_ver} Imath-${_ilmbase_libs_ver} IlmThread-${_ilmbase_libs_ver})
# else()
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _ilmbase_libs_ver ${ILMBASE_VERSION})
# set(IlmBase_Libraries Half Iex-${_ilmbase_libs_ver} Imath-${_ilmbase_libs_ver} IlmThread-${_ilmbase_libs_ver})
endif()

View File

@@ -188,11 +188,11 @@ if(OPENEXR_CUSTOM)
endif()
set(OpenEXR_Library ${OPENEXR_CUSTOM_LIBRARY})
else()
#elseif(${OPENEXR_VERSION} VERSION_LESS "2.1")
# elseif(${OPENEXR_VERSION} VERSION_LESS "2.1")
set(OpenEXR_Library IlmImf)
#else()
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _openexr_libs_ver ${OPENEXR_VERSION})
# set(OpenEXR_Library IlmImf-${_openexr_libs_ver})
# else()
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _openexr_libs_ver ${OPENEXR_VERSION})
# set(OpenEXR_Library IlmImf-${_openexr_libs_ver})
endif()
# Locate the OpenEXR library

View File

@@ -0,0 +1,119 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 70ec895..e616b63 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -178,7 +178,9 @@ set_property(TARGET ${PROJECT_NAME} PROPERTY SOVERSION "0")
## Open Image Denoise examples
## ----------------------------------------------------------------------------
-add_subdirectory(examples)
+if(WITH_EXAMPLE)
+ add_subdirectory(examples)
+endif()
## ----------------------------------------------------------------------------
## Open Image Denoise install and packaging
Submodule mkl-dnn contains modified content
diff --git a/mkl-dnn/cmake/TBB.cmake b/mkl-dnn/cmake/TBB.cmake
index 0711e699..c14210b6 100644
--- a/mkl-dnn/cmake/TBB.cmake
+++ b/mkl-dnn/cmake/TBB.cmake
@@ -90,8 +90,8 @@ if(WIN32)
NO_DEFAULT_PATH
)
set(TBB_LIB_DIR ${TBB_ROOT}/lib/${TBB_ARCH}/${TBB_VCVER})
- find_library(TBB_LIBRARY tbb PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
- find_library(TBB_LIBRARY_MALLOC tbbmalloc PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
+ find_library(TBB_LIBRARY tbb_static PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
+ find_library(TBB_LIBRARY_MALLOC tbbmalloc_static PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
endif()
else()
@@ -138,13 +138,13 @@ else()
set(TBB_LIBRARY_MALLOC TBB_LIBRARY_MALLOC-NOTFOUND)
if(APPLE)
find_path(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${TBB_ROOT}/include NO_DEFAULT_PATH)
- find_library(TBB_LIBRARY tbb PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
- find_library(TBB_LIBRARY_MALLOC tbbmalloc PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
+ find_library(TBB_LIBRARY tbb_static PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
+ find_library(TBB_LIBRARY_MALLOC tbbmalloc_static PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
else()
find_path(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${TBB_ROOT}/include NO_DEFAULT_PATH)
set(TBB_HINTS HINTS ${TBB_ROOT}/lib/intel64/gcc4.4 ${TBB_ROOT}/lib ${TBB_ROOT}/lib64 PATHS /usr/libx86_64-linux-gnu/)
- find_library(TBB_LIBRARY tbb ${TBB_HINTS})
- find_library(TBB_LIBRARY_MALLOC tbbmalloc ${TBB_HINTS})
+ find_library(TBB_LIBRARY tbb_static ${TBB_HINTS})
+ find_library(TBB_LIBRARY_MALLOC tbbmalloc_static ${TBB_HINTS})
endif()
endif()
diff '--ignore-matching-lines=:' -ur '--exclude=*.svn*' -u -r
--- a/cmake/install.cmake 2019-08-12 18:02:20.794402575 +0200
+++ b/cmake/install.cmake 2019-08-12 18:06:07.470045703 +0200
@@ -18,6 +18,13 @@
## Install library
## ----------------------------------------------------------------------------
+if(UNIX)
+install(FILES
+ ${CMAKE_BINARY_DIR}/libOpenImageDenoise.a
+ ${CMAKE_BINARY_DIR}/libmkldnn.a
+ ${CMAKE_BINARY_DIR}/libcommon.a
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
+else()
install(TARGETS ${PROJECT_NAME}
EXPORT
${PROJECT_NAME}_Export
@@ -38,6 +45,7 @@
DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel
)
endif()
+endif()
## ----------------------------------------------------------------------------
## Install headers
@@ -78,6 +86,7 @@
## Install CMake configuration files
## ----------------------------------------------------------------------------
+if(NOT UNIX)
install(EXPORT ${PROJECT_NAME}_Export
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
#NAMESPACE ${PROJECT_NAME}::
@@ -92,3 +101,4 @@
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
COMPONENT devel
)
+endif()
diff '--ignore-matching-lines=:' -ur '--exclude=*.svn*' -u -r
--- a/CMakeLists.txt 2019-08-12 14:22:00.974078598 +0200
+++ b/CMakeLists.txt 2019-08-12 18:05:05.949057375 +0200
@@ -14,7 +14,11 @@
## limitations under the License. ##
## ======================================================================== ##
-cmake_minimum_required(VERSION 3.1)
+if(UNIX)
+ cmake_minimum_required(VERSION 3.1)
+else()
+ cmake_minimum_required(VERSION 3.13)
+endif()
set(OIDN_VERSION_MAJOR 1)
set(OIDN_VERSION_MINOR 0)
@@ -32,13 +36,8 @@
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")
# Build as shared or static library
-if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13.0")
- option(OIDN_STATIC_LIB "Build Open Image Denoise as a static library.")
- mark_as_advanced(CLEAR OIDN_STATIC_LIB)
-else()
- set(OIDN_STATIC_LIB OFF CACHE BOOL "Build Open Image Denoise as a static library." FORCE)
- mark_as_advanced(OIDN_STATIC_LIB)
-endif()
+option(OIDN_STATIC_LIB "Build Open Image Denoise as a static library.")
+mark_as_advanced(CLEAR OIDN_STATIC_LIB)
if(OIDN_STATIC_LIB)
set(OIDN_LIB_TYPE STATIC)
else()

View File

@@ -1,13 +0,0 @@
diff --git a/opensubdiv/far/topologyRefiner.cpp b/opensubdiv/far/topologyRefiner.cpp
index 3754b36e..7fe42bcc 100644
--- a/opensubdiv/far/topologyRefiner.cpp
+++ b/opensubdiv/far/topologyRefiner.cpp
@@ -263,7 +263,7 @@ namespace internal {
bool IsEmpty() const { return *((int_type*)this) == 0; }
FeatureMask() { Clear(); }
- FeatureMask(Options const & options, Sdc::SchemeType sType) { InitializeFeatures(options, sType); }
+ FeatureMask(Options const & options, Sdc::SchemeType sType) { Clear(); InitializeFeatures(options, sType); }
// These are the two primary methods intended for use -- intialization via a set of Options
// and reduction of the subsequent feature set (which presumes prior initialization with the

View File

@@ -0,0 +1,70 @@
Blender Buildbot
================
Code signing
------------
Code signing is done as part of INSTALL target, which makes it possible to sign
files which are aimed into a bundle and coming from a non-signed source (such as
libraries SVN).
This is achieved by specifying `slave_codesign.cmake` as a post-install script
run by CMake. This CMake script simply involves an utility script written in
Python which takes care of an actual signing.
### Configuration
Client configuration doesn't need anything special, other than variable
`SHARED_STORAGE_DIR` pointing to a location which is watched by a server.
This is done in `config_builder.py` file and is stored in Git (which makes it
possible to have almost zero-configuration buildbot machines).
Server configuration requires copying `config_server_template.py` under the
name of `config_server.py` and tweaking values, which are platform-specific.
#### Windows configuration
There are two things which are needed on Windows in order to have code signing
to work:
- `TIMESTAMP_AUTHORITY_URL` which is most likely set http://timestamp.digicert.com
- `CERTIFICATE_FILEPATH` which is a full file path to a PKCS #12 key (.pfx).
## Tips
### Self-signed certificate on Windows
It is easiest to test configuration using self-signed certificate.
The certificate manipulation utilities are coming with Windows SDK.
Unfortunately, they are not added to PATH. Here is an example of how to make
sure they are easily available:
```
set PATH=C:\Program Files (x86)\Windows Kits\10\App Certification Kit;%PATH%
set PATH=C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64;%PATH%
```
Generate CA:
```
makecert -r -pe -n "CN=Blender Test CA" -ss CA -sr CurrentUser -a sha256 ^
-cy authority -sky signature -sv BlenderTestCA.pvk BlenderTestCA.cer
```
Import the generated CA:
```
certutil -user -addstore Root BlenderTestCA.cer
```
Create self-signed certificate and pack it into PKCS #12:
```
makecert -pe -n "CN=Blender Test SPC" -a sha256 -cy end ^
-sky signature ^
-ic BlenderTestCA.cer -iv BlenderTestCA.pvk ^
-sv BlenderTestSPC.pvk BlenderTestSPC.cer
pvk2pfx -pvk BlenderTestSPC.pvk -spc BlenderTestSPC.cer -pfx BlenderTestSPC.pfx
```

View File

@@ -0,0 +1,114 @@
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
import argparse
import os
import re
import subprocess
import sys
class Builder:
def __init__(self, name, branch):
self.name = name
self.branch = branch
self.is_release_branch = re.match("^blender-v(.*)-release$", branch) is not None
# Buildbot runs from build/ directory
self.blender_dir = os.path.abspath(os.path.join('..', 'blender.git'))
self.build_dir = os.path.abspath(os.path.join('..', 'build', name))
self.install_dir = os.path.abspath(os.path.join('..', 'install', name))
self.upload_dir = os.path.abspath(os.path.join('..', 'install'))
# Detect platform
if name.startswith('mac'):
self.platform = 'mac'
self.command_prefix = []
elif name.startswith('linux'):
self.platform = 'linux'
self.command_prefix = ['scl', 'enable', 'devtoolset-6', '--']
elif name.startswith('win'):
self.platform = 'win'
self.command_prefix = []
else:
raise ValueError('Unkonw platform for builder ' + self.platform)
# Always 64 bit now
self.bits = 64
def create_builder_from_arguments():
parser = argparse.ArgumentParser()
parser.add_argument('builder_name')
parser.add_argument('branch', default='master', nargs='?')
args = parser.parse_args()
return Builder(args.builder_name, args.branch)
class VersionInfo:
def __init__(self, builder):
# Get version information
buildinfo_h = os.path.join(builder.build_dir, "source", "creator", "buildinfo.h")
blender_h = os.path.join(builder.blender_dir, "source", "blender", "blenkernel", "BKE_blender_version.h")
version_number = int(self._parse_header_file(blender_h, 'BLENDER_VERSION'))
self.version = "%d.%d" % (version_number // 100, version_number % 100)
self.version_char = self._parse_header_file(blender_h, 'BLENDER_VERSION_CHAR')
self.version_cycle = self._parse_header_file(blender_h, 'BLENDER_VERSION_CYCLE')
self.version_cycle_number = self._parse_header_file(blender_h, 'BLENDER_VERSION_CYCLE_NUMBER')
self.hash = self._parse_header_file(buildinfo_h, 'BUILD_HASH')[1:-1]
if self.version_cycle == "release":
# Final release
self.full_version = self.version + self.version_char
self.is_development_build = False
elif self.version_cycle == "rc":
# Release candidate
version_cycle = self.version_cycle + self.version_cycle_number
if len(self.version_char) == 0:
self.full_version = self.version + version_cycle
else:
self.full_version = self.version + self.version_char + '-' + version_cycle
self.is_development_build = False
else:
# Development build
self.full_version = self.version + '-' + self.hash
self.is_development_build = True
def _parse_header_file(self, filename, define):
import re
regex = re.compile("^#\s*define\s+%s\s+(.*)" % define)
with open(filename, "r") as file:
for l in file:
match = regex.match(l)
if match:
return match.group(1)
return None
def call(cmd, env=None, exit_on_error=True):
print(' '.join(cmd))
# Flush to ensure correct order output on Windows.
sys.stdout.flush()
sys.stderr.flush()
retcode = subprocess.call(cmd, env=env)
if exit_on_error and retcode != 0:
sys.exit(retcode)
return retcode

View File

@@ -0,0 +1,77 @@
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
from dataclasses import dataclass
from pathlib import Path
from typing import List
@dataclass
class AbsoluteAndRelativeFileName:
"""
Helper class which keeps track of absolute file path for a direct access and
corresponding relative path against given base.
The relative part is used to construct a file name within an archive which
contains files which are to be signed or which has been signed already
(depending on whether the archive is addressed to signing server or back
to the buildbot worker).
"""
# Base directory which is where relative_filepath is relative to.
base_dir: Path
# Full absolute path of the corresponding file.
absolute_filepath: Path
# Derived from full file path, contains part of the path which is relative
# to a desired base path.
relative_filepath: Path
def __init__(self, base_dir: Path, filepath: Path):
self.base_dir = base_dir
self.absolute_filepath = filepath.resolve()
self.relative_filepath = self.absolute_filepath.relative_to(
self.base_dir)
@classmethod
def from_path(cls, path: Path) -> 'AbsoluteAndRelativeFileName':
assert path.is_absolute()
assert path.is_file()
base_dir = path.parent
return AbsoluteAndRelativeFileName(base_dir, path)
@classmethod
def recursively_from_directory(cls, base_dir: Path) \
-> List['AbsoluteAndRelativeFileName']:
"""
Create list of AbsoluteAndRelativeFileName for all the files in the
given directory.
"""
assert base_dir.is_absolute()
assert base_dir.is_dir()
result = []
for filename in base_dir.glob('**/*'):
if not filename.is_file():
continue
result.append(AbsoluteAndRelativeFileName(base_dir, filename))
return result

View File

@@ -0,0 +1,101 @@
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
from pathlib import Path
from codesign.util import ensure_file_does_not_exist_or_die
class ArchiveWithIndicator:
"""
The idea of this class is to wrap around logic which takes care of keeping
track of a name of an archive and synchronization routines between buildbot
worker and signing server.
The synchronization is done based on creating a special file after the
archive file is knowingly ready for access.
"""
# Base directory where the archive is stored (basically, a basename() of
# the absolute archive file name).
#
# For example, 'X:\\TEMP\\'.
base_dir: Path
# Absolute file name of the archive.
#
# For example, 'X:\\TEMP\\FOO.ZIP'.
archive_filepath: Path
# Absolute name of a file which acts as an indication of the fact that the
# archive is ready and is available for access.
#
# This is how synchronization between buildbot worker and signing server is
# done:
# - First, the archive is created under archive_filepath name.
# - Second, the indication file is created under ready_indicator_filepath
# name.
# - Third, the colleague of whoever created the indicator name watches for
# the indication file to appear, and once it's there it access the
# archive.
ready_indicator_filepath: Path
def __init__(
self, base_dir: Path, archive_name: str, ready_indicator_name: str):
"""
Construct the object from given base directory and name of the archive
file:
ArchiveWithIndicator(Path('X:\\TEMP'), 'FOO.ZIP', 'INPUT_READY')
"""
self.base_dir = base_dir
self.archive_filepath = self.base_dir / archive_name
self.ready_indicator_filepath = self.base_dir / ready_indicator_name
def is_ready(self) -> bool:
"""Check whether the archive is ready for access."""
return self.ready_indicator_filepath.exists()
def tag_ready(self) -> None:
"""
Tag the archive as ready by creating the corresponding indication file.
NOTE: It is expected that the archive was never tagged as ready before
and that there are no subsequent tags of the same archive.
If it is violated, an assert will fail.
"""
assert not self.is_ready()
self.ready_indicator_filepath.touch()
def clean(self) -> None:
"""
Remove both archive and the ready indication file.
"""
ensure_file_does_not_exist_or_die(self.ready_indicator_filepath)
ensure_file_does_not_exist_or_die(self.archive_filepath)
def is_fully_absent(self) -> bool:
"""
Check whether both archive and its ready indicator are absent.
Is used for a sanity check during code signing process by both
buildbot worker and signing server.
"""
return (not self.archive_filepath.exists() and
not self.ready_indicator_filepath.exists())

View File

@@ -0,0 +1,385 @@
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
# Signing process overview.
#
# From buildbot worker side:
# - Files which needs to be signed are collected from either a directory to
# sign all signable files in there, or by filename of a single file to sign.
# - Those files gets packed into an archive and stored in a location location
# which is watched by the signing server.
# - A marker READY file is created which indicates the archive is ready for
# access.
# - Wait for the server to provide an archive with signed files.
# This is done by watching for the READY file which corresponds to an archive
# coming from the signing server.
# - Unpack the signed signed files from the archives and replace original ones.
#
# From code sign server:
# - Watch special location for a READY file which indicates the there is an
# archive with files which are to be signed.
# - Unpack the archive to a temporary location.
# - Run codesign tool and make sure all the files are signed.
# - Pack the signed files and store them in a location which is watched by
# the buildbot worker.
# - Create a READY file which indicates that the archive with signed files is
# ready.
import abc
import logging
import shutil
import time
import zipfile
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import Iterable, List
from codesign.absolute_and_relative_filename import AbsoluteAndRelativeFileName
from codesign.archive_with_indicator import ArchiveWithIndicator
logger = logging.getLogger(__name__)
logger_builder = logger.getChild('builder')
logger_server = logger.getChild('server')
def pack_files(files: Iterable[AbsoluteAndRelativeFileName],
archive_filepath: Path) -> None:
"""
Create zip archive from given files for the signing pipeline.
Is used by buildbot worker to create an archive of files which are to be
signed, and by signing server to send signed files back to the worker.
"""
with zipfile.ZipFile(archive_filepath, 'w') as zip_file_handle:
for file_info in files:
zip_file_handle.write(file_info.absolute_filepath,
arcname=file_info.relative_filepath)
def extract_files(archive_filepath: Path,
extraction_dir: Path) -> None:
"""
Extract all files form the given archive into the given direcotry.
"""
# TODO(sergey): Verify files in the archive have relative path.
with zipfile.ZipFile(archive_filepath, mode='r') as zip_file_handle:
zip_file_handle.extractall(path=extraction_dir)
class BaseCodeSigner(metaclass=abc.ABCMeta):
"""
Base class for a platform-specific signer of binaries.
Contains all the logic shared across platform-specific implementations, such
as synchronization and notification logic.
Platform specific bits (such as actual command for signing the binary) are
to be implemented as a subclass.
Provides utilities code signing as a whole, including functionality needed
by a signing server and a buildbot worker.
The signer and builder may run on separate machines, the only requirement is
that they have access to a directory which is shared between them. For the
security concerns this is to be done as a separate machine (or as a Shared
Folder configuration in VirtualBox configuration). This directory might be
mounted under different base paths, but its underlying storage is to be
the same.
The code signer is short-lived on a buildbot worker side, and is living
forever on a code signing server side.
"""
# TODO(sergey): Find a neat way to have config annotated.
# config: Config
# Storage directory where builder puts files which are requested to be
# signed.
# Consider this an input of the code signing server.
unsigned_storage_dir: Path
# Information about archive which contains files which are to be signed.
#
# This archive is created by the buildbot worked and acts as an input for
# the code signing server.
unsigned_archive_info: ArchiveWithIndicator
# Storage where signed files are stored.
# Consider this an output of the code signer server.
signed_storage_dir: Path
# Information about archive which contains signed files.
#
# This archive is created by the code signing server.
signed_archive_info: ArchiveWithIndicator
def __init__(self, config):
self.config = config
absolute_shared_storage_dir = config.SHARED_STORAGE_DIR.resolve()
# Unsigned (signing server input) configuration.
self.unsigned_storage_dir = absolute_shared_storage_dir / 'unsigned'
self.unsigned_archive_info = ArchiveWithIndicator(
self.unsigned_storage_dir, 'unsigned_files.zip', 'ready.stamp')
# Signed (signing server output) configuration.
self.signed_storage_dir = absolute_shared_storage_dir / 'signed'
self.signed_archive_info = ArchiveWithIndicator(
self.signed_storage_dir, 'signed_files.zip', 'ready.stamp')
"""
General note on cleanup environment functions.
It is expected that there is only one instance of the code signer server
running for a given input/output directory, and that it serves a single
buildbot worker.
By its nature, a buildbot worker only produces one build at a time and
never performs concurrent builds.
This leads to a conclusion that when starting in a clean environment
there shouldn't be any archives remaining from a previous build.
However, it is possible to have various failure scenarios which might
leave the environment in a non-clean state:
- Network hiccup which makes buildbot worker to stop current build
and re-start it after connection to server is re-established.
Note, this could also happen during buildbot server maintenance.
- Signing server might get restarted due to updates or other reasons.
Requiring manual interaction in such cases is not something good to
require, so here we simply assume that the system is used the way it is
intended to and restore environment to a prestine clean state.
"""
def cleanup_environment_for_builder(self) -> None:
self.unsigned_archive_info.clean()
self.signed_archive_info.clean()
def cleanup_environment_for_signing_server(self) -> None:
# Don't clear the requested to-be-signed archive since we might be
# restarting signing machine while the buildbot is busy.
self.signed_archive_info.clean()
############################################################################
# Buildbot worker side helpers.
@abc.abstractmethod
def check_file_is_to_be_signed(
self, file: AbsoluteAndRelativeFileName) -> bool:
"""
Check whether file is to be signed.
Is used by both single file signing pipeline and recursive directory
signing pipeline.
This is where code signer is to check whether file is to be signed or
not. This check might be based on a simple extension test or on actual
test whether file have a digital signature already or not.
"""
def collect_files_to_sign(self, path: Path) \
-> List[AbsoluteAndRelativeFileName]:
"""
Get all files which need to be signed from the given path.
NOTE: The path might either be a file or directory.
This function is run from the buildbot worker side.
"""
# If there is a single file provided trust the buildbot worker that it
# is eligible for signing.
if path.is_file():
file = AbsoluteAndRelativeFileName.from_path(path)
if not self.check_file_is_to_be_signed(file):
return []
return [file]
all_files = AbsoluteAndRelativeFileName.recursively_from_directory(
path)
files_to_be_signed = [file for file in all_files
if self.check_file_is_to_be_signed(file)]
return files_to_be_signed
def wait_for_signed_archive_or_die(self) -> None:
"""
Wait until archive with signed files is available.
Will only wait for the configured time. If that time exceeds and there
is still no responce from the signing server the application will exit
with a non-zero exit code.
"""
timeout_in_seconds = self.config.TIMEOUT_IN_SECONDS
time_start = time.monotonic()
while not self.signed_archive_info.is_ready():
time.sleep(1)
time_slept_in_seconds = time.monotonic() - time_start
if time_slept_in_seconds > timeout_in_seconds:
self.unsigned_archive_info.clean()
raise SystemExit("Signing server didn't finish signing in "
f"{timeout_in_seconds} seconds, dying :(")
def copy_signed_files_to_directory(
self, signed_dir: Path, destination_dir: Path) -> None:
"""
Copy all files from signed_dir to destination_dir.
This function will overwrite any existing file. Permissions are copied
from the source files, but other metadata, such as timestamps, are not.
"""
for signed_filepath in signed_dir.glob('**/*'):
if not signed_filepath.is_file():
continue
relative_filepath = signed_filepath.relative_to(signed_dir)
destination_filepath = destination_dir / relative_filepath
destination_filepath.parent.mkdir(parents=True, exist_ok=True)
shutil.copy(signed_filepath, destination_filepath)
def run_buildbot_path_sign_pipeline(self, path: Path) -> None:
"""
Run all steps needed to make given path signed.
Path points to an unsigned file or a directory which contains unsigned
files.
If the path points to a single file then this file will be signed.
This is used to sign a final bundle such as .msi on Windows or .dmg on
macOS.
NOTE: The code signed implementation might actually reject signing the
file, in which case the file will be left unsigned. This isn't anything
to be considered a failure situation, just might happen when buildbot
worker can not detect whether signing is really required in a specific
case or not.
If the path points to a directory then code signer will sign all
signable files from it (finding them recursively).
"""
self.cleanup_environment_for_builder()
# Make sure storage directory exists.
self.unsigned_storage_dir.mkdir(parents=True, exist_ok=True)
# Collect all files which needs to be signed and pack them into a single
# archive which will be sent to the signing server.
logger_builder.info('Collecting files which are to be signed...')
files = self.collect_files_to_sign(path)
if not files:
logger_builder.info('No files to be signed, ignoring.')
return
logger_builder.info('Found %d files to sign.', len(files))
pack_files(files=files,
archive_filepath=self.unsigned_archive_info.archive_filepath)
self.unsigned_archive_info.tag_ready()
# Wait for the signing server to finish signing.
logger_builder.info('Waiting signing server to sign the files...')
self.wait_for_signed_archive_or_die()
# Extract signed files from archive and move files to final location.
with TemporaryDirectory(prefix='blender-buildbot-') as temp_dir_str:
unpacked_signed_files_dir = Path(temp_dir_str)
logger_builder.info('Extracting signed files from archive...')
extract_files(
archive_filepath=self.signed_archive_info.archive_filepath,
extraction_dir=unpacked_signed_files_dir)
destination_dir = path
if destination_dir.is_file():
destination_dir = destination_dir.parent
self.copy_signed_files_to_directory(
unpacked_signed_files_dir, destination_dir)
############################################################################
# Signing server side helpers.
def wait_for_sign_request(self) -> None:
"""
Wait for the buildbot to request signing of an archive.
"""
# TOOD(sergey): Support graceful shutdown on Ctrl-C.
while not self.unsigned_archive_info.is_ready():
time.sleep(1)
@abc.abstractmethod
def sign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> None:
"""
Sign all files in the given directory.
NOTE: Signing should happen in-place.
"""
def run_signing_pipeline(self):
"""
Run the full signing pipeline starting from the point when buildbot
worker have requested signing.
"""
# Make sure storage directory exists.
self.signed_storage_dir.mkdir(parents=True, exist_ok=True)
with TemporaryDirectory(prefix='blender-codesign-') as temp_dir_str:
temp_dir = Path(temp_dir_str)
logger_server.info('Extracting unsigned files from archive...')
extract_files(
archive_filepath=self.unsigned_archive_info.archive_filepath,
extraction_dir=temp_dir)
logger_server.info('Collecting all files which needs signing...')
files = AbsoluteAndRelativeFileName.recursively_from_directory(
temp_dir)
logger_server.info('Signing all requested files...')
self.sign_all_files(files)
logger_server.info('Packing signed files...')
pack_files(files=files,
archive_filepath=self.signed_archive_info.archive_filepath)
self.signed_archive_info.tag_ready()
logger_server.info('Removing signing request...')
self.unsigned_archive_info.clean()
logger_server.info('Signing is complete.')
def run_signing_server(self):
logger_server.info('Starting new code signing server...')
self.cleanup_environment_for_signing_server()
logger_server.info('Code signing server is ready')
while True:
logger_server.info('Waiting for the signing request in %s...',
self.unsigned_storage_dir)
self.wait_for_sign_request()
logger_server.info(
'Got signing request, beging signign procedure.')
self.run_signing_pipeline()

View File

@@ -0,0 +1,57 @@
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
# Configuration of a code signer which is specific to the code running from
# buildbot's worker.
import sys
from pathlib import Path
from codesign.config_common import *
if sys.platform == 'linux':
SHARED_STORAGE_DIR = Path('/data/codesign')
elif sys.platform == 'win32':
SHARED_STORAGE_DIR = Path('Z:\\codesign')
# https://docs.python.org/3/library/logging.config.html#configuration-dictionary-schema
LOGGING = {
'version': 1,
'formatters': {
'default': {'format': '%(asctime)-15s %(levelname)8s %(name)s %(message)s'}
},
'handlers': {
'console': {
'class': 'logging.StreamHandler',
'formatter': 'default',
'stream': 'ext://sys.stderr',
}
},
'loggers': {
'codesign': {'level': 'INFO'},
},
'root': {
'level': 'WARNING',
'handlers': [
'console',
],
}
}

View File

@@ -0,0 +1,33 @@
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
from pathlib import Path
# Timeout in seconds for the signing process.
#
# This is how long buildbot packing step will wait signing server to
# perform signing.
TIMEOUT_IN_SECONDS = 120
# Directory which is shared across buildbot worker and signing server.
#
# This is where worker puts files requested for signing as well as where
# server puts signed files.
SHARED_STORAGE_DIR: Path

View File

@@ -0,0 +1,63 @@
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
# Configuration of a code signer which is specific to the code signing server.
#
# NOTE: DO NOT put any sensitive information here, put it in an actual
# configuration on the signing machine.
from pathlib import Path
from codesign.config_common import *
# URL to the timestamping authority.
TIMESTAMP_AUTHORITY_URL = 'http://timestamp.digicert.com'
# Full path to the certificate used for signing.
#
# The path and expected file format might vary depending on a platform.
#
# On Windows it is usually is a PKCS #12 key (.pfx), so the path will look
# like Path('C:\\Secret\\Blender.pfx').
CERTIFICATE_FILEPATH: Path
# https://docs.python.org/3/library/logging.config.html#configuration-dictionary-schema
LOGGING = {
'version': 1,
'formatters': {
'default': {'format': '%(asctime)-15s %(levelname)8s %(name)s %(message)s'}
},
'handlers': {
'console': {
'class': 'logging.StreamHandler',
'formatter': 'default',
'stream': 'ext://sys.stderr',
}
},
'loggers': {
'codesign': {'level': 'INFO'},
},
'root': {
'level': 'WARNING',
'handlers': [
'console',
],
}
}

View File

@@ -0,0 +1,72 @@
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
# NOTE: This is a no-op signer (since there isn't really a procedure to sign
# Linux binaries yet). Used to debug and verify the code signing routines on
# a Linux environment.
import logging
from pathlib import Path
from typing import List
from codesign.absolute_and_relative_filename import AbsoluteAndRelativeFileName
from codesign.base_code_signer import BaseCodeSigner
logger = logging.getLogger(__name__)
logger_server = logger.getChild('server')
class LinuxCodeSigner(BaseCodeSigner):
def is_active(self) -> bool:
"""
Check whether this signer is active.
if it is inactive, no files will be signed.
Is used to be able to debug code signing pipeline on Linux, where there
is no code signing happening in the actual buildbot and release
environment.
"""
return False
def check_file_is_to_be_signed(
self, file: AbsoluteAndRelativeFileName) -> bool:
if file.relative_filepath == Path('blender'):
return True
if (file.relative_filepath.parts()[-3:-1] == ('python', 'bin') and
file.relative_filepath.name.startwith('python')):
return True
if file.relative_filepath.suffix == '.so':
return True
return False
def collect_files_to_sign(self, path: Path) \
-> List[AbsoluteAndRelativeFileName]:
if not self.is_active():
return []
return super().collect_files_to_sign(path)
def sign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> None:
num_files = len(files)
for file_index, file in enumerate(files):
logger.info('Server: Signed file [%d/%d] %s',
file_index + 1, num_files, file.relative_filepath)

View File

@@ -0,0 +1,47 @@
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
import logging.config
import sys
from pathlib import Path
from typing import Optional
import codesign.config_builder
from codesign.base_code_signer import BaseCodeSigner
class SimpleCodeSigner:
code_signer: Optional[BaseCodeSigner]
def __init__(self):
if sys.platform == 'linux':
from codesign.linux_code_signer import LinuxCodeSigner
self.code_signer = LinuxCodeSigner(codesign.config_builder)
elif sys.platform == 'win32':
from codesign.windows_code_signer import WindowsCodeSigner
self.code_signer = WindowsCodeSigner(codesign.config_builder)
else:
self.code_signer = None
def sign_file_or_directory(self, path: Path) -> None:
logging.config.dictConfig(codesign.config_builder.LOGGING)
self.code_signer.run_buildbot_path_sign_pipeline(path)

View File

@@ -0,0 +1,35 @@
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
from pathlib import Path
def ensure_file_does_not_exist_or_die(filepath: Path) -> None:
"""
If the file exists, unlink it.
If the file path exists and is not a file an assert will trigger.
If the file path does not exists nothing happens.
"""
if not filepath.exists():
return
if not filepath.is_file():
# TODO(sergey): Provide information about what the filepath actually is.
raise SystemExit(f'{filepath} is expected to be a file, but is not')
filepath.unlink()

View File

@@ -0,0 +1,75 @@
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
import logging
import subprocess
from pathlib import Path
from typing import List
from buildbot_utils import Builder
from codesign.absolute_and_relative_filename import AbsoluteAndRelativeFileName
from codesign.base_code_signer import BaseCodeSigner
logger = logging.getLogger(__name__)
logger_server = logger.getChild('server')
# NOTE: Check is done as filename.endswith(), so keep the dot
EXTENSIONS_TO_BE_SIGNED = {'.exe', '.dll', '.pyd', '.msi'}
BLACKLIST_FILE_PREFIXES = (
'api-ms-', 'concrt', 'msvcp', 'ucrtbase', 'vcomp', 'vcruntime')
class WindowsCodeSigner(BaseCodeSigner):
def check_file_is_to_be_signed(
self, file: AbsoluteAndRelativeFileName) -> bool:
base_name = file.relative_filepath.name
if any(base_name.startswith(prefix)
for prefix in BLACKLIST_FILE_PREFIXES):
return False
return file.relative_filepath.suffix in EXTENSIONS_TO_BE_SIGNED
def get_sign_command_prefix(self) -> List[str]:
return [
'signtool', 'sign', '/v',
'/f', self.config.CERTIFICATE_FILEPATH,
'/t', self.config.TIMESTAMP_AUTHORITY_URL]
def sign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> None:
# NOTE: Sign files one by one to avoid possible command line length
# overflow (which could happen if we ever decide to sign every binary
# in the install folder, for example).
#
# TODO(sergey): Consider doing batched signing of handful of files in
# one go (but only if this actually known to be much faster).
num_files = len(files)
for file_index, file in enumerate(files):
command = self.get_sign_command_prefix()
command.append(file.absolute_filepath)
logger_server.info(
'Running signtool command for file [%d/%d] %s...',
file_index + 1, num_files, file.relative_filepath)
# TODO(sergey): Check the status somehow. With a missing certificate
# the command still exists with a zero code.
subprocess.run(command)
# TODO(sergey): Report number of signed and ignored files.

View File

@@ -0,0 +1,37 @@
#!/usr/bin/env python3
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
# NOTE: This is a no-op signer (since there isn't really a procedure to sign
# Linux binaries yet). Used to debug and verify the code signing routines on
# a Linux environment.
import logging.config
from pathlib import Path
from typing import List
from codesign.linux_code_signer import LinuxCodeSigner
import codesign.config_server
if __name__ == "__main__":
logging.config.dictConfig(codesign.config_server.LOGGING)
code_signer = LinuxCodeSigner(codesign.config_server)
code_signer.run_signing_server()

View File

@@ -0,0 +1,11 @@
@echo off
rem This is an entry point of the codesign server for Windows.
rem It makes sure that signtool.exe is within the current PATH and can be
rem used by the Python script.
SETLOCAL
set PATH=C:\Program Files (x86)\Windows Kits\10\App Certification Kit;%PATH%
codesign_server_windows.py

Some files were not shown because too many files have changed in this diff Show More